From b2e9e7ac7ea7332c3aa8aef6acf2cc2f266baebe Mon Sep 17 00:00:00 2001 From: Srikanta Date: Tue, 4 Feb 2025 16:12:19 -0800 Subject: [PATCH 01/26] Add storage-blob-v2 library --- eng/versioning/version_client.txt | 1 + sdk/storage/azure-storage-blob-v2/pom.xml | 56 + .../azure/storage/blob/AppendBlobClient.java | 667 +++ .../storage/blob/AzureBlobStorageBuilder.java | 308 ++ .../com/azure/storage/blob/BlobClient.java | 2780 +++++++++++ .../azure/storage/blob/BlockBlobClient.java | 1013 ++++ .../azure/storage/blob/ContainerClient.java | 1674 +++++++ .../azure/storage/blob/PageBlobClient.java | 1389 ++++++ .../storage/blob/StorageServiceClient.java | 633 +++ .../blob/implementation/AppendBlobsImpl.java | 1156 +++++ .../implementation/AzureBlobStorageImpl.java | 157 + .../blob/implementation/BlobsImpl.java | 4082 +++++++++++++++++ .../blob/implementation/BlockBlobsImpl.java | 1848 ++++++++ .../blob/implementation/ContainersImpl.java | 2267 +++++++++ .../blob/implementation/PageBlobsImpl.java | 2206 +++++++++ .../blob/implementation/ServicesImpl.java | 984 ++++ .../models/BlobSignedIdentifierWrapper.java | 86 + .../blob/implementation/package-info.java | 9 + .../azure/storage/blob/models/AccessTier.java | 134 + .../storage/blob/models/AccountKind.java | 71 + .../AppendBlobsAppendBlockFromUrlHeaders.java | 390 ++ .../models/AppendBlobsAppendBlockHeaders.java | 444 ++ .../blob/models/AppendBlobsCreateHeaders.java | 353 ++ .../blob/models/AppendBlobsSealHeaders.java | 236 + .../storage/blob/models/ArchiveStatus.java | 69 + .../blob/models/ArrowConfiguration.java | 125 + .../azure/storage/blob/models/ArrowField.java | 188 + .../storage/blob/models/BlobAccessPolicy.java | 166 + .../blob/models/BlobAnalyticsLogging.java | 220 + .../models/BlobContainerEncryptionScope.java | 75 + .../blob/models/BlobContainerItem.java | 231 + .../models/BlobContainerItemProperties.java | 475 ++ .../blob/models/BlobContainersSegment.java | 265 ++ .../blob/models/BlobCopySourceTagsMode.java | 64 + .../storage/blob/models/BlobCorsRule.java | 235 + .../storage/blob/models/BlobDeleteType.java | 59 + .../storage/blob/models/BlobErrorCode.java | 656 +++ .../blob/models/BlobExpiryOptions.java | 74 + .../blob/models/BlobFlatListSegment.java | 110 + .../blob/models/BlobHierarchyListSegment.java | 144 + .../storage/blob/models/BlobHttpHeaders.java | 188 + .../models/BlobImmutabilityPolicyMode.java | 61 + .../storage/blob/models/BlobItemInternal.java | 410 ++ .../models/BlobItemPropertiesInternal.java | 1284 ++++++ .../storage/blob/models/BlobMetrics.java | 192 + .../azure/storage/blob/models/BlobName.java | 121 + .../blob/models/BlobPrefixInternal.java | 104 + .../blob/models/BlobRetentionPolicy.java | 136 + .../blob/models/BlobServiceProperties.java | 306 ++ .../blob/models/BlobServiceStatistics.java | 105 + .../blob/models/BlobSignedIdentifier.java | 132 + .../azure/storage/blob/models/BlobTag.java | 132 + .../azure/storage/blob/models/BlobTags.java | 125 + .../azure/storage/blob/models/BlobType.java | 61 + .../models/BlobsAbortCopyFromURLHeaders.java | 143 + .../blob/models/BlobsAcquireLeaseHeaders.java | 233 + .../blob/models/BlobsBreakLeaseHeaders.java | 236 + .../blob/models/BlobsChangeLeaseHeaders.java | 233 + .../blob/models/BlobsCopyFromURLHeaders.java | 379 ++ .../models/BlobsCreateSnapshotHeaders.java | 293 ++ .../blob/models/BlobsDeleteHeaders.java | 143 + .../BlobsDeleteImmutabilityPolicyHeaders.java | 143 + .../blob/models/BlobsDownloadHeaders.java | 1421 ++++++ .../models/BlobsGetAccountInfoHeaders.java | 236 + .../models/BlobsGetPropertiesHeaders.java | 1530 ++++++ .../blob/models/BlobsGetTagsHeaders.java | 143 + .../blob/models/BlobsQueryHeaders.java | 1006 ++++ .../blob/models/BlobsReleaseLeaseHeaders.java | 205 + .../blob/models/BlobsRenewLeaseHeaders.java | 233 + .../blob/models/BlobsSetExpiryHeaders.java | 205 + .../models/BlobsSetHttpHeadersHeaders.java | 237 + .../BlobsSetImmutabilityPolicyHeaders.java | 216 + .../blob/models/BlobsSetLegalHoldHeaders.java | 174 + .../blob/models/BlobsSetMetadataHeaders.java | 322 ++ .../blob/models/BlobsSetTagsHeaders.java | 143 + .../blob/models/BlobsSetTierHeaders.java | 104 + .../models/BlobsStartCopyFromURLHeaders.java | 292 ++ .../blob/models/BlobsUndeleteHeaders.java | 143 + .../com/azure/storage/blob/models/Block.java | 160 + .../BlockBlobsCommitBlockListHeaders.java | 384 ++ .../models/BlockBlobsGetBlockListHeaders.java | 263 ++ .../BlockBlobsPutBlobFromUrlHeaders.java | 353 ++ .../BlockBlobsStageBlockFromURLHeaders.java | 294 ++ .../models/BlockBlobsStageBlockHeaders.java | 322 ++ .../blob/models/BlockBlobsUploadHeaders.java | 381 ++ .../azure/storage/blob/models/BlockList.java | 172 + .../storage/blob/models/BlockListType.java | 61 + .../storage/blob/models/BlockLookupList.java | 174 + .../azure/storage/blob/models/ClearRange.java | 132 + .../models/ContainersAcquireLeaseHeaders.java | 233 + .../models/ContainersBreakLeaseHeaders.java | 236 + .../models/ContainersChangeLeaseHeaders.java | 233 + .../blob/models/ContainersCreateHeaders.java | 205 + .../blob/models/ContainersDeleteHeaders.java | 143 + .../models/ContainersFilterBlobsHeaders.java | 143 + .../ContainersGetAccessPolicyHeaders.java | 236 + .../ContainersGetAccountInfoHeaders.java | 236 + .../ContainersGetPropertiesHeaders.java | 528 +++ .../ContainersListBlobFlatSegmentHeaders.java | 169 + ...ainersListBlobHierarchySegmentHeaders.java | 169 + .../models/ContainersReleaseLeaseHeaders.java | 205 + .../blob/models/ContainersRenameHeaders.java | 143 + .../models/ContainersRenewLeaseHeaders.java | 233 + .../blob/models/ContainersRestoreHeaders.java | 143 + .../ContainersSetAccessPolicyHeaders.java | 205 + .../models/ContainersSetMetadataHeaders.java | 205 + .../models/ContainersSubmitBatchHeaders.java | 104 + .../storage/blob/models/CopyStatusType.java | 66 + .../azure/storage/blob/models/CpkInfo.java | 105 + .../models/DeleteSnapshotsOptionType.java | 56 + .../models/DelimitedTextConfiguration.java | 219 + .../blob/models/EncryptionAlgorithmType.java | 51 + .../storage/blob/models/EncryptionScope.java | 50 + .../storage/blob/models/FilterBlobItem.java | 216 + .../blob/models/FilterBlobSegment.java | 208 + .../blob/models/FilterBlobsIncludeItem.java | 56 + .../storage/blob/models/GeoReplication.java | 147 + .../blob/models/GeoReplicationStatus.java | 69 + .../blob/models/JsonTextConfiguration.java | 105 + .../azure/storage/blob/models/KeyInfo.java | 132 + .../blob/models/LeaseDurationType.java | 56 + .../storage/blob/models/LeaseStateType.java | 71 + .../storage/blob/models/LeaseStatusType.java | 56 + .../models/ListBlobContainersIncludeType.java | 61 + .../models/ListBlobsFlatSegmentResponse.java | 272 ++ .../ListBlobsHierarchySegmentResponse.java | 303 ++ .../blob/models/ListBlobsIncludeItem.java | 96 + .../models/PageBlobsClearPagesHeaders.java | 360 ++ .../PageBlobsCopyIncrementalHeaders.java | 264 ++ .../blob/models/PageBlobsCreateHeaders.java | 353 ++ .../PageBlobsGetPageRangesDiffHeaders.java | 237 + .../models/PageBlobsGetPageRangesHeaders.java | 237 + .../blob/models/PageBlobsResizeHeaders.java | 237 + .../PageBlobsUpdateSequenceNumberHeaders.java | 237 + .../PageBlobsUploadPagesFromURLHeaders.java | 362 ++ .../models/PageBlobsUploadPagesHeaders.java | 416 ++ .../azure/storage/blob/models/PageList.java | 170 + .../azure/storage/blob/models/PageRange.java | 132 + .../models/PremiumPageBlobAccessTier.java | 109 + .../storage/blob/models/PublicAccessType.java | 64 + .../storage/blob/models/QueryFormat.java | 224 + .../storage/blob/models/QueryFormatType.java | 66 + .../storage/blob/models/QueryRequest.java | 190 + .../blob/models/QuerySerialization.java | 104 + .../blob/models/RehydratePriority.java | 65 + .../blob/models/SequenceNumberActionType.java | 61 + .../models/ServicesFilterBlobsHeaders.java | 143 + .../models/ServicesGetAccountInfoHeaders.java | 236 + .../models/ServicesGetPropertiesHeaders.java | 104 + .../models/ServicesGetStatisticsHeaders.java | 143 + .../ServicesGetUserDelegationKeyHeaders.java | 143 + ...vicesListBlobContainersSegmentHeaders.java | 104 + ...sListBlobContainersSegmentNextHeaders.java | 104 + .../models/ServicesSetPropertiesHeaders.java | 104 + .../models/ServicesSubmitBatchHeaders.java | 104 + .../azure/storage/blob/models/SkuName.java | 71 + .../storage/blob/models/StaticWebsite.java | 188 + .../storage/blob/models/StorageError.java | 104 + .../blob/models/StorageErrorException.java | 42 + .../blob/models/UserDelegationKey.java | 278 ++ .../storage/blob/models/package-info.java | 9 + .../com/azure/storage/blob/package-info.java | 9 + .../azure/storage/blob/BlobClientTest.java | 28 + .../storage/blob/BlockBlobClientTest.java | 24 + .../storage/blob/ContainerClientTest.java | 25 + .../azure-storage-blob-v2/swagger/autorest.md | 667 +++ .../azure-storage-blob-v2/swagger/pom.xml | 17 + .../src/main/java/StorageCustomization.java | 48 + .../azure/storage/blob/BlobAsyncClient.java | 2 + .../blob/specialized/BlobAsyncClientBase.java | 7 +- .../blob/specialized/BlobClientBase.java | 7 +- sdk/storage/pom.xml | 25 +- 172 files changed, 53335 insertions(+), 19 deletions(-) create mode 100644 sdk/storage/azure-storage-blob-v2/pom.xml create mode 100644 sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/AppendBlobClient.java create mode 100644 sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/AzureBlobStorageBuilder.java create mode 100644 sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/BlobClient.java create mode 100644 sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/BlockBlobClient.java create mode 100644 sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/ContainerClient.java create mode 100644 sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/PageBlobClient.java create mode 100644 sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/StorageServiceClient.java create mode 100644 sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/implementation/AppendBlobsImpl.java create mode 100644 sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/implementation/AzureBlobStorageImpl.java create mode 100644 sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/implementation/BlobsImpl.java create mode 100644 sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/implementation/BlockBlobsImpl.java create mode 100644 sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/implementation/ContainersImpl.java create mode 100644 sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/implementation/PageBlobsImpl.java create mode 100644 sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/implementation/ServicesImpl.java create mode 100644 sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/implementation/models/BlobSignedIdentifierWrapper.java create mode 100644 sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/implementation/package-info.java create mode 100644 sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/AccessTier.java create mode 100644 sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/AccountKind.java create mode 100644 sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/AppendBlobsAppendBlockFromUrlHeaders.java create mode 100644 sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/AppendBlobsAppendBlockHeaders.java create mode 100644 sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/AppendBlobsCreateHeaders.java create mode 100644 sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/AppendBlobsSealHeaders.java create mode 100644 sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/ArchiveStatus.java create mode 100644 sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/ArrowConfiguration.java create mode 100644 sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/ArrowField.java create mode 100644 sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlobAccessPolicy.java create mode 100644 sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlobAnalyticsLogging.java create mode 100644 sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlobContainerEncryptionScope.java create mode 100644 sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlobContainerItem.java create mode 100644 sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlobContainerItemProperties.java create mode 100644 sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlobContainersSegment.java create mode 100644 sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlobCopySourceTagsMode.java create mode 100644 sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlobCorsRule.java create mode 100644 sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlobDeleteType.java create mode 100644 sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlobErrorCode.java create mode 100644 sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlobExpiryOptions.java create mode 100644 sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlobFlatListSegment.java create mode 100644 sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlobHierarchyListSegment.java create mode 100644 sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlobHttpHeaders.java create mode 100644 sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlobImmutabilityPolicyMode.java create mode 100644 sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlobItemInternal.java create mode 100644 sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlobItemPropertiesInternal.java create mode 100644 sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlobMetrics.java create mode 100644 sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlobName.java create mode 100644 sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlobPrefixInternal.java create mode 100644 sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlobRetentionPolicy.java create mode 100644 sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlobServiceProperties.java create mode 100644 sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlobServiceStatistics.java create mode 100644 sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlobSignedIdentifier.java create mode 100644 sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlobTag.java create mode 100644 sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlobTags.java create mode 100644 sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlobType.java create mode 100644 sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlobsAbortCopyFromURLHeaders.java create mode 100644 sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlobsAcquireLeaseHeaders.java create mode 100644 sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlobsBreakLeaseHeaders.java create mode 100644 sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlobsChangeLeaseHeaders.java create mode 100644 sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlobsCopyFromURLHeaders.java create mode 100644 sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlobsCreateSnapshotHeaders.java create mode 100644 sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlobsDeleteHeaders.java create mode 100644 sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlobsDeleteImmutabilityPolicyHeaders.java create mode 100644 sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlobsDownloadHeaders.java create mode 100644 sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlobsGetAccountInfoHeaders.java create mode 100644 sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlobsGetPropertiesHeaders.java create mode 100644 sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlobsGetTagsHeaders.java create mode 100644 sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlobsQueryHeaders.java create mode 100644 sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlobsReleaseLeaseHeaders.java create mode 100644 sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlobsRenewLeaseHeaders.java create mode 100644 sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlobsSetExpiryHeaders.java create mode 100644 sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlobsSetHttpHeadersHeaders.java create mode 100644 sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlobsSetImmutabilityPolicyHeaders.java create mode 100644 sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlobsSetLegalHoldHeaders.java create mode 100644 sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlobsSetMetadataHeaders.java create mode 100644 sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlobsSetTagsHeaders.java create mode 100644 sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlobsSetTierHeaders.java create mode 100644 sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlobsStartCopyFromURLHeaders.java create mode 100644 sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlobsUndeleteHeaders.java create mode 100644 sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/Block.java create mode 100644 sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlockBlobsCommitBlockListHeaders.java create mode 100644 sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlockBlobsGetBlockListHeaders.java create mode 100644 sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlockBlobsPutBlobFromUrlHeaders.java create mode 100644 sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlockBlobsStageBlockFromURLHeaders.java create mode 100644 sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlockBlobsStageBlockHeaders.java create mode 100644 sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlockBlobsUploadHeaders.java create mode 100644 sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlockList.java create mode 100644 sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlockListType.java create mode 100644 sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlockLookupList.java create mode 100644 sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/ClearRange.java create mode 100644 sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/ContainersAcquireLeaseHeaders.java create mode 100644 sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/ContainersBreakLeaseHeaders.java create mode 100644 sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/ContainersChangeLeaseHeaders.java create mode 100644 sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/ContainersCreateHeaders.java create mode 100644 sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/ContainersDeleteHeaders.java create mode 100644 sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/ContainersFilterBlobsHeaders.java create mode 100644 sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/ContainersGetAccessPolicyHeaders.java create mode 100644 sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/ContainersGetAccountInfoHeaders.java create mode 100644 sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/ContainersGetPropertiesHeaders.java create mode 100644 sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/ContainersListBlobFlatSegmentHeaders.java create mode 100644 sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/ContainersListBlobHierarchySegmentHeaders.java create mode 100644 sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/ContainersReleaseLeaseHeaders.java create mode 100644 sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/ContainersRenameHeaders.java create mode 100644 sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/ContainersRenewLeaseHeaders.java create mode 100644 sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/ContainersRestoreHeaders.java create mode 100644 sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/ContainersSetAccessPolicyHeaders.java create mode 100644 sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/ContainersSetMetadataHeaders.java create mode 100644 sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/ContainersSubmitBatchHeaders.java create mode 100644 sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/CopyStatusType.java create mode 100644 sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/CpkInfo.java create mode 100644 sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/DeleteSnapshotsOptionType.java create mode 100644 sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/DelimitedTextConfiguration.java create mode 100644 sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/EncryptionAlgorithmType.java create mode 100644 sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/EncryptionScope.java create mode 100644 sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/FilterBlobItem.java create mode 100644 sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/FilterBlobSegment.java create mode 100644 sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/FilterBlobsIncludeItem.java create mode 100644 sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/GeoReplication.java create mode 100644 sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/GeoReplicationStatus.java create mode 100644 sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/JsonTextConfiguration.java create mode 100644 sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/KeyInfo.java create mode 100644 sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/LeaseDurationType.java create mode 100644 sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/LeaseStateType.java create mode 100644 sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/LeaseStatusType.java create mode 100644 sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/ListBlobContainersIncludeType.java create mode 100644 sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/ListBlobsFlatSegmentResponse.java create mode 100644 sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/ListBlobsHierarchySegmentResponse.java create mode 100644 sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/ListBlobsIncludeItem.java create mode 100644 sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/PageBlobsClearPagesHeaders.java create mode 100644 sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/PageBlobsCopyIncrementalHeaders.java create mode 100644 sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/PageBlobsCreateHeaders.java create mode 100644 sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/PageBlobsGetPageRangesDiffHeaders.java create mode 100644 sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/PageBlobsGetPageRangesHeaders.java create mode 100644 sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/PageBlobsResizeHeaders.java create mode 100644 sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/PageBlobsUpdateSequenceNumberHeaders.java create mode 100644 sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/PageBlobsUploadPagesFromURLHeaders.java create mode 100644 sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/PageBlobsUploadPagesHeaders.java create mode 100644 sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/PageList.java create mode 100644 sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/PageRange.java create mode 100644 sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/PremiumPageBlobAccessTier.java create mode 100644 sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/PublicAccessType.java create mode 100644 sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/QueryFormat.java create mode 100644 sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/QueryFormatType.java create mode 100644 sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/QueryRequest.java create mode 100644 sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/QuerySerialization.java create mode 100644 sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/RehydratePriority.java create mode 100644 sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/SequenceNumberActionType.java create mode 100644 sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/ServicesFilterBlobsHeaders.java create mode 100644 sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/ServicesGetAccountInfoHeaders.java create mode 100644 sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/ServicesGetPropertiesHeaders.java create mode 100644 sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/ServicesGetStatisticsHeaders.java create mode 100644 sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/ServicesGetUserDelegationKeyHeaders.java create mode 100644 sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/ServicesListBlobContainersSegmentHeaders.java create mode 100644 sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/ServicesListBlobContainersSegmentNextHeaders.java create mode 100644 sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/ServicesSetPropertiesHeaders.java create mode 100644 sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/ServicesSubmitBatchHeaders.java create mode 100644 sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/SkuName.java create mode 100644 sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/StaticWebsite.java create mode 100644 sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/StorageError.java create mode 100644 sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/StorageErrorException.java create mode 100644 sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/UserDelegationKey.java create mode 100644 sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/package-info.java create mode 100644 sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/package-info.java create mode 100644 sdk/storage/azure-storage-blob-v2/src/test/java/com/azure/storage/blob/BlobClientTest.java create mode 100644 sdk/storage/azure-storage-blob-v2/src/test/java/com/azure/storage/blob/BlockBlobClientTest.java create mode 100644 sdk/storage/azure-storage-blob-v2/src/test/java/com/azure/storage/blob/ContainerClientTest.java create mode 100644 sdk/storage/azure-storage-blob-v2/swagger/autorest.md create mode 100644 sdk/storage/azure-storage-blob-v2/swagger/pom.xml create mode 100644 sdk/storage/azure-storage-blob-v2/swagger/src/main/java/StorageCustomization.java diff --git a/eng/versioning/version_client.txt b/eng/versioning/version_client.txt index 27d7ed4e9b5f..0310ed76ebc3 100644 --- a/eng/versioning/version_client.txt +++ b/eng/versioning/version_client.txt @@ -187,6 +187,7 @@ com.azure:azure-storage-blob-batch;12.25.0;12.26.0-beta.1 com.azure:azure-storage-blob-changefeed;12.0.0-beta.27;12.0.0-beta.28 com.azure:azure-storage-blob-cryptography;12.28.0;12.29.0-beta.1 com.azure:azure-storage-blob-nio;12.0.0-beta.28;12.0.0-beta.29 +com.azure:azure-storage-blob-v2;1.0.0-beta.1;1.0.0-beta.1 com.azure:azure-storage-common;12.28.0;12.29.0-beta.1 com.azure:azure-storage-file-share;12.25.1;12.26.0-beta.1 com.azure:azure-storage-file-datalake;12.22.0;12.23.0-beta.1 diff --git a/sdk/storage/azure-storage-blob-v2/pom.xml b/sdk/storage/azure-storage-blob-v2/pom.xml new file mode 100644 index 000000000000..675c5574b64f --- /dev/null +++ b/sdk/storage/azure-storage-blob-v2/pom.xml @@ -0,0 +1,56 @@ + + 4.0.0 + + + com.azure + azure-client-sdk-parent-v2 + 1.7.0 + ../../parents/azure-client-sdk-parent-v2 + + + com.azure + azure-storage-blob-v2 + 1.0.0-beta.1 + + Microsoft Azure SDK V2 for Storage Blob + This package contains Microsoft Azure SDK V2 for Storage Blob. + + + + azure-java-build-docs + ${site.url}/site/${project.artifactId} + + + + + https://github.com/Azure/azure-sdk-for-java + + + + + com.azure + azure-core-v2 + 1.0.0-beta.1 + + + org.junit.jupiter + junit-jupiter-api + 5.9.3 + test + + + org.junit.jupiter + junit-jupiter-engine + 5.9.3 + test + + + org.junit.jupiter + junit-jupiter-params + 5.9.3 + test + + + + diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/AppendBlobClient.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/AppendBlobClient.java new file mode 100644 index 000000000000..f2f0b03f62ee --- /dev/null +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/AppendBlobClient.java @@ -0,0 +1,667 @@ +// 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; + +import com.azure.core.v2.annotation.Generated; +import com.azure.core.v2.annotation.ReturnType; +import com.azure.core.v2.annotation.ServiceClient; +import com.azure.core.v2.annotation.ServiceMethod; +import com.azure.core.v2.http.rest.ResponseBase; +import com.azure.storage.blob.implementation.AppendBlobsImpl; +import com.azure.storage.blob.models.*; +import io.clientcore.core.http.models.Response; +import io.clientcore.core.util.Context; +import io.clientcore.core.util.binarydata.BinaryData; +import java.time.OffsetDateTime; +import java.util.Map; + +/** + * Initializes a new instance of the synchronous AzureBlobStorage type. + */ +@ServiceClient(builder = AzureBlobStorageBuilder.class) +public final class AppendBlobClient { + @Generated + private final AppendBlobsImpl serviceClient; + + /** + * Initializes an instance of AppendBlobClient class. + * + * @param serviceClient the service client implementation. + */ + @Generated + AppendBlobClient(AppendBlobsImpl serviceClient) { + this.serviceClient = serviceClient; + } + + /** + * The Create Append Blob operation creates a new append blob. + * + * @param containerName The container name. + * @param blob The blob name. + * @param contentLength The length of the request. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param metadata Optional. Specifies a user-defined name-value pair associated with the blob. If no name-value + * pairs are specified, the operation will copy the metadata from the source blob or file to the destination blob. + * If one or more name-value pairs are specified, the destination blob is created with the specified metadata, and + * metadata is not copied from the source blob or file. Note that beginning with version 2009-09-19, metadata names + * must adhere to the naming rules for C# identifiers. See Naming and Referencing Containers, Blobs, and Metadata + * for more information. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the + * specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since + * the specified date/time. + * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. + * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. + * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param blobTagsString Optional. Used to set blob tags in various blob operations. + * @param immutabilityPolicyExpiry Specifies the date time when the blobs immutability policy is set to expire. + * @param immutabilityPolicyMode Specifies the immutability policy mode to set on the blob. + * @param legalHold Specified if a legal hold should be set on the blob. + * @param blobHttpHeaders Parameter group. + * @param cpkInfo Parameter group. + * @param encryptionScopeParam Parameter group. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws StorageErrorException thrown if 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(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 this.serviceClient.createWithResponse(containerName, blob, contentLength, timeout, metadata, leaseId, + ifModifiedSince, ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, requestId, blobTagsString, + immutabilityPolicyExpiry, immutabilityPolicyMode, legalHold, blobHttpHeaders, cpkInfo, encryptionScopeParam, + context); + } + + /** + * The Create Append Blob operation creates a new append blob. + * + * @param containerName The container name. + * @param blob The blob name. + * @param contentLength The length of the request. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param metadata Optional. Specifies a user-defined name-value pair associated with the blob. If no name-value + * pairs are specified, the operation will copy the metadata from the source blob or file to the destination blob. + * If one or more name-value pairs are specified, the destination blob is created with the specified metadata, and + * metadata is not copied from the source blob or file. Note that beginning with version 2009-09-19, metadata names + * must adhere to the naming rules for C# identifiers. See Naming and Referencing Containers, Blobs, and Metadata + * for more information. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the + * specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since + * the specified date/time. + * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. + * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. + * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param blobTagsString Optional. Used to set blob tags in various blob operations. + * @param immutabilityPolicyExpiry Specifies the date time when the blobs immutability policy is set to expire. + * @param immutabilityPolicyMode Specifies the immutability policy mode to set on the blob. + * @param legalHold Specified if a legal hold should be set on the blob. + * @param blobHttpHeaders Parameter group. + * @param cpkInfo Parameter group. + * @param encryptionScopeParam Parameter group. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws StorageErrorException 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(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) { + this.serviceClient.create(containerName, blob, contentLength, timeout, metadata, leaseId, ifModifiedSince, + ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, requestId, blobTagsString, immutabilityPolicyExpiry, + immutabilityPolicyMode, legalHold, blobHttpHeaders, cpkInfo, encryptionScopeParam); + } + + /** + * The Create Append Blob operation creates a new append blob. + * + * @param containerName The container name. + * @param blob The blob name. + * @param contentLength The length of the request. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param metadata Optional. Specifies a user-defined name-value pair associated with the blob. If no name-value + * pairs are specified, the operation will copy the metadata from the source blob or file to the destination blob. + * If one or more name-value pairs are specified, the destination blob is created with the specified metadata, and + * metadata is not copied from the source blob or file. Note that beginning with version 2009-09-19, metadata names + * must adhere to the naming rules for C# identifiers. See Naming and Referencing Containers, Blobs, and Metadata + * for more information. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the + * specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since + * the specified date/time. + * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. + * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. + * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param blobTagsString Optional. Used to set blob tags in various blob operations. + * @param immutabilityPolicyExpiry Specifies the date time when the blobs immutability policy is set to expire. + * @param immutabilityPolicyMode Specifies the immutability policy mode to set on the blob. + * @param legalHold Specified if a legal hold should be set on the blob. + * @param blobHttpHeaders Parameter group. + * @param cpkInfo Parameter group. + * @param encryptionScopeParam Parameter group. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws StorageErrorException 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 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) { + return this.serviceClient.createNoCustomHeadersWithResponse(containerName, blob, contentLength, timeout, + metadata, leaseId, ifModifiedSince, ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, requestId, + blobTagsString, immutabilityPolicyExpiry, immutabilityPolicyMode, legalHold, blobHttpHeaders, cpkInfo, + encryptionScopeParam, context); + } + + /** + * The Append Block operation commits a new block of data to the end of an existing append blob. The Append Block + * operation is permitted only if the blob was created with x-ms-blob-type set to AppendBlob. Append Block is + * supported only on version 2015-02-21 version or later. + * + * @param containerName The container name. + * @param blob The blob name. + * @param contentLength The length of the request. + * @param body Initial data. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @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 StorageErrorException thrown if 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(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 this.serviceClient.appendBlockWithResponse(containerName, blob, contentLength, body, timeout, + transactionalContentMD5, transactionalContentCrc64, leaseId, maxSize, appendPosition, ifModifiedSince, + ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, requestId, structuredBodyType, structuredContentLength, + cpkInfo, encryptionScopeParam, context); + } + + /** + * The Append Block operation commits a new block of data to the end of an existing append blob. The Append Block + * operation is permitted only if the blob was created with x-ms-blob-type set to AppendBlob. Append Block is + * supported only on version 2015-02-21 version or later. + * + * @param containerName The container name. + * @param blob The blob name. + * @param contentLength The length of the request. + * @param body Initial data. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @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 StorageErrorException 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(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) { + this.serviceClient.appendBlock(containerName, blob, contentLength, body, timeout, transactionalContentMD5, + transactionalContentCrc64, leaseId, maxSize, appendPosition, ifModifiedSince, ifUnmodifiedSince, ifMatch, + ifNoneMatch, ifTags, requestId, structuredBodyType, structuredContentLength, cpkInfo, encryptionScopeParam); + } + + /** + * The Append Block operation commits a new block of data to the end of an existing append blob. The Append Block + * operation is permitted only if the blob was created with x-ms-blob-type set to AppendBlob. Append Block is + * supported only on version 2015-02-21 version or later. + * + * @param containerName The container name. + * @param blob The blob name. + * @param contentLength The length of the request. + * @param body Initial data. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param transactionalContentMD5 Specify the transactional md5 for the body, to be validated by the service. + * @param transactionalContentCrc64 Specify the transactional crc64 for the body, to be validated by the service. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param maxSize Optional conditional header. The max length in bytes permitted for the append blob. If the Append + * Block operation would cause the blob to exceed that limit or if the blob size is already greater than the value + * specified in this header, the request will fail with MaxBlobSizeConditionNotMet error (HTTP status code 412 - + * Precondition Failed). + * @param appendPosition Optional conditional header, used only for the Append Block operation. A number indicating + * the byte offset to compare. Append Block will succeed only if the append position is equal to this number. If it + * is not, the request will fail with the AppendPositionConditionNotMet error (HTTP status code 412 - Precondition + * Failed). + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the + * specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since + * the specified date/time. + * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. + * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. + * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param 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 StorageErrorException 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 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) { + return this.serviceClient.appendBlockNoCustomHeadersWithResponse(containerName, blob, contentLength, body, + timeout, transactionalContentMD5, transactionalContentCrc64, leaseId, maxSize, appendPosition, + ifModifiedSince, ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, requestId, structuredBodyType, + structuredContentLength, cpkInfo, encryptionScopeParam, context); + } + + /** + * The Append Block operation commits a new block of data to the end of an existing append blob where the contents + * are read from a source url. The Append Block operation is permitted only if the blob was created with + * x-ms-blob-type set to AppendBlob. Append Block is supported only on version 2015-02-21 version or later. + * + * @param containerName The container name. + * @param blob The blob name. + * @param sourceUrl Specify a URL to the copy source. + * @param contentLength The length of the request. + * @param sourceRange Bytes of source data in the specified range. + * @param sourceContentMD5 Specify the md5 calculated for the range of bytes that must be read from the copy source. + * @param sourceContentcrc64 Specify the crc64 calculated for the range of bytes that must be read from the copy + * source. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param transactionalContentMD5 Specify the transactional md5 for the body, to be validated by the service. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param maxSize Optional conditional header. The max length in bytes permitted for the append blob. If the Append + * Block operation would cause the blob to exceed that limit or if the blob size is already greater than the value + * specified in this header, the request will fail with MaxBlobSizeConditionNotMet error (HTTP status code 412 - + * Precondition Failed). + * @param appendPosition Optional conditional header, used only for the Append Block operation. A number indicating + * the byte offset to compare. Append Block will succeed only if the append position is equal to this number. If it + * is not, the request will fail with the AppendPositionConditionNotMet error (HTTP status code 412 - Precondition + * Failed). + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the + * specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since + * the specified date/time. + * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. + * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. + * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. + * @param sourceIfModifiedSince Specify this header value to operate only on a blob if it has been modified since + * the specified date/time. + * @param sourceIfUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified + * since the specified date/time. + * @param sourceIfMatch Specify an ETag value to operate only on blobs with a matching value. + * @param sourceIfNoneMatch Specify an ETag value to operate only on blobs without a matching value. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param copySourceAuthorization Only Bearer type is supported. Credentials should be a valid OAuth access token to + * copy source. + * @param cpkInfo Parameter group. + * @param encryptionScopeParam Parameter group. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws StorageErrorException thrown if 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 containerName, + String blob, String sourceUrl, long contentLength, String sourceRange, byte[] sourceContentMD5, + byte[] sourceContentcrc64, Integer timeout, byte[] transactionalContentMD5, String leaseId, Long maxSize, + Long appendPosition, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, + String ifNoneMatch, String ifTags, OffsetDateTime sourceIfModifiedSince, OffsetDateTime sourceIfUnmodifiedSince, + String sourceIfMatch, String sourceIfNoneMatch, String requestId, String copySourceAuthorization, + CpkInfo cpkInfo, EncryptionScope encryptionScopeParam, Context context) { + return this.serviceClient.appendBlockFromUrlWithResponse(containerName, blob, sourceUrl, contentLength, + sourceRange, sourceContentMD5, sourceContentcrc64, timeout, transactionalContentMD5, leaseId, maxSize, + appendPosition, ifModifiedSince, ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, sourceIfModifiedSince, + sourceIfUnmodifiedSince, sourceIfMatch, sourceIfNoneMatch, requestId, copySourceAuthorization, cpkInfo, + encryptionScopeParam, context); + } + + /** + * The Append Block operation commits a new block of data to the end of an existing append blob where the contents + * are read from a source url. The Append Block operation is permitted only if the blob was created with + * x-ms-blob-type set to AppendBlob. Append Block is supported only on version 2015-02-21 version or later. + * + * @param containerName The container name. + * @param blob The blob name. + * @param sourceUrl Specify a URL to the copy source. + * @param contentLength The length of the request. + * @param sourceRange Bytes of source data in the specified range. + * @param sourceContentMD5 Specify the md5 calculated for the range of bytes that must be read from the copy source. + * @param sourceContentcrc64 Specify the crc64 calculated for the range of bytes that must be read from the copy + * source. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param transactionalContentMD5 Specify the transactional md5 for the body, to be validated by the service. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param maxSize Optional conditional header. The max length in bytes permitted for the append blob. If the Append + * Block operation would cause the blob to exceed that limit or if the blob size is already greater than the value + * specified in this header, the request will fail with MaxBlobSizeConditionNotMet error (HTTP status code 412 - + * Precondition Failed). + * @param appendPosition Optional conditional header, used only for the Append Block operation. A number indicating + * the byte offset to compare. Append Block will succeed only if the append position is equal to this number. If it + * is not, the request will fail with the AppendPositionConditionNotMet error (HTTP status code 412 - Precondition + * Failed). + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the + * specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since + * the specified date/time. + * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. + * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. + * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. + * @param sourceIfModifiedSince Specify this header value to operate only on a blob if it has been modified since + * the specified date/time. + * @param sourceIfUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified + * since the specified date/time. + * @param sourceIfMatch Specify an ETag value to operate only on blobs with a matching value. + * @param sourceIfNoneMatch Specify an ETag value to operate only on blobs without a matching value. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param copySourceAuthorization Only Bearer type is supported. Credentials should be a valid OAuth access token to + * copy source. + * @param cpkInfo Parameter group. + * @param encryptionScopeParam Parameter group. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws StorageErrorException 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 containerName, String blob, String sourceUrl, long contentLength, + String sourceRange, byte[] sourceContentMD5, byte[] sourceContentcrc64, Integer timeout, + byte[] transactionalContentMD5, String leaseId, Long maxSize, Long appendPosition, + OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, + String ifTags, OffsetDateTime sourceIfModifiedSince, OffsetDateTime sourceIfUnmodifiedSince, + String sourceIfMatch, String sourceIfNoneMatch, String requestId, String copySourceAuthorization, + CpkInfo cpkInfo, EncryptionScope encryptionScopeParam) { + this.serviceClient.appendBlockFromUrl(containerName, blob, sourceUrl, contentLength, sourceRange, + sourceContentMD5, sourceContentcrc64, timeout, transactionalContentMD5, leaseId, maxSize, appendPosition, + ifModifiedSince, ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, sourceIfModifiedSince, + sourceIfUnmodifiedSince, sourceIfMatch, sourceIfNoneMatch, requestId, copySourceAuthorization, cpkInfo, + encryptionScopeParam); + } + + /** + * The Append Block operation commits a new block of data to the end of an existing append blob where the contents + * are read from a source url. The Append Block operation is permitted only if the blob was created with + * x-ms-blob-type set to AppendBlob. Append Block is supported only on version 2015-02-21 version or later. + * + * @param containerName The container name. + * @param blob The blob name. + * @param sourceUrl Specify a URL to the copy source. + * @param contentLength The length of the request. + * @param sourceRange Bytes of source data in the specified range. + * @param sourceContentMD5 Specify the md5 calculated for the range of bytes that must be read from the copy source. + * @param sourceContentcrc64 Specify the crc64 calculated for the range of bytes that must be read from the copy + * source. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param transactionalContentMD5 Specify the transactional md5 for the body, to be validated by the service. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param maxSize Optional conditional header. The max length in bytes permitted for the append blob. If the Append + * Block operation would cause the blob to exceed that limit or if the blob size is already greater than the value + * specified in this header, the request will fail with MaxBlobSizeConditionNotMet error (HTTP status code 412 - + * Precondition Failed). + * @param appendPosition Optional conditional header, used only for the Append Block operation. A number indicating + * the byte offset to compare. Append Block will succeed only if the append position is equal to this number. If it + * is not, the request will fail with the AppendPositionConditionNotMet error (HTTP status code 412 - Precondition + * Failed). + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the + * specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since + * the specified date/time. + * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. + * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. + * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. + * @param sourceIfModifiedSince Specify this header value to operate only on a blob if it has been modified since + * the specified date/time. + * @param sourceIfUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified + * since the specified date/time. + * @param sourceIfMatch Specify an ETag value to operate only on blobs with a matching value. + * @param sourceIfNoneMatch Specify an ETag value to operate only on blobs without a matching value. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param copySourceAuthorization Only Bearer type is supported. Credentials should be a valid OAuth access token to + * copy source. + * @param cpkInfo Parameter group. + * @param encryptionScopeParam Parameter group. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws StorageErrorException 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 Response appendBlockFromUrlNoCustomHeadersWithResponse(String containerName, String blob, + String sourceUrl, long contentLength, String sourceRange, byte[] sourceContentMD5, byte[] sourceContentcrc64, + Integer timeout, byte[] transactionalContentMD5, String leaseId, Long maxSize, Long appendPosition, + OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, + String ifTags, OffsetDateTime sourceIfModifiedSince, OffsetDateTime sourceIfUnmodifiedSince, + String sourceIfMatch, String sourceIfNoneMatch, String requestId, String copySourceAuthorization, + CpkInfo cpkInfo, EncryptionScope encryptionScopeParam, Context context) { + return this.serviceClient.appendBlockFromUrlNoCustomHeadersWithResponse(containerName, blob, sourceUrl, + contentLength, sourceRange, sourceContentMD5, sourceContentcrc64, timeout, transactionalContentMD5, leaseId, + maxSize, appendPosition, ifModifiedSince, ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, + sourceIfModifiedSince, sourceIfUnmodifiedSince, sourceIfMatch, sourceIfNoneMatch, requestId, + copySourceAuthorization, cpkInfo, encryptionScopeParam, context); + } + + /** + * The Seal operation seals the Append Blob to make it read-only. Seal is supported only on version 2019-12-12 + * version or later. + * + * @param containerName The container name. + * @param blob The blob name. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the + * specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since + * the specified date/time. + * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. + * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. + * @param appendPosition Optional conditional header, used only for the Append Block operation. A number indicating + * the byte offset to compare. Append Block will succeed only if the append position is equal to this number. If it + * is not, the request will fail with the AppendPositionConditionNotMet error (HTTP status code 412 - Precondition + * Failed). + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws StorageErrorException thrown if 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(String containerName, String blob, + Integer timeout, String requestId, String leaseId, OffsetDateTime ifModifiedSince, + OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, Long appendPosition, Context context) { + return this.serviceClient.sealWithResponse(containerName, blob, timeout, requestId, leaseId, ifModifiedSince, + ifUnmodifiedSince, ifMatch, ifNoneMatch, appendPosition, context); + } + + /** + * The Seal operation seals the Append Blob to make it read-only. Seal is supported only on version 2019-12-12 + * version or later. + * + * @param containerName The container name. + * @param blob The blob name. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the + * specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since + * the specified date/time. + * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. + * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. + * @param appendPosition Optional conditional header, used only for the Append Block operation. A number indicating + * the byte offset to compare. Append Block will succeed only if the append position is equal to this number. If it + * is not, the request will fail with the AppendPositionConditionNotMet error (HTTP status code 412 - Precondition + * Failed). + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws StorageErrorException 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(String containerName, String blob, Integer timeout, String requestId, String leaseId, + OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, + Long appendPosition) { + this.serviceClient.seal(containerName, blob, timeout, requestId, leaseId, ifModifiedSince, ifUnmodifiedSince, + ifMatch, ifNoneMatch, appendPosition); + } + + /** + * The Seal operation seals the Append Blob to make it read-only. Seal is supported only on version 2019-12-12 + * version or later. + * + * @param containerName The container name. + * @param blob The blob name. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the + * specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since + * the specified date/time. + * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. + * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. + * @param appendPosition Optional conditional header, used only for the Append Block operation. A number indicating + * the byte offset to compare. Append Block will succeed only if the append position is equal to this number. If it + * is not, the request will fail with the AppendPositionConditionNotMet error (HTTP status code 412 - Precondition + * Failed). + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws StorageErrorException 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 Response sealNoCustomHeadersWithResponse(String containerName, String blob, Integer timeout, + String requestId, String leaseId, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, + String ifMatch, String ifNoneMatch, Long appendPosition, Context context) { + return this.serviceClient.sealNoCustomHeadersWithResponse(containerName, blob, timeout, requestId, leaseId, + ifModifiedSince, ifUnmodifiedSince, ifMatch, ifNoneMatch, appendPosition, context); + } +} diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/AzureBlobStorageBuilder.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/AzureBlobStorageBuilder.java new file mode 100644 index 000000000000..7bf26ef801b8 --- /dev/null +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/AzureBlobStorageBuilder.java @@ -0,0 +1,308 @@ +// 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; + +import com.azure.core.v2.annotation.Generated; +import com.azure.core.v2.annotation.ServiceClientBuilder; +import com.azure.core.v2.http.policy.AddDatePolicy; +import com.azure.core.v2.http.policy.AddHeadersFromContextPolicy; +import com.azure.core.v2.http.policy.RequestIdPolicy; +import com.azure.storage.blob.implementation.AzureBlobStorageImpl; +import io.clientcore.core.http.client.HttpClient; +import io.clientcore.core.http.models.HttpLogOptions; +import io.clientcore.core.http.models.HttpRedirectOptions; +import io.clientcore.core.http.models.HttpRetryOptions; +import io.clientcore.core.http.pipeline.HttpLoggingPolicy; +import io.clientcore.core.http.pipeline.HttpPipeline; +import io.clientcore.core.http.pipeline.HttpPipelineBuilder; +import io.clientcore.core.http.pipeline.HttpPipelinePolicy; +import io.clientcore.core.http.pipeline.HttpRetryPolicy; +import io.clientcore.core.models.traits.ConfigurationTrait; +import io.clientcore.core.models.traits.HttpTrait; +import io.clientcore.core.util.configuration.Configuration; +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 = { + StorageServiceClient.class, + ContainerClient.class, + BlobClient.class, + PageBlobClient.class, + AppendBlobClient.class, + BlockBlobClient.class }) +public final class AzureBlobStorageBuilder + 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 AzureBlobStorageBuilder. + */ + @Generated + public AzureBlobStorageBuilder() { + this.pipelinePolicies = new ArrayList<>(); + } + + /* + * The HTTP pipeline to send requests through. + */ + @Generated + private HttpPipeline pipeline; + + /** + * {@inheritDoc}. + */ + @Generated + @Override + public AzureBlobStorageBuilder httpPipeline(HttpPipeline pipeline) { + this.pipeline = pipeline; + return this; + } + + /* + * The HTTP client used to send the request. + */ + @Generated + private HttpClient httpClient; + + /** + * {@inheritDoc}. + */ + @Generated + @Override + public AzureBlobStorageBuilder httpClient(HttpClient httpClient) { + this.httpClient = httpClient; + return this; + } + + /* + * The logging configuration for HTTP requests and responses. + */ + @Generated + private HttpLogOptions httpLogOptions; + + /** + * {@inheritDoc}. + */ + @Generated + @Override + public AzureBlobStorageBuilder httpLogOptions(HttpLogOptions httpLogOptions) { + this.httpLogOptions = httpLogOptions; + return this; + } + + /* + * The retry options to configure retry policy for failed requests. + */ + @Generated + private HttpRetryOptions retryOptions; + + /** + * {@inheritDoc}. + */ + @Generated + @Override + public AzureBlobStorageBuilder httpRetryOptions(HttpRetryOptions retryOptions) { + this.retryOptions = retryOptions; + return this; + } + + /** + * {@inheritDoc}. + */ + @Generated + @Override + public AzureBlobStorageBuilder addHttpPipelinePolicy(HttpPipelinePolicy customPolicy) { + Objects.requireNonNull(customPolicy, "'customPolicy' cannot be null."); + pipelinePolicies.add(customPolicy); + return this; + } + + /* + * The redirect options to configure redirect policy + */ + @Generated + private HttpRedirectOptions redirectOptions; + + /** + * {@inheritDoc}. + */ + @Generated + @Override + public AzureBlobStorageBuilder httpRedirectOptions(HttpRedirectOptions redirectOptions) { + this.redirectOptions = redirectOptions; + return this; + } + + /* + * The configuration store that is used during construction of the service client. + */ + @Generated + private Configuration configuration; + + /** + * {@inheritDoc}. + */ + @Generated + @Override + public AzureBlobStorageBuilder 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 AzureBlobStorageBuilder. + */ + @Generated + public AzureBlobStorageBuilder 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 AzureBlobStorageBuilder. + */ + @Generated + public AzureBlobStorageBuilder version(String version) { + this.version = version; + return this; + } + + /** + * Builds an instance of AzureBlobStorageImpl with the provided parameters. + * + * @return an instance of AzureBlobStorageImpl. + */ + @Generated + private AzureBlobStorageImpl buildInnerClient() { + this.validateClient(); + HttpPipeline localPipeline = (pipeline != null) ? pipeline : createHttpPipeline(); + String localVersion = (version != null) ? version : "2025-01-05"; + AzureBlobStorageImpl client = new AzureBlobStorageImpl(localPipeline, this.url, localVersion); + return client; + } + + @Generated + private void validateClient() { + // This method is invoked from 'buildInnerClient'/'buildClient' method. + // Developer can customize this method, to validate that the necessary conditions are met for the new client. + Objects.requireNonNull(url, "'url' cannot be null."); + } + + @Generated + private HttpPipeline createHttpPipeline() { + Configuration buildConfiguration + = (configuration == null) ? Configuration.getGlobalConfiguration() : configuration; + HttpLogOptions localHttpLogOptions = this.httpLogOptions == null ? new HttpLogOptions() : this.httpLogOptions; + List policies = new ArrayList<>(); + String clientName = PROPERTIES.getOrDefault(SDK_NAME, "UnknownName"); + String clientVersion = PROPERTIES.getOrDefault(SDK_VERSION, "UnknownVersion"); + policies.add(new RequestIdPolicy()); + policies.add(new AddHeadersFromContextPolicy()); + this.pipelinePolicies.stream().forEach(p -> policies.add(p)); + policies.add(retryOptions == null ? new HttpRetryPolicy() : new HttpRetryPolicy(retryOptions)); + policies.add(new AddDatePolicy()); + this.pipelinePolicies.stream().forEach(p -> policies.add(p)); + policies.add(new HttpLoggingPolicy(localHttpLogOptions)); + HttpPipeline httpPipeline = new HttpPipelineBuilder().policies(policies.toArray(new HttpPipelinePolicy[0])) + .httpClient(httpClient) + .build(); + return httpPipeline; + } + + /** + * Builds an instance of ServiceClient class. + * + * @return an instance of ServiceClient. + */ + @Generated + public StorageServiceClient buildServiceClient() { + return new StorageServiceClient(buildInnerClient().getServices()); + } + + /** + * Builds an instance of ContainerClient class. + * + * @return an instance of ContainerClient. + */ + @Generated + public ContainerClient buildContainerClient() { + return new ContainerClient(buildInnerClient().getContainers()); + } + + /** + * Builds an instance of BlobClient class. + * + * @return an instance of BlobClient. + */ + @Generated + public BlobClient buildBlobClient() { + return new BlobClient(buildInnerClient().getBlobs()); + } + + /** + * Builds an instance of PageBlobClient class. + * + * @return an instance of PageBlobClient. + */ + @Generated + public PageBlobClient buildPageBlobClient() { + return new PageBlobClient(buildInnerClient().getPageBlobs()); + } + + /** + * Builds an instance of AppendBlobClient class. + * + * @return an instance of AppendBlobClient. + */ + @Generated + public AppendBlobClient buildAppendBlobClient() { + return new AppendBlobClient(buildInnerClient().getAppendBlobs()); + } + + /** + * Builds an instance of BlockBlobClient class. + * + * @return an instance of BlockBlobClient. + */ + @Generated + public BlockBlobClient buildBlockBlobClient() { + return new BlockBlobClient(buildInnerClient().getBlockBlobs()); + } +} diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/BlobClient.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/BlobClient.java new file mode 100644 index 000000000000..725ea3c64409 --- /dev/null +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/BlobClient.java @@ -0,0 +1,2780 @@ +// 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; + +import com.azure.core.v2.annotation.Generated; +import com.azure.core.v2.annotation.ReturnType; +import com.azure.core.v2.annotation.ServiceClient; +import com.azure.core.v2.annotation.ServiceMethod; +import com.azure.core.v2.http.rest.ResponseBase; +import com.azure.storage.blob.implementation.BlobsImpl; +import com.azure.storage.blob.models.AccessTier; +import com.azure.storage.blob.models.BlobCopySourceTagsMode; +import com.azure.storage.blob.models.BlobDeleteType; +import com.azure.storage.blob.models.BlobExpiryOptions; +import com.azure.storage.blob.models.BlobHttpHeaders; +import com.azure.storage.blob.models.BlobImmutabilityPolicyMode; +import com.azure.storage.blob.models.BlobsAbortCopyFromURLHeaders; +import com.azure.storage.blob.models.BlobsAcquireLeaseHeaders; +import com.azure.storage.blob.models.BlobsBreakLeaseHeaders; +import com.azure.storage.blob.models.BlobsChangeLeaseHeaders; +import com.azure.storage.blob.models.BlobsCopyFromURLHeaders; +import com.azure.storage.blob.models.BlobsCreateSnapshotHeaders; +import com.azure.storage.blob.models.BlobsDeleteHeaders; +import com.azure.storage.blob.models.BlobsDeleteImmutabilityPolicyHeaders; +import com.azure.storage.blob.models.BlobsDownloadHeaders; +import com.azure.storage.blob.models.BlobsGetAccountInfoHeaders; +import com.azure.storage.blob.models.BlobsGetPropertiesHeaders; +import com.azure.storage.blob.models.BlobsGetTagsHeaders; +import com.azure.storage.blob.models.BlobsQueryHeaders; +import com.azure.storage.blob.models.BlobsReleaseLeaseHeaders; +import com.azure.storage.blob.models.BlobsRenewLeaseHeaders; +import com.azure.storage.blob.models.BlobsSetExpiryHeaders; +import com.azure.storage.blob.models.BlobsSetHttpHeadersHeaders; +import com.azure.storage.blob.models.BlobsSetImmutabilityPolicyHeaders; +import com.azure.storage.blob.models.BlobsSetLegalHoldHeaders; +import com.azure.storage.blob.models.BlobsSetMetadataHeaders; +import com.azure.storage.blob.models.BlobsSetTagsHeaders; +import com.azure.storage.blob.models.BlobsSetTierHeaders; +import com.azure.storage.blob.models.BlobsStartCopyFromURLHeaders; +import com.azure.storage.blob.models.BlobsUndeleteHeaders; +import com.azure.storage.blob.models.BlobTags; +import com.azure.storage.blob.models.CpkInfo; +import com.azure.storage.blob.models.DeleteSnapshotsOptionType; +import com.azure.storage.blob.models.EncryptionScope; +import com.azure.storage.blob.models.QueryRequest; +import com.azure.storage.blob.models.RehydratePriority; +import com.azure.storage.blob.models.StorageErrorException; +import io.clientcore.core.http.models.Response; +import io.clientcore.core.util.Context; +import java.io.InputStream; +import java.time.OffsetDateTime; +import java.util.Map; + +/** + * Initializes a new instance of the synchronous AzureBlobStorage type. + */ +@ServiceClient(builder = AzureBlobStorageBuilder.class) +public final class BlobClient { + @Generated + private final BlobsImpl serviceClient; + + /** + * Initializes an instance of BlobClient class. + * + * @param serviceClient the service client implementation. + */ + @Generated + BlobClient(BlobsImpl serviceClient) { + this.serviceClient = serviceClient; + } + + /** + * The Download operation reads or downloads a blob from the system, including its metadata and properties. You can + * also call Download to read a snapshot or version. + * + * @param containerName The container name. + * @param blob The blob name. + * @param snapshot The snapshot parameter is an opaque DateTime value that, when present, specifies the blob + * snapshot to retrieve. For more information on working with blob snapshots, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/creating-a-snapshot-of-a-blob">Creating + * a Snapshot of a Blob.</a>. + * @param versionId The version id parameter is an opaque DateTime value that, when present, specifies the version + * of the blob to operate on. It's for service version 2019-10-10 and newer. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param 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 StorageErrorException 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 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 this.serviceClient.downloadWithResponse(containerName, blob, snapshot, versionId, timeout, range, + leaseId, rangeGetContentMD5, rangeGetContentCRC64, structuredBodyType, ifModifiedSince, ifUnmodifiedSince, + ifMatch, ifNoneMatch, ifTags, requestId, cpkInfo, context); + } + + /** + * The Download operation reads or downloads a blob from the system, including its metadata and properties. You can + * also call Download to read a snapshot or version. + * + * @param containerName The container name. + * @param blob The blob name. + * @param snapshot The snapshot parameter is an opaque DateTime value that, when present, specifies the blob + * snapshot to retrieve. For more information on working with blob snapshots, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/creating-a-snapshot-of-a-blob">Creating + * a Snapshot of a Blob.</a>. + * @param versionId The version id parameter is an opaque DateTime value that, when present, specifies the version + * of the blob to operate on. It's for service version 2019-10-10 and newer. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param 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 StorageErrorException 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 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) { + return this.serviceClient.download(containerName, blob, snapshot, versionId, timeout, range, leaseId, + rangeGetContentMD5, rangeGetContentCRC64, structuredBodyType, ifModifiedSince, ifUnmodifiedSince, ifMatch, + ifNoneMatch, ifTags, requestId, cpkInfo); + } + + /** + * The Download operation reads or downloads a blob from the system, including its metadata and properties. You can + * also call Download to read a snapshot or version. + * + * @param containerName The container name. + * @param blob The blob name. + * @param snapshot The snapshot parameter is an opaque DateTime value that, when present, specifies the blob + * snapshot to retrieve. For more information on working with blob snapshots, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/creating-a-snapshot-of-a-blob">Creating + * a Snapshot of a Blob.</a>. + * @param versionId The version id parameter is an opaque DateTime value that, when present, specifies the version + * of the blob to operate on. It's for service version 2019-10-10 and newer. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param 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 StorageErrorException 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 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) { + return this.serviceClient.downloadNoCustomHeadersWithResponse(containerName, blob, snapshot, versionId, timeout, + range, leaseId, rangeGetContentMD5, rangeGetContentCRC64, structuredBodyType, ifModifiedSince, + ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, requestId, cpkInfo, context); + } + + /** + * The Get Properties operation returns all user-defined metadata, standard HTTP properties, and system properties + * for the blob. It does not return the content of the blob. + * + * @param containerName The container name. + * @param blob The blob name. + * @param snapshot The snapshot parameter is an opaque DateTime value that, when present, specifies the blob + * snapshot to retrieve. For more information on working with blob snapshots, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/creating-a-snapshot-of-a-blob">Creating + * a Snapshot of a Blob.</a>. + * @param versionId The version id parameter is an opaque DateTime value that, when present, specifies the version + * of the blob to operate on. It's for service version 2019-10-10 and newer. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the + * specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since + * the specified date/time. + * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. + * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. + * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param cpkInfo Parameter group. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws StorageErrorException thrown if 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 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 this.serviceClient.getPropertiesWithResponse(containerName, blob, snapshot, versionId, timeout, leaseId, + ifModifiedSince, ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, requestId, cpkInfo, context); + } + + /** + * The Get Properties operation returns all user-defined metadata, standard HTTP properties, and system properties + * for the blob. It does not return the content of the blob. + * + * @param containerName The container name. + * @param blob The blob name. + * @param snapshot The snapshot parameter is an opaque DateTime value that, when present, specifies the blob + * snapshot to retrieve. For more information on working with blob snapshots, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/creating-a-snapshot-of-a-blob">Creating + * a Snapshot of a Blob.</a>. + * @param versionId The version id parameter is an opaque DateTime value that, when present, specifies the version + * of the blob to operate on. It's for service version 2019-10-10 and newer. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the + * specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since + * the specified date/time. + * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. + * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. + * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param cpkInfo Parameter group. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws StorageErrorException 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 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) { + this.serviceClient.getProperties(containerName, blob, snapshot, versionId, timeout, leaseId, ifModifiedSince, + ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, requestId, cpkInfo); + } + + /** + * The Get Properties operation returns all user-defined metadata, standard HTTP properties, and system properties + * for the blob. It does not return the content of the blob. + * + * @param containerName The container name. + * @param blob The blob name. + * @param snapshot The snapshot parameter is an opaque DateTime value that, when present, specifies the blob + * snapshot to retrieve. For more information on working with blob snapshots, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/creating-a-snapshot-of-a-blob">Creating + * a Snapshot of a Blob.</a>. + * @param versionId The version id parameter is an opaque DateTime value that, when present, specifies the version + * of the blob to operate on. It's for service version 2019-10-10 and newer. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the + * specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since + * the specified date/time. + * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. + * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. + * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param cpkInfo Parameter group. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws StorageErrorException 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 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) { + return this.serviceClient.getPropertiesNoCustomHeadersWithResponse(containerName, blob, snapshot, versionId, + timeout, leaseId, ifModifiedSince, ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, requestId, cpkInfo, + context); + } + + /** + * If the storage account's soft delete feature is disabled then, when a blob is deleted, it is permanently removed + * from the storage account. If the storage account's soft delete feature is enabled, then, when a blob is deleted, + * it is marked for deletion and becomes inaccessible immediately. However, the blob service retains the blob or + * snapshot for the number of days specified by the DeleteRetentionPolicy section of [Storage service properties] + * (Set-Blob-Service-Properties.md). After the specified number of days has passed, the blob's data is permanently + * removed from the storage account. Note that you continue to be charged for the soft-deleted blob's storage until + * it is permanently removed. Use the List Blobs API and specify the "include=deleted" query parameter to discover + * which blobs and snapshots have been soft deleted. You can then use the Undelete Blob API to restore a + * soft-deleted blob. All other operations on a soft-deleted blob or snapshot causes the service to return an HTTP + * status code of 404 (ResourceNotFound). If the storage account's automatic snapshot feature is enabled, then, when + * a blob is deleted, an automatic snapshot is created. The blob becomes inaccessible immediately. All other + * operations on the blob causes the service to return an HTTP status code of 404 (ResourceNotFound). You can access + * automatic snapshot using snapshot timestamp or version id. You can restore the blob by calling Put or Copy Blob + * API with automatic snapshot as source. Deleting automatic snapshot requires shared key or special SAS/RBAC + * permissions. + * + * @param containerName The container name. + * @param blob The blob name. + * @param snapshot The snapshot parameter is an opaque DateTime value that, when present, specifies the blob + * snapshot to retrieve. For more information on working with blob snapshots, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/creating-a-snapshot-of-a-blob">Creating + * a Snapshot of a Blob.</a>. + * @param versionId The version id parameter is an opaque DateTime value that, when present, specifies the version + * of the blob to operate on. It's for service version 2019-10-10 and newer. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param deleteSnapshots Required if the blob has associated snapshots. Specify one of the following two options: + * include: Delete the base blob and all of its snapshots. only: Delete only the blob's snapshots and not the blob + * itself. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the + * specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since + * the specified date/time. + * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. + * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. + * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param blobDeleteType Optional. Only possible value is 'permanent', which specifies to permanently delete a blob + * if blob soft delete is enabled. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws StorageErrorException thrown if 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 containerName, String blob, String snapshot, + String versionId, Integer timeout, String leaseId, DeleteSnapshotsOptionType deleteSnapshots, + OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, + String ifTags, String requestId, BlobDeleteType blobDeleteType, Context context) { + return this.serviceClient.deleteWithResponse(containerName, blob, snapshot, versionId, timeout, leaseId, + deleteSnapshots, ifModifiedSince, ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, requestId, + blobDeleteType, context); + } + + /** + * If the storage account's soft delete feature is disabled then, when a blob is deleted, it is permanently removed + * from the storage account. If the storage account's soft delete feature is enabled, then, when a blob is deleted, + * it is marked for deletion and becomes inaccessible immediately. However, the blob service retains the blob or + * snapshot for the number of days specified by the DeleteRetentionPolicy section of [Storage service properties] + * (Set-Blob-Service-Properties.md). After the specified number of days has passed, the blob's data is permanently + * removed from the storage account. Note that you continue to be charged for the soft-deleted blob's storage until + * it is permanently removed. Use the List Blobs API and specify the "include=deleted" query parameter to discover + * which blobs and snapshots have been soft deleted. You can then use the Undelete Blob API to restore a + * soft-deleted blob. All other operations on a soft-deleted blob or snapshot causes the service to return an HTTP + * status code of 404 (ResourceNotFound). If the storage account's automatic snapshot feature is enabled, then, when + * a blob is deleted, an automatic snapshot is created. The blob becomes inaccessible immediately. All other + * operations on the blob causes the service to return an HTTP status code of 404 (ResourceNotFound). You can access + * automatic snapshot using snapshot timestamp or version id. You can restore the blob by calling Put or Copy Blob + * API with automatic snapshot as source. Deleting automatic snapshot requires shared key or special SAS/RBAC + * permissions. + * + * @param containerName The container name. + * @param blob The blob name. + * @param snapshot The snapshot parameter is an opaque DateTime value that, when present, specifies the blob + * snapshot to retrieve. For more information on working with blob snapshots, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/creating-a-snapshot-of-a-blob">Creating + * a Snapshot of a Blob.</a>. + * @param versionId The version id parameter is an opaque DateTime value that, when present, specifies the version + * of the blob to operate on. It's for service version 2019-10-10 and newer. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param deleteSnapshots Required if the blob has associated snapshots. Specify one of the following two options: + * include: Delete the base blob and all of its snapshots. only: Delete only the blob's snapshots and not the blob + * itself. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the + * specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since + * the specified date/time. + * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. + * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. + * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param blobDeleteType Optional. Only possible value is 'permanent', which specifies to permanently delete a blob + * if blob soft delete is enabled. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws StorageErrorException 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 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) { + this.serviceClient.delete(containerName, blob, snapshot, versionId, timeout, leaseId, deleteSnapshots, + ifModifiedSince, ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, requestId, blobDeleteType); + } + + /** + * If the storage account's soft delete feature is disabled then, when a blob is deleted, it is permanently removed + * from the storage account. If the storage account's soft delete feature is enabled, then, when a blob is deleted, + * it is marked for deletion and becomes inaccessible immediately. However, the blob service retains the blob or + * snapshot for the number of days specified by the DeleteRetentionPolicy section of [Storage service properties] + * (Set-Blob-Service-Properties.md). After the specified number of days has passed, the blob's data is permanently + * removed from the storage account. Note that you continue to be charged for the soft-deleted blob's storage until + * it is permanently removed. Use the List Blobs API and specify the "include=deleted" query parameter to discover + * which blobs and snapshots have been soft deleted. You can then use the Undelete Blob API to restore a + * soft-deleted blob. All other operations on a soft-deleted blob or snapshot causes the service to return an HTTP + * status code of 404 (ResourceNotFound). If the storage account's automatic snapshot feature is enabled, then, when + * a blob is deleted, an automatic snapshot is created. The blob becomes inaccessible immediately. All other + * operations on the blob causes the service to return an HTTP status code of 404 (ResourceNotFound). You can access + * automatic snapshot using snapshot timestamp or version id. You can restore the blob by calling Put or Copy Blob + * API with automatic snapshot as source. Deleting automatic snapshot requires shared key or special SAS/RBAC + * permissions. + * + * @param containerName The container name. + * @param blob The blob name. + * @param snapshot The snapshot parameter is an opaque DateTime value that, when present, specifies the blob + * snapshot to retrieve. For more information on working with blob snapshots, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/creating-a-snapshot-of-a-blob">Creating + * a Snapshot of a Blob.</a>. + * @param versionId The version id parameter is an opaque DateTime value that, when present, specifies the version + * of the blob to operate on. It's for service version 2019-10-10 and newer. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param deleteSnapshots Required if the blob has associated snapshots. Specify one of the following two options: + * include: Delete the base blob and all of its snapshots. only: Delete only the blob's snapshots and not the blob + * itself. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the + * specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since + * the specified date/time. + * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. + * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. + * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param blobDeleteType Optional. Only possible value is 'permanent', which specifies to permanently delete a blob + * if blob soft delete is enabled. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws StorageErrorException 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 Response deleteNoCustomHeadersWithResponse(String containerName, String blob, String snapshot, + String versionId, Integer timeout, String leaseId, DeleteSnapshotsOptionType deleteSnapshots, + OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, + String ifTags, String requestId, BlobDeleteType blobDeleteType, Context context) { + return this.serviceClient.deleteNoCustomHeadersWithResponse(containerName, blob, snapshot, versionId, timeout, + leaseId, deleteSnapshots, ifModifiedSince, ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, requestId, + blobDeleteType, context); + } + + /** + * Undelete a blob that was previously soft deleted. + * + * @param containerName The container name. + * @param blob The blob name. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws StorageErrorException thrown if 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(String containerName, String blob, + Integer timeout, String requestId, Context context) { + return this.serviceClient.undeleteWithResponse(containerName, blob, timeout, requestId, context); + } + + /** + * Undelete a blob that was previously soft deleted. + * + * @param containerName The container name. + * @param blob The blob name. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws StorageErrorException 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(String containerName, String blob, Integer timeout, String requestId) { + this.serviceClient.undelete(containerName, blob, timeout, requestId); + } + + /** + * Undelete a blob that was previously soft deleted. + * + * @param containerName The container name. + * @param blob The blob name. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws StorageErrorException 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 Response undeleteNoCustomHeadersWithResponse(String containerName, String blob, Integer timeout, + String requestId, Context context) { + return this.serviceClient.undeleteNoCustomHeadersWithResponse(containerName, blob, timeout, requestId, context); + } + + /** + * Sets the time a blob will expire and be deleted. + * + * @param containerName The container name. + * @param blob The blob name. + * @param expiryOptions Required. Indicates mode of the expiry time. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param expiresOn The time to set the blob to expiry. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws StorageErrorException thrown if 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(String containerName, String blob, + BlobExpiryOptions expiryOptions, Integer timeout, String requestId, String expiresOn, Context context) { + return this.serviceClient.setExpiryWithResponse(containerName, blob, expiryOptions, timeout, requestId, + expiresOn, context); + } + + /** + * Sets the time a blob will expire and be deleted. + * + * @param containerName The container name. + * @param blob The blob name. + * @param expiryOptions Required. Indicates mode of the expiry time. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param expiresOn The time to set the blob to expiry. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws StorageErrorException 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(String containerName, String blob, BlobExpiryOptions expiryOptions, Integer timeout, + String requestId, String expiresOn) { + this.serviceClient.setExpiry(containerName, blob, expiryOptions, timeout, requestId, expiresOn); + } + + /** + * Sets the time a blob will expire and be deleted. + * + * @param containerName The container name. + * @param blob The blob name. + * @param expiryOptions Required. Indicates mode of the expiry time. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param expiresOn The time to set the blob to expiry. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws StorageErrorException 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 Response setExpiryNoCustomHeadersWithResponse(String containerName, String blob, + BlobExpiryOptions expiryOptions, Integer timeout, String requestId, String expiresOn, Context context) { + return this.serviceClient.setExpiryNoCustomHeadersWithResponse(containerName, blob, expiryOptions, timeout, + requestId, expiresOn, context); + } + + /** + * The Set HTTP Headers operation sets system properties on the blob. + * + * @param containerName The container name. + * @param blob The blob name. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the + * specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since + * the specified date/time. + * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. + * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. + * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param blobHttpHeaders Parameter group. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws StorageErrorException thrown if 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(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 this.serviceClient.setHttpHeadersWithResponse(containerName, blob, timeout, leaseId, ifModifiedSince, + ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, requestId, blobHttpHeaders, context); + } + + /** + * The Set HTTP Headers operation sets system properties on the blob. + * + * @param containerName The container name. + * @param blob The blob name. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the + * specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since + * the specified date/time. + * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. + * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. + * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param blobHttpHeaders Parameter group. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws StorageErrorException 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(String containerName, String blob, Integer timeout, String leaseId, + OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, + String ifTags, String requestId, BlobHttpHeaders blobHttpHeaders) { + this.serviceClient.setHttpHeaders(containerName, blob, timeout, leaseId, ifModifiedSince, ifUnmodifiedSince, + ifMatch, ifNoneMatch, ifTags, requestId, blobHttpHeaders); + } + + /** + * The Set HTTP Headers operation sets system properties on the blob. + * + * @param containerName The container name. + * @param blob The blob name. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the + * specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since + * the specified date/time. + * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. + * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. + * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param blobHttpHeaders Parameter group. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws StorageErrorException 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 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) { + return this.serviceClient.setHttpHeadersNoCustomHeadersWithResponse(containerName, blob, timeout, leaseId, + ifModifiedSince, ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, requestId, blobHttpHeaders, context); + } + + /** + * The Set Immutability Policy operation sets the immutability policy on the blob. + * + * @param containerName The container name. + * @param blob The blob name. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since + * the specified date/time. + * @param immutabilityPolicyExpiry Specifies the date time when the blobs immutability policy is set to expire. + * @param immutabilityPolicyMode Specifies the immutability policy mode to set on the blob. + * @param snapshot The snapshot parameter is an opaque DateTime value that, when present, specifies the blob + * snapshot to retrieve. For more information on working with blob snapshots, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/creating-a-snapshot-of-a-blob">Creating + * a Snapshot of a Blob.</a>. + * @param versionId The version id parameter is an opaque DateTime value that, when present, specifies the version + * of the blob to operate on. It's for service version 2019-10-10 and newer. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws StorageErrorException thrown if 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(String containerName, + String blob, Integer timeout, String requestId, OffsetDateTime ifUnmodifiedSince, + OffsetDateTime immutabilityPolicyExpiry, BlobImmutabilityPolicyMode immutabilityPolicyMode, String snapshot, + String versionId, Context context) { + return this.serviceClient.setImmutabilityPolicyWithResponse(containerName, blob, timeout, requestId, + ifUnmodifiedSince, immutabilityPolicyExpiry, immutabilityPolicyMode, snapshot, versionId, context); + } + + /** + * The Set Immutability Policy operation sets the immutability policy on the blob. + * + * @param containerName The container name. + * @param blob The blob name. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since + * the specified date/time. + * @param immutabilityPolicyExpiry Specifies the date time when the blobs immutability policy is set to expire. + * @param immutabilityPolicyMode Specifies the immutability policy mode to set on the blob. + * @param snapshot The snapshot parameter is an opaque DateTime value that, when present, specifies the blob + * snapshot to retrieve. For more information on working with blob snapshots, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/creating-a-snapshot-of-a-blob">Creating + * a Snapshot of a Blob.</a>. + * @param versionId The version id parameter is an opaque DateTime value that, when present, specifies the version + * of the blob to operate on. It's for service version 2019-10-10 and newer. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws StorageErrorException 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(String containerName, String blob, Integer timeout, String requestId, + OffsetDateTime ifUnmodifiedSince, OffsetDateTime immutabilityPolicyExpiry, + BlobImmutabilityPolicyMode immutabilityPolicyMode, String snapshot, String versionId) { + this.serviceClient.setImmutabilityPolicy(containerName, blob, timeout, requestId, ifUnmodifiedSince, + immutabilityPolicyExpiry, immutabilityPolicyMode, snapshot, versionId); + } + + /** + * The Set Immutability Policy operation sets the immutability policy on the blob. + * + * @param containerName The container name. + * @param blob The blob name. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since + * the specified date/time. + * @param immutabilityPolicyExpiry Specifies the date time when the blobs immutability policy is set to expire. + * @param immutabilityPolicyMode Specifies the immutability policy mode to set on the blob. + * @param snapshot The snapshot parameter is an opaque DateTime value that, when present, specifies the blob + * snapshot to retrieve. For more information on working with blob snapshots, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/creating-a-snapshot-of-a-blob">Creating + * a Snapshot of a Blob.</a>. + * @param versionId The version id parameter is an opaque DateTime value that, when present, specifies the version + * of the blob to operate on. It's for service version 2019-10-10 and newer. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws StorageErrorException 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 Response setImmutabilityPolicyNoCustomHeadersWithResponse(String containerName, String blob, + Integer timeout, String requestId, OffsetDateTime ifUnmodifiedSince, OffsetDateTime immutabilityPolicyExpiry, + BlobImmutabilityPolicyMode immutabilityPolicyMode, String snapshot, String versionId, Context context) { + return this.serviceClient.setImmutabilityPolicyNoCustomHeadersWithResponse(containerName, blob, timeout, + requestId, ifUnmodifiedSince, immutabilityPolicyExpiry, immutabilityPolicyMode, snapshot, versionId, + context); + } + + /** + * The Delete Immutability Policy operation deletes the immutability policy on the blob. + * + * @param containerName The container name. + * @param blob The blob name. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param snapshot The snapshot parameter is an opaque DateTime value that, when present, specifies the blob + * snapshot to retrieve. For more information on working with blob snapshots, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/creating-a-snapshot-of-a-blob">Creating + * a Snapshot of a Blob.</a>. + * @param versionId The version id parameter is an opaque DateTime value that, when present, specifies the version + * of the blob to operate on. It's for service version 2019-10-10 and newer. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws StorageErrorException thrown if 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( + String containerName, String blob, Integer timeout, String requestId, String snapshot, String versionId, + Context context) { + return this.serviceClient.deleteImmutabilityPolicyWithResponse(containerName, blob, timeout, requestId, + snapshot, versionId, context); + } + + /** + * The Delete Immutability Policy operation deletes the immutability policy on the blob. + * + * @param containerName The container name. + * @param blob The blob name. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param snapshot The snapshot parameter is an opaque DateTime value that, when present, specifies the blob + * snapshot to retrieve. For more information on working with blob snapshots, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/creating-a-snapshot-of-a-blob">Creating + * a Snapshot of a Blob.</a>. + * @param versionId The version id parameter is an opaque DateTime value that, when present, specifies the version + * of the blob to operate on. It's for service version 2019-10-10 and newer. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws StorageErrorException 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(String containerName, String blob, Integer timeout, String requestId, + String snapshot, String versionId) { + this.serviceClient.deleteImmutabilityPolicy(containerName, blob, timeout, requestId, snapshot, versionId); + } + + /** + * The Delete Immutability Policy operation deletes the immutability policy on the blob. + * + * @param containerName The container name. + * @param blob The blob name. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param snapshot The snapshot parameter is an opaque DateTime value that, when present, specifies the blob + * snapshot to retrieve. For more information on working with blob snapshots, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/creating-a-snapshot-of-a-blob">Creating + * a Snapshot of a Blob.</a>. + * @param versionId The version id parameter is an opaque DateTime value that, when present, specifies the version + * of the blob to operate on. It's for service version 2019-10-10 and newer. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws StorageErrorException 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 Response deleteImmutabilityPolicyNoCustomHeadersWithResponse(String containerName, String blob, + Integer timeout, String requestId, String snapshot, String versionId, Context context) { + return this.serviceClient.deleteImmutabilityPolicyNoCustomHeadersWithResponse(containerName, blob, timeout, + requestId, snapshot, versionId, context); + } + + /** + * The Set Legal Hold operation sets a legal hold on the blob. + * + * @param containerName The container name. + * @param blob The blob name. + * @param legalHold Specified if a legal hold should be set on the blob. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param snapshot The snapshot parameter is an opaque DateTime value that, when present, specifies the blob + * snapshot to retrieve. For more information on working with blob snapshots, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/creating-a-snapshot-of-a-blob">Creating + * a Snapshot of a Blob.</a>. + * @param versionId The version id parameter is an opaque DateTime value that, when present, specifies the version + * of the blob to operate on. It's for service version 2019-10-10 and newer. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws StorageErrorException thrown if 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(String containerName, String blob, + boolean legalHold, Integer timeout, String requestId, String snapshot, String versionId, Context context) { + return this.serviceClient.setLegalHoldWithResponse(containerName, blob, legalHold, timeout, requestId, snapshot, + versionId, context); + } + + /** + * The Set Legal Hold operation sets a legal hold on the blob. + * + * @param containerName The container name. + * @param blob The blob name. + * @param legalHold Specified if a legal hold should be set on the blob. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param snapshot The snapshot parameter is an opaque DateTime value that, when present, specifies the blob + * snapshot to retrieve. For more information on working with blob snapshots, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/creating-a-snapshot-of-a-blob">Creating + * a Snapshot of a Blob.</a>. + * @param versionId The version id parameter is an opaque DateTime value that, when present, specifies the version + * of the blob to operate on. It's for service version 2019-10-10 and newer. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws StorageErrorException 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(String containerName, String blob, boolean legalHold, Integer timeout, String requestId, + String snapshot, String versionId) { + this.serviceClient.setLegalHold(containerName, blob, legalHold, timeout, requestId, snapshot, versionId); + } + + /** + * The Set Legal Hold operation sets a legal hold on the blob. + * + * @param containerName The container name. + * @param blob The blob name. + * @param legalHold Specified if a legal hold should be set on the blob. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param snapshot The snapshot parameter is an opaque DateTime value that, when present, specifies the blob + * snapshot to retrieve. For more information on working with blob snapshots, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/creating-a-snapshot-of-a-blob">Creating + * a Snapshot of a Blob.</a>. + * @param versionId The version id parameter is an opaque DateTime value that, when present, specifies the version + * of the blob to operate on. It's for service version 2019-10-10 and newer. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws StorageErrorException 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 Response setLegalHoldNoCustomHeadersWithResponse(String containerName, String blob, boolean legalHold, + Integer timeout, String requestId, String snapshot, String versionId, Context context) { + return this.serviceClient.setLegalHoldNoCustomHeadersWithResponse(containerName, blob, legalHold, timeout, + requestId, snapshot, versionId, context); + } + + /** + * The Set Blob Metadata operation sets user-defined metadata for the specified blob as one or more name-value + * pairs. + * + * @param containerName The container name. + * @param blob The blob name. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param metadata Optional. Specifies a user-defined name-value pair associated with the blob. If no name-value + * pairs are specified, the operation will copy the metadata from the source blob or file to the destination blob. + * If one or more name-value pairs are specified, the destination blob is created with the specified metadata, and + * metadata is not copied from the source blob or file. Note that beginning with version 2009-09-19, metadata names + * must adhere to the naming rules for C# identifiers. See Naming and Referencing Containers, Blobs, and Metadata + * for more information. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the + * specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since + * the specified date/time. + * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. + * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. + * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param cpkInfo Parameter group. + * @param encryptionScopeParam Parameter group. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws StorageErrorException thrown if 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(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 this.serviceClient.setMetadataWithResponse(containerName, blob, timeout, metadata, leaseId, + ifModifiedSince, ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, requestId, cpkInfo, encryptionScopeParam, + context); + } + + /** + * The Set Blob Metadata operation sets user-defined metadata for the specified blob as one or more name-value + * pairs. + * + * @param containerName The container name. + * @param blob The blob name. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param metadata Optional. Specifies a user-defined name-value pair associated with the blob. If no name-value + * pairs are specified, the operation will copy the metadata from the source blob or file to the destination blob. + * If one or more name-value pairs are specified, the destination blob is created with the specified metadata, and + * metadata is not copied from the source blob or file. Note that beginning with version 2009-09-19, metadata names + * must adhere to the naming rules for C# identifiers. See Naming and Referencing Containers, Blobs, and Metadata + * for more information. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the + * specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since + * the specified date/time. + * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. + * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. + * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param cpkInfo Parameter group. + * @param encryptionScopeParam Parameter group. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws StorageErrorException 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(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) { + this.serviceClient.setMetadata(containerName, blob, timeout, metadata, leaseId, ifModifiedSince, + ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, requestId, cpkInfo, encryptionScopeParam); + } + + /** + * The Set Blob Metadata operation sets user-defined metadata for the specified blob as one or more name-value + * pairs. + * + * @param containerName The container name. + * @param blob The blob name. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param metadata Optional. Specifies a user-defined name-value pair associated with the blob. If no name-value + * pairs are specified, the operation will copy the metadata from the source blob or file to the destination blob. + * If one or more name-value pairs are specified, the destination blob is created with the specified metadata, and + * metadata is not copied from the source blob or file. Note that beginning with version 2009-09-19, metadata names + * must adhere to the naming rules for C# identifiers. See Naming and Referencing Containers, Blobs, and Metadata + * for more information. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the + * specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since + * the specified date/time. + * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. + * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. + * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param cpkInfo Parameter group. + * @param encryptionScopeParam Parameter group. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws StorageErrorException 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 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) { + return this.serviceClient.setMetadataNoCustomHeadersWithResponse(containerName, blob, timeout, metadata, + leaseId, ifModifiedSince, ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, requestId, cpkInfo, + encryptionScopeParam, context); + } + + /** + * [Update] The Lease Blob operation establishes and manages a lock on a blob for write and delete operations. + * + * @param containerName The container name. + * @param blob The blob name. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param duration Specifies the duration of the lease, in seconds, or negative one (-1) for a lease that never + * expires. A non-infinite lease can be between 15 and 60 seconds. A lease duration cannot be changed using renew or + * change. + * @param proposedLeaseId Proposed lease ID, in a GUID string format. The Blob service returns 400 (Invalid request) + * if the proposed lease ID is not in the correct format. See Guid Constructor (String) for a list of valid GUID + * string formats. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the + * specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since + * the specified date/time. + * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. + * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. + * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws StorageErrorException thrown if 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(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 this.serviceClient.acquireLeaseWithResponse(containerName, blob, timeout, duration, proposedLeaseId, + ifModifiedSince, ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, requestId, context); + } + + /** + * [Update] The Lease Blob operation establishes and manages a lock on a blob for write and delete operations. + * + * @param containerName The container name. + * @param blob The blob name. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param duration Specifies the duration of the lease, in seconds, or negative one (-1) for a lease that never + * expires. A non-infinite lease can be between 15 and 60 seconds. A lease duration cannot be changed using renew or + * change. + * @param proposedLeaseId Proposed lease ID, in a GUID string format. The Blob service returns 400 (Invalid request) + * if the proposed lease ID is not in the correct format. See Guid Constructor (String) for a list of valid GUID + * string formats. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the + * specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since + * the specified date/time. + * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. + * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. + * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws StorageErrorException 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(String containerName, String blob, Integer timeout, Integer duration, + String proposedLeaseId, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, + String ifNoneMatch, String ifTags, String requestId) { + this.serviceClient.acquireLease(containerName, blob, timeout, duration, proposedLeaseId, ifModifiedSince, + ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, requestId); + } + + /** + * [Update] The Lease Blob operation establishes and manages a lock on a blob for write and delete operations. + * + * @param containerName The container name. + * @param blob The blob name. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param duration Specifies the duration of the lease, in seconds, or negative one (-1) for a lease that never + * expires. A non-infinite lease can be between 15 and 60 seconds. A lease duration cannot be changed using renew or + * change. + * @param proposedLeaseId Proposed lease ID, in a GUID string format. The Blob service returns 400 (Invalid request) + * if the proposed lease ID is not in the correct format. See Guid Constructor (String) for a list of valid GUID + * string formats. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the + * specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since + * the specified date/time. + * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. + * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. + * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws StorageErrorException 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 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) { + return this.serviceClient.acquireLeaseNoCustomHeadersWithResponse(containerName, blob, timeout, duration, + proposedLeaseId, ifModifiedSince, ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, requestId, context); + } + + /** + * [Update] The Lease Blob operation establishes and manages a lock on a blob for write and delete operations. + * + * @param containerName The container name. + * @param blob The blob name. + * @param leaseId Specifies the current lease ID on the resource. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the + * specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since + * the specified date/time. + * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. + * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. + * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. + * @param requestId Provides a 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 StorageErrorException thrown if 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 containerName, String blob, + String leaseId, Integer timeout, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, + String ifMatch, String ifNoneMatch, String ifTags, String requestId, Context context) { + return this.serviceClient.releaseLeaseWithResponse(containerName, blob, leaseId, timeout, ifModifiedSince, + ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, requestId, context); + } + + /** + * [Update] The Lease Blob operation establishes and manages a lock on a blob for write and delete operations. + * + * @param containerName The container name. + * @param blob The blob name. + * @param leaseId Specifies the current lease ID on the resource. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the + * specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since + * the specified date/time. + * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. + * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. + * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. + * @param requestId Provides 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 StorageErrorException 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 containerName, String blob, String leaseId, Integer timeout, + OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, + String ifTags, String requestId) { + this.serviceClient.releaseLease(containerName, blob, leaseId, timeout, ifModifiedSince, ifUnmodifiedSince, + ifMatch, ifNoneMatch, ifTags, requestId); + } + + /** + * [Update] The Lease Blob operation establishes and manages a lock on a blob for write and delete operations. + * + * @param containerName The container name. + * @param blob The blob name. + * @param leaseId Specifies the current lease ID on the resource. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the + * specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since + * the specified date/time. + * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. + * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. + * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. + * @param requestId Provides a 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 StorageErrorException 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 Response releaseLeaseNoCustomHeadersWithResponse(String containerName, String blob, String leaseId, + Integer timeout, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, + String ifNoneMatch, String ifTags, String requestId, Context context) { + return this.serviceClient.releaseLeaseNoCustomHeadersWithResponse(containerName, blob, leaseId, timeout, + ifModifiedSince, ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, requestId, context); + } + + /** + * [Update] The Lease Blob operation establishes and manages a lock on a blob for write and delete operations. + * + * @param containerName The container name. + * @param blob The blob name. + * @param leaseId Specifies the current lease ID on the resource. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the + * specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since + * the specified date/time. + * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. + * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. + * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. + * @param requestId Provides a 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 StorageErrorException thrown if 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 containerName, String blob, + String leaseId, Integer timeout, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, + String ifMatch, String ifNoneMatch, String ifTags, String requestId, Context context) { + return this.serviceClient.renewLeaseWithResponse(containerName, blob, leaseId, timeout, ifModifiedSince, + ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, requestId, context); + } + + /** + * [Update] The Lease Blob operation establishes and manages a lock on a blob for write and delete operations. + * + * @param containerName The container name. + * @param blob The blob name. + * @param leaseId Specifies the current lease ID on the resource. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the + * specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since + * the specified date/time. + * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. + * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. + * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. + * @param requestId Provides 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 StorageErrorException 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 containerName, String blob, String leaseId, Integer timeout, + OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, + String ifTags, String requestId) { + this.serviceClient.renewLease(containerName, blob, leaseId, timeout, ifModifiedSince, ifUnmodifiedSince, + ifMatch, ifNoneMatch, ifTags, requestId); + } + + /** + * [Update] The Lease Blob operation establishes and manages a lock on a blob for write and delete operations. + * + * @param containerName The container name. + * @param blob The blob name. + * @param leaseId Specifies the current lease ID on the resource. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the + * specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since + * the specified date/time. + * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. + * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. + * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. + * @param requestId Provides a 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 StorageErrorException 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 Response renewLeaseNoCustomHeadersWithResponse(String containerName, String blob, String leaseId, + Integer timeout, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, + String ifNoneMatch, String ifTags, String requestId, Context context) { + return this.serviceClient.renewLeaseNoCustomHeadersWithResponse(containerName, blob, leaseId, timeout, + ifModifiedSince, ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, requestId, context); + } + + /** + * [Update] The Lease Blob operation establishes and manages a lock on a blob for write and delete operations. + * + * @param containerName The container name. + * @param blob The blob name. + * @param leaseId Specifies the current lease ID on the resource. + * @param proposedLeaseId Proposed lease ID, in a GUID string format. The Blob service returns 400 (Invalid request) + * if the proposed lease ID is not in the correct format. See Guid Constructor (String) for a list of valid GUID + * string formats. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the + * specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since + * the specified date/time. + * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. + * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. + * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. + * @param requestId Provides a 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 StorageErrorException thrown if 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 containerName, String blob, + String leaseId, String proposedLeaseId, Integer timeout, OffsetDateTime ifModifiedSince, + OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, String ifTags, String requestId, + Context context) { + return this.serviceClient.changeLeaseWithResponse(containerName, blob, leaseId, proposedLeaseId, timeout, + ifModifiedSince, ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, requestId, context); + } + + /** + * [Update] The Lease Blob operation establishes and manages a lock on a blob for write and delete operations. + * + * @param containerName The container name. + * @param blob The blob name. + * @param leaseId Specifies the current lease ID on the resource. + * @param proposedLeaseId Proposed lease ID, in a GUID string format. The Blob service returns 400 (Invalid request) + * if the proposed lease ID is not in the correct format. See Guid Constructor (String) for a list of valid GUID + * string formats. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the + * specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since + * the specified date/time. + * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. + * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. + * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. + * @param requestId Provides 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 StorageErrorException 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 containerName, String blob, String leaseId, String proposedLeaseId, Integer timeout, + OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, + String ifTags, String requestId) { + this.serviceClient.changeLease(containerName, blob, leaseId, proposedLeaseId, timeout, ifModifiedSince, + ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, requestId); + } + + /** + * [Update] The Lease Blob operation establishes and manages a lock on a blob for write and delete operations. + * + * @param containerName The container name. + * @param blob The blob name. + * @param leaseId Specifies the current lease ID on the resource. + * @param proposedLeaseId Proposed lease ID, in a GUID string format. The Blob service returns 400 (Invalid request) + * if the proposed lease ID is not in the correct format. See Guid Constructor (String) for a list of valid GUID + * string formats. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the + * specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since + * the specified date/time. + * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. + * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. + * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. + * @param requestId Provides a 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 StorageErrorException 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 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) { + return this.serviceClient.changeLeaseNoCustomHeadersWithResponse(containerName, blob, leaseId, proposedLeaseId, + timeout, ifModifiedSince, ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, requestId, context); + } + + /** + * [Update] The Lease Blob operation establishes and manages a lock on a blob for write and delete operations. + * + * @param containerName The container name. + * @param blob The blob name. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param 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 StorageErrorException thrown if 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(String containerName, String blob, + Integer timeout, Integer breakPeriod, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, + String ifMatch, String ifNoneMatch, String ifTags, String requestId, Context context) { + return this.serviceClient.breakLeaseWithResponse(containerName, blob, timeout, breakPeriod, ifModifiedSince, + ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, requestId, context); + } + + /** + * [Update] The Lease Blob operation establishes and manages a lock on a blob for write and delete operations. + * + * @param containerName The container name. + * @param blob The blob name. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param 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 StorageErrorException 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(String containerName, String blob, Integer timeout, Integer breakPeriod, + OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, + String ifTags, String requestId) { + this.serviceClient.breakLease(containerName, blob, timeout, breakPeriod, ifModifiedSince, ifUnmodifiedSince, + ifMatch, ifNoneMatch, ifTags, requestId); + } + + /** + * [Update] The Lease Blob operation establishes and manages a lock on a blob for write and delete operations. + * + * @param containerName The container name. + * @param blob The blob name. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param 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 StorageErrorException 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 Response breakLeaseNoCustomHeadersWithResponse(String containerName, String blob, Integer timeout, + Integer breakPeriod, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, + String ifNoneMatch, String ifTags, String requestId, Context context) { + return this.serviceClient.breakLeaseNoCustomHeadersWithResponse(containerName, blob, timeout, breakPeriod, + ifModifiedSince, ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, requestId, context); + } + + /** + * The Create Snapshot operation creates a read-only snapshot of a blob. + * + * @param containerName The container name. + * @param blob The blob name. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param metadata Optional. Specifies a user-defined name-value pair associated with the blob. If no name-value + * pairs are specified, the operation will copy the metadata from the source blob or file to the destination blob. + * If one or more name-value pairs are specified, the destination blob is created with the specified metadata, and + * metadata is not copied from the source blob or file. Note that beginning with version 2009-09-19, metadata names + * must adhere to the naming rules for C# identifiers. See Naming and Referencing Containers, Blobs, and Metadata + * for more information. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the + * specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since + * the specified date/time. + * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. + * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. + * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param cpkInfo Parameter group. + * @param encryptionScopeParam Parameter group. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws StorageErrorException thrown if 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(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 this.serviceClient.createSnapshotWithResponse(containerName, blob, timeout, metadata, ifModifiedSince, + ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, leaseId, requestId, cpkInfo, encryptionScopeParam, + context); + } + + /** + * The Create Snapshot operation creates a read-only snapshot of a blob. + * + * @param containerName The container name. + * @param blob The blob name. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param metadata Optional. Specifies a user-defined name-value pair associated with the blob. If no name-value + * pairs are specified, the operation will copy the metadata from the source blob or file to the destination blob. + * If one or more name-value pairs are specified, the destination blob is created with the specified metadata, and + * metadata is not copied from the source blob or file. Note that beginning with version 2009-09-19, metadata names + * must adhere to the naming rules for C# identifiers. See Naming and Referencing Containers, Blobs, and Metadata + * for more information. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the + * specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since + * the specified date/time. + * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. + * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. + * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param cpkInfo Parameter group. + * @param encryptionScopeParam Parameter group. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws StorageErrorException 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(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) { + this.serviceClient.createSnapshot(containerName, blob, timeout, metadata, ifModifiedSince, ifUnmodifiedSince, + ifMatch, ifNoneMatch, ifTags, leaseId, requestId, cpkInfo, encryptionScopeParam); + } + + /** + * The Create Snapshot operation creates a read-only snapshot of a blob. + * + * @param containerName The container name. + * @param blob The blob name. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param metadata Optional. Specifies a user-defined name-value pair associated with the blob. If no name-value + * pairs are specified, the operation will copy the metadata from the source blob or file to the destination blob. + * If one or more name-value pairs are specified, the destination blob is created with the specified metadata, and + * metadata is not copied from the source blob or file. Note that beginning with version 2009-09-19, metadata names + * must adhere to the naming rules for C# identifiers. See Naming and Referencing Containers, Blobs, and Metadata + * for more information. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the + * specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since + * the specified date/time. + * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. + * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. + * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param cpkInfo Parameter group. + * @param encryptionScopeParam Parameter group. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws StorageErrorException 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 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) { + return this.serviceClient.createSnapshotNoCustomHeadersWithResponse(containerName, blob, timeout, metadata, + ifModifiedSince, ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, leaseId, requestId, cpkInfo, + encryptionScopeParam, context); + } + + /** + * The Start Copy From URL operation copies a blob or an internet resource to a new blob. + * + * @param containerName The container name. + * @param blob The blob name. + * @param copySource Specifies the name of the source page blob snapshot. This value is a URL of up to 2 KB in + * length that specifies a page blob snapshot. The value should be URL-encoded as it would appear in a request URI. + * The source blob must either be public or must be authenticated via a shared access signature. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param metadata Optional. Specifies a user-defined name-value pair associated with the blob. If no name-value + * pairs are specified, the operation will copy the metadata from the source blob or file to the destination blob. + * If one or more name-value pairs are specified, the destination blob is created with the specified metadata, and + * metadata is not copied from the source blob or file. Note that beginning with version 2009-09-19, metadata names + * must adhere to the naming rules for C# identifiers. See Naming and Referencing Containers, Blobs, and Metadata + * for more information. + * @param tier Optional. Indicates the tier to be set on the blob. + * @param rehydratePriority Optional: Indicates the priority with which to rehydrate an archived blob. + * @param sourceIfModifiedSince Specify this header value to operate only on a blob if it has been modified since + * the specified date/time. + * @param sourceIfUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified + * since the specified date/time. + * @param sourceIfMatch Specify an ETag value to operate only on blobs with a matching value. + * @param sourceIfNoneMatch Specify an ETag value to operate only on blobs without a matching value. + * @param sourceIfTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the + * specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since + * the specified date/time. + * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. + * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. + * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param blobTagsString Optional. Used to set blob tags in various blob operations. + * @param sealBlob Overrides the sealed state of the destination blob. Service version 2019-12-12 and newer. + * @param immutabilityPolicyExpiry Specifies the date time when the blobs immutability policy is set to expire. + * @param immutabilityPolicyMode Specifies the immutability policy mode to set on the blob. + * @param legalHold Specified if a legal hold should be set on the blob. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws StorageErrorException thrown if 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 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 this.serviceClient.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); + } + + /** + * The Start Copy From URL operation copies a blob or an internet resource to a new blob. + * + * @param containerName The container name. + * @param blob The blob name. + * @param copySource Specifies the name of the source page blob snapshot. This value is a URL of up to 2 KB in + * length that specifies a page blob snapshot. The value should be URL-encoded as it would appear in a request URI. + * The source blob must either be public or must be authenticated via a shared access signature. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param metadata Optional. Specifies a user-defined name-value pair associated with the blob. If no name-value + * pairs are specified, the operation will copy the metadata from the source blob or file to the destination blob. + * If one or more name-value pairs are specified, the destination blob is created with the specified metadata, and + * metadata is not copied from the source blob or file. Note that beginning with version 2009-09-19, metadata names + * must adhere to the naming rules for C# identifiers. See Naming and Referencing Containers, Blobs, and Metadata + * for more information. + * @param tier Optional. Indicates the tier to be set on the blob. + * @param rehydratePriority Optional: Indicates the priority with which to rehydrate an archived blob. + * @param sourceIfModifiedSince Specify this header value to operate only on a blob if it has been modified since + * the specified date/time. + * @param sourceIfUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified + * since the specified date/time. + * @param sourceIfMatch Specify an ETag value to operate only on blobs with a matching value. + * @param sourceIfNoneMatch Specify an ETag value to operate only on blobs without a matching value. + * @param sourceIfTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the + * specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since + * the specified date/time. + * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. + * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. + * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param blobTagsString Optional. Used to set blob tags in various blob operations. + * @param sealBlob Overrides the sealed state of the destination blob. Service version 2019-12-12 and newer. + * @param immutabilityPolicyExpiry Specifies the date time when the blobs immutability policy is set to expire. + * @param immutabilityPolicyMode Specifies the immutability policy mode to set on the blob. + * @param legalHold Specified if a legal hold should be set on the blob. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws StorageErrorException 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 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) { + this.serviceClient.startCopyFromURL(containerName, blob, copySource, timeout, metadata, tier, rehydratePriority, + sourceIfModifiedSince, sourceIfUnmodifiedSince, sourceIfMatch, sourceIfNoneMatch, sourceIfTags, + ifModifiedSince, ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, leaseId, requestId, blobTagsString, + sealBlob, immutabilityPolicyExpiry, immutabilityPolicyMode, legalHold); + } + + /** + * The Start Copy From URL operation copies a blob or an internet resource to a new blob. + * + * @param containerName The container name. + * @param blob The blob name. + * @param copySource Specifies the name of the source page blob snapshot. This value is a URL of up to 2 KB in + * length that specifies a page blob snapshot. The value should be URL-encoded as it would appear in a request URI. + * The source blob must either be public or must be authenticated via a shared access signature. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param metadata Optional. Specifies a user-defined name-value pair associated with the blob. If no name-value + * pairs are specified, the operation will copy the metadata from the source blob or file to the destination blob. + * If one or more name-value pairs are specified, the destination blob is created with the specified metadata, and + * metadata is not copied from the source blob or file. Note that beginning with version 2009-09-19, metadata names + * must adhere to the naming rules for C# identifiers. See Naming and Referencing Containers, Blobs, and Metadata + * for more information. + * @param tier Optional. Indicates the tier to be set on the blob. + * @param rehydratePriority Optional: Indicates the priority with which to rehydrate an archived blob. + * @param sourceIfModifiedSince Specify this header value to operate only on a blob if it has been modified since + * the specified date/time. + * @param sourceIfUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified + * since the specified date/time. + * @param sourceIfMatch Specify an ETag value to operate only on blobs with a matching value. + * @param sourceIfNoneMatch Specify an ETag value to operate only on blobs without a matching value. + * @param sourceIfTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the + * specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since + * the specified date/time. + * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. + * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. + * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param blobTagsString Optional. Used to set blob tags in various blob operations. + * @param sealBlob Overrides the sealed state of the destination blob. Service version 2019-12-12 and newer. + * @param immutabilityPolicyExpiry Specifies the date time when the blobs immutability policy is set to expire. + * @param immutabilityPolicyMode Specifies the immutability policy mode to set on the blob. + * @param legalHold Specified if a legal hold should be set on the blob. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws StorageErrorException 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 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) { + return this.serviceClient.startCopyFromURLNoCustomHeadersWithResponse(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); + } + + /** + * The Copy From URL operation copies a blob or an internet resource to a new blob. It will not return a response + * until the copy is complete. + * + * @param containerName The container name. + * @param blob The blob name. + * @param copySource Specifies the name of the source page blob snapshot. This value is a URL of up to 2 KB in + * length that specifies a page blob snapshot. The value should be URL-encoded as it would appear in a request URI. + * The source blob must either be public or must be authenticated via a shared access signature. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param metadata Optional. Specifies a user-defined name-value pair associated with the blob. If no name-value + * pairs are specified, the operation will copy the metadata from the source blob or file to the destination blob. + * If one or more name-value pairs are specified, the destination blob is created with the specified metadata, and + * metadata is not copied from the source blob or file. Note that beginning with version 2009-09-19, metadata names + * must adhere to the naming rules for C# identifiers. See Naming and Referencing Containers, Blobs, and Metadata + * for more information. + * @param tier Optional. Indicates the tier to be set on the blob. + * @param sourceIfModifiedSince Specify this header value to operate only on a blob if it has been modified since + * the specified date/time. + * @param sourceIfUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified + * since the specified date/time. + * @param sourceIfMatch Specify an ETag value to operate only on blobs with a matching value. + * @param sourceIfNoneMatch Specify an ETag value to operate only on blobs without a matching value. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the + * specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since + * the specified date/time. + * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. + * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. + * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param sourceContentMD5 Specify the md5 calculated for the range of bytes that must be read from the copy source. + * @param blobTagsString Optional. Used to set blob tags in various blob operations. + * @param immutabilityPolicyExpiry Specifies the date time when the blobs immutability policy is set to expire. + * @param immutabilityPolicyMode Specifies the immutability policy mode to set on the blob. + * @param legalHold Specified if a legal hold should be set on the blob. + * @param copySourceAuthorization Only Bearer type is supported. Credentials should be a valid OAuth access token to + * copy source. + * @param copySourceTags Optional, default 'replace'. Indicates if source tags should be copied or replaced with the + * tags specified by x-ms-tags. + * @param encryptionScopeParam Parameter group. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws StorageErrorException thrown if 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 containerName, String blob, + String copySource, Integer timeout, Map metadata, AccessTier tier, + OffsetDateTime sourceIfModifiedSince, OffsetDateTime sourceIfUnmodifiedSince, String sourceIfMatch, + String sourceIfNoneMatch, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, + String ifNoneMatch, String ifTags, String leaseId, String requestId, byte[] sourceContentMD5, + String blobTagsString, OffsetDateTime immutabilityPolicyExpiry, + BlobImmutabilityPolicyMode immutabilityPolicyMode, Boolean legalHold, String copySourceAuthorization, + BlobCopySourceTagsMode copySourceTags, EncryptionScope encryptionScopeParam, Context context) { + return this.serviceClient.copyFromURLWithResponse(containerName, blob, copySource, timeout, metadata, tier, + sourceIfModifiedSince, sourceIfUnmodifiedSince, sourceIfMatch, sourceIfNoneMatch, ifModifiedSince, + ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, leaseId, requestId, sourceContentMD5, blobTagsString, + immutabilityPolicyExpiry, immutabilityPolicyMode, legalHold, copySourceAuthorization, copySourceTags, + encryptionScopeParam, context); + } + + /** + * The Copy From URL operation copies a blob or an internet resource to a new blob. It will not return a response + * until the copy is complete. + * + * @param containerName The container name. + * @param blob The blob name. + * @param copySource Specifies the name of the source page blob snapshot. This value is a URL of up to 2 KB in + * length that specifies a page blob snapshot. The value should be URL-encoded as it would appear in a request URI. + * The source blob must either be public or must be authenticated via a shared access signature. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param metadata Optional. Specifies a user-defined name-value pair associated with the blob. If no name-value + * pairs are specified, the operation will copy the metadata from the source blob or file to the destination blob. + * If one or more name-value pairs are specified, the destination blob is created with the specified metadata, and + * metadata is not copied from the source blob or file. Note that beginning with version 2009-09-19, metadata names + * must adhere to the naming rules for C# identifiers. See Naming and Referencing Containers, Blobs, and Metadata + * for more information. + * @param tier Optional. Indicates the tier to be set on the blob. + * @param sourceIfModifiedSince Specify this header value to operate only on a blob if it has been modified since + * the specified date/time. + * @param sourceIfUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified + * since the specified date/time. + * @param sourceIfMatch Specify an ETag value to operate only on blobs with a matching value. + * @param sourceIfNoneMatch Specify an ETag value to operate only on blobs without a matching value. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the + * specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since + * the specified date/time. + * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. + * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. + * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param sourceContentMD5 Specify the md5 calculated for the range of bytes that must be read from the copy source. + * @param blobTagsString Optional. Used to set blob tags in various blob operations. + * @param immutabilityPolicyExpiry Specifies the date time when the blobs immutability policy is set to expire. + * @param immutabilityPolicyMode Specifies the immutability policy mode to set on the blob. + * @param legalHold Specified if a legal hold should be set on the blob. + * @param copySourceAuthorization Only Bearer type is supported. Credentials should be a valid OAuth access token to + * copy source. + * @param copySourceTags Optional, default 'replace'. Indicates if source tags should be copied or replaced with the + * tags specified by x-ms-tags. + * @param encryptionScopeParam Parameter group. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws StorageErrorException 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 containerName, String blob, String copySource, Integer timeout, + Map metadata, AccessTier tier, OffsetDateTime sourceIfModifiedSince, + OffsetDateTime sourceIfUnmodifiedSince, String sourceIfMatch, String sourceIfNoneMatch, + OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, + String ifTags, String leaseId, String requestId, byte[] sourceContentMD5, String blobTagsString, + OffsetDateTime immutabilityPolicyExpiry, BlobImmutabilityPolicyMode immutabilityPolicyMode, Boolean legalHold, + String copySourceAuthorization, BlobCopySourceTagsMode copySourceTags, EncryptionScope encryptionScopeParam) { + this.serviceClient.copyFromURL(containerName, blob, copySource, timeout, metadata, tier, sourceIfModifiedSince, + sourceIfUnmodifiedSince, sourceIfMatch, sourceIfNoneMatch, ifModifiedSince, ifUnmodifiedSince, ifMatch, + ifNoneMatch, ifTags, leaseId, requestId, sourceContentMD5, blobTagsString, immutabilityPolicyExpiry, + immutabilityPolicyMode, legalHold, copySourceAuthorization, copySourceTags, encryptionScopeParam); + } + + /** + * The Copy From URL operation copies a blob or an internet resource to a new blob. It will not return a response + * until the copy is complete. + * + * @param containerName The container name. + * @param blob The blob name. + * @param copySource Specifies the name of the source page blob snapshot. This value is a URL of up to 2 KB in + * length that specifies a page blob snapshot. The value should be URL-encoded as it would appear in a request URI. + * The source blob must either be public or must be authenticated via a shared access signature. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param metadata Optional. Specifies a user-defined name-value pair associated with the blob. If no name-value + * pairs are specified, the operation will copy the metadata from the source blob or file to the destination blob. + * If one or more name-value pairs are specified, the destination blob is created with the specified metadata, and + * metadata is not copied from the source blob or file. Note that beginning with version 2009-09-19, metadata names + * must adhere to the naming rules for C# identifiers. See Naming and Referencing Containers, Blobs, and Metadata + * for more information. + * @param tier Optional. Indicates the tier to be set on the blob. + * @param sourceIfModifiedSince Specify this header value to operate only on a blob if it has been modified since + * the specified date/time. + * @param sourceIfUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified + * since the specified date/time. + * @param sourceIfMatch Specify an ETag value to operate only on blobs with a matching value. + * @param sourceIfNoneMatch Specify an ETag value to operate only on blobs without a matching value. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the + * specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since + * the specified date/time. + * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. + * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. + * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param sourceContentMD5 Specify the md5 calculated for the range of bytes that must be read from the copy source. + * @param blobTagsString Optional. Used to set blob tags in various blob operations. + * @param immutabilityPolicyExpiry Specifies the date time when the blobs immutability policy is set to expire. + * @param immutabilityPolicyMode Specifies the immutability policy mode to set on the blob. + * @param legalHold Specified if a legal hold should be set on the blob. + * @param copySourceAuthorization Only Bearer type is supported. Credentials should be a valid OAuth access token to + * copy source. + * @param copySourceTags Optional, default 'replace'. Indicates if source tags should be copied or replaced with the + * tags specified by x-ms-tags. + * @param encryptionScopeParam Parameter group. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws StorageErrorException 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 Response copyFromURLNoCustomHeadersWithResponse(String containerName, String blob, String copySource, + Integer timeout, Map metadata, AccessTier tier, OffsetDateTime sourceIfModifiedSince, + OffsetDateTime sourceIfUnmodifiedSince, String sourceIfMatch, String sourceIfNoneMatch, + OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, + String ifTags, String leaseId, String requestId, byte[] sourceContentMD5, String blobTagsString, + OffsetDateTime immutabilityPolicyExpiry, BlobImmutabilityPolicyMode immutabilityPolicyMode, Boolean legalHold, + String copySourceAuthorization, BlobCopySourceTagsMode copySourceTags, EncryptionScope encryptionScopeParam, + Context context) { + return this.serviceClient.copyFromURLNoCustomHeadersWithResponse(containerName, blob, copySource, timeout, + metadata, tier, sourceIfModifiedSince, sourceIfUnmodifiedSince, sourceIfMatch, sourceIfNoneMatch, + ifModifiedSince, ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, leaseId, requestId, sourceContentMD5, + blobTagsString, immutabilityPolicyExpiry, immutabilityPolicyMode, legalHold, copySourceAuthorization, + copySourceTags, encryptionScopeParam, context); + } + + /** + * The Abort Copy From URL operation aborts a pending Copy From URL operation, and leaves a destination blob with + * zero length and full metadata. + * + * @param containerName The container name. + * @param blob The blob name. + * @param copyId The copy identifier provided in the x-ms-copy-id header of the original Copy Blob operation. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws StorageErrorException thrown if 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 containerName, + String blob, String copyId, Integer timeout, String leaseId, String requestId, Context context) { + return this.serviceClient.abortCopyFromURLWithResponse(containerName, blob, copyId, timeout, leaseId, requestId, + context); + } + + /** + * The Abort Copy From URL operation aborts a pending Copy From URL operation, and leaves a destination blob with + * zero length and full metadata. + * + * @param containerName The container name. + * @param blob The blob name. + * @param copyId The copy identifier provided in the x-ms-copy-id header of the original Copy Blob operation. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws StorageErrorException 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 containerName, String blob, String copyId, Integer timeout, String leaseId, + String requestId) { + this.serviceClient.abortCopyFromURL(containerName, blob, copyId, timeout, leaseId, requestId); + } + + /** + * The Abort Copy From URL operation aborts a pending Copy From URL operation, and leaves a destination blob with + * zero length and full metadata. + * + * @param containerName The container name. + * @param blob The blob name. + * @param copyId The copy identifier provided in the x-ms-copy-id header of the original Copy Blob operation. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws StorageErrorException 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 Response abortCopyFromURLNoCustomHeadersWithResponse(String containerName, String blob, String copyId, + Integer timeout, String leaseId, String requestId, Context context) { + return this.serviceClient.abortCopyFromURLNoCustomHeadersWithResponse(containerName, blob, copyId, timeout, + leaseId, requestId, context); + } + + /** + * The Set Tier operation sets the tier on a blob. The operation is allowed on a page blob in a premium storage + * account and on a block blob in a blob storage account (locally redundant storage only). A premium page blob's + * tier determines the allowed size, IOPS, and bandwidth of the blob. A block blob's tier determines + * Hot/Cool/Archive storage type. This operation does not update the blob's ETag. + * + * @param containerName The container name. + * @param blob The blob name. + * @param tier Indicates the tier to be set on the blob. + * @param snapshot The snapshot parameter is an opaque DateTime value that, when present, specifies the blob + * snapshot to retrieve. For more information on working with blob snapshots, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/creating-a-snapshot-of-a-blob">Creating + * a Snapshot of a Blob.</a>. + * @param versionId The version id parameter is an opaque DateTime value that, when present, specifies the version + * of the blob to operate on. It's for service version 2019-10-10 and newer. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param rehydratePriority Optional: Indicates the priority with which to rehydrate an archived blob. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws StorageErrorException thrown if 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(String containerName, String blob, + AccessTier tier, String snapshot, String versionId, Integer timeout, RehydratePriority rehydratePriority, + String requestId, String leaseId, String ifTags, Context context) { + return this.serviceClient.setTierWithResponse(containerName, blob, tier, snapshot, versionId, timeout, + rehydratePriority, requestId, leaseId, ifTags, context); + } + + /** + * The Set Tier operation sets the tier on a blob. The operation is allowed on a page blob in a premium storage + * account and on a block blob in a blob storage account (locally redundant storage only). A premium page blob's + * tier determines the allowed size, IOPS, and bandwidth of the blob. A block blob's tier determines + * Hot/Cool/Archive storage type. This operation does not update the blob's ETag. + * + * @param containerName The container name. + * @param blob The blob name. + * @param tier Indicates the tier to be set on the blob. + * @param snapshot The snapshot parameter is an opaque DateTime value that, when present, specifies the blob + * snapshot to retrieve. For more information on working with blob snapshots, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/creating-a-snapshot-of-a-blob">Creating + * a Snapshot of a Blob.</a>. + * @param versionId The version id parameter is an opaque DateTime value that, when present, specifies the version + * of the blob to operate on. It's for service version 2019-10-10 and newer. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param rehydratePriority Optional: Indicates the priority with which to rehydrate an archived blob. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws StorageErrorException 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(String containerName, String blob, AccessTier tier, String snapshot, String versionId, + Integer timeout, RehydratePriority rehydratePriority, String requestId, String leaseId, String ifTags) { + this.serviceClient.setTier(containerName, blob, tier, snapshot, versionId, timeout, rehydratePriority, + requestId, leaseId, ifTags); + } + + /** + * The Set Tier operation sets the tier on a blob. The operation is allowed on a page blob in a premium storage + * account and on a block blob in a blob storage account (locally redundant storage only). A premium page blob's + * tier determines the allowed size, IOPS, and bandwidth of the blob. A block blob's tier determines + * Hot/Cool/Archive storage type. This operation does not update the blob's ETag. + * + * @param containerName The container name. + * @param blob The blob name. + * @param tier Indicates the tier to be set on the blob. + * @param snapshot The snapshot parameter is an opaque DateTime value that, when present, specifies the blob + * snapshot to retrieve. For more information on working with blob snapshots, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/creating-a-snapshot-of-a-blob">Creating + * a Snapshot of a Blob.</a>. + * @param versionId The version id parameter is an opaque DateTime value that, when present, specifies the version + * of the blob to operate on. It's for service version 2019-10-10 and newer. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param rehydratePriority Optional: Indicates the priority with which to rehydrate an archived blob. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws StorageErrorException 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 Response setTierNoCustomHeadersWithResponse(String containerName, String blob, AccessTier tier, + String snapshot, String versionId, Integer timeout, RehydratePriority rehydratePriority, String requestId, + String leaseId, String ifTags, Context context) { + return this.serviceClient.setTierNoCustomHeadersWithResponse(containerName, blob, tier, snapshot, versionId, + timeout, rehydratePriority, requestId, leaseId, ifTags, context); + } + + /** + * Returns the sku name and account kind. + * + * @param containerName The container name. + * @param blob The blob name. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws StorageErrorException thrown if 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(String containerName, String blob, + Integer timeout, String requestId, Context context) { + return this.serviceClient.getAccountInfoWithResponse(containerName, blob, timeout, requestId, context); + } + + /** + * Returns the sku name and account kind. + * + * @param containerName The container name. + * @param blob The blob name. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws StorageErrorException 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(String containerName, String blob, Integer timeout, String requestId) { + this.serviceClient.getAccountInfo(containerName, blob, timeout, requestId); + } + + /** + * Returns the sku name and account kind. + * + * @param containerName The container name. + * @param blob The blob name. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws StorageErrorException 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 Response getAccountInfoNoCustomHeadersWithResponse(String containerName, String blob, Integer timeout, + String requestId, Context context) { + return this.serviceClient.getAccountInfoNoCustomHeadersWithResponse(containerName, blob, timeout, requestId, + context); + } + + /** + * The Query operation enables users to select/project on blob data by providing simple query expressions. + * + * @param containerName The container name. + * @param blob The blob name. + * @param snapshot The snapshot parameter is an opaque DateTime value that, when present, specifies the blob + * snapshot to retrieve. For more information on working with blob snapshots, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/creating-a-snapshot-of-a-blob">Creating + * a Snapshot of a Blob.</a>. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the + * specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since + * the specified date/time. + * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. + * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. + * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param queryRequest the query request. + * @param cpkInfo Parameter group. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws StorageErrorException 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(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 this.serviceClient.queryWithResponse(containerName, blob, snapshot, timeout, leaseId, ifModifiedSince, + ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, requestId, queryRequest, cpkInfo, context); + } + + /** + * The Query operation enables users to select/project on blob data by providing simple query expressions. + * + * @param containerName The container name. + * @param blob The blob name. + * @param snapshot The snapshot parameter is an opaque DateTime value that, when present, specifies the blob + * snapshot to retrieve. For more information on working with blob snapshots, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/creating-a-snapshot-of-a-blob">Creating + * a Snapshot of a Blob.</a>. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the + * specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since + * the specified date/time. + * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. + * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. + * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param queryRequest the query request. + * @param cpkInfo Parameter group. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws StorageErrorException 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 InputStream query(String containerName, String blob, String snapshot, Integer timeout, String leaseId, + OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, + String ifTags, String requestId, QueryRequest queryRequest, CpkInfo cpkInfo) { + return this.serviceClient.query(containerName, blob, snapshot, timeout, leaseId, ifModifiedSince, + ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, requestId, queryRequest, cpkInfo); + } + + /** + * The Query operation enables users to select/project on blob data by providing simple query expressions. + * + * @param containerName The container name. + * @param blob The blob name. + * @param snapshot The snapshot parameter is an opaque DateTime value that, when present, specifies the blob + * snapshot to retrieve. For more information on working with blob snapshots, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/creating-a-snapshot-of-a-blob">Creating + * a Snapshot of a Blob.</a>. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the + * specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since + * the specified date/time. + * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. + * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. + * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param queryRequest the query request. + * @param cpkInfo Parameter group. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws StorageErrorException 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 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) { + return this.serviceClient.queryNoCustomHeadersWithResponse(containerName, blob, snapshot, timeout, leaseId, + ifModifiedSince, ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, requestId, queryRequest, cpkInfo, + context); + } + + /** + * The Get Tags operation enables users to get the tags associated with a blob. + * + * @param containerName The container name. + * @param blob The blob name. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param snapshot The snapshot parameter is an opaque DateTime value that, when present, specifies the blob + * snapshot to retrieve. For more information on working with blob snapshots, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/creating-a-snapshot-of-a-blob">Creating + * a Snapshot of a Blob.</a>. + * @param versionId The version id parameter is an opaque DateTime value that, when present, specifies the version + * of the blob to operate on. It's for service version 2019-10-10 and newer. + * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws StorageErrorException 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}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public ResponseBase getTagsWithResponse(String containerName, String blob, + Integer timeout, String requestId, String snapshot, String versionId, String ifTags, String leaseId, + Context context) { + return this.serviceClient.getTagsWithResponse(containerName, blob, timeout, requestId, snapshot, versionId, + ifTags, leaseId, context); + } + + /** + * The Get Tags operation enables users to get the tags associated with a blob. + * + * @param containerName The container name. + * @param blob The blob name. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param snapshot The snapshot parameter is an opaque DateTime value that, when present, specifies the blob + * snapshot to retrieve. For more information on working with blob snapshots, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/creating-a-snapshot-of-a-blob">Creating + * a Snapshot of a Blob.</a>. + * @param versionId The version id parameter is an opaque DateTime value that, when present, specifies the version + * of the blob to operate on. It's for service version 2019-10-10 and newer. + * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws StorageErrorException 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. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public BlobTags getTags(String containerName, String blob, Integer timeout, String requestId, String snapshot, + String versionId, String ifTags, String leaseId) { + return this.serviceClient.getTags(containerName, blob, timeout, requestId, snapshot, versionId, ifTags, + leaseId); + } + + /** + * The Get Tags operation enables users to get the tags associated with a blob. + * + * @param containerName The container name. + * @param blob The blob name. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param snapshot The snapshot parameter is an opaque DateTime value that, when present, specifies the blob + * snapshot to retrieve. For more information on working with blob snapshots, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/creating-a-snapshot-of-a-blob">Creating + * a Snapshot of a Blob.</a>. + * @param versionId The version id parameter is an opaque DateTime value that, when present, specifies the version + * of the blob to operate on. It's for service version 2019-10-10 and newer. + * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws StorageErrorException 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. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getTagsNoCustomHeadersWithResponse(String containerName, String blob, Integer timeout, + String requestId, String snapshot, String versionId, String ifTags, String leaseId, Context context) { + return this.serviceClient.getTagsNoCustomHeadersWithResponse(containerName, blob, timeout, requestId, snapshot, + versionId, ifTags, leaseId, context); + } + + /** + * The Set Tags operation enables users to set tags on a blob. + * + * @param containerName The container name. + * @param blob The blob name. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param versionId The version id parameter is an opaque DateTime value that, when present, specifies the version + * of the blob to operate on. It's for service version 2019-10-10 and newer. + * @param transactionalContentMD5 Specify the transactional md5 for the body, to be validated by the service. + * @param transactionalContentCrc64 Specify the transactional crc64 for the body, to be validated by the service. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param tags Blob tags. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws StorageErrorException thrown if 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(String containerName, String blob, + Integer timeout, String versionId, byte[] transactionalContentMD5, byte[] transactionalContentCrc64, + String requestId, String ifTags, String leaseId, BlobTags tags, Context context) { + return this.serviceClient.setTagsWithResponse(containerName, blob, timeout, versionId, transactionalContentMD5, + transactionalContentCrc64, requestId, ifTags, leaseId, tags, context); + } + + /** + * The Set Tags operation enables users to set tags on a blob. + * + * @param containerName The container name. + * @param blob The blob name. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param versionId The version id parameter is an opaque DateTime value that, when present, specifies the version + * of the blob to operate on. It's for service version 2019-10-10 and newer. + * @param transactionalContentMD5 Specify the transactional md5 for the body, to be validated by the service. + * @param transactionalContentCrc64 Specify the transactional crc64 for the body, to be validated by the service. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param tags Blob tags. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws StorageErrorException 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(String containerName, String blob, Integer timeout, String versionId, + byte[] transactionalContentMD5, byte[] transactionalContentCrc64, String requestId, String ifTags, + String leaseId, BlobTags tags) { + this.serviceClient.setTags(containerName, blob, timeout, versionId, transactionalContentMD5, + transactionalContentCrc64, requestId, ifTags, leaseId, tags); + } + + /** + * The Set Tags operation enables users to set tags on a blob. + * + * @param containerName The container name. + * @param blob The blob name. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param versionId The version id parameter is an opaque DateTime value that, when present, specifies the version + * of the blob to operate on. It's for service version 2019-10-10 and newer. + * @param transactionalContentMD5 Specify the transactional md5 for the body, to be validated by the service. + * @param transactionalContentCrc64 Specify the transactional crc64 for the body, to be validated by the service. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param tags Blob tags. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws StorageErrorException 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 Response setTagsNoCustomHeadersWithResponse(String containerName, String blob, Integer timeout, + String versionId, byte[] transactionalContentMD5, byte[] transactionalContentCrc64, String requestId, + String ifTags, String leaseId, BlobTags tags, Context context) { + return this.serviceClient.setTagsNoCustomHeadersWithResponse(containerName, blob, timeout, versionId, + transactionalContentMD5, transactionalContentCrc64, requestId, ifTags, leaseId, tags, context); + } +} diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/BlockBlobClient.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/BlockBlobClient.java new file mode 100644 index 000000000000..87a6502d8cbc --- /dev/null +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/BlockBlobClient.java @@ -0,0 +1,1013 @@ +// 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; + +import com.azure.core.v2.annotation.Generated; +import com.azure.core.v2.annotation.ReturnType; +import com.azure.core.v2.annotation.ServiceClient; +import com.azure.core.v2.annotation.ServiceMethod; +import com.azure.core.v2.http.rest.ResponseBase; +import com.azure.storage.blob.implementation.BlockBlobsImpl; +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.BlockBlobsCommitBlockListHeaders; +import com.azure.storage.blob.models.BlockBlobsGetBlockListHeaders; +import com.azure.storage.blob.models.BlockBlobsPutBlobFromUrlHeaders; +import com.azure.storage.blob.models.BlockBlobsStageBlockFromURLHeaders; +import com.azure.storage.blob.models.BlockBlobsStageBlockHeaders; +import com.azure.storage.blob.models.BlockBlobsUploadHeaders; +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.EncryptionScope; +import com.azure.storage.blob.models.StorageErrorException; +import io.clientcore.core.http.models.Response; +import io.clientcore.core.util.Context; +import io.clientcore.core.util.binarydata.BinaryData; +import java.time.OffsetDateTime; +import java.util.Map; + +/** + * Initializes a new instance of the synchronous AzureBlobStorage type. + */ +@ServiceClient(builder = AzureBlobStorageBuilder.class) +public final class BlockBlobClient { + @Generated + private final BlockBlobsImpl serviceClient; + + /** + * Initializes an instance of BlockBlobClient class. + * + * @param serviceClient the service client implementation. + */ + @Generated + BlockBlobClient(BlockBlobsImpl serviceClient) { + this.serviceClient = serviceClient; + } + + /** + * The Upload Block Blob operation updates the content of an existing block blob. Updating an existing block blob + * overwrites any existing metadata on the blob. Partial updates are not supported with Put Blob; the content of the + * existing blob is overwritten with the content of the new blob. To perform a partial update of the content of a + * block blob, use the Put Block List operation. + * + * @param containerName The container name. + * @param blob The blob name. + * @param contentLength The length of the request. + * @param body Initial data. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param transactionalContentMD5 Specify the transactional md5 for the body, to be validated by the service. + * @param metadata Optional. Specifies a user-defined name-value pair associated with the blob. If no name-value + * pairs are specified, the operation will copy the metadata from the source blob or file to the destination blob. + * If one or more name-value pairs are specified, the destination blob is created with the specified metadata, and + * metadata is not copied from the source blob or file. Note that beginning with version 2009-09-19, metadata names + * must adhere to the naming rules for C# identifiers. See Naming and Referencing Containers, Blobs, and Metadata + * for more information. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param tier Optional. Indicates the tier to be set on the blob. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the + * specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since + * the specified date/time. + * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. + * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. + * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param blobTagsString Optional. Used to set blob tags in various blob operations. + * @param immutabilityPolicyExpiry Specifies the date time when the blobs immutability policy is set to expire. + * @param immutabilityPolicyMode Specifies the immutability policy mode to set on the blob. + * @param legalHold Specified if a legal hold should be set on the blob. + * @param transactionalContentCrc64 Specify the transactional crc64 for the body, to be validated by the service. + * @param 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 StorageErrorException thrown if 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(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 this.serviceClient.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); + } + + /** + * The Upload Block Blob operation updates the content of an existing block blob. Updating an existing block blob + * overwrites any existing metadata on the blob. Partial updates are not supported with Put Blob; the content of the + * existing blob is overwritten with the content of the new blob. To perform a partial update of the content of a + * block blob, use the Put Block List operation. + * + * @param containerName The container name. + * @param blob The blob name. + * @param contentLength The length of the request. + * @param body Initial data. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param transactionalContentMD5 Specify the transactional md5 for the body, to be validated by the service. + * @param metadata Optional. Specifies a user-defined name-value pair associated with the blob. If no name-value + * pairs are specified, the operation will copy the metadata from the source blob or file to the destination blob. + * If one or more name-value pairs are specified, the destination blob is created with the specified metadata, and + * metadata is not copied from the source blob or file. Note that beginning with version 2009-09-19, metadata names + * must adhere to the naming rules for C# identifiers. See Naming and Referencing Containers, Blobs, and Metadata + * for more information. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param tier Optional. Indicates the tier to be set on the blob. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the + * specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since + * the specified date/time. + * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. + * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. + * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param blobTagsString Optional. Used to set blob tags in various blob operations. + * @param immutabilityPolicyExpiry Specifies the date time when the blobs immutability policy is set to expire. + * @param immutabilityPolicyMode Specifies the immutability policy mode to set on the blob. + * @param legalHold Specified if a legal hold should be set on the blob. + * @param transactionalContentCrc64 Specify the transactional crc64 for the body, to be validated by the service. + * @param 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 StorageErrorException 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(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) { + this.serviceClient.upload(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); + } + + /** + * The Upload Block Blob operation updates the content of an existing block blob. Updating an existing block blob + * overwrites any existing metadata on the blob. Partial updates are not supported with Put Blob; the content of the + * existing blob is overwritten with the content of the new blob. To perform a partial update of the content of a + * block blob, use the Put Block List operation. + * + * @param containerName The container name. + * @param blob The blob name. + * @param contentLength The length of the request. + * @param body Initial data. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param transactionalContentMD5 Specify the transactional md5 for the body, to be validated by the service. + * @param metadata Optional. Specifies a user-defined name-value pair associated with the blob. If no name-value + * pairs are specified, the operation will copy the metadata from the source blob or file to the destination blob. + * If one or more name-value pairs are specified, the destination blob is created with the specified metadata, and + * metadata is not copied from the source blob or file. Note that beginning with version 2009-09-19, metadata names + * must adhere to the naming rules for C# identifiers. See Naming and Referencing Containers, Blobs, and Metadata + * for more information. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param tier Optional. Indicates the tier to be set on the blob. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the + * specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since + * the specified date/time. + * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. + * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. + * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param blobTagsString Optional. Used to set blob tags in various blob operations. + * @param immutabilityPolicyExpiry Specifies the date time when the blobs immutability policy is set to expire. + * @param immutabilityPolicyMode Specifies the immutability policy mode to set on the blob. + * @param legalHold Specified if a legal hold should be set on the blob. + * @param transactionalContentCrc64 Specify the transactional crc64 for the body, to be validated by the service. + * @param 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 StorageErrorException 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 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) { + return this.serviceClient.uploadNoCustomHeadersWithResponse(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); + } + + /** + * The Put Blob from URL operation creates a new Block Blob where the contents of the blob are read from a given + * URL. This API is supported beginning with the 2020-04-08 version. Partial updates are not supported with Put Blob + * from URL; the content of an existing blob is overwritten with the content of the new blob. To perform partial + * updates to a block blob's contents using a source URL, use the Put Block from URL API in conjunction with Put + * Block List. + * + * @param containerName The container name. + * @param blob The blob name. + * @param contentLength The length of the request. + * @param copySource Specifies the name of the source page blob snapshot. This value is a URL of up to 2 KB in + * length that specifies a page blob snapshot. The value should be URL-encoded as it would appear in a request URI. + * The source blob must either be public or must be authenticated via a shared access signature. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param transactionalContentMD5 Specify the transactional md5 for the body, to be validated by the service. + * @param metadata Optional. Specifies a user-defined name-value pair associated with the blob. If no name-value + * pairs are specified, the operation will copy the metadata from the source blob or file to the destination blob. + * If one or more name-value pairs are specified, the destination blob is created with the specified metadata, and + * metadata is not copied from the source blob or file. Note that beginning with version 2009-09-19, metadata names + * must adhere to the naming rules for C# identifiers. See Naming and Referencing Containers, Blobs, and Metadata + * for more information. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param tier Optional. Indicates the tier to be set on the blob. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the + * specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since + * the specified date/time. + * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. + * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. + * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. + * @param sourceIfModifiedSince Specify this header value to operate only on a blob if it has been modified since + * the specified date/time. + * @param sourceIfUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified + * since the specified date/time. + * @param sourceIfMatch Specify an ETag value to operate only on blobs with a matching value. + * @param sourceIfNoneMatch Specify an ETag value to operate only on blobs without a matching value. + * @param sourceIfTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param sourceContentMD5 Specify the md5 calculated for the range of bytes that must be read from the copy source. + * @param blobTagsString Optional. Used to set blob tags in various blob operations. + * @param copySourceBlobProperties Optional, default is true. Indicates if properties from the source blob should be + * copied. + * @param copySourceAuthorization Only Bearer type is supported. Credentials should be a valid OAuth access token to + * copy source. + * @param copySourceTags Optional, default 'replace'. Indicates if source tags should be copied or replaced with the + * tags specified by x-ms-tags. + * @param blobHttpHeaders Parameter group. + * @param cpkInfo Parameter group. + * @param encryptionScopeParam Parameter group. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws StorageErrorException thrown if 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 putBlobFromUrlWithResponse(String containerName, + String blob, long contentLength, String copySource, Integer timeout, byte[] transactionalContentMD5, + Map metadata, String leaseId, AccessTier tier, OffsetDateTime ifModifiedSince, + OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, String ifTags, + OffsetDateTime sourceIfModifiedSince, OffsetDateTime sourceIfUnmodifiedSince, String sourceIfMatch, + String sourceIfNoneMatch, String sourceIfTags, String requestId, byte[] sourceContentMD5, String blobTagsString, + Boolean copySourceBlobProperties, String copySourceAuthorization, BlobCopySourceTagsMode copySourceTags, + BlobHttpHeaders blobHttpHeaders, CpkInfo cpkInfo, EncryptionScope encryptionScopeParam, Context context) { + return this.serviceClient.putBlobFromUrlWithResponse(containerName, blob, contentLength, copySource, timeout, + transactionalContentMD5, metadata, leaseId, tier, ifModifiedSince, ifUnmodifiedSince, ifMatch, ifNoneMatch, + ifTags, sourceIfModifiedSince, sourceIfUnmodifiedSince, sourceIfMatch, sourceIfNoneMatch, sourceIfTags, + requestId, sourceContentMD5, blobTagsString, copySourceBlobProperties, copySourceAuthorization, + copySourceTags, blobHttpHeaders, cpkInfo, encryptionScopeParam, context); + } + + /** + * The Put Blob from URL operation creates a new Block Blob where the contents of the blob are read from a given + * URL. This API is supported beginning with the 2020-04-08 version. Partial updates are not supported with Put Blob + * from URL; the content of an existing blob is overwritten with the content of the new blob. To perform partial + * updates to a block blob's contents using a source URL, use the Put Block from URL API in conjunction with Put + * Block List. + * + * @param containerName The container name. + * @param blob The blob name. + * @param contentLength The length of the request. + * @param copySource Specifies the name of the source page blob snapshot. This value is a URL of up to 2 KB in + * length that specifies a page blob snapshot. The value should be URL-encoded as it would appear in a request URI. + * The source blob must either be public or must be authenticated via a shared access signature. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param transactionalContentMD5 Specify the transactional md5 for the body, to be validated by the service. + * @param metadata Optional. Specifies a user-defined name-value pair associated with the blob. If no name-value + * pairs are specified, the operation will copy the metadata from the source blob or file to the destination blob. + * If one or more name-value pairs are specified, the destination blob is created with the specified metadata, and + * metadata is not copied from the source blob or file. Note that beginning with version 2009-09-19, metadata names + * must adhere to the naming rules for C# identifiers. See Naming and Referencing Containers, Blobs, and Metadata + * for more information. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param tier Optional. Indicates the tier to be set on the blob. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the + * specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since + * the specified date/time. + * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. + * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. + * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. + * @param sourceIfModifiedSince Specify this header value to operate only on a blob if it has been modified since + * the specified date/time. + * @param sourceIfUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified + * since the specified date/time. + * @param sourceIfMatch Specify an ETag value to operate only on blobs with a matching value. + * @param sourceIfNoneMatch Specify an ETag value to operate only on blobs without a matching value. + * @param sourceIfTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param sourceContentMD5 Specify the md5 calculated for the range of bytes that must be read from the copy source. + * @param blobTagsString Optional. Used to set blob tags in various blob operations. + * @param copySourceBlobProperties Optional, default is true. Indicates if properties from the source blob should be + * copied. + * @param copySourceAuthorization Only Bearer type is supported. Credentials should be a valid OAuth access token to + * copy source. + * @param copySourceTags Optional, default 'replace'. Indicates if source tags should be copied or replaced with the + * tags specified by x-ms-tags. + * @param blobHttpHeaders Parameter group. + * @param cpkInfo Parameter group. + * @param encryptionScopeParam Parameter group. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws StorageErrorException 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 putBlobFromUrl(String containerName, String blob, long contentLength, String copySource, + Integer timeout, byte[] transactionalContentMD5, Map metadata, String leaseId, AccessTier tier, + OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, + String ifTags, OffsetDateTime sourceIfModifiedSince, OffsetDateTime sourceIfUnmodifiedSince, + String sourceIfMatch, String sourceIfNoneMatch, String sourceIfTags, String requestId, byte[] sourceContentMD5, + String blobTagsString, Boolean copySourceBlobProperties, String copySourceAuthorization, + BlobCopySourceTagsMode copySourceTags, BlobHttpHeaders blobHttpHeaders, CpkInfo cpkInfo, + EncryptionScope encryptionScopeParam) { + this.serviceClient.putBlobFromUrl(containerName, blob, contentLength, copySource, timeout, + transactionalContentMD5, metadata, leaseId, tier, ifModifiedSince, ifUnmodifiedSince, ifMatch, ifNoneMatch, + ifTags, sourceIfModifiedSince, sourceIfUnmodifiedSince, sourceIfMatch, sourceIfNoneMatch, sourceIfTags, + requestId, sourceContentMD5, blobTagsString, copySourceBlobProperties, copySourceAuthorization, + copySourceTags, blobHttpHeaders, cpkInfo, encryptionScopeParam); + } + + /** + * The Put Blob from URL operation creates a new Block Blob where the contents of the blob are read from a given + * URL. This API is supported beginning with the 2020-04-08 version. Partial updates are not supported with Put Blob + * from URL; the content of an existing blob is overwritten with the content of the new blob. To perform partial + * updates to a block blob's contents using a source URL, use the Put Block from URL API in conjunction with Put + * Block List. + * + * @param containerName The container name. + * @param blob The blob name. + * @param contentLength The length of the request. + * @param copySource Specifies the name of the source page blob snapshot. This value is a URL of up to 2 KB in + * length that specifies a page blob snapshot. The value should be URL-encoded as it would appear in a request URI. + * The source blob must either be public or must be authenticated via a shared access signature. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param transactionalContentMD5 Specify the transactional md5 for the body, to be validated by the service. + * @param metadata Optional. Specifies a user-defined name-value pair associated with the blob. If no name-value + * pairs are specified, the operation will copy the metadata from the source blob or file to the destination blob. + * If one or more name-value pairs are specified, the destination blob is created with the specified metadata, and + * metadata is not copied from the source blob or file. Note that beginning with version 2009-09-19, metadata names + * must adhere to the naming rules for C# identifiers. See Naming and Referencing Containers, Blobs, and Metadata + * for more information. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param tier Optional. Indicates the tier to be set on the blob. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the + * specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since + * the specified date/time. + * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. + * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. + * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. + * @param sourceIfModifiedSince Specify this header value to operate only on a blob if it has been modified since + * the specified date/time. + * @param sourceIfUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified + * since the specified date/time. + * @param sourceIfMatch Specify an ETag value to operate only on blobs with a matching value. + * @param sourceIfNoneMatch Specify an ETag value to operate only on blobs without a matching value. + * @param sourceIfTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param sourceContentMD5 Specify the md5 calculated for the range of bytes that must be read from the copy source. + * @param blobTagsString Optional. Used to set blob tags in various blob operations. + * @param copySourceBlobProperties Optional, default is true. Indicates if properties from the source blob should be + * copied. + * @param copySourceAuthorization Only Bearer type is supported. Credentials should be a valid OAuth access token to + * copy source. + * @param copySourceTags Optional, default 'replace'. Indicates if source tags should be copied or replaced with the + * tags specified by x-ms-tags. + * @param blobHttpHeaders Parameter group. + * @param cpkInfo Parameter group. + * @param encryptionScopeParam Parameter group. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws StorageErrorException 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 Response putBlobFromUrlNoCustomHeadersWithResponse(String containerName, String blob, + long contentLength, String copySource, Integer timeout, byte[] transactionalContentMD5, + Map metadata, String leaseId, AccessTier tier, OffsetDateTime ifModifiedSince, + OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, String ifTags, + OffsetDateTime sourceIfModifiedSince, OffsetDateTime sourceIfUnmodifiedSince, String sourceIfMatch, + String sourceIfNoneMatch, String sourceIfTags, String requestId, byte[] sourceContentMD5, String blobTagsString, + Boolean copySourceBlobProperties, String copySourceAuthorization, BlobCopySourceTagsMode copySourceTags, + BlobHttpHeaders blobHttpHeaders, CpkInfo cpkInfo, EncryptionScope encryptionScopeParam, Context context) { + return this.serviceClient.putBlobFromUrlNoCustomHeadersWithResponse(containerName, blob, contentLength, + copySource, timeout, transactionalContentMD5, metadata, leaseId, tier, ifModifiedSince, ifUnmodifiedSince, + ifMatch, ifNoneMatch, ifTags, sourceIfModifiedSince, sourceIfUnmodifiedSince, sourceIfMatch, + sourceIfNoneMatch, sourceIfTags, requestId, sourceContentMD5, blobTagsString, copySourceBlobProperties, + copySourceAuthorization, copySourceTags, blobHttpHeaders, cpkInfo, encryptionScopeParam, context); + } + + /** + * The Stage Block operation creates a new block to be committed as part of a blob. + * + * @param containerName The container name. + * @param blob The blob name. + * @param blockId A valid Base64 string value that identifies the block. Prior to encoding, the string must be less + * than or equal to 64 bytes in size. For a given blob, the length of the value specified for the blockid parameter + * must be the same size for each block. + * @param contentLength The length of the request. + * @param body Initial data. + * @param transactionalContentMD5 Specify the transactional md5 for the body, to be validated by the service. + * @param transactionalContentCrc64 Specify the transactional crc64 for the body, to be validated by the service. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param 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 StorageErrorException thrown if 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 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 this.serviceClient.stageBlockWithResponse(containerName, blob, blockId, contentLength, body, + transactionalContentMD5, transactionalContentCrc64, timeout, leaseId, requestId, structuredBodyType, + structuredContentLength, cpkInfo, encryptionScopeParam, context); + } + + /** + * The Stage Block operation creates a new block to be committed as part of a blob. + * + * @param containerName The container name. + * @param blob The blob name. + * @param blockId A valid Base64 string value that identifies the block. Prior to encoding, the string must be less + * than or equal to 64 bytes in size. For a given blob, the length of the value specified for the blockid parameter + * must be the same size for each block. + * @param contentLength The length of the request. + * @param body Initial data. + * @param transactionalContentMD5 Specify the transactional md5 for the body, to be validated by the service. + * @param transactionalContentCrc64 Specify the transactional crc64 for the body, to be validated by the service. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param 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 StorageErrorException 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 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) { + this.serviceClient.stageBlock(containerName, blob, blockId, contentLength, body, transactionalContentMD5, + transactionalContentCrc64, timeout, leaseId, requestId, structuredBodyType, structuredContentLength, + cpkInfo, encryptionScopeParam); + } + + /** + * The Stage Block operation creates a new block to be committed as part of a blob. + * + * @param containerName The container name. + * @param blob The blob name. + * @param blockId A valid Base64 string value that identifies the block. Prior to encoding, the string must be less + * than or equal to 64 bytes in size. For a given blob, the length of the value specified for the blockid parameter + * must be the same size for each block. + * @param contentLength The length of the request. + * @param body Initial data. + * @param transactionalContentMD5 Specify the transactional md5 for the body, to be validated by the service. + * @param transactionalContentCrc64 Specify the transactional crc64 for the body, to be validated by the service. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param 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 StorageErrorException 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 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) { + return this.serviceClient.stageBlockNoCustomHeadersWithResponse(containerName, blob, blockId, contentLength, + body, transactionalContentMD5, transactionalContentCrc64, timeout, leaseId, requestId, structuredBodyType, + structuredContentLength, cpkInfo, encryptionScopeParam, context); + } + + /** + * The Stage Block operation creates a new block to be committed as part of a blob where the contents are read from + * a URL. + * + * @param containerName The container name. + * @param blob The blob name. + * @param blockId A valid Base64 string value that identifies the block. Prior to encoding, the string must be less + * than or equal to 64 bytes in size. For a given blob, the length of the value specified for the blockid parameter + * must be the same size for each block. + * @param contentLength The length of the request. + * @param sourceUrl Specify a URL to the copy source. + * @param sourceRange Bytes of source data in the specified range. + * @param sourceContentMD5 Specify the md5 calculated for the range of bytes that must be read from the copy source. + * @param sourceContentcrc64 Specify the crc64 calculated for the range of bytes that must be read from the copy + * source. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param sourceIfModifiedSince Specify this header value to operate only on a blob if it has been modified since + * the specified date/time. + * @param sourceIfUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified + * since the specified date/time. + * @param sourceIfMatch Specify an ETag value to operate only on blobs with a matching value. + * @param sourceIfNoneMatch Specify an ETag value to operate only on blobs without a matching value. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param copySourceAuthorization Only Bearer type is supported. Credentials should be a valid OAuth access token to + * copy source. + * @param cpkInfo Parameter group. + * @param encryptionScopeParam Parameter group. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws StorageErrorException thrown if 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 containerName, + String blob, String blockId, long contentLength, String sourceUrl, String sourceRange, byte[] sourceContentMD5, + byte[] sourceContentcrc64, Integer timeout, String leaseId, OffsetDateTime sourceIfModifiedSince, + OffsetDateTime sourceIfUnmodifiedSince, String sourceIfMatch, String sourceIfNoneMatch, String requestId, + String copySourceAuthorization, CpkInfo cpkInfo, EncryptionScope encryptionScopeParam, Context context) { + return this.serviceClient.stageBlockFromURLWithResponse(containerName, blob, blockId, contentLength, sourceUrl, + sourceRange, sourceContentMD5, sourceContentcrc64, timeout, leaseId, sourceIfModifiedSince, + sourceIfUnmodifiedSince, sourceIfMatch, sourceIfNoneMatch, requestId, copySourceAuthorization, cpkInfo, + encryptionScopeParam, context); + } + + /** + * The Stage Block operation creates a new block to be committed as part of a blob where the contents are read from + * a URL. + * + * @param containerName The container name. + * @param blob The blob name. + * @param blockId A valid Base64 string value that identifies the block. Prior to encoding, the string must be less + * than or equal to 64 bytes in size. For a given blob, the length of the value specified for the blockid parameter + * must be the same size for each block. + * @param contentLength The length of the request. + * @param sourceUrl Specify a URL to the copy source. + * @param sourceRange Bytes of source data in the specified range. + * @param sourceContentMD5 Specify the md5 calculated for the range of bytes that must be read from the copy source. + * @param sourceContentcrc64 Specify the crc64 calculated for the range of bytes that must be read from the copy + * source. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param sourceIfModifiedSince Specify this header value to operate only on a blob if it has been modified since + * the specified date/time. + * @param sourceIfUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified + * since the specified date/time. + * @param sourceIfMatch Specify an ETag value to operate only on blobs with a matching value. + * @param sourceIfNoneMatch Specify an ETag value to operate only on blobs without a matching value. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param copySourceAuthorization Only Bearer type is supported. Credentials should be a valid OAuth access token to + * copy source. + * @param cpkInfo Parameter group. + * @param encryptionScopeParam Parameter group. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws StorageErrorException 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 containerName, String blob, String blockId, long contentLength, + String sourceUrl, String sourceRange, byte[] sourceContentMD5, byte[] sourceContentcrc64, Integer timeout, + String leaseId, OffsetDateTime sourceIfModifiedSince, OffsetDateTime sourceIfUnmodifiedSince, + String sourceIfMatch, String sourceIfNoneMatch, String requestId, String copySourceAuthorization, + CpkInfo cpkInfo, EncryptionScope encryptionScopeParam) { + this.serviceClient.stageBlockFromURL(containerName, blob, blockId, contentLength, sourceUrl, sourceRange, + sourceContentMD5, sourceContentcrc64, timeout, leaseId, sourceIfModifiedSince, sourceIfUnmodifiedSince, + sourceIfMatch, sourceIfNoneMatch, requestId, copySourceAuthorization, cpkInfo, encryptionScopeParam); + } + + /** + * The Stage Block operation creates a new block to be committed as part of a blob where the contents are read from + * a URL. + * + * @param containerName The container name. + * @param blob The blob name. + * @param blockId A valid Base64 string value that identifies the block. Prior to encoding, the string must be less + * than or equal to 64 bytes in size. For a given blob, the length of the value specified for the blockid parameter + * must be the same size for each block. + * @param contentLength The length of the request. + * @param sourceUrl Specify a URL to the copy source. + * @param sourceRange Bytes of source data in the specified range. + * @param sourceContentMD5 Specify the md5 calculated for the range of bytes that must be read from the copy source. + * @param sourceContentcrc64 Specify the crc64 calculated for the range of bytes that must be read from the copy + * source. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param sourceIfModifiedSince Specify this header value to operate only on a blob if it has been modified since + * the specified date/time. + * @param sourceIfUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified + * since the specified date/time. + * @param sourceIfMatch Specify an ETag value to operate only on blobs with a matching value. + * @param sourceIfNoneMatch Specify an ETag value to operate only on blobs without a matching value. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param copySourceAuthorization Only Bearer type is supported. Credentials should be a valid OAuth access token to + * copy source. + * @param cpkInfo Parameter group. + * @param encryptionScopeParam Parameter group. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws StorageErrorException 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 Response stageBlockFromURLNoCustomHeadersWithResponse(String containerName, String blob, + String blockId, long contentLength, String sourceUrl, String sourceRange, byte[] sourceContentMD5, + byte[] sourceContentcrc64, Integer timeout, String leaseId, OffsetDateTime sourceIfModifiedSince, + OffsetDateTime sourceIfUnmodifiedSince, String sourceIfMatch, String sourceIfNoneMatch, String requestId, + String copySourceAuthorization, CpkInfo cpkInfo, EncryptionScope encryptionScopeParam, Context context) { + return this.serviceClient.stageBlockFromURLNoCustomHeadersWithResponse(containerName, blob, blockId, + contentLength, sourceUrl, sourceRange, sourceContentMD5, sourceContentcrc64, timeout, leaseId, + sourceIfModifiedSince, sourceIfUnmodifiedSince, sourceIfMatch, sourceIfNoneMatch, requestId, + copySourceAuthorization, cpkInfo, encryptionScopeParam, context); + } + + /** + * The Commit Block List operation writes a blob by specifying the list of block IDs that make up the blob. In order + * to be written as part of a blob, a block must have been successfully written to the server in a prior Put Block + * operation. You can call Put Block List to update a blob by uploading only those blocks that have changed, then + * committing the new and existing blocks together. You can do this by specifying whether to commit a block from the + * committed block list or from the uncommitted block list, or to commit the most recently uploaded version of the + * block, whichever list it may belong to. + * + * @param containerName The container name. + * @param blob The blob name. + * @param blocks Blob Blocks. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param transactionalContentMD5 Specify the transactional md5 for the body, to be validated by the service. + * @param transactionalContentCrc64 Specify the transactional crc64 for the body, to be validated by the service. + * @param metadata Optional. Specifies a user-defined name-value pair associated with the blob. If no name-value + * pairs are specified, the operation will copy the metadata from the source blob or file to the destination blob. + * If one or more name-value pairs are specified, the destination blob is created with the specified metadata, and + * metadata is not copied from the source blob or file. Note that beginning with version 2009-09-19, metadata names + * must adhere to the naming rules for C# identifiers. See Naming and Referencing Containers, Blobs, and Metadata + * for more information. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param tier Optional. Indicates the tier to be set on the blob. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the + * specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since + * the specified date/time. + * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. + * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. + * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param blobTagsString Optional. Used to set blob tags in various blob operations. + * @param immutabilityPolicyExpiry Specifies the date time when the blobs immutability policy is set to expire. + * @param immutabilityPolicyMode Specifies the immutability policy mode to set on the blob. + * @param legalHold Specified if a legal hold should be set on the blob. + * @param blobHttpHeaders Parameter group. + * @param cpkInfo Parameter group. + * @param encryptionScopeParam Parameter group. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws StorageErrorException thrown if 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(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 this.serviceClient.commitBlockListWithResponse(containerName, blob, blocks, timeout, + transactionalContentMD5, transactionalContentCrc64, metadata, leaseId, tier, ifModifiedSince, + ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, requestId, blobTagsString, immutabilityPolicyExpiry, + immutabilityPolicyMode, legalHold, blobHttpHeaders, cpkInfo, encryptionScopeParam, context); + } + + /** + * The Commit Block List operation writes a blob by specifying the list of block IDs that make up the blob. In order + * to be written as part of a blob, a block must have been successfully written to the server in a prior Put Block + * operation. You can call Put Block List to update a blob by uploading only those blocks that have changed, then + * committing the new and existing blocks together. You can do this by specifying whether to commit a block from the + * committed block list or from the uncommitted block list, or to commit the most recently uploaded version of the + * block, whichever list it may belong to. + * + * @param containerName The container name. + * @param blob The blob name. + * @param blocks Blob Blocks. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param transactionalContentMD5 Specify the transactional md5 for the body, to be validated by the service. + * @param transactionalContentCrc64 Specify the transactional crc64 for the body, to be validated by the service. + * @param metadata Optional. Specifies a user-defined name-value pair associated with the blob. If no name-value + * pairs are specified, the operation will copy the metadata from the source blob or file to the destination blob. + * If one or more name-value pairs are specified, the destination blob is created with the specified metadata, and + * metadata is not copied from the source blob or file. Note that beginning with version 2009-09-19, metadata names + * must adhere to the naming rules for C# identifiers. See Naming and Referencing Containers, Blobs, and Metadata + * for more information. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param tier Optional. Indicates the tier to be set on the blob. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the + * specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since + * the specified date/time. + * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. + * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. + * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param blobTagsString Optional. Used to set blob tags in various blob operations. + * @param immutabilityPolicyExpiry Specifies the date time when the blobs immutability policy is set to expire. + * @param immutabilityPolicyMode Specifies the immutability policy mode to set on the blob. + * @param legalHold Specified if a legal hold should be set on the blob. + * @param blobHttpHeaders Parameter group. + * @param cpkInfo Parameter group. + * @param encryptionScopeParam Parameter group. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws StorageErrorException 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(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) { + this.serviceClient.commitBlockList(containerName, blob, blocks, timeout, transactionalContentMD5, + transactionalContentCrc64, metadata, leaseId, tier, ifModifiedSince, ifUnmodifiedSince, ifMatch, + ifNoneMatch, ifTags, requestId, blobTagsString, immutabilityPolicyExpiry, immutabilityPolicyMode, legalHold, + blobHttpHeaders, cpkInfo, encryptionScopeParam); + } + + /** + * The Commit Block List operation writes a blob by specifying the list of block IDs that make up the blob. In order + * to be written as part of a blob, a block must have been successfully written to the server in a prior Put Block + * operation. You can call Put Block List to update a blob by uploading only those blocks that have changed, then + * committing the new and existing blocks together. You can do this by specifying whether to commit a block from the + * committed block list or from the uncommitted block list, or to commit the most recently uploaded version of the + * block, whichever list it may belong to. + * + * @param containerName The container name. + * @param blob The blob name. + * @param blocks Blob Blocks. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param transactionalContentMD5 Specify the transactional md5 for the body, to be validated by the service. + * @param transactionalContentCrc64 Specify the transactional crc64 for the body, to be validated by the service. + * @param metadata Optional. Specifies a user-defined name-value pair associated with the blob. If no name-value + * pairs are specified, the operation will copy the metadata from the source blob or file to the destination blob. + * If one or more name-value pairs are specified, the destination blob is created with the specified metadata, and + * metadata is not copied from the source blob or file. Note that beginning with version 2009-09-19, metadata names + * must adhere to the naming rules for C# identifiers. See Naming and Referencing Containers, Blobs, and Metadata + * for more information. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param tier Optional. Indicates the tier to be set on the blob. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the + * specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since + * the specified date/time. + * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. + * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. + * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param blobTagsString Optional. Used to set blob tags in various blob operations. + * @param immutabilityPolicyExpiry Specifies the date time when the blobs immutability policy is set to expire. + * @param immutabilityPolicyMode Specifies the immutability policy mode to set on the blob. + * @param legalHold Specified if a legal hold should be set on the blob. + * @param blobHttpHeaders Parameter group. + * @param cpkInfo Parameter group. + * @param encryptionScopeParam Parameter group. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws StorageErrorException 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 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) { + return this.serviceClient.commitBlockListNoCustomHeadersWithResponse(containerName, blob, blocks, timeout, + transactionalContentMD5, transactionalContentCrc64, metadata, leaseId, tier, ifModifiedSince, + ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, requestId, blobTagsString, immutabilityPolicyExpiry, + immutabilityPolicyMode, legalHold, blobHttpHeaders, cpkInfo, encryptionScopeParam, context); + } + + /** + * The Get Block List operation retrieves the list of blocks that have been uploaded as part of a block blob. + * + * @param containerName The container name. + * @param blob The blob name. + * @param listType Specifies whether to return the list of committed blocks, the list of uncommitted blocks, or both + * lists together. + * @param snapshot The snapshot parameter is an opaque DateTime value that, when present, specifies the blob + * snapshot to retrieve. For more information on working with blob snapshots, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/creating-a-snapshot-of-a-blob">Creating + * a Snapshot of a Blob.</a>. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws StorageErrorException 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 getBlockListWithResponse(String containerName, + String blob, BlockListType listType, String snapshot, Integer timeout, String leaseId, String ifTags, + String requestId, Context context) { + return this.serviceClient.getBlockListWithResponse(containerName, blob, listType, snapshot, timeout, leaseId, + ifTags, requestId, context); + } + + /** + * The Get Block List operation retrieves the list of blocks that have been uploaded as part of a block blob. + * + * @param containerName The container name. + * @param blob The blob name. + * @param listType Specifies whether to return the list of committed blocks, the list of uncommitted blocks, or both + * lists together. + * @param snapshot The snapshot parameter is an opaque DateTime value that, when present, specifies the blob + * snapshot to retrieve. For more information on working with blob snapshots, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/creating-a-snapshot-of-a-blob">Creating + * a Snapshot of a Blob.</a>. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws StorageErrorException 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 BlockList getBlockList(String containerName, String blob, BlockListType listType, String snapshot, + Integer timeout, String leaseId, String ifTags, String requestId) { + return this.serviceClient.getBlockList(containerName, blob, listType, snapshot, timeout, leaseId, ifTags, + requestId); + } + + /** + * The Get Block List operation retrieves the list of blocks that have been uploaded as part of a block blob. + * + * @param containerName The container name. + * @param blob The blob name. + * @param listType Specifies whether to return the list of committed blocks, the list of uncommitted blocks, or both + * lists together. + * @param snapshot The snapshot parameter is an opaque DateTime value that, when present, specifies the blob + * snapshot to retrieve. For more information on working with blob snapshots, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/creating-a-snapshot-of-a-blob">Creating + * a Snapshot of a Blob.</a>. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws StorageErrorException 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 Response getBlockListNoCustomHeadersWithResponse(String containerName, String blob, + BlockListType listType, String snapshot, Integer timeout, String leaseId, String ifTags, String requestId, + Context context) { + return this.serviceClient.getBlockListNoCustomHeadersWithResponse(containerName, blob, listType, snapshot, + timeout, leaseId, ifTags, requestId, context); + } +} diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/ContainerClient.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/ContainerClient.java new file mode 100644 index 000000000000..0b37ede0118f --- /dev/null +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/ContainerClient.java @@ -0,0 +1,1674 @@ +// 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; + +import com.azure.core.v2.annotation.Generated; +import com.azure.core.v2.annotation.ReturnType; +import com.azure.core.v2.annotation.ServiceClient; +import com.azure.core.v2.annotation.ServiceMethod; +import com.azure.core.v2.http.rest.ResponseBase; +import com.azure.storage.blob.implementation.ContainersImpl; +import com.azure.storage.blob.implementation.models.BlobSignedIdentifierWrapper; +import com.azure.storage.blob.models.BlobContainerEncryptionScope; +import com.azure.storage.blob.models.BlobSignedIdentifier; +import com.azure.storage.blob.models.ContainersAcquireLeaseHeaders; +import com.azure.storage.blob.models.ContainersBreakLeaseHeaders; +import com.azure.storage.blob.models.ContainersChangeLeaseHeaders; +import com.azure.storage.blob.models.ContainersCreateHeaders; +import com.azure.storage.blob.models.ContainersDeleteHeaders; +import com.azure.storage.blob.models.ContainersFilterBlobsHeaders; +import com.azure.storage.blob.models.ContainersGetAccessPolicyHeaders; +import com.azure.storage.blob.models.ContainersGetAccountInfoHeaders; +import com.azure.storage.blob.models.ContainersGetPropertiesHeaders; +import com.azure.storage.blob.models.ContainersListBlobFlatSegmentHeaders; +import com.azure.storage.blob.models.ContainersListBlobHierarchySegmentHeaders; +import com.azure.storage.blob.models.ContainersReleaseLeaseHeaders; +import com.azure.storage.blob.models.ContainersRenameHeaders; +import com.azure.storage.blob.models.ContainersRenewLeaseHeaders; +import com.azure.storage.blob.models.ContainersRestoreHeaders; +import com.azure.storage.blob.models.ContainersSetAccessPolicyHeaders; +import com.azure.storage.blob.models.ContainersSetMetadataHeaders; +import com.azure.storage.blob.models.ContainersSubmitBatchHeaders; +import com.azure.storage.blob.models.FilterBlobSegment; +import com.azure.storage.blob.models.FilterBlobsIncludeItem; +import com.azure.storage.blob.models.ListBlobsFlatSegmentResponse; +import com.azure.storage.blob.models.ListBlobsHierarchySegmentResponse; +import com.azure.storage.blob.models.ListBlobsIncludeItem; +import com.azure.storage.blob.models.PublicAccessType; +import com.azure.storage.blob.models.StorageErrorException; +import io.clientcore.core.http.models.Response; +import io.clientcore.core.util.Context; +import io.clientcore.core.util.binarydata.BinaryData; +import java.io.InputStream; +import java.time.OffsetDateTime; +import java.util.List; +import java.util.Map; + +/** + * Initializes a new instance of the synchronous AzureBlobStorage type. + */ +@ServiceClient(builder = AzureBlobStorageBuilder.class) +public final class ContainerClient { + @Generated + private final ContainersImpl serviceClient; + + /** + * Initializes an instance of ContainerClient class. + * + * @param serviceClient the service client implementation. + */ + @Generated + ContainerClient(ContainersImpl serviceClient) { + this.serviceClient = serviceClient; + } + + /** + * creates a new container under the specified account. If the container with the same name already exists, the + * operation fails. + * + * @param containerName The container name. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param metadata Optional. Specifies a user-defined name-value pair associated with the blob. If no name-value + * pairs are specified, the operation will copy the metadata from the source blob or file to the destination blob. + * If one or more name-value pairs are specified, the destination blob is created with the specified metadata, and + * metadata is not copied from the source blob or file. Note that beginning with version 2009-09-19, metadata names + * must adhere to the naming rules for C# identifiers. See Naming and Referencing Containers, Blobs, and Metadata + * for more information. + * @param access Specifies whether data in the container may be accessed publicly and the level of access. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param blobContainerEncryptionScope Parameter group. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws StorageErrorException thrown if 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(String containerName, Integer timeout, + Map metadata, PublicAccessType access, String requestId, + BlobContainerEncryptionScope blobContainerEncryptionScope, Context context) { + return this.serviceClient.createWithResponse(containerName, timeout, metadata, access, requestId, + blobContainerEncryptionScope, context); + } + + /** + * creates a new container under the specified account. If the container with the same name already exists, the + * operation fails. + * + * @param containerName The container name. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param metadata Optional. Specifies a user-defined name-value pair associated with the blob. If no name-value + * pairs are specified, the operation will copy the metadata from the source blob or file to the destination blob. + * If one or more name-value pairs are specified, the destination blob is created with the specified metadata, and + * metadata is not copied from the source blob or file. Note that beginning with version 2009-09-19, metadata names + * must adhere to the naming rules for C# identifiers. See Naming and Referencing Containers, Blobs, and Metadata + * for more information. + * @param access Specifies whether data in the container may be accessed publicly and the level of access. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param blobContainerEncryptionScope Parameter group. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws StorageErrorException 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(String containerName, Integer timeout, Map metadata, PublicAccessType access, + String requestId, BlobContainerEncryptionScope blobContainerEncryptionScope) { + this.serviceClient.create(containerName, timeout, metadata, access, requestId, blobContainerEncryptionScope); + } + + /** + * creates a new container under the specified account. If the container with the same name already exists, the + * operation fails. + * + * @param containerName The container name. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param metadata Optional. Specifies a user-defined name-value pair associated with the blob. If no name-value + * pairs are specified, the operation will copy the metadata from the source blob or file to the destination blob. + * If one or more name-value pairs are specified, the destination blob is created with the specified metadata, and + * metadata is not copied from the source blob or file. Note that beginning with version 2009-09-19, metadata names + * must adhere to the naming rules for C# identifiers. See Naming and Referencing Containers, Blobs, and Metadata + * for more information. + * @param access Specifies whether data in the container may be accessed publicly and the level of access. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param blobContainerEncryptionScope Parameter group. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws StorageErrorException 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 Response createNoCustomHeadersWithResponse(String containerName, Integer timeout, + Map metadata, PublicAccessType access, String requestId, + BlobContainerEncryptionScope blobContainerEncryptionScope, Context context) { + return this.serviceClient.createNoCustomHeadersWithResponse(containerName, timeout, metadata, access, requestId, + blobContainerEncryptionScope, context); + } + + /** + * returns all user-defined metadata and system properties for the specified container. The data returned does not + * include the container's list of blobs. + * + * @param containerName The container name. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws StorageErrorException thrown if 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 containerName, + Integer timeout, String leaseId, String requestId, Context context) { + return this.serviceClient.getPropertiesWithResponse(containerName, timeout, leaseId, requestId, context); + } + + /** + * returns all user-defined metadata and system properties for the specified container. The data returned does not + * include the container's list of blobs. + * + * @param containerName The container name. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws StorageErrorException 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 containerName, Integer timeout, String leaseId, String requestId) { + this.serviceClient.getProperties(containerName, timeout, leaseId, requestId); + } + + /** + * returns all user-defined metadata and system properties for the specified container. The data returned does not + * include the container's list of blobs. + * + * @param containerName The container name. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws StorageErrorException 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 Response getPropertiesNoCustomHeadersWithResponse(String containerName, Integer timeout, + String leaseId, String requestId, Context context) { + return this.serviceClient.getPropertiesNoCustomHeadersWithResponse(containerName, timeout, leaseId, requestId, + context); + } + + /** + * operation marks the specified container for deletion. The container and any blobs contained within it are later + * deleted during garbage collection. + * + * @param containerName The container name. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @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 StorageErrorException thrown if 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 containerName, Integer timeout, + String leaseId, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String requestId, + Context context) { + return this.serviceClient.deleteWithResponse(containerName, timeout, leaseId, ifModifiedSince, + ifUnmodifiedSince, requestId, context); + } + + /** + * operation marks the specified container for deletion. The container and any blobs contained within it are later + * deleted during garbage collection. + * + * @param containerName The container name. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @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 StorageErrorException 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 containerName, Integer timeout, String leaseId, OffsetDateTime ifModifiedSince, + OffsetDateTime ifUnmodifiedSince, String requestId) { + this.serviceClient.delete(containerName, timeout, leaseId, ifModifiedSince, ifUnmodifiedSince, requestId); + } + + /** + * operation marks the specified container for deletion. The container and any blobs contained within it are later + * deleted during garbage collection. + * + * @param containerName The container name. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the + * specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since + * the specified date/time. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws StorageErrorException 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 Response deleteNoCustomHeadersWithResponse(String containerName, Integer timeout, String leaseId, + OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String requestId, Context context) { + return this.serviceClient.deleteNoCustomHeadersWithResponse(containerName, timeout, leaseId, ifModifiedSince, + ifUnmodifiedSince, requestId, context); + } + + /** + * operation sets one or more user-defined name-value pairs for the specified container. + * + * @param containerName The container name. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param metadata Optional. Specifies a user-defined name-value pair associated with the blob. If no name-value + * pairs are specified, the operation will copy the metadata from the source blob or file to the destination blob. + * If one or more name-value pairs are specified, the destination blob is created with the specified metadata, and + * metadata is not copied from the source blob or file. Note that beginning with version 2009-09-19, metadata names + * must adhere to the naming rules for C# identifiers. See Naming and Referencing Containers, Blobs, and Metadata + * for more information. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the + * specified date/time. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws StorageErrorException thrown if 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(String containerName, + Integer timeout, String leaseId, Map metadata, OffsetDateTime ifModifiedSince, String requestId, + Context context) { + return this.serviceClient.setMetadataWithResponse(containerName, timeout, leaseId, metadata, ifModifiedSince, + requestId, context); + } + + /** + * operation sets one or more user-defined name-value pairs for the specified container. + * + * @param containerName The container name. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param metadata Optional. Specifies a user-defined name-value pair associated with the blob. If no name-value + * pairs are specified, the operation will copy the metadata from the source blob or file to the destination blob. + * If one or more name-value pairs are specified, the destination blob is created with the specified metadata, and + * metadata is not copied from the source blob or file. Note that beginning with version 2009-09-19, metadata names + * must adhere to the naming rules for C# identifiers. See Naming and Referencing Containers, Blobs, and Metadata + * for more information. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the + * specified date/time. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws StorageErrorException 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(String containerName, Integer timeout, String leaseId, Map metadata, + OffsetDateTime ifModifiedSince, String requestId) { + this.serviceClient.setMetadata(containerName, timeout, leaseId, metadata, ifModifiedSince, requestId); + } + + /** + * operation sets one or more user-defined name-value pairs for the specified container. + * + * @param containerName The container name. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param metadata Optional. Specifies a user-defined name-value pair associated with the blob. If no name-value + * pairs are specified, the operation will copy the metadata from the source blob or file to the destination blob. + * If one or more name-value pairs are specified, the destination blob is created with the specified metadata, and + * metadata is not copied from the source blob or file. Note that beginning with version 2009-09-19, metadata names + * must adhere to the naming rules for C# identifiers. See Naming and Referencing Containers, Blobs, and Metadata + * for more information. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the + * specified date/time. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws StorageErrorException 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 Response setMetadataNoCustomHeadersWithResponse(String containerName, Integer timeout, String leaseId, + Map metadata, OffsetDateTime ifModifiedSince, String requestId, Context context) { + return this.serviceClient.setMetadataNoCustomHeadersWithResponse(containerName, timeout, leaseId, metadata, + ifModifiedSince, requestId, context); + } + + /** + * gets the permissions for the specified container. The permissions indicate whether container data may be accessed + * publicly. + * + * @param containerName The container name. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws StorageErrorException 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( + String containerName, Integer timeout, String leaseId, String requestId, Context context) { + return this.serviceClient.getAccessPolicyWithResponse(containerName, timeout, leaseId, requestId, context); + } + + /** + * gets the permissions for the specified container. The permissions indicate whether container data may be accessed + * publicly. + * + * @param containerName The container name. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws StorageErrorException 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 BlobSignedIdentifierWrapper getAccessPolicy(String containerName, Integer timeout, String leaseId, + String requestId) { + return this.serviceClient.getAccessPolicy(containerName, timeout, leaseId, requestId); + } + + /** + * gets the permissions for the specified container. The permissions indicate whether container data may be accessed + * publicly. + * + * @param containerName The container name. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws StorageErrorException 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 Response getAccessPolicyNoCustomHeadersWithResponse(String containerName, + Integer timeout, String leaseId, String requestId, Context context) { + return this.serviceClient.getAccessPolicyNoCustomHeadersWithResponse(containerName, timeout, leaseId, requestId, + context); + } + + /** + * sets the permissions for the specified container. The permissions indicate whether blobs in a container may be + * accessed publicly. + * + * @param containerName The container name. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param access Specifies whether data in the container may be accessed publicly and the level of access. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the + * specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since + * the specified date/time. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param containerAcl the acls for the container. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws StorageErrorException thrown if 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(String containerName, + Integer timeout, String leaseId, PublicAccessType access, OffsetDateTime ifModifiedSince, + OffsetDateTime ifUnmodifiedSince, String requestId, List containerAcl, Context context) { + return this.serviceClient.setAccessPolicyWithResponse(containerName, timeout, leaseId, access, ifModifiedSince, + ifUnmodifiedSince, requestId, containerAcl, context); + } + + /** + * sets the permissions for the specified container. The permissions indicate whether blobs in a container may be + * accessed publicly. + * + * @param containerName The container name. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param access Specifies whether data in the container may be accessed publicly and the level of access. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the + * specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since + * the specified date/time. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param containerAcl the acls for the container. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws StorageErrorException 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(String containerName, Integer timeout, String leaseId, PublicAccessType access, + OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String requestId, + List containerAcl) { + this.serviceClient.setAccessPolicy(containerName, timeout, leaseId, access, ifModifiedSince, ifUnmodifiedSince, + requestId, containerAcl); + } + + /** + * sets the permissions for the specified container. The permissions indicate whether blobs in a container may be + * accessed publicly. + * + * @param containerName The container name. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param access Specifies whether data in the container may be accessed publicly and the level of access. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the + * specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since + * the specified date/time. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param containerAcl the acls for the container. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws StorageErrorException 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 Response setAccessPolicyNoCustomHeadersWithResponse(String containerName, Integer timeout, + String leaseId, PublicAccessType access, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, + String requestId, List containerAcl, Context context) { + return this.serviceClient.setAccessPolicyNoCustomHeadersWithResponse(containerName, timeout, leaseId, access, + ifModifiedSince, ifUnmodifiedSince, requestId, containerAcl, context); + } + + /** + * Restores a previously-deleted container. + * + * @param containerName The container name. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param requestId Provides a 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 StorageErrorException thrown if 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 containerName, Integer timeout, + String requestId, String deletedContainerName, String deletedContainerVersion, Context context) { + return this.serviceClient.restoreWithResponse(containerName, timeout, requestId, deletedContainerName, + deletedContainerVersion, context); + } + + /** + * Restores a previously-deleted container. + * + * @param containerName The container name. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param requestId Provides a 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 StorageErrorException 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 containerName, Integer timeout, String requestId, String deletedContainerName, + String deletedContainerVersion) { + this.serviceClient.restore(containerName, timeout, requestId, deletedContainerName, deletedContainerVersion); + } + + /** + * Restores a previously-deleted container. + * + * @param containerName The container name. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param deletedContainerName Optional. Version 2019-12-12 and later. Specifies the name of the deleted container + * to restore. + * @param deletedContainerVersion Optional. Version 2019-12-12 and later. Specifies the version of the deleted + * container to restore. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws StorageErrorException 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 Response restoreNoCustomHeadersWithResponse(String containerName, Integer timeout, String requestId, + String deletedContainerName, String deletedContainerVersion, Context context) { + return this.serviceClient.restoreNoCustomHeadersWithResponse(containerName, timeout, requestId, + deletedContainerName, deletedContainerVersion, context); + } + + /** + * Renames an existing container. + * + * @param containerName The container name. + * @param sourceContainerName Required. Specifies the name of the container to rename. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param sourceLeaseId A lease ID for the source path. If specified, the source path must have an active lease and + * the lease ID must match. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws StorageErrorException thrown if 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 containerName, + String sourceContainerName, Integer timeout, String requestId, String sourceLeaseId, Context context) { + return this.serviceClient.renameWithResponse(containerName, sourceContainerName, timeout, requestId, + sourceLeaseId, context); + } + + /** + * Renames an existing container. + * + * @param containerName The container name. + * @param sourceContainerName Required. Specifies the name of the container to rename. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param sourceLeaseId A lease ID for the source path. If specified, the source path must have an active lease and + * the lease ID must match. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws StorageErrorException 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 containerName, String sourceContainerName, Integer timeout, String requestId, + String sourceLeaseId) { + this.serviceClient.rename(containerName, sourceContainerName, timeout, requestId, sourceLeaseId); + } + + /** + * Renames an existing container. + * + * @param containerName The container name. + * @param sourceContainerName Required. Specifies the name of the container to rename. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param sourceLeaseId A lease ID for the source path. If specified, the source path must have an active lease and + * the lease ID must match. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws StorageErrorException 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 Response renameNoCustomHeadersWithResponse(String containerName, String sourceContainerName, + Integer timeout, String requestId, String sourceLeaseId, Context context) { + return this.serviceClient.renameNoCustomHeadersWithResponse(containerName, sourceContainerName, timeout, + requestId, sourceLeaseId, context); + } + + /** + * The Batch operation allows multiple API calls to be embedded into a single HTTP request. + * + * @param containerName The container name. + * @param contentLength The length of the request. + * @param multipartContentType Required. The value of this header must be multipart/mixed with a batch boundary. + * Example header value: multipart/mixed; boundary=batch_<GUID>. + * @param body Initial data. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws StorageErrorException 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 submitBatchWithResponse(String containerName, + long contentLength, String multipartContentType, BinaryData body, Integer timeout, String requestId, + Context context) { + return this.serviceClient.submitBatchWithResponse(containerName, contentLength, multipartContentType, body, + timeout, requestId, context); + } + + /** + * The Batch operation allows multiple API calls to be embedded into a single HTTP request. + * + * @param containerName The container name. + * @param contentLength The length of the request. + * @param multipartContentType Required. The value of this header must be multipart/mixed with a batch boundary. + * Example header value: multipart/mixed; boundary=batch_<GUID>. + * @param body Initial data. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws StorageErrorException 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 InputStream submitBatch(String containerName, long contentLength, String multipartContentType, + BinaryData body, Integer timeout, String requestId) { + return this.serviceClient.submitBatch(containerName, contentLength, multipartContentType, body, timeout, + requestId); + } + + /** + * The Batch operation allows multiple API calls to be embedded into a single HTTP request. + * + * @param containerName The container name. + * @param contentLength The length of the request. + * @param multipartContentType Required. The value of this header must be multipart/mixed with a batch boundary. + * Example header value: multipart/mixed; boundary=batch_<GUID>. + * @param body Initial data. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws StorageErrorException 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 Response submitBatchNoCustomHeadersWithResponse(String containerName, long contentLength, + String multipartContentType, BinaryData body, Integer timeout, String requestId, Context context) { + return this.serviceClient.submitBatchNoCustomHeadersWithResponse(containerName, contentLength, + multipartContentType, body, timeout, requestId, context); + } + + /** + * The Filter Blobs operation enables callers to list blobs in a container whose tags match a given search + * expression. Filter blobs searches within the given container. + * + * @param containerName The container name. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param where Filters the results to return only to return only blobs whose tags match the specified expression. + * @param marker A string value that identifies the portion of the list of containers to be returned with the next + * listing operation. The operation returns the NextMarker value within the response body if the listing operation + * did not return all containers remaining to be listed with the current page. The NextMarker value can be used as + * the value for the marker parameter in a subsequent call to request the next page of list items. The marker value + * is opaque to the client. + * @param maxresults Specifies the maximum number of containers to return. If the request does not specify + * maxresults, or specifies a value greater than 5000, the server will return up to 5000 items. Note that if the + * listing operation crosses a partition boundary, then the service will return a continuation token for retrieving + * the remainder of the results. For this reason, it is possible that the service will return fewer results than + * specified by maxresults, or than the default of 5000. + * @param include Include this parameter to specify one or more datasets to include in the response. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws StorageErrorException 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}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public ResponseBase filterBlobsWithResponse(String containerName, + Integer timeout, String requestId, String where, String marker, Integer maxresults, + List include, Context context) { + return this.serviceClient.filterBlobsWithResponse(containerName, timeout, requestId, where, marker, maxresults, + include, context); + } + + /** + * The Filter Blobs operation enables callers to list blobs in a container whose tags match a given search + * expression. Filter blobs searches within the given container. + * + * @param containerName The container name. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param where Filters the results to return only to return only blobs whose tags match the specified expression. + * @param marker A string value that identifies the portion of the list of containers to be returned with the next + * listing operation. The operation returns the NextMarker value within the response body if the listing operation + * did not return all containers remaining to be listed with the current page. The NextMarker value can be used as + * the value for the marker parameter in a subsequent call to request the next page of list items. The marker value + * is opaque to the client. + * @param maxresults Specifies the maximum number of containers to return. If the request does not specify + * maxresults, or specifies a value greater than 5000, the server will return up to 5000 items. Note that if the + * listing operation crosses a partition boundary, then the service will return a continuation token for retrieving + * the remainder of the results. For this reason, it is possible that the service will return fewer results than + * specified by maxresults, or than the default of 5000. + * @param include Include this parameter to specify one or more datasets to include in the response. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws StorageErrorException 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. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public FilterBlobSegment filterBlobs(String containerName, Integer timeout, String requestId, String where, + String marker, Integer maxresults, List include) { + return this.serviceClient.filterBlobs(containerName, timeout, requestId, where, marker, maxresults, include); + } + + /** + * The Filter Blobs operation enables callers to list blobs in a container whose tags match a given search + * expression. Filter blobs searches within the given container. + * + * @param containerName The container name. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param where Filters the results to return only to return only blobs whose tags match the specified expression. + * @param marker A string value that identifies the portion of the list of containers to be returned with the next + * listing operation. The operation returns the NextMarker value within the response body if the listing operation + * did not return all containers remaining to be listed with the current page. The NextMarker value can be used as + * the value for the marker parameter in a subsequent call to request the next page of list items. The marker value + * is opaque to the client. + * @param maxresults Specifies the maximum number of containers to return. If the request does not specify + * maxresults, or specifies a value greater than 5000, the server will return up to 5000 items. Note that if the + * listing operation crosses a partition boundary, then the service will return a continuation token for retrieving + * the remainder of the results. For this reason, it is possible that the service will return fewer results than + * specified by maxresults, or than the default of 5000. + * @param include Include this parameter to specify one or more datasets to include in the response. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws StorageErrorException 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. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Response filterBlobsNoCustomHeadersWithResponse(String containerName, Integer timeout, + String requestId, String where, String marker, Integer maxresults, List include, + Context context) { + return this.serviceClient.filterBlobsNoCustomHeadersWithResponse(containerName, timeout, requestId, where, + marker, maxresults, include, context); + } + + /** + * [Update] establishes and manages a lock on a container for delete operations. The lock duration can be 15 to 60 + * seconds, or can be infinite. + * + * @param containerName The container name. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param 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 StorageErrorException thrown if 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(String containerName, + Integer timeout, Integer duration, String proposedLeaseId, OffsetDateTime ifModifiedSince, + OffsetDateTime ifUnmodifiedSince, String requestId, Context context) { + return this.serviceClient.acquireLeaseWithResponse(containerName, timeout, duration, proposedLeaseId, + ifModifiedSince, ifUnmodifiedSince, requestId, context); + } + + /** + * [Update] establishes and manages a lock on a container for delete operations. The lock duration can be 15 to 60 + * seconds, or can be infinite. + * + * @param containerName The container name. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param 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 StorageErrorException 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(String containerName, Integer timeout, Integer duration, String proposedLeaseId, + OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String requestId) { + this.serviceClient.acquireLease(containerName, timeout, duration, proposedLeaseId, ifModifiedSince, + ifUnmodifiedSince, requestId); + } + + /** + * [Update] establishes and manages a lock on a container for delete operations. The lock duration can be 15 to 60 + * seconds, or can be infinite. + * + * @param containerName The container name. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param duration Specifies the duration of the lease, in seconds, or negative one (-1) for a lease that never + * expires. A non-infinite lease can be between 15 and 60 seconds. A lease duration cannot be changed using renew or + * change. + * @param proposedLeaseId Proposed lease ID, in a GUID string format. The Blob service returns 400 (Invalid request) + * if the proposed lease ID is not in the correct format. See Guid Constructor (String) for a list of valid GUID + * string formats. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the + * specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since + * the specified date/time. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws StorageErrorException 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 Response acquireLeaseNoCustomHeadersWithResponse(String containerName, Integer timeout, + Integer duration, String proposedLeaseId, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, + String requestId, Context context) { + return this.serviceClient.acquireLeaseNoCustomHeadersWithResponse(containerName, timeout, duration, + proposedLeaseId, ifModifiedSince, ifUnmodifiedSince, requestId, context); + } + + /** + * [Update] establishes and manages a lock on a container for delete operations. The lock duration can be 15 to 60 + * seconds, or can be infinite. + * + * @param containerName The container name. + * @param leaseId Specifies the current lease ID on the resource. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the + * specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since + * the specified date/time. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws StorageErrorException thrown if 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 containerName, + String leaseId, Integer timeout, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, + String requestId, Context context) { + return this.serviceClient.releaseLeaseWithResponse(containerName, leaseId, timeout, ifModifiedSince, + ifUnmodifiedSince, requestId, context); + } + + /** + * [Update] establishes and manages a lock on a container for delete operations. The lock duration can be 15 to 60 + * seconds, or can be infinite. + * + * @param containerName The container name. + * @param leaseId Specifies the current lease ID on the resource. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the + * specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since + * the specified date/time. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws StorageErrorException 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 containerName, String leaseId, Integer timeout, OffsetDateTime ifModifiedSince, + OffsetDateTime ifUnmodifiedSince, String requestId) { + this.serviceClient.releaseLease(containerName, leaseId, timeout, ifModifiedSince, ifUnmodifiedSince, requestId); + } + + /** + * [Update] establishes and manages a lock on a container for delete operations. The lock duration can be 15 to 60 + * seconds, or can be infinite. + * + * @param containerName The container name. + * @param leaseId Specifies the current lease ID on the resource. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the + * specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since + * the specified date/time. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws StorageErrorException 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 Response releaseLeaseNoCustomHeadersWithResponse(String containerName, String leaseId, Integer timeout, + OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String requestId, Context context) { + return this.serviceClient.releaseLeaseNoCustomHeadersWithResponse(containerName, leaseId, timeout, + ifModifiedSince, ifUnmodifiedSince, requestId, context); + } + + /** + * [Update] establishes and manages a lock on a container for delete operations. The lock duration can be 15 to 60 + * seconds, or can be infinite. + * + * @param containerName The container name. + * @param leaseId Specifies the current lease ID on the resource. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the + * specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since + * the specified date/time. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws StorageErrorException thrown if 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 containerName, String leaseId, + Integer timeout, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String requestId, + Context context) { + return this.serviceClient.renewLeaseWithResponse(containerName, leaseId, timeout, ifModifiedSince, + ifUnmodifiedSince, requestId, context); + } + + /** + * [Update] establishes and manages a lock on a container for delete operations. The lock duration can be 15 to 60 + * seconds, or can be infinite. + * + * @param containerName The container name. + * @param leaseId Specifies the current lease ID on the resource. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the + * specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since + * the specified date/time. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws StorageErrorException 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 containerName, String leaseId, Integer timeout, OffsetDateTime ifModifiedSince, + OffsetDateTime ifUnmodifiedSince, String requestId) { + this.serviceClient.renewLease(containerName, leaseId, timeout, ifModifiedSince, ifUnmodifiedSince, requestId); + } + + /** + * [Update] establishes and manages a lock on a container for delete operations. The lock duration can be 15 to 60 + * seconds, or can be infinite. + * + * @param containerName The container name. + * @param leaseId Specifies the current lease ID on the resource. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the + * specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since + * the specified date/time. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws StorageErrorException 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 Response renewLeaseNoCustomHeadersWithResponse(String containerName, String leaseId, Integer timeout, + OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String requestId, Context context) { + return this.serviceClient.renewLeaseNoCustomHeadersWithResponse(containerName, leaseId, timeout, + ifModifiedSince, ifUnmodifiedSince, requestId, context); + } + + /** + * [Update] establishes and manages a lock on a container for delete operations. The lock duration can be 15 to 60 + * seconds, or can be infinite. + * + * @param containerName The container name. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param breakPeriod For a break operation, proposed duration the lease should continue before it is broken, in + * seconds, between 0 and 60. This break period is only used if it is shorter than the time remaining on the lease. + * If longer, the time remaining on the lease is used. A new lease will not be available before the break period has + * expired, but the lease may be held for longer than the break period. If this header does not appear with a break + * operation, a fixed-duration lease breaks after the remaining lease period elapses, and an infinite lease breaks + * immediately. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the + * specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since + * the specified date/time. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws StorageErrorException thrown if 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(String containerName, Integer timeout, + Integer breakPeriod, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String requestId, + Context context) { + return this.serviceClient.breakLeaseWithResponse(containerName, timeout, breakPeriod, ifModifiedSince, + ifUnmodifiedSince, requestId, context); + } + + /** + * [Update] establishes and manages a lock on a container for delete operations. The lock duration can be 15 to 60 + * seconds, or can be infinite. + * + * @param containerName The container name. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param breakPeriod For a break operation, proposed duration the lease should continue before it is broken, in + * seconds, between 0 and 60. This break period is only used if it is shorter than the time remaining on the lease. + * If longer, the time remaining on the lease is used. A new lease will not be available before the break period has + * expired, but the lease may be held for longer than the break period. If this header does not appear with a break + * operation, a fixed-duration lease breaks after the remaining lease period elapses, and an infinite lease breaks + * immediately. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the + * specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since + * the specified date/time. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws StorageErrorException 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(String containerName, Integer timeout, Integer breakPeriod, OffsetDateTime ifModifiedSince, + OffsetDateTime ifUnmodifiedSince, String requestId) { + this.serviceClient.breakLease(containerName, timeout, breakPeriod, ifModifiedSince, ifUnmodifiedSince, + requestId); + } + + /** + * [Update] establishes and manages a lock on a container for delete operations. The lock duration can be 15 to 60 + * seconds, or can be infinite. + * + * @param containerName The container name. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param breakPeriod For a break operation, proposed duration the lease should continue before it is broken, in + * seconds, between 0 and 60. This break period is only used if it is shorter than the time remaining on the lease. + * If longer, the time remaining on the lease is used. A new lease will not be available before the break period has + * expired, but the lease may be held for longer than the break period. If this header does not appear with a break + * operation, a fixed-duration lease breaks after the remaining lease period elapses, and an infinite lease breaks + * immediately. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the + * specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since + * the specified date/time. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws StorageErrorException 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 Response breakLeaseNoCustomHeadersWithResponse(String containerName, Integer timeout, + Integer breakPeriod, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String requestId, + Context context) { + return this.serviceClient.breakLeaseNoCustomHeadersWithResponse(containerName, timeout, breakPeriod, + ifModifiedSince, ifUnmodifiedSince, requestId, context); + } + + /** + * [Update] establishes and manages a lock on a container for delete operations. The lock duration can be 15 to 60 + * seconds, or can be infinite. + * + * @param containerName The container name. + * @param leaseId Specifies the current lease ID on the resource. + * @param proposedLeaseId Proposed lease ID, in a GUID string format. The Blob service returns 400 (Invalid request) + * if the proposed lease ID is not in the correct format. See Guid Constructor (String) for a list of valid GUID + * string formats. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the + * specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since + * the specified date/time. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws StorageErrorException thrown if 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 containerName, + String leaseId, String proposedLeaseId, Integer timeout, OffsetDateTime ifModifiedSince, + OffsetDateTime ifUnmodifiedSince, String requestId, Context context) { + return this.serviceClient.changeLeaseWithResponse(containerName, leaseId, proposedLeaseId, timeout, + ifModifiedSince, ifUnmodifiedSince, requestId, context); + } + + /** + * [Update] establishes and manages a lock on a container for delete operations. The lock duration can be 15 to 60 + * seconds, or can be infinite. + * + * @param containerName The container name. + * @param leaseId Specifies the current lease ID on the resource. + * @param proposedLeaseId Proposed lease ID, in a GUID string format. The Blob service returns 400 (Invalid request) + * if the proposed lease ID is not in the correct format. See Guid Constructor (String) for a list of valid GUID + * string formats. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the + * specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since + * the specified date/time. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws StorageErrorException 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 containerName, String leaseId, String proposedLeaseId, Integer timeout, + OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String requestId) { + this.serviceClient.changeLease(containerName, leaseId, proposedLeaseId, timeout, ifModifiedSince, + ifUnmodifiedSince, requestId); + } + + /** + * [Update] establishes and manages a lock on a container for delete operations. The lock duration can be 15 to 60 + * seconds, or can be infinite. + * + * @param containerName The container name. + * @param leaseId Specifies the current lease ID on the resource. + * @param proposedLeaseId Proposed lease ID, in a GUID string format. The Blob service returns 400 (Invalid request) + * if the proposed lease ID is not in the correct format. See Guid Constructor (String) for a list of valid GUID + * string formats. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the + * specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since + * the specified date/time. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws StorageErrorException 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 Response changeLeaseNoCustomHeadersWithResponse(String containerName, String leaseId, + String proposedLeaseId, Integer timeout, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, + String requestId, Context context) { + return this.serviceClient.changeLeaseNoCustomHeadersWithResponse(containerName, leaseId, proposedLeaseId, + timeout, ifModifiedSince, ifUnmodifiedSince, requestId, context); + } + + /** + * [Update] The List Blobs operation returns a list of the blobs under the specified container. + * + * @param containerName The container name. + * @param prefix Filters the results to return only containers whose name begins with the specified prefix. + * @param marker A string value that identifies the portion of the list of containers to be returned with the next + * listing operation. The operation returns the NextMarker value within the response body if the listing operation + * did not return all containers remaining to be listed with the current page. The NextMarker value can be used as + * the value for the marker parameter in a subsequent call to request the next page of list items. The marker value + * is opaque to the client. + * @param maxresults Specifies the maximum number of containers to return. If the request does not specify + * maxresults, or specifies a value greater than 5000, the server will return up to 5000 items. Note that if the + * listing operation crosses a partition boundary, then the service will return a continuation token for retrieving + * the remainder of the results. For this reason, it is possible that the service will return fewer results than + * specified by maxresults, or than the default of 5000. + * @param include Include this parameter to specify one or more datasets to include in the response. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws StorageErrorException 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}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public ResponseBase + listBlobFlatSegmentWithResponse(String containerName, String prefix, String marker, Integer maxresults, + List include, Integer timeout, String requestId, Context context) { + return this.serviceClient.listBlobFlatSegmentWithResponse(containerName, prefix, marker, maxresults, include, + timeout, requestId, context); + } + + /** + * [Update] The List Blobs operation returns a list of the blobs under the specified container. + * + * @param containerName The container name. + * @param prefix Filters the results to return only containers whose name begins with the specified prefix. + * @param marker A string value that identifies the portion of the list of containers to be returned with the next + * listing operation. The operation returns the NextMarker value within the response body if the listing operation + * did not return all containers remaining to be listed with the current page. The NextMarker value can be used as + * the value for the marker parameter in a subsequent call to request the next page of list items. The marker value + * is opaque to the client. + * @param maxresults Specifies the maximum number of containers to return. If the request does not specify + * maxresults, or specifies a value greater than 5000, the server will return up to 5000 items. Note that if the + * listing operation crosses a partition boundary, then the service will return a continuation token for retrieving + * the remainder of the results. For this reason, it is possible that the service will return fewer results than + * specified by maxresults, or than the default of 5000. + * @param include Include this parameter to specify one or more datasets to include in the response. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws StorageErrorException 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. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public ListBlobsFlatSegmentResponse listBlobFlatSegment(String containerName, String prefix, String marker, + Integer maxresults, List include, Integer timeout, String requestId) { + return this.serviceClient.listBlobFlatSegment(containerName, prefix, marker, maxresults, include, timeout, + requestId); + } + + /** + * [Update] The List Blobs operation returns a list of the blobs under the specified container. + * + * @param containerName The container name. + * @param prefix Filters the results to return only containers whose name begins with the specified prefix. + * @param marker A string value that identifies the portion of the list of containers to be returned with the next + * listing operation. The operation returns the NextMarker value within the response body if the listing operation + * did not return all containers remaining to be listed with the current page. The NextMarker value can be used as + * the value for the marker parameter in a subsequent call to request the next page of list items. The marker value + * is opaque to the client. + * @param maxresults Specifies the maximum number of containers to return. If the request does not specify + * maxresults, or specifies a value greater than 5000, the server will return up to 5000 items. Note that if the + * listing operation crosses a partition boundary, then the service will return a continuation token for retrieving + * the remainder of the results. For this reason, it is possible that the service will return fewer results than + * specified by maxresults, or than the default of 5000. + * @param include Include this parameter to specify one or more datasets to include in the response. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws StorageErrorException 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. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Response listBlobFlatSegmentNoCustomHeadersWithResponse(String containerName, + String prefix, String marker, Integer maxresults, List include, Integer timeout, + String requestId, Context context) { + return this.serviceClient.listBlobFlatSegmentNoCustomHeadersWithResponse(containerName, prefix, marker, + maxresults, include, timeout, requestId, context); + } + + /** + * [Update] The List Blobs operation returns a list of the blobs under the specified container. + * + * @param containerName The container name. + * @param delimiter When the request includes this parameter, the operation returns a BlobPrefix element in the + * response body that acts as a placeholder for all blobs whose names begin with the same substring up to the + * appearance of the delimiter character. The delimiter may be a single character or a string. + * @param prefix Filters the results to return only containers whose name begins with the specified prefix. + * @param marker A string value that identifies the portion of the list of containers to be returned with the next + * listing operation. The operation returns the NextMarker value within the response body if the listing operation + * did not return all containers remaining to be listed with the current page. The NextMarker value can be used as + * the value for the marker parameter in a subsequent call to request the next page of list items. The marker value + * is opaque to the client. + * @param maxresults Specifies the maximum number of containers to return. If the request does not specify + * maxresults, or specifies a value greater than 5000, the server will return up to 5000 items. Note that if the + * listing operation crosses a partition boundary, then the service will return a continuation token for retrieving + * the remainder of the results. For this reason, it is possible that the service will return fewer results than + * specified by maxresults, or than the default of 5000. + * @param include Include this parameter to specify one or more datasets to include in the response. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws StorageErrorException 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}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public ResponseBase + listBlobHierarchySegmentWithResponse(String containerName, String delimiter, String prefix, String marker, + Integer maxresults, List include, Integer timeout, String requestId, + Context context) { + return this.serviceClient.listBlobHierarchySegmentWithResponse(containerName, delimiter, prefix, marker, + maxresults, include, timeout, requestId, context); + } + + /** + * [Update] The List Blobs operation returns a list of the blobs under the specified container. + * + * @param containerName The container name. + * @param delimiter When the request includes this parameter, the operation returns a BlobPrefix element in the + * response body that acts as a placeholder for all blobs whose names begin with the same substring up to the + * appearance of the delimiter character. The delimiter may be a single character or a string. + * @param prefix Filters the results to return only containers whose name begins with the specified prefix. + * @param marker A string value that identifies the portion of the list of containers to be returned with the next + * listing operation. The operation returns the NextMarker value within the response body if the listing operation + * did not return all containers remaining to be listed with the current page. The NextMarker value can be used as + * the value for the marker parameter in a subsequent call to request the next page of list items. The marker value + * is opaque to the client. + * @param maxresults Specifies the maximum number of containers to return. If the request does not specify + * maxresults, or specifies a value greater than 5000, the server will return up to 5000 items. Note that if the + * listing operation crosses a partition boundary, then the service will return a continuation token for retrieving + * the remainder of the results. For this reason, it is possible that the service will return fewer results than + * specified by maxresults, or than the default of 5000. + * @param include Include this parameter to specify one or more datasets to include in the response. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws StorageErrorException 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. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public ListBlobsHierarchySegmentResponse listBlobHierarchySegment(String containerName, String delimiter, + String prefix, String marker, Integer maxresults, List include, Integer timeout, + String requestId) { + return this.serviceClient.listBlobHierarchySegment(containerName, delimiter, prefix, marker, maxresults, + include, timeout, requestId); + } + + /** + * [Update] The List Blobs operation returns a list of the blobs under the specified container. + * + * @param containerName The container name. + * @param delimiter When the request includes this parameter, the operation returns a BlobPrefix element in the + * response body that acts as a placeholder for all blobs whose names begin with the same substring up to the + * appearance of the delimiter character. The delimiter may be a single character or a string. + * @param prefix Filters the results to return only containers whose name begins with the specified prefix. + * @param marker A string value that identifies the portion of the list of containers to be returned with the next + * listing operation. The operation returns the NextMarker value within the response body if the listing operation + * did not return all containers remaining to be listed with the current page. The NextMarker value can be used as + * the value for the marker parameter in a subsequent call to request the next page of list items. The marker value + * is opaque to the client. + * @param maxresults Specifies the maximum number of containers to return. If the request does not specify + * maxresults, or specifies a value greater than 5000, the server will return up to 5000 items. Note that if the + * listing operation crosses a partition boundary, then the service will return a continuation token for retrieving + * the remainder of the results. For this reason, it is possible that the service will return fewer results than + * specified by maxresults, or than the default of 5000. + * @param include Include this parameter to specify one or more datasets to include in the response. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws StorageErrorException 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. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Response listBlobHierarchySegmentNoCustomHeadersWithResponse( + String containerName, String delimiter, String prefix, String marker, Integer maxresults, + List include, Integer timeout, String requestId, Context context) { + return this.serviceClient.listBlobHierarchySegmentNoCustomHeadersWithResponse(containerName, delimiter, prefix, + marker, maxresults, include, timeout, requestId, context); + } + + /** + * Returns the sku name and account kind. + * + * @param containerName The container name. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws StorageErrorException thrown if 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(String containerName, + Integer timeout, String requestId, Context context) { + return this.serviceClient.getAccountInfoWithResponse(containerName, timeout, requestId, context); + } + + /** + * Returns the sku name and account kind. + * + * @param containerName The container name. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws StorageErrorException 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(String containerName, Integer timeout, String requestId) { + this.serviceClient.getAccountInfo(containerName, timeout, requestId); + } + + /** + * Returns the sku name and account kind. + * + * @param containerName The container name. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws StorageErrorException 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 Response getAccountInfoNoCustomHeadersWithResponse(String containerName, Integer timeout, + String requestId, Context context) { + return this.serviceClient.getAccountInfoNoCustomHeadersWithResponse(containerName, timeout, requestId, context); + } +} diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/PageBlobClient.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/PageBlobClient.java new file mode 100644 index 000000000000..64d00ad84a31 --- /dev/null +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/PageBlobClient.java @@ -0,0 +1,1389 @@ +// 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; + +import com.azure.core.v2.annotation.Generated; +import com.azure.core.v2.annotation.ReturnType; +import com.azure.core.v2.annotation.ServiceClient; +import com.azure.core.v2.annotation.ServiceMethod; +import com.azure.core.v2.http.rest.ResponseBase; +import com.azure.storage.blob.implementation.PageBlobsImpl; +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.EncryptionScope; +import com.azure.storage.blob.models.PageBlobsClearPagesHeaders; +import com.azure.storage.blob.models.PageBlobsCopyIncrementalHeaders; +import com.azure.storage.blob.models.PageBlobsCreateHeaders; +import com.azure.storage.blob.models.PageBlobsGetPageRangesDiffHeaders; +import com.azure.storage.blob.models.PageBlobsGetPageRangesHeaders; +import com.azure.storage.blob.models.PageBlobsResizeHeaders; +import com.azure.storage.blob.models.PageBlobsUpdateSequenceNumberHeaders; +import com.azure.storage.blob.models.PageBlobsUploadPagesFromURLHeaders; +import com.azure.storage.blob.models.PageBlobsUploadPagesHeaders; +import com.azure.storage.blob.models.PageList; +import com.azure.storage.blob.models.PremiumPageBlobAccessTier; +import com.azure.storage.blob.models.SequenceNumberActionType; +import com.azure.storage.blob.models.StorageErrorException; +import io.clientcore.core.http.models.Response; +import io.clientcore.core.util.Context; +import io.clientcore.core.util.binarydata.BinaryData; +import java.time.OffsetDateTime; +import java.util.Map; + +/** + * Initializes a new instance of the synchronous AzureBlobStorage type. + */ +@ServiceClient(builder = AzureBlobStorageBuilder.class) +public final class PageBlobClient { + @Generated + private final PageBlobsImpl serviceClient; + + /** + * Initializes an instance of PageBlobClient class. + * + * @param serviceClient the service client implementation. + */ + @Generated + PageBlobClient(PageBlobsImpl serviceClient) { + this.serviceClient = serviceClient; + } + + /** + * The Create operation creates a new page blob. + * + * @param containerName The container name. + * @param blob The blob name. + * @param contentLength The length of the request. + * @param blobContentLength This header specifies the maximum size for the page blob, up to 1 TB. The page blob size + * must be aligned to a 512-byte boundary. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param tier Optional. Indicates the tier to be set on the page blob. + * @param metadata Optional. Specifies a user-defined name-value pair associated with the blob. If no name-value + * pairs are specified, the operation will copy the metadata from the source blob or file to the destination blob. + * If one or more name-value pairs are specified, the destination blob is created with the specified metadata, and + * metadata is not copied from the source blob or file. Note that beginning with version 2009-09-19, metadata names + * must adhere to the naming rules for C# identifiers. See Naming and Referencing Containers, Blobs, and Metadata + * for more information. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the + * specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since + * the specified date/time. + * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. + * @param ifNoneMatch Specify an ETag value to operate only on blobs 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 StorageErrorException thrown if 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(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 this.serviceClient.createWithResponse(containerName, blob, contentLength, blobContentLength, timeout, + tier, metadata, leaseId, ifModifiedSince, ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, + blobSequenceNumber, requestId, blobTagsString, immutabilityPolicyExpiry, immutabilityPolicyMode, legalHold, + blobHttpHeaders, cpkInfo, encryptionScopeParam, 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://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param tier Optional. Indicates the tier to be set on the page blob. + * @param metadata Optional. Specifies a user-defined name-value pair associated with the blob. If no name-value + * pairs are specified, the operation will copy the metadata from the source blob or file to the destination blob. + * If one or more name-value pairs are specified, the destination blob is created with the specified metadata, and + * metadata is not copied from the source blob or file. Note that beginning with version 2009-09-19, metadata names + * must adhere to the naming rules for C# identifiers. See Naming and Referencing Containers, Blobs, and Metadata + * for more information. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the + * specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since + * the specified date/time. + * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. + * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. + * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. + * @param blobSequenceNumber Set for page blobs only. The sequence number is a user-controlled value that you can + * use to track requests. The value of the sequence number must be between 0 and 2^63 - 1. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param blobTagsString Optional. Used to set blob tags in various blob operations. + * @param immutabilityPolicyExpiry Specifies the date time when the blobs immutability policy is set to expire. + * @param immutabilityPolicyMode Specifies the immutability policy mode to set on the blob. + * @param legalHold Specified if a legal hold should be set on the blob. + * @param blobHttpHeaders Parameter group. + * @param cpkInfo Parameter group. + * @param encryptionScopeParam Parameter group. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws StorageErrorException 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(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) { + this.serviceClient.create(containerName, blob, contentLength, blobContentLength, timeout, tier, metadata, + leaseId, ifModifiedSince, ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, blobSequenceNumber, requestId, + blobTagsString, immutabilityPolicyExpiry, immutabilityPolicyMode, legalHold, blobHttpHeaders, cpkInfo, + encryptionScopeParam); + } + + /** + * The Create operation creates a new page blob. + * + * @param containerName The container name. + * @param blob The blob name. + * @param contentLength The length of the request. + * @param blobContentLength This header specifies the maximum size for the page blob, up to 1 TB. The page blob size + * must be aligned to a 512-byte boundary. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param tier Optional. Indicates the tier to be set on the page blob. + * @param metadata Optional. Specifies a user-defined name-value pair associated with the blob. If no name-value + * pairs are specified, the operation will copy the metadata from the source blob or file to the destination blob. + * If one or more name-value pairs are specified, the destination blob is created with the specified metadata, and + * metadata is not copied from the source blob or file. Note that beginning with version 2009-09-19, metadata names + * must adhere to the naming rules for C# identifiers. See Naming and Referencing Containers, Blobs, and Metadata + * for more information. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the + * specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since + * the specified date/time. + * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. + * @param ifNoneMatch Specify an ETag value to operate only on blobs 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 StorageErrorException 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 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) { + return this.serviceClient.createNoCustomHeadersWithResponse(containerName, blob, contentLength, + blobContentLength, timeout, tier, metadata, leaseId, ifModifiedSince, ifUnmodifiedSince, ifMatch, + ifNoneMatch, ifTags, blobSequenceNumber, requestId, blobTagsString, immutabilityPolicyExpiry, + immutabilityPolicyMode, legalHold, blobHttpHeaders, cpkInfo, encryptionScopeParam, context); + } + + /** + * The Upload Pages operation writes a range of pages to a page blob. + * + * @param containerName The container name. + * @param blob The blob name. + * @param contentLength The length of the request. + * @param body Initial data. + * @param transactionalContentMD5 Specify the transactional md5 for the body, to be validated by the service. + * @param transactionalContentCrc64 Specify the transactional crc64 for the body, to be validated by the service. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param range Return only the bytes of the blob in the specified range. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param ifSequenceNumberLessThanOrEqualTo Specify this header value to operate only on a blob if it has a sequence + * number less than or equal to the specified. + * @param ifSequenceNumberLessThan Specify this header value to operate only on a blob if it has a sequence number + * less than the specified. + * @param ifSequenceNumberEqualTo Specify this header value to operate only on a blob if it has the specified + * sequence number. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the + * specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since + * the specified date/time. + * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. + * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. + * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param 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 StorageErrorException thrown if 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(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 this.serviceClient.uploadPagesWithResponse(containerName, blob, contentLength, body, + transactionalContentMD5, transactionalContentCrc64, timeout, range, leaseId, + ifSequenceNumberLessThanOrEqualTo, ifSequenceNumberLessThan, ifSequenceNumberEqualTo, ifModifiedSince, + ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, requestId, structuredBodyType, structuredContentLength, + cpkInfo, encryptionScopeParam, context); + } + + /** + * The Upload Pages operation writes a range of pages to a page blob. + * + * @param containerName The container name. + * @param blob The blob name. + * @param contentLength The length of the request. + * @param body Initial data. + * @param transactionalContentMD5 Specify the transactional md5 for the body, to be validated by the service. + * @param transactionalContentCrc64 Specify the transactional crc64 for the body, to be validated by the service. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param range Return only the bytes of the blob in the specified range. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param ifSequenceNumberLessThanOrEqualTo Specify this header value to operate only on a blob if it has a sequence + * number less than or equal to the specified. + * @param ifSequenceNumberLessThan Specify this header value to operate only on a blob if it has a sequence number + * less than the specified. + * @param ifSequenceNumberEqualTo Specify this header value to operate only on a blob if it has the specified + * sequence number. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the + * specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since + * the specified date/time. + * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. + * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. + * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param 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 StorageErrorException 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(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) { + this.serviceClient.uploadPages(containerName, blob, contentLength, body, transactionalContentMD5, + transactionalContentCrc64, timeout, range, leaseId, ifSequenceNumberLessThanOrEqualTo, + ifSequenceNumberLessThan, ifSequenceNumberEqualTo, ifModifiedSince, ifUnmodifiedSince, ifMatch, ifNoneMatch, + ifTags, requestId, structuredBodyType, structuredContentLength, cpkInfo, encryptionScopeParam); + } + + /** + * The Upload Pages operation writes a range of pages to a page blob. + * + * @param containerName The container name. + * @param blob The blob name. + * @param contentLength The length of the request. + * @param body Initial data. + * @param transactionalContentMD5 Specify the transactional md5 for the body, to be validated by the service. + * @param transactionalContentCrc64 Specify the transactional crc64 for the body, to be validated by the service. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param range Return only the bytes of the blob in the specified range. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param ifSequenceNumberLessThanOrEqualTo Specify this header value to operate only on a blob if it has a sequence + * number less than or equal to the specified. + * @param ifSequenceNumberLessThan Specify this header value to operate only on a blob if it has a sequence number + * less than the specified. + * @param ifSequenceNumberEqualTo Specify this header value to operate only on a blob if it has the specified + * sequence number. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the + * specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since + * the specified date/time. + * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. + * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. + * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param 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 StorageErrorException 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 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) { + return this.serviceClient.uploadPagesNoCustomHeadersWithResponse(containerName, blob, contentLength, body, + transactionalContentMD5, transactionalContentCrc64, timeout, range, leaseId, + ifSequenceNumberLessThanOrEqualTo, ifSequenceNumberLessThan, ifSequenceNumberEqualTo, ifModifiedSince, + ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, requestId, structuredBodyType, structuredContentLength, + cpkInfo, encryptionScopeParam, context); + } + + /** + * The Clear Pages operation clears a set of pages from a page blob. + * + * @param containerName The container name. + * @param blob The blob name. + * @param contentLength The length of the request. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param range Return only the bytes of the blob in the specified range. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param ifSequenceNumberLessThanOrEqualTo Specify this header value to operate only on a blob if it has a sequence + * number less than or equal to the specified. + * @param ifSequenceNumberLessThan Specify this header value to operate only on a blob if it has a sequence number + * less than the specified. + * @param ifSequenceNumberEqualTo Specify this header value to operate only on a blob if it has the specified + * sequence number. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the + * specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since + * the specified date/time. + * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. + * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. + * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param cpkInfo Parameter group. + * @param encryptionScopeParam Parameter group. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws StorageErrorException thrown if 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 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 this.serviceClient.clearPagesWithResponse(containerName, blob, contentLength, timeout, range, leaseId, + ifSequenceNumberLessThanOrEqualTo, ifSequenceNumberLessThan, ifSequenceNumberEqualTo, ifModifiedSince, + ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, requestId, cpkInfo, encryptionScopeParam, context); + } + + /** + * The Clear Pages operation clears a set of pages from a page blob. + * + * @param containerName The container name. + * @param blob The blob name. + * @param contentLength The length of the request. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param range Return only the bytes of the blob in the specified range. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param ifSequenceNumberLessThanOrEqualTo Specify this header value to operate only on a blob if it has a sequence + * number less than or equal to the specified. + * @param ifSequenceNumberLessThan Specify this header value to operate only on a blob if it has a sequence number + * less than the specified. + * @param ifSequenceNumberEqualTo Specify this header value to operate only on a blob if it has the specified + * sequence number. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the + * specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since + * the specified date/time. + * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. + * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. + * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param cpkInfo Parameter group. + * @param encryptionScopeParam Parameter group. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws StorageErrorException 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 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) { + this.serviceClient.clearPages(containerName, blob, contentLength, timeout, range, leaseId, + ifSequenceNumberLessThanOrEqualTo, ifSequenceNumberLessThan, ifSequenceNumberEqualTo, ifModifiedSince, + ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, requestId, cpkInfo, encryptionScopeParam); + } + + /** + * The Clear Pages operation clears a set of pages from a page blob. + * + * @param containerName The container name. + * @param blob The blob name. + * @param contentLength The length of the request. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param range Return only the bytes of the blob in the specified range. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param ifSequenceNumberLessThanOrEqualTo Specify this header value to operate only on a blob if it has a sequence + * number less than or equal to the specified. + * @param ifSequenceNumberLessThan Specify this header value to operate only on a blob if it has a sequence number + * less than the specified. + * @param ifSequenceNumberEqualTo Specify this header value to operate only on a blob if it has the specified + * sequence number. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the + * specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since + * the specified date/time. + * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. + * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. + * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param cpkInfo Parameter group. + * @param encryptionScopeParam Parameter group. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws StorageErrorException 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 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) { + return this.serviceClient.clearPagesNoCustomHeadersWithResponse(containerName, blob, contentLength, timeout, + range, leaseId, ifSequenceNumberLessThanOrEqualTo, ifSequenceNumberLessThan, ifSequenceNumberEqualTo, + ifModifiedSince, ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, requestId, cpkInfo, encryptionScopeParam, + context); + } + + /** + * The Upload Pages operation writes a range of pages to a page blob where the contents are read from a URL. + * + * @param containerName The container name. + * @param blob The blob name. + * @param sourceUrl Specify a URL to the copy source. + * @param sourceRange Bytes of source data in the specified range. The length of this range should match the + * ContentLength header and x-ms-range/Range destination range header. + * @param contentLength The length of the request. + * @param range The range of bytes to which the source range would be written. The range should be 512 aligned and + * range-end is required. + * @param sourceContentMD5 Specify the md5 calculated for the range of bytes that must be read from the copy source. + * @param sourceContentcrc64 Specify the crc64 calculated for the range of bytes that must be read from the copy + * source. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param 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 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 StorageErrorException thrown if 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 containerName, + String blob, String sourceUrl, String sourceRange, long contentLength, String range, byte[] sourceContentMD5, + byte[] sourceContentcrc64, Integer timeout, String leaseId, Long ifSequenceNumberLessThanOrEqualTo, + Long ifSequenceNumberLessThan, Long ifSequenceNumberEqualTo, OffsetDateTime ifModifiedSince, + OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, String ifTags, + OffsetDateTime sourceIfModifiedSince, OffsetDateTime sourceIfUnmodifiedSince, String sourceIfMatch, + String sourceIfNoneMatch, String requestId, String copySourceAuthorization, CpkInfo cpkInfo, + EncryptionScope encryptionScopeParam, Context context) { + return this.serviceClient.uploadPagesFromURLWithResponse(containerName, blob, sourceUrl, sourceRange, + contentLength, range, sourceContentMD5, sourceContentcrc64, timeout, leaseId, + ifSequenceNumberLessThanOrEqualTo, ifSequenceNumberLessThan, ifSequenceNumberEqualTo, ifModifiedSince, + ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, sourceIfModifiedSince, sourceIfUnmodifiedSince, + sourceIfMatch, sourceIfNoneMatch, requestId, copySourceAuthorization, cpkInfo, encryptionScopeParam, + context); + } + + /** + * 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://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param ifSequenceNumberLessThanOrEqualTo Specify this header value to operate only on a blob if it has a sequence + * number less than or equal to the specified. + * @param ifSequenceNumberLessThan Specify this header value to operate only on a blob if it has a sequence number + * less than the specified. + * @param ifSequenceNumberEqualTo Specify this header value to operate only on a blob if it has the specified + * sequence number. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the + * specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since + * the specified date/time. + * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. + * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. + * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. + * @param sourceIfModifiedSince Specify this header value to operate only on a blob if it has been modified since + * the specified date/time. + * @param sourceIfUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified + * since the specified date/time. + * @param sourceIfMatch Specify an ETag value to operate only on blobs with a matching value. + * @param sourceIfNoneMatch Specify an ETag value to operate only on blobs without a matching value. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param copySourceAuthorization Only Bearer type is supported. Credentials should be a valid OAuth access token to + * copy source. + * @param cpkInfo Parameter group. + * @param encryptionScopeParam Parameter group. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws StorageErrorException 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 containerName, String blob, String sourceUrl, String sourceRange, + long contentLength, String range, byte[] sourceContentMD5, byte[] sourceContentcrc64, Integer timeout, + String leaseId, Long ifSequenceNumberLessThanOrEqualTo, Long ifSequenceNumberLessThan, + Long ifSequenceNumberEqualTo, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, + String ifNoneMatch, String ifTags, OffsetDateTime sourceIfModifiedSince, OffsetDateTime sourceIfUnmodifiedSince, + String sourceIfMatch, String sourceIfNoneMatch, String requestId, String copySourceAuthorization, + CpkInfo cpkInfo, EncryptionScope encryptionScopeParam) { + this.serviceClient.uploadPagesFromURL(containerName, blob, sourceUrl, sourceRange, contentLength, range, + sourceContentMD5, sourceContentcrc64, timeout, leaseId, ifSequenceNumberLessThanOrEqualTo, + ifSequenceNumberLessThan, ifSequenceNumberEqualTo, ifModifiedSince, ifUnmodifiedSince, ifMatch, ifNoneMatch, + ifTags, sourceIfModifiedSince, sourceIfUnmodifiedSince, sourceIfMatch, sourceIfNoneMatch, requestId, + copySourceAuthorization, cpkInfo, encryptionScopeParam); + } + + /** + * 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://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param ifSequenceNumberLessThanOrEqualTo Specify this header value to operate only on a blob if it has a sequence + * number less than or equal to the specified. + * @param ifSequenceNumberLessThan Specify this header value to operate only on a blob if it has a sequence number + * less than the specified. + * @param ifSequenceNumberEqualTo Specify this header value to operate only on a blob if it has the specified + * sequence number. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the + * specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since + * the specified date/time. + * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. + * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. + * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. + * @param sourceIfModifiedSince Specify this header value to operate only on a blob if it has been modified since + * the specified date/time. + * @param sourceIfUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified + * since the specified date/time. + * @param sourceIfMatch Specify an ETag value to operate only on blobs with a matching value. + * @param sourceIfNoneMatch Specify an ETag value to operate only on blobs without a matching value. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param copySourceAuthorization Only Bearer type is supported. Credentials should be a valid OAuth access token to + * copy source. + * @param cpkInfo Parameter group. + * @param encryptionScopeParam Parameter group. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws StorageErrorException 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 Response uploadPagesFromURLNoCustomHeadersWithResponse(String containerName, String blob, + String sourceUrl, String sourceRange, long contentLength, String range, byte[] sourceContentMD5, + byte[] sourceContentcrc64, Integer timeout, String leaseId, Long ifSequenceNumberLessThanOrEqualTo, + Long ifSequenceNumberLessThan, Long ifSequenceNumberEqualTo, OffsetDateTime ifModifiedSince, + OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, String ifTags, + OffsetDateTime sourceIfModifiedSince, OffsetDateTime sourceIfUnmodifiedSince, String sourceIfMatch, + String sourceIfNoneMatch, String requestId, String copySourceAuthorization, CpkInfo cpkInfo, + EncryptionScope encryptionScopeParam, Context context) { + return this.serviceClient.uploadPagesFromURLNoCustomHeadersWithResponse(containerName, blob, sourceUrl, + sourceRange, contentLength, range, sourceContentMD5, sourceContentcrc64, timeout, leaseId, + ifSequenceNumberLessThanOrEqualTo, ifSequenceNumberLessThan, ifSequenceNumberEqualTo, ifModifiedSince, + ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, sourceIfModifiedSince, sourceIfUnmodifiedSince, + sourceIfMatch, sourceIfNoneMatch, requestId, copySourceAuthorization, cpkInfo, encryptionScopeParam, + context); + } + + /** + * The Get Page Ranges operation returns the list of valid page ranges for a page blob, version or snapshot of a + * page blob. + * + * @param containerName The container name. + * @param blob The blob name. + * @param snapshot The snapshot parameter is an opaque DateTime value that, when present, specifies the blob + * snapshot to retrieve. For more information on working with blob snapshots, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/creating-a-snapshot-of-a-blob">Creating + * a Snapshot of a Blob.</a>. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param range Return only the bytes of the blob in the specified range. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the + * specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since + * the specified date/time. + * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. + * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. + * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param marker A string value that identifies the portion of the list of containers to be returned with the next + * listing operation. The operation returns the NextMarker value within the response body if the listing operation + * did not return all containers remaining to be listed with the current page. The NextMarker value can be used as + * the value for the marker parameter in a subsequent call to request the next page of list items. The marker value + * is opaque to the client. + * @param maxresults Specifies the maximum number of containers to return. If the request does not specify + * maxresults, or specifies a value greater than 5000, the server will return up to 5000 items. Note that if the + * listing operation crosses a partition boundary, then the service will return a continuation token for retrieving + * the remainder of the results. For this reason, it is possible that the service will return fewer results than + * specified by maxresults, or than the default of 5000. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws StorageErrorException 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}. + */ + @Generated + @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) { + return this.serviceClient.getPageRangesWithResponse(containerName, blob, snapshot, timeout, range, leaseId, + ifModifiedSince, ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, requestId, marker, maxresults, context); + } + + /** + * The Get Page Ranges operation returns the list of valid page ranges for a page blob, version or snapshot of a + * page blob. + * + * @param containerName The container name. + * @param blob The blob name. + * @param snapshot The snapshot parameter is an opaque DateTime value that, when present, specifies the blob + * snapshot to retrieve. For more information on working with blob snapshots, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/creating-a-snapshot-of-a-blob">Creating + * a Snapshot of a Blob.</a>. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param range Return only the bytes of the blob in the specified range. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the + * specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since + * the specified date/time. + * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. + * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. + * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param marker A string value that identifies the portion of the list of containers to be returned with the next + * listing operation. The operation returns the NextMarker value within the response body if the listing operation + * did not return all containers remaining to be listed with the current page. The NextMarker value can be used as + * the value for the marker parameter in a subsequent call to request the next page of list items. The marker value + * is opaque to the client. + * @param maxresults Specifies the maximum number of containers to return. If the request does not specify + * maxresults, or specifies a value greater than 5000, the server will return up to 5000 items. Note that if the + * listing operation crosses a partition boundary, then the service will return a continuation token for retrieving + * the remainder of the results. For this reason, it is possible that the service will return fewer results than + * specified by maxresults, or than the default of 5000. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws StorageErrorException 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. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public PageList getPageRanges(String containerName, String blob, String snapshot, Integer timeout, String range, + String leaseId, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, + String ifNoneMatch, String ifTags, String requestId, String marker, Integer maxresults) { + return this.serviceClient.getPageRanges(containerName, blob, snapshot, timeout, range, leaseId, ifModifiedSince, + ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, requestId, marker, maxresults); + } + + /** + * The Get Page Ranges operation returns the list of valid page ranges for a page blob, version or snapshot of a + * page blob. + * + * @param containerName The container name. + * @param blob The blob name. + * @param snapshot The snapshot parameter is an opaque DateTime value that, when present, specifies the blob + * snapshot to retrieve. For more information on working with blob snapshots, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/creating-a-snapshot-of-a-blob">Creating + * a Snapshot of a Blob.</a>. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param range Return only the bytes of the blob in the specified range. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the + * specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since + * the specified date/time. + * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. + * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. + * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param marker A string value that identifies the portion of the list of containers to be returned with the next + * listing operation. The operation returns the NextMarker value within the response body if the listing operation + * did not return all containers remaining to be listed with the current page. The NextMarker value can be used as + * the value for the marker parameter in a subsequent call to request the next page of list items. The marker value + * is opaque to the client. + * @param maxresults Specifies the maximum number of containers to return. If the request does not specify + * maxresults, or specifies a value greater than 5000, the server will return up to 5000 items. Note that if the + * listing operation crosses a partition boundary, then the service will return a continuation token for retrieving + * the remainder of the results. For this reason, it is possible that the service will return fewer results than + * specified by maxresults, or than the default of 5000. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws StorageErrorException 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. + */ + @Generated + @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) { + return this.serviceClient.getPageRangesNoCustomHeadersWithResponse(containerName, blob, snapshot, timeout, + range, leaseId, ifModifiedSince, ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, requestId, marker, + maxresults, context); + } + + /** + * [Update] The Get Page Ranges Diff operation returns the list of valid page ranges for a page blob that were + * changed between target blob and previous snapshot or version. + * + * @param containerName The container name. + * @param blob The blob name. + * @param snapshot The snapshot parameter is an opaque DateTime value that, when present, specifies the blob + * snapshot to retrieve. For more information on working with blob snapshots, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/creating-a-snapshot-of-a-blob">Creating + * a Snapshot of a Blob.</a>. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param prevsnapshot Optional in version 2015-07-08 and newer. The prevsnapshot parameter is a DateTime value that + * specifies that the response will contain only pages that were changed between target blob and previous snapshot. + * Changed pages include both updated and cleared pages. The target blob may be a snapshot, as long as the snapshot + * specified by prevsnapshot is the older of the two. Note that incremental snapshots are currently supported only + * for blobs created on or after January 1, 2016. + * @param prevSnapshotUrl Optional. This header is only supported in service versions 2019-04-19 and after and + * specifies the URL of a previous snapshot of the target blob. The response will only contain pages that were + * changed between the target blob and its previous snapshot. + * @param range Return only the bytes of the blob in the specified range. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the + * specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since + * the specified date/time. + * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. + * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. + * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param marker A string value that identifies the portion of the list of containers to be returned with the next + * listing operation. The operation returns the NextMarker value within the response body if the listing operation + * did not return all containers remaining to be listed with the current page. The NextMarker value can be used as + * the value for the marker parameter in a subsequent call to request the next page of list items. The marker value + * is opaque to the client. + * @param maxresults Specifies the maximum number of containers to return. If the request does not specify + * maxresults, or specifies a value greater than 5000, the server will return up to 5000 items. Note that if the + * listing operation crosses a partition boundary, then the service will return a continuation token for retrieving + * the remainder of the results. For this reason, it is possible that the service will return fewer results than + * specified by maxresults, or than the default of 5000. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws StorageErrorException 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}. + */ + @Generated + @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) { + return this.serviceClient.getPageRangesDiffWithResponse(containerName, blob, snapshot, timeout, prevsnapshot, + prevSnapshotUrl, range, leaseId, ifModifiedSince, ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, + requestId, marker, maxresults, context); + } + + /** + * [Update] The Get Page Ranges Diff operation returns the list of valid page ranges for a page blob that were + * changed between target blob and previous snapshot or version. + * + * @param containerName The container name. + * @param blob The blob name. + * @param snapshot The snapshot parameter is an opaque DateTime value that, when present, specifies the blob + * snapshot to retrieve. For more information on working with blob snapshots, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/creating-a-snapshot-of-a-blob">Creating + * a Snapshot of a Blob.</a>. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param prevsnapshot Optional in version 2015-07-08 and newer. The prevsnapshot parameter is a DateTime value that + * specifies that the response will contain only pages that were changed between target blob and previous snapshot. + * Changed pages include both updated and cleared pages. The target blob may be a snapshot, as long as the snapshot + * specified by prevsnapshot is the older of the two. Note that incremental snapshots are currently supported only + * for blobs created on or after January 1, 2016. + * @param prevSnapshotUrl Optional. This header is only supported in service versions 2019-04-19 and after and + * specifies the URL of a previous snapshot of the target blob. The response will only contain pages that were + * changed between the target blob and its previous snapshot. + * @param range Return only the bytes of the blob in the specified range. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the + * specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since + * the specified date/time. + * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. + * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. + * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param marker A string value that identifies the portion of the list of containers to be returned with the next + * listing operation. The operation returns the NextMarker value within the response body if the listing operation + * did not return all containers remaining to be listed with the current page. The NextMarker value can be used as + * the value for the marker parameter in a subsequent call to request the next page of list items. The marker value + * is opaque to the client. + * @param maxresults Specifies the maximum number of containers to return. If the request does not specify + * maxresults, or specifies a value greater than 5000, the server will return up to 5000 items. Note that if the + * listing operation crosses a partition boundary, then the service will return a continuation token for retrieving + * the remainder of the results. For this reason, it is possible that the service will return fewer results than + * specified by maxresults, or than the default of 5000. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws StorageErrorException 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. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public PageList getPageRangesDiff(String containerName, String blob, String snapshot, Integer timeout, + String prevsnapshot, String prevSnapshotUrl, String range, String leaseId, OffsetDateTime ifModifiedSince, + OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, String ifTags, String requestId, + String marker, Integer maxresults) { + return this.serviceClient.getPageRangesDiff(containerName, blob, snapshot, timeout, prevsnapshot, + prevSnapshotUrl, range, leaseId, ifModifiedSince, ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, + requestId, marker, maxresults); + } + + /** + * [Update] The Get Page Ranges Diff operation returns the list of valid page ranges for a page blob that were + * changed between target blob and previous snapshot or version. + * + * @param containerName The container name. + * @param blob The blob name. + * @param snapshot The snapshot parameter is an opaque DateTime value that, when present, specifies the blob + * snapshot to retrieve. For more information on working with blob snapshots, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/creating-a-snapshot-of-a-blob">Creating + * a Snapshot of a Blob.</a>. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param prevsnapshot Optional in version 2015-07-08 and newer. The prevsnapshot parameter is a DateTime value that + * specifies that the response will contain only pages that were changed between target blob and previous snapshot. + * Changed pages include both updated and cleared pages. The target blob may be a snapshot, as long as the snapshot + * specified by prevsnapshot is the older of the two. Note that incremental snapshots are currently supported only + * for blobs created on or after January 1, 2016. + * @param prevSnapshotUrl Optional. This header is only supported in service versions 2019-04-19 and after and + * specifies the URL of a previous snapshot of the target blob. The response will only contain pages that were + * changed between the target blob and its previous snapshot. + * @param range Return only the bytes of the blob in the specified range. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the + * specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since + * the specified date/time. + * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. + * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. + * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param marker A string value that identifies the portion of the list of containers to be returned with the next + * listing operation. The operation returns the NextMarker value within the response body if the listing operation + * did not return all containers remaining to be listed with the current page. The NextMarker value can be used as + * the value for the marker parameter in a subsequent call to request the next page of list items. The marker value + * is opaque to the client. + * @param maxresults Specifies the maximum number of containers to return. If the request does not specify + * maxresults, or specifies a value greater than 5000, the server will return up to 5000 items. Note that if the + * listing operation crosses a partition boundary, then the service will return a continuation token for retrieving + * the remainder of the results. For this reason, it is possible that the service will return fewer results than + * specified by maxresults, or than the default of 5000. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws StorageErrorException 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. + */ + @Generated + @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) { + return this.serviceClient.getPageRangesDiffNoCustomHeadersWithResponse(containerName, blob, snapshot, timeout, + prevsnapshot, prevSnapshotUrl, range, leaseId, ifModifiedSince, ifUnmodifiedSince, ifMatch, ifNoneMatch, + ifTags, requestId, marker, maxresults, context); + } + + /** + * Resize the Blob. + * + * @param containerName The container name. + * @param blob The blob name. + * @param blobContentLength This header specifies the maximum size for the page blob, up to 1 TB. The page blob size + * must be aligned to a 512-byte boundary. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the + * specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since + * the specified date/time. + * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. + * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. + * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param cpkInfo Parameter group. + * @param encryptionScopeParam Parameter group. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws StorageErrorException thrown if 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(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 this.serviceClient.resizeWithResponse(containerName, blob, blobContentLength, timeout, leaseId, + ifModifiedSince, ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, requestId, cpkInfo, encryptionScopeParam, + context); + } + + /** + * Resize the Blob. + * + * @param containerName The container name. + * @param blob The blob name. + * @param blobContentLength This header specifies the maximum size for the page blob, up to 1 TB. The page blob size + * must be aligned to a 512-byte boundary. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the + * specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since + * the specified date/time. + * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. + * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. + * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param cpkInfo Parameter group. + * @param encryptionScopeParam Parameter group. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws StorageErrorException 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(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) { + this.serviceClient.resize(containerName, blob, blobContentLength, timeout, leaseId, ifModifiedSince, + ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, requestId, cpkInfo, encryptionScopeParam); + } + + /** + * Resize the Blob. + * + * @param containerName The container name. + * @param blob The blob name. + * @param blobContentLength This header specifies the maximum size for the page blob, up to 1 TB. The page blob size + * must be aligned to a 512-byte boundary. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the + * specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since + * the specified date/time. + * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. + * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. + * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param cpkInfo Parameter group. + * @param encryptionScopeParam Parameter group. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws StorageErrorException 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 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) { + return this.serviceClient.resizeNoCustomHeadersWithResponse(containerName, blob, blobContentLength, timeout, + leaseId, ifModifiedSince, ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, requestId, cpkInfo, + encryptionScopeParam, context); + } + + /** + * Update the sequence number of the blob. + * + * @param containerName The container name. + * @param blob The blob name. + * @param sequenceNumberAction Required if the x-ms-blob-sequence-number header is set for the request. This + * property applies to page blobs only. This property indicates how the service should modify the blob's sequence + * number. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the + * specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since + * the specified date/time. + * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. + * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. + * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. + * @param blobSequenceNumber Set for page blobs only. The sequence number is a user-controlled value that you can + * use to track requests. The value of the sequence number must be between 0 and 2^63 - 1. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws StorageErrorException thrown if 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 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) { + return this.serviceClient.updateSequenceNumberWithResponse(containerName, blob, sequenceNumberAction, timeout, + leaseId, ifModifiedSince, ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, blobSequenceNumber, requestId, + context); + } + + /** + * Update the sequence number of the blob. + * + * @param containerName The container name. + * @param blob The blob name. + * @param sequenceNumberAction Required if the x-ms-blob-sequence-number header is set for the request. This + * property applies to page blobs only. This property indicates how the service should modify the blob's sequence + * number. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the + * specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since + * the specified date/time. + * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. + * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. + * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. + * @param blobSequenceNumber Set for page blobs only. The sequence number is a user-controlled value that you can + * use to track requests. The value of the sequence number must be between 0 and 2^63 - 1. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws StorageErrorException 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 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) { + this.serviceClient.updateSequenceNumber(containerName, blob, sequenceNumberAction, timeout, leaseId, + ifModifiedSince, ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, blobSequenceNumber, requestId); + } + + /** + * Update the sequence number of the blob. + * + * @param containerName The container name. + * @param blob The blob name. + * @param sequenceNumberAction Required if the x-ms-blob-sequence-number header is set for the request. This + * property applies to page blobs only. This property indicates how the service should modify the blob's sequence + * number. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the + * specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since + * the specified date/time. + * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. + * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. + * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. + * @param blobSequenceNumber Set for page blobs only. The sequence number is a user-controlled value that you can + * use to track requests. The value of the sequence number must be between 0 and 2^63 - 1. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws StorageErrorException 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 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) { + return this.serviceClient.updateSequenceNumberNoCustomHeadersWithResponse(containerName, blob, + sequenceNumberAction, timeout, leaseId, ifModifiedSince, ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, + blobSequenceNumber, requestId, context); + } + + /** + * The Copy Incremental operation copies a snapshot of the source page blob to a destination page blob. The snapshot + * is copied such that only the differential changes between the previously copied snapshot are transferred to the + * destination. The copied snapshots are complete copies of the original snapshot and can be read or copied from as + * usual. This API is supported since REST version 2016-05-31. + * + * @param containerName The container name. + * @param blob The blob name. + * @param copySource Specifies the name of the source page blob snapshot. This value is a URL of up to 2 KB in + * length that specifies a page blob snapshot. The value should be URL-encoded as it would appear in a request URI. + * The source blob must either be public or must be authenticated via a shared access signature. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the + * specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since + * the specified date/time. + * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. + * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. + * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws StorageErrorException thrown if 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 containerName, + String blob, String copySource, Integer timeout, OffsetDateTime ifModifiedSince, + OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, String ifTags, String requestId, + Context context) { + return this.serviceClient.copyIncrementalWithResponse(containerName, blob, copySource, timeout, ifModifiedSince, + ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, requestId, context); + } + + /** + * The Copy Incremental operation copies a snapshot of the source page blob to a destination page blob. The snapshot + * is copied such that only the differential changes between the previously copied snapshot are transferred to the + * destination. The copied snapshots are complete copies of the original snapshot and can be read or copied from as + * usual. This API is supported since REST version 2016-05-31. + * + * @param containerName The container name. + * @param blob The blob name. + * @param copySource Specifies the name of the source page blob snapshot. This value is a URL of up to 2 KB in + * length that specifies a page blob snapshot. The value should be URL-encoded as it would appear in a request URI. + * The source blob must either be public or must be authenticated via a shared access signature. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the + * specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since + * the specified date/time. + * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. + * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. + * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws StorageErrorException 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 containerName, String blob, String copySource, Integer timeout, + OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, + String ifTags, String requestId) { + this.serviceClient.copyIncremental(containerName, blob, copySource, timeout, ifModifiedSince, ifUnmodifiedSince, + ifMatch, ifNoneMatch, ifTags, requestId); + } + + /** + * The Copy Incremental operation copies a snapshot of the source page blob to a destination page blob. The snapshot + * is copied such that only the differential changes between the previously copied snapshot are transferred to the + * destination. The copied snapshots are complete copies of the original snapshot and can be read or copied from as + * usual. This API is supported since REST version 2016-05-31. + * + * @param containerName The container name. + * @param blob The blob name. + * @param copySource Specifies the name of the source page blob snapshot. This value is a URL of up to 2 KB in + * length that specifies a page blob snapshot. The value should be URL-encoded as it would appear in a request URI. + * The source blob must either be public or must be authenticated via a shared access signature. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the + * specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since + * the specified date/time. + * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. + * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. + * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws StorageErrorException 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 Response copyIncrementalNoCustomHeadersWithResponse(String containerName, String blob, + String copySource, Integer timeout, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, + String ifMatch, String ifNoneMatch, String ifTags, String requestId, Context context) { + return this.serviceClient.copyIncrementalNoCustomHeadersWithResponse(containerName, blob, copySource, timeout, + ifModifiedSince, ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, requestId, context); + } +} diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/StorageServiceClient.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/StorageServiceClient.java new file mode 100644 index 000000000000..2722d57553dc --- /dev/null +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/StorageServiceClient.java @@ -0,0 +1,633 @@ +// 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; + +import com.azure.core.v2.annotation.Generated; +import com.azure.core.v2.annotation.ReturnType; +import com.azure.core.v2.annotation.ServiceClient; +import com.azure.core.v2.annotation.ServiceMethod; +import com.azure.core.v2.http.rest.PagedIterable; +import com.azure.core.v2.http.rest.ResponseBase; +import com.azure.storage.blob.implementation.ServicesImpl; +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.FilterBlobSegment; +import com.azure.storage.blob.models.FilterBlobsIncludeItem; +import com.azure.storage.blob.models.KeyInfo; +import com.azure.storage.blob.models.ListBlobContainersIncludeType; +import com.azure.storage.blob.models.ServicesFilterBlobsHeaders; +import com.azure.storage.blob.models.ServicesGetAccountInfoHeaders; +import com.azure.storage.blob.models.ServicesGetPropertiesHeaders; +import com.azure.storage.blob.models.ServicesGetStatisticsHeaders; +import com.azure.storage.blob.models.ServicesGetUserDelegationKeyHeaders; +import com.azure.storage.blob.models.ServicesSetPropertiesHeaders; +import com.azure.storage.blob.models.ServicesSubmitBatchHeaders; +import com.azure.storage.blob.models.StorageErrorException; +import com.azure.storage.blob.models.UserDelegationKey; +import io.clientcore.core.http.models.Response; +import io.clientcore.core.util.Context; +import io.clientcore.core.util.binarydata.BinaryData; +import java.io.InputStream; +import java.util.List; + +/** + * Initializes a new instance of the synchronous AzureBlobStorage type. + */ +@ServiceClient(builder = AzureBlobStorageBuilder.class) +public final class StorageServiceClient { + @Generated + private final ServicesImpl serviceClient; + + /** + * Initializes an instance of ServiceClient class. + * + * @param serviceClient the service client implementation. + */ + @Generated + StorageServiceClient(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. + * + * @param blobServiceProperties The StorageService properties. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws StorageErrorException thrown if 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 blobServiceProperties, Integer timeout, String requestId, Context context) { + return this.serviceClient.setPropertiesWithResponse(blobServiceProperties, timeout, requestId, context); + } + + /** + * Sets properties for a storage account's Blob service endpoint, including properties for Storage Analytics and + * CORS (Cross-Origin Resource Sharing) rules. + * + * @param blobServiceProperties The StorageService properties. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws StorageErrorException 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 blobServiceProperties, Integer timeout, String requestId) { + this.serviceClient.setProperties(blobServiceProperties, timeout, requestId); + } + + /** + * Sets properties for a storage account's Blob service endpoint, including properties for Storage Analytics and + * CORS (Cross-Origin Resource Sharing) rules. + * + * @param blobServiceProperties The StorageService properties. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws StorageErrorException 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 Response setPropertiesNoCustomHeadersWithResponse(BlobServiceProperties blobServiceProperties, + Integer timeout, String requestId, Context context) { + return this.serviceClient.setPropertiesNoCustomHeadersWithResponse(blobServiceProperties, timeout, requestId, + context); + } + + /** + * gets the properties of a storage account's Blob service, including properties for Storage Analytics and CORS + * (Cross-Origin Resource Sharing) rules. + * + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws StorageErrorException 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}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public ResponseBase getPropertiesWithResponse(Integer timeout, + String requestId, Context context) { + return this.serviceClient.getPropertiesWithResponse(timeout, requestId, context); + } + + /** + * gets the properties of a storage account's Blob service, including properties for Storage Analytics and CORS + * (Cross-Origin Resource Sharing) rules. + * + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws StorageErrorException 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. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public BlobServiceProperties getProperties(Integer timeout, String requestId) { + return this.serviceClient.getProperties(timeout, requestId); + } + + /** + * gets the properties of a storage account's Blob service, including properties for Storage Analytics and CORS + * (Cross-Origin Resource Sharing) rules. + * + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws StorageErrorException 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. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getPropertiesNoCustomHeadersWithResponse(Integer timeout, String requestId, + Context context) { + return this.serviceClient.getPropertiesNoCustomHeadersWithResponse(timeout, requestId, context); + } + + /** + * Retrieves statistics related to replication for the Blob service. It is only available on the secondary location + * endpoint when read-access geo-redundant replication is enabled for the storage account. + * + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws StorageErrorException 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, + String requestId, Context context) { + return this.serviceClient.getStatisticsWithResponse(timeout, requestId, context); + } + + /** + * Retrieves statistics related to replication for the Blob service. It is only available on the secondary location + * endpoint when read-access geo-redundant replication is enabled for the storage account. + * + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws StorageErrorException 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, String requestId) { + return this.serviceClient.getStatistics(timeout, requestId); + } + + /** + * Retrieves statistics related to replication for the Blob service. It is only available on the secondary location + * endpoint when read-access geo-redundant replication is enabled for the storage account. + * + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws StorageErrorException 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 Response getStatisticsNoCustomHeadersWithResponse(Integer timeout, String requestId, + Context context) { + return this.serviceClient.getStatisticsNoCustomHeadersWithResponse(timeout, requestId, context); + } + + /** + * The List Containers Segment operation returns a list of the containers under the specified account. + * + * @param prefix Filters the results to return only containers whose name begins with the specified prefix. + * @param marker A string value that identifies the portion of the list of containers to be returned with the next + * listing operation. The operation returns the NextMarker value within the response body if the listing operation + * did not return all containers remaining to be listed with the current page. The NextMarker value can be used as + * the value for the marker parameter in a subsequent call to request the next page of list items. The marker value + * is opaque to the client. + * @param maxresults Specifies the maximum number of containers to return. If the request does not specify + * maxresults, or specifies a value greater than 5000, the server will return up to 5000 items. Note that if the + * listing operation crosses a partition boundary, then the service will return a continuation token for retrieving + * the remainder of the results. For this reason, it is possible that the service will return fewer results than + * specified by maxresults, or than the default of 5000. + * @param listBlobContainersIncludeType Include this parameter to specify that the container's metadata be returned + * as part of the response body. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws StorageErrorException 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}. + */ + @Generated + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listBlobContainersSegment(String prefix, String marker, Integer maxresults, + List listBlobContainersIncludeType, Integer timeout, String requestId, + Context context) { + return this.serviceClient.listBlobContainersSegment(prefix, marker, maxresults, listBlobContainersIncludeType, + timeout, requestId, context); + } + + /** + * The List Containers Segment operation returns a list of the containers under the specified account. + * + * @param prefix Filters the results to return only containers whose name begins with the specified prefix. + * @param marker A string value that identifies the portion of the list of containers to be returned with the next + * listing operation. The operation returns the NextMarker value within the response body if the listing operation + * did not return all containers remaining to be listed with the current page. The NextMarker value can be used as + * the value for the marker parameter in a subsequent call to request the next page of list items. The marker value + * is opaque to the client. + * @param maxresults Specifies the maximum number of containers to return. If the request does not specify + * maxresults, or specifies a value greater than 5000, the server will return up to 5000 items. Note that if the + * listing operation crosses a partition boundary, then the service will return a continuation token for retrieving + * the remainder of the results. For this reason, it is possible that the service will return fewer results than + * specified by maxresults, or than the default of 5000. + * @param listBlobContainersIncludeType Include this parameter to specify that the container's metadata be returned + * as part of the response body. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws StorageErrorException 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}. + */ + @Generated + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listBlobContainersSegmentNoCustomHeaders(String prefix, String marker, + Integer maxresults, List listBlobContainersIncludeType, Integer timeout, + String requestId, Context context) { + return this.serviceClient.listBlobContainersSegmentNoCustomHeaders(prefix, marker, maxresults, + listBlobContainersIncludeType, timeout, requestId, context); + } + + /** + * Retrieves a user delegation key for the Blob service. This is only a valid operation when using bearer token + * authentication. + * + * @param keyInfo Key information. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param requestId Provides a 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 StorageErrorException 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, String requestId, Context context) { + return this.serviceClient.getUserDelegationKeyWithResponse(keyInfo, timeout, requestId, context); + } + + /** + * Retrieves a user delegation key for the Blob service. This is only a valid operation when using bearer token + * authentication. + * + * @param keyInfo Key information. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param requestId Provides 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 StorageErrorException 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, String requestId) { + return this.serviceClient.getUserDelegationKey(keyInfo, timeout, requestId); + } + + /** + * Retrieves a user delegation key for the Blob service. This is only a valid operation when using bearer token + * authentication. + * + * @param keyInfo Key information. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws StorageErrorException 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 Response getUserDelegationKeyNoCustomHeadersWithResponse(KeyInfo keyInfo, Integer timeout, + String requestId, Context context) { + return this.serviceClient.getUserDelegationKeyNoCustomHeadersWithResponse(keyInfo, timeout, requestId, context); + } + + /** + * Returns the sku name and account kind. + * + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws StorageErrorException thrown if 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, + String requestId, Context context) { + return this.serviceClient.getAccountInfoWithResponse(timeout, requestId, context); + } + + /** + * Returns the sku name and account kind. + * + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws StorageErrorException 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, String requestId) { + this.serviceClient.getAccountInfo(timeout, requestId); + } + + /** + * Returns the sku name and account kind. + * + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws StorageErrorException 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 Response getAccountInfoNoCustomHeadersWithResponse(Integer timeout, String requestId, + Context context) { + return this.serviceClient.getAccountInfoNoCustomHeadersWithResponse(timeout, requestId, context); + } + + /** + * The Batch operation allows multiple API calls to be embedded into a single HTTP request. + * + * @param contentLength The length of the request. + * @param multipartContentType Required. The value of this header must be multipart/mixed with a batch boundary. + * Example header value: multipart/mixed; boundary=batch_<GUID>. + * @param body Initial data. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws StorageErrorException 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 submitBatchWithResponse(long contentLength, + String multipartContentType, BinaryData body, Integer timeout, String requestId, Context context) { + return this.serviceClient.submitBatchWithResponse(contentLength, multipartContentType, body, timeout, requestId, + context); + } + + /** + * The Batch operation allows multiple API calls to be embedded into a single HTTP request. + * + * @param contentLength The length of the request. + * @param multipartContentType Required. The value of this header must be multipart/mixed with a batch boundary. + * Example header value: multipart/mixed; boundary=batch_<GUID>. + * @param body Initial data. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws StorageErrorException 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 InputStream submitBatch(long contentLength, String multipartContentType, BinaryData body, Integer timeout, + String requestId) { + return this.serviceClient.submitBatch(contentLength, multipartContentType, body, timeout, requestId); + } + + /** + * The Batch operation allows multiple API calls to be embedded into a single HTTP request. + * + * @param contentLength The length of the request. + * @param multipartContentType Required. The value of this header must be multipart/mixed with a batch boundary. + * Example header value: multipart/mixed; boundary=batch_<GUID>. + * @param body Initial data. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws StorageErrorException 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 Response submitBatchNoCustomHeadersWithResponse(long contentLength, String multipartContentType, + BinaryData body, Integer timeout, String requestId, Context context) { + return this.serviceClient.submitBatchNoCustomHeadersWithResponse(contentLength, multipartContentType, body, + timeout, requestId, context); + } + + /** + * The Filter Blobs operation enables callers to list blobs across all containers whose tags match a given search + * expression. Filter blobs searches across all containers within a storage account but can be scoped within the + * expression to a single container. + * + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param where Filters the results to return only to return only blobs whose tags match the specified expression. + * @param marker A string value that identifies the portion of the list of containers to be returned with the next + * listing operation. The operation returns the NextMarker value within the response body if the listing operation + * did not return all containers remaining to be listed with the current page. The NextMarker value can be used as + * the value for the marker parameter in a subsequent call to request the next page of list items. The marker value + * is opaque to the client. + * @param maxresults Specifies the maximum number of containers to return. If the request does not specify + * maxresults, or specifies a value greater than 5000, the server will return up to 5000 items. Note that if the + * listing operation crosses a partition boundary, then the service will return a continuation token for retrieving + * the remainder of the results. For this reason, it is possible that the service will return fewer results than + * specified by maxresults, or than the default of 5000. + * @param include Include this parameter to specify one or more datasets to include in the response. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws StorageErrorException 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}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public ResponseBase filterBlobsWithResponse(Integer timeout, + String requestId, String where, String marker, Integer maxresults, List include, + Context context) { + return this.serviceClient.filterBlobsWithResponse(timeout, requestId, where, marker, maxresults, include, + context); + } + + /** + * The Filter Blobs operation enables callers to list blobs across all containers whose tags match a given search + * expression. Filter blobs searches across all containers within a storage account but can be scoped within the + * expression to a single container. + * + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param where Filters the results to return only to return only blobs whose tags match the specified expression. + * @param marker A string value that identifies the portion of the list of containers to be returned with the next + * listing operation. The operation returns the NextMarker value within the response body if the listing operation + * did not return all containers remaining to be listed with the current page. The NextMarker value can be used as + * the value for the marker parameter in a subsequent call to request the next page of list items. The marker value + * is opaque to the client. + * @param maxresults Specifies the maximum number of containers to return. If the request does not specify + * maxresults, or specifies a value greater than 5000, the server will return up to 5000 items. Note that if the + * listing operation crosses a partition boundary, then the service will return a continuation token for retrieving + * the remainder of the results. For this reason, it is possible that the service will return fewer results than + * specified by maxresults, or than the default of 5000. + * @param include Include this parameter to specify one or more datasets to include in the response. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws StorageErrorException 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. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public FilterBlobSegment filterBlobs(Integer timeout, String requestId, String where, String marker, + Integer maxresults, List include) { + return this.serviceClient.filterBlobs(timeout, requestId, where, marker, maxresults, include); + } + + /** + * The Filter Blobs operation enables callers to list blobs across all containers whose tags match a given search + * expression. Filter blobs searches across all containers within a storage account but can be scoped within the + * expression to a single container. + * + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param where Filters the results to return only to return only blobs whose tags match the specified expression. + * @param marker A string value that identifies the portion of the list of containers to be returned with the next + * listing operation. The operation returns the NextMarker value within the response body if the listing operation + * did not return all containers remaining to be listed with the current page. The NextMarker value can be used as + * the value for the marker parameter in a subsequent call to request the next page of list items. The marker value + * is opaque to the client. + * @param maxresults Specifies the maximum number of containers to return. If the request does not specify + * maxresults, or specifies a value greater than 5000, the server will return up to 5000 items. Note that if the + * listing operation crosses a partition boundary, then the service will return a continuation token for retrieving + * the remainder of the results. For this reason, it is possible that the service will return fewer results than + * specified by maxresults, or than the default of 5000. + * @param include Include this parameter to specify one or more datasets to include in the response. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws StorageErrorException 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. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Response filterBlobsNoCustomHeadersWithResponse(Integer timeout, String requestId, + String where, String marker, Integer maxresults, List include, Context context) { + return this.serviceClient.filterBlobsNoCustomHeadersWithResponse(timeout, requestId, where, marker, maxresults, + include, context); + } +} diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/implementation/AppendBlobsImpl.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/implementation/AppendBlobsImpl.java new file mode 100644 index 000000000000..e607f0b4afb8 --- /dev/null +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/implementation/AppendBlobsImpl.java @@ -0,0 +1,1156 @@ +// 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.v2.annotation.ReturnType; +import com.azure.core.v2.annotation.ServiceMethod; +import com.azure.core.v2.http.rest.ResponseBase; +import io.clientcore.core.util.Base64Util; +import io.clientcore.core.http.models.DateTimeRfc1123; +import com.azure.storage.blob.models.AppendBlobsAppendBlockFromUrlHeaders; +import com.azure.storage.blob.models.AppendBlobsAppendBlockHeaders; +import com.azure.storage.blob.models.AppendBlobsCreateHeaders; +import com.azure.storage.blob.models.AppendBlobsSealHeaders; +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.EncryptionScope; +import com.azure.storage.blob.models.StorageErrorException; +import io.clientcore.core.annotation.ServiceInterface; +import io.clientcore.core.http.RestProxy; +import io.clientcore.core.http.annotation.BodyParam; +import io.clientcore.core.http.annotation.HeaderParam; +import io.clientcore.core.http.annotation.HostParam; +import io.clientcore.core.http.annotation.HttpRequestInformation; +import io.clientcore.core.http.annotation.PathParam; +import io.clientcore.core.http.annotation.QueryParam; +import io.clientcore.core.http.annotation.UnexpectedResponseExceptionDetail; +import io.clientcore.core.http.models.HttpMethod; +import io.clientcore.core.http.models.Response; +import io.clientcore.core.util.Context; +import io.clientcore.core.util.binarydata.BinaryData; +import java.time.OffsetDateTime; +import java.util.Map; + +/** + * An instance of this class provides access to all the operations defined in AppendBlobs. + */ +public final class AppendBlobsImpl { + /** + * The proxy service used to perform REST calls. + */ + private final AppendBlobsService service; + + /** + * The service client containing this operation class. + */ + private final AzureBlobStorageImpl client; + + /** + * Initializes an instance of AppendBlobsImpl. + * + * @param client the instance of the service client containing this operation class. + */ + AppendBlobsImpl(AzureBlobStorageImpl client) { + this.service + = RestProxy.create(AppendBlobsService.class, client.getHttpPipeline()); + this.client = client; + } + + /** + * The interface defining all the services for AzureBlobStorageAppendBlobs to be used by the proxy service to + * perform REST calls. + */ + @ServiceInterface(name = "AzureBlobStorageAppe", host = "{url}") + public interface AppendBlobsService { + @HttpRequestInformation( + method = HttpMethod.PUT, + path = "/{containerName}/{blob}", + expectedStatusCodes = { 201 }) + @UnexpectedResponseExceptionDetail + 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); + + @HttpRequestInformation( + method = HttpMethod.PUT, + path = "/{containerName}/{blob}", + expectedStatusCodes = { 201 }) + @UnexpectedResponseExceptionDetail + 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); + + @HttpRequestInformation( + method = HttpMethod.PUT, + path = "/{containerName}/{blob}", + expectedStatusCodes = { 201 }) + @UnexpectedResponseExceptionDetail + 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); + + @HttpRequestInformation( + method = HttpMethod.PUT, + path = "/{containerName}/{blob}", + expectedStatusCodes = { 201 }) + @UnexpectedResponseExceptionDetail + 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); + + @HttpRequestInformation( + method = HttpMethod.PUT, + path = "/{containerName}/{blob}", + expectedStatusCodes = { 201 }) + @UnexpectedResponseExceptionDetail + ResponseBase appendBlockFromUrlSync(@HostParam("url") String url, + @PathParam("containerName") String containerName, @PathParam("blob") String blob, + @QueryParam("comp") String comp, @HeaderParam("x-ms-copy-source") String sourceUrl, + @HeaderParam("x-ms-source-range") String sourceRange, + @HeaderParam("x-ms-source-content-md5") String sourceContentMD5, + @HeaderParam("x-ms-source-content-crc64") String sourceContentcrc64, @QueryParam("timeout") Integer timeout, + @HeaderParam("Content-Length") long contentLength, + @HeaderParam("Content-MD5") String transactionalContentMD5, + @HeaderParam("x-ms-encryption-key") String encryptionKey, + @HeaderParam("x-ms-encryption-key-sha256") String encryptionKeySha256, + @HeaderParam("x-ms-encryption-algorithm") EncryptionAlgorithmType encryptionAlgorithm, + @HeaderParam("x-ms-encryption-scope") String encryptionScope, @HeaderParam("x-ms-lease-id") String leaseId, + @HeaderParam("x-ms-blob-condition-maxsize") Long maxSize, + @HeaderParam("x-ms-blob-condition-appendpos") Long appendPosition, + @HeaderParam("If-Modified-Since") DateTimeRfc1123 ifModifiedSince, + @HeaderParam("If-Unmodified-Since") DateTimeRfc1123 ifUnmodifiedSince, + @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch, + @HeaderParam("x-ms-if-tags") String ifTags, + @HeaderParam("x-ms-source-if-modified-since") DateTimeRfc1123 sourceIfModifiedSince, + @HeaderParam("x-ms-source-if-unmodified-since") DateTimeRfc1123 sourceIfUnmodifiedSince, + @HeaderParam("x-ms-source-if-match") String sourceIfMatch, + @HeaderParam("x-ms-source-if-none-match") String sourceIfNoneMatch, + @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, + @HeaderParam("x-ms-copy-source-authorization") String copySourceAuthorization, + @HeaderParam("Accept") String accept, Context context); + + @HttpRequestInformation( + method = HttpMethod.PUT, + path = "/{containerName}/{blob}", + expectedStatusCodes = { 201 }) + @UnexpectedResponseExceptionDetail + Response appendBlockFromUrlNoCustomHeadersSync(@HostParam("url") String url, + @PathParam("containerName") String containerName, @PathParam("blob") String blob, + @QueryParam("comp") String comp, @HeaderParam("x-ms-copy-source") String sourceUrl, + @HeaderParam("x-ms-source-range") String sourceRange, + @HeaderParam("x-ms-source-content-md5") String sourceContentMD5, + @HeaderParam("x-ms-source-content-crc64") String sourceContentcrc64, @QueryParam("timeout") Integer timeout, + @HeaderParam("Content-Length") long contentLength, + @HeaderParam("Content-MD5") String transactionalContentMD5, + @HeaderParam("x-ms-encryption-key") String encryptionKey, + @HeaderParam("x-ms-encryption-key-sha256") String encryptionKeySha256, + @HeaderParam("x-ms-encryption-algorithm") EncryptionAlgorithmType encryptionAlgorithm, + @HeaderParam("x-ms-encryption-scope") String encryptionScope, @HeaderParam("x-ms-lease-id") String leaseId, + @HeaderParam("x-ms-blob-condition-maxsize") Long maxSize, + @HeaderParam("x-ms-blob-condition-appendpos") Long appendPosition, + @HeaderParam("If-Modified-Since") DateTimeRfc1123 ifModifiedSince, + @HeaderParam("If-Unmodified-Since") DateTimeRfc1123 ifUnmodifiedSince, + @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch, + @HeaderParam("x-ms-if-tags") String ifTags, + @HeaderParam("x-ms-source-if-modified-since") DateTimeRfc1123 sourceIfModifiedSince, + @HeaderParam("x-ms-source-if-unmodified-since") DateTimeRfc1123 sourceIfUnmodifiedSince, + @HeaderParam("x-ms-source-if-match") String sourceIfMatch, + @HeaderParam("x-ms-source-if-none-match") String sourceIfNoneMatch, + @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, + @HeaderParam("x-ms-copy-source-authorization") String copySourceAuthorization, + @HeaderParam("Accept") String accept, Context context); + + @HttpRequestInformation( + method = HttpMethod.PUT, + path = "/{containerName}/{blob}", + expectedStatusCodes = { 200 }) + @UnexpectedResponseExceptionDetail + 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); + + @HttpRequestInformation( + method = HttpMethod.PUT, + path = "/{containerName}/{blob}", + expectedStatusCodes = { 200 }) + @UnexpectedResponseExceptionDetail + Response sealNoCustomHeadersSync(@HostParam("url") String url, + @PathParam("containerName") String containerName, @PathParam("blob") String blob, + @QueryParam("comp") String comp, @QueryParam("timeout") Integer timeout, + @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, + @HeaderParam("x-ms-lease-id") String leaseId, + @HeaderParam("If-Modified-Since") DateTimeRfc1123 ifModifiedSince, + @HeaderParam("If-Unmodified-Since") DateTimeRfc1123 ifUnmodifiedSince, + @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch, + @HeaderParam("x-ms-blob-condition-appendpos") Long appendPosition, @HeaderParam("Accept") String accept, + Context context); + } + + /** + * The Create Append Blob operation creates a new append blob. + * + * @param containerName The container name. + * @param blob The blob name. + * @param contentLength The length of the request. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @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 StorageErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link ResponseBase}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ResponseBase createWithResponse(String containerName, String blob, + long contentLength, Integer timeout, Map metadata, String leaseId, + OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, + String ifTags, String requestId, String blobTagsString, OffsetDateTime immutabilityPolicyExpiry, + BlobImmutabilityPolicyMode immutabilityPolicyMode, Boolean legalHold, BlobHttpHeaders blobHttpHeaders, + CpkInfo cpkInfo, EncryptionScope encryptionScopeParam, Context context) { + final String blobType = "AppendBlob"; + final String accept = "application/xml"; + String contentTypeInternal = null; + if (blobHttpHeaders != null) { + contentTypeInternal = blobHttpHeaders.getContentType(); + } + String contentType = contentTypeInternal; + String contentEncodingInternal = null; + if (blobHttpHeaders != null) { + contentEncodingInternal = blobHttpHeaders.getContentEncoding(); + } + String contentEncoding = contentEncodingInternal; + String contentLanguageInternal = null; + if (blobHttpHeaders != null) { + contentLanguageInternal = blobHttpHeaders.getContentLanguage(); + } + String contentLanguage = contentLanguageInternal; + byte[] contentMd5Internal = null; + if (blobHttpHeaders != null) { + contentMd5Internal = blobHttpHeaders.getContentMd5(); + } + byte[] contentMd5 = contentMd5Internal; + String cacheControlInternal = null; + if (blobHttpHeaders != null) { + cacheControlInternal = blobHttpHeaders.getCacheControl(); + } + String cacheControl = cacheControlInternal; + String contentDispositionInternal = null; + if (blobHttpHeaders != null) { + contentDispositionInternal = blobHttpHeaders.getContentDisposition(); + } + String contentDisposition = contentDispositionInternal; + String encryptionKeyInternal = null; + if (cpkInfo != null) { + encryptionKeyInternal = cpkInfo.getEncryptionKey(); + } + String encryptionKey = encryptionKeyInternal; + String encryptionKeySha256Internal = null; + if (cpkInfo != null) { + encryptionKeySha256Internal = cpkInfo.getEncryptionKeySha256(); + } + String encryptionKeySha256 = encryptionKeySha256Internal; + EncryptionAlgorithmType encryptionAlgorithmInternal = null; + if (cpkInfo != null) { + encryptionAlgorithmInternal = cpkInfo.getEncryptionAlgorithm(); + } + EncryptionAlgorithmType encryptionAlgorithm = encryptionAlgorithmInternal; + String encryptionScopeInternal = null; + if (encryptionScopeParam != null) { + encryptionScopeInternal = encryptionScopeParam.getEncryptionScope(); + } + String encryptionScope = encryptionScopeInternal; + String contentMd5Converted = Base64Util.encodeToString(contentMd5); + DateTimeRfc1123 ifModifiedSinceConverted + = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); + DateTimeRfc1123 ifUnmodifiedSinceConverted + = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); + DateTimeRfc1123 immutabilityPolicyExpiryConverted + = immutabilityPolicyExpiry == null ? null : new DateTimeRfc1123(immutabilityPolicyExpiry); + return service.createSync(this.client.getUrl(), containerName, blob, blobType, timeout, contentLength, + contentType, contentEncoding, contentLanguage, contentMd5Converted, cacheControl, metadata, leaseId, + contentDisposition, encryptionKey, encryptionKeySha256, encryptionAlgorithm, encryptionScope, + ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, + this.client.getVersion(), requestId, blobTagsString, immutabilityPolicyExpiryConverted, + immutabilityPolicyMode, legalHold, accept, context); + } + + /** + * The Create Append Blob operation creates a new append blob. + * + * @param containerName The container name. + * @param blob The blob name. + * @param contentLength The length of the request. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param metadata Optional. Specifies a user-defined name-value pair associated with the blob. If no name-value + * pairs are specified, the operation will copy the metadata from the source blob or file to the destination blob. + * If one or more name-value pairs are specified, the destination blob is created with the specified metadata, and + * metadata is not copied from the source blob or file. Note that beginning with version 2009-09-19, metadata names + * must adhere to the naming rules for C# identifiers. See Naming and Referencing Containers, Blobs, and Metadata + * for more information. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the + * specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since + * the specified date/time. + * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. + * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. + * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param blobTagsString Optional. Used to set blob tags in various blob operations. + * @param immutabilityPolicyExpiry Specifies the date time when the blobs immutability policy is set to expire. + * @param immutabilityPolicyMode Specifies the immutability policy mode to set on the blob. + * @param legalHold Specified if a legal hold should be set on the blob. + * @param blobHttpHeaders Parameter group. + * @param cpkInfo Parameter group. + * @param encryptionScopeParam Parameter group. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws StorageErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void create(String containerName, String blob, long contentLength, Integer timeout, + Map metadata, String leaseId, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, + String ifMatch, String ifNoneMatch, String ifTags, String requestId, String blobTagsString, + OffsetDateTime immutabilityPolicyExpiry, BlobImmutabilityPolicyMode immutabilityPolicyMode, Boolean legalHold, + BlobHttpHeaders blobHttpHeaders, CpkInfo cpkInfo, EncryptionScope encryptionScopeParam) { + createWithResponse(containerName, blob, contentLength, timeout, metadata, leaseId, ifModifiedSince, + ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, requestId, blobTagsString, immutabilityPolicyExpiry, + immutabilityPolicyMode, legalHold, blobHttpHeaders, cpkInfo, encryptionScopeParam, Context.none()); + } + + /** + * The Create Append Blob operation creates a new append blob. + * + * @param containerName The container name. + * @param blob The blob name. + * @param contentLength The length of the request. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param metadata Optional. Specifies a user-defined name-value pair associated with the blob. If no name-value + * pairs are specified, the operation will copy the metadata from the source blob or file to the destination blob. + * If one or more name-value pairs are specified, the destination blob is created with the specified metadata, and + * metadata is not copied from the source blob or file. Note that beginning with version 2009-09-19, metadata names + * must adhere to the naming rules for C# identifiers. See Naming and Referencing Containers, Blobs, and Metadata + * for more information. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the + * specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since + * the specified date/time. + * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. + * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. + * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param blobTagsString Optional. Used to set blob tags in various blob operations. + * @param immutabilityPolicyExpiry Specifies the date time when the blobs immutability policy is set to expire. + * @param immutabilityPolicyMode Specifies the immutability policy mode to set on the blob. + * @param legalHold Specified if a legal hold should be set on the blob. + * @param blobHttpHeaders Parameter group. + * @param cpkInfo Parameter group. + * @param encryptionScopeParam Parameter group. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws StorageErrorException 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 Response createNoCustomHeadersWithResponse(String containerName, String blob, long contentLength, + Integer timeout, Map metadata, String leaseId, OffsetDateTime ifModifiedSince, + OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, String ifTags, String requestId, + String blobTagsString, OffsetDateTime immutabilityPolicyExpiry, + BlobImmutabilityPolicyMode immutabilityPolicyMode, Boolean legalHold, BlobHttpHeaders blobHttpHeaders, + CpkInfo cpkInfo, EncryptionScope encryptionScopeParam, Context context) { + final String blobType = "AppendBlob"; + final String accept = "application/xml"; + String contentTypeInternal = null; + 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); + } + + /** + * The Append Block operation commits a new block of data to the end of an existing append blob. The Append Block + * operation is permitted only if the blob was created with x-ms-blob-type set to AppendBlob. Append Block is + * supported only on version 2015-02-21 version or later. + * + * @param containerName The container name. + * @param blob The blob name. + * @param contentLength The length of the request. + * @param body Initial data. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param transactionalContentMD5 Specify the transactional md5 for the body, to be validated by the service. + * @param transactionalContentCrc64 Specify the transactional crc64 for the body, to be validated by the service. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param maxSize Optional conditional header. The max length in bytes permitted for the append blob. If the Append + * Block operation would cause the blob to exceed that limit or if the blob size is already greater than the value + * specified in this header, the request will fail with MaxBlobSizeConditionNotMet error (HTTP status code 412 - + * Precondition Failed). + * @param appendPosition Optional conditional header, used only for the Append Block operation. A number indicating + * the byte offset to compare. Append Block will succeed only if the append position is equal to this number. If it + * is not, the request will fail with the AppendPositionConditionNotMet error (HTTP status code 412 - Precondition + * Failed). + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the + * specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since + * the specified date/time. + * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. + * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. + * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param 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 StorageErrorException thrown if 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) { + 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); + } + + /** + * The Append Block operation commits a new block of data to the end of an existing append blob. The Append Block + * operation is permitted only if the blob was created with x-ms-blob-type set to AppendBlob. Append Block is + * supported only on version 2015-02-21 version or later. + * + * @param containerName The container name. + * @param blob The blob name. + * @param contentLength The length of the request. + * @param body Initial data. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param transactionalContentMD5 Specify the transactional md5 for the body, to be validated by the service. + * @param transactionalContentCrc64 Specify the transactional crc64 for the body, to be validated by the service. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param maxSize Optional conditional header. The max length in bytes permitted for the append blob. If the Append + * Block operation would cause the blob to exceed that limit or if the blob size is already greater than the value + * specified in this header, the request will fail with MaxBlobSizeConditionNotMet error (HTTP status code 412 - + * Precondition Failed). + * @param appendPosition Optional conditional header, used only for the Append Block operation. A number indicating + * the byte offset to compare. Append Block will succeed only if the append position is equal to this number. If it + * is not, the request will fail with the AppendPositionConditionNotMet error (HTTP status code 412 - Precondition + * Failed). + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the + * specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since + * the specified date/time. + * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. + * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. + * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param 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 StorageErrorException 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://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param transactionalContentMD5 Specify the transactional md5 for the body, to be validated by the service. + * @param transactionalContentCrc64 Specify the transactional crc64 for the body, to be validated by the service. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param maxSize Optional conditional header. The max length in bytes permitted for the append blob. If the Append + * Block operation would cause the blob to exceed that limit or if the blob size is already greater than the value + * specified in this header, the request will fail with MaxBlobSizeConditionNotMet error (HTTP status code 412 - + * Precondition Failed). + * @param appendPosition Optional conditional header, used only for the Append Block operation. A number indicating + * the byte offset to compare. Append Block will succeed only if the append position is equal to this number. If it + * is not, the request will fail with the AppendPositionConditionNotMet error (HTTP status code 412 - Precondition + * Failed). + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the + * specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since + * the specified date/time. + * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. + * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. + * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param 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 StorageErrorException 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 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) { + 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); + } + + /** + * The Append Block operation commits a new block of data to the end of an existing append blob where the contents + * are read from a source url. The Append Block operation is permitted only if the blob was created with + * x-ms-blob-type set to AppendBlob. Append Block is supported only on version 2015-02-21 version or later. + * + * @param containerName The container name. + * @param blob The blob name. + * @param sourceUrl Specify a URL to the copy source. + * @param contentLength The length of the request. + * @param sourceRange Bytes of source data in the specified range. + * @param sourceContentMD5 Specify the md5 calculated for the range of bytes that must be read from the copy source. + * @param sourceContentcrc64 Specify the crc64 calculated for the range of bytes that must be read from the copy + * source. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param transactionalContentMD5 Specify the transactional md5 for the body, to be validated by the service. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param maxSize Optional conditional header. The max length in bytes permitted for the append blob. If the Append + * Block operation would cause the blob to exceed that limit or if the blob size is already greater than the value + * specified in this header, the request will fail with MaxBlobSizeConditionNotMet error (HTTP status code 412 - + * Precondition Failed). + * @param appendPosition Optional conditional header, used only for the Append Block operation. A number indicating + * the byte offset to compare. Append Block will succeed only if the append position is equal to this number. If it + * is not, the request will fail with the AppendPositionConditionNotMet error (HTTP status code 412 - Precondition + * Failed). + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the + * specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since + * the specified date/time. + * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. + * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. + * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. + * @param sourceIfModifiedSince Specify this header value to operate only on a blob if it has been modified since + * the specified date/time. + * @param sourceIfUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified + * since the specified date/time. + * @param sourceIfMatch Specify an ETag value to operate only on blobs with a matching value. + * @param sourceIfNoneMatch Specify an ETag value to operate only on blobs without a matching value. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param copySourceAuthorization Only Bearer type is supported. Credentials should be a valid OAuth access token to + * copy source. + * @param cpkInfo Parameter group. + * @param encryptionScopeParam Parameter group. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws StorageErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link ResponseBase}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ResponseBase appendBlockFromUrlWithResponse(String containerName, + String blob, String sourceUrl, long contentLength, String sourceRange, byte[] sourceContentMD5, + byte[] sourceContentcrc64, Integer timeout, byte[] transactionalContentMD5, String leaseId, Long maxSize, + Long appendPosition, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, + String ifNoneMatch, String ifTags, OffsetDateTime sourceIfModifiedSince, OffsetDateTime sourceIfUnmodifiedSince, + String sourceIfMatch, String sourceIfNoneMatch, String requestId, String copySourceAuthorization, + CpkInfo cpkInfo, EncryptionScope encryptionScopeParam, Context context) { + final String comp = "appendblock"; + final String accept = "application/xml"; + String encryptionKeyInternal = null; + if (cpkInfo != null) { + encryptionKeyInternal = cpkInfo.getEncryptionKey(); + } + String encryptionKey = encryptionKeyInternal; + String encryptionKeySha256Internal = null; + if (cpkInfo != null) { + encryptionKeySha256Internal = cpkInfo.getEncryptionKeySha256(); + } + String encryptionKeySha256 = encryptionKeySha256Internal; + EncryptionAlgorithmType encryptionAlgorithmInternal = null; + if (cpkInfo != null) { + encryptionAlgorithmInternal = cpkInfo.getEncryptionAlgorithm(); + } + EncryptionAlgorithmType encryptionAlgorithm = encryptionAlgorithmInternal; + String encryptionScopeInternal = null; + if (encryptionScopeParam != null) { + encryptionScopeInternal = encryptionScopeParam.getEncryptionScope(); + } + String encryptionScope = encryptionScopeInternal; + String sourceContentMD5Converted = Base64Util.encodeToString(sourceContentMD5); + String sourceContentcrc64Converted = Base64Util.encodeToString(sourceContentcrc64); + String transactionalContentMD5Converted = Base64Util.encodeToString(transactionalContentMD5); + DateTimeRfc1123 ifModifiedSinceConverted + = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); + DateTimeRfc1123 ifUnmodifiedSinceConverted + = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); + DateTimeRfc1123 sourceIfModifiedSinceConverted + = sourceIfModifiedSince == null ? null : new DateTimeRfc1123(sourceIfModifiedSince); + DateTimeRfc1123 sourceIfUnmodifiedSinceConverted + = sourceIfUnmodifiedSince == null ? null : new DateTimeRfc1123(sourceIfUnmodifiedSince); + return service.appendBlockFromUrlSync(this.client.getUrl(), containerName, blob, comp, sourceUrl, sourceRange, + sourceContentMD5Converted, sourceContentcrc64Converted, timeout, contentLength, + transactionalContentMD5Converted, encryptionKey, encryptionKeySha256, encryptionAlgorithm, encryptionScope, + leaseId, maxSize, appendPosition, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, + ifNoneMatch, ifTags, sourceIfModifiedSinceConverted, sourceIfUnmodifiedSinceConverted, sourceIfMatch, + sourceIfNoneMatch, this.client.getVersion(), requestId, copySourceAuthorization, accept, context); + } + + /** + * The Append Block operation commits a new block of data to the end of an existing append blob where the contents + * are read from a source url. The Append Block operation is permitted only if the blob was created with + * x-ms-blob-type set to AppendBlob. Append Block is supported only on version 2015-02-21 version or later. + * + * @param containerName The container name. + * @param blob The blob name. + * @param sourceUrl Specify a URL to the copy source. + * @param contentLength The length of the request. + * @param sourceRange Bytes of source data in the specified range. + * @param sourceContentMD5 Specify the md5 calculated for the range of bytes that must be read from the copy source. + * @param sourceContentcrc64 Specify the crc64 calculated for the range of bytes that must be read from the copy + * source. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param transactionalContentMD5 Specify the transactional md5 for the body, to be validated by the service. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param maxSize Optional conditional header. The max length in bytes permitted for the append blob. If the Append + * Block operation would cause the blob to exceed that limit or if the blob size is already greater than the value + * specified in this header, the request will fail with MaxBlobSizeConditionNotMet error (HTTP status code 412 - + * Precondition Failed). + * @param appendPosition Optional conditional header, used only for the Append Block operation. A number indicating + * the byte offset to compare. Append Block will succeed only if the append position is equal to this number. If it + * is not, the request will fail with the AppendPositionConditionNotMet error (HTTP status code 412 - Precondition + * Failed). + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the + * specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since + * the specified date/time. + * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. + * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. + * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. + * @param sourceIfModifiedSince Specify this header value to operate only on a blob if it has been modified since + * the specified date/time. + * @param sourceIfUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified + * since the specified date/time. + * @param sourceIfMatch Specify an ETag value to operate only on blobs with a matching value. + * @param sourceIfNoneMatch Specify an ETag value to operate only on blobs without a matching value. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param copySourceAuthorization Only Bearer type is supported. Credentials should be a valid OAuth access token to + * copy source. + * @param cpkInfo Parameter group. + * @param encryptionScopeParam Parameter group. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws StorageErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void appendBlockFromUrl(String containerName, String blob, String sourceUrl, long contentLength, + String sourceRange, byte[] sourceContentMD5, byte[] sourceContentcrc64, Integer timeout, + byte[] transactionalContentMD5, String leaseId, Long maxSize, Long appendPosition, + OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, + String ifTags, OffsetDateTime sourceIfModifiedSince, OffsetDateTime sourceIfUnmodifiedSince, + String sourceIfMatch, String sourceIfNoneMatch, String requestId, String copySourceAuthorization, + CpkInfo cpkInfo, EncryptionScope encryptionScopeParam) { + appendBlockFromUrlWithResponse(containerName, blob, sourceUrl, contentLength, sourceRange, sourceContentMD5, + sourceContentcrc64, timeout, transactionalContentMD5, leaseId, maxSize, appendPosition, ifModifiedSince, + ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, sourceIfModifiedSince, sourceIfUnmodifiedSince, + sourceIfMatch, sourceIfNoneMatch, requestId, copySourceAuthorization, cpkInfo, encryptionScopeParam, + Context.none()); + } + + /** + * The Append Block operation commits a new block of data to the end of an existing append blob where the contents + * are read from a source url. The Append Block operation is permitted only if the blob was created with + * x-ms-blob-type set to AppendBlob. Append Block is supported only on version 2015-02-21 version or later. + * + * @param containerName The container name. + * @param blob The blob name. + * @param sourceUrl Specify a URL to the copy source. + * @param contentLength The length of the request. + * @param sourceRange Bytes of source data in the specified range. + * @param sourceContentMD5 Specify the md5 calculated for the range of bytes that must be read from the copy source. + * @param sourceContentcrc64 Specify the crc64 calculated for the range of bytes that must be read from the copy + * source. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param transactionalContentMD5 Specify the transactional md5 for the body, to be validated by the service. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param maxSize Optional conditional header. The max length in bytes permitted for the append blob. If the Append + * Block operation would cause the blob to exceed that limit or if the blob size is already greater than the value + * specified in this header, the request will fail with MaxBlobSizeConditionNotMet error (HTTP status code 412 - + * Precondition Failed). + * @param appendPosition Optional conditional header, used only for the Append Block operation. A number indicating + * the byte offset to compare. Append Block will succeed only if the append position is equal to this number. If it + * is not, the request will fail with the AppendPositionConditionNotMet error (HTTP status code 412 - Precondition + * Failed). + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the + * specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since + * the specified date/time. + * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. + * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. + * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. + * @param sourceIfModifiedSince Specify this header value to operate only on a blob if it has been modified since + * the specified date/time. + * @param sourceIfUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified + * since the specified date/time. + * @param sourceIfMatch Specify an ETag value to operate only on blobs with a matching value. + * @param sourceIfNoneMatch Specify an ETag value to operate only on blobs without a matching value. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param copySourceAuthorization Only Bearer type is supported. Credentials should be a valid OAuth access token to + * copy source. + * @param cpkInfo Parameter group. + * @param encryptionScopeParam Parameter group. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws StorageErrorException 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 Response appendBlockFromUrlNoCustomHeadersWithResponse(String containerName, String blob, + String sourceUrl, long contentLength, String sourceRange, byte[] sourceContentMD5, byte[] sourceContentcrc64, + Integer timeout, byte[] transactionalContentMD5, String leaseId, Long maxSize, Long appendPosition, + OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, + String ifTags, OffsetDateTime sourceIfModifiedSince, OffsetDateTime sourceIfUnmodifiedSince, + String sourceIfMatch, String sourceIfNoneMatch, String requestId, String copySourceAuthorization, + CpkInfo cpkInfo, EncryptionScope encryptionScopeParam, Context context) { + final String comp = "appendblock"; + final String accept = "application/xml"; + String encryptionKeyInternal = null; + if (cpkInfo != null) { + encryptionKeyInternal = cpkInfo.getEncryptionKey(); + } + String encryptionKey = encryptionKeyInternal; + String encryptionKeySha256Internal = null; + if (cpkInfo != null) { + encryptionKeySha256Internal = cpkInfo.getEncryptionKeySha256(); + } + String encryptionKeySha256 = encryptionKeySha256Internal; + EncryptionAlgorithmType encryptionAlgorithmInternal = null; + if (cpkInfo != null) { + encryptionAlgorithmInternal = cpkInfo.getEncryptionAlgorithm(); + } + EncryptionAlgorithmType encryptionAlgorithm = encryptionAlgorithmInternal; + String encryptionScopeInternal = null; + if (encryptionScopeParam != null) { + encryptionScopeInternal = encryptionScopeParam.getEncryptionScope(); + } + String encryptionScope = encryptionScopeInternal; + String sourceContentMD5Converted = Base64Util.encodeToString(sourceContentMD5); + String sourceContentcrc64Converted = Base64Util.encodeToString(sourceContentcrc64); + String transactionalContentMD5Converted = Base64Util.encodeToString(transactionalContentMD5); + DateTimeRfc1123 ifModifiedSinceConverted + = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); + DateTimeRfc1123 ifUnmodifiedSinceConverted + = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); + DateTimeRfc1123 sourceIfModifiedSinceConverted + = sourceIfModifiedSince == null ? null : new DateTimeRfc1123(sourceIfModifiedSince); + DateTimeRfc1123 sourceIfUnmodifiedSinceConverted + = sourceIfUnmodifiedSince == null ? null : new DateTimeRfc1123(sourceIfUnmodifiedSince); + return service.appendBlockFromUrlNoCustomHeadersSync(this.client.getUrl(), containerName, blob, comp, sourceUrl, + sourceRange, sourceContentMD5Converted, sourceContentcrc64Converted, timeout, contentLength, + transactionalContentMD5Converted, encryptionKey, encryptionKeySha256, encryptionAlgorithm, encryptionScope, + leaseId, maxSize, appendPosition, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, + ifNoneMatch, ifTags, sourceIfModifiedSinceConverted, sourceIfUnmodifiedSinceConverted, sourceIfMatch, + sourceIfNoneMatch, this.client.getVersion(), requestId, copySourceAuthorization, accept, context); + } + + /** + * The Seal operation seals the Append Blob to make it read-only. Seal is supported only on version 2019-12-12 + * version or later. + * + * @param containerName The container name. + * @param blob The blob name. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param requestId Provides a 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 StorageErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link ResponseBase}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ResponseBase sealWithResponse(String containerName, String blob, + Integer timeout, String requestId, String leaseId, OffsetDateTime ifModifiedSince, + OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, Long appendPosition, Context context) { + final String comp = "seal"; + final String accept = "application/xml"; + DateTimeRfc1123 ifModifiedSinceConverted + = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); + DateTimeRfc1123 ifUnmodifiedSinceConverted + = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); + return service.sealSync(this.client.getUrl(), containerName, blob, comp, timeout, this.client.getVersion(), + requestId, leaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, + appendPosition, accept, context); + } + + /** + * The Seal operation seals the Append Blob to make it read-only. Seal is supported only on version 2019-12-12 + * version or later. + * + * @param containerName The container name. + * @param blob The blob name. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the + * specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since + * the specified date/time. + * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. + * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. + * @param appendPosition Optional conditional header, used only for the Append Block operation. A number indicating + * the byte offset to compare. Append Block will succeed only if the append position is equal to this number. If it + * is not, the request will fail with the AppendPositionConditionNotMet error (HTTP status code 412 - Precondition + * Failed). + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws StorageErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void seal(String containerName, String blob, Integer timeout, String requestId, String leaseId, + OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, + Long appendPosition) { + sealWithResponse(containerName, blob, timeout, requestId, leaseId, ifModifiedSince, ifUnmodifiedSince, ifMatch, + ifNoneMatch, appendPosition, Context.none()); + } + + /** + * The Seal operation seals the Append Blob to make it read-only. Seal is supported only on version 2019-12-12 + * version or later. + * + * @param containerName The container name. + * @param blob The blob name. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the + * specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since + * the specified date/time. + * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. + * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. + * @param appendPosition Optional conditional header, used only for the Append Block operation. A number indicating + * the byte offset to compare. Append Block will succeed only if the append position is equal to this number. If it + * is not, the request will fail with the AppendPositionConditionNotMet error (HTTP status code 412 - Precondition + * Failed). + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws StorageErrorException 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 Response sealNoCustomHeadersWithResponse(String containerName, String blob, Integer timeout, + String requestId, String leaseId, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, + String ifMatch, String ifNoneMatch, Long appendPosition, Context context) { + final String comp = "seal"; + final String accept = "application/xml"; + DateTimeRfc1123 ifModifiedSinceConverted + = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); + DateTimeRfc1123 ifUnmodifiedSinceConverted + = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); + return service.sealNoCustomHeadersSync(this.client.getUrl(), containerName, blob, comp, timeout, + this.client.getVersion(), requestId, leaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, + ifNoneMatch, appendPosition, accept, context); + } +} diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/implementation/AzureBlobStorageImpl.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/implementation/AzureBlobStorageImpl.java new file mode 100644 index 000000000000..a4d6f69a30ab --- /dev/null +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/implementation/AzureBlobStorageImpl.java @@ -0,0 +1,157 @@ +// 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 io.clientcore.core.http.pipeline.HttpPipeline; + +/** + * 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. + */ + private final String url; + + /** + * Gets The URL of the service account, container, or blob that is the target of the desired operation. + * + * @return the url value. + */ + public String getUrl() { + return this.url; + } + + /** + * Specifies the version of the operation to use for this request. + */ + private final String version; + + /** + * Gets Specifies the version of the operation to use for this request. + * + * @return the version value. + */ + public String getVersion() { + return this.version; + } + + /** + * The HTTP pipeline to send requests through. + */ + private final HttpPipeline httpPipeline; + + /** + * Gets The HTTP pipeline to send requests through. + * + * @return the httpPipeline value. + */ + public HttpPipeline getHttpPipeline() { + return this.httpPipeline; + } + + /** + * The ServicesImpl object to access its operations. + */ + private final ServicesImpl services; + + /** + * Gets the ServicesImpl object to access its operations. + * + * @return the ServicesImpl object. + */ + public ServicesImpl getServices() { + return this.services; + } + + /** + * The ContainersImpl object to access its operations. + */ + private final ContainersImpl containers; + + /** + * Gets the ContainersImpl object to access its operations. + * + * @return the ContainersImpl object. + */ + public ContainersImpl getContainers() { + return this.containers; + } + + /** + * The BlobsImpl object to access its operations. + */ + private final BlobsImpl blobs; + + /** + * Gets the BlobsImpl object to access its operations. + * + * @return the BlobsImpl object. + */ + public BlobsImpl getBlobs() { + return this.blobs; + } + + /** + * The PageBlobsImpl object to access its operations. + */ + 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. + */ + private final AppendBlobsImpl appendBlobs; + + /** + * Gets the AppendBlobsImpl object to access its operations. + * + * @return the AppendBlobsImpl object. + */ + public AppendBlobsImpl getAppendBlobs() { + return this.appendBlobs; + } + + /** + * The BlockBlobsImpl object to access its operations. + */ + private final BlockBlobsImpl blockBlobs; + + /** + * Gets the BlockBlobsImpl object to access its operations. + * + * @return the BlockBlobsImpl object. + */ + public BlockBlobsImpl getBlockBlobs() { + return this.blockBlobs; + } + + /** + * 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. + */ + public AzureBlobStorageImpl(HttpPipeline httpPipeline, String url, String version) { + this.url = url; + this.version = "2025-01-05"; + this.httpPipeline = httpPipeline; + 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); + } +} diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/implementation/BlobsImpl.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/implementation/BlobsImpl.java new file mode 100644 index 000000000000..87638aebc476 --- /dev/null +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/implementation/BlobsImpl.java @@ -0,0 +1,4082 @@ +// 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.v2.annotation.ReturnType; +import com.azure.core.v2.annotation.ServiceMethod; +import com.azure.core.v2.http.rest.ResponseBase; +import io.clientcore.core.util.Base64Util; +import io.clientcore.core.http.models.DateTimeRfc1123; +import com.azure.storage.blob.models.AccessTier; +import com.azure.storage.blob.models.BlobCopySourceTagsMode; +import com.azure.storage.blob.models.BlobDeleteType; +import com.azure.storage.blob.models.BlobExpiryOptions; +import com.azure.storage.blob.models.BlobHttpHeaders; +import com.azure.storage.blob.models.BlobImmutabilityPolicyMode; +import com.azure.storage.blob.models.BlobsAbortCopyFromURLHeaders; +import com.azure.storage.blob.models.BlobsAcquireLeaseHeaders; +import com.azure.storage.blob.models.BlobsBreakLeaseHeaders; +import com.azure.storage.blob.models.BlobsChangeLeaseHeaders; +import com.azure.storage.blob.models.BlobsCopyFromURLHeaders; +import com.azure.storage.blob.models.BlobsCreateSnapshotHeaders; +import com.azure.storage.blob.models.BlobsDeleteHeaders; +import com.azure.storage.blob.models.BlobsDeleteImmutabilityPolicyHeaders; +import com.azure.storage.blob.models.BlobsDownloadHeaders; +import com.azure.storage.blob.models.BlobsGetAccountInfoHeaders; +import com.azure.storage.blob.models.BlobsGetPropertiesHeaders; +import com.azure.storage.blob.models.BlobsGetTagsHeaders; +import com.azure.storage.blob.models.BlobsQueryHeaders; +import com.azure.storage.blob.models.BlobsReleaseLeaseHeaders; +import com.azure.storage.blob.models.BlobsRenewLeaseHeaders; +import com.azure.storage.blob.models.BlobsSetExpiryHeaders; +import com.azure.storage.blob.models.BlobsSetHttpHeadersHeaders; +import com.azure.storage.blob.models.BlobsSetImmutabilityPolicyHeaders; +import com.azure.storage.blob.models.BlobsSetLegalHoldHeaders; +import com.azure.storage.blob.models.BlobsSetMetadataHeaders; +import com.azure.storage.blob.models.BlobsSetTagsHeaders; +import com.azure.storage.blob.models.BlobsSetTierHeaders; +import com.azure.storage.blob.models.BlobsStartCopyFromURLHeaders; +import com.azure.storage.blob.models.BlobsUndeleteHeaders; +import com.azure.storage.blob.models.BlobTags; +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.EncryptionScope; +import com.azure.storage.blob.models.QueryRequest; +import com.azure.storage.blob.models.RehydratePriority; +import com.azure.storage.blob.models.StorageErrorException; +import io.clientcore.core.annotation.ServiceInterface; +import io.clientcore.core.http.RestProxy; +import io.clientcore.core.http.annotation.BodyParam; +import io.clientcore.core.http.annotation.HeaderParam; +import io.clientcore.core.http.annotation.HostParam; +import io.clientcore.core.http.annotation.HttpRequestInformation; +import io.clientcore.core.http.annotation.PathParam; +import io.clientcore.core.http.annotation.QueryParam; +import io.clientcore.core.http.annotation.UnexpectedResponseExceptionDetail; +import io.clientcore.core.http.models.HttpMethod; +import io.clientcore.core.http.models.Response; +import io.clientcore.core.util.Context; +import java.io.InputStream; +import java.time.OffsetDateTime; +import java.util.Map; + +/** + * An instance of this class provides access to all the operations defined in Blobs. + */ +public final class BlobsImpl { + /** + * The proxy service used to perform REST calls. + */ + private final BlobsService service; + + /** + * The service client containing this operation class. + */ + private final AzureBlobStorageImpl client; + + /** + * Initializes an instance of BlobsImpl. + * + * @param client the instance of the service client containing this operation class. + */ + BlobsImpl(AzureBlobStorageImpl client) { + this.service = RestProxy.create(BlobsService.class, client.getHttpPipeline()); + this.client = client; + } + + /** + * The interface defining all the services for AzureBlobStorageBlobs to be used by the proxy service to perform REST + * calls. + */ + @ServiceInterface(name = "AzureBlobStorageBlob", host = "{url}") + public interface BlobsService { + @HttpRequestInformation( + method = HttpMethod.GET, + path = "/{containerName}/{blob}", + expectedStatusCodes = { 200, 206 }) + @UnexpectedResponseExceptionDetail + 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); + + @HttpRequestInformation( + method = HttpMethod.GET, + path = "/{containerName}/{blob}", + expectedStatusCodes = { 200, 206 }) + @UnexpectedResponseExceptionDetail + 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); + + @HttpRequestInformation( + method = HttpMethod.HEAD, + path = "/{containerName}/{blob}", + expectedStatusCodes = { 200 }) + @UnexpectedResponseExceptionDetail + 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); + + @HttpRequestInformation( + method = HttpMethod.HEAD, + path = "/{containerName}/{blob}", + expectedStatusCodes = { 200 }) + @UnexpectedResponseExceptionDetail + 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); + + @HttpRequestInformation( + method = HttpMethod.DELETE, + path = "/{containerName}/{blob}", + expectedStatusCodes = { 202 }) + @UnexpectedResponseExceptionDetail + ResponseBase deleteSync(@HostParam("url") String url, + @PathParam("containerName") String containerName, @PathParam("blob") String blob, + @QueryParam("snapshot") String snapshot, @QueryParam("versionid") String versionId, + @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-lease-id") String leaseId, + @HeaderParam("x-ms-delete-snapshots") DeleteSnapshotsOptionType deleteSnapshots, + @HeaderParam("If-Modified-Since") DateTimeRfc1123 ifModifiedSince, + @HeaderParam("If-Unmodified-Since") DateTimeRfc1123 ifUnmodifiedSince, + @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch, + @HeaderParam("x-ms-if-tags") String ifTags, @HeaderParam("x-ms-version") String version, + @HeaderParam("x-ms-client-request-id") String requestId, + @QueryParam("deletetype") BlobDeleteType blobDeleteType, @HeaderParam("Accept") String accept, + Context context); + + @HttpRequestInformation( + method = HttpMethod.DELETE, + path = "/{containerName}/{blob}", + expectedStatusCodes = { 202 }) + @UnexpectedResponseExceptionDetail + Response deleteNoCustomHeadersSync(@HostParam("url") String url, + @PathParam("containerName") String containerName, @PathParam("blob") String blob, + @QueryParam("snapshot") String snapshot, @QueryParam("versionid") String versionId, + @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-lease-id") String leaseId, + @HeaderParam("x-ms-delete-snapshots") DeleteSnapshotsOptionType deleteSnapshots, + @HeaderParam("If-Modified-Since") DateTimeRfc1123 ifModifiedSince, + @HeaderParam("If-Unmodified-Since") DateTimeRfc1123 ifUnmodifiedSince, + @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch, + @HeaderParam("x-ms-if-tags") String ifTags, @HeaderParam("x-ms-version") String version, + @HeaderParam("x-ms-client-request-id") String requestId, + @QueryParam("deletetype") BlobDeleteType blobDeleteType, @HeaderParam("Accept") String accept, + Context context); + + @HttpRequestInformation( + method = HttpMethod.PUT, + path = "/{containerName}/{blob}", + expectedStatusCodes = { 200 }) + @UnexpectedResponseExceptionDetail + 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); + + @HttpRequestInformation( + method = HttpMethod.PUT, + path = "/{containerName}/{blob}", + expectedStatusCodes = { 200 }) + @UnexpectedResponseExceptionDetail + 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); + + @HttpRequestInformation( + method = HttpMethod.PUT, + path = "/{containerName}/{blob}", + expectedStatusCodes = { 200 }) + @UnexpectedResponseExceptionDetail + 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); + + @HttpRequestInformation( + method = HttpMethod.PUT, + path = "/{containerName}/{blob}", + expectedStatusCodes = { 200 }) + @UnexpectedResponseExceptionDetail + 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); + + @HttpRequestInformation( + method = HttpMethod.PUT, + path = "/{containerName}/{blob}", + expectedStatusCodes = { 200 }) + @UnexpectedResponseExceptionDetail + 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); + + @HttpRequestInformation( + method = HttpMethod.PUT, + path = "/{containerName}/{blob}", + expectedStatusCodes = { 200 }) + @UnexpectedResponseExceptionDetail + 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); + + @HttpRequestInformation( + method = HttpMethod.PUT, + path = "/{containerName}/{blob}", + expectedStatusCodes = { 200 }) + @UnexpectedResponseExceptionDetail + 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); + + @HttpRequestInformation( + method = HttpMethod.PUT, + path = "/{containerName}/{blob}", + expectedStatusCodes = { 200 }) + @UnexpectedResponseExceptionDetail + 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); + + @HttpRequestInformation( + method = HttpMethod.DELETE, + path = "/{containerName}/{blob}", + expectedStatusCodes = { 200 }) + @UnexpectedResponseExceptionDetail + 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); + + @HttpRequestInformation( + method = HttpMethod.DELETE, + path = "/{containerName}/{blob}", + expectedStatusCodes = { 200 }) + @UnexpectedResponseExceptionDetail + 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); + + @HttpRequestInformation( + method = HttpMethod.PUT, + path = "/{containerName}/{blob}", + expectedStatusCodes = { 200 }) + @UnexpectedResponseExceptionDetail + 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); + + @HttpRequestInformation( + method = HttpMethod.PUT, + path = "/{containerName}/{blob}", + expectedStatusCodes = { 200 }) + @UnexpectedResponseExceptionDetail + 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); + + @HttpRequestInformation( + method = HttpMethod.PUT, + path = "/{containerName}/{blob}", + expectedStatusCodes = { 200 }) + @UnexpectedResponseExceptionDetail + 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); + + @HttpRequestInformation( + method = HttpMethod.PUT, + path = "/{containerName}/{blob}", + expectedStatusCodes = { 200 }) + @UnexpectedResponseExceptionDetail + 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); + + @HttpRequestInformation( + method = HttpMethod.PUT, + path = "/{containerName}/{blob}", + expectedStatusCodes = { 201 }) + @UnexpectedResponseExceptionDetail + 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); + + @HttpRequestInformation( + method = HttpMethod.PUT, + path = "/{containerName}/{blob}", + expectedStatusCodes = { 201 }) + @UnexpectedResponseExceptionDetail + 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); + + @HttpRequestInformation( + method = HttpMethod.PUT, + path = "/{containerName}/{blob}", + expectedStatusCodes = { 200 }) + @UnexpectedResponseExceptionDetail + 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); + + @HttpRequestInformation( + method = HttpMethod.PUT, + path = "/{containerName}/{blob}", + expectedStatusCodes = { 200 }) + @UnexpectedResponseExceptionDetail + 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); + + @HttpRequestInformation( + method = HttpMethod.PUT, + path = "/{containerName}/{blob}", + expectedStatusCodes = { 200 }) + @UnexpectedResponseExceptionDetail + 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); + + @HttpRequestInformation( + method = HttpMethod.PUT, + path = "/{containerName}/{blob}", + expectedStatusCodes = { 200 }) + @UnexpectedResponseExceptionDetail + 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); + + @HttpRequestInformation( + method = HttpMethod.PUT, + path = "/{containerName}/{blob}", + expectedStatusCodes = { 200 }) + @UnexpectedResponseExceptionDetail + 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); + + @HttpRequestInformation( + method = HttpMethod.PUT, + path = "/{containerName}/{blob}", + expectedStatusCodes = { 200 }) + @UnexpectedResponseExceptionDetail + 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); + + @HttpRequestInformation( + method = HttpMethod.PUT, + path = "/{containerName}/{blob}", + expectedStatusCodes = { 202 }) + @UnexpectedResponseExceptionDetail + 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); + + @HttpRequestInformation( + method = HttpMethod.PUT, + path = "/{containerName}/{blob}", + expectedStatusCodes = { 202 }) + @UnexpectedResponseExceptionDetail + 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); + + @HttpRequestInformation( + method = HttpMethod.PUT, + path = "/{containerName}/{blob}", + expectedStatusCodes = { 201 }) + @UnexpectedResponseExceptionDetail + 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); + + @HttpRequestInformation( + method = HttpMethod.PUT, + path = "/{containerName}/{blob}", + expectedStatusCodes = { 201 }) + @UnexpectedResponseExceptionDetail + 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); + + @HttpRequestInformation( + method = HttpMethod.PUT, + path = "/{containerName}/{blob}", + expectedStatusCodes = { 202 }) + @UnexpectedResponseExceptionDetail + 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); + + @HttpRequestInformation( + method = HttpMethod.PUT, + path = "/{containerName}/{blob}", + expectedStatusCodes = { 202 }) + @UnexpectedResponseExceptionDetail + 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); + + @HttpRequestInformation( + method = HttpMethod.PUT, + path = "/{containerName}/{blob}", + expectedStatusCodes = { 202 }) + @UnexpectedResponseExceptionDetail + ResponseBase copyFromURLSync(@HostParam("url") String url, + @PathParam("containerName") String containerName, @PathParam("blob") String blob, + @HeaderParam("x-ms-requires-sync") String xMsRequiresSync, @QueryParam("timeout") Integer timeout, + @HeaderParam("x-ms-meta-") Map metadata, @HeaderParam("x-ms-access-tier") AccessTier tier, + @HeaderParam("x-ms-source-if-modified-since") DateTimeRfc1123 sourceIfModifiedSince, + @HeaderParam("x-ms-source-if-unmodified-since") DateTimeRfc1123 sourceIfUnmodifiedSince, + @HeaderParam("x-ms-source-if-match") String sourceIfMatch, + @HeaderParam("x-ms-source-if-none-match") String sourceIfNoneMatch, + @HeaderParam("If-Modified-Since") DateTimeRfc1123 ifModifiedSince, + @HeaderParam("If-Unmodified-Since") DateTimeRfc1123 ifUnmodifiedSince, + @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch, + @HeaderParam("x-ms-if-tags") String ifTags, @HeaderParam("x-ms-copy-source") String copySource, + @HeaderParam("x-ms-lease-id") String leaseId, @HeaderParam("x-ms-version") String version, + @HeaderParam("x-ms-client-request-id") String requestId, + @HeaderParam("x-ms-source-content-md5") String sourceContentMD5, + @HeaderParam("x-ms-tags") String blobTagsString, + @HeaderParam("x-ms-immutability-policy-until-date") DateTimeRfc1123 immutabilityPolicyExpiry, + @HeaderParam("x-ms-immutability-policy-mode") BlobImmutabilityPolicyMode immutabilityPolicyMode, + @HeaderParam("x-ms-legal-hold") Boolean legalHold, + @HeaderParam("x-ms-copy-source-authorization") String copySourceAuthorization, + @HeaderParam("x-ms-encryption-scope") String encryptionScope, + @HeaderParam("x-ms-copy-source-tag-option") BlobCopySourceTagsMode copySourceTags, + @HeaderParam("Accept") String accept, Context context); + + @HttpRequestInformation( + method = HttpMethod.PUT, + path = "/{containerName}/{blob}", + expectedStatusCodes = { 202 }) + @UnexpectedResponseExceptionDetail + Response copyFromURLNoCustomHeadersSync(@HostParam("url") String url, + @PathParam("containerName") String containerName, @PathParam("blob") String blob, + @HeaderParam("x-ms-requires-sync") String xMsRequiresSync, @QueryParam("timeout") Integer timeout, + @HeaderParam("x-ms-meta-") Map metadata, @HeaderParam("x-ms-access-tier") AccessTier tier, + @HeaderParam("x-ms-source-if-modified-since") DateTimeRfc1123 sourceIfModifiedSince, + @HeaderParam("x-ms-source-if-unmodified-since") DateTimeRfc1123 sourceIfUnmodifiedSince, + @HeaderParam("x-ms-source-if-match") String sourceIfMatch, + @HeaderParam("x-ms-source-if-none-match") String sourceIfNoneMatch, + @HeaderParam("If-Modified-Since") DateTimeRfc1123 ifModifiedSince, + @HeaderParam("If-Unmodified-Since") DateTimeRfc1123 ifUnmodifiedSince, + @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch, + @HeaderParam("x-ms-if-tags") String ifTags, @HeaderParam("x-ms-copy-source") String copySource, + @HeaderParam("x-ms-lease-id") String leaseId, @HeaderParam("x-ms-version") String version, + @HeaderParam("x-ms-client-request-id") String requestId, + @HeaderParam("x-ms-source-content-md5") String sourceContentMD5, + @HeaderParam("x-ms-tags") String blobTagsString, + @HeaderParam("x-ms-immutability-policy-until-date") DateTimeRfc1123 immutabilityPolicyExpiry, + @HeaderParam("x-ms-immutability-policy-mode") BlobImmutabilityPolicyMode immutabilityPolicyMode, + @HeaderParam("x-ms-legal-hold") Boolean legalHold, + @HeaderParam("x-ms-copy-source-authorization") String copySourceAuthorization, + @HeaderParam("x-ms-encryption-scope") String encryptionScope, + @HeaderParam("x-ms-copy-source-tag-option") BlobCopySourceTagsMode copySourceTags, + @HeaderParam("Accept") String accept, Context context); + + @HttpRequestInformation( + method = HttpMethod.PUT, + path = "/{containerName}/{blob}", + expectedStatusCodes = { 204 }) + @UnexpectedResponseExceptionDetail + ResponseBase abortCopyFromURLSync(@HostParam("url") String url, + @PathParam("containerName") String containerName, @PathParam("blob") String blob, + @QueryParam("comp") String comp, @HeaderParam("x-ms-copy-action") String copyActionAbortConstant, + @QueryParam("copyid") String copyId, @QueryParam("timeout") Integer timeout, + @HeaderParam("x-ms-lease-id") String leaseId, @HeaderParam("x-ms-version") String version, + @HeaderParam("x-ms-client-request-id") String requestId, @HeaderParam("Accept") String accept, + Context context); + + @HttpRequestInformation( + method = HttpMethod.PUT, + path = "/{containerName}/{blob}", + expectedStatusCodes = { 204 }) + @UnexpectedResponseExceptionDetail + Response abortCopyFromURLNoCustomHeadersSync(@HostParam("url") String url, + @PathParam("containerName") String containerName, @PathParam("blob") String blob, + @QueryParam("comp") String comp, @HeaderParam("x-ms-copy-action") String copyActionAbortConstant, + @QueryParam("copyid") String copyId, @QueryParam("timeout") Integer timeout, + @HeaderParam("x-ms-lease-id") String leaseId, @HeaderParam("x-ms-version") String version, + @HeaderParam("x-ms-client-request-id") String requestId, @HeaderParam("Accept") String accept, + Context context); + + @HttpRequestInformation( + method = HttpMethod.PUT, + path = "/{containerName}/{blob}", + expectedStatusCodes = { 200, 202 }) + @UnexpectedResponseExceptionDetail + 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); + + @HttpRequestInformation( + method = HttpMethod.PUT, + path = "/{containerName}/{blob}", + expectedStatusCodes = { 200, 202 }) + @UnexpectedResponseExceptionDetail + 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); + + @HttpRequestInformation( + method = HttpMethod.GET, + path = "/{containerName}/{blob}", + expectedStatusCodes = { 200 }) + @UnexpectedResponseExceptionDetail + 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); + + @HttpRequestInformation( + method = HttpMethod.GET, + path = "/{containerName}/{blob}", + expectedStatusCodes = { 200 }) + @UnexpectedResponseExceptionDetail + 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); + + @HttpRequestInformation( + method = HttpMethod.POST, + path = "/{containerName}/{blob}", + expectedStatusCodes = { 200, 206 }) + @UnexpectedResponseExceptionDetail + 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); + + @HttpRequestInformation( + method = HttpMethod.POST, + path = "/{containerName}/{blob}", + expectedStatusCodes = { 200, 206 }) + @UnexpectedResponseExceptionDetail + 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); + + @HttpRequestInformation( + method = HttpMethod.GET, + path = "/{containerName}/{blob}", + expectedStatusCodes = { 200 }) + @UnexpectedResponseExceptionDetail + ResponseBase getTagsSync(@HostParam("url") String url, + @PathParam("containerName") String containerName, @PathParam("blob") String blob, + @QueryParam("comp") String comp, @QueryParam("timeout") Integer timeout, + @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, + @QueryParam("snapshot") String snapshot, @QueryParam("versionid") String versionId, + @HeaderParam("x-ms-if-tags") String ifTags, @HeaderParam("x-ms-lease-id") String leaseId, + @HeaderParam("Accept") String accept, Context context); + + @HttpRequestInformation( + method = HttpMethod.GET, + path = "/{containerName}/{blob}", + expectedStatusCodes = { 200 }) + @UnexpectedResponseExceptionDetail + Response getTagsNoCustomHeadersSync(@HostParam("url") String url, + @PathParam("containerName") String containerName, @PathParam("blob") String blob, + @QueryParam("comp") String comp, @QueryParam("timeout") Integer timeout, + @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, + @QueryParam("snapshot") String snapshot, @QueryParam("versionid") String versionId, + @HeaderParam("x-ms-if-tags") String ifTags, @HeaderParam("x-ms-lease-id") String leaseId, + @HeaderParam("Accept") String accept, Context context); + + @HttpRequestInformation( + method = HttpMethod.PUT, + path = "/{containerName}/{blob}", + expectedStatusCodes = { 204 }) + @UnexpectedResponseExceptionDetail + ResponseBase setTagsSync(@HostParam("url") String url, + @PathParam("containerName") String containerName, @PathParam("blob") String blob, + @QueryParam("comp") String comp, @HeaderParam("x-ms-version") String version, + @QueryParam("timeout") Integer timeout, @QueryParam("versionid") String versionId, + @HeaderParam("Content-MD5") String transactionalContentMD5, + @HeaderParam("x-ms-content-crc64") String transactionalContentCrc64, + @HeaderParam("x-ms-client-request-id") String requestId, @HeaderParam("x-ms-if-tags") String ifTags, + @HeaderParam("x-ms-lease-id") String leaseId, @BodyParam("application/xml") BlobTags tags, + @HeaderParam("Accept") String accept, Context context); + + @HttpRequestInformation( + method = HttpMethod.PUT, + path = "/{containerName}/{blob}", + expectedStatusCodes = { 204 }) + @UnexpectedResponseExceptionDetail + Response setTagsNoCustomHeadersSync(@HostParam("url") String url, + @PathParam("containerName") String containerName, @PathParam("blob") String blob, + @QueryParam("comp") String comp, @HeaderParam("x-ms-version") String version, + @QueryParam("timeout") Integer timeout, @QueryParam("versionid") String versionId, + @HeaderParam("Content-MD5") String transactionalContentMD5, + @HeaderParam("x-ms-content-crc64") String transactionalContentCrc64, + @HeaderParam("x-ms-client-request-id") String requestId, @HeaderParam("x-ms-if-tags") String ifTags, + @HeaderParam("x-ms-lease-id") String leaseId, @BodyParam("application/xml") BlobTags tags, + @HeaderParam("Accept") String accept, Context context); + } + + /** + * The Download operation reads or downloads a blob from the system, including its metadata and properties. You can + * also call Download to read a snapshot or version. + * + * @param containerName The container name. + * @param blob The blob name. + * @param snapshot The snapshot parameter is an opaque DateTime value that, when present, specifies the blob + * snapshot to retrieve. For more information on working with blob snapshots, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/creating-a-snapshot-of-a-blob">Creating + * a Snapshot of a Blob.</a>. + * @param versionId The version id parameter is an opaque DateTime value that, when present, specifies the version + * of the blob to operate on. It's for service version 2019-10-10 and newer. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param 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 StorageErrorException 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) { + 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); + } + + /** + * The Download operation reads or downloads a blob from the system, including its metadata and properties. You can + * also call Download to read a snapshot or version. + * + * @param containerName The container name. + * @param blob The blob name. + * @param snapshot The snapshot parameter is an opaque DateTime value that, when present, specifies the blob + * snapshot to retrieve. For more information on working with blob snapshots, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/creating-a-snapshot-of-a-blob">Creating + * a Snapshot of a Blob.</a>. + * @param versionId The version id parameter is an opaque DateTime value that, when present, specifies the version + * of the blob to operate on. It's for service version 2019-10-10 and newer. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param 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 StorageErrorException 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) { + return downloadWithResponse(containerName, blob, snapshot, versionId, timeout, range, leaseId, + rangeGetContentMD5, rangeGetContentCRC64, structuredBodyType, ifModifiedSince, ifUnmodifiedSince, ifMatch, + ifNoneMatch, ifTags, requestId, cpkInfo, Context.none()).getValue(); + } + + /** + * The Download operation reads or downloads a blob from the system, including its metadata and properties. You can + * also call Download to read a snapshot or version. + * + * @param containerName The container name. + * @param blob The blob name. + * @param snapshot The snapshot parameter is an opaque DateTime value that, when present, specifies the blob + * snapshot to retrieve. For more information on working with blob snapshots, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/creating-a-snapshot-of-a-blob">Creating + * a Snapshot of a Blob.</a>. + * @param versionId The version id parameter is an opaque DateTime value that, when present, specifies the version + * of the blob to operate on. It's for service version 2019-10-10 and newer. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param 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 StorageErrorException 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 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) { + 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); + } + + /** + * The Get Properties operation returns all user-defined metadata, standard HTTP properties, and system properties + * for the blob. It does not return the content of the blob. + * + * @param containerName The container name. + * @param blob The blob name. + * @param snapshot The snapshot parameter is an opaque DateTime value that, when present, specifies the blob + * snapshot to retrieve. For more information on working with blob snapshots, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/creating-a-snapshot-of-a-blob">Creating + * a Snapshot of a Blob.</a>. + * @param versionId The version id parameter is an opaque DateTime value that, when present, specifies the version + * of the blob to operate on. It's for service version 2019-10-10 and newer. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the + * specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since + * the specified date/time. + * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. + * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. + * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param cpkInfo Parameter group. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws StorageErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link ResponseBase}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ResponseBase getPropertiesWithResponse(String containerName, String blob, + String snapshot, String versionId, Integer timeout, String leaseId, OffsetDateTime ifModifiedSince, + OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, String ifTags, String requestId, + CpkInfo cpkInfo, Context context) { + final String accept = "application/xml"; + String encryptionKeyInternal = null; + if (cpkInfo != null) { + encryptionKeyInternal = cpkInfo.getEncryptionKey(); + } + String encryptionKey = encryptionKeyInternal; + String encryptionKeySha256Internal = null; + if (cpkInfo != null) { + encryptionKeySha256Internal = cpkInfo.getEncryptionKeySha256(); + } + String encryptionKeySha256 = encryptionKeySha256Internal; + EncryptionAlgorithmType encryptionAlgorithmInternal = null; + if (cpkInfo != null) { + encryptionAlgorithmInternal = cpkInfo.getEncryptionAlgorithm(); + } + EncryptionAlgorithmType encryptionAlgorithm = encryptionAlgorithmInternal; + DateTimeRfc1123 ifModifiedSinceConverted + = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); + DateTimeRfc1123 ifUnmodifiedSinceConverted + = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); + return service.getPropertiesSync(this.client.getUrl(), containerName, blob, snapshot, versionId, timeout, + leaseId, encryptionKey, encryptionKeySha256, encryptionAlgorithm, ifModifiedSinceConverted, + ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, this.client.getVersion(), requestId, accept, + context); + } + + /** + * The Get Properties operation returns all user-defined metadata, standard HTTP properties, and system properties + * for the blob. It does not return the content of the blob. + * + * @param containerName The container name. + * @param blob The blob name. + * @param snapshot The snapshot parameter is an opaque DateTime value that, when present, specifies the blob + * snapshot to retrieve. For more information on working with blob snapshots, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/creating-a-snapshot-of-a-blob">Creating + * a Snapshot of a Blob.</a>. + * @param versionId The version id parameter is an opaque DateTime value that, when present, specifies the version + * of the blob to operate on. It's for service version 2019-10-10 and newer. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the + * specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since + * the specified date/time. + * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. + * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. + * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param cpkInfo Parameter group. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws StorageErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void getProperties(String containerName, String blob, String snapshot, String versionId, Integer timeout, + String leaseId, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, + String ifNoneMatch, String ifTags, String requestId, CpkInfo cpkInfo) { + getPropertiesWithResponse(containerName, blob, snapshot, versionId, timeout, leaseId, ifModifiedSince, + ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, requestId, cpkInfo, Context.none()); + } + + /** + * The Get Properties operation returns all user-defined metadata, standard HTTP properties, and system properties + * for the blob. It does not return the content of the blob. + * + * @param containerName The container name. + * @param blob The blob name. + * @param snapshot The snapshot parameter is an opaque DateTime value that, when present, specifies the blob + * snapshot to retrieve. For more information on working with blob snapshots, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/creating-a-snapshot-of-a-blob">Creating + * a Snapshot of a Blob.</a>. + * @param versionId The version id parameter is an opaque DateTime value that, when present, specifies the version + * of the blob to operate on. It's for service version 2019-10-10 and newer. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the + * specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since + * the specified date/time. + * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. + * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. + * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param cpkInfo Parameter group. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws StorageErrorException 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 Response getPropertiesNoCustomHeadersWithResponse(String containerName, String blob, String snapshot, + String versionId, Integer timeout, String leaseId, OffsetDateTime ifModifiedSince, + OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, String ifTags, String requestId, + CpkInfo cpkInfo, Context context) { + final String accept = "application/xml"; + String encryptionKeyInternal = null; + if (cpkInfo != null) { + encryptionKeyInternal = cpkInfo.getEncryptionKey(); + } + String encryptionKey = encryptionKeyInternal; + String encryptionKeySha256Internal = null; + if (cpkInfo != null) { + encryptionKeySha256Internal = cpkInfo.getEncryptionKeySha256(); + } + String encryptionKeySha256 = encryptionKeySha256Internal; + EncryptionAlgorithmType encryptionAlgorithmInternal = null; + if (cpkInfo != null) { + encryptionAlgorithmInternal = cpkInfo.getEncryptionAlgorithm(); + } + EncryptionAlgorithmType encryptionAlgorithm = encryptionAlgorithmInternal; + DateTimeRfc1123 ifModifiedSinceConverted + = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); + DateTimeRfc1123 ifUnmodifiedSinceConverted + = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); + return service.getPropertiesNoCustomHeadersSync(this.client.getUrl(), containerName, blob, snapshot, versionId, + timeout, leaseId, encryptionKey, encryptionKeySha256, encryptionAlgorithm, ifModifiedSinceConverted, + ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, this.client.getVersion(), requestId, accept, + context); + } + + /** + * If the storage account's soft delete feature is disabled then, when a blob is deleted, it is permanently removed + * from the storage account. If the storage account's soft delete feature is enabled, then, when a blob is deleted, + * it is marked for deletion and becomes inaccessible immediately. However, the blob service retains the blob or + * snapshot for the number of days specified by the DeleteRetentionPolicy section of [Storage service properties] + * (Set-Blob-Service-Properties.md). After the specified number of days has passed, the blob's data is permanently + * removed from the storage account. Note that you continue to be charged for the soft-deleted blob's storage until + * it is permanently removed. Use the List Blobs API and specify the "include=deleted" query parameter to discover + * which blobs and snapshots have been soft deleted. You can then use the Undelete Blob API to restore a + * soft-deleted blob. All other operations on a soft-deleted blob or snapshot causes the service to return an HTTP + * status code of 404 (ResourceNotFound). If the storage account's automatic snapshot feature is enabled, then, when + * a blob is deleted, an automatic snapshot is created. The blob becomes inaccessible immediately. All other + * operations on the blob causes the service to return an HTTP status code of 404 (ResourceNotFound). You can access + * automatic snapshot using snapshot timestamp or version id. You can restore the blob by calling Put or Copy Blob + * API with automatic snapshot as source. Deleting automatic snapshot requires shared key or special SAS/RBAC + * permissions. + * + * @param containerName The container name. + * @param blob The blob name. + * @param snapshot The snapshot parameter is an opaque DateTime value that, when present, specifies the blob + * snapshot to retrieve. For more information on working with blob snapshots, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/creating-a-snapshot-of-a-blob">Creating + * a Snapshot of a Blob.</a>. + * @param versionId The version id parameter is an opaque DateTime value that, when present, specifies the version + * of the blob to operate on. It's for service version 2019-10-10 and newer. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param deleteSnapshots Required if the blob has associated snapshots. Specify one of the following two options: + * include: Delete the base blob and all of its snapshots. only: Delete only the blob's snapshots and not the blob + * itself. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the + * specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since + * the specified date/time. + * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. + * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. + * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param blobDeleteType Optional. Only possible value is 'permanent', which specifies to permanently delete a blob + * if blob soft delete is enabled. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws StorageErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link ResponseBase}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ResponseBase deleteWithResponse(String containerName, String blob, String snapshot, + String versionId, Integer timeout, String leaseId, DeleteSnapshotsOptionType deleteSnapshots, + OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, + String ifTags, String requestId, BlobDeleteType blobDeleteType, Context context) { + final String accept = "application/xml"; + DateTimeRfc1123 ifModifiedSinceConverted + = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); + DateTimeRfc1123 ifUnmodifiedSinceConverted + = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); + return service.deleteSync(this.client.getUrl(), containerName, blob, snapshot, versionId, timeout, leaseId, + deleteSnapshots, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, + this.client.getVersion(), requestId, blobDeleteType, accept, context); + } + + /** + * If the storage account's soft delete feature is disabled then, when a blob is deleted, it is permanently removed + * from the storage account. If the storage account's soft delete feature is enabled, then, when a blob is deleted, + * it is marked for deletion and becomes inaccessible immediately. However, the blob service retains the blob or + * snapshot for the number of days specified by the DeleteRetentionPolicy section of [Storage service properties] + * (Set-Blob-Service-Properties.md). After the specified number of days has passed, the blob's data is permanently + * removed from the storage account. Note that you continue to be charged for the soft-deleted blob's storage until + * it is permanently removed. Use the List Blobs API and specify the "include=deleted" query parameter to discover + * which blobs and snapshots have been soft deleted. You can then use the Undelete Blob API to restore a + * soft-deleted blob. All other operations on a soft-deleted blob or snapshot causes the service to return an HTTP + * status code of 404 (ResourceNotFound). If the storage account's automatic snapshot feature is enabled, then, when + * a blob is deleted, an automatic snapshot is created. The blob becomes inaccessible immediately. All other + * operations on the blob causes the service to return an HTTP status code of 404 (ResourceNotFound). You can access + * automatic snapshot using snapshot timestamp or version id. You can restore the blob by calling Put or Copy Blob + * API with automatic snapshot as source. Deleting automatic snapshot requires shared key or special SAS/RBAC + * permissions. + * + * @param containerName The container name. + * @param blob The blob name. + * @param snapshot The snapshot parameter is an opaque DateTime value that, when present, specifies the blob + * snapshot to retrieve. For more information on working with blob snapshots, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/creating-a-snapshot-of-a-blob">Creating + * a Snapshot of a Blob.</a>. + * @param versionId The version id parameter is an opaque DateTime value that, when present, specifies the version + * of the blob to operate on. It's for service version 2019-10-10 and newer. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param deleteSnapshots Required if the blob has associated snapshots. Specify one of the following two options: + * include: Delete the base blob and all of its snapshots. only: Delete only the blob's snapshots and not the blob + * itself. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the + * specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since + * the specified date/time. + * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. + * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. + * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param blobDeleteType Optional. Only possible value is 'permanent', which specifies to permanently delete a blob + * if blob soft delete is enabled. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws StorageErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String containerName, String blob, String snapshot, String versionId, Integer timeout, + String leaseId, DeleteSnapshotsOptionType deleteSnapshots, OffsetDateTime ifModifiedSince, + OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, String ifTags, String requestId, + BlobDeleteType blobDeleteType) { + deleteWithResponse(containerName, blob, snapshot, versionId, timeout, leaseId, deleteSnapshots, ifModifiedSince, + ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, requestId, blobDeleteType, Context.none()); + } + + /** + * If the storage account's soft delete feature is disabled then, when a blob is deleted, it is permanently removed + * from the storage account. If the storage account's soft delete feature is enabled, then, when a blob is deleted, + * it is marked for deletion and becomes inaccessible immediately. However, the blob service retains the blob or + * snapshot for the number of days specified by the DeleteRetentionPolicy section of [Storage service properties] + * (Set-Blob-Service-Properties.md). After the specified number of days has passed, the blob's data is permanently + * removed from the storage account. Note that you continue to be charged for the soft-deleted blob's storage until + * it is permanently removed. Use the List Blobs API and specify the "include=deleted" query parameter to discover + * which blobs and snapshots have been soft deleted. You can then use the Undelete Blob API to restore a + * soft-deleted blob. All other operations on a soft-deleted blob or snapshot causes the service to return an HTTP + * status code of 404 (ResourceNotFound). If the storage account's automatic snapshot feature is enabled, then, when + * a blob is deleted, an automatic snapshot is created. The blob becomes inaccessible immediately. All other + * operations on the blob causes the service to return an HTTP status code of 404 (ResourceNotFound). You can access + * automatic snapshot using snapshot timestamp or version id. You can restore the blob by calling Put or Copy Blob + * API with automatic snapshot as source. Deleting automatic snapshot requires shared key or special SAS/RBAC + * permissions. + * + * @param containerName The container name. + * @param blob The blob name. + * @param snapshot The snapshot parameter is an opaque DateTime value that, when present, specifies the blob + * snapshot to retrieve. For more information on working with blob snapshots, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/creating-a-snapshot-of-a-blob">Creating + * a Snapshot of a Blob.</a>. + * @param versionId The version id parameter is an opaque DateTime value that, when present, specifies the version + * of the blob to operate on. It's for service version 2019-10-10 and newer. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param deleteSnapshots Required if the blob has associated snapshots. Specify one of the following two options: + * include: Delete the base blob and all of its snapshots. only: Delete only the blob's snapshots and not the blob + * itself. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the + * specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since + * the specified date/time. + * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. + * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. + * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param blobDeleteType Optional. Only possible value is 'permanent', which specifies to permanently delete a blob + * if blob soft delete is enabled. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws StorageErrorException 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 Response deleteNoCustomHeadersWithResponse(String containerName, String blob, String snapshot, + String versionId, Integer timeout, String leaseId, DeleteSnapshotsOptionType deleteSnapshots, + OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, + String ifTags, String requestId, BlobDeleteType blobDeleteType, Context context) { + final String accept = "application/xml"; + DateTimeRfc1123 ifModifiedSinceConverted + = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); + DateTimeRfc1123 ifUnmodifiedSinceConverted + = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); + return service.deleteNoCustomHeadersSync(this.client.getUrl(), containerName, blob, snapshot, versionId, + timeout, leaseId, deleteSnapshots, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, + ifNoneMatch, ifTags, this.client.getVersion(), requestId, blobDeleteType, accept, context); + } + + /** + * Undelete a blob that was previously soft deleted. + * + * @param containerName The container name. + * @param blob The blob name. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws StorageErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link ResponseBase}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ResponseBase undeleteWithResponse(String containerName, String blob, + Integer timeout, String requestId, Context context) { + final String comp = "undelete"; + final String accept = "application/xml"; + return service.undeleteSync(this.client.getUrl(), containerName, blob, comp, timeout, this.client.getVersion(), + requestId, accept, context); + } + + /** + * Undelete a blob that was previously soft deleted. + * + * @param containerName The container name. + * @param blob The blob name. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws StorageErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void undelete(String containerName, String blob, Integer timeout, String requestId) { + undeleteWithResponse(containerName, blob, timeout, requestId, Context.none()); + } + + /** + * Undelete a blob that was previously soft deleted. + * + * @param containerName The container name. + * @param blob The blob name. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws StorageErrorException 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 Response undeleteNoCustomHeadersWithResponse(String containerName, String blob, Integer timeout, + String requestId, Context context) { + final String comp = "undelete"; + final String accept = "application/xml"; + return service.undeleteNoCustomHeadersSync(this.client.getUrl(), containerName, blob, comp, timeout, + this.client.getVersion(), requestId, accept, context); + } + + /** + * Sets the time a blob will expire and be deleted. + * + * @param containerName The container name. + * @param blob The blob name. + * @param expiryOptions Required. Indicates mode of the expiry time. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param expiresOn The time to set the blob to expiry. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws StorageErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link ResponseBase}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ResponseBase setExpiryWithResponse(String containerName, String blob, + BlobExpiryOptions expiryOptions, Integer timeout, String requestId, String expiresOn, Context context) { + final String comp = "expiry"; + final String accept = "application/xml"; + return service.setExpirySync(this.client.getUrl(), containerName, blob, comp, timeout, this.client.getVersion(), + requestId, expiryOptions, expiresOn, accept, context); + } + + /** + * Sets the time a blob will expire and be deleted. + * + * @param containerName The container name. + * @param blob The blob name. + * @param expiryOptions Required. Indicates mode of the expiry time. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param expiresOn The time to set the blob to expiry. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws StorageErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void setExpiry(String containerName, String blob, BlobExpiryOptions expiryOptions, Integer timeout, + String requestId, String expiresOn) { + setExpiryWithResponse(containerName, blob, expiryOptions, timeout, requestId, expiresOn, Context.none()); + } + + /** + * Sets the time a blob will expire and be deleted. + * + * @param containerName The container name. + * @param blob The blob name. + * @param expiryOptions Required. Indicates mode of the expiry time. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param expiresOn The time to set the blob to expiry. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws StorageErrorException 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 Response setExpiryNoCustomHeadersWithResponse(String containerName, String blob, + BlobExpiryOptions expiryOptions, Integer timeout, String requestId, String expiresOn, Context context) { + final String comp = "expiry"; + final String accept = "application/xml"; + return service.setExpiryNoCustomHeadersSync(this.client.getUrl(), containerName, blob, comp, timeout, + this.client.getVersion(), requestId, expiryOptions, expiresOn, accept, context); + } + + /** + * The Set HTTP Headers operation sets system properties on the blob. + * + * @param containerName The container name. + * @param blob The blob name. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @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 StorageErrorException thrown if 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) { + 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); + } + + /** + * The Set HTTP Headers operation sets system properties on the blob. + * + * @param containerName The container name. + * @param blob The blob name. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the + * specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since + * the specified date/time. + * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. + * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. + * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param blobHttpHeaders Parameter group. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws StorageErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void setHttpHeaders(String containerName, String blob, Integer timeout, String leaseId, + OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, + String ifTags, String requestId, BlobHttpHeaders blobHttpHeaders) { + setHttpHeadersWithResponse(containerName, blob, timeout, leaseId, ifModifiedSince, ifUnmodifiedSince, ifMatch, + ifNoneMatch, ifTags, requestId, blobHttpHeaders, Context.none()); + } + + /** + * The Set HTTP Headers operation sets system properties on the blob. + * + * @param containerName The container name. + * @param blob The blob name. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the + * specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since + * the specified date/time. + * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. + * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. + * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param blobHttpHeaders Parameter group. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws StorageErrorException 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 Response setHttpHeadersNoCustomHeadersWithResponse(String containerName, String blob, Integer timeout, + String leaseId, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, + String ifNoneMatch, String ifTags, String requestId, BlobHttpHeaders blobHttpHeaders, Context context) { + final String comp = "properties"; + final String accept = "application/xml"; + String cacheControlInternal = null; + if (blobHttpHeaders != null) { + cacheControlInternal = blobHttpHeaders.getCacheControl(); + } + String cacheControl = cacheControlInternal; + String contentTypeInternal = null; + if (blobHttpHeaders != null) { + contentTypeInternal = blobHttpHeaders.getContentType(); + } + String contentType = contentTypeInternal; + byte[] contentMd5Internal = null; + if (blobHttpHeaders != null) { + contentMd5Internal = blobHttpHeaders.getContentMd5(); + } + byte[] contentMd5 = contentMd5Internal; + String contentEncodingInternal = null; + if (blobHttpHeaders != null) { + contentEncodingInternal = blobHttpHeaders.getContentEncoding(); + } + String contentEncoding = contentEncodingInternal; + String contentLanguageInternal = null; + if (blobHttpHeaders != null) { + contentLanguageInternal = blobHttpHeaders.getContentLanguage(); + } + String contentLanguage = contentLanguageInternal; + String contentDispositionInternal = null; + if (blobHttpHeaders != null) { + contentDispositionInternal = blobHttpHeaders.getContentDisposition(); + } + String contentDisposition = contentDispositionInternal; + String contentMd5Converted = Base64Util.encodeToString(contentMd5); + DateTimeRfc1123 ifModifiedSinceConverted + = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); + DateTimeRfc1123 ifUnmodifiedSinceConverted + = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); + return service.setHttpHeadersNoCustomHeadersSync(this.client.getUrl(), containerName, blob, comp, timeout, + cacheControl, contentType, contentMd5Converted, contentEncoding, contentLanguage, leaseId, + ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, contentDisposition, + this.client.getVersion(), requestId, accept, context); + } + + /** + * The Set Immutability Policy operation sets the immutability policy on the blob. + * + * @param containerName The container name. + * @param blob The blob name. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since + * the specified date/time. + * @param immutabilityPolicyExpiry Specifies the date time when the blobs immutability policy is set to expire. + * @param immutabilityPolicyMode Specifies the immutability policy mode to set on the blob. + * @param snapshot The snapshot parameter is an opaque DateTime value that, when present, specifies the blob + * snapshot to retrieve. For more information on working with blob snapshots, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/creating-a-snapshot-of-a-blob">Creating + * a Snapshot of a Blob.</a>. + * @param versionId The version id parameter is an opaque DateTime value that, when present, specifies the version + * of the blob to operate on. It's for service version 2019-10-10 and newer. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws StorageErrorException thrown if 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) { + 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); + } + + /** + * The Set Immutability Policy operation sets the immutability policy on the blob. + * + * @param containerName The container name. + * @param blob The blob name. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since + * the specified date/time. + * @param immutabilityPolicyExpiry Specifies the date time when the blobs immutability policy is set to expire. + * @param immutabilityPolicyMode Specifies the immutability policy mode to set on the blob. + * @param snapshot The snapshot parameter is an opaque DateTime value that, when present, specifies the blob + * snapshot to retrieve. For more information on working with blob snapshots, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/creating-a-snapshot-of-a-blob">Creating + * a Snapshot of a Blob.</a>. + * @param versionId The version id parameter is an opaque DateTime value that, when present, specifies the version + * of the blob to operate on. It's for service version 2019-10-10 and newer. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws StorageErrorException 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://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since + * the specified date/time. + * @param immutabilityPolicyExpiry Specifies the date time when the blobs immutability policy is set to expire. + * @param immutabilityPolicyMode Specifies the immutability policy mode to set on the blob. + * @param snapshot The snapshot parameter is an opaque DateTime value that, when present, specifies the blob + * snapshot to retrieve. For more information on working with blob snapshots, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/creating-a-snapshot-of-a-blob">Creating + * a Snapshot of a Blob.</a>. + * @param versionId The version id parameter is an opaque DateTime value that, when present, specifies the version + * of the blob to operate on. It's for service version 2019-10-10 and newer. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws StorageErrorException 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 Response setImmutabilityPolicyNoCustomHeadersWithResponse(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.setImmutabilityPolicyNoCustomHeadersSync(this.client.getUrl(), containerName, blob, comp, + timeout, this.client.getVersion(), requestId, ifUnmodifiedSinceConverted, immutabilityPolicyExpiryConverted, + immutabilityPolicyMode, snapshot, versionId, accept, context); + } + + /** + * The Delete Immutability Policy operation deletes the immutability policy on the blob. + * + * @param containerName The container name. + * @param blob The blob name. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param snapshot The snapshot parameter is an opaque DateTime value that, when present, specifies the blob + * snapshot to retrieve. For more information on working with blob snapshots, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/creating-a-snapshot-of-a-blob">Creating + * a Snapshot of a Blob.</a>. + * @param versionId The version id parameter is an opaque DateTime value that, when present, specifies the version + * of the blob to operate on. It's for service version 2019-10-10 and newer. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws StorageErrorException thrown if 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) { + 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); + } + + /** + * The Delete Immutability Policy operation deletes the immutability policy on the blob. + * + * @param containerName The container name. + * @param blob The blob name. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param snapshot The snapshot parameter is an opaque DateTime value that, when present, specifies the blob + * snapshot to retrieve. For more information on working with blob snapshots, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/creating-a-snapshot-of-a-blob">Creating + * a Snapshot of a Blob.</a>. + * @param versionId The version id parameter is an opaque DateTime value that, when present, specifies the version + * of the blob to operate on. It's for service version 2019-10-10 and newer. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws StorageErrorException 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://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param snapshot The snapshot parameter is an opaque DateTime value that, when present, specifies the blob + * snapshot to retrieve. For more information on working with blob snapshots, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/creating-a-snapshot-of-a-blob">Creating + * a Snapshot of a Blob.</a>. + * @param versionId The version id parameter is an opaque DateTime value that, when present, specifies the version + * of the blob to operate on. It's for service version 2019-10-10 and newer. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws StorageErrorException 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 Response deleteImmutabilityPolicyNoCustomHeadersWithResponse(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.deleteImmutabilityPolicyNoCustomHeadersSync(this.client.getUrl(), containerName, blob, comp, + timeout, this.client.getVersion(), requestId, snapshot, versionId, accept, context); + } + + /** + * The Set Legal Hold operation sets a legal hold on the blob. + * + * @param containerName The container name. + * @param blob The blob name. + * @param legalHold Specified if a legal hold should be set on the blob. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param snapshot The snapshot parameter is an opaque DateTime value that, when present, specifies the blob + * snapshot to retrieve. For more information on working with blob snapshots, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/creating-a-snapshot-of-a-blob">Creating + * a Snapshot of a Blob.</a>. + * @param versionId The version id parameter is an opaque DateTime value that, when present, specifies the version + * of the blob to operate on. It's for service version 2019-10-10 and newer. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws StorageErrorException thrown if 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) { + 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); + } + + /** + * The Set Legal Hold operation sets a legal hold on the blob. + * + * @param containerName The container name. + * @param blob The blob name. + * @param legalHold Specified if a legal hold should be set on the blob. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param snapshot The snapshot parameter is an opaque DateTime value that, when present, specifies the blob + * snapshot to retrieve. For more information on working with blob snapshots, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/creating-a-snapshot-of-a-blob">Creating + * a Snapshot of a Blob.</a>. + * @param versionId The version id parameter is an opaque DateTime value that, when present, specifies the version + * of the blob to operate on. It's for service version 2019-10-10 and newer. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws StorageErrorException 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://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param snapshot The snapshot parameter is an opaque DateTime value that, when present, specifies the blob + * snapshot to retrieve. For more information on working with blob snapshots, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/creating-a-snapshot-of-a-blob">Creating + * a Snapshot of a Blob.</a>. + * @param versionId The version id parameter is an opaque DateTime value that, when present, specifies the version + * of the blob to operate on. It's for service version 2019-10-10 and newer. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws StorageErrorException 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 Response setLegalHoldNoCustomHeadersWithResponse(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.setLegalHoldNoCustomHeadersSync(this.client.getUrl(), containerName, blob, comp, timeout, + this.client.getVersion(), requestId, legalHold, snapshot, versionId, accept, context); + } + + /** + * The Set Blob Metadata operation sets user-defined metadata for the specified blob as one or more name-value + * pairs. + * + * @param containerName The container name. + * @param blob The blob name. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param metadata Optional. Specifies a user-defined name-value pair associated with the blob. If no name-value + * pairs are specified, the operation will copy the metadata from the source blob or file to the destination blob. + * If one or more name-value pairs are specified, the destination blob is created with the specified metadata, and + * metadata is not copied from the source blob or file. Note that beginning with version 2009-09-19, metadata names + * must adhere to the naming rules for C# identifiers. See Naming and Referencing Containers, Blobs, and Metadata + * for more information. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the + * specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since + * the specified date/time. + * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. + * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. + * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param cpkInfo Parameter group. + * @param encryptionScopeParam Parameter group. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws StorageErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link ResponseBase}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ResponseBase setMetadataWithResponse(String containerName, String blob, + Integer timeout, Map metadata, String leaseId, OffsetDateTime ifModifiedSince, + OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, String ifTags, String requestId, + CpkInfo cpkInfo, EncryptionScope encryptionScopeParam, Context context) { + final String comp = "metadata"; + final String accept = "application/xml"; + String encryptionKeyInternal = null; + if (cpkInfo != null) { + encryptionKeyInternal = cpkInfo.getEncryptionKey(); + } + String encryptionKey = encryptionKeyInternal; + String encryptionKeySha256Internal = null; + if (cpkInfo != null) { + encryptionKeySha256Internal = cpkInfo.getEncryptionKeySha256(); + } + String encryptionKeySha256 = encryptionKeySha256Internal; + EncryptionAlgorithmType encryptionAlgorithmInternal = null; + if (cpkInfo != null) { + encryptionAlgorithmInternal = cpkInfo.getEncryptionAlgorithm(); + } + EncryptionAlgorithmType encryptionAlgorithm = encryptionAlgorithmInternal; + String encryptionScopeInternal = null; + if (encryptionScopeParam != null) { + encryptionScopeInternal = encryptionScopeParam.getEncryptionScope(); + } + String encryptionScope = encryptionScopeInternal; + DateTimeRfc1123 ifModifiedSinceConverted + = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); + DateTimeRfc1123 ifUnmodifiedSinceConverted + = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); + return service.setMetadataSync(this.client.getUrl(), containerName, blob, comp, timeout, metadata, leaseId, + encryptionKey, encryptionKeySha256, encryptionAlgorithm, encryptionScope, ifModifiedSinceConverted, + ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, this.client.getVersion(), requestId, accept, + context); + } + + /** + * The Set Blob Metadata operation sets user-defined metadata for the specified blob as one or more name-value + * pairs. + * + * @param containerName The container name. + * @param blob The blob name. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param metadata Optional. Specifies a user-defined name-value pair associated with the blob. If no name-value + * pairs are specified, the operation will copy the metadata from the source blob or file to the destination blob. + * If one or more name-value pairs are specified, the destination blob is created with the specified metadata, and + * metadata is not copied from the source blob or file. Note that beginning with version 2009-09-19, metadata names + * must adhere to the naming rules for C# identifiers. See Naming and Referencing Containers, Blobs, and Metadata + * for more information. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the + * specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since + * the specified date/time. + * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. + * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. + * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param cpkInfo Parameter group. + * @param encryptionScopeParam Parameter group. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws StorageErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void setMetadata(String containerName, String blob, Integer timeout, Map metadata, + String leaseId, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, + String ifNoneMatch, String ifTags, String requestId, CpkInfo cpkInfo, EncryptionScope encryptionScopeParam) { + setMetadataWithResponse(containerName, blob, timeout, metadata, leaseId, ifModifiedSince, ifUnmodifiedSince, + ifMatch, ifNoneMatch, ifTags, requestId, cpkInfo, encryptionScopeParam, Context.none()); + } + + /** + * The Set Blob Metadata operation sets user-defined metadata for the specified blob as one or more name-value + * pairs. + * + * @param containerName The container name. + * @param blob The blob name. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param metadata Optional. Specifies a user-defined name-value pair associated with the blob. If no name-value + * pairs are specified, the operation will copy the metadata from the source blob or file to the destination blob. + * If one or more name-value pairs are specified, the destination blob is created with the specified metadata, and + * metadata is not copied from the source blob or file. Note that beginning with version 2009-09-19, metadata names + * must adhere to the naming rules for C# identifiers. See Naming and Referencing Containers, Blobs, and Metadata + * for more information. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the + * specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since + * the specified date/time. + * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. + * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. + * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param cpkInfo Parameter group. + * @param encryptionScopeParam Parameter group. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws StorageErrorException 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 Response setMetadataNoCustomHeadersWithResponse(String containerName, String blob, Integer timeout, + Map metadata, String leaseId, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, + String ifMatch, String ifNoneMatch, String ifTags, String requestId, CpkInfo cpkInfo, + EncryptionScope encryptionScopeParam, Context context) { + final String comp = "metadata"; + final String accept = "application/xml"; + String encryptionKeyInternal = null; + if (cpkInfo != null) { + encryptionKeyInternal = cpkInfo.getEncryptionKey(); + } + String encryptionKey = encryptionKeyInternal; + String encryptionKeySha256Internal = null; + if (cpkInfo != null) { + encryptionKeySha256Internal = cpkInfo.getEncryptionKeySha256(); + } + String encryptionKeySha256 = encryptionKeySha256Internal; + EncryptionAlgorithmType encryptionAlgorithmInternal = null; + if (cpkInfo != null) { + encryptionAlgorithmInternal = cpkInfo.getEncryptionAlgorithm(); + } + EncryptionAlgorithmType encryptionAlgorithm = encryptionAlgorithmInternal; + String encryptionScopeInternal = null; + if (encryptionScopeParam != null) { + encryptionScopeInternal = encryptionScopeParam.getEncryptionScope(); + } + String encryptionScope = encryptionScopeInternal; + DateTimeRfc1123 ifModifiedSinceConverted + = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); + DateTimeRfc1123 ifUnmodifiedSinceConverted + = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); + return service.setMetadataNoCustomHeadersSync(this.client.getUrl(), containerName, blob, comp, timeout, + metadata, leaseId, encryptionKey, encryptionKeySha256, encryptionAlgorithm, encryptionScope, + ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, + this.client.getVersion(), requestId, accept, context); + } + + /** + * [Update] The Lease Blob operation establishes and manages a lock on a blob for write and delete operations. + * + * @param containerName The container name. + * @param blob The blob name. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param duration Specifies the duration of the lease, in seconds, or negative one (-1) for a lease that never + * expires. A non-infinite lease can be between 15 and 60 seconds. A lease duration cannot be changed using renew or + * change. + * @param proposedLeaseId Proposed lease ID, in a GUID string format. The Blob service returns 400 (Invalid request) + * if the proposed lease ID is not in the correct format. See Guid Constructor (String) for a list of valid GUID + * string formats. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the + * specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since + * the specified date/time. + * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. + * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. + * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws StorageErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link ResponseBase}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ResponseBase acquireLeaseWithResponse(String containerName, String blob, + Integer timeout, Integer duration, String proposedLeaseId, OffsetDateTime ifModifiedSince, + OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, String ifTags, String requestId, + Context context) { + final String comp = "lease"; + final String action = "acquire"; + final String accept = "application/xml"; + DateTimeRfc1123 ifModifiedSinceConverted + = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); + DateTimeRfc1123 ifUnmodifiedSinceConverted + = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); + return service.acquireLeaseSync(this.client.getUrl(), containerName, blob, comp, action, timeout, duration, + proposedLeaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, + this.client.getVersion(), requestId, accept, context); + } + + /** + * [Update] The Lease Blob operation establishes and manages a lock on a blob for write and delete operations. + * + * @param containerName The container name. + * @param blob The blob name. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param duration Specifies the duration of the lease, in seconds, or negative one (-1) for a lease that never + * expires. A non-infinite lease can be between 15 and 60 seconds. A lease duration cannot be changed using renew or + * change. + * @param proposedLeaseId Proposed lease ID, in a GUID string format. The Blob service returns 400 (Invalid request) + * if the proposed lease ID is not in the correct format. See Guid Constructor (String) for a list of valid GUID + * string formats. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the + * specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since + * the specified date/time. + * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. + * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. + * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws StorageErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void acquireLease(String containerName, String blob, Integer timeout, Integer duration, + String proposedLeaseId, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, + String ifNoneMatch, String ifTags, String requestId) { + acquireLeaseWithResponse(containerName, blob, timeout, duration, proposedLeaseId, ifModifiedSince, + ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, requestId, Context.none()); + } + + /** + * [Update] The Lease Blob operation establishes and manages a lock on a blob for write and delete operations. + * + * @param containerName The container name. + * @param blob The blob name. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param duration Specifies the duration of the lease, in seconds, or negative one (-1) for a lease that never + * expires. A non-infinite lease can be between 15 and 60 seconds. A lease duration cannot be changed using renew or + * change. + * @param proposedLeaseId Proposed lease ID, in a GUID string format. The Blob service returns 400 (Invalid request) + * if the proposed lease ID is not in the correct format. See Guid Constructor (String) for a list of valid GUID + * string formats. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the + * specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since + * the specified date/time. + * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. + * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. + * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws StorageErrorException 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 Response acquireLeaseNoCustomHeadersWithResponse(String containerName, String blob, Integer timeout, + Integer duration, String proposedLeaseId, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, + String ifMatch, String ifNoneMatch, String ifTags, String requestId, Context context) { + final String comp = "lease"; + final String action = "acquire"; + final String accept = "application/xml"; + 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); + } + + /** + * [Update] The Lease Blob operation establishes and manages a lock on a blob for write and delete operations. + * + * @param containerName The container name. + * @param blob The blob name. + * @param leaseId Specifies the current lease ID on the resource. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the + * specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since + * the specified date/time. + * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. + * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. + * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. + * @param requestId Provides a 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 StorageErrorException thrown if 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) { + 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); + } + + /** + * [Update] The Lease Blob operation establishes and manages a lock on a blob for write and delete operations. + * + * @param containerName The container name. + * @param blob The blob name. + * @param leaseId Specifies the current lease ID on the resource. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the + * specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since + * the specified date/time. + * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. + * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. + * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. + * @param requestId Provides 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 StorageErrorException 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://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the + * specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since + * the specified date/time. + * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. + * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. + * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws StorageErrorException 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 Response releaseLeaseNoCustomHeadersWithResponse(String containerName, String blob, String leaseId, + Integer timeout, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, + String ifNoneMatch, String ifTags, String requestId, Context context) { + final String comp = "lease"; + final String action = "release"; + final String accept = "application/xml"; + DateTimeRfc1123 ifModifiedSinceConverted + = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); + DateTimeRfc1123 ifUnmodifiedSinceConverted + = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); + return service.releaseLeaseNoCustomHeadersSync(this.client.getUrl(), containerName, blob, comp, action, timeout, + leaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, + this.client.getVersion(), requestId, accept, context); + } + + /** + * [Update] The Lease Blob operation establishes and manages a lock on a blob for write and delete operations. + * + * @param containerName The container name. + * @param blob The blob name. + * @param leaseId Specifies the current lease ID on the resource. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the + * specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since + * the specified date/time. + * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. + * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. + * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. + * @param requestId Provides a 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 StorageErrorException thrown if 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) { + final String comp = "lease"; + final String action = "renew"; + final String accept = "application/xml"; + DateTimeRfc1123 ifModifiedSinceConverted + = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); + DateTimeRfc1123 ifUnmodifiedSinceConverted + = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); + return service.renewLeaseSync(this.client.getUrl(), containerName, blob, comp, action, timeout, leaseId, + ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, + this.client.getVersion(), requestId, accept, context); + } + + /** + * [Update] The Lease Blob operation establishes and manages a lock on a blob for write and delete operations. + * + * @param containerName The container name. + * @param blob The blob name. + * @param leaseId Specifies the current lease ID on the resource. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the + * specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since + * the specified date/time. + * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. + * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. + * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. + * @param requestId Provides 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 StorageErrorException 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://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the + * specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since + * the specified date/time. + * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. + * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. + * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws StorageErrorException 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 Response renewLeaseNoCustomHeadersWithResponse(String containerName, String blob, String leaseId, + Integer timeout, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, + String ifNoneMatch, String ifTags, String requestId, Context context) { + final String comp = "lease"; + final String action = "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); + } + + /** + * [Update] The Lease Blob operation establishes and manages a lock on a blob for write and delete operations. + * + * @param containerName The container name. + * @param blob The blob name. + * @param leaseId Specifies the current lease ID on the resource. + * @param proposedLeaseId Proposed lease ID, in a GUID string format. The Blob service returns 400 (Invalid request) + * if the proposed lease ID is not in the correct format. See Guid Constructor (String) for a list of valid GUID + * string formats. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the + * specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since + * the specified date/time. + * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. + * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. + * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. + * @param requestId Provides a 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 StorageErrorException thrown if 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) { + 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); + } + + /** + * [Update] The Lease Blob operation establishes and manages a lock on a blob for write and delete operations. + * + * @param containerName The container name. + * @param blob The blob name. + * @param leaseId Specifies the current lease ID on the resource. + * @param proposedLeaseId Proposed lease ID, in a GUID string format. The Blob service returns 400 (Invalid request) + * if the proposed lease ID is not in the correct format. See Guid Constructor (String) for a list of valid GUID + * string formats. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the + * specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since + * the specified date/time. + * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. + * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. + * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. + * @param requestId Provides 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 StorageErrorException 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://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the + * specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since + * the specified date/time. + * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. + * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. + * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws StorageErrorException 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 Response changeLeaseNoCustomHeadersWithResponse(String containerName, String blob, String leaseId, + String proposedLeaseId, Integer timeout, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, + String ifMatch, String ifNoneMatch, String ifTags, String requestId, Context context) { + final String comp = "lease"; + final String action = "change"; + final String accept = "application/xml"; + DateTimeRfc1123 ifModifiedSinceConverted + = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); + DateTimeRfc1123 ifUnmodifiedSinceConverted + = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); + return service.changeLeaseNoCustomHeadersSync(this.client.getUrl(), containerName, blob, comp, action, timeout, + leaseId, proposedLeaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, + ifTags, this.client.getVersion(), requestId, accept, context); + } + + /** + * [Update] The Lease Blob operation establishes and manages a lock on a blob for write and delete operations. + * + * @param containerName The container name. + * @param blob The blob name. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param breakPeriod For a break operation, proposed duration the lease should continue before it is broken, in + * seconds, between 0 and 60. This break period is only used if it is shorter than the time remaining on the lease. + * If longer, the time remaining on the lease is used. A new lease will not be available before the break period has + * expired, but the lease may be held for longer than the break period. If this header does not appear with a break + * operation, a fixed-duration lease breaks after the remaining lease period elapses, and an infinite lease breaks + * immediately. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the + * specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since + * the specified date/time. + * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. + * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. + * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. + * @param requestId Provides a 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 StorageErrorException thrown if 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) { + final String comp = "lease"; + final String action = "break"; + final String accept = "application/xml"; + DateTimeRfc1123 ifModifiedSinceConverted + = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); + DateTimeRfc1123 ifUnmodifiedSinceConverted + = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); + return service.breakLeaseSync(this.client.getUrl(), containerName, blob, comp, action, timeout, breakPeriod, + ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, + this.client.getVersion(), requestId, accept, context); + } + + /** + * [Update] The Lease Blob operation establishes and manages a lock on a blob for write and delete operations. + * + * @param containerName The container name. + * @param blob The blob name. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param breakPeriod For a break operation, proposed duration the lease should continue before it is broken, in + * seconds, between 0 and 60. This break period is only used if it is shorter than the time remaining on the lease. + * If longer, the time remaining on the lease is used. A new lease will not be available before the break period has + * expired, but the lease may be held for longer than the break period. If this header does not appear with a break + * operation, a fixed-duration lease breaks after the remaining lease period elapses, and an infinite lease breaks + * immediately. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the + * specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since + * the specified date/time. + * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. + * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. + * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. + * @param requestId Provides 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 StorageErrorException 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://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param breakPeriod For a break operation, proposed duration the lease should continue before it is broken, in + * seconds, between 0 and 60. This break period is only used if it is shorter than the time remaining on the lease. + * If longer, the time remaining on the lease is used. A new lease will not be available before the break period has + * expired, but the lease may be held for longer than the break period. If this header does not appear with a break + * operation, a fixed-duration lease breaks after the remaining lease period elapses, and an infinite lease breaks + * immediately. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the + * specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since + * the specified date/time. + * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. + * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. + * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. + * @param requestId Provides a 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 StorageErrorException 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 Response breakLeaseNoCustomHeadersWithResponse(String containerName, String blob, Integer timeout, + Integer breakPeriod, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, + String ifNoneMatch, String ifTags, String requestId, Context context) { + final String comp = "lease"; + final String action = "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); + } + + /** + * The Create Snapshot operation creates a read-only snapshot of a blob. + * + * @param containerName The container name. + * @param blob The blob name. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param metadata Optional. Specifies a user-defined name-value pair associated with the blob. If no name-value + * pairs are specified, the operation will copy the metadata from the source blob or file to the destination blob. + * If one or more name-value pairs are specified, the destination blob is created with the specified metadata, and + * metadata is not copied from the source blob or file. Note that beginning with version 2009-09-19, metadata names + * must adhere to the naming rules for C# identifiers. See Naming and Referencing Containers, Blobs, and Metadata + * for more information. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the + * specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since + * the specified date/time. + * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. + * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. + * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param cpkInfo Parameter group. + * @param encryptionScopeParam Parameter group. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws StorageErrorException thrown if 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) { + 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); + } + + /** + * The Create Snapshot operation creates a read-only snapshot of a blob. + * + * @param containerName The container name. + * @param blob The blob name. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param metadata Optional. Specifies a user-defined name-value pair associated with the blob. If no name-value + * pairs are specified, the operation will copy the metadata from the source blob or file to the destination blob. + * If one or more name-value pairs are specified, the destination blob is created with the specified metadata, and + * metadata is not copied from the source blob or file. Note that beginning with version 2009-09-19, metadata names + * must adhere to the naming rules for C# identifiers. See Naming and Referencing Containers, Blobs, and Metadata + * for more information. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the + * specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since + * the specified date/time. + * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. + * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. + * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param cpkInfo Parameter group. + * @param encryptionScopeParam Parameter group. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws StorageErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void createSnapshot(String containerName, String blob, Integer timeout, Map metadata, + OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, + String ifTags, String leaseId, String requestId, CpkInfo cpkInfo, EncryptionScope encryptionScopeParam) { + createSnapshotWithResponse(containerName, blob, timeout, metadata, ifModifiedSince, ifUnmodifiedSince, ifMatch, + ifNoneMatch, ifTags, leaseId, requestId, cpkInfo, encryptionScopeParam, Context.none()); + } + + /** + * The Create Snapshot operation creates a read-only snapshot of a blob. + * + * @param containerName The container name. + * @param blob The blob name. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @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 StorageErrorException 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 Response createSnapshotNoCustomHeadersWithResponse(String containerName, String blob, Integer timeout, + Map metadata, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, + String ifNoneMatch, String ifTags, String leaseId, String requestId, CpkInfo cpkInfo, + EncryptionScope encryptionScopeParam, Context context) { + final String comp = "snapshot"; + final String accept = "application/xml"; + String encryptionKeyInternal = null; + 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); + } + + /** + * The Start Copy From URL operation copies a blob or an internet resource to a new blob. + * + * @param containerName The container name. + * @param blob The blob name. + * @param copySource Specifies the name of the source page blob snapshot. This value is a URL of up to 2 KB in + * length that specifies a page blob snapshot. The value should be URL-encoded as it would appear in a request URI. + * The source blob must either be public or must be authenticated via a shared access signature. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param metadata Optional. Specifies a user-defined name-value pair associated with the blob. If no name-value + * pairs are specified, the operation will copy the metadata from the source blob or file to the destination blob. + * If one or more name-value pairs are specified, the destination blob is created with the specified metadata, and + * metadata is not copied from the source blob or file. Note that beginning with version 2009-09-19, metadata names + * must adhere to the naming rules for C# identifiers. See Naming and Referencing Containers, Blobs, and Metadata + * for more information. + * @param tier Optional. Indicates the tier to be set on the blob. + * @param rehydratePriority Optional: Indicates the priority with which to rehydrate an archived blob. + * @param sourceIfModifiedSince Specify this header value to operate only on a blob if it has been modified since + * the specified date/time. + * @param sourceIfUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified + * since the specified date/time. + * @param sourceIfMatch Specify an ETag value to operate only on blobs with a matching value. + * @param sourceIfNoneMatch Specify an ETag value to operate only on blobs without a matching value. + * @param sourceIfTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the + * specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since + * the specified date/time. + * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. + * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. + * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param blobTagsString Optional. Used to set blob tags in various blob operations. + * @param sealBlob Overrides the sealed state of the destination blob. Service version 2019-12-12 and newer. + * @param immutabilityPolicyExpiry Specifies the date time when the blobs immutability policy is set to expire. + * @param immutabilityPolicyMode Specifies the immutability policy mode to set on the blob. + * @param legalHold Specified if a legal hold should be set on the blob. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws StorageErrorException thrown if 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) { + final String accept = "application/xml"; + DateTimeRfc1123 sourceIfModifiedSinceConverted + = sourceIfModifiedSince == null ? null : new DateTimeRfc1123(sourceIfModifiedSince); + DateTimeRfc1123 sourceIfUnmodifiedSinceConverted + = sourceIfUnmodifiedSince == null ? null : new DateTimeRfc1123(sourceIfUnmodifiedSince); + DateTimeRfc1123 ifModifiedSinceConverted + = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); + DateTimeRfc1123 ifUnmodifiedSinceConverted + = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); + DateTimeRfc1123 immutabilityPolicyExpiryConverted + = immutabilityPolicyExpiry == null ? null : new DateTimeRfc1123(immutabilityPolicyExpiry); + return service.startCopyFromURLSync(this.client.getUrl(), containerName, blob, timeout, metadata, tier, + rehydratePriority, sourceIfModifiedSinceConverted, sourceIfUnmodifiedSinceConverted, sourceIfMatch, + sourceIfNoneMatch, sourceIfTags, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, + ifTags, copySource, leaseId, this.client.getVersion(), requestId, blobTagsString, sealBlob, + immutabilityPolicyExpiryConverted, immutabilityPolicyMode, legalHold, accept, context); + } + + /** + * The Start Copy From URL operation copies a blob or an internet resource to a new blob. + * + * @param containerName The container name. + * @param blob The blob name. + * @param copySource Specifies the name of the source page blob snapshot. This value is a URL of up to 2 KB in + * length that specifies a page blob snapshot. The value should be URL-encoded as it would appear in a request URI. + * The source blob must either be public or must be authenticated via a shared access signature. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param metadata Optional. Specifies a user-defined name-value pair associated with the blob. If no name-value + * pairs are specified, the operation will copy the metadata from the source blob or file to the destination blob. + * If one or more name-value pairs are specified, the destination blob is created with the specified metadata, and + * metadata is not copied from the source blob or file. Note that beginning with version 2009-09-19, metadata names + * must adhere to the naming rules for C# identifiers. See Naming and Referencing Containers, Blobs, and Metadata + * for more information. + * @param tier Optional. Indicates the tier to be set on the blob. + * @param rehydratePriority Optional: Indicates the priority with which to rehydrate an archived blob. + * @param sourceIfModifiedSince Specify this header value to operate only on a blob if it has been modified since + * the specified date/time. + * @param sourceIfUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified + * since the specified date/time. + * @param sourceIfMatch Specify an ETag value to operate only on blobs with a matching value. + * @param sourceIfNoneMatch Specify an ETag value to operate only on blobs without a matching value. + * @param sourceIfTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the + * specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since + * the specified date/time. + * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. + * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. + * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param blobTagsString Optional. Used to set blob tags in various blob operations. + * @param sealBlob Overrides the sealed state of the destination blob. Service version 2019-12-12 and newer. + * @param immutabilityPolicyExpiry Specifies the date time when the blobs immutability policy is set to expire. + * @param immutabilityPolicyMode Specifies the immutability policy mode to set on the blob. + * @param legalHold Specified if a legal hold should be set on the blob. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws StorageErrorException 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://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param metadata Optional. Specifies a user-defined name-value pair associated with the blob. If no name-value + * pairs are specified, the operation will copy the metadata from the source blob or file to the destination blob. + * If one or more name-value pairs are specified, the destination blob is created with the specified metadata, and + * metadata is not copied from the source blob or file. Note that beginning with version 2009-09-19, metadata names + * must adhere to the naming rules for C# identifiers. See Naming and Referencing Containers, Blobs, and Metadata + * for more information. + * @param tier Optional. Indicates the tier to be set on the blob. + * @param rehydratePriority Optional: Indicates the priority with which to rehydrate an archived blob. + * @param sourceIfModifiedSince Specify this header value to operate only on a blob if it has been modified since + * the specified date/time. + * @param sourceIfUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified + * since the specified date/time. + * @param sourceIfMatch Specify an ETag value to operate only on blobs with a matching value. + * @param sourceIfNoneMatch Specify an ETag value to operate only on blobs without a matching value. + * @param sourceIfTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the + * specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since + * the specified date/time. + * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. + * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. + * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param blobTagsString Optional. Used to set blob tags in various blob operations. + * @param sealBlob Overrides the sealed state of the destination blob. Service version 2019-12-12 and newer. + * @param immutabilityPolicyExpiry Specifies the date time when the blobs immutability policy is set to expire. + * @param immutabilityPolicyMode Specifies the immutability policy mode to set on the blob. + * @param legalHold Specified if a legal hold should be set on the blob. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws StorageErrorException 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 Response startCopyFromURLNoCustomHeadersWithResponse(String containerName, String blob, + String copySource, Integer timeout, Map metadata, AccessTier tier, + RehydratePriority rehydratePriority, OffsetDateTime sourceIfModifiedSince, + OffsetDateTime sourceIfUnmodifiedSince, String sourceIfMatch, String sourceIfNoneMatch, String sourceIfTags, + OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, + String ifTags, String leaseId, String requestId, String blobTagsString, Boolean sealBlob, + OffsetDateTime immutabilityPolicyExpiry, BlobImmutabilityPolicyMode immutabilityPolicyMode, Boolean legalHold, + Context context) { + final String accept = "application/xml"; + DateTimeRfc1123 sourceIfModifiedSinceConverted + = sourceIfModifiedSince == null ? null : new DateTimeRfc1123(sourceIfModifiedSince); + DateTimeRfc1123 sourceIfUnmodifiedSinceConverted + = sourceIfUnmodifiedSince == null ? null : new DateTimeRfc1123(sourceIfUnmodifiedSince); + DateTimeRfc1123 ifModifiedSinceConverted + = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); + DateTimeRfc1123 ifUnmodifiedSinceConverted + = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); + DateTimeRfc1123 immutabilityPolicyExpiryConverted + = immutabilityPolicyExpiry == null ? null : new DateTimeRfc1123(immutabilityPolicyExpiry); + return service.startCopyFromURLNoCustomHeadersSync(this.client.getUrl(), containerName, blob, timeout, metadata, + tier, rehydratePriority, sourceIfModifiedSinceConverted, sourceIfUnmodifiedSinceConverted, sourceIfMatch, + sourceIfNoneMatch, sourceIfTags, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, + ifTags, copySource, leaseId, this.client.getVersion(), requestId, blobTagsString, sealBlob, + immutabilityPolicyExpiryConverted, immutabilityPolicyMode, legalHold, accept, context); + } + + /** + * The Copy From URL operation copies a blob or an internet resource to a new blob. It will not return a response + * until the copy is complete. + * + * @param containerName The container name. + * @param blob The blob name. + * @param copySource Specifies the name of the source page blob snapshot. This value is a URL of up to 2 KB in + * length that specifies a page blob snapshot. The value should be URL-encoded as it would appear in a request URI. + * The source blob must either be public or must be authenticated via a shared access signature. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param metadata Optional. Specifies a user-defined name-value pair associated with the blob. If no name-value + * pairs are specified, the operation will copy the metadata from the source blob or file to the destination blob. + * If one or more name-value pairs are specified, the destination blob is created with the specified metadata, and + * metadata is not copied from the source blob or file. Note that beginning with version 2009-09-19, metadata names + * must adhere to the naming rules for C# identifiers. See Naming and Referencing Containers, Blobs, and Metadata + * for more information. + * @param tier Optional. Indicates the tier to be set on the blob. + * @param sourceIfModifiedSince Specify this header value to operate only on a blob if it has been modified since + * the specified date/time. + * @param sourceIfUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified + * since the specified date/time. + * @param sourceIfMatch Specify an ETag value to operate only on blobs with a matching value. + * @param sourceIfNoneMatch Specify an ETag value to operate only on blobs without a matching value. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the + * specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since + * the specified date/time. + * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. + * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. + * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param sourceContentMD5 Specify the md5 calculated for the range of bytes that must be read from the copy source. + * @param blobTagsString Optional. Used to set blob tags in various blob operations. + * @param immutabilityPolicyExpiry Specifies the date time when the blobs immutability policy is set to expire. + * @param immutabilityPolicyMode Specifies the immutability policy mode to set on the blob. + * @param legalHold Specified if a legal hold should be set on the blob. + * @param copySourceAuthorization Only Bearer type is supported. Credentials should be a valid OAuth access token to + * copy source. + * @param copySourceTags Optional, default 'replace'. Indicates if source tags should be copied or replaced with the + * tags specified by x-ms-tags. + * @param encryptionScopeParam Parameter group. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws StorageErrorException thrown if 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, EncryptionScope encryptionScopeParam, Context context) { + final String xMsRequiresSync = "true"; + final String accept = "application/xml"; + String encryptionScopeInternal = null; + if (encryptionScopeParam != null) { + encryptionScopeInternal = encryptionScopeParam.getEncryptionScope(); + } + String encryptionScope = encryptionScopeInternal; + DateTimeRfc1123 sourceIfModifiedSinceConverted + = sourceIfModifiedSince == null ? null : new DateTimeRfc1123(sourceIfModifiedSince); + DateTimeRfc1123 sourceIfUnmodifiedSinceConverted + = sourceIfUnmodifiedSince == null ? null : new DateTimeRfc1123(sourceIfUnmodifiedSince); + DateTimeRfc1123 ifModifiedSinceConverted + = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); + DateTimeRfc1123 ifUnmodifiedSinceConverted + = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); + String sourceContentMD5Converted = Base64Util.encodeToString(sourceContentMD5); + DateTimeRfc1123 immutabilityPolicyExpiryConverted + = immutabilityPolicyExpiry == null ? null : new DateTimeRfc1123(immutabilityPolicyExpiry); + return service.copyFromURLSync(this.client.getUrl(), containerName, blob, xMsRequiresSync, timeout, metadata, + tier, sourceIfModifiedSinceConverted, sourceIfUnmodifiedSinceConverted, sourceIfMatch, sourceIfNoneMatch, + ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, copySource, leaseId, + this.client.getVersion(), requestId, sourceContentMD5Converted, blobTagsString, + immutabilityPolicyExpiryConverted, immutabilityPolicyMode, legalHold, copySourceAuthorization, + encryptionScope, copySourceTags, accept, context); + } + + /** + * The Copy From URL operation copies a blob or an internet resource to a new blob. It will not return a response + * until the copy is complete. + * + * @param containerName The container name. + * @param blob The blob name. + * @param copySource Specifies the name of the source page blob snapshot. This value is a URL of up to 2 KB in + * length that specifies a page blob snapshot. The value should be URL-encoded as it would appear in a request URI. + * The source blob must either be public or must be authenticated via a shared access signature. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param metadata Optional. Specifies a user-defined name-value pair associated with the blob. If no name-value + * pairs are specified, the operation will copy the metadata from the source blob or file to the destination blob. + * If one or more name-value pairs are specified, the destination blob is created with the specified metadata, and + * metadata is not copied from the source blob or file. Note that beginning with version 2009-09-19, metadata names + * must adhere to the naming rules for C# identifiers. See Naming and Referencing Containers, Blobs, and Metadata + * for more information. + * @param tier Optional. Indicates the tier to be set on the blob. + * @param sourceIfModifiedSince Specify this header value to operate only on a blob if it has been modified since + * the specified date/time. + * @param sourceIfUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified + * since the specified date/time. + * @param sourceIfMatch Specify an ETag value to operate only on blobs with a matching value. + * @param sourceIfNoneMatch Specify an ETag value to operate only on blobs without a matching value. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the + * specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since + * the specified date/time. + * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. + * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. + * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param sourceContentMD5 Specify the md5 calculated for the range of bytes that must be read from the copy source. + * @param blobTagsString Optional. Used to set blob tags in various blob operations. + * @param immutabilityPolicyExpiry Specifies the date time when the blobs immutability policy is set to expire. + * @param immutabilityPolicyMode Specifies the immutability policy mode to set on the blob. + * @param legalHold Specified if a legal hold should be set on the blob. + * @param copySourceAuthorization Only Bearer type is supported. Credentials should be a valid OAuth access token to + * copy source. + * @param copySourceTags Optional, default 'replace'. Indicates if source tags should be copied or replaced with the + * tags specified by x-ms-tags. + * @param encryptionScopeParam Parameter group. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws StorageErrorException 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, EncryptionScope encryptionScopeParam) { + copyFromURLWithResponse(containerName, blob, copySource, timeout, metadata, tier, sourceIfModifiedSince, + sourceIfUnmodifiedSince, sourceIfMatch, sourceIfNoneMatch, ifModifiedSince, ifUnmodifiedSince, ifMatch, + ifNoneMatch, ifTags, leaseId, requestId, sourceContentMD5, blobTagsString, immutabilityPolicyExpiry, + immutabilityPolicyMode, legalHold, copySourceAuthorization, copySourceTags, encryptionScopeParam, + Context.none()); + } + + /** + * The Copy From URL operation copies a blob or an internet resource to a new blob. It will not return a response + * until the copy is complete. + * + * @param containerName The container name. + * @param blob The blob name. + * @param copySource Specifies the name of the source page blob snapshot. This value is a URL of up to 2 KB in + * length that specifies a page blob snapshot. The value should be URL-encoded as it would appear in a request URI. + * The source blob must either be public or must be authenticated via a shared access signature. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param metadata Optional. Specifies a user-defined name-value pair associated with the blob. If no name-value + * pairs are specified, the operation will copy the metadata from the source blob or file to the destination blob. + * If one or more name-value pairs are specified, the destination blob is created with the specified metadata, and + * metadata is not copied from the source blob or file. Note that beginning with version 2009-09-19, metadata names + * must adhere to the naming rules for C# identifiers. See Naming and Referencing Containers, Blobs, and Metadata + * for more information. + * @param tier Optional. Indicates the tier to be set on the blob. + * @param sourceIfModifiedSince Specify this header value to operate only on a blob if it has been modified since + * the specified date/time. + * @param sourceIfUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified + * since the specified date/time. + * @param sourceIfMatch Specify an ETag value to operate only on blobs with a matching value. + * @param sourceIfNoneMatch Specify an ETag value to operate only on blobs without a matching value. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the + * specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since + * the specified date/time. + * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. + * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. + * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param sourceContentMD5 Specify the md5 calculated for the range of bytes that must be read from the copy source. + * @param blobTagsString Optional. Used to set blob tags in various blob operations. + * @param immutabilityPolicyExpiry Specifies the date time when the blobs immutability policy is set to expire. + * @param immutabilityPolicyMode Specifies the immutability policy mode to set on the blob. + * @param legalHold Specified if a legal hold should be set on the blob. + * @param copySourceAuthorization Only Bearer type is supported. Credentials should be a valid OAuth access token to + * copy source. + * @param copySourceTags Optional, default 'replace'. Indicates if source tags should be copied or replaced with the + * tags specified by x-ms-tags. + * @param encryptionScopeParam Parameter group. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws StorageErrorException 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 Response copyFromURLNoCustomHeadersWithResponse(String containerName, String blob, String copySource, + Integer timeout, Map metadata, AccessTier tier, OffsetDateTime sourceIfModifiedSince, + OffsetDateTime sourceIfUnmodifiedSince, String sourceIfMatch, String sourceIfNoneMatch, + OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, + String ifTags, String leaseId, String requestId, byte[] sourceContentMD5, String blobTagsString, + OffsetDateTime immutabilityPolicyExpiry, BlobImmutabilityPolicyMode immutabilityPolicyMode, Boolean legalHold, + String copySourceAuthorization, BlobCopySourceTagsMode copySourceTags, EncryptionScope encryptionScopeParam, + Context context) { + final String xMsRequiresSync = "true"; + final String accept = "application/xml"; + String encryptionScopeInternal = null; + 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, accept, context); + } + + /** + * The Abort Copy From URL operation aborts a pending Copy From URL operation, and leaves a destination blob with + * zero length and full metadata. + * + * @param containerName The container name. + * @param blob The blob name. + * @param copyId The copy identifier provided in the x-ms-copy-id header of the original Copy Blob operation. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws StorageErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link ResponseBase}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ResponseBase abortCopyFromURLWithResponse(String containerName, + String blob, String copyId, Integer timeout, String leaseId, String requestId, Context context) { + final String comp = "copy"; + final String copyActionAbortConstant = "abort"; + final String accept = "application/xml"; + return service.abortCopyFromURLSync(this.client.getUrl(), containerName, blob, comp, copyActionAbortConstant, + copyId, timeout, leaseId, this.client.getVersion(), requestId, accept, context); + } + + /** + * The Abort Copy From URL operation aborts a pending Copy From URL operation, and leaves a destination blob with + * zero length and full metadata. + * + * @param containerName The container name. + * @param blob The blob name. + * @param copyId The copy identifier provided in the x-ms-copy-id header of the original Copy Blob operation. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws StorageErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void abortCopyFromURL(String containerName, String blob, String copyId, Integer timeout, String leaseId, + String requestId) { + abortCopyFromURLWithResponse(containerName, blob, copyId, timeout, leaseId, requestId, Context.none()); + } + + /** + * The Abort Copy From URL operation aborts a pending Copy From URL operation, and leaves a destination blob with + * zero length and full metadata. + * + * @param containerName The container name. + * @param blob The blob name. + * @param copyId The copy identifier provided in the x-ms-copy-id header of the original Copy Blob operation. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws StorageErrorException 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 Response abortCopyFromURLNoCustomHeadersWithResponse(String containerName, String blob, String copyId, + Integer timeout, String leaseId, String requestId, Context context) { + final String comp = "copy"; + final String copyActionAbortConstant = "abort"; + final String accept = "application/xml"; + return service.abortCopyFromURLNoCustomHeadersSync(this.client.getUrl(), containerName, blob, comp, + copyActionAbortConstant, copyId, timeout, leaseId, this.client.getVersion(), requestId, accept, context); + } + + /** + * The Set Tier operation sets the tier on a blob. The operation is allowed on a page blob in a premium storage + * account and on a block blob in a blob storage account (locally redundant storage only). A premium page blob's + * tier determines the allowed size, IOPS, and bandwidth of the blob. A block blob's tier determines + * Hot/Cool/Archive storage type. This operation does not update the blob's ETag. + * + * @param containerName The container name. + * @param blob The blob name. + * @param tier Indicates the tier to be set on the blob. + * @param snapshot The snapshot parameter is an opaque DateTime value that, when present, specifies the blob + * snapshot to retrieve. For more information on working with blob snapshots, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/creating-a-snapshot-of-a-blob">Creating + * a Snapshot of a Blob.</a>. + * @param versionId The version id parameter is an opaque DateTime value that, when present, specifies the version + * of the blob to operate on. It's for service version 2019-10-10 and newer. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param rehydratePriority Optional: Indicates the priority with which to rehydrate an archived blob. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws StorageErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link ResponseBase}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ResponseBase setTierWithResponse(String containerName, String blob, + AccessTier tier, String snapshot, String versionId, Integer timeout, RehydratePriority rehydratePriority, + String requestId, String leaseId, String ifTags, Context context) { + final String comp = "tier"; + final String accept = "application/xml"; + return service.setTierSync(this.client.getUrl(), containerName, blob, comp, snapshot, versionId, timeout, tier, + rehydratePriority, this.client.getVersion(), requestId, leaseId, ifTags, accept, context); + } + + /** + * The Set Tier operation sets the tier on a blob. The operation is allowed on a page blob in a premium storage + * account and on a block blob in a blob storage account (locally redundant storage only). A premium page blob's + * tier determines the allowed size, IOPS, and bandwidth of the blob. A block blob's tier determines + * Hot/Cool/Archive storage type. This operation does not update the blob's ETag. + * + * @param containerName The container name. + * @param blob The blob name. + * @param tier Indicates the tier to be set on the blob. + * @param snapshot The snapshot parameter is an opaque DateTime value that, when present, specifies the blob + * snapshot to retrieve. For more information on working with blob snapshots, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/creating-a-snapshot-of-a-blob">Creating + * a Snapshot of a Blob.</a>. + * @param versionId The version id parameter is an opaque DateTime value that, when present, specifies the version + * of the blob to operate on. It's for service version 2019-10-10 and newer. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param rehydratePriority Optional: Indicates the priority with which to rehydrate an archived blob. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws StorageErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void setTier(String containerName, String blob, AccessTier tier, String snapshot, String versionId, + Integer timeout, RehydratePriority rehydratePriority, String requestId, String leaseId, String ifTags) { + setTierWithResponse(containerName, blob, tier, snapshot, versionId, timeout, rehydratePriority, requestId, + leaseId, ifTags, Context.none()); + } + + /** + * The Set Tier operation sets the tier on a blob. The operation is allowed on a page blob in a premium storage + * account and on a block blob in a blob storage account (locally redundant storage only). A premium page blob's + * tier determines the allowed size, IOPS, and bandwidth of the blob. A block blob's tier determines + * Hot/Cool/Archive storage type. This operation does not update the blob's ETag. + * + * @param containerName The container name. + * @param blob The blob name. + * @param tier Indicates the tier to be set on the blob. + * @param snapshot The snapshot parameter is an opaque DateTime value that, when present, specifies the blob + * snapshot to retrieve. For more information on working with blob snapshots, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/creating-a-snapshot-of-a-blob">Creating + * a Snapshot of a Blob.</a>. + * @param versionId The version id parameter is an opaque DateTime value that, when present, specifies the version + * of the blob to operate on. It's for service version 2019-10-10 and newer. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @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 StorageErrorException 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 Response setTierNoCustomHeadersWithResponse(String containerName, String blob, AccessTier tier, + String snapshot, String versionId, Integer timeout, RehydratePriority rehydratePriority, String requestId, + String leaseId, String ifTags, Context context) { + final String comp = "tier"; + final String accept = "application/xml"; + return service.setTierNoCustomHeadersSync(this.client.getUrl(), containerName, blob, comp, snapshot, versionId, + timeout, tier, rehydratePriority, this.client.getVersion(), requestId, leaseId, ifTags, accept, context); + } + + /** + * Returns the sku name and account kind. + * + * @param containerName The container name. + * @param blob The blob name. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws StorageErrorException thrown if 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, String blob, + Integer timeout, String requestId, Context context) { + final String restype = "account"; + final String comp = "properties"; + final String accept = "application/xml"; + return service.getAccountInfoSync(this.client.getUrl(), containerName, blob, restype, comp, timeout, + this.client.getVersion(), requestId, accept, context); + } + + /** + * Returns the sku name and account kind. + * + * @param containerName The container name. + * @param blob The blob name. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws StorageErrorException 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, 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://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws StorageErrorException 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 Response getAccountInfoNoCustomHeadersWithResponse(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.getAccountInfoNoCustomHeadersSync(this.client.getUrl(), containerName, blob, restype, comp, + timeout, this.client.getVersion(), requestId, accept, context); + } + + /** + * The Query operation enables users to select/project on blob data by providing simple query expressions. + * + * @param containerName The container name. + * @param blob The blob name. + * @param snapshot The snapshot parameter is an opaque DateTime value that, when present, specifies the blob + * snapshot to retrieve. For more information on working with blob snapshots, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/creating-a-snapshot-of-a-blob">Creating + * a Snapshot of a Blob.</a>. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the + * specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since + * the specified date/time. + * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. + * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. + * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param queryRequest the query request. + * @param cpkInfo Parameter group. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws StorageErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link ResponseBase}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ResponseBase queryWithResponse(String containerName, String blob, + String snapshot, Integer timeout, String leaseId, OffsetDateTime ifModifiedSince, + OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, String ifTags, String requestId, + QueryRequest queryRequest, CpkInfo cpkInfo, Context context) { + final String comp = "query"; + final String accept = "application/xml"; + String encryptionKeyInternal = null; + if (cpkInfo != null) { + encryptionKeyInternal = cpkInfo.getEncryptionKey(); + } + String encryptionKey = encryptionKeyInternal; + String encryptionKeySha256Internal = null; + if (cpkInfo != null) { + encryptionKeySha256Internal = cpkInfo.getEncryptionKeySha256(); + } + String encryptionKeySha256 = encryptionKeySha256Internal; + EncryptionAlgorithmType encryptionAlgorithmInternal = null; + if (cpkInfo != null) { + encryptionAlgorithmInternal = cpkInfo.getEncryptionAlgorithm(); + } + EncryptionAlgorithmType encryptionAlgorithm = encryptionAlgorithmInternal; + DateTimeRfc1123 ifModifiedSinceConverted + = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); + DateTimeRfc1123 ifUnmodifiedSinceConverted + = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); + return service.querySync(this.client.getUrl(), containerName, blob, comp, snapshot, timeout, leaseId, + encryptionKey, encryptionKeySha256, encryptionAlgorithm, ifModifiedSinceConverted, + ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, this.client.getVersion(), requestId, queryRequest, + accept, context); + } + + /** + * The Query operation enables users to select/project on blob data by providing simple query expressions. + * + * @param containerName The container name. + * @param blob The blob name. + * @param snapshot The snapshot parameter is an opaque DateTime value that, when present, specifies the blob + * snapshot to retrieve. For more information on working with blob snapshots, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/creating-a-snapshot-of-a-blob">Creating + * a Snapshot of a Blob.</a>. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the + * specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since + * the specified date/time. + * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. + * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. + * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param queryRequest the query request. + * @param cpkInfo Parameter group. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws StorageErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public InputStream query(String containerName, String blob, String snapshot, Integer timeout, String leaseId, + OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, + String ifTags, String requestId, QueryRequest queryRequest, CpkInfo cpkInfo) { + return queryWithResponse(containerName, blob, snapshot, timeout, leaseId, ifModifiedSince, ifUnmodifiedSince, + ifMatch, ifNoneMatch, ifTags, requestId, queryRequest, cpkInfo, Context.none()).getValue(); + } + + /** + * The Query operation enables users to select/project on blob data by providing simple query expressions. + * + * @param containerName The container name. + * @param blob The blob name. + * @param snapshot The snapshot parameter is an opaque DateTime value that, when present, specifies the blob + * snapshot to retrieve. For more information on working with blob snapshots, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/creating-a-snapshot-of-a-blob">Creating + * a Snapshot of a Blob.</a>. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the + * specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since + * the specified date/time. + * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. + * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. + * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param queryRequest the query request. + * @param cpkInfo Parameter group. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws StorageErrorException 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 Response queryNoCustomHeadersWithResponse(String containerName, String blob, String snapshot, + Integer timeout, String leaseId, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, + String ifMatch, String ifNoneMatch, String ifTags, String requestId, QueryRequest queryRequest, CpkInfo cpkInfo, + Context context) { + final String comp = "query"; + final String accept = "application/xml"; + String encryptionKeyInternal = null; + 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); + } + + /** + * The Get Tags operation enables users to get the tags associated with a blob. + * + * @param containerName The container name. + * @param blob The blob name. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param snapshot The snapshot parameter is an opaque DateTime value that, when present, specifies the blob + * snapshot to retrieve. For more information on working with blob snapshots, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/creating-a-snapshot-of-a-blob">Creating + * a Snapshot of a Blob.</a>. + * @param versionId The version id parameter is an opaque DateTime value that, when present, specifies the version + * of the blob to operate on. It's for service version 2019-10-10 and newer. + * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws StorageErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return blob tags along with {@link ResponseBase}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ResponseBase getTagsWithResponse(String containerName, String blob, + Integer timeout, String requestId, String snapshot, String versionId, String ifTags, String leaseId, + Context context) { + final String comp = "tags"; + final String accept = "application/xml"; + return service.getTagsSync(this.client.getUrl(), containerName, blob, comp, timeout, this.client.getVersion(), + requestId, snapshot, versionId, ifTags, leaseId, accept, context); + } + + /** + * The Get Tags operation enables users to get the tags associated with a blob. + * + * @param containerName The container name. + * @param blob The blob name. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param snapshot The snapshot parameter is an opaque DateTime value that, when present, specifies the blob + * snapshot to retrieve. For more information on working with blob snapshots, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/creating-a-snapshot-of-a-blob">Creating + * a Snapshot of a Blob.</a>. + * @param versionId The version id parameter is an opaque DateTime value that, when present, specifies the version + * of the blob to operate on. It's for service version 2019-10-10 and newer. + * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws StorageErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return blob tags. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public BlobTags getTags(String containerName, String blob, Integer timeout, String requestId, String snapshot, + String versionId, String ifTags, String leaseId) { + return getTagsWithResponse(containerName, blob, timeout, requestId, snapshot, versionId, ifTags, leaseId, + Context.none()).getValue(); + } + + /** + * The Get Tags operation enables users to get the tags associated with a blob. + * + * @param containerName The container name. + * @param blob The blob name. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param snapshot The snapshot parameter is an opaque DateTime value that, when present, specifies the blob + * snapshot to retrieve. For more information on working with blob snapshots, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/creating-a-snapshot-of-a-blob">Creating + * a Snapshot of a Blob.</a>. + * @param versionId The version id parameter is an opaque DateTime value that, when present, specifies the version + * of the blob to operate on. It's for service version 2019-10-10 and newer. + * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws StorageErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return blob tags. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getTagsNoCustomHeadersWithResponse(String containerName, String blob, Integer timeout, + String requestId, String snapshot, String versionId, String ifTags, String leaseId, Context context) { + final String comp = "tags"; + final String accept = "application/xml"; + return service.getTagsNoCustomHeadersSync(this.client.getUrl(), containerName, blob, comp, timeout, + this.client.getVersion(), requestId, snapshot, versionId, ifTags, leaseId, accept, context); + } + + /** + * The Set Tags operation enables users to set tags on a blob. + * + * @param containerName The container name. + * @param blob The blob name. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param versionId The version id parameter is an opaque DateTime value that, when present, specifies the version + * of the blob to operate on. It's for service version 2019-10-10 and newer. + * @param transactionalContentMD5 Specify the transactional md5 for the body, to be validated by the service. + * @param transactionalContentCrc64 Specify the transactional crc64 for the body, to be validated by the service. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param tags Blob tags. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws StorageErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link ResponseBase}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ResponseBase setTagsWithResponse(String containerName, String blob, + Integer timeout, String versionId, byte[] transactionalContentMD5, byte[] transactionalContentCrc64, + String requestId, String ifTags, String leaseId, BlobTags tags, Context context) { + final String comp = "tags"; + final String accept = "application/xml"; + String transactionalContentMD5Converted = Base64Util.encodeToString(transactionalContentMD5); + String transactionalContentCrc64Converted = Base64Util.encodeToString(transactionalContentCrc64); + return service.setTagsSync(this.client.getUrl(), containerName, blob, comp, this.client.getVersion(), timeout, + versionId, transactionalContentMD5Converted, transactionalContentCrc64Converted, requestId, ifTags, leaseId, + tags, accept, context); + } + + /** + * The Set Tags operation enables users to set tags on a blob. + * + * @param containerName The container name. + * @param blob The blob name. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param versionId The version id parameter is an opaque DateTime value that, when present, specifies the version + * of the blob to operate on. It's for service version 2019-10-10 and newer. + * @param transactionalContentMD5 Specify the transactional md5 for the body, to be validated by the service. + * @param transactionalContentCrc64 Specify the transactional crc64 for the body, to be validated by the service. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param tags Blob tags. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws StorageErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void setTags(String containerName, String blob, Integer timeout, String versionId, + byte[] transactionalContentMD5, byte[] transactionalContentCrc64, String requestId, String ifTags, + String leaseId, BlobTags tags) { + setTagsWithResponse(containerName, blob, timeout, versionId, transactionalContentMD5, transactionalContentCrc64, + requestId, ifTags, leaseId, tags, Context.none()); + } + + /** + * The Set Tags operation enables users to set tags on a blob. + * + * @param containerName The container name. + * @param blob The blob name. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param versionId The version id parameter is an opaque DateTime value that, when present, specifies the version + * of the blob to operate on. It's for service version 2019-10-10 and newer. + * @param transactionalContentMD5 Specify the transactional md5 for the body, to be validated by the service. + * @param transactionalContentCrc64 Specify the transactional crc64 for the body, to be validated by the service. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param tags Blob tags. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws StorageErrorException 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 Response setTagsNoCustomHeadersWithResponse(String containerName, String blob, Integer timeout, + String versionId, byte[] transactionalContentMD5, byte[] transactionalContentCrc64, String requestId, + String ifTags, String leaseId, BlobTags tags, Context context) { + final String comp = "tags"; + final String accept = "application/xml"; + String transactionalContentMD5Converted = Base64Util.encodeToString(transactionalContentMD5); + String transactionalContentCrc64Converted = Base64Util.encodeToString(transactionalContentCrc64); + return service.setTagsNoCustomHeadersSync(this.client.getUrl(), containerName, blob, comp, + this.client.getVersion(), timeout, versionId, transactionalContentMD5Converted, + transactionalContentCrc64Converted, requestId, ifTags, leaseId, tags, accept, context); + } +} diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/implementation/BlockBlobsImpl.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/implementation/BlockBlobsImpl.java new file mode 100644 index 000000000000..dfe951a9d9da --- /dev/null +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/implementation/BlockBlobsImpl.java @@ -0,0 +1,1848 @@ +// 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.v2.annotation.ReturnType; +import com.azure.core.v2.annotation.ServiceMethod; +import com.azure.core.v2.http.rest.ResponseBase; +import io.clientcore.core.util.Base64Util; +import io.clientcore.core.http.models.DateTimeRfc1123; +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.BlockBlobsCommitBlockListHeaders; +import com.azure.storage.blob.models.BlockBlobsGetBlockListHeaders; +import com.azure.storage.blob.models.BlockBlobsPutBlobFromUrlHeaders; +import com.azure.storage.blob.models.BlockBlobsStageBlockFromURLHeaders; +import com.azure.storage.blob.models.BlockBlobsStageBlockHeaders; +import com.azure.storage.blob.models.BlockBlobsUploadHeaders; +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.EncryptionScope; +import com.azure.storage.blob.models.StorageErrorException; +import io.clientcore.core.annotation.ServiceInterface; +import io.clientcore.core.http.RestProxy; +import io.clientcore.core.http.annotation.BodyParam; +import io.clientcore.core.http.annotation.HeaderParam; +import io.clientcore.core.http.annotation.HostParam; +import io.clientcore.core.http.annotation.HttpRequestInformation; +import io.clientcore.core.http.annotation.PathParam; +import io.clientcore.core.http.annotation.QueryParam; +import io.clientcore.core.http.annotation.UnexpectedResponseExceptionDetail; +import io.clientcore.core.http.models.HttpMethod; +import io.clientcore.core.http.models.Response; +import io.clientcore.core.util.Context; +import io.clientcore.core.util.binarydata.BinaryData; +import java.time.OffsetDateTime; +import java.util.Map; + +/** + * An instance of this class provides access to all the operations defined in BlockBlobs. + */ +public final class BlockBlobsImpl { + /** + * The proxy service used to perform REST calls. + */ + private final BlockBlobsService service; + + /** + * The service client containing this operation class. + */ + private final AzureBlobStorageImpl client; + + /** + * Initializes an instance of BlockBlobsImpl. + * + * @param client the instance of the service client containing this operation class. + */ + BlockBlobsImpl(AzureBlobStorageImpl client) { + this.service + = RestProxy.create(BlockBlobsService.class, client.getHttpPipeline()); + this.client = client; + } + + /** + * The interface defining all the services for AzureBlobStorageBlockBlobs to be used by the proxy service to perform + * REST calls. + */ + @ServiceInterface(name = "AzureBlobStorageBloc", host = "{url}") + public interface BlockBlobsService { + @HttpRequestInformation( + method = HttpMethod.PUT, + path = "/{containerName}/{blob}", + expectedStatusCodes = { 201 }) + @UnexpectedResponseExceptionDetail + 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); + + @HttpRequestInformation( + method = HttpMethod.PUT, + path = "/{containerName}/{blob}", + expectedStatusCodes = { 201 }) + @UnexpectedResponseExceptionDetail + 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); + + @HttpRequestInformation( + method = HttpMethod.PUT, + path = "/{containerName}/{blob}", + expectedStatusCodes = { 201 }) + @UnexpectedResponseExceptionDetail + ResponseBase putBlobFromUrlSync(@HostParam("url") String url, + @PathParam("containerName") String containerName, @PathParam("blob") String blob, + @HeaderParam("x-ms-blob-type") String blobType, @QueryParam("timeout") Integer timeout, + @HeaderParam("Content-MD5") String transactionalContentMD5, + @HeaderParam("Content-Length") long contentLength, + @HeaderParam("x-ms-blob-content-type") String contentType, + @HeaderParam("x-ms-blob-content-encoding") String contentEncoding, + @HeaderParam("x-ms-blob-content-language") String contentLanguage, + @HeaderParam("x-ms-blob-content-md5") String contentMd5, + @HeaderParam("x-ms-blob-cache-control") String cacheControl, + @HeaderParam("x-ms-meta-") Map metadata, @HeaderParam("x-ms-lease-id") String leaseId, + @HeaderParam("x-ms-blob-content-disposition") String contentDisposition, + @HeaderParam("x-ms-encryption-key") String encryptionKey, + @HeaderParam("x-ms-encryption-key-sha256") String encryptionKeySha256, + @HeaderParam("x-ms-encryption-algorithm") EncryptionAlgorithmType encryptionAlgorithm, + @HeaderParam("x-ms-encryption-scope") String encryptionScope, + @HeaderParam("x-ms-access-tier") AccessTier tier, + @HeaderParam("If-Modified-Since") DateTimeRfc1123 ifModifiedSince, + @HeaderParam("If-Unmodified-Since") DateTimeRfc1123 ifUnmodifiedSince, + @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch, + @HeaderParam("x-ms-if-tags") String ifTags, + @HeaderParam("x-ms-source-if-modified-since") DateTimeRfc1123 sourceIfModifiedSince, + @HeaderParam("x-ms-source-if-unmodified-since") DateTimeRfc1123 sourceIfUnmodifiedSince, + @HeaderParam("x-ms-source-if-match") String sourceIfMatch, + @HeaderParam("x-ms-source-if-none-match") String sourceIfNoneMatch, + @HeaderParam("x-ms-source-if-tags") String sourceIfTags, @HeaderParam("x-ms-version") String version, + @HeaderParam("x-ms-client-request-id") String requestId, + @HeaderParam("x-ms-source-content-md5") String sourceContentMD5, + @HeaderParam("x-ms-tags") String blobTagsString, @HeaderParam("x-ms-copy-source") String copySource, + @HeaderParam("x-ms-copy-source-blob-properties") Boolean copySourceBlobProperties, + @HeaderParam("x-ms-copy-source-authorization") String copySourceAuthorization, + @HeaderParam("x-ms-copy-source-tag-option") BlobCopySourceTagsMode copySourceTags, + @HeaderParam("Accept") String accept, Context context); + + @HttpRequestInformation( + method = HttpMethod.PUT, + path = "/{containerName}/{blob}", + expectedStatusCodes = { 201 }) + @UnexpectedResponseExceptionDetail + Response putBlobFromUrlNoCustomHeadersSync(@HostParam("url") String url, + @PathParam("containerName") String containerName, @PathParam("blob") String blob, + @HeaderParam("x-ms-blob-type") String blobType, @QueryParam("timeout") Integer timeout, + @HeaderParam("Content-MD5") String transactionalContentMD5, + @HeaderParam("Content-Length") long contentLength, + @HeaderParam("x-ms-blob-content-type") String contentType, + @HeaderParam("x-ms-blob-content-encoding") String contentEncoding, + @HeaderParam("x-ms-blob-content-language") String contentLanguage, + @HeaderParam("x-ms-blob-content-md5") String contentMd5, + @HeaderParam("x-ms-blob-cache-control") String cacheControl, + @HeaderParam("x-ms-meta-") Map metadata, @HeaderParam("x-ms-lease-id") String leaseId, + @HeaderParam("x-ms-blob-content-disposition") String contentDisposition, + @HeaderParam("x-ms-encryption-key") String encryptionKey, + @HeaderParam("x-ms-encryption-key-sha256") String encryptionKeySha256, + @HeaderParam("x-ms-encryption-algorithm") EncryptionAlgorithmType encryptionAlgorithm, + @HeaderParam("x-ms-encryption-scope") String encryptionScope, + @HeaderParam("x-ms-access-tier") AccessTier tier, + @HeaderParam("If-Modified-Since") DateTimeRfc1123 ifModifiedSince, + @HeaderParam("If-Unmodified-Since") DateTimeRfc1123 ifUnmodifiedSince, + @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch, + @HeaderParam("x-ms-if-tags") String ifTags, + @HeaderParam("x-ms-source-if-modified-since") DateTimeRfc1123 sourceIfModifiedSince, + @HeaderParam("x-ms-source-if-unmodified-since") DateTimeRfc1123 sourceIfUnmodifiedSince, + @HeaderParam("x-ms-source-if-match") String sourceIfMatch, + @HeaderParam("x-ms-source-if-none-match") String sourceIfNoneMatch, + @HeaderParam("x-ms-source-if-tags") String sourceIfTags, @HeaderParam("x-ms-version") String version, + @HeaderParam("x-ms-client-request-id") String requestId, + @HeaderParam("x-ms-source-content-md5") String sourceContentMD5, + @HeaderParam("x-ms-tags") String blobTagsString, @HeaderParam("x-ms-copy-source") String copySource, + @HeaderParam("x-ms-copy-source-blob-properties") Boolean copySourceBlobProperties, + @HeaderParam("x-ms-copy-source-authorization") String copySourceAuthorization, + @HeaderParam("x-ms-copy-source-tag-option") BlobCopySourceTagsMode copySourceTags, + @HeaderParam("Accept") String accept, Context context); + + @HttpRequestInformation( + method = HttpMethod.PUT, + path = "/{containerName}/{blob}", + expectedStatusCodes = { 201 }) + @UnexpectedResponseExceptionDetail + 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); + + @HttpRequestInformation( + method = HttpMethod.PUT, + path = "/{containerName}/{blob}", + expectedStatusCodes = { 201 }) + @UnexpectedResponseExceptionDetail + 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); + + @HttpRequestInformation( + method = HttpMethod.PUT, + path = "/{containerName}/{blob}", + expectedStatusCodes = { 201 }) + @UnexpectedResponseExceptionDetail + ResponseBase stageBlockFromURLSync(@HostParam("url") String url, + @PathParam("containerName") String containerName, @PathParam("blob") String blob, + @QueryParam("comp") String comp, @QueryParam("blockid") String blockId, + @HeaderParam("Content-Length") long contentLength, @HeaderParam("x-ms-copy-source") String sourceUrl, + @HeaderParam("x-ms-source-range") String sourceRange, + @HeaderParam("x-ms-source-content-md5") String sourceContentMD5, + @HeaderParam("x-ms-source-content-crc64") String sourceContentcrc64, @QueryParam("timeout") Integer timeout, + @HeaderParam("x-ms-encryption-key") String encryptionKey, + @HeaderParam("x-ms-encryption-key-sha256") String encryptionKeySha256, + @HeaderParam("x-ms-encryption-algorithm") EncryptionAlgorithmType encryptionAlgorithm, + @HeaderParam("x-ms-encryption-scope") String encryptionScope, @HeaderParam("x-ms-lease-id") String leaseId, + @HeaderParam("x-ms-source-if-modified-since") DateTimeRfc1123 sourceIfModifiedSince, + @HeaderParam("x-ms-source-if-unmodified-since") DateTimeRfc1123 sourceIfUnmodifiedSince, + @HeaderParam("x-ms-source-if-match") String sourceIfMatch, + @HeaderParam("x-ms-source-if-none-match") String sourceIfNoneMatch, + @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, + @HeaderParam("x-ms-copy-source-authorization") String copySourceAuthorization, + @HeaderParam("Accept") String accept, Context context); + + @HttpRequestInformation( + method = HttpMethod.PUT, + path = "/{containerName}/{blob}", + expectedStatusCodes = { 201 }) + @UnexpectedResponseExceptionDetail + Response stageBlockFromURLNoCustomHeadersSync(@HostParam("url") String url, + @PathParam("containerName") String containerName, @PathParam("blob") String blob, + @QueryParam("comp") String comp, @QueryParam("blockid") String blockId, + @HeaderParam("Content-Length") long contentLength, @HeaderParam("x-ms-copy-source") String sourceUrl, + @HeaderParam("x-ms-source-range") String sourceRange, + @HeaderParam("x-ms-source-content-md5") String sourceContentMD5, + @HeaderParam("x-ms-source-content-crc64") String sourceContentcrc64, @QueryParam("timeout") Integer timeout, + @HeaderParam("x-ms-encryption-key") String encryptionKey, + @HeaderParam("x-ms-encryption-key-sha256") String encryptionKeySha256, + @HeaderParam("x-ms-encryption-algorithm") EncryptionAlgorithmType encryptionAlgorithm, + @HeaderParam("x-ms-encryption-scope") String encryptionScope, @HeaderParam("x-ms-lease-id") String leaseId, + @HeaderParam("x-ms-source-if-modified-since") DateTimeRfc1123 sourceIfModifiedSince, + @HeaderParam("x-ms-source-if-unmodified-since") DateTimeRfc1123 sourceIfUnmodifiedSince, + @HeaderParam("x-ms-source-if-match") String sourceIfMatch, + @HeaderParam("x-ms-source-if-none-match") String sourceIfNoneMatch, + @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, + @HeaderParam("x-ms-copy-source-authorization") String copySourceAuthorization, + @HeaderParam("Accept") String accept, Context context); + + @HttpRequestInformation( + method = HttpMethod.PUT, + path = "/{containerName}/{blob}", + expectedStatusCodes = { 201 }) + @UnexpectedResponseExceptionDetail + 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); + + @HttpRequestInformation( + method = HttpMethod.PUT, + path = "/{containerName}/{blob}", + expectedStatusCodes = { 201 }) + @UnexpectedResponseExceptionDetail + 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); + + @HttpRequestInformation( + method = HttpMethod.GET, + path = "/{containerName}/{blob}", + expectedStatusCodes = { 200 }) + @UnexpectedResponseExceptionDetail + 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); + + @HttpRequestInformation( + method = HttpMethod.GET, + path = "/{containerName}/{blob}", + expectedStatusCodes = { 200 }) + @UnexpectedResponseExceptionDetail + 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://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param transactionalContentMD5 Specify the transactional md5 for the body, to be validated by the service. + * @param metadata Optional. Specifies a user-defined name-value pair associated with the blob. If no name-value + * pairs are specified, the operation will copy the metadata from the source blob or file to the destination blob. + * If one or more name-value pairs are specified, the destination blob is created with the specified metadata, and + * metadata is not copied from the source blob or file. Note that beginning with version 2009-09-19, metadata names + * must adhere to the naming rules for C# identifiers. See Naming and Referencing Containers, Blobs, and Metadata + * for more information. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param tier Optional. Indicates the tier to be set on the blob. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the + * specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since + * the specified date/time. + * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. + * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. + * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param blobTagsString Optional. Used to set blob tags in various blob operations. + * @param immutabilityPolicyExpiry Specifies the date time when the blobs immutability policy is set to expire. + * @param immutabilityPolicyMode Specifies the immutability policy mode to set on the blob. + * @param legalHold Specified if a legal hold should be set on the blob. + * @param transactionalContentCrc64 Specify the transactional crc64 for the body, to be validated by the service. + * @param 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 StorageErrorException thrown if 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 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) { + 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); + } + + /** + * The Upload Block Blob operation updates the content of an existing block blob. Updating an existing block blob + * overwrites any existing metadata on the blob. Partial updates are not supported with Put Blob; the content of the + * existing blob is overwritten with the content of the new blob. To perform a partial update of the content of a + * block blob, use the Put Block List operation. + * + * @param containerName The container name. + * @param blob The blob name. + * @param contentLength The length of the request. + * @param body Initial data. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param transactionalContentMD5 Specify the transactional md5 for the body, to be validated by the service. + * @param metadata Optional. Specifies a user-defined name-value pair associated with the blob. If no name-value + * pairs are specified, the operation will copy the metadata from the source blob or file to the destination blob. + * If one or more name-value pairs are specified, the destination blob is created with the specified metadata, and + * metadata is not copied from the source blob or file. Note that beginning with version 2009-09-19, metadata names + * must adhere to the naming rules for C# identifiers. See Naming and Referencing Containers, Blobs, and Metadata + * for more information. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param tier Optional. Indicates the tier to be set on the blob. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the + * specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since + * the specified date/time. + * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. + * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. + * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param blobTagsString Optional. Used to set blob tags in various blob operations. + * @param immutabilityPolicyExpiry Specifies the date time when the blobs immutability policy is set to expire. + * @param immutabilityPolicyMode Specifies the immutability policy mode to set on the blob. + * @param legalHold Specified if a legal hold should be set on the blob. + * @param transactionalContentCrc64 Specify the transactional crc64 for the body, to be validated by the service. + * @param 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 StorageErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void upload(String containerName, String blob, long contentLength, BinaryData body, Integer timeout, + byte[] transactionalContentMD5, Map metadata, String leaseId, AccessTier tier, + OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, + String ifTags, String requestId, String blobTagsString, OffsetDateTime immutabilityPolicyExpiry, + BlobImmutabilityPolicyMode immutabilityPolicyMode, Boolean legalHold, byte[] transactionalContentCrc64, + 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. + * @param contentLength The length of the request. + * @param body Initial data. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param transactionalContentMD5 Specify the transactional md5 for the body, to be validated by the service. + * @param metadata Optional. Specifies a user-defined name-value pair associated with the blob. If no name-value + * pairs are specified, the operation will copy the metadata from the source blob or file to the destination blob. + * If one or more name-value pairs are specified, the destination blob is created with the specified metadata, and + * metadata is not copied from the source blob or file. Note that beginning with version 2009-09-19, metadata names + * must adhere to the naming rules for C# identifiers. See Naming and Referencing Containers, Blobs, and Metadata + * for more information. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param tier Optional. Indicates the tier to be set on the blob. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the + * specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since + * the specified date/time. + * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. + * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. + * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param blobTagsString Optional. Used to set blob tags in various blob operations. + * @param immutabilityPolicyExpiry Specifies the date time when the blobs immutability policy is set to expire. + * @param immutabilityPolicyMode Specifies the immutability policy mode to set on the blob. + * @param legalHold Specified if a legal hold should be set on the blob. + * @param transactionalContentCrc64 Specify the transactional crc64 for the body, to be validated by the service. + * @param 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 StorageErrorException 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 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) { + 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); + } + + /** + * The Put Blob from URL operation creates a new Block Blob where the contents of the blob are read from a given + * URL. This API is supported beginning with the 2020-04-08 version. Partial updates are not supported with Put Blob + * from URL; the content of an existing blob is overwritten with the content of the new blob. To perform partial + * updates to a block blob's contents using a source URL, use the Put Block from URL API in conjunction with Put + * Block List. + * + * @param containerName The container name. + * @param blob The blob name. + * @param contentLength The length of the request. + * @param copySource Specifies the name of the source page blob snapshot. This value is a URL of up to 2 KB in + * length that specifies a page blob snapshot. The value should be URL-encoded as it would appear in a request URI. + * The source blob must either be public or must be authenticated via a shared access signature. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param transactionalContentMD5 Specify the transactional md5 for the body, to be validated by the service. + * @param metadata Optional. Specifies a user-defined name-value pair associated with the blob. If no name-value + * pairs are specified, the operation will copy the metadata from the source blob or file to the destination blob. + * If one or more name-value pairs are specified, the destination blob is created with the specified metadata, and + * metadata is not copied from the source blob or file. Note that beginning with version 2009-09-19, metadata names + * must adhere to the naming rules for C# identifiers. See Naming and Referencing Containers, Blobs, and Metadata + * for more information. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param tier Optional. Indicates the tier to be set on the blob. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the + * specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since + * the specified date/time. + * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. + * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. + * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. + * @param sourceIfModifiedSince Specify this header value to operate only on a blob if it has been modified since + * the specified date/time. + * @param sourceIfUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified + * since the specified date/time. + * @param sourceIfMatch Specify an ETag value to operate only on blobs with a matching value. + * @param sourceIfNoneMatch Specify an ETag value to operate only on blobs without a matching value. + * @param sourceIfTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param sourceContentMD5 Specify the md5 calculated for the range of bytes that must be read from the copy source. + * @param blobTagsString Optional. Used to set blob tags in various blob operations. + * @param copySourceBlobProperties Optional, default is true. Indicates if properties from the source blob should be + * copied. + * @param copySourceAuthorization Only Bearer type is supported. Credentials should be a valid OAuth access token to + * copy source. + * @param copySourceTags Optional, default 'replace'. Indicates if source tags should be copied or replaced with the + * tags specified by x-ms-tags. + * @param blobHttpHeaders Parameter group. + * @param cpkInfo Parameter group. + * @param encryptionScopeParam Parameter group. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws StorageErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link ResponseBase}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ResponseBase putBlobFromUrlWithResponse(String containerName, + String blob, long contentLength, String copySource, Integer timeout, byte[] transactionalContentMD5, + Map metadata, String leaseId, AccessTier tier, OffsetDateTime ifModifiedSince, + OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, String ifTags, + OffsetDateTime sourceIfModifiedSince, OffsetDateTime sourceIfUnmodifiedSince, String sourceIfMatch, + String sourceIfNoneMatch, String sourceIfTags, String requestId, byte[] sourceContentMD5, String blobTagsString, + Boolean copySourceBlobProperties, String copySourceAuthorization, BlobCopySourceTagsMode copySourceTags, + BlobHttpHeaders blobHttpHeaders, CpkInfo cpkInfo, EncryptionScope encryptionScopeParam, Context context) { + final String blobType = "BlockBlob"; + final String accept = "application/xml"; + String contentTypeInternal = null; + if (blobHttpHeaders != null) { + contentTypeInternal = blobHttpHeaders.getContentType(); + } + String contentType = contentTypeInternal; + String contentEncodingInternal = null; + if (blobHttpHeaders != null) { + contentEncodingInternal = blobHttpHeaders.getContentEncoding(); + } + String contentEncoding = contentEncodingInternal; + String contentLanguageInternal = null; + if (blobHttpHeaders != null) { + contentLanguageInternal = blobHttpHeaders.getContentLanguage(); + } + String contentLanguage = contentLanguageInternal; + byte[] contentMd5Internal = null; + if (blobHttpHeaders != null) { + contentMd5Internal = blobHttpHeaders.getContentMd5(); + } + byte[] contentMd5 = contentMd5Internal; + String cacheControlInternal = null; + if (blobHttpHeaders != null) { + cacheControlInternal = blobHttpHeaders.getCacheControl(); + } + String cacheControl = cacheControlInternal; + String contentDispositionInternal = null; + if (blobHttpHeaders != null) { + contentDispositionInternal = blobHttpHeaders.getContentDisposition(); + } + String contentDisposition = contentDispositionInternal; + String encryptionKeyInternal = null; + if (cpkInfo != null) { + encryptionKeyInternal = cpkInfo.getEncryptionKey(); + } + String encryptionKey = encryptionKeyInternal; + String encryptionKeySha256Internal = null; + if (cpkInfo != null) { + encryptionKeySha256Internal = cpkInfo.getEncryptionKeySha256(); + } + String encryptionKeySha256 = encryptionKeySha256Internal; + EncryptionAlgorithmType encryptionAlgorithmInternal = null; + if (cpkInfo != null) { + encryptionAlgorithmInternal = cpkInfo.getEncryptionAlgorithm(); + } + EncryptionAlgorithmType encryptionAlgorithm = encryptionAlgorithmInternal; + String encryptionScopeInternal = null; + if (encryptionScopeParam != null) { + encryptionScopeInternal = encryptionScopeParam.getEncryptionScope(); + } + String encryptionScope = encryptionScopeInternal; + String transactionalContentMD5Converted = Base64Util.encodeToString(transactionalContentMD5); + String contentMd5Converted = Base64Util.encodeToString(contentMd5); + DateTimeRfc1123 ifModifiedSinceConverted + = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); + DateTimeRfc1123 ifUnmodifiedSinceConverted + = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); + DateTimeRfc1123 sourceIfModifiedSinceConverted + = sourceIfModifiedSince == null ? null : new DateTimeRfc1123(sourceIfModifiedSince); + DateTimeRfc1123 sourceIfUnmodifiedSinceConverted + = sourceIfUnmodifiedSince == null ? null : new DateTimeRfc1123(sourceIfUnmodifiedSince); + String sourceContentMD5Converted = Base64Util.encodeToString(sourceContentMD5); + return service.putBlobFromUrlSync(this.client.getUrl(), containerName, blob, blobType, timeout, + transactionalContentMD5Converted, contentLength, contentType, contentEncoding, contentLanguage, + contentMd5Converted, cacheControl, metadata, leaseId, contentDisposition, encryptionKey, + encryptionKeySha256, encryptionAlgorithm, encryptionScope, tier, ifModifiedSinceConverted, + ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, sourceIfModifiedSinceConverted, + sourceIfUnmodifiedSinceConverted, sourceIfMatch, sourceIfNoneMatch, sourceIfTags, this.client.getVersion(), + requestId, sourceContentMD5Converted, blobTagsString, copySource, copySourceBlobProperties, + copySourceAuthorization, copySourceTags, accept, context); + } + + /** + * The Put Blob from URL operation creates a new Block Blob where the contents of the blob are read from a given + * URL. This API is supported beginning with the 2020-04-08 version. Partial updates are not supported with Put Blob + * from URL; the content of an existing blob is overwritten with the content of the new blob. To perform partial + * updates to a block blob's contents using a source URL, use the Put Block from URL API in conjunction with Put + * Block List. + * + * @param containerName The container name. + * @param blob The blob name. + * @param contentLength The length of the request. + * @param copySource Specifies the name of the source page blob snapshot. This value is a URL of up to 2 KB in + * length that specifies a page blob snapshot. The value should be URL-encoded as it would appear in a request URI. + * The source blob must either be public or must be authenticated via a shared access signature. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param transactionalContentMD5 Specify the transactional md5 for the body, to be validated by the service. + * @param metadata Optional. Specifies a user-defined name-value pair associated with the blob. If no name-value + * pairs are specified, the operation will copy the metadata from the source blob or file to the destination blob. + * If one or more name-value pairs are specified, the destination blob is created with the specified metadata, and + * metadata is not copied from the source blob or file. Note that beginning with version 2009-09-19, metadata names + * must adhere to the naming rules for C# identifiers. See Naming and Referencing Containers, Blobs, and Metadata + * for more information. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param tier Optional. Indicates the tier to be set on the blob. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the + * specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since + * the specified date/time. + * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. + * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. + * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. + * @param sourceIfModifiedSince Specify this header value to operate only on a blob if it has been modified since + * the specified date/time. + * @param sourceIfUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified + * since the specified date/time. + * @param sourceIfMatch Specify an ETag value to operate only on blobs with a matching value. + * @param sourceIfNoneMatch Specify an ETag value to operate only on blobs without a matching value. + * @param sourceIfTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param sourceContentMD5 Specify the md5 calculated for the range of bytes that must be read from the copy source. + * @param blobTagsString Optional. Used to set blob tags in various blob operations. + * @param copySourceBlobProperties Optional, default is true. Indicates if properties from the source blob should be + * copied. + * @param copySourceAuthorization Only Bearer type is supported. Credentials should be a valid OAuth access token to + * copy source. + * @param copySourceTags Optional, default 'replace'. Indicates if source tags should be copied or replaced with the + * tags specified by x-ms-tags. + * @param blobHttpHeaders Parameter group. + * @param cpkInfo Parameter group. + * @param encryptionScopeParam Parameter group. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws StorageErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void putBlobFromUrl(String containerName, String blob, long contentLength, String copySource, + Integer timeout, byte[] transactionalContentMD5, Map metadata, String leaseId, AccessTier tier, + OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, + String ifTags, OffsetDateTime sourceIfModifiedSince, OffsetDateTime sourceIfUnmodifiedSince, + String sourceIfMatch, String sourceIfNoneMatch, String sourceIfTags, String requestId, byte[] sourceContentMD5, + String blobTagsString, Boolean copySourceBlobProperties, String copySourceAuthorization, + BlobCopySourceTagsMode copySourceTags, BlobHttpHeaders blobHttpHeaders, CpkInfo cpkInfo, + EncryptionScope encryptionScopeParam) { + putBlobFromUrlWithResponse(containerName, blob, contentLength, copySource, timeout, transactionalContentMD5, + metadata, leaseId, tier, ifModifiedSince, ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, + sourceIfModifiedSince, sourceIfUnmodifiedSince, sourceIfMatch, sourceIfNoneMatch, sourceIfTags, requestId, + sourceContentMD5, blobTagsString, copySourceBlobProperties, copySourceAuthorization, copySourceTags, + blobHttpHeaders, cpkInfo, encryptionScopeParam, Context.none()); + } + + /** + * The Put Blob from URL operation creates a new Block Blob where the contents of the blob are read from a given + * URL. This API is supported beginning with the 2020-04-08 version. Partial updates are not supported with Put Blob + * from URL; the content of an existing blob is overwritten with the content of the new blob. To perform partial + * updates to a block blob's contents using a source URL, use the Put Block from URL API in conjunction with Put + * Block List. + * + * @param containerName The container name. + * @param blob The blob name. + * @param contentLength The length of the request. + * @param copySource Specifies the name of the source page blob snapshot. This value is a URL of up to 2 KB in + * length that specifies a page blob snapshot. The value should be URL-encoded as it would appear in a request URI. + * The source blob must either be public or must be authenticated via a shared access signature. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param transactionalContentMD5 Specify the transactional md5 for the body, to be validated by the service. + * @param metadata Optional. Specifies a user-defined name-value pair associated with the blob. If no name-value + * pairs are specified, the operation will copy the metadata from the source blob or file to the destination blob. + * If one or more name-value pairs are specified, the destination blob is created with the specified metadata, and + * metadata is not copied from the source blob or file. Note that beginning with version 2009-09-19, metadata names + * must adhere to the naming rules for C# identifiers. See Naming and Referencing Containers, Blobs, and Metadata + * for more information. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param tier Optional. Indicates the tier to be set on the blob. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the + * specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since + * the specified date/time. + * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. + * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. + * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. + * @param sourceIfModifiedSince Specify this header value to operate only on a blob if it has been modified since + * the specified date/time. + * @param sourceIfUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified + * since the specified date/time. + * @param sourceIfMatch Specify an ETag value to operate only on blobs with a matching value. + * @param sourceIfNoneMatch Specify an ETag value to operate only on blobs without a matching value. + * @param sourceIfTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param sourceContentMD5 Specify the md5 calculated for the range of bytes that must be read from the copy source. + * @param blobTagsString Optional. Used to set blob tags in various blob operations. + * @param copySourceBlobProperties Optional, default is true. Indicates if properties from the source blob should be + * copied. + * @param copySourceAuthorization Only Bearer type is supported. Credentials should be a valid OAuth access token to + * copy source. + * @param copySourceTags Optional, default 'replace'. Indicates if source tags should be copied or replaced with the + * tags specified by x-ms-tags. + * @param blobHttpHeaders Parameter group. + * @param cpkInfo Parameter group. + * @param encryptionScopeParam Parameter group. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws StorageErrorException 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 Response putBlobFromUrlNoCustomHeadersWithResponse(String containerName, String blob, + long contentLength, String copySource, Integer timeout, byte[] transactionalContentMD5, + Map metadata, String leaseId, AccessTier tier, OffsetDateTime ifModifiedSince, + OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, String ifTags, + OffsetDateTime sourceIfModifiedSince, OffsetDateTime sourceIfUnmodifiedSince, String sourceIfMatch, + String sourceIfNoneMatch, String sourceIfTags, String requestId, byte[] sourceContentMD5, String blobTagsString, + Boolean copySourceBlobProperties, String copySourceAuthorization, BlobCopySourceTagsMode copySourceTags, + BlobHttpHeaders blobHttpHeaders, CpkInfo cpkInfo, EncryptionScope encryptionScopeParam, Context context) { + final String blobType = "BlockBlob"; + final String accept = "application/xml"; + String contentTypeInternal = null; + if (blobHttpHeaders != null) { + contentTypeInternal = blobHttpHeaders.getContentType(); + } + String contentType = contentTypeInternal; + String contentEncodingInternal = null; + if (blobHttpHeaders != null) { + contentEncodingInternal = blobHttpHeaders.getContentEncoding(); + } + String contentEncoding = contentEncodingInternal; + String contentLanguageInternal = null; + if (blobHttpHeaders != null) { + contentLanguageInternal = blobHttpHeaders.getContentLanguage(); + } + String contentLanguage = contentLanguageInternal; + byte[] contentMd5Internal = null; + if (blobHttpHeaders != null) { + contentMd5Internal = blobHttpHeaders.getContentMd5(); + } + byte[] contentMd5 = contentMd5Internal; + String cacheControlInternal = null; + if (blobHttpHeaders != null) { + cacheControlInternal = blobHttpHeaders.getCacheControl(); + } + String cacheControl = cacheControlInternal; + String contentDispositionInternal = null; + if (blobHttpHeaders != null) { + contentDispositionInternal = blobHttpHeaders.getContentDisposition(); + } + String contentDisposition = contentDispositionInternal; + String encryptionKeyInternal = null; + if (cpkInfo != null) { + encryptionKeyInternal = cpkInfo.getEncryptionKey(); + } + String encryptionKey = encryptionKeyInternal; + String encryptionKeySha256Internal = null; + if (cpkInfo != null) { + encryptionKeySha256Internal = cpkInfo.getEncryptionKeySha256(); + } + String encryptionKeySha256 = encryptionKeySha256Internal; + EncryptionAlgorithmType encryptionAlgorithmInternal = null; + if (cpkInfo != null) { + encryptionAlgorithmInternal = cpkInfo.getEncryptionAlgorithm(); + } + EncryptionAlgorithmType encryptionAlgorithm = encryptionAlgorithmInternal; + String encryptionScopeInternal = null; + if (encryptionScopeParam != null) { + encryptionScopeInternal = encryptionScopeParam.getEncryptionScope(); + } + String encryptionScope = encryptionScopeInternal; + String transactionalContentMD5Converted = Base64Util.encodeToString(transactionalContentMD5); + String contentMd5Converted = Base64Util.encodeToString(contentMd5); + DateTimeRfc1123 ifModifiedSinceConverted + = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); + DateTimeRfc1123 ifUnmodifiedSinceConverted + = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); + DateTimeRfc1123 sourceIfModifiedSinceConverted + = sourceIfModifiedSince == null ? null : new DateTimeRfc1123(sourceIfModifiedSince); + DateTimeRfc1123 sourceIfUnmodifiedSinceConverted + = sourceIfUnmodifiedSince == null ? null : new DateTimeRfc1123(sourceIfUnmodifiedSince); + String sourceContentMD5Converted = Base64Util.encodeToString(sourceContentMD5); + return service.putBlobFromUrlNoCustomHeadersSync(this.client.getUrl(), containerName, blob, blobType, timeout, + transactionalContentMD5Converted, contentLength, contentType, contentEncoding, contentLanguage, + contentMd5Converted, cacheControl, metadata, leaseId, contentDisposition, encryptionKey, + encryptionKeySha256, encryptionAlgorithm, encryptionScope, tier, ifModifiedSinceConverted, + ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, sourceIfModifiedSinceConverted, + sourceIfUnmodifiedSinceConverted, sourceIfMatch, sourceIfNoneMatch, sourceIfTags, this.client.getVersion(), + requestId, sourceContentMD5Converted, blobTagsString, copySource, copySourceBlobProperties, + copySourceAuthorization, copySourceTags, accept, context); + } + + /** + * The Stage Block operation creates a new block to be committed as part of a blob. + * + * @param containerName The container name. + * @param blob The blob name. + * @param blockId A valid Base64 string value that identifies the block. Prior to encoding, the string must be less + * than or equal to 64 bytes in size. For a given blob, the length of the value specified for the blockid parameter + * must be the same size for each block. + * @param contentLength The length of the request. + * @param body Initial data. + * @param transactionalContentMD5 Specify the transactional md5 for the body, to be validated by the service. + * @param transactionalContentCrc64 Specify the transactional crc64 for the body, to be validated by the service. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param 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 StorageErrorException thrown if 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) { + 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); + } + + /** + * The Stage Block operation creates a new block to be committed as part of a blob. + * + * @param containerName The container name. + * @param blob The blob name. + * @param blockId A valid Base64 string value that identifies the block. Prior to encoding, the string must be less + * than or equal to 64 bytes in size. For a given blob, the length of the value specified for the blockid parameter + * must be the same size for each block. + * @param contentLength The length of the request. + * @param body Initial data. + * @param transactionalContentMD5 Specify the transactional md5 for the body, to be validated by the service. + * @param transactionalContentCrc64 Specify the transactional crc64 for the body, to be validated by the service. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param 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 StorageErrorException 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://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param 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 StorageErrorException 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 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) { + 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); + } + + /** + * The Stage Block operation creates a new block to be committed as part of a blob where the contents are read from + * a URL. + * + * @param containerName The container name. + * @param blob The blob name. + * @param blockId A valid Base64 string value that identifies the block. Prior to encoding, the string must be less + * than or equal to 64 bytes in size. For a given blob, the length of the value specified for the blockid parameter + * must be the same size for each block. + * @param contentLength The length of the request. + * @param sourceUrl Specify a URL to the copy source. + * @param sourceRange Bytes of source data in the specified range. + * @param sourceContentMD5 Specify the md5 calculated for the range of bytes that must be read from the copy source. + * @param sourceContentcrc64 Specify the crc64 calculated for the range of bytes that must be read from the copy + * source. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param sourceIfModifiedSince Specify this header value to operate only on a blob if it has been modified since + * the specified date/time. + * @param sourceIfUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified + * since the specified date/time. + * @param sourceIfMatch Specify an ETag value to operate only on blobs with a matching value. + * @param sourceIfNoneMatch Specify an ETag value to operate only on blobs without a matching value. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param copySourceAuthorization Only Bearer type is supported. Credentials should be a valid OAuth access token to + * copy source. + * @param cpkInfo Parameter group. + * @param encryptionScopeParam Parameter group. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws StorageErrorException thrown if 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, 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.stageBlockFromURLSync(this.client.getUrl(), containerName, blob, comp, blockId, contentLength, + sourceUrl, sourceRange, sourceContentMD5Converted, sourceContentcrc64Converted, timeout, encryptionKey, + encryptionKeySha256, encryptionAlgorithm, encryptionScope, leaseId, sourceIfModifiedSinceConverted, + sourceIfUnmodifiedSinceConverted, sourceIfMatch, sourceIfNoneMatch, this.client.getVersion(), requestId, + copySourceAuthorization, accept, context); + } + + /** + * The Stage Block operation creates a new block to be committed as part of a blob where the contents are read from + * a URL. + * + * @param containerName The container name. + * @param blob The blob name. + * @param blockId A valid Base64 string value that identifies the block. Prior to encoding, the string must be less + * than or equal to 64 bytes in size. For a given blob, the length of the value specified for the blockid parameter + * must be the same size for each block. + * @param contentLength The length of the request. + * @param sourceUrl Specify a URL to the copy source. + * @param sourceRange Bytes of source data in the specified range. + * @param sourceContentMD5 Specify the md5 calculated for the range of bytes that must be read from the copy source. + * @param sourceContentcrc64 Specify the crc64 calculated for the range of bytes that must be read from the copy + * source. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param sourceIfModifiedSince Specify this header value to operate only on a blob if it has been modified since + * the specified date/time. + * @param sourceIfUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified + * since the specified date/time. + * @param sourceIfMatch Specify an ETag value to operate only on blobs with a matching value. + * @param sourceIfNoneMatch Specify an ETag value to operate only on blobs without a matching value. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param copySourceAuthorization Only Bearer type is supported. Credentials should be a valid OAuth access token to + * copy source. + * @param cpkInfo Parameter group. + * @param encryptionScopeParam Parameter group. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws StorageErrorException 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, + CpkInfo cpkInfo, EncryptionScope encryptionScopeParam) { + stageBlockFromURLWithResponse(containerName, blob, blockId, contentLength, sourceUrl, sourceRange, + sourceContentMD5, sourceContentcrc64, timeout, leaseId, sourceIfModifiedSince, sourceIfUnmodifiedSince, + sourceIfMatch, sourceIfNoneMatch, requestId, copySourceAuthorization, cpkInfo, encryptionScopeParam, + Context.none()); + } + + /** + * The Stage Block operation creates a new block to be committed as part of a blob where the contents are read from + * a URL. + * + * @param containerName The container name. + * @param blob The blob name. + * @param blockId A valid Base64 string value that identifies the block. Prior to encoding, the string must be less + * than or equal to 64 bytes in size. For a given blob, the length of the value specified for the blockid parameter + * must be the same size for each block. + * @param contentLength The length of the request. + * @param sourceUrl Specify a URL to the copy source. + * @param sourceRange Bytes of source data in the specified range. + * @param sourceContentMD5 Specify the md5 calculated for the range of bytes that must be read from the copy source. + * @param sourceContentcrc64 Specify the crc64 calculated for the range of bytes that must be read from the copy + * source. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param sourceIfModifiedSince Specify this header value to operate only on a blob if it has been modified since + * the specified date/time. + * @param sourceIfUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified + * since the specified date/time. + * @param sourceIfMatch Specify an ETag value to operate only on blobs with a matching value. + * @param sourceIfNoneMatch Specify an ETag value to operate only on blobs without a matching value. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param copySourceAuthorization Only Bearer type is supported. Credentials should be a valid OAuth access token to + * copy source. + * @param cpkInfo Parameter group. + * @param encryptionScopeParam Parameter group. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws StorageErrorException 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 Response stageBlockFromURLNoCustomHeadersWithResponse(String containerName, String blob, + String blockId, long contentLength, String sourceUrl, String sourceRange, byte[] sourceContentMD5, + byte[] sourceContentcrc64, Integer timeout, String leaseId, OffsetDateTime sourceIfModifiedSince, + OffsetDateTime sourceIfUnmodifiedSince, String sourceIfMatch, String sourceIfNoneMatch, String requestId, + String copySourceAuthorization, CpkInfo cpkInfo, EncryptionScope encryptionScopeParam, Context context) { + final String comp = "block"; + final String accept = "application/xml"; + String encryptionKeyInternal = null; + if (cpkInfo != null) { + encryptionKeyInternal = cpkInfo.getEncryptionKey(); + } + String encryptionKey = encryptionKeyInternal; + String encryptionKeySha256Internal = null; + if (cpkInfo != null) { + encryptionKeySha256Internal = cpkInfo.getEncryptionKeySha256(); + } + String encryptionKeySha256 = encryptionKeySha256Internal; + EncryptionAlgorithmType encryptionAlgorithmInternal = null; + if (cpkInfo != null) { + encryptionAlgorithmInternal = cpkInfo.getEncryptionAlgorithm(); + } + EncryptionAlgorithmType encryptionAlgorithm = encryptionAlgorithmInternal; + String encryptionScopeInternal = null; + if (encryptionScopeParam != null) { + encryptionScopeInternal = encryptionScopeParam.getEncryptionScope(); + } + String encryptionScope = encryptionScopeInternal; + String sourceContentMD5Converted = Base64Util.encodeToString(sourceContentMD5); + String sourceContentcrc64Converted = Base64Util.encodeToString(sourceContentcrc64); + DateTimeRfc1123 sourceIfModifiedSinceConverted + = sourceIfModifiedSince == null ? null : new DateTimeRfc1123(sourceIfModifiedSince); + DateTimeRfc1123 sourceIfUnmodifiedSinceConverted + = sourceIfUnmodifiedSince == null ? null : new DateTimeRfc1123(sourceIfUnmodifiedSince); + return service.stageBlockFromURLNoCustomHeadersSync(this.client.getUrl(), containerName, blob, comp, blockId, + contentLength, sourceUrl, sourceRange, sourceContentMD5Converted, sourceContentcrc64Converted, timeout, + encryptionKey, encryptionKeySha256, encryptionAlgorithm, encryptionScope, leaseId, + sourceIfModifiedSinceConverted, sourceIfUnmodifiedSinceConverted, sourceIfMatch, sourceIfNoneMatch, + this.client.getVersion(), requestId, copySourceAuthorization, accept, context); + } + + /** + * The Commit Block List operation writes a blob by specifying the list of block IDs that make up the blob. In order + * to be written as part of a blob, a block must have been successfully written to the server in a prior Put Block + * operation. You can call Put Block List to update a blob by uploading only those blocks that have changed, then + * committing the new and existing blocks together. You can do this by specifying whether to commit a block from the + * committed block list or from the uncommitted block list, or to commit the most recently uploaded version of the + * block, whichever list it may belong to. + * + * @param containerName The container name. + * @param blob The blob name. + * @param blocks Blob Blocks. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param transactionalContentMD5 Specify the transactional md5 for the body, to be validated by the service. + * @param transactionalContentCrc64 Specify the transactional crc64 for the body, to be validated by the service. + * @param metadata Optional. Specifies a user-defined name-value pair associated with the blob. If no name-value + * pairs are specified, the operation will copy the metadata from the source blob or file to the destination blob. + * If one or more name-value pairs are specified, the destination blob is created with the specified metadata, and + * metadata is not copied from the source blob or file. Note that beginning with version 2009-09-19, metadata names + * must adhere to the naming rules for C# identifiers. See Naming and Referencing Containers, Blobs, and Metadata + * for more information. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param tier Optional. Indicates the tier to be set on the blob. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the + * specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since + * the specified date/time. + * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. + * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. + * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param blobTagsString Optional. Used to set blob tags in various blob operations. + * @param immutabilityPolicyExpiry Specifies the date time when the blobs immutability policy is set to expire. + * @param immutabilityPolicyMode Specifies the immutability policy mode to set on the blob. + * @param legalHold Specified if a legal hold should be set on the blob. + * @param blobHttpHeaders Parameter group. + * @param cpkInfo Parameter group. + * @param encryptionScopeParam Parameter group. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws StorageErrorException thrown if 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) { + 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); + } + + /** + * The Commit Block List operation writes a blob by specifying the list of block IDs that make up the blob. In order + * to be written as part of a blob, a block must have been successfully written to the server in a prior Put Block + * operation. You can call Put Block List to update a blob by uploading only those blocks that have changed, then + * committing the new and existing blocks together. You can do this by specifying whether to commit a block from the + * committed block list or from the uncommitted block list, or to commit the most recently uploaded version of the + * block, whichever list it may belong to. + * + * @param containerName The container name. + * @param blob The blob name. + * @param blocks Blob Blocks. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param transactionalContentMD5 Specify the transactional md5 for the body, to be validated by the service. + * @param transactionalContentCrc64 Specify the transactional crc64 for the body, to be validated by the service. + * @param metadata Optional. Specifies a user-defined name-value pair associated with the blob. If no name-value + * pairs are specified, the operation will copy the metadata from the source blob or file to the destination blob. + * If one or more name-value pairs are specified, the destination blob is created with the specified metadata, and + * metadata is not copied from the source blob or file. Note that beginning with version 2009-09-19, metadata names + * must adhere to the naming rules for C# identifiers. See Naming and Referencing Containers, Blobs, and Metadata + * for more information. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param tier Optional. Indicates the tier to be set on the blob. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the + * specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since + * the specified date/time. + * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. + * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. + * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param blobTagsString Optional. Used to set blob tags in various blob operations. + * @param immutabilityPolicyExpiry Specifies the date time when the blobs immutability policy is set to expire. + * @param immutabilityPolicyMode Specifies the immutability policy mode to set on the blob. + * @param legalHold Specified if a legal hold should be set on the blob. + * @param blobHttpHeaders Parameter group. + * @param cpkInfo Parameter group. + * @param encryptionScopeParam Parameter group. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws StorageErrorException 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://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param transactionalContentMD5 Specify the transactional md5 for the body, to be validated by the service. + * @param transactionalContentCrc64 Specify the transactional crc64 for the body, to be validated by the service. + * @param metadata Optional. Specifies a user-defined name-value pair associated with the blob. If no name-value + * pairs are specified, the operation will copy the metadata from the source blob or file to the destination blob. + * If one or more name-value pairs are specified, the destination blob is created with the specified metadata, and + * metadata is not copied from the source blob or file. Note that beginning with version 2009-09-19, metadata names + * must adhere to the naming rules for C# identifiers. See Naming and Referencing Containers, Blobs, and Metadata + * for more information. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param tier Optional. Indicates the tier to be set on the blob. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the + * specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since + * the specified date/time. + * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. + * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. + * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param blobTagsString Optional. Used to set blob tags in various blob operations. + * @param immutabilityPolicyExpiry Specifies the date time when the blobs immutability policy is set to expire. + * @param immutabilityPolicyMode Specifies the immutability policy mode to set on the blob. + * @param legalHold Specified if a legal hold should be set on the blob. + * @param blobHttpHeaders Parameter group. + * @param cpkInfo Parameter group. + * @param encryptionScopeParam Parameter group. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws StorageErrorException 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 Response commitBlockListNoCustomHeadersWithResponse(String containerName, String blob, + BlockLookupList blocks, Integer timeout, byte[] transactionalContentMD5, byte[] transactionalContentCrc64, + Map metadata, String leaseId, AccessTier tier, OffsetDateTime ifModifiedSince, + OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, String ifTags, String requestId, + String blobTagsString, OffsetDateTime immutabilityPolicyExpiry, + BlobImmutabilityPolicyMode immutabilityPolicyMode, Boolean legalHold, BlobHttpHeaders blobHttpHeaders, + CpkInfo cpkInfo, EncryptionScope encryptionScopeParam, Context context) { + final String comp = "blocklist"; + final String accept = "application/xml"; + String cacheControlInternal = null; + 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); + } + + /** + * The Get Block List operation retrieves the list of blocks that have been uploaded as part of a block blob. + * + * @param containerName The container name. + * @param blob The blob name. + * @param listType Specifies whether to return the list of committed blocks, the list of uncommitted blocks, or both + * lists together. + * @param snapshot The snapshot parameter is an opaque DateTime value that, when present, specifies the blob + * snapshot to retrieve. For more information on working with blob snapshots, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/creating-a-snapshot-of-a-blob">Creating + * a Snapshot of a Blob.</a>. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws StorageErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link ResponseBase}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ResponseBase getBlockListWithResponse(String containerName, + String blob, BlockListType listType, String snapshot, Integer timeout, String leaseId, String ifTags, + String requestId, Context context) { + final String comp = "blocklist"; + final String accept = "application/xml"; + return service.getBlockListSync(this.client.getUrl(), containerName, blob, comp, snapshot, listType, timeout, + leaseId, ifTags, this.client.getVersion(), requestId, accept, context); + } + + /** + * The Get Block List operation retrieves the list of blocks that have been uploaded as part of a block blob. + * + * @param containerName The container name. + * @param blob The blob name. + * @param listType Specifies whether to return the list of committed blocks, the list of uncommitted blocks, or both + * lists together. + * @param snapshot The snapshot parameter is an opaque DateTime value that, when present, specifies the blob + * snapshot to retrieve. For more information on working with blob snapshots, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/creating-a-snapshot-of-a-blob">Creating + * a Snapshot of a Blob.</a>. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws StorageErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public BlockList getBlockList(String containerName, String blob, BlockListType listType, String snapshot, + Integer timeout, String leaseId, String ifTags, String requestId) { + return getBlockListWithResponse(containerName, blob, listType, snapshot, timeout, leaseId, ifTags, requestId, + Context.none()).getValue(); + } + + /** + * The Get Block List operation retrieves the list of blocks that have been uploaded as part of a block blob. + * + * @param containerName The container name. + * @param blob The blob name. + * @param listType Specifies whether to return the list of committed blocks, the list of uncommitted blocks, or both + * lists together. + * @param snapshot The snapshot parameter is an opaque DateTime value that, when present, specifies the blob + * snapshot to retrieve. For more information on working with blob snapshots, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/creating-a-snapshot-of-a-blob">Creating + * a Snapshot of a Blob.</a>. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws StorageErrorException 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 Response getBlockListNoCustomHeadersWithResponse(String containerName, String blob, + BlockListType listType, String snapshot, Integer timeout, String leaseId, String ifTags, String requestId, + Context context) { + final String comp = "blocklist"; + final String accept = "application/xml"; + return service.getBlockListNoCustomHeadersSync(this.client.getUrl(), containerName, blob, comp, snapshot, + listType, timeout, leaseId, ifTags, this.client.getVersion(), requestId, accept, context); + } +} diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/implementation/ContainersImpl.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/implementation/ContainersImpl.java new file mode 100644 index 000000000000..4999808ae89a --- /dev/null +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/implementation/ContainersImpl.java @@ -0,0 +1,2267 @@ +// 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.v2.annotation.ReturnType; +import com.azure.core.v2.annotation.ServiceMethod; +import com.azure.core.v2.http.rest.ResponseBase; +import io.clientcore.core.http.models.DateTimeRfc1123; +import com.azure.storage.blob.implementation.models.BlobSignedIdentifierWrapper; +import com.azure.storage.blob.models.BlobContainerEncryptionScope; +import com.azure.storage.blob.models.BlobSignedIdentifier; +import com.azure.storage.blob.models.ContainersAcquireLeaseHeaders; +import com.azure.storage.blob.models.ContainersBreakLeaseHeaders; +import com.azure.storage.blob.models.ContainersChangeLeaseHeaders; +import com.azure.storage.blob.models.ContainersCreateHeaders; +import com.azure.storage.blob.models.ContainersDeleteHeaders; +import com.azure.storage.blob.models.ContainersFilterBlobsHeaders; +import com.azure.storage.blob.models.ContainersGetAccessPolicyHeaders; +import com.azure.storage.blob.models.ContainersGetAccountInfoHeaders; +import com.azure.storage.blob.models.ContainersGetPropertiesHeaders; +import com.azure.storage.blob.models.ContainersListBlobFlatSegmentHeaders; +import com.azure.storage.blob.models.ContainersListBlobHierarchySegmentHeaders; +import com.azure.storage.blob.models.ContainersReleaseLeaseHeaders; +import com.azure.storage.blob.models.ContainersRenameHeaders; +import com.azure.storage.blob.models.ContainersRenewLeaseHeaders; +import com.azure.storage.blob.models.ContainersRestoreHeaders; +import com.azure.storage.blob.models.ContainersSetAccessPolicyHeaders; +import com.azure.storage.blob.models.ContainersSetMetadataHeaders; +import com.azure.storage.blob.models.ContainersSubmitBatchHeaders; +import com.azure.storage.blob.models.FilterBlobSegment; +import com.azure.storage.blob.models.FilterBlobsIncludeItem; +import com.azure.storage.blob.models.ListBlobsFlatSegmentResponse; +import com.azure.storage.blob.models.ListBlobsHierarchySegmentResponse; +import com.azure.storage.blob.models.ListBlobsIncludeItem; +import com.azure.storage.blob.models.PublicAccessType; +import com.azure.storage.blob.models.StorageErrorException; +import io.clientcore.core.annotation.ServiceInterface; +import io.clientcore.core.http.RestProxy; +import io.clientcore.core.http.annotation.BodyParam; +import io.clientcore.core.http.annotation.HeaderParam; +import io.clientcore.core.http.annotation.HostParam; +import io.clientcore.core.http.annotation.HttpRequestInformation; +import io.clientcore.core.http.annotation.PathParam; +import io.clientcore.core.http.annotation.QueryParam; +import io.clientcore.core.http.annotation.UnexpectedResponseExceptionDetail; +import io.clientcore.core.http.models.HttpMethod; +import io.clientcore.core.http.models.Response; +import io.clientcore.core.util.Context; +import io.clientcore.core.util.binarydata.BinaryData; +import java.io.InputStream; +import java.time.OffsetDateTime; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.stream.Collectors; + +/** + * An instance of this class provides access to all the operations defined in Containers. + */ +public final class ContainersImpl { + /** + * The proxy service used to perform REST calls. + */ + private final ContainersService service; + + /** + * The service client containing this operation class. + */ + private final AzureBlobStorageImpl client; + + /** + * Initializes an instance of ContainersImpl. + * + * @param client the instance of the service client containing this operation class. + */ + ContainersImpl(AzureBlobStorageImpl client) { + this.service + = RestProxy.create(ContainersService.class, client.getHttpPipeline()); + this.client = client; + } + + /** + * The interface defining all the services for AzureBlobStorageContainers to be used by the proxy service to perform + * REST calls. + */ + @ServiceInterface(name = "AzureBlobStorageCont", host = "{url}") + public interface ContainersService { + @HttpRequestInformation(method = HttpMethod.PUT, path = "/{containerName}", expectedStatusCodes = { 201 }) + @UnexpectedResponseExceptionDetail + 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); + + @HttpRequestInformation(method = HttpMethod.PUT, path = "/{containerName}", expectedStatusCodes = { 201 }) + @UnexpectedResponseExceptionDetail + 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); + + @HttpRequestInformation(method = HttpMethod.GET, path = "/{containerName}", expectedStatusCodes = { 200 }) + @UnexpectedResponseExceptionDetail + 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); + + @HttpRequestInformation(method = HttpMethod.GET, path = "/{containerName}", expectedStatusCodes = { 200 }) + @UnexpectedResponseExceptionDetail + 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); + + @HttpRequestInformation(method = HttpMethod.DELETE, path = "/{containerName}", expectedStatusCodes = { 202 }) + @UnexpectedResponseExceptionDetail + 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); + + @HttpRequestInformation(method = HttpMethod.DELETE, path = "/{containerName}", expectedStatusCodes = { 202 }) + @UnexpectedResponseExceptionDetail + 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); + + @HttpRequestInformation(method = HttpMethod.PUT, path = "/{containerName}", expectedStatusCodes = { 200 }) + @UnexpectedResponseExceptionDetail + 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); + + @HttpRequestInformation(method = HttpMethod.PUT, path = "/{containerName}", expectedStatusCodes = { 200 }) + @UnexpectedResponseExceptionDetail + 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); + + @HttpRequestInformation(method = HttpMethod.GET, path = "/{containerName}", expectedStatusCodes = { 200 }) + @UnexpectedResponseExceptionDetail + 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); + + @HttpRequestInformation(method = HttpMethod.GET, path = "/{containerName}", expectedStatusCodes = { 200 }) + @UnexpectedResponseExceptionDetail + 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); + + @HttpRequestInformation(method = HttpMethod.PUT, path = "/{containerName}", expectedStatusCodes = { 200 }) + @UnexpectedResponseExceptionDetail + 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); + + @HttpRequestInformation(method = HttpMethod.PUT, path = "/{containerName}", expectedStatusCodes = { 200 }) + @UnexpectedResponseExceptionDetail + 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); + + @HttpRequestInformation(method = HttpMethod.PUT, path = "/{containerName}", expectedStatusCodes = { 201 }) + @UnexpectedResponseExceptionDetail + 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); + + @HttpRequestInformation(method = HttpMethod.PUT, path = "/{containerName}", expectedStatusCodes = { 201 }) + @UnexpectedResponseExceptionDetail + 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); + + @HttpRequestInformation(method = HttpMethod.PUT, path = "/{containerName}", expectedStatusCodes = { 200 }) + @UnexpectedResponseExceptionDetail + ResponseBase renameSync(@HostParam("url") String url, + @PathParam("containerName") String containerName, @QueryParam("restype") String restype, + @QueryParam("comp") String comp, @QueryParam("timeout") Integer timeout, + @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, + @HeaderParam("x-ms-source-container-name") String sourceContainerName, + @HeaderParam("x-ms-source-lease-id") String sourceLeaseId, @HeaderParam("Accept") String accept, + Context context); + + @HttpRequestInformation(method = HttpMethod.PUT, path = "/{containerName}", expectedStatusCodes = { 200 }) + @UnexpectedResponseExceptionDetail + Response renameNoCustomHeadersSync(@HostParam("url") String url, + @PathParam("containerName") String containerName, @QueryParam("restype") String restype, + @QueryParam("comp") String comp, @QueryParam("timeout") Integer timeout, + @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, + @HeaderParam("x-ms-source-container-name") String sourceContainerName, + @HeaderParam("x-ms-source-lease-id") String sourceLeaseId, @HeaderParam("Accept") String accept, + Context context); + + @HttpRequestInformation(method = HttpMethod.POST, path = "/{containerName}", expectedStatusCodes = { 202 }) + @UnexpectedResponseExceptionDetail + 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); + + @HttpRequestInformation(method = HttpMethod.POST, path = "/{containerName}", expectedStatusCodes = { 202 }) + @UnexpectedResponseExceptionDetail + 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); + + @HttpRequestInformation(method = HttpMethod.GET, path = "/{containerName}", expectedStatusCodes = { 200 }) + @UnexpectedResponseExceptionDetail + 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); + + @HttpRequestInformation(method = HttpMethod.GET, path = "/{containerName}", expectedStatusCodes = { 200 }) + @UnexpectedResponseExceptionDetail + 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); + + @HttpRequestInformation(method = HttpMethod.PUT, path = "/{containerName}", expectedStatusCodes = { 201 }) + @UnexpectedResponseExceptionDetail + 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); + + @HttpRequestInformation(method = HttpMethod.PUT, path = "/{containerName}", expectedStatusCodes = { 201 }) + @UnexpectedResponseExceptionDetail + 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); + + @HttpRequestInformation(method = HttpMethod.PUT, path = "/{containerName}", expectedStatusCodes = { 200 }) + @UnexpectedResponseExceptionDetail + 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); + + @HttpRequestInformation(method = HttpMethod.PUT, path = "/{containerName}", expectedStatusCodes = { 200 }) + @UnexpectedResponseExceptionDetail + 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); + + @HttpRequestInformation(method = HttpMethod.PUT, path = "/{containerName}", expectedStatusCodes = { 200 }) + @UnexpectedResponseExceptionDetail + 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); + + @HttpRequestInformation(method = HttpMethod.PUT, path = "/{containerName}", expectedStatusCodes = { 200 }) + @UnexpectedResponseExceptionDetail + 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); + + @HttpRequestInformation(method = HttpMethod.PUT, path = "/{containerName}", expectedStatusCodes = { 202 }) + @UnexpectedResponseExceptionDetail + 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); + + @HttpRequestInformation(method = HttpMethod.PUT, path = "/{containerName}", expectedStatusCodes = { 202 }) + @UnexpectedResponseExceptionDetail + 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); + + @HttpRequestInformation(method = HttpMethod.PUT, path = "/{containerName}", expectedStatusCodes = { 200 }) + @UnexpectedResponseExceptionDetail + 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); + + @HttpRequestInformation(method = HttpMethod.PUT, path = "/{containerName}", expectedStatusCodes = { 200 }) + @UnexpectedResponseExceptionDetail + 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); + + @HttpRequestInformation(method = HttpMethod.GET, path = "/{containerName}", expectedStatusCodes = { 200 }) + @UnexpectedResponseExceptionDetail + ResponseBase listBlobFlatSegmentSync( + @HostParam("url") String url, @PathParam("containerName") String containerName, + @QueryParam("restype") String restype, @QueryParam("comp") String comp, @QueryParam("prefix") String prefix, + @QueryParam("marker") String marker, @QueryParam("maxresults") Integer maxresults, + @QueryParam("include") String include, @QueryParam("timeout") Integer timeout, + @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, + @HeaderParam("Accept") String accept, Context context); + + @HttpRequestInformation(method = HttpMethod.GET, path = "/{containerName}", expectedStatusCodes = { 200 }) + @UnexpectedResponseExceptionDetail + Response listBlobFlatSegmentNoCustomHeadersSync(@HostParam("url") String url, + @PathParam("containerName") String containerName, @QueryParam("restype") String restype, + @QueryParam("comp") String comp, @QueryParam("prefix") String prefix, @QueryParam("marker") String marker, + @QueryParam("maxresults") Integer maxresults, @QueryParam("include") String include, + @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-version") String version, + @HeaderParam("x-ms-client-request-id") String requestId, @HeaderParam("Accept") String accept, + Context context); + + @HttpRequestInformation(method = HttpMethod.GET, path = "/{containerName}", expectedStatusCodes = { 200 }) + @UnexpectedResponseExceptionDetail + ResponseBase + listBlobHierarchySegmentSync(@HostParam("url") String url, @PathParam("containerName") String containerName, + @QueryParam("restype") String restype, @QueryParam("comp") String comp, + @QueryParam("prefix") String prefix, @QueryParam("delimiter") String delimiter, + @QueryParam("marker") String marker, @QueryParam("maxresults") Integer maxresults, + @QueryParam("include") String include, @QueryParam("timeout") Integer timeout, + @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, + @HeaderParam("Accept") String accept, Context context); + + @HttpRequestInformation(method = HttpMethod.GET, path = "/{containerName}", expectedStatusCodes = { 200 }) + @UnexpectedResponseExceptionDetail + Response listBlobHierarchySegmentNoCustomHeadersSync( + @HostParam("url") String url, @PathParam("containerName") String containerName, + @QueryParam("restype") String restype, @QueryParam("comp") String comp, @QueryParam("prefix") String prefix, + @QueryParam("delimiter") String delimiter, @QueryParam("marker") String marker, + @QueryParam("maxresults") Integer maxresults, @QueryParam("include") String include, + @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-version") String version, + @HeaderParam("x-ms-client-request-id") String requestId, @HeaderParam("Accept") String accept, + Context context); + + @HttpRequestInformation(method = HttpMethod.GET, path = "/{containerName}", expectedStatusCodes = { 200 }) + @UnexpectedResponseExceptionDetail + 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); + + @HttpRequestInformation(method = HttpMethod.GET, path = "/{containerName}", expectedStatusCodes = { 200 }) + @UnexpectedResponseExceptionDetail + 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); + } + + /** + * creates a new container under the specified account. If the container with the same name already exists, the + * operation fails. + * + * @param containerName The container name. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param metadata Optional. Specifies a user-defined name-value pair associated with the blob. If no name-value + * pairs are specified, the operation will copy the metadata from the source blob or file to the destination blob. + * If one or more name-value pairs are specified, the destination blob is created with the specified metadata, and + * metadata is not copied from the source blob or file. Note that beginning with version 2009-09-19, metadata names + * must adhere to the naming rules for C# identifiers. See Naming and Referencing Containers, Blobs, and Metadata + * for more information. + * @param access Specifies whether data in the container may be accessed publicly and the level of access. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param blobContainerEncryptionScope Parameter group. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws StorageErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link ResponseBase}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ResponseBase createWithResponse(String containerName, Integer timeout, + Map metadata, PublicAccessType access, String requestId, + BlobContainerEncryptionScope blobContainerEncryptionScope, Context context) { + final String restype = "container"; + final String accept = "application/xml"; + String defaultEncryptionScopeInternal = null; + if (blobContainerEncryptionScope != null) { + defaultEncryptionScopeInternal = blobContainerEncryptionScope.getDefaultEncryptionScope(); + } + String defaultEncryptionScope = defaultEncryptionScopeInternal; + Boolean encryptionScopeOverridePreventedInternal = null; + if (blobContainerEncryptionScope != null) { + encryptionScopeOverridePreventedInternal + = blobContainerEncryptionScope.isEncryptionScopeOverridePrevented(); + } + Boolean encryptionScopeOverridePrevented = encryptionScopeOverridePreventedInternal; + return service.createSync(this.client.getUrl(), containerName, restype, timeout, metadata, access, + this.client.getVersion(), requestId, defaultEncryptionScope, encryptionScopeOverridePrevented, accept, + context); + } + + /** + * creates a new container under the specified account. If the container with the same name already exists, the + * operation fails. + * + * @param containerName The container name. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param metadata Optional. Specifies a user-defined name-value pair associated with the blob. If no name-value + * pairs are specified, the operation will copy the metadata from the source blob or file to the destination blob. + * If one or more name-value pairs are specified, the destination blob is created with the specified metadata, and + * metadata is not copied from the source blob or file. Note that beginning with version 2009-09-19, metadata names + * must adhere to the naming rules for C# identifiers. See Naming and Referencing Containers, Blobs, and Metadata + * for more information. + * @param access Specifies whether data in the container may be accessed publicly and the level of access. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param blobContainerEncryptionScope Parameter group. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws StorageErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void create(String containerName, Integer timeout, Map metadata, PublicAccessType access, + String requestId, BlobContainerEncryptionScope blobContainerEncryptionScope) { + createWithResponse(containerName, timeout, metadata, access, requestId, blobContainerEncryptionScope, + Context.none()); + } + + /** + * creates a new container under the specified account. If the container with the same name already exists, the + * operation fails. + * + * @param containerName The container name. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param metadata Optional. Specifies a user-defined name-value pair associated with the blob. If no name-value + * pairs are specified, the operation will copy the metadata from the source blob or file to the destination blob. + * If one or more name-value pairs are specified, the destination blob is created with the specified metadata, and + * metadata is not copied from the source blob or file. Note that beginning with version 2009-09-19, metadata names + * must adhere to the naming rules for C# identifiers. See Naming and Referencing Containers, Blobs, and Metadata + * for more information. + * @param access Specifies whether data in the container may be accessed publicly and the level of access. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param blobContainerEncryptionScope Parameter group. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws StorageErrorException 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 Response createNoCustomHeadersWithResponse(String containerName, Integer timeout, + Map metadata, PublicAccessType access, String requestId, + BlobContainerEncryptionScope blobContainerEncryptionScope, Context context) { + final String restype = "container"; + final String accept = "application/xml"; + String defaultEncryptionScopeInternal = null; + 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); + } + + /** + * returns all user-defined metadata and system properties for the specified container. The data returned does not + * include the container's list of blobs. + * + * @param containerName The container name. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws StorageErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link ResponseBase}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ResponseBase getPropertiesWithResponse(String containerName, + Integer timeout, String leaseId, String requestId, Context context) { + final String restype = "container"; + final String accept = "application/xml"; + return service.getPropertiesSync(this.client.getUrl(), containerName, restype, timeout, leaseId, + this.client.getVersion(), requestId, accept, context); + } + + /** + * returns all user-defined metadata and system properties for the specified container. The data returned does not + * include the container's list of blobs. + * + * @param containerName The container name. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws StorageErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void getProperties(String containerName, Integer timeout, String leaseId, String requestId) { + getPropertiesWithResponse(containerName, timeout, leaseId, requestId, Context.none()); + } + + /** + * returns all user-defined metadata and system properties for the specified container. The data returned does not + * include the container's list of blobs. + * + * @param containerName The container name. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws StorageErrorException 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 Response getPropertiesNoCustomHeadersWithResponse(String containerName, Integer timeout, + String leaseId, String requestId, Context context) { + final String restype = "container"; + final String accept = "application/xml"; + return service.getPropertiesNoCustomHeadersSync(this.client.getUrl(), containerName, restype, timeout, leaseId, + this.client.getVersion(), requestId, accept, context); + } + + /** + * operation marks the specified container for deletion. The container and any blobs contained within it are later + * deleted during garbage collection. + * + * @param containerName The container name. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the + * specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since + * the specified date/time. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws StorageErrorException thrown if 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) { + 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); + } + + /** + * operation marks the specified container for deletion. The container and any blobs contained within it are later + * deleted during garbage collection. + * + * @param containerName The container name. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the + * specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since + * the specified date/time. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws StorageErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String containerName, Integer timeout, String leaseId, OffsetDateTime ifModifiedSince, + OffsetDateTime ifUnmodifiedSince, String requestId) { + deleteWithResponse(containerName, timeout, leaseId, ifModifiedSince, ifUnmodifiedSince, requestId, + Context.none()); + } + + /** + * operation marks the specified container for deletion. The container and any blobs contained within it are later + * deleted during garbage collection. + * + * @param containerName The container name. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the + * specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since + * the specified date/time. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws StorageErrorException 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 Response deleteNoCustomHeadersWithResponse(String containerName, Integer timeout, String leaseId, + OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String requestId, Context context) { + final String restype = "container"; + final String accept = "application/xml"; + DateTimeRfc1123 ifModifiedSinceConverted + = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); + DateTimeRfc1123 ifUnmodifiedSinceConverted + = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); + return service.deleteNoCustomHeadersSync(this.client.getUrl(), containerName, restype, timeout, leaseId, + ifModifiedSinceConverted, ifUnmodifiedSinceConverted, this.client.getVersion(), requestId, accept, context); + } + + /** + * operation sets one or more user-defined name-value pairs for the specified container. + * + * @param containerName The container name. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param metadata Optional. Specifies a user-defined name-value pair associated with the blob. If no name-value + * pairs are specified, the operation will copy the metadata from the source blob or file to the destination blob. + * If one or more name-value pairs are specified, the destination blob is created with the specified metadata, and + * metadata is not copied from the source blob or file. Note that beginning with version 2009-09-19, metadata names + * must adhere to the naming rules for C# identifiers. See Naming and Referencing Containers, Blobs, and Metadata + * for more information. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the + * specified date/time. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws StorageErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link ResponseBase}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ResponseBase setMetadataWithResponse(String containerName, + Integer timeout, String leaseId, Map metadata, OffsetDateTime ifModifiedSince, String requestId, + Context context) { + final String restype = "container"; + final String comp = "metadata"; + final String accept = "application/xml"; + DateTimeRfc1123 ifModifiedSinceConverted + = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); + return service.setMetadataSync(this.client.getUrl(), containerName, restype, comp, timeout, leaseId, metadata, + ifModifiedSinceConverted, this.client.getVersion(), requestId, accept, context); + } + + /** + * operation sets one or more user-defined name-value pairs for the specified container. + * + * @param containerName The container name. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param metadata Optional. Specifies a user-defined name-value pair associated with the blob. If no name-value + * pairs are specified, the operation will copy the metadata from the source blob or file to the destination blob. + * If one or more name-value pairs are specified, the destination blob is created with the specified metadata, and + * metadata is not copied from the source blob or file. Note that beginning with version 2009-09-19, metadata names + * must adhere to the naming rules for C# identifiers. See Naming and Referencing Containers, Blobs, and Metadata + * for more information. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the + * specified date/time. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws StorageErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void setMetadata(String containerName, Integer timeout, String leaseId, Map metadata, + OffsetDateTime ifModifiedSince, String requestId) { + setMetadataWithResponse(containerName, timeout, leaseId, metadata, ifModifiedSince, requestId, Context.none()); + } + + /** + * operation sets one or more user-defined name-value pairs for the specified container. + * + * @param containerName The container name. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param metadata Optional. Specifies a user-defined name-value pair associated with the blob. If no name-value + * pairs are specified, the operation will copy the metadata from the source blob or file to the destination blob. + * If one or more name-value pairs are specified, the destination blob is created with the specified metadata, and + * metadata is not copied from the source blob or file. Note that beginning with version 2009-09-19, metadata names + * must adhere to the naming rules for C# identifiers. See Naming and Referencing Containers, Blobs, and Metadata + * for more information. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the + * specified date/time. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws StorageErrorException 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 Response setMetadataNoCustomHeadersWithResponse(String containerName, Integer timeout, String leaseId, + Map metadata, OffsetDateTime ifModifiedSince, String requestId, Context context) { + final String restype = "container"; + final String comp = "metadata"; + final String accept = "application/xml"; + DateTimeRfc1123 ifModifiedSinceConverted + = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); + return service.setMetadataNoCustomHeadersSync(this.client.getUrl(), containerName, restype, comp, timeout, + leaseId, metadata, ifModifiedSinceConverted, this.client.getVersion(), requestId, accept, context); + } + + /** + * gets the permissions for the specified container. The permissions indicate whether container data may be accessed + * publicly. + * + * @param containerName The container name. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @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 StorageErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the permissions for the specified container along with {@link ResponseBase}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ResponseBase getAccessPolicyWithResponse( + String containerName, Integer timeout, String leaseId, String requestId, Context context) { + final String restype = "container"; + final String comp = "acl"; + final String accept = "application/xml"; + return service.getAccessPolicySync(this.client.getUrl(), containerName, restype, comp, timeout, leaseId, + this.client.getVersion(), requestId, accept, context); + } + + /** + * gets the permissions for the specified container. The permissions indicate whether container data may be accessed + * publicly. + * + * @param containerName The container name. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws StorageErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the permissions for the specified container. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public BlobSignedIdentifierWrapper getAccessPolicy(String containerName, Integer timeout, String leaseId, + String requestId) { + return getAccessPolicyWithResponse(containerName, timeout, leaseId, requestId, Context.none()).getValue(); + } + + /** + * gets the permissions for the specified container. The permissions indicate whether container data may be accessed + * publicly. + * + * @param containerName The container name. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws StorageErrorException 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 Response getAccessPolicyNoCustomHeadersWithResponse(String containerName, + Integer timeout, String leaseId, String requestId, Context context) { + final String restype = "container"; + final String comp = "acl"; + final String accept = "application/xml"; + return service.getAccessPolicyNoCustomHeadersSync(this.client.getUrl(), containerName, restype, comp, timeout, + leaseId, this.client.getVersion(), requestId, accept, context); + } + + /** + * sets the permissions for the specified container. The permissions indicate whether blobs in a container may be + * accessed publicly. + * + * @param containerName The container name. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @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 StorageErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link ResponseBase}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ResponseBase setAccessPolicyWithResponse(String containerName, + Integer timeout, String leaseId, PublicAccessType access, OffsetDateTime ifModifiedSince, + OffsetDateTime ifUnmodifiedSince, String requestId, List containerAcl, Context context) { + final String restype = "container"; + final String comp = "acl"; + final String accept = "application/xml"; + DateTimeRfc1123 ifModifiedSinceConverted + = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); + DateTimeRfc1123 ifUnmodifiedSinceConverted + = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); + BlobSignedIdentifierWrapper containerAclConverted = new BlobSignedIdentifierWrapper(containerAcl); + return service.setAccessPolicySync(this.client.getUrl(), containerName, restype, comp, timeout, leaseId, access, + ifModifiedSinceConverted, ifUnmodifiedSinceConverted, this.client.getVersion(), requestId, + containerAclConverted, accept, context); + } + + /** + * sets the permissions for the specified container. The permissions indicate whether blobs in a container may be + * accessed publicly. + * + * @param containerName The container name. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param access Specifies whether data in the container may be accessed publicly and the level of access. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the + * specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since + * the specified date/time. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param containerAcl the acls for the container. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws StorageErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void setAccessPolicy(String containerName, Integer timeout, String leaseId, PublicAccessType access, + OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String requestId, + List containerAcl) { + setAccessPolicyWithResponse(containerName, timeout, leaseId, access, ifModifiedSince, ifUnmodifiedSince, + requestId, containerAcl, Context.none()); + } + + /** + * sets the permissions for the specified container. The permissions indicate whether blobs in a container may be + * accessed publicly. + * + * @param containerName The container name. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param access Specifies whether data in the container may be accessed publicly and the level of access. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the + * specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since + * the specified date/time. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param containerAcl the acls for the container. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws StorageErrorException 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 Response setAccessPolicyNoCustomHeadersWithResponse(String containerName, Integer timeout, + String leaseId, PublicAccessType access, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, + String requestId, List containerAcl, Context context) { + final String restype = "container"; + final String comp = "acl"; + final String accept = "application/xml"; + DateTimeRfc1123 ifModifiedSinceConverted + = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); + DateTimeRfc1123 ifUnmodifiedSinceConverted + = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); + BlobSignedIdentifierWrapper containerAclConverted = new BlobSignedIdentifierWrapper(containerAcl); + return service.setAccessPolicyNoCustomHeadersSync(this.client.getUrl(), containerName, restype, comp, timeout, + leaseId, access, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, this.client.getVersion(), requestId, + containerAclConverted, accept, context); + } + + /** + * Restores a previously-deleted container. + * + * @param containerName The container name. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param requestId Provides a 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 StorageErrorException thrown if 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) { + 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); + } + + /** + * Restores a previously-deleted container. + * + * @param containerName The container name. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param deletedContainerName Optional. Version 2019-12-12 and later. Specifies the name of the deleted container + * to restore. + * @param deletedContainerVersion Optional. Version 2019-12-12 and later. Specifies the version of the deleted + * container to restore. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws StorageErrorException 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://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param deletedContainerName Optional. Version 2019-12-12 and later. Specifies the name of the deleted container + * to restore. + * @param deletedContainerVersion Optional. Version 2019-12-12 and later. Specifies the version of the deleted + * container to restore. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws StorageErrorException 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 Response restoreNoCustomHeadersWithResponse(String containerName, Integer timeout, String requestId, + String deletedContainerName, String deletedContainerVersion, Context context) { + final String restype = "container"; + final String comp = "undelete"; + final String accept = "application/xml"; + return service.restoreNoCustomHeadersSync(this.client.getUrl(), containerName, restype, comp, timeout, + this.client.getVersion(), requestId, deletedContainerName, deletedContainerVersion, accept, context); + } + + /** + * Renames an existing container. + * + * @param containerName The container name. + * @param sourceContainerName Required. Specifies the name of the container to rename. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param sourceLeaseId A lease ID for the source path. If specified, the source path must have an active lease and + * the lease ID must match. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws StorageErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link ResponseBase}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ResponseBase renameWithResponse(String containerName, + String sourceContainerName, Integer timeout, String requestId, String sourceLeaseId, Context context) { + final String restype = "container"; + final String comp = "rename"; + final String accept = "application/xml"; + return service.renameSync(this.client.getUrl(), containerName, restype, comp, timeout, this.client.getVersion(), + requestId, sourceContainerName, sourceLeaseId, accept, context); + } + + /** + * Renames an existing container. + * + * @param containerName The container name. + * @param sourceContainerName Required. Specifies the name of the container to rename. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param sourceLeaseId A lease ID for the source path. If specified, the source path must have an active lease and + * the lease ID must match. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws StorageErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void rename(String containerName, String sourceContainerName, Integer timeout, String requestId, + String sourceLeaseId) { + renameWithResponse(containerName, sourceContainerName, timeout, requestId, sourceLeaseId, Context.none()); + } + + /** + * Renames an existing container. + * + * @param containerName The container name. + * @param sourceContainerName Required. Specifies the name of the container to rename. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param sourceLeaseId A lease ID for the source path. If specified, the source path must have an active lease and + * the lease ID must match. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws StorageErrorException 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 Response renameNoCustomHeadersWithResponse(String containerName, String sourceContainerName, + Integer timeout, String requestId, String sourceLeaseId, Context context) { + final String restype = "container"; + final String comp = "rename"; + final String accept = "application/xml"; + return service.renameNoCustomHeadersSync(this.client.getUrl(), containerName, restype, comp, timeout, + this.client.getVersion(), requestId, sourceContainerName, sourceLeaseId, accept, context); + } + + /** + * The Batch operation allows multiple API calls to be embedded into a single HTTP request. + * + * @param containerName The container name. + * @param contentLength The length of the request. + * @param multipartContentType Required. The value of this header must be multipart/mixed with a batch boundary. + * Example header value: multipart/mixed; boundary=batch_<GUID>. + * @param body Initial data. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws StorageErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link ResponseBase}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ResponseBase submitBatchWithResponse(String containerName, + long contentLength, String multipartContentType, BinaryData body, Integer timeout, String requestId, + Context context) { + final String restype = "container"; + final String comp = "batch"; + final String accept = "application/xml"; + return service.submitBatchSync(this.client.getUrl(), containerName, restype, comp, contentLength, + multipartContentType, timeout, this.client.getVersion(), requestId, body, accept, context); + } + + /** + * The Batch operation allows multiple API calls to be embedded into a single HTTP request. + * + * @param containerName The container name. + * @param contentLength The length of the request. + * @param multipartContentType Required. The value of this header must be multipart/mixed with a batch boundary. + * Example header value: multipart/mixed; boundary=batch_<GUID>. + * @param body Initial data. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws StorageErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public InputStream submitBatch(String containerName, long contentLength, String multipartContentType, + BinaryData body, Integer timeout, String requestId) { + return submitBatchWithResponse(containerName, contentLength, multipartContentType, body, timeout, requestId, + Context.none()).getValue(); + } + + /** + * The Batch operation allows multiple API calls to be embedded into a single HTTP request. + * + * @param containerName The container name. + * @param contentLength The length of the request. + * @param multipartContentType Required. The value of this header must be multipart/mixed with a batch boundary. + * Example header value: multipart/mixed; boundary=batch_<GUID>. + * @param body Initial data. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws StorageErrorException 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 Response submitBatchNoCustomHeadersWithResponse(String containerName, long contentLength, + String multipartContentType, BinaryData body, Integer timeout, String requestId, Context context) { + final String restype = "container"; + final String comp = "batch"; + final String accept = "application/xml"; + return service.submitBatchNoCustomHeadersSync(this.client.getUrl(), containerName, restype, comp, contentLength, + multipartContentType, timeout, this.client.getVersion(), requestId, body, accept, context); + } + + /** + * The Filter Blobs operation enables callers to list blobs in a container whose tags match a given search + * expression. Filter blobs searches within the given container. + * + * @param containerName The container name. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param requestId Provides a 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 StorageErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the result of a Filter Blobs API call along with {@link ResponseBase}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ResponseBase filterBlobsWithResponse(String containerName, + Integer timeout, String requestId, String where, String marker, Integer maxresults, + List include, Context context) { + final String restype = "container"; + final String comp = "blobs"; + final String accept = "application/xml"; + String includeConverted = (include == null) + ? null + : include.stream() + .map(paramItemValue -> Objects.toString(paramItemValue, "")) + .collect(Collectors.joining(",")); + return service.filterBlobsSync(this.client.getUrl(), containerName, restype, comp, timeout, + this.client.getVersion(), requestId, where, marker, maxresults, includeConverted, accept, context); + } + + /** + * The Filter Blobs operation enables callers to list blobs in a container whose tags match a given search + * expression. Filter blobs searches within the given container. + * + * @param containerName The container name. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param where Filters the results to return only to return only blobs whose tags match the specified expression. + * @param marker A string value that identifies the portion of the list of containers to be returned with the next + * listing operation. The operation returns the NextMarker value within the response body if the listing operation + * did not return all containers remaining to be listed with the current page. The NextMarker value can be used as + * the value for the marker parameter in a subsequent call to request the next page of list items. The marker value + * is opaque to the client. + * @param maxresults Specifies the maximum number of containers to return. If the request does not specify + * maxresults, or specifies a value greater than 5000, the server will return up to 5000 items. Note that if the + * listing operation crosses a partition boundary, then the service will return a continuation token for retrieving + * the remainder of the results. For this reason, it is possible that the service will return fewer results than + * specified by maxresults, or than the default of 5000. + * @param include Include this parameter to specify one or more datasets to include in the response. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws StorageErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the result of a Filter Blobs API call. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public FilterBlobSegment filterBlobs(String containerName, Integer timeout, String requestId, String where, + String marker, Integer maxresults, List include) { + return filterBlobsWithResponse(containerName, timeout, requestId, where, marker, maxresults, include, + Context.none()).getValue(); + } + + /** + * The Filter Blobs operation enables callers to list blobs in a container whose tags match a given search + * expression. Filter blobs searches within the given container. + * + * @param containerName The container name. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param where Filters the results to return only to return only blobs whose tags match the specified expression. + * @param marker A string value that identifies the portion of the list of containers to be returned with the next + * listing operation. The operation returns the NextMarker value within the response body if the listing operation + * did not return all containers remaining to be listed with the current page. The NextMarker value can be used as + * the value for the marker parameter in a subsequent call to request the next page of list items. The marker value + * is opaque to the client. + * @param maxresults Specifies the maximum number of containers to return. If the request does not specify + * maxresults, or specifies a value greater than 5000, the server will return up to 5000 items. Note that if the + * listing operation crosses a partition boundary, then the service will return a continuation token for retrieving + * the remainder of the results. For this reason, it is possible that the service will return fewer results than + * specified by maxresults, or than the default of 5000. + * @param include Include this parameter to specify one or more datasets to include in the response. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws StorageErrorException 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 Response filterBlobsNoCustomHeadersWithResponse(String containerName, Integer timeout, + String requestId, String where, String marker, Integer maxresults, List include, + Context context) { + final String restype = "container"; + final String comp = "blobs"; + final String accept = "application/xml"; + String includeConverted = (include == null) + ? null + : include.stream() + .map(paramItemValue -> Objects.toString(paramItemValue, "")) + .collect(Collectors.joining(",")); + return service.filterBlobsNoCustomHeadersSync(this.client.getUrl(), containerName, restype, comp, timeout, + this.client.getVersion(), requestId, where, marker, maxresults, includeConverted, accept, context); + } + + /** + * [Update] establishes and manages a lock on a container for delete operations. The lock duration can be 15 to 60 + * seconds, or can be infinite. + * + * @param containerName The container name. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @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 StorageErrorException thrown if 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) { + 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); + } + + /** + * [Update] establishes and manages a lock on a container for delete operations. The lock duration can be 15 to 60 + * seconds, or can be infinite. + * + * @param containerName The container name. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param duration Specifies the duration of the lease, in seconds, or negative one (-1) for a lease that never + * expires. A non-infinite lease can be between 15 and 60 seconds. A lease duration cannot be changed using renew or + * change. + * @param proposedLeaseId Proposed lease ID, in a GUID string format. The Blob service returns 400 (Invalid request) + * if the proposed lease ID is not in the correct format. See Guid Constructor (String) for a list of valid GUID + * string formats. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the + * specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since + * the specified date/time. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws StorageErrorException 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://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param duration Specifies the duration of the lease, in seconds, or negative one (-1) for a lease that never + * expires. A non-infinite lease can be between 15 and 60 seconds. A lease duration cannot be changed using renew or + * change. + * @param proposedLeaseId Proposed lease ID, in a GUID string format. The Blob service returns 400 (Invalid request) + * if the proposed lease ID is not in the correct format. See Guid Constructor (String) for a list of valid GUID + * string formats. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the + * specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since + * the specified date/time. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws StorageErrorException 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 Response acquireLeaseNoCustomHeadersWithResponse(String containerName, Integer timeout, + Integer duration, String proposedLeaseId, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, + String requestId, Context context) { + final String comp = "lease"; + final String restype = "container"; + final String action = "acquire"; + final String accept = "application/xml"; + DateTimeRfc1123 ifModifiedSinceConverted + = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); + DateTimeRfc1123 ifUnmodifiedSinceConverted + = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); + return service.acquireLeaseNoCustomHeadersSync(this.client.getUrl(), containerName, comp, restype, action, + timeout, duration, proposedLeaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, + this.client.getVersion(), requestId, accept, context); + } + + /** + * [Update] establishes and manages a lock on a container for delete operations. The lock duration can be 15 to 60 + * seconds, or can be infinite. + * + * @param containerName The container name. + * @param leaseId Specifies the current lease ID on the resource. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the + * specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since + * the specified date/time. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws StorageErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link ResponseBase}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ResponseBase releaseLeaseWithResponse(String containerName, + String leaseId, Integer timeout, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, + String requestId, Context context) { + final String comp = "lease"; + final String restype = "container"; + final String action = "release"; + final String accept = "application/xml"; + DateTimeRfc1123 ifModifiedSinceConverted + = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); + DateTimeRfc1123 ifUnmodifiedSinceConverted + = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); + return service.releaseLeaseSync(this.client.getUrl(), containerName, comp, restype, action, timeout, leaseId, + ifModifiedSinceConverted, ifUnmodifiedSinceConverted, this.client.getVersion(), requestId, accept, context); + } + + /** + * [Update] establishes and manages a lock on a container for delete operations. The lock duration can be 15 to 60 + * seconds, or can be infinite. + * + * @param containerName The container name. + * @param leaseId Specifies the current lease ID on the resource. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the + * specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since + * the specified date/time. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws StorageErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void releaseLease(String containerName, String leaseId, Integer timeout, OffsetDateTime ifModifiedSince, + OffsetDateTime ifUnmodifiedSince, String requestId) { + releaseLeaseWithResponse(containerName, leaseId, timeout, ifModifiedSince, ifUnmodifiedSince, requestId, + Context.none()); + } + + /** + * [Update] establishes and manages a lock on a container for delete operations. The lock duration can be 15 to 60 + * seconds, or can be infinite. + * + * @param containerName The container name. + * @param leaseId Specifies the current lease ID on the resource. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the + * specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since + * the specified date/time. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws StorageErrorException 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 Response releaseLeaseNoCustomHeadersWithResponse(String containerName, String leaseId, Integer timeout, + OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String requestId, Context context) { + final String comp = "lease"; + final String restype = "container"; + final String action = "release"; + final String accept = "application/xml"; + DateTimeRfc1123 ifModifiedSinceConverted + = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); + DateTimeRfc1123 ifUnmodifiedSinceConverted + = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); + return service.releaseLeaseNoCustomHeadersSync(this.client.getUrl(), containerName, comp, restype, action, + timeout, leaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, this.client.getVersion(), requestId, + accept, context); + } + + /** + * [Update] establishes and manages a lock on a container for delete operations. The lock duration can be 15 to 60 + * seconds, or can be infinite. + * + * @param containerName The container name. + * @param leaseId Specifies the current lease ID on the resource. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the + * specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since + * the specified date/time. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws StorageErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link ResponseBase}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ResponseBase renewLeaseWithResponse(String containerName, String leaseId, + Integer timeout, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String requestId, + Context context) { + final String comp = "lease"; + final String restype = "container"; + final String action = "renew"; + final String accept = "application/xml"; + DateTimeRfc1123 ifModifiedSinceConverted + = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); + DateTimeRfc1123 ifUnmodifiedSinceConverted + = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); + return service.renewLeaseSync(this.client.getUrl(), containerName, comp, restype, action, timeout, leaseId, + ifModifiedSinceConverted, ifUnmodifiedSinceConverted, this.client.getVersion(), requestId, accept, context); + } + + /** + * [Update] establishes and manages a lock on a container for delete operations. The lock duration can be 15 to 60 + * seconds, or can be infinite. + * + * @param containerName The container name. + * @param leaseId Specifies the current lease ID on the resource. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the + * specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since + * the specified date/time. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws StorageErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void renewLease(String containerName, String leaseId, Integer timeout, OffsetDateTime ifModifiedSince, + OffsetDateTime ifUnmodifiedSince, String requestId) { + renewLeaseWithResponse(containerName, leaseId, timeout, ifModifiedSince, ifUnmodifiedSince, requestId, + Context.none()); + } + + /** + * [Update] establishes and manages a lock on a container for delete operations. The lock duration can be 15 to 60 + * seconds, or can be infinite. + * + * @param containerName The container name. + * @param leaseId Specifies the current lease ID on the resource. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the + * specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since + * the specified date/time. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws StorageErrorException 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 Response renewLeaseNoCustomHeadersWithResponse(String containerName, String leaseId, Integer timeout, + OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String requestId, Context context) { + final String comp = "lease"; + final String restype = "container"; + final String action = "renew"; + final String accept = "application/xml"; + DateTimeRfc1123 ifModifiedSinceConverted + = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); + DateTimeRfc1123 ifUnmodifiedSinceConverted + = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); + return service.renewLeaseNoCustomHeadersSync(this.client.getUrl(), containerName, comp, restype, action, + timeout, leaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, this.client.getVersion(), requestId, + accept, context); + } + + /** + * [Update] establishes and manages a lock on a container for delete operations. The lock duration can be 15 to 60 + * seconds, or can be infinite. + * + * @param containerName The container name. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param breakPeriod For a break operation, proposed duration the lease should continue before it is broken, in + * seconds, between 0 and 60. This break period is only used if it is shorter than the time remaining on the lease. + * If longer, the time remaining on the lease is used. A new lease will not be available before the break period has + * expired, but the lease may be held for longer than the break period. If this header does not appear with a break + * operation, a fixed-duration lease breaks after the remaining lease period elapses, and an infinite lease breaks + * immediately. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the + * specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since + * the specified date/time. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws StorageErrorException thrown if 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) { + 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); + } + + /** + * [Update] establishes and manages a lock on a container for delete operations. The lock duration can be 15 to 60 + * seconds, or can be infinite. + * + * @param containerName The container name. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param breakPeriod For a break operation, proposed duration the lease should continue before it is broken, in + * seconds, between 0 and 60. This break period is only used if it is shorter than the time remaining on the lease. + * If longer, the time remaining on the lease is used. A new lease will not be available before the break period has + * expired, but the lease may be held for longer than the break period. If this header does not appear with a break + * operation, a fixed-duration lease breaks after the remaining lease period elapses, and an infinite lease breaks + * immediately. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the + * specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since + * the specified date/time. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws StorageErrorException 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://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param breakPeriod For a break operation, proposed duration the lease should continue before it is broken, in + * seconds, between 0 and 60. This break period is only used if it is shorter than the time remaining on the lease. + * If longer, the time remaining on the lease is used. A new lease will not be available before the break period has + * expired, but the lease may be held for longer than the break period. If this header does not appear with a break + * operation, a fixed-duration lease breaks after the remaining lease period elapses, and an infinite lease breaks + * immediately. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the + * specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since + * the specified date/time. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws StorageErrorException 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 Response breakLeaseNoCustomHeadersWithResponse(String containerName, Integer timeout, + Integer breakPeriod, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String requestId, + Context context) { + final String comp = "lease"; + final String restype = "container"; + final String action = "break"; + final String accept = "application/xml"; + DateTimeRfc1123 ifModifiedSinceConverted + = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); + DateTimeRfc1123 ifUnmodifiedSinceConverted + = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); + return service.breakLeaseNoCustomHeadersSync(this.client.getUrl(), containerName, comp, restype, action, + timeout, breakPeriod, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, this.client.getVersion(), + requestId, accept, context); + } + + /** + * [Update] establishes and manages a lock on a container for delete operations. The lock duration can be 15 to 60 + * seconds, or can be infinite. + * + * @param containerName The container name. + * @param leaseId Specifies the current lease ID on the resource. + * @param proposedLeaseId Proposed lease ID, in a GUID string format. The Blob service returns 400 (Invalid request) + * if the proposed lease ID is not in the correct format. See Guid Constructor (String) for a list of valid GUID + * string formats. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the + * specified date/time. + * @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 StorageErrorException thrown if 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) { + 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); + } + + /** + * [Update] establishes and manages a lock on a container for delete operations. The lock duration can be 15 to 60 + * seconds, or can be infinite. + * + * @param containerName The container name. + * @param leaseId Specifies the current lease ID on the resource. + * @param proposedLeaseId Proposed lease ID, in a GUID string format. The Blob service returns 400 (Invalid request) + * if the proposed lease ID is not in the correct format. See Guid Constructor (String) for a list of valid GUID + * string formats. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the + * specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since + * the specified date/time. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws StorageErrorException 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://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the + * specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since + * the specified date/time. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws StorageErrorException 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 Response changeLeaseNoCustomHeadersWithResponse(String containerName, String leaseId, + String proposedLeaseId, Integer timeout, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, + String requestId, Context context) { + final String comp = "lease"; + final String restype = "container"; + final String action = "change"; + final String accept = "application/xml"; + DateTimeRfc1123 ifModifiedSinceConverted + = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); + DateTimeRfc1123 ifUnmodifiedSinceConverted + = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); + return service.changeLeaseNoCustomHeadersSync(this.client.getUrl(), containerName, comp, restype, action, + timeout, leaseId, proposedLeaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, + this.client.getVersion(), requestId, accept, context); + } + + /** + * [Update] The List Blobs operation returns a list of the blobs under the specified container. + * + * @param containerName The container name. + * @param prefix Filters the results to return only containers whose name begins with the specified prefix. + * @param marker A string value that identifies the portion of the list of containers to be returned with the next + * listing operation. The operation returns the NextMarker value within the response body if the listing operation + * did not return all containers remaining to be listed with the current page. The NextMarker value can be used as + * the value for the marker parameter in a subsequent call to request the next page of list items. The marker value + * is opaque to the client. + * @param maxresults Specifies the maximum number of containers to return. If the request does not specify + * maxresults, or specifies a value greater than 5000, the server will return up to 5000 items. Note that if the + * listing operation crosses a partition boundary, then the service will return a continuation token for retrieving + * the remainder of the results. For this reason, it is possible that the service will return fewer results than + * specified by maxresults, or than the default of 5000. + * @param include Include this parameter to specify one or more datasets to include in the response. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws StorageErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an enumeration of blobs along with {@link ResponseBase}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ResponseBase + listBlobFlatSegmentWithResponse(String containerName, String prefix, String marker, Integer maxresults, + List include, Integer timeout, String requestId, Context context) { + final String restype = "container"; + final String comp = "list"; + final String accept = "application/xml"; + String includeConverted = (include == null) + ? null + : include.stream() + .map(paramItemValue -> Objects.toString(paramItemValue, "")) + .collect(Collectors.joining(",")); + return service.listBlobFlatSegmentSync(this.client.getUrl(), containerName, restype, comp, prefix, marker, + maxresults, includeConverted, timeout, this.client.getVersion(), requestId, accept, context); + } + + /** + * [Update] The List Blobs operation returns a list of the blobs under the specified container. + * + * @param containerName The container name. + * @param prefix Filters the results to return only containers whose name begins with the specified prefix. + * @param marker A string value that identifies the portion of the list of containers to be returned with the next + * listing operation. The operation returns the NextMarker value within the response body if the listing operation + * did not return all containers remaining to be listed with the current page. The NextMarker value can be used as + * the value for the marker parameter in a subsequent call to request the next page of list items. The marker value + * is opaque to the client. + * @param maxresults Specifies the maximum number of containers to return. If the request does not specify + * maxresults, or specifies a value greater than 5000, the server will return up to 5000 items. Note that if the + * listing operation crosses a partition boundary, then the service will return a continuation token for retrieving + * the remainder of the results. For this reason, it is possible that the service will return fewer results than + * specified by maxresults, or than the default of 5000. + * @param include Include this parameter to specify one or more datasets to include in the response. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws StorageErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an enumeration of blobs. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ListBlobsFlatSegmentResponse listBlobFlatSegment(String containerName, String prefix, String marker, + Integer maxresults, List include, Integer timeout, String requestId) { + return listBlobFlatSegmentWithResponse(containerName, prefix, marker, maxresults, include, timeout, requestId, + Context.none()).getValue(); + } + + /** + * [Update] The List Blobs operation returns a list of the blobs under the specified container. + * + * @param containerName The container name. + * @param prefix Filters the results to return only containers whose name begins with the specified prefix. + * @param marker A string value that identifies the portion of the list of containers to be returned with the next + * listing operation. The operation returns the NextMarker value within the response body if the listing operation + * did not return all containers remaining to be listed with the current page. The NextMarker value can be used as + * the value for the marker parameter in a subsequent call to request the next page of list items. The marker value + * is opaque to the client. + * @param maxresults Specifies the maximum number of containers to return. If the request does not specify + * maxresults, or specifies a value greater than 5000, the server will return up to 5000 items. Note that if the + * listing operation crosses a partition boundary, then the service will return a continuation token for retrieving + * the remainder of the results. For this reason, it is possible that the service will return fewer results than + * specified by maxresults, or than the default of 5000. + * @param include Include this parameter to specify one or more datasets to include in the response. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws StorageErrorException 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 Response listBlobFlatSegmentNoCustomHeadersWithResponse(String containerName, + String prefix, String marker, Integer maxresults, List include, Integer timeout, + String requestId, Context context) { + final String restype = "container"; + final String comp = "list"; + final String accept = "application/xml"; + String includeConverted = (include == null) + ? null + : include.stream() + .map(paramItemValue -> Objects.toString(paramItemValue, "")) + .collect(Collectors.joining(",")); + return service.listBlobFlatSegmentNoCustomHeadersSync(this.client.getUrl(), containerName, restype, comp, + prefix, marker, maxresults, includeConverted, timeout, this.client.getVersion(), requestId, accept, + context); + } + + /** + * [Update] The List Blobs operation returns a list of the blobs under the specified container. + * + * @param containerName The container name. + * @param delimiter When the request includes this parameter, the operation returns a BlobPrefix element in the + * response body that acts as a placeholder for all blobs whose names begin with the same substring up to the + * appearance of the delimiter character. The delimiter may be a single character or a string. + * @param prefix Filters the results to return only containers whose name begins with the specified prefix. + * @param marker A string value that identifies the portion of the list of containers to be returned with the next + * listing operation. The operation returns the NextMarker value within the response body if the listing operation + * did not return all containers remaining to be listed with the current page. The NextMarker value can be used as + * the value for the marker parameter in a subsequent call to request the next page of list items. The marker value + * is opaque to the client. + * @param maxresults Specifies the maximum number of containers to return. If the request does not specify + * maxresults, or specifies a value greater than 5000, the server will return up to 5000 items. Note that if the + * listing operation crosses a partition boundary, then the service will return a continuation token for retrieving + * the remainder of the results. For this reason, it is possible that the service will return fewer results than + * specified by maxresults, or than the default of 5000. + * @param include Include this parameter to specify one or more datasets to include in the response. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws StorageErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an enumeration of blobs along with {@link ResponseBase}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ResponseBase + listBlobHierarchySegmentWithResponse(String containerName, String delimiter, String prefix, String marker, + Integer maxresults, List include, Integer timeout, String requestId, + Context context) { + final String restype = "container"; + final String comp = "list"; + final String accept = "application/xml"; + String includeConverted = (include == null) + ? null + : include.stream() + .map(paramItemValue -> Objects.toString(paramItemValue, "")) + .collect(Collectors.joining(",")); + return service.listBlobHierarchySegmentSync(this.client.getUrl(), containerName, restype, comp, prefix, + delimiter, marker, maxresults, includeConverted, timeout, this.client.getVersion(), requestId, accept, + context); + } + + /** + * [Update] The List Blobs operation returns a list of the blobs under the specified container. + * + * @param containerName The container name. + * @param delimiter When the request includes this parameter, the operation returns a BlobPrefix element in the + * response body that acts as a placeholder for all blobs whose names begin with the same substring up to the + * appearance of the delimiter character. The delimiter may be a single character or a string. + * @param prefix Filters the results to return only containers whose name begins with the specified prefix. + * @param marker A string value that identifies the portion of the list of containers to be returned with the next + * listing operation. The operation returns the NextMarker value within the response body if the listing operation + * did not return all containers remaining to be listed with the current page. The NextMarker value can be used as + * the value for the marker parameter in a subsequent call to request the next page of list items. The marker value + * is opaque to the client. + * @param maxresults Specifies the maximum number of containers to return. If the request does not specify + * maxresults, or specifies a value greater than 5000, the server will return up to 5000 items. Note that if the + * listing operation crosses a partition boundary, then the service will return a continuation token for retrieving + * the remainder of the results. For this reason, it is possible that the service will return fewer results than + * specified by maxresults, or than the default of 5000. + * @param include Include this parameter to specify one or more datasets to include in the response. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws StorageErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an enumeration of blobs. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ListBlobsHierarchySegmentResponse listBlobHierarchySegment(String containerName, String delimiter, + String prefix, String marker, Integer maxresults, List include, Integer timeout, + String requestId) { + ResponseBase response = listBlobHierarchySegmentWithResponse(containerName, delimiter, prefix, marker, maxresults, include, + timeout, requestId, Context.none()); + return response.getValue(); + } + + /** + * [Update] The List Blobs operation returns a list of the blobs under the specified container. + * + * @param containerName The container name. + * @param delimiter When the request includes this parameter, the operation returns a BlobPrefix element in the + * response body that acts as a placeholder for all blobs whose names begin with the same substring up to the + * appearance of the delimiter character. The delimiter may be a single character or a string. + * @param prefix Filters the results to return only containers whose name begins with the specified prefix. + * @param marker A string value that identifies the portion of the list of containers to be returned with the next + * listing operation. The operation returns the NextMarker value within the response body if the listing operation + * did not return all containers remaining to be listed with the current page. The NextMarker value can be used as + * the value for the marker parameter in a subsequent call to request the next page of list items. The marker value + * is opaque to the client. + * @param maxresults Specifies the maximum number of containers to return. If the request does not specify + * maxresults, or specifies a value greater than 5000, the server will return up to 5000 items. Note that if the + * listing operation crosses a partition boundary, then the service will return a continuation token for retrieving + * the remainder of the results. For this reason, it is possible that the service will return fewer results than + * specified by maxresults, or than the default of 5000. + * @param include Include this parameter to specify one or more datasets to include in the response. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param requestId Provides a 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 StorageErrorException 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 Response listBlobHierarchySegmentNoCustomHeadersWithResponse( + String containerName, String delimiter, String prefix, String marker, Integer maxresults, + List include, Integer timeout, String requestId, Context context) { + final String restype = "container"; + final String comp = "list"; + final String accept = "application/xml"; + String includeConverted = (include == null) + ? null + : include.stream() + .map(paramItemValue -> Objects.toString(paramItemValue, "")) + .collect(Collectors.joining(",")); + return service.listBlobHierarchySegmentNoCustomHeadersSync(this.client.getUrl(), containerName, restype, comp, + prefix, delimiter, marker, maxresults, includeConverted, timeout, this.client.getVersion(), requestId, + accept, context); + } + + /** + * Returns the sku name and account kind. + * + * @param containerName The container name. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws StorageErrorException thrown if 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) { + 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); + } + + /** + * Returns the sku name and account kind. + * + * @param containerName The container name. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws StorageErrorException 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://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws StorageErrorException 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 Response getAccountInfoNoCustomHeadersWithResponse(String containerName, Integer timeout, + String requestId, Context context) { + 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); + } +} diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/implementation/PageBlobsImpl.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/implementation/PageBlobsImpl.java new file mode 100644 index 000000000000..d329adae4e20 --- /dev/null +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/implementation/PageBlobsImpl.java @@ -0,0 +1,2206 @@ +// 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.v2.annotation.ReturnType; +import com.azure.core.v2.annotation.ServiceMethod; +import com.azure.core.v2.http.rest.ResponseBase; +import io.clientcore.core.util.Base64Util; +import io.clientcore.core.http.models.DateTimeRfc1123; +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.EncryptionScope; +import com.azure.storage.blob.models.PageBlobsClearPagesHeaders; +import com.azure.storage.blob.models.PageBlobsCopyIncrementalHeaders; +import com.azure.storage.blob.models.PageBlobsCreateHeaders; +import com.azure.storage.blob.models.PageBlobsGetPageRangesDiffHeaders; +import com.azure.storage.blob.models.PageBlobsGetPageRangesHeaders; +import com.azure.storage.blob.models.PageBlobsResizeHeaders; +import com.azure.storage.blob.models.PageBlobsUpdateSequenceNumberHeaders; +import com.azure.storage.blob.models.PageBlobsUploadPagesFromURLHeaders; +import com.azure.storage.blob.models.PageBlobsUploadPagesHeaders; +import com.azure.storage.blob.models.PageList; +import com.azure.storage.blob.models.PremiumPageBlobAccessTier; +import com.azure.storage.blob.models.SequenceNumberActionType; +import com.azure.storage.blob.models.StorageErrorException; +import io.clientcore.core.annotation.ServiceInterface; +import io.clientcore.core.http.RestProxy; +import io.clientcore.core.http.annotation.BodyParam; +import io.clientcore.core.http.annotation.HeaderParam; +import io.clientcore.core.http.annotation.HostParam; +import io.clientcore.core.http.annotation.HttpRequestInformation; +import io.clientcore.core.http.annotation.PathParam; +import io.clientcore.core.http.annotation.QueryParam; +import io.clientcore.core.http.annotation.UnexpectedResponseExceptionDetail; +import io.clientcore.core.http.models.HttpMethod; +import io.clientcore.core.http.models.Response; +import io.clientcore.core.util.Context; +import io.clientcore.core.util.binarydata.BinaryData; +import java.time.OffsetDateTime; +import java.util.Map; + +/** + * An instance of this class provides access to all the operations defined in PageBlobs. + */ +public final class PageBlobsImpl { + /** + * The proxy service used to perform REST calls. + */ + private final PageBlobsService service; + + /** + * The service client containing this operation class. + */ + private final AzureBlobStorageImpl client; + + /** + * Initializes an instance of PageBlobsImpl. + * + * @param client the instance of the service client containing this operation class. + */ + PageBlobsImpl(AzureBlobStorageImpl client) { + this.service + = RestProxy.create(PageBlobsService.class, client.getHttpPipeline()); + this.client = client; + } + + /** + * The interface defining all the services for AzureBlobStoragePageBlobs to be used by the proxy service to perform + * REST calls. + */ + @ServiceInterface(name = "AzureBlobStoragePage", host = "{url}") + public interface PageBlobsService { + @HttpRequestInformation( + method = HttpMethod.PUT, + path = "/{containerName}/{blob}", + expectedStatusCodes = { 201 }) + @UnexpectedResponseExceptionDetail + 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); + + @HttpRequestInformation( + method = HttpMethod.PUT, + path = "/{containerName}/{blob}", + expectedStatusCodes = { 201 }) + @UnexpectedResponseExceptionDetail + 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); + + @HttpRequestInformation( + method = HttpMethod.PUT, + path = "/{containerName}/{blob}", + expectedStatusCodes = { 201 }) + @UnexpectedResponseExceptionDetail + 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); + + @HttpRequestInformation( + method = HttpMethod.PUT, + path = "/{containerName}/{blob}", + expectedStatusCodes = { 201 }) + @UnexpectedResponseExceptionDetail + 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); + + @HttpRequestInformation( + method = HttpMethod.PUT, + path = "/{containerName}/{blob}", + expectedStatusCodes = { 201 }) + @UnexpectedResponseExceptionDetail + 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); + + @HttpRequestInformation( + method = HttpMethod.PUT, + path = "/{containerName}/{blob}", + expectedStatusCodes = { 201 }) + @UnexpectedResponseExceptionDetail + 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); + + @HttpRequestInformation( + method = HttpMethod.PUT, + path = "/{containerName}/{blob}", + expectedStatusCodes = { 201 }) + @UnexpectedResponseExceptionDetail + ResponseBase uploadPagesFromURLSync(@HostParam("url") String url, + @PathParam("containerName") String containerName, @PathParam("blob") String blob, + @QueryParam("comp") String comp, @HeaderParam("x-ms-page-write") String pageWrite, + @HeaderParam("x-ms-copy-source") String sourceUrl, @HeaderParam("x-ms-source-range") String sourceRange, + @HeaderParam("x-ms-source-content-md5") String sourceContentMD5, + @HeaderParam("x-ms-source-content-crc64") String sourceContentcrc64, + @HeaderParam("Content-Length") long contentLength, @QueryParam("timeout") Integer timeout, + @HeaderParam("x-ms-range") String range, @HeaderParam("x-ms-encryption-key") String encryptionKey, + @HeaderParam("x-ms-encryption-key-sha256") String encryptionKeySha256, + @HeaderParam("x-ms-encryption-algorithm") EncryptionAlgorithmType encryptionAlgorithm, + @HeaderParam("x-ms-encryption-scope") String encryptionScope, @HeaderParam("x-ms-lease-id") String leaseId, + @HeaderParam("x-ms-if-sequence-number-le") Long ifSequenceNumberLessThanOrEqualTo, + @HeaderParam("x-ms-if-sequence-number-lt") Long ifSequenceNumberLessThan, + @HeaderParam("x-ms-if-sequence-number-eq") Long ifSequenceNumberEqualTo, + @HeaderParam("If-Modified-Since") DateTimeRfc1123 ifModifiedSince, + @HeaderParam("If-Unmodified-Since") DateTimeRfc1123 ifUnmodifiedSince, + @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch, + @HeaderParam("x-ms-if-tags") String ifTags, + @HeaderParam("x-ms-source-if-modified-since") DateTimeRfc1123 sourceIfModifiedSince, + @HeaderParam("x-ms-source-if-unmodified-since") DateTimeRfc1123 sourceIfUnmodifiedSince, + @HeaderParam("x-ms-source-if-match") String sourceIfMatch, + @HeaderParam("x-ms-source-if-none-match") String sourceIfNoneMatch, + @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, + @HeaderParam("x-ms-copy-source-authorization") String copySourceAuthorization, + @HeaderParam("Accept") String accept, Context context); + + @HttpRequestInformation( + method = HttpMethod.PUT, + path = "/{containerName}/{blob}", + expectedStatusCodes = { 201 }) + @UnexpectedResponseExceptionDetail + Response uploadPagesFromURLNoCustomHeadersSync(@HostParam("url") String url, + @PathParam("containerName") String containerName, @PathParam("blob") String blob, + @QueryParam("comp") String comp, @HeaderParam("x-ms-page-write") String pageWrite, + @HeaderParam("x-ms-copy-source") String sourceUrl, @HeaderParam("x-ms-source-range") String sourceRange, + @HeaderParam("x-ms-source-content-md5") String sourceContentMD5, + @HeaderParam("x-ms-source-content-crc64") String sourceContentcrc64, + @HeaderParam("Content-Length") long contentLength, @QueryParam("timeout") Integer timeout, + @HeaderParam("x-ms-range") String range, @HeaderParam("x-ms-encryption-key") String encryptionKey, + @HeaderParam("x-ms-encryption-key-sha256") String encryptionKeySha256, + @HeaderParam("x-ms-encryption-algorithm") EncryptionAlgorithmType encryptionAlgorithm, + @HeaderParam("x-ms-encryption-scope") String encryptionScope, @HeaderParam("x-ms-lease-id") String leaseId, + @HeaderParam("x-ms-if-sequence-number-le") Long ifSequenceNumberLessThanOrEqualTo, + @HeaderParam("x-ms-if-sequence-number-lt") Long ifSequenceNumberLessThan, + @HeaderParam("x-ms-if-sequence-number-eq") Long ifSequenceNumberEqualTo, + @HeaderParam("If-Modified-Since") DateTimeRfc1123 ifModifiedSince, + @HeaderParam("If-Unmodified-Since") DateTimeRfc1123 ifUnmodifiedSince, + @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch, + @HeaderParam("x-ms-if-tags") String ifTags, + @HeaderParam("x-ms-source-if-modified-since") DateTimeRfc1123 sourceIfModifiedSince, + @HeaderParam("x-ms-source-if-unmodified-since") DateTimeRfc1123 sourceIfUnmodifiedSince, + @HeaderParam("x-ms-source-if-match") String sourceIfMatch, + @HeaderParam("x-ms-source-if-none-match") String sourceIfNoneMatch, + @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, + @HeaderParam("x-ms-copy-source-authorization") String copySourceAuthorization, + @HeaderParam("Accept") String accept, Context context); + + @HttpRequestInformation( + method = HttpMethod.GET, + path = "/{containerName}/{blob}", + expectedStatusCodes = { 200 }) + @UnexpectedResponseExceptionDetail + 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); + + @HttpRequestInformation( + method = HttpMethod.GET, + path = "/{containerName}/{blob}", + expectedStatusCodes = { 200 }) + @UnexpectedResponseExceptionDetail + 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); + + @HttpRequestInformation( + method = HttpMethod.GET, + path = "/{containerName}/{blob}", + expectedStatusCodes = { 200 }) + @UnexpectedResponseExceptionDetail + 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); + + @HttpRequestInformation( + method = HttpMethod.GET, + path = "/{containerName}/{blob}", + expectedStatusCodes = { 200 }) + @UnexpectedResponseExceptionDetail + 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); + + @HttpRequestInformation( + method = HttpMethod.PUT, + path = "/{containerName}/{blob}", + expectedStatusCodes = { 200 }) + @UnexpectedResponseExceptionDetail + 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); + + @HttpRequestInformation( + method = HttpMethod.PUT, + path = "/{containerName}/{blob}", + expectedStatusCodes = { 200 }) + @UnexpectedResponseExceptionDetail + 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); + + @HttpRequestInformation( + method = HttpMethod.PUT, + path = "/{containerName}/{blob}", + expectedStatusCodes = { 200 }) + @UnexpectedResponseExceptionDetail + 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); + + @HttpRequestInformation( + method = HttpMethod.PUT, + path = "/{containerName}/{blob}", + expectedStatusCodes = { 200 }) + @UnexpectedResponseExceptionDetail + 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); + + @HttpRequestInformation( + method = HttpMethod.PUT, + path = "/{containerName}/{blob}", + expectedStatusCodes = { 202 }) + @UnexpectedResponseExceptionDetail + 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); + + @HttpRequestInformation( + method = HttpMethod.PUT, + path = "/{containerName}/{blob}", + expectedStatusCodes = { 202 }) + @UnexpectedResponseExceptionDetail + 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://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param tier Optional. Indicates the tier to be set on the page blob. + * @param metadata Optional. Specifies a user-defined name-value pair associated with the blob. If no name-value + * pairs are specified, the operation will copy the metadata from the source blob or file to the destination blob. + * If one or more name-value pairs are specified, the destination blob is created with the specified metadata, and + * metadata is not copied from the source blob or file. Note that beginning with version 2009-09-19, metadata names + * must adhere to the naming rules for C# identifiers. See Naming and Referencing Containers, Blobs, and Metadata + * for more information. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the + * specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since + * the specified date/time. + * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. + * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. + * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. + * @param blobSequenceNumber Set for page blobs only. The sequence number is a user-controlled value that you can + * use to track requests. The value of the sequence number must be between 0 and 2^63 - 1. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param blobTagsString Optional. Used to set blob tags in various blob operations. + * @param immutabilityPolicyExpiry Specifies the date time when the blobs immutability policy is set to expire. + * @param immutabilityPolicyMode Specifies the immutability policy mode to set on the blob. + * @param legalHold Specified if a legal hold should be set on the blob. + * @param blobHttpHeaders Parameter group. + * @param cpkInfo Parameter group. + * @param encryptionScopeParam Parameter group. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws StorageErrorException thrown if 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, 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.createSync(this.client.getUrl(), containerName, blob, blobType, timeout, contentLength, tier, + contentType, contentEncoding, contentLanguage, contentMd5Converted, cacheControl, metadata, leaseId, + contentDisposition, encryptionKey, encryptionKeySha256, encryptionAlgorithm, encryptionScope, + ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, blobContentLength, + blobSequenceNumber, this.client.getVersion(), requestId, blobTagsString, immutabilityPolicyExpiryConverted, + immutabilityPolicyMode, legalHold, accept, context); + } + + /** + * The Create operation creates a new page blob. + * + * @param containerName The container name. + * @param blob The blob name. + * @param contentLength The length of the request. + * @param blobContentLength This header specifies the maximum size for the page blob, up to 1 TB. The page blob size + * must be aligned to a 512-byte boundary. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param tier Optional. Indicates the tier to be set on the page blob. + * @param metadata Optional. Specifies a user-defined name-value pair associated with the blob. If no name-value + * pairs are specified, the operation will copy the metadata from the source blob or file to the destination blob. + * If one or more name-value pairs are specified, the destination blob is created with the specified metadata, and + * metadata is not copied from the source blob or file. Note that beginning with version 2009-09-19, metadata names + * must adhere to the naming rules for C# identifiers. See Naming and Referencing Containers, Blobs, and Metadata + * for more information. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the + * specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since + * the specified date/time. + * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. + * @param ifNoneMatch Specify an ETag value to operate only on blobs 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 StorageErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void create(String containerName, String blob, long contentLength, long blobContentLength, Integer timeout, + PremiumPageBlobAccessTier tier, Map metadata, String leaseId, OffsetDateTime ifModifiedSince, + OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, String ifTags, Long blobSequenceNumber, + String requestId, String blobTagsString, OffsetDateTime immutabilityPolicyExpiry, + BlobImmutabilityPolicyMode immutabilityPolicyMode, Boolean legalHold, BlobHttpHeaders blobHttpHeaders, + CpkInfo cpkInfo, EncryptionScope encryptionScopeParam) { + createWithResponse(containerName, blob, contentLength, blobContentLength, timeout, tier, metadata, leaseId, + ifModifiedSince, ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, blobSequenceNumber, requestId, + blobTagsString, immutabilityPolicyExpiry, immutabilityPolicyMode, legalHold, blobHttpHeaders, cpkInfo, + encryptionScopeParam, Context.none()); + } + + /** + * The Create operation creates a new page blob. + * + * @param containerName The container name. + * @param blob The blob name. + * @param contentLength The length of the request. + * @param blobContentLength This header specifies the maximum size for the page blob, up to 1 TB. The page blob size + * must be aligned to a 512-byte boundary. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param tier Optional. Indicates the tier to be set on the page blob. + * @param metadata Optional. Specifies a user-defined name-value pair associated with the blob. If no name-value + * pairs are specified, the operation will copy the metadata from the source blob or file to the destination blob. + * If one or more name-value pairs are specified, the destination blob is created with the specified metadata, and + * metadata is not copied from the source blob or file. Note that beginning with version 2009-09-19, metadata names + * must adhere to the naming rules for C# identifiers. See Naming and Referencing Containers, Blobs, and Metadata + * for more information. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the + * specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since + * the specified date/time. + * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. + * @param ifNoneMatch Specify an ETag value to operate only on blobs 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 StorageErrorException 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 Response createNoCustomHeadersWithResponse(String containerName, String blob, long contentLength, + long blobContentLength, Integer timeout, PremiumPageBlobAccessTier tier, Map metadata, + String leaseId, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, + String ifNoneMatch, String ifTags, Long blobSequenceNumber, String requestId, String blobTagsString, + OffsetDateTime immutabilityPolicyExpiry, BlobImmutabilityPolicyMode immutabilityPolicyMode, Boolean legalHold, + BlobHttpHeaders blobHttpHeaders, CpkInfo cpkInfo, EncryptionScope encryptionScopeParam, Context context) { + final String blobType = "PageBlob"; + final String accept = "application/xml"; + String contentTypeInternal = null; + if (blobHttpHeaders != null) { + contentTypeInternal = blobHttpHeaders.getContentType(); + } + String contentType = contentTypeInternal; + String contentEncodingInternal = null; + if (blobHttpHeaders != null) { + contentEncodingInternal = blobHttpHeaders.getContentEncoding(); + } + String contentEncoding = contentEncodingInternal; + String contentLanguageInternal = null; + if (blobHttpHeaders != null) { + contentLanguageInternal = blobHttpHeaders.getContentLanguage(); + } + String contentLanguage = contentLanguageInternal; + byte[] contentMd5Internal = null; + if (blobHttpHeaders != null) { + contentMd5Internal = blobHttpHeaders.getContentMd5(); + } + byte[] contentMd5 = contentMd5Internal; + String cacheControlInternal = null; + if (blobHttpHeaders != null) { + cacheControlInternal = blobHttpHeaders.getCacheControl(); + } + String cacheControl = cacheControlInternal; + String contentDispositionInternal = null; + if (blobHttpHeaders != null) { + contentDispositionInternal = blobHttpHeaders.getContentDisposition(); + } + String contentDisposition = contentDispositionInternal; + String encryptionKeyInternal = null; + if (cpkInfo != null) { + encryptionKeyInternal = cpkInfo.getEncryptionKey(); + } + 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); + } + + /** + * The Upload Pages operation writes a range of pages to a page blob. + * + * @param containerName The container name. + * @param blob The blob name. + * @param contentLength The length of the request. + * @param body Initial data. + * @param transactionalContentMD5 Specify the transactional md5 for the body, to be validated by the service. + * @param transactionalContentCrc64 Specify the transactional crc64 for the body, to be validated by the service. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param range Return only the bytes of the blob in the specified range. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param ifSequenceNumberLessThanOrEqualTo Specify this header value to operate only on a blob if it has a sequence + * number less than or equal to the specified. + * @param ifSequenceNumberLessThan Specify this header value to operate only on a blob if it has a sequence number + * less than the specified. + * @param ifSequenceNumberEqualTo Specify this header value to operate only on a blob if it has the specified + * sequence number. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the + * specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since + * the specified date/time. + * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. + * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. + * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param 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 StorageErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link ResponseBase}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ResponseBase uploadPagesWithResponse(String containerName, String blob, + long contentLength, BinaryData body, byte[] transactionalContentMD5, byte[] transactionalContentCrc64, + Integer timeout, String range, String leaseId, Long ifSequenceNumberLessThanOrEqualTo, + Long ifSequenceNumberLessThan, Long ifSequenceNumberEqualTo, OffsetDateTime ifModifiedSince, + OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, String ifTags, String requestId, + 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.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); + } + + /** + * The Upload Pages operation writes a range of pages to a page blob. + * + * @param containerName The container name. + * @param blob The blob name. + * @param contentLength The length of the request. + * @param body Initial data. + * @param transactionalContentMD5 Specify the transactional md5 for the body, to be validated by the service. + * @param transactionalContentCrc64 Specify the transactional crc64 for the body, to be validated by the service. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param range Return only the bytes of the blob in the specified range. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param ifSequenceNumberLessThanOrEqualTo Specify this header value to operate only on a blob if it has a sequence + * number less than or equal to the specified. + * @param ifSequenceNumberLessThan Specify this header value to operate only on a blob if it has a sequence number + * less than the specified. + * @param ifSequenceNumberEqualTo Specify this header value to operate only on a blob if it has the specified + * sequence number. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the + * specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since + * the specified date/time. + * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. + * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. + * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param 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 StorageErrorException 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://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param range Return only the bytes of the blob in the specified range. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param ifSequenceNumberLessThanOrEqualTo Specify this header value to operate only on a blob if it has a sequence + * number less than or equal to the specified. + * @param ifSequenceNumberLessThan Specify this header value to operate only on a blob if it has a sequence number + * less than the specified. + * @param ifSequenceNumberEqualTo Specify this header value to operate only on a blob if it has the specified + * sequence number. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the + * specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since + * the specified date/time. + * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. + * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. + * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param 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 StorageErrorException 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 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) { + 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); + } + + /** + * The Clear Pages operation clears a set of pages from a page blob. + * + * @param containerName The container name. + * @param blob The blob name. + * @param contentLength The length of the request. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param range Return only the bytes of the blob in the specified range. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param ifSequenceNumberLessThanOrEqualTo Specify this header value to operate only on a blob if it has a sequence + * number less than or equal to the specified. + * @param ifSequenceNumberLessThan Specify this header value to operate only on a blob if it has a sequence number + * less than the specified. + * @param ifSequenceNumberEqualTo Specify this header value to operate only on a blob if it has the specified + * sequence number. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the + * specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since + * the specified date/time. + * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. + * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. + * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param cpkInfo Parameter group. + * @param encryptionScopeParam Parameter group. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws StorageErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link ResponseBase}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ResponseBase clearPagesWithResponse(String containerName, String blob, + long contentLength, Integer timeout, String range, String leaseId, Long ifSequenceNumberLessThanOrEqualTo, + Long ifSequenceNumberLessThan, Long ifSequenceNumberEqualTo, OffsetDateTime ifModifiedSince, + OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, String ifTags, String requestId, + CpkInfo cpkInfo, EncryptionScope encryptionScopeParam, Context context) { + final String comp = "page"; + final String pageWrite = "clear"; + final String accept = "application/xml"; + String encryptionKeyInternal = null; + if (cpkInfo != null) { + encryptionKeyInternal = cpkInfo.getEncryptionKey(); + } + String encryptionKey = encryptionKeyInternal; + String encryptionKeySha256Internal = null; + if (cpkInfo != null) { + encryptionKeySha256Internal = cpkInfo.getEncryptionKeySha256(); + } + String encryptionKeySha256 = encryptionKeySha256Internal; + EncryptionAlgorithmType encryptionAlgorithmInternal = null; + if (cpkInfo != null) { + encryptionAlgorithmInternal = cpkInfo.getEncryptionAlgorithm(); + } + EncryptionAlgorithmType encryptionAlgorithm = encryptionAlgorithmInternal; + String encryptionScopeInternal = null; + if (encryptionScopeParam != null) { + encryptionScopeInternal = encryptionScopeParam.getEncryptionScope(); + } + String encryptionScope = encryptionScopeInternal; + DateTimeRfc1123 ifModifiedSinceConverted + = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); + DateTimeRfc1123 ifUnmodifiedSinceConverted + = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); + return service.clearPagesSync(this.client.getUrl(), containerName, blob, comp, pageWrite, contentLength, + timeout, range, leaseId, encryptionKey, encryptionKeySha256, encryptionAlgorithm, encryptionScope, + ifSequenceNumberLessThanOrEqualTo, ifSequenceNumberLessThan, ifSequenceNumberEqualTo, + ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, + this.client.getVersion(), requestId, accept, context); + } + + /** + * The Clear Pages operation clears a set of pages from a page blob. + * + * @param containerName The container name. + * @param blob The blob name. + * @param contentLength The length of the request. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param range Return only the bytes of the blob in the specified range. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param ifSequenceNumberLessThanOrEqualTo Specify this header value to operate only on a blob if it has a sequence + * number less than or equal to the specified. + * @param ifSequenceNumberLessThan Specify this header value to operate only on a blob if it has a sequence number + * less than the specified. + * @param ifSequenceNumberEqualTo Specify this header value to operate only on a blob if it has the specified + * sequence number. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the + * specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since + * the specified date/time. + * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. + * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. + * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param cpkInfo Parameter group. + * @param encryptionScopeParam Parameter group. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws StorageErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void clearPages(String containerName, String blob, long contentLength, Integer timeout, String range, + String leaseId, Long ifSequenceNumberLessThanOrEqualTo, Long ifSequenceNumberLessThan, + Long ifSequenceNumberEqualTo, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, + String ifNoneMatch, String ifTags, String requestId, CpkInfo cpkInfo, EncryptionScope encryptionScopeParam) { + clearPagesWithResponse(containerName, blob, contentLength, timeout, range, leaseId, + ifSequenceNumberLessThanOrEqualTo, ifSequenceNumberLessThan, ifSequenceNumberEqualTo, ifModifiedSince, + ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, requestId, cpkInfo, encryptionScopeParam, Context.none()); + } + + /** + * The Clear Pages operation clears a set of pages from a page blob. + * + * @param containerName The container name. + * @param blob The blob name. + * @param contentLength The length of the request. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param range Return only the bytes of the blob in the specified range. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param ifSequenceNumberLessThanOrEqualTo Specify this header value to operate only on a blob if it has a sequence + * number less than or equal to the specified. + * @param ifSequenceNumberLessThan Specify this header value to operate only on a blob if it has a sequence number + * less than the specified. + * @param ifSequenceNumberEqualTo Specify this header value to operate only on a blob if it has the specified + * sequence number. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the + * specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since + * the specified date/time. + * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. + * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. + * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param cpkInfo Parameter group. + * @param encryptionScopeParam Parameter group. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws StorageErrorException 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 Response clearPagesNoCustomHeadersWithResponse(String containerName, String blob, long contentLength, + Integer timeout, String range, String leaseId, Long ifSequenceNumberLessThanOrEqualTo, + Long ifSequenceNumberLessThan, Long ifSequenceNumberEqualTo, OffsetDateTime ifModifiedSince, + OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, String ifTags, String requestId, + CpkInfo cpkInfo, EncryptionScope encryptionScopeParam, Context context) { + final String comp = "page"; + final String pageWrite = "clear"; + final String accept = "application/xml"; + String encryptionKeyInternal = null; + if (cpkInfo != null) { + encryptionKeyInternal = cpkInfo.getEncryptionKey(); + } + String encryptionKey = encryptionKeyInternal; + String encryptionKeySha256Internal = null; + if (cpkInfo != null) { + encryptionKeySha256Internal = cpkInfo.getEncryptionKeySha256(); + } + String encryptionKeySha256 = encryptionKeySha256Internal; + EncryptionAlgorithmType encryptionAlgorithmInternal = null; + if (cpkInfo != null) { + encryptionAlgorithmInternal = cpkInfo.getEncryptionAlgorithm(); + } + EncryptionAlgorithmType encryptionAlgorithm = encryptionAlgorithmInternal; + String encryptionScopeInternal = null; + if (encryptionScopeParam != null) { + encryptionScopeInternal = encryptionScopeParam.getEncryptionScope(); + } + String encryptionScope = encryptionScopeInternal; + DateTimeRfc1123 ifModifiedSinceConverted + = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); + DateTimeRfc1123 ifUnmodifiedSinceConverted + = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); + return service.clearPagesNoCustomHeadersSync(this.client.getUrl(), containerName, blob, comp, pageWrite, + contentLength, timeout, range, leaseId, encryptionKey, encryptionKeySha256, encryptionAlgorithm, + encryptionScope, ifSequenceNumberLessThanOrEqualTo, ifSequenceNumberLessThan, ifSequenceNumberEqualTo, + ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, + this.client.getVersion(), requestId, accept, context); + } + + /** + * The Upload Pages operation writes a range of pages to a page blob where the contents are read from a URL. + * + * @param containerName The container name. + * @param blob The blob name. + * @param sourceUrl Specify a URL to the copy source. + * @param sourceRange Bytes of source data in the specified range. The length of this range should match the + * ContentLength header and x-ms-range/Range destination range header. + * @param contentLength The length of the request. + * @param range The range of bytes to which the source range would be written. The range should be 512 aligned and + * range-end is required. + * @param sourceContentMD5 Specify the md5 calculated for the range of bytes that must be read from the copy source. + * @param sourceContentcrc64 Specify the crc64 calculated for the range of bytes that must be read from the copy + * source. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param 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 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 StorageErrorException thrown if 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, 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.uploadPagesFromURLSync(this.client.getUrl(), containerName, blob, comp, pageWrite, sourceUrl, + sourceRange, sourceContentMD5Converted, sourceContentcrc64Converted, contentLength, timeout, range, + encryptionKey, encryptionKeySha256, encryptionAlgorithm, encryptionScope, leaseId, + ifSequenceNumberLessThanOrEqualTo, ifSequenceNumberLessThan, ifSequenceNumberEqualTo, + ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, + sourceIfModifiedSinceConverted, sourceIfUnmodifiedSinceConverted, sourceIfMatch, sourceIfNoneMatch, + this.client.getVersion(), requestId, copySourceAuthorization, accept, context); + } + + /** + * The 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://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param ifSequenceNumberLessThanOrEqualTo Specify this header value to operate only on a blob if it has a sequence + * number less than or equal to the specified. + * @param ifSequenceNumberLessThan Specify this header value to operate only on a blob if it has a sequence number + * less than the specified. + * @param ifSequenceNumberEqualTo Specify this header value to operate only on a blob if it has the specified + * sequence number. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the + * specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since + * the specified date/time. + * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. + * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. + * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. + * @param sourceIfModifiedSince Specify this header value to operate only on a blob if it has been modified since + * the specified date/time. + * @param sourceIfUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified + * since the specified date/time. + * @param sourceIfMatch Specify an ETag value to operate only on blobs with a matching value. + * @param sourceIfNoneMatch Specify an ETag value to operate only on blobs without a matching value. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param copySourceAuthorization Only Bearer type is supported. Credentials should be a valid OAuth access token to + * copy source. + * @param cpkInfo Parameter group. + * @param encryptionScopeParam Parameter group. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws StorageErrorException 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, + CpkInfo cpkInfo, EncryptionScope encryptionScopeParam) { + uploadPagesFromURLWithResponse(containerName, blob, sourceUrl, sourceRange, contentLength, range, + sourceContentMD5, sourceContentcrc64, timeout, leaseId, ifSequenceNumberLessThanOrEqualTo, + ifSequenceNumberLessThan, ifSequenceNumberEqualTo, ifModifiedSince, ifUnmodifiedSince, ifMatch, ifNoneMatch, + ifTags, sourceIfModifiedSince, sourceIfUnmodifiedSince, sourceIfMatch, sourceIfNoneMatch, requestId, + copySourceAuthorization, cpkInfo, encryptionScopeParam, Context.none()); + } + + /** + * The 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://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param ifSequenceNumberLessThanOrEqualTo Specify this header value to operate only on a blob if it has a sequence + * number less than or equal to the specified. + * @param ifSequenceNumberLessThan Specify this header value to operate only on a blob if it has a sequence number + * less than the specified. + * @param ifSequenceNumberEqualTo Specify this header value to operate only on a blob if it has the specified + * sequence number. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the + * specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since + * the specified date/time. + * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. + * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. + * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. + * @param sourceIfModifiedSince Specify this header value to operate only on a blob if it has been modified since + * the specified date/time. + * @param sourceIfUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified + * since the specified date/time. + * @param sourceIfMatch Specify an ETag value to operate only on blobs with a matching value. + * @param sourceIfNoneMatch Specify an ETag value to operate only on blobs without a matching value. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param copySourceAuthorization Only Bearer type is supported. Credentials should be a valid OAuth access token to + * copy source. + * @param cpkInfo Parameter group. + * @param encryptionScopeParam Parameter group. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws StorageErrorException 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 Response uploadPagesFromURLNoCustomHeadersWithResponse(String containerName, String blob, + String sourceUrl, String sourceRange, long contentLength, String range, byte[] sourceContentMD5, + byte[] sourceContentcrc64, Integer timeout, String leaseId, Long ifSequenceNumberLessThanOrEqualTo, + Long ifSequenceNumberLessThan, Long ifSequenceNumberEqualTo, OffsetDateTime ifModifiedSince, + OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, String ifTags, + OffsetDateTime sourceIfModifiedSince, OffsetDateTime sourceIfUnmodifiedSince, String sourceIfMatch, + String sourceIfNoneMatch, String requestId, String copySourceAuthorization, CpkInfo cpkInfo, + EncryptionScope encryptionScopeParam, Context context) { + final String comp = "page"; + final String pageWrite = "update"; + final String accept = "application/xml"; + String encryptionKeyInternal = null; + if (cpkInfo != null) { + encryptionKeyInternal = cpkInfo.getEncryptionKey(); + } + String encryptionKey = encryptionKeyInternal; + String encryptionKeySha256Internal = null; + if (cpkInfo != null) { + encryptionKeySha256Internal = cpkInfo.getEncryptionKeySha256(); + } + String encryptionKeySha256 = encryptionKeySha256Internal; + EncryptionAlgorithmType encryptionAlgorithmInternal = null; + if (cpkInfo != null) { + encryptionAlgorithmInternal = cpkInfo.getEncryptionAlgorithm(); + } + EncryptionAlgorithmType encryptionAlgorithm = encryptionAlgorithmInternal; + String encryptionScopeInternal = null; + if (encryptionScopeParam != null) { + encryptionScopeInternal = encryptionScopeParam.getEncryptionScope(); + } + String encryptionScope = encryptionScopeInternal; + String sourceContentMD5Converted = Base64Util.encodeToString(sourceContentMD5); + String sourceContentcrc64Converted = Base64Util.encodeToString(sourceContentcrc64); + DateTimeRfc1123 ifModifiedSinceConverted + = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); + DateTimeRfc1123 ifUnmodifiedSinceConverted + = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); + DateTimeRfc1123 sourceIfModifiedSinceConverted + = sourceIfModifiedSince == null ? null : new DateTimeRfc1123(sourceIfModifiedSince); + DateTimeRfc1123 sourceIfUnmodifiedSinceConverted + = sourceIfUnmodifiedSince == null ? null : new DateTimeRfc1123(sourceIfUnmodifiedSince); + return service.uploadPagesFromURLNoCustomHeadersSync(this.client.getUrl(), containerName, blob, comp, pageWrite, + sourceUrl, sourceRange, sourceContentMD5Converted, sourceContentcrc64Converted, contentLength, timeout, + range, encryptionKey, encryptionKeySha256, encryptionAlgorithm, encryptionScope, leaseId, + ifSequenceNumberLessThanOrEqualTo, ifSequenceNumberLessThan, ifSequenceNumberEqualTo, + ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, + sourceIfModifiedSinceConverted, sourceIfUnmodifiedSinceConverted, sourceIfMatch, sourceIfNoneMatch, + this.client.getVersion(), requestId, copySourceAuthorization, accept, context); + } + + /** + * The Get Page Ranges operation returns the list of valid page ranges for a page blob, version or snapshot of a + * page blob. + * + * @param containerName The container name. + * @param blob The blob name. + * @param snapshot The snapshot parameter is an opaque DateTime value that, when present, specifies the blob + * snapshot to retrieve. For more information on working with blob snapshots, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/creating-a-snapshot-of-a-blob">Creating + * a Snapshot of a Blob.</a>. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param range Return only the bytes of the blob in the specified range. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the + * specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since + * the specified date/time. + * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. + * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. + * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param marker A string value that identifies the portion of the list of containers to be returned with the next + * listing operation. The operation returns the NextMarker value within the response body if the listing operation + * did not return all containers remaining to be listed with the current page. The NextMarker value can be used as + * the value for the marker parameter in a subsequent call to request the next page of list items. The marker value + * is opaque to the client. + * @param maxresults Specifies the maximum number of containers to return. If the request does not specify + * maxresults, or specifies a value greater than 5000, the server will return up to 5000 items. Note that if the + * listing operation crosses a partition boundary, then the service will return a continuation token for retrieving + * the remainder of the results. For this reason, it is possible that the service will return fewer results than + * specified by maxresults, or than the default of 5000. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws StorageErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the list of pages along with {@link ResponseBase}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ResponseBase getPageRangesWithResponse(String containerName, + String blob, String snapshot, Integer timeout, String range, String leaseId, OffsetDateTime ifModifiedSince, + OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, String ifTags, String requestId, + String marker, Integer maxresults, Context context) { + final String comp = "pagelist"; + final String accept = "application/xml"; + DateTimeRfc1123 ifModifiedSinceConverted + = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); + DateTimeRfc1123 ifUnmodifiedSinceConverted + = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); + return service.getPageRangesSync(this.client.getUrl(), containerName, blob, comp, snapshot, timeout, range, + leaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, + this.client.getVersion(), requestId, marker, maxresults, accept, context); + } + + /** + * The Get Page Ranges operation returns the list of valid page ranges for a page blob, version or snapshot of a + * page blob. + * + * @param containerName The container name. + * @param blob The blob name. + * @param snapshot The snapshot parameter is an opaque DateTime value that, when present, specifies the blob + * snapshot to retrieve. For more information on working with blob snapshots, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/creating-a-snapshot-of-a-blob">Creating + * a Snapshot of a Blob.</a>. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param range Return only the bytes of the blob in the specified range. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the + * specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since + * the specified date/time. + * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. + * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. + * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param marker A string value that identifies the portion of the list of containers to be returned with the next + * listing operation. The operation returns the NextMarker value within the response body if the listing operation + * did not return all containers remaining to be listed with the current page. The NextMarker value can be used as + * the value for the marker parameter in a subsequent call to request the next page of list items. The marker value + * is opaque to the client. + * @param maxresults Specifies the maximum number of containers to return. If the request does not specify + * maxresults, or specifies a value greater than 5000, the server will return up to 5000 items. Note that if the + * listing operation crosses a partition boundary, then the service will return a continuation token for retrieving + * the remainder of the results. For this reason, it is possible that the service will return fewer results than + * specified by maxresults, or than the default of 5000. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws StorageErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the list of pages. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public PageList getPageRanges(String containerName, String blob, String snapshot, Integer timeout, String range, + String leaseId, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, + String ifNoneMatch, String ifTags, String requestId, String marker, Integer maxresults) { + return getPageRangesWithResponse(containerName, blob, snapshot, timeout, range, leaseId, ifModifiedSince, + ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, requestId, marker, maxresults, Context.none()).getValue(); + } + + /** + * The Get Page Ranges operation returns the list of valid page ranges for a page blob, version or snapshot of a + * page blob. + * + * @param containerName The container name. + * @param blob The blob name. + * @param snapshot The snapshot parameter is an opaque DateTime value that, when present, specifies the blob + * snapshot to retrieve. For more information on working with blob snapshots, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/creating-a-snapshot-of-a-blob">Creating + * a Snapshot of a Blob.</a>. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param range Return only the bytes of the blob in the specified range. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the + * specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since + * the specified date/time. + * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. + * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. + * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param marker A string value that identifies the portion of the list of containers to be returned with the next + * listing operation. The operation returns the NextMarker value within the response body if the listing operation + * did not return all containers remaining to be listed with the current page. The NextMarker value can be used as + * the value for the marker parameter in a subsequent call to request the next page of list items. The marker value + * is opaque to the client. + * @param maxresults Specifies the maximum number of containers to return. If the request does not specify + * maxresults, or specifies a value greater than 5000, the server will return up to 5000 items. Note that if the + * listing operation crosses a partition boundary, then the service will return a continuation token for retrieving + * the remainder of the results. For this reason, it is possible that the service will return fewer results than + * specified by maxresults, or than the default of 5000. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws StorageErrorException 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 Response getPageRangesNoCustomHeadersWithResponse(String containerName, String blob, + String snapshot, Integer timeout, String range, String leaseId, OffsetDateTime ifModifiedSince, + OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, String ifTags, String requestId, + String marker, Integer maxresults, Context context) { + final String comp = "pagelist"; + final String accept = "application/xml"; + DateTimeRfc1123 ifModifiedSinceConverted + = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); + DateTimeRfc1123 ifUnmodifiedSinceConverted + = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); + return service.getPageRangesNoCustomHeadersSync(this.client.getUrl(), containerName, blob, comp, snapshot, + timeout, range, leaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, + this.client.getVersion(), requestId, marker, maxresults, accept, context); + } + + /** + * [Update] The Get Page Ranges Diff operation returns the list of valid page ranges for a page blob that were + * changed between target blob and previous snapshot or version. + * + * @param containerName The container name. + * @param blob The blob name. + * @param snapshot The snapshot parameter is an opaque DateTime value that, when present, specifies the blob + * snapshot to retrieve. For more information on working with blob snapshots, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/creating-a-snapshot-of-a-blob">Creating + * a Snapshot of a Blob.</a>. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param prevsnapshot Optional in version 2015-07-08 and newer. The prevsnapshot parameter is a DateTime value that + * specifies that the response will contain only pages that were changed between target blob and previous snapshot. + * Changed pages include both updated and cleared pages. The target blob may be a snapshot, as long as the snapshot + * specified by prevsnapshot is the older of the two. Note that incremental snapshots are currently supported only + * for blobs created on or after January 1, 2016. + * @param prevSnapshotUrl Optional. This header is only supported in service versions 2019-04-19 and after and + * specifies the URL of a previous snapshot of the target blob. The response will only contain pages that were + * changed between the target blob and its previous snapshot. + * @param range Return only the bytes of the blob in the specified range. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the + * specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since + * the specified date/time. + * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. + * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. + * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param marker A string value that identifies the portion of the list of containers to be returned with the next + * listing operation. The operation returns the NextMarker value within the response body if the listing operation + * did not return all containers remaining to be listed with the current page. The NextMarker value can be used as + * the value for the marker parameter in a subsequent call to request the next page of list items. The marker value + * is opaque to the client. + * @param maxresults Specifies the maximum number of containers to return. If the request does not specify + * maxresults, or specifies a value greater than 5000, the server will return up to 5000 items. Note that if the + * listing operation crosses a partition boundary, then the service will return a continuation token for retrieving + * the remainder of the results. For this reason, it is possible that the service will return fewer results than + * specified by maxresults, or than the default of 5000. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws StorageErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the list of pages along with {@link ResponseBase}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ResponseBase getPageRangesDiffWithResponse(String containerName, + String blob, String snapshot, Integer timeout, String prevsnapshot, String prevSnapshotUrl, String range, + String leaseId, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, + String ifNoneMatch, String ifTags, String requestId, String marker, Integer maxresults, Context context) { + final String comp = "pagelist"; + final String accept = "application/xml"; + DateTimeRfc1123 ifModifiedSinceConverted + = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); + DateTimeRfc1123 ifUnmodifiedSinceConverted + = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); + return service.getPageRangesDiffSync(this.client.getUrl(), containerName, blob, comp, snapshot, timeout, + prevsnapshot, prevSnapshotUrl, range, leaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, + ifMatch, ifNoneMatch, ifTags, this.client.getVersion(), requestId, marker, maxresults, accept, context); + } + + /** + * [Update] The Get Page Ranges Diff operation returns the list of valid page ranges for a page blob that were + * changed between target blob and previous snapshot or version. + * + * @param containerName The container name. + * @param blob The blob name. + * @param snapshot The snapshot parameter is an opaque DateTime value that, when present, specifies the blob + * snapshot to retrieve. For more information on working with blob snapshots, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/creating-a-snapshot-of-a-blob">Creating + * a Snapshot of a Blob.</a>. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param prevsnapshot Optional in version 2015-07-08 and newer. The prevsnapshot parameter is a DateTime value that + * specifies that the response will contain only pages that were changed between target blob and previous snapshot. + * Changed pages include both updated and cleared pages. The target blob may be a snapshot, as long as the snapshot + * specified by prevsnapshot is the older of the two. Note that incremental snapshots are currently supported only + * for blobs created on or after January 1, 2016. + * @param prevSnapshotUrl Optional. This header is only supported in service versions 2019-04-19 and after and + * specifies the URL of a previous snapshot of the target blob. The response will only contain pages that were + * changed between the target blob and its previous snapshot. + * @param range Return only the bytes of the blob in the specified range. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the + * specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since + * the specified date/time. + * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. + * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. + * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param marker A string value that identifies the portion of the list of containers to be returned with the next + * listing operation. The operation returns the NextMarker value within the response body if the listing operation + * did not return all containers remaining to be listed with the current page. The NextMarker value can be used as + * the value for the marker parameter in a subsequent call to request the next page of list items. The marker value + * is opaque to the client. + * @param maxresults Specifies the maximum number of containers to return. If the request does not specify + * maxresults, or specifies a value greater than 5000, the server will return up to 5000 items. Note that if the + * listing operation crosses a partition boundary, then the service will return a continuation token for retrieving + * the remainder of the results. For this reason, it is possible that the service will return fewer results than + * specified by maxresults, or than the default of 5000. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws StorageErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the list of pages. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public PageList getPageRangesDiff(String containerName, String blob, String snapshot, Integer timeout, + String prevsnapshot, String prevSnapshotUrl, String range, String leaseId, OffsetDateTime ifModifiedSince, + OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, String ifTags, String requestId, + String marker, Integer maxresults) { + return getPageRangesDiffWithResponse(containerName, blob, snapshot, timeout, prevsnapshot, prevSnapshotUrl, + range, leaseId, ifModifiedSince, ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, requestId, marker, + maxresults, Context.none()).getValue(); + } + + /** + * [Update] The Get Page Ranges Diff operation returns the list of valid page ranges for a page blob that were + * changed between target blob and previous snapshot or version. + * + * @param containerName The container name. + * @param blob The blob name. + * @param snapshot The snapshot parameter is an opaque DateTime value that, when present, specifies the blob + * snapshot to retrieve. For more information on working with blob snapshots, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/creating-a-snapshot-of-a-blob">Creating + * a Snapshot of a Blob.</a>. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param prevsnapshot Optional in version 2015-07-08 and newer. The prevsnapshot parameter is a DateTime value that + * specifies that the response will contain only pages that were changed between target blob and previous snapshot. + * Changed pages include both updated and cleared pages. The target blob may be a snapshot, as long as the snapshot + * specified by prevsnapshot is the older of the two. Note that incremental snapshots are currently supported only + * for blobs created on or after January 1, 2016. + * @param prevSnapshotUrl Optional. This header is only supported in service versions 2019-04-19 and after and + * specifies the URL of a previous snapshot of the target blob. The response will only contain pages that were + * changed between the target blob and its previous snapshot. + * @param range Return only the bytes of the blob in the specified range. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the + * specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since + * the specified date/time. + * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. + * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. + * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param marker A string value that identifies the portion of the list of containers to be returned with the next + * listing operation. The operation returns the NextMarker value within the response body if the listing operation + * did not return all containers remaining to be listed with the current page. The NextMarker value can be used as + * the value for the marker parameter in a subsequent call to request the next page of list items. The marker value + * is opaque to the client. + * @param maxresults Specifies the maximum number of containers to return. If the request does not specify + * maxresults, or specifies a value greater than 5000, the server will return up to 5000 items. Note that if the + * listing operation crosses a partition boundary, then the service will return a continuation token for retrieving + * the remainder of the results. For this reason, it is possible that the service will return fewer results than + * specified by maxresults, or than the default of 5000. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws StorageErrorException 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 Response getPageRangesDiffNoCustomHeadersWithResponse(String containerName, String blob, + String snapshot, Integer timeout, String prevsnapshot, String prevSnapshotUrl, String range, String leaseId, + OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, + String ifTags, String requestId, String marker, Integer maxresults, Context context) { + final String comp = "pagelist"; + final String accept = "application/xml"; + DateTimeRfc1123 ifModifiedSinceConverted + = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); + DateTimeRfc1123 ifUnmodifiedSinceConverted + = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); + return service.getPageRangesDiffNoCustomHeadersSync(this.client.getUrl(), containerName, blob, comp, snapshot, + timeout, prevsnapshot, prevSnapshotUrl, range, leaseId, ifModifiedSinceConverted, + ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, this.client.getVersion(), requestId, marker, + maxresults, accept, context); + } + + /** + * Resize the Blob. + * + * @param containerName The container name. + * @param blob The blob name. + * @param blobContentLength This header specifies the maximum size for the page blob, up to 1 TB. The page blob size + * must be aligned to a 512-byte boundary. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the + * specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since + * the specified date/time. + * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. + * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. + * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param cpkInfo Parameter group. + * @param encryptionScopeParam Parameter group. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws StorageErrorException thrown if 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) { + final String comp = "properties"; + final String accept = "application/xml"; + String encryptionKeyInternal = null; + if (cpkInfo != null) { + encryptionKeyInternal = cpkInfo.getEncryptionKey(); + } + String encryptionKey = encryptionKeyInternal; + String encryptionKeySha256Internal = null; + if (cpkInfo != null) { + encryptionKeySha256Internal = cpkInfo.getEncryptionKeySha256(); + } + String encryptionKeySha256 = encryptionKeySha256Internal; + EncryptionAlgorithmType encryptionAlgorithmInternal = null; + if (cpkInfo != null) { + encryptionAlgorithmInternal = cpkInfo.getEncryptionAlgorithm(); + } + EncryptionAlgorithmType encryptionAlgorithm = encryptionAlgorithmInternal; + String encryptionScopeInternal = null; + if (encryptionScopeParam != null) { + encryptionScopeInternal = encryptionScopeParam.getEncryptionScope(); + } + String encryptionScope = encryptionScopeInternal; + DateTimeRfc1123 ifModifiedSinceConverted + = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); + DateTimeRfc1123 ifUnmodifiedSinceConverted + = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); + return service.resizeSync(this.client.getUrl(), containerName, blob, comp, timeout, leaseId, encryptionKey, + encryptionKeySha256, encryptionAlgorithm, encryptionScope, ifModifiedSinceConverted, + ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, blobContentLength, this.client.getVersion(), + requestId, accept, context); + } + + /** + * Resize the Blob. + * + * @param containerName The container name. + * @param blob The blob name. + * @param blobContentLength This header specifies the maximum size for the page blob, up to 1 TB. The page blob size + * must be aligned to a 512-byte boundary. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the + * specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since + * the specified date/time. + * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. + * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. + * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param cpkInfo Parameter group. + * @param encryptionScopeParam Parameter group. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws StorageErrorException 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://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the + * specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since + * the specified date/time. + * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. + * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. + * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param cpkInfo Parameter group. + * @param encryptionScopeParam Parameter group. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws StorageErrorException 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 Response resizeNoCustomHeadersWithResponse(String containerName, String blob, long blobContentLength, + Integer timeout, String leaseId, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, + String ifMatch, String ifNoneMatch, String ifTags, String requestId, CpkInfo cpkInfo, + EncryptionScope encryptionScopeParam, Context context) { + final String comp = "properties"; + final String accept = "application/xml"; + String encryptionKeyInternal = null; + 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); + } + + /** + * Update the sequence number of the blob. + * + * @param containerName The container name. + * @param blob The blob name. + * @param sequenceNumberAction Required if the x-ms-blob-sequence-number header is set for the request. This + * property applies to page blobs only. This property indicates how the service should modify the blob's sequence + * number. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the + * specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since + * the specified date/time. + * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. + * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. + * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. + * @param blobSequenceNumber Set for page blobs only. The sequence number is a user-controlled value that you can + * use to track requests. The value of the sequence number must be between 0 and 2^63 - 1. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws StorageErrorException thrown if 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) { + final String comp = "properties"; + final String accept = "application/xml"; + DateTimeRfc1123 ifModifiedSinceConverted + = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); + DateTimeRfc1123 ifUnmodifiedSinceConverted + = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); + return service.updateSequenceNumberSync(this.client.getUrl(), containerName, blob, comp, timeout, leaseId, + ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, sequenceNumberAction, + blobSequenceNumber, this.client.getVersion(), requestId, accept, context); + } + + /** + * Update the sequence number of the blob. + * + * @param containerName The container name. + * @param blob The blob name. + * @param sequenceNumberAction Required if the x-ms-blob-sequence-number header is set for the request. This + * property applies to page blobs only. This property indicates how the service should modify the blob's sequence + * number. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the + * specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since + * the specified date/time. + * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. + * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. + * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. + * @param blobSequenceNumber Set for page blobs only. The sequence number is a user-controlled value that you can + * use to track requests. The value of the sequence number must be between 0 and 2^63 - 1. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws StorageErrorException 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://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the + * specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since + * the specified date/time. + * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. + * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. + * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. + * @param blobSequenceNumber Set for page blobs only. The sequence number is a user-controlled value that you can + * use to track requests. The value of the sequence number must be between 0 and 2^63 - 1. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws StorageErrorException 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 Response updateSequenceNumberNoCustomHeadersWithResponse(String containerName, String blob, + SequenceNumberActionType sequenceNumberAction, Integer timeout, String leaseId, OffsetDateTime ifModifiedSince, + OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, String ifTags, Long blobSequenceNumber, + String requestId, Context context) { + final String comp = "properties"; + final String accept = "application/xml"; + DateTimeRfc1123 ifModifiedSinceConverted + = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); + DateTimeRfc1123 ifUnmodifiedSinceConverted + = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); + return service.updateSequenceNumberNoCustomHeadersSync(this.client.getUrl(), containerName, blob, comp, timeout, + leaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, + sequenceNumberAction, blobSequenceNumber, this.client.getVersion(), requestId, accept, context); + } + + /** + * The Copy Incremental operation copies a snapshot of the source page blob to a destination page blob. The snapshot + * is copied such that only the differential changes between the previously copied snapshot are transferred to the + * destination. The copied snapshots are complete copies of the original snapshot and can be read or copied from as + * usual. This API is supported since REST version 2016-05-31. + * + * @param containerName The container name. + * @param blob The blob name. + * @param copySource Specifies the name of the source page blob snapshot. This value is a URL of up to 2 KB in + * length that specifies a page blob snapshot. The value should be URL-encoded as it would appear in a request URI. + * The source blob must either be public or must be authenticated via a shared access signature. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the + * specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since + * the specified date/time. + * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. + * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. + * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws StorageErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link ResponseBase}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ResponseBase copyIncrementalWithResponse(String containerName, + String blob, String copySource, Integer timeout, OffsetDateTime ifModifiedSince, + OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, String ifTags, String requestId, + Context context) { + final String comp = "incrementalcopy"; + final String accept = "application/xml"; + DateTimeRfc1123 ifModifiedSinceConverted + = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); + DateTimeRfc1123 ifUnmodifiedSinceConverted + = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); + return service.copyIncrementalSync(this.client.getUrl(), containerName, blob, comp, timeout, + ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, copySource, + this.client.getVersion(), requestId, accept, context); + } + + /** + * The Copy Incremental operation copies a snapshot of the source page blob to a destination page blob. The snapshot + * is copied such that only the differential changes between the previously copied snapshot are transferred to the + * destination. The copied snapshots are complete copies of the original snapshot and can be read or copied from as + * usual. This API is supported since REST version 2016-05-31. + * + * @param containerName The container name. + * @param blob The blob name. + * @param copySource Specifies the name of the source page blob snapshot. This value is a URL of up to 2 KB in + * length that specifies a page blob snapshot. The value should be URL-encoded as it would appear in a request URI. + * The source blob must either be public or must be authenticated via a shared access signature. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the + * specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since + * the specified date/time. + * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. + * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. + * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws StorageErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void copyIncremental(String containerName, String blob, String copySource, Integer timeout, + OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, + String ifTags, String requestId) { + copyIncrementalWithResponse(containerName, blob, copySource, timeout, ifModifiedSince, ifUnmodifiedSince, + ifMatch, ifNoneMatch, ifTags, requestId, Context.none()); + } + + /** + * The Copy Incremental operation copies a snapshot of the source page blob to a destination page blob. The snapshot + * is copied such that only the differential changes between the previously copied snapshot are transferred to the + * destination. The copied snapshots are complete copies of the original snapshot and can be read or copied from as + * usual. This API is supported since REST version 2016-05-31. + * + * @param containerName The container name. + * @param blob The blob name. + * @param copySource Specifies the name of the source page blob snapshot. This value is a URL of up to 2 KB in + * length that specifies a page blob snapshot. The value should be URL-encoded as it would appear in a request URI. + * The source blob must either be public or must be authenticated via a shared access signature. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the + * specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since + * the specified date/time. + * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. + * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. + * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws StorageErrorException 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 Response copyIncrementalNoCustomHeadersWithResponse(String containerName, String blob, + String copySource, Integer timeout, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, + String ifMatch, String ifNoneMatch, String ifTags, String requestId, Context context) { + final String comp = "incrementalcopy"; + final String accept = "application/xml"; + DateTimeRfc1123 ifModifiedSinceConverted + = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); + DateTimeRfc1123 ifUnmodifiedSinceConverted + = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); + return service.copyIncrementalNoCustomHeadersSync(this.client.getUrl(), containerName, blob, comp, timeout, + ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, copySource, + this.client.getVersion(), requestId, accept, context); + } +} diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/implementation/ServicesImpl.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/implementation/ServicesImpl.java new file mode 100644 index 000000000000..2d21da9c603c --- /dev/null +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/implementation/ServicesImpl.java @@ -0,0 +1,984 @@ +// 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.v2.annotation.ReturnType; +import com.azure.core.v2.annotation.ServiceMethod; +import com.azure.core.v2.http.rest.PagedIterable; +import com.azure.core.v2.http.rest.PagedResponse; +import com.azure.core.v2.http.rest.PagedResponseBase; +import com.azure.core.v2.http.rest.ResponseBase; +import com.azure.storage.blob.models.BlobContainerItem; +import com.azure.storage.blob.models.BlobContainersSegment; +import com.azure.storage.blob.models.BlobServiceProperties; +import com.azure.storage.blob.models.BlobServiceStatistics; +import com.azure.storage.blob.models.FilterBlobSegment; +import com.azure.storage.blob.models.FilterBlobsIncludeItem; +import com.azure.storage.blob.models.KeyInfo; +import com.azure.storage.blob.models.ListBlobContainersIncludeType; +import com.azure.storage.blob.models.ServicesFilterBlobsHeaders; +import com.azure.storage.blob.models.ServicesGetAccountInfoHeaders; +import com.azure.storage.blob.models.ServicesGetPropertiesHeaders; +import com.azure.storage.blob.models.ServicesGetStatisticsHeaders; +import com.azure.storage.blob.models.ServicesGetUserDelegationKeyHeaders; +import com.azure.storage.blob.models.ServicesListBlobContainersSegmentHeaders; +import com.azure.storage.blob.models.ServicesListBlobContainersSegmentNextHeaders; +import com.azure.storage.blob.models.ServicesSetPropertiesHeaders; +import com.azure.storage.blob.models.ServicesSubmitBatchHeaders; +import com.azure.storage.blob.models.StorageErrorException; +import com.azure.storage.blob.models.UserDelegationKey; +import io.clientcore.core.annotation.ServiceInterface; +import io.clientcore.core.http.RestProxy; +import io.clientcore.core.http.annotation.BodyParam; +import io.clientcore.core.http.annotation.HeaderParam; +import io.clientcore.core.http.annotation.HostParam; +import io.clientcore.core.http.annotation.HttpRequestInformation; +import io.clientcore.core.http.annotation.PathParam; +import io.clientcore.core.http.annotation.QueryParam; +import io.clientcore.core.http.annotation.UnexpectedResponseExceptionDetail; +import io.clientcore.core.http.models.HttpMethod; +import io.clientcore.core.http.models.Response; +import io.clientcore.core.util.Context; +import io.clientcore.core.util.binarydata.BinaryData; +import java.io.InputStream; +import java.util.List; +import java.util.Objects; +import java.util.stream.Collectors; + +/** + * An instance of this class provides access to all the operations defined in Services. + */ +public final class ServicesImpl { + /** + * The proxy service used to perform REST calls. + */ + private final ServicesService service; + + /** + * The service client containing this operation class. + */ + private final AzureBlobStorageImpl client; + + /** + * Initializes an instance of ServicesImpl. + * + * @param client the instance of the service client containing this operation class. + */ + ServicesImpl(AzureBlobStorageImpl client) { + this.service = RestProxy.create(ServicesService.class, client.getHttpPipeline()); + this.client = client; + } + + /** + * The interface defining all the services for AzureBlobStorageServices to be used by the proxy service to perform + * REST calls. + */ + @ServiceInterface(name = "AzureBlobStorageServ", host = "{url}") + public interface ServicesService { + @HttpRequestInformation(method = HttpMethod.PUT, path = "/", expectedStatusCodes = { 202 }) + @UnexpectedResponseExceptionDetail + 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); + + @HttpRequestInformation(method = HttpMethod.PUT, path = "/", expectedStatusCodes = { 202 }) + @UnexpectedResponseExceptionDetail + 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); + + @HttpRequestInformation(method = HttpMethod.GET, path = "/", expectedStatusCodes = { 200 }) + @UnexpectedResponseExceptionDetail + 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); + + @HttpRequestInformation(method = HttpMethod.GET, path = "/", expectedStatusCodes = { 200 }) + @UnexpectedResponseExceptionDetail + 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); + + @HttpRequestInformation(method = HttpMethod.GET, path = "/", expectedStatusCodes = { 200 }) + @UnexpectedResponseExceptionDetail + 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); + + @HttpRequestInformation(method = HttpMethod.GET, path = "/", expectedStatusCodes = { 200 }) + @UnexpectedResponseExceptionDetail + Response getStatisticsNoCustomHeadersSync(@HostParam("url") String url, + @QueryParam("restype") String restype, @QueryParam("comp") String comp, + @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-version") String version, + @HeaderParam("x-ms-client-request-id") String requestId, @HeaderParam("Accept") String accept, + Context context); + + @HttpRequestInformation(method = HttpMethod.GET, path = "/", expectedStatusCodes = { 200 }) + @UnexpectedResponseExceptionDetail + 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); + + @HttpRequestInformation(method = HttpMethod.GET, path = "/", expectedStatusCodes = { 200 }) + @UnexpectedResponseExceptionDetail + 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); + + @HttpRequestInformation(method = HttpMethod.POST, path = "/", expectedStatusCodes = { 200 }) + @UnexpectedResponseExceptionDetail + 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); + + @HttpRequestInformation(method = HttpMethod.POST, path = "/", expectedStatusCodes = { 200 }) + @UnexpectedResponseExceptionDetail + 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); + + @HttpRequestInformation(method = HttpMethod.GET, path = "/", expectedStatusCodes = { 200 }) + @UnexpectedResponseExceptionDetail + 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); + + @HttpRequestInformation(method = HttpMethod.GET, path = "/", expectedStatusCodes = { 200 }) + @UnexpectedResponseExceptionDetail + 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); + + @HttpRequestInformation(method = HttpMethod.POST, path = "/", expectedStatusCodes = { 202 }) + @UnexpectedResponseExceptionDetail + 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); + + @HttpRequestInformation(method = HttpMethod.POST, path = "/", expectedStatusCodes = { 202 }) + @UnexpectedResponseExceptionDetail + 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); + + @HttpRequestInformation(method = HttpMethod.GET, path = "/", expectedStatusCodes = { 200 }) + @UnexpectedResponseExceptionDetail + 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); + + @HttpRequestInformation(method = HttpMethod.GET, path = "/", expectedStatusCodes = { 200 }) + @UnexpectedResponseExceptionDetail + 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); + + @HttpRequestInformation(method = HttpMethod.GET, path = "{nextLink}", expectedStatusCodes = { 200 }) + @UnexpectedResponseExceptionDetail + 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); + + @HttpRequestInformation(method = HttpMethod.GET, path = "{nextLink}", expectedStatusCodes = { 200 }) + @UnexpectedResponseExceptionDetail + Response listBlobContainersSegmentNextNoCustomHeadersSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("url") String url, + @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, + @HeaderParam("Accept") String accept, Context context); + } + + /** + * Sets properties for a storage account's Blob service endpoint, including properties for Storage Analytics and + * CORS (Cross-Origin Resource Sharing) rules. + * + * @param blobServiceProperties The StorageService properties. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param requestId Provides a 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 StorageErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link ResponseBase}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ResponseBase setPropertiesWithResponse( + BlobServiceProperties blobServiceProperties, Integer timeout, String requestId, Context context) { + final String restype = "service"; + final String comp = "properties"; + final String accept = "application/xml"; + return service.setPropertiesSync(this.client.getUrl(), restype, comp, timeout, this.client.getVersion(), + requestId, blobServiceProperties, accept, context); + } + + /** + * Sets properties for a storage account's Blob service endpoint, including properties for Storage Analytics and + * CORS (Cross-Origin Resource Sharing) rules. + * + * @param blobServiceProperties The StorageService properties. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws StorageErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void setProperties(BlobServiceProperties blobServiceProperties, Integer timeout, String requestId) { + setPropertiesWithResponse(blobServiceProperties, timeout, requestId, Context.none()); + } + + /** + * Sets properties for a storage account's Blob service endpoint, including properties for Storage Analytics and + * CORS (Cross-Origin Resource Sharing) rules. + * + * @param blobServiceProperties The StorageService properties. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws StorageErrorException 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 Response setPropertiesNoCustomHeadersWithResponse(BlobServiceProperties blobServiceProperties, + Integer timeout, String requestId, Context context) { + final String restype = "service"; + final String comp = "properties"; + final String accept = "application/xml"; + return service.setPropertiesNoCustomHeadersSync(this.client.getUrl(), restype, comp, timeout, + this.client.getVersion(), requestId, blobServiceProperties, accept, context); + } + + /** + * gets the properties of a storage account's Blob service, including properties for Storage Analytics and CORS + * (Cross-Origin Resource Sharing) rules. + * + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param requestId Provides a 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 StorageErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the properties of a storage account's Blob service, including properties for Storage Analytics and CORS + * (Cross-Origin Resource Sharing) rules along with {@link ResponseBase}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ResponseBase getPropertiesWithResponse(Integer timeout, + String requestId, Context context) { + final String restype = "service"; + final String comp = "properties"; + final String accept = "application/xml"; + return service.getPropertiesSync(this.client.getUrl(), restype, comp, timeout, this.client.getVersion(), + requestId, accept, context); + } + + /** + * gets the properties of a storage account's Blob service, including properties for Storage Analytics and CORS + * (Cross-Origin Resource Sharing) rules. + * + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws StorageErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the properties of a storage account's Blob service, including properties for Storage Analytics and CORS + * (Cross-Origin Resource Sharing) rules. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public BlobServiceProperties getProperties(Integer timeout, String requestId) { + return getPropertiesWithResponse(timeout, requestId, Context.none()).getValue(); + } + + /** + * gets the properties of a storage account's Blob service, including properties for Storage Analytics and CORS + * (Cross-Origin Resource Sharing) rules. + * + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws StorageErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the properties of a storage account's Blob service, including properties for Storage Analytics and CORS + * (Cross-Origin Resource Sharing) rules. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getPropertiesNoCustomHeadersWithResponse(Integer timeout, String requestId, + Context context) { + final String restype = "service"; + final String comp = "properties"; + final String accept = "application/xml"; + return service.getPropertiesNoCustomHeadersSync(this.client.getUrl(), restype, comp, timeout, + this.client.getVersion(), requestId, accept, context); + } + + /** + * Retrieves statistics related to replication for the Blob service. It is only available on the secondary location + * endpoint when read-access geo-redundant replication is enabled for the storage account. + * + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param requestId Provides a 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 StorageErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return stats for the storage service along with {@link ResponseBase}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ResponseBase getStatisticsWithResponse(Integer timeout, + String requestId, Context context) { + final String restype = "service"; + final String comp = "stats"; + final String accept = "application/xml"; + return service.getStatisticsSync(this.client.getUrl(), restype, comp, timeout, this.client.getVersion(), + requestId, accept, context); + } + + /** + * Retrieves statistics related to replication for the Blob service. It is only available on the secondary location + * endpoint when read-access geo-redundant replication is enabled for the storage account. + * + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws StorageErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return stats for the storage service. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public BlobServiceStatistics getStatistics(Integer timeout, String requestId) { + return getStatisticsWithResponse(timeout, requestId, Context.none()).getValue(); + } + + /** + * Retrieves statistics related to replication for the Blob service. It is only available on the secondary location + * endpoint when read-access geo-redundant replication is enabled for the storage account. + * + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws StorageErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return stats for the storage service. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getStatisticsNoCustomHeadersWithResponse(Integer timeout, String requestId, + Context context) { + final String restype = "service"; + final String comp = "stats"; + final String accept = "application/xml"; + return service.getStatisticsNoCustomHeadersSync(this.client.getUrl(), restype, comp, timeout, + this.client.getVersion(), requestId, accept, context); + } + + /** + * The List Containers Segment operation returns a list of the containers under the specified account. + * + * @param prefix Filters the results to return only containers whose name begins with the specified prefix. + * @param marker A string value that identifies the portion of the list of containers to be returned with the next + * listing operation. The operation returns the NextMarker value within the response body if the listing operation + * did not return all containers remaining to be listed with the current page. The NextMarker value can be used as + * the value for the marker parameter in a subsequent call to request the next page of list items. The marker value + * is opaque to the client. + * @param maxresults Specifies the maximum number of containers to return. If the request does not specify + * maxresults, or specifies a value greater than 5000, the server will return up to 5000 items. Note that if the + * listing operation crosses a partition boundary, then the service will return a continuation token for retrieving + * the remainder of the results. For this reason, it is possible that the service will return fewer results than + * specified by maxresults, or than the default of 5000. + * @param listBlobContainersIncludeType Include this parameter to specify that the container's metadata be returned + * as part of the response body. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws StorageErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an enumeration of containers along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public PagedResponse listBlobContainersSegmentSinglePage(String prefix, String marker, + Integer maxresults, List listBlobContainersIncludeType, Integer timeout, + String requestId, Context context) { + final String comp = "list"; + final String accept = "application/xml"; + String listBlobContainersIncludeTypeConverted = (listBlobContainersIncludeType == null) + ? null + : listBlobContainersIncludeType.stream() + .map(paramItemValue -> Objects.toString(paramItemValue, "")) + .collect(Collectors.joining(",")); + ResponseBase res + = service.listBlobContainersSegmentSync(this.client.getUrl(), comp, prefix, marker, maxresults, + listBlobContainersIncludeTypeConverted, timeout, this.client.getVersion(), requestId, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().getBlobContainerItems(), res.getValue().getNextMarker(), res.getDeserializedHeaders()); + } + + /** + * The List Containers Segment operation returns a list of the containers under the specified account. + * + * @param prefix Filters the results to return only containers whose name begins with the specified prefix. + * @param marker A string value that identifies the portion of the list of containers to be returned with the next + * listing operation. The operation returns the NextMarker value within the response body if the listing operation + * did not return all containers remaining to be listed with the current page. The NextMarker value can be used as + * the value for the marker parameter in a subsequent call to request the next page of list items. The marker value + * is opaque to the client. + * @param maxresults Specifies the maximum number of containers to return. If the request does not specify + * maxresults, or specifies a value greater than 5000, the server will return up to 5000 items. Note that if the + * listing operation crosses a partition boundary, then the service will return a continuation token for retrieving + * the remainder of the results. For this reason, it is possible that the service will return fewer results than + * specified by maxresults, or than the default of 5000. + * @param listBlobContainersIncludeType Include this parameter to specify that the container's metadata be returned + * as part of the response body. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws StorageErrorException 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://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws StorageErrorException 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) { + 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); + } + + /** + * The List Containers Segment operation returns a list of the containers under the specified account. + * + * @param prefix Filters the results to return only containers whose name begins with the specified prefix. + * @param marker A string value that identifies the portion of the list of containers to be returned with the next + * listing operation. The operation returns the NextMarker value within the response body if the listing operation + * did not return all containers remaining to be listed with the current page. The NextMarker value can be used as + * the value for the marker parameter in a subsequent call to request the next page of list items. The marker value + * is opaque to the client. + * @param maxresults Specifies the maximum number of containers to return. If the request does not specify + * maxresults, or specifies a value greater than 5000, the server will return up to 5000 items. Note that if the + * listing operation crosses a partition boundary, then the service will return a continuation token for retrieving + * the remainder of the results. For this reason, it is possible that the service will return fewer results than + * specified by maxresults, or than the default of 5000. + * @param listBlobContainersIncludeType Include this parameter to specify that the container's metadata be returned + * as part of the response body. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws StorageErrorException 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://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws StorageErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a user delegation key along with {@link ResponseBase}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ResponseBase + getUserDelegationKeyWithResponse(KeyInfo keyInfo, Integer timeout, String requestId, Context context) { + final String restype = "service"; + final String comp = "userdelegationkey"; + final String accept = "application/xml"; + return service.getUserDelegationKeySync(this.client.getUrl(), restype, comp, timeout, this.client.getVersion(), + requestId, keyInfo, accept, context); + } + + /** + * Retrieves a user delegation key for the Blob service. This is only a valid operation when using bearer token + * authentication. + * + * @param keyInfo Key information. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws StorageErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a user delegation key. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public UserDelegationKey getUserDelegationKey(KeyInfo keyInfo, Integer timeout, String requestId) { + return getUserDelegationKeyWithResponse(keyInfo, timeout, requestId, Context.none()).getValue(); + } + + /** + * Retrieves a user delegation key for the Blob service. This is only a valid operation when using bearer token + * authentication. + * + * @param keyInfo Key information. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param requestId Provides a 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 StorageErrorException 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 Response getUserDelegationKeyNoCustomHeadersWithResponse(KeyInfo keyInfo, Integer timeout, + String requestId, Context context) { + final String restype = "service"; + final String comp = "userdelegationkey"; + final String accept = "application/xml"; + return service.getUserDelegationKeyNoCustomHeadersSync(this.client.getUrl(), restype, comp, timeout, + this.client.getVersion(), requestId, keyInfo, accept, context); + } + + /** + * Returns the sku name and account kind. + * + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws StorageErrorException thrown if 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) { + 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); + } + + /** + * Returns the sku name and account kind. + * + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws StorageErrorException 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://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws StorageErrorException 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 Response getAccountInfoNoCustomHeadersWithResponse(Integer timeout, String requestId, + Context context) { + 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); + } + + /** + * The Batch operation allows multiple API calls to be embedded into a single HTTP request. + * + * @param contentLength The length of the request. + * @param multipartContentType Required. The value of this header must be multipart/mixed with a batch boundary. + * Example header value: multipart/mixed; boundary=batch_<GUID>. + * @param body Initial data. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws StorageErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link ResponseBase}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ResponseBase submitBatchWithResponse(long contentLength, + String multipartContentType, BinaryData body, Integer timeout, String requestId, Context context) { + final String comp = "batch"; + final String accept = "application/xml"; + return service.submitBatchSync(this.client.getUrl(), comp, contentLength, multipartContentType, timeout, + this.client.getVersion(), requestId, body, accept, context); + } + + /** + * The Batch operation allows multiple API calls to be embedded into a single HTTP request. + * + * @param contentLength The length of the request. + * @param multipartContentType Required. The value of this header must be multipart/mixed with a batch boundary. + * Example header value: multipart/mixed; boundary=batch_<GUID>. + * @param body Initial data. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws StorageErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public InputStream submitBatch(long contentLength, String multipartContentType, BinaryData body, Integer timeout, + String requestId) { + return submitBatchWithResponse(contentLength, multipartContentType, body, timeout, requestId, Context.none()) + .getValue(); + } + + /** + * The Batch operation allows multiple API calls to be embedded into a single HTTP request. + * + * @param contentLength The length of the request. + * @param multipartContentType Required. The value of this header must be multipart/mixed with a batch boundary. + * Example header value: multipart/mixed; boundary=batch_<GUID>. + * @param body Initial data. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws StorageErrorException 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 Response submitBatchNoCustomHeadersWithResponse(long contentLength, String multipartContentType, + BinaryData body, Integer timeout, String requestId, Context context) { + final String comp = "batch"; + final String accept = "application/xml"; + return service.submitBatchNoCustomHeadersSync(this.client.getUrl(), comp, contentLength, multipartContentType, + timeout, this.client.getVersion(), requestId, body, accept, context); + } + + /** + * The Filter Blobs operation enables callers to list blobs across all containers whose tags match a given search + * expression. Filter blobs searches across all containers within a storage account but can be scoped within the + * expression to a single container. + * + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param requestId Provides a 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 StorageErrorException 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) { + 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); + } + + /** + * The Filter Blobs operation enables callers to list blobs across all containers whose tags match a given search + * expression. Filter blobs searches across all containers within a storage account but can be scoped within the + * expression to a single container. + * + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param where Filters the results to return only to return only blobs whose tags match the specified expression. + * @param marker A string value that identifies the portion of the list of containers to be returned with the next + * listing operation. The operation returns the NextMarker value within the response body if the listing operation + * did not return all containers remaining to be listed with the current page. The NextMarker value can be used as + * the value for the marker parameter in a subsequent call to request the next page of list items. The marker value + * is opaque to the client. + * @param maxresults Specifies the maximum number of containers to return. If the request does not specify + * maxresults, or specifies a value greater than 5000, the server will return up to 5000 items. Note that if the + * listing operation crosses a partition boundary, then the service will return a continuation token for retrieving + * the remainder of the results. For this reason, it is possible that the service will return fewer results than + * specified by maxresults, or than the default of 5000. + * @param include Include this parameter to specify one or more datasets to include in the response. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws StorageErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the result of a Filter Blobs API call. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public FilterBlobSegment filterBlobs(Integer timeout, String requestId, String where, String marker, + Integer maxresults, List include) { + return filterBlobsWithResponse(timeout, requestId, where, marker, maxresults, include, Context.none()) + .getValue(); + } + + /** + * The Filter Blobs operation enables callers to list blobs across all containers whose tags match a given search + * expression. Filter blobs searches across all containers within a storage account but can be scoped within the + * expression to a single container. + * + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param requestId Provides a 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 StorageErrorException 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 Response filterBlobsNoCustomHeadersWithResponse(Integer timeout, String requestId, + String where, String marker, Integer maxresults, List include, Context context) { + final String comp = "blobs"; + final String accept = "application/xml"; + String includeConverted = (include == null) + ? null + : include.stream() + .map(paramItemValue -> Objects.toString(paramItemValue, "")) + .collect(Collectors.joining(",")); + return service.filterBlobsNoCustomHeadersSync(this.client.getUrl(), comp, timeout, this.client.getVersion(), + requestId, where, marker, maxresults, includeConverted, accept, context); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @param requestId Provides a 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 StorageErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an enumeration of containers along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public PagedResponse listBlobContainersSegmentNextSinglePage(String nextLink, String requestId, + Context context) { + final String accept = "application/xml"; + ResponseBase res + = service.listBlobContainersSegmentNextSync(nextLink, this.client.getUrl(), this.client.getVersion(), + requestId, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().getBlobContainerItems(), res.getValue().getNextMarker(), res.getDeserializedHeaders()); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @param requestId Provides a 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 StorageErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an enumeration of containers along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public PagedResponse listBlobContainersSegmentNextNoCustomHeadersSinglePage(String nextLink, + String requestId, Context context) { + final String accept = "application/xml"; + Response res = service.listBlobContainersSegmentNextNoCustomHeadersSync(nextLink, + this.client.getUrl(), this.client.getVersion(), requestId, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().getBlobContainerItems(), res.getValue().getNextMarker(), null); + } +} diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/implementation/models/BlobSignedIdentifierWrapper.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/implementation/models/BlobSignedIdentifierWrapper.java new file mode 100644 index 000000000000..195a3487dabf --- /dev/null +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/implementation/models/BlobSignedIdentifierWrapper.java @@ -0,0 +1,86 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.storage.blob.implementation.models; + +import com.azure.storage.blob.models.BlobSignedIdentifier; +import java.util.List; + +import com.azure.core.v2.util.CoreUtils; +import io.clientcore.core.serialization.xml.XmlReader; +import io.clientcore.core.serialization.xml.XmlSerializable; +import io.clientcore.core.serialization.xml.XmlToken; +import io.clientcore.core.serialization.xml.XmlWriter; +import java.util.ArrayList; +import javax.xml.namespace.QName; +import javax.xml.stream.XMLStreamException; + +/** + * A wrapper around List<BlobSignedIdentifier> which provides top-level metadata for serialization. + */ +public final class BlobSignedIdentifierWrapper implements XmlSerializable { + private final List signedIdentifiers; + + /** + * Creates an instance of BlobSignedIdentifierWrapper. + * + * @param signedIdentifiers the list. + */ + public BlobSignedIdentifierWrapper(List signedIdentifiers) { + this.signedIdentifiers = signedIdentifiers; + } + + /** + * Get the List<BlobSignedIdentifier> contained in this wrapper. + * + * @return the List<BlobSignedIdentifier>. + */ + public List items() { + return signedIdentifiers; + } + + @Override + public XmlWriter toXml(XmlWriter xmlWriter) throws XMLStreamException { + return toXml(xmlWriter, null); + } + + @Override + public XmlWriter toXml(XmlWriter xmlWriter, String rootElementName) throws XMLStreamException { + rootElementName = CoreUtils.isNullOrEmpty(rootElementName) ? "SignedIdentifiers" : rootElementName; + xmlWriter.writeStartElement(rootElementName); + if (signedIdentifiers != null) { + for (BlobSignedIdentifier element : signedIdentifiers) { + xmlWriter.writeXml(element, "SignedIdentifier"); + } + } + return xmlWriter.writeEndElement(); + } + + public static BlobSignedIdentifierWrapper fromXml(XmlReader xmlReader) throws XMLStreamException { + return fromXml(xmlReader, null); + } + + public static BlobSignedIdentifierWrapper fromXml(XmlReader xmlReader, String rootElementName) + throws XMLStreamException { + rootElementName = CoreUtils.isNullOrEmpty(rootElementName) ? "SignedIdentifiers" : rootElementName; + return xmlReader.readObject(rootElementName, reader -> { + List items = null; + + while (reader.nextElement() != XmlToken.END_ELEMENT) { + QName elementName = reader.getElementName(); + + if ("SignedIdentifier".equals(elementName.getLocalPart())) { + if (items == null) { + items = new ArrayList<>(); + } + + items.add(BlobSignedIdentifier.fromXml(reader)); + } else { + reader.nextElement(); + } + } + return new BlobSignedIdentifierWrapper(items); + }); + } +} diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/implementation/package-info.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/implementation/package-info.java new file mode 100644 index 000000000000..639d482c5fda --- /dev/null +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/implementation/package-info.java @@ -0,0 +1,9 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +/** + * Package containing the implementations for AzureBlobStorage. + * null. + */ +package com.azure.storage.blob.implementation; diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/AccessTier.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/AccessTier.java new file mode 100644 index 000000000000..2dbb4c9bcb4d --- /dev/null +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/AccessTier.java @@ -0,0 +1,134 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.storage.blob.models; + +import io.clientcore.core.util.ExpandableEnum; +import java.util.Map; +import java.util.concurrent.ConcurrentHashMap; + +/** + * Defines values for AccessTier. + */ +public final class AccessTier implements ExpandableEnum { + private static final Map VALUES = new ConcurrentHashMap<>(); + + /** + * Static value P4 for AccessTier. + */ + public static final AccessTier P4 = fromString("P4"); + + /** + * Static value P6 for AccessTier. + */ + public static final AccessTier P6 = fromString("P6"); + + /** + * Static value P10 for AccessTier. + */ + public static final AccessTier P10 = fromString("P10"); + + /** + * Static value P15 for AccessTier. + */ + public static final AccessTier P15 = fromString("P15"); + + /** + * Static value P20 for AccessTier. + */ + public static final AccessTier P20 = fromString("P20"); + + /** + * Static value P30 for AccessTier. + */ + public static final AccessTier P30 = fromString("P30"); + + /** + * Static value P40 for AccessTier. + */ + public static final AccessTier P40 = fromString("P40"); + + /** + * Static value P50 for AccessTier. + */ + public static final AccessTier P50 = fromString("P50"); + + /** + * Static value P60 for AccessTier. + */ + public static final AccessTier P60 = fromString("P60"); + + /** + * Static value P70 for AccessTier. + */ + public static final AccessTier P70 = fromString("P70"); + + /** + * Static value P80 for AccessTier. + */ + public static final AccessTier P80 = fromString("P80"); + + /** + * Static value Hot for AccessTier. + */ + public static final AccessTier HOT = fromString("Hot"); + + /** + * Static value Cool for AccessTier. + */ + public static final AccessTier COOL = fromString("Cool"); + + /** + * Static value Archive for AccessTier. + */ + public static final AccessTier ARCHIVE = fromString("Archive"); + + /** + * Static value Premium for AccessTier. + */ + public static final AccessTier PREMIUM = fromString("Premium"); + + /** + * Static value Cold for AccessTier. + */ + public static final AccessTier COLD = fromString("Cold"); + + private final String name; + + private AccessTier(String name) { + this.name = name; + } + + /** + * Creates or finds a AccessTier. + * + * @param name a name to look for. + * @return the corresponding AccessTier. + */ + public static AccessTier fromString(String name) { + if (name == null) { + return null; + } + AccessTier value = VALUES.get(name); + if (value != null) { + return value; + } + return VALUES.computeIfAbsent(name, key -> new AccessTier(key)); + } + + /** + * Gets the value of the AccessTier instance. + * + * @return the value of the AccessTier instance. + */ + @Override + public String getValue() { + return this.name; + } + + @Override + public String toString() { + return name; + } +} diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/AccountKind.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/AccountKind.java new file mode 100644 index 000000000000..4223a28e59a0 --- /dev/null +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/AccountKind.java @@ -0,0 +1,71 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.storage.blob.models; + +/** + * Defines values for AccountKind. + */ +public enum AccountKind { + /** + * Enum value Storage. + */ + STORAGE("Storage"), + + /** + * Enum value BlobStorage. + */ + BLOB_STORAGE("BlobStorage"), + + /** + * Enum value StorageV2. + */ + STORAGE_V2("StorageV2"), + + /** + * Enum value FileStorage. + */ + FILE_STORAGE("FileStorage"), + + /** + * Enum value BlockBlobStorage. + */ + BLOCK_BLOB_STORAGE("BlockBlobStorage"); + + /** + * The actual serialized value for a AccountKind instance. + */ + private final String value; + + AccountKind(String value) { + this.value = value; + } + + /** + * Parses a serialized value to a AccountKind instance. + * + * @param value the serialized value to parse. + * @return the parsed AccountKind object, or null if unable to parse. + */ + public static AccountKind fromString(String value) { + if (value == null) { + return null; + } + AccountKind[] items = AccountKind.values(); + for (AccountKind 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-v2/src/main/java/com/azure/storage/blob/models/AppendBlobsAppendBlockFromUrlHeaders.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/AppendBlobsAppendBlockFromUrlHeaders.java new file mode 100644 index 000000000000..cf68f538c991 --- /dev/null +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/AppendBlobsAppendBlockFromUrlHeaders.java @@ -0,0 +1,390 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.storage.blob.models; + +import com.azure.core.v2.annotation.Fluent; +import com.azure.core.v2.util.CoreUtils; +import io.clientcore.core.http.models.DateTimeRfc1123; +import io.clientcore.core.http.models.HttpHeaderName; +import io.clientcore.core.http.models.HttpHeaders; + +import java.time.OffsetDateTime; +import java.util.Base64; + +/** + * The AppendBlobsAppendBlockFromUrlHeaders model. + */ +@Fluent +public final class AppendBlobsAppendBlockFromUrlHeaders { + /* + * The x-ms-version property. + */ + private String xMsVersion; + + /* + * The ETag property. + */ + private String eTag; + + /* + * The x-ms-content-crc64 property. + */ + private byte[] xMsContentCrc64; + + /* + * The x-ms-blob-committed-block-count property. + */ + private Integer xMsBlobCommittedBlockCount; + + /* + * The Last-Modified property. + */ + private DateTimeRfc1123 lastModified; + + /* + * The x-ms-encryption-key-sha256 property. + */ + private String xMsEncryptionKeySha256; + + /* + * The x-ms-request-id property. + */ + private String xMsRequestId; + + /* + * The x-ms-request-server-encrypted property. + */ + private Boolean xMsRequestServerEncrypted; + + /* + * The Date property. + */ + private DateTimeRfc1123 date; + + /* + * The Content-MD5 property. + */ + private byte[] contentMD5; + + /* + * The x-ms-blob-append-offset property. + */ + private String xMsBlobAppendOffset; + + /* + * The x-ms-encryption-scope property. + */ + private String xMsEncryptionScope; + + private static final HttpHeaderName X_MS_VERSION = HttpHeaderName.fromString("x-ms-version"); + + private static final HttpHeaderName X_MS_CONTENT_CRC64 = HttpHeaderName.fromString("x-ms-content-crc64"); + + private static final HttpHeaderName X_MS_BLOB_COMMITTED_BLOCK_COUNT + = HttpHeaderName.fromString("x-ms-blob-committed-block-count"); + + private static final HttpHeaderName X_MS_ENCRYPTION_KEY_SHA256 + = HttpHeaderName.fromString("x-ms-encryption-key-sha256"); + + private static final HttpHeaderName X_MS_REQUEST_SERVER_ENCRYPTED + = HttpHeaderName.fromString("x-ms-request-server-encrypted"); + + private static final HttpHeaderName X_MS_BLOB_APPEND_OFFSET = HttpHeaderName.fromString("x-ms-blob-append-offset"); + + private static final HttpHeaderName X_MS_ENCRYPTION_SCOPE = HttpHeaderName.fromString("x-ms-encryption-scope"); + + // HttpHeaders containing the raw property values. + /** + * Creates an instance of AppendBlobsAppendBlockFromUrlHeaders class. + * + * @param rawHeaders The raw HttpHeaders that will be used to create the property values. + */ + public AppendBlobsAppendBlockFromUrlHeaders(HttpHeaders rawHeaders) { + this.xMsVersion = rawHeaders.getValue(X_MS_VERSION); + this.eTag = rawHeaders.getValue(HttpHeaderName.ETAG); + String xMsContentCrc64 = rawHeaders.getValue(X_MS_CONTENT_CRC64); + if (xMsContentCrc64 != null) { + this.xMsContentCrc64 = Base64.getDecoder().decode(xMsContentCrc64); + } + String xMsBlobCommittedBlockCount = rawHeaders.getValue(X_MS_BLOB_COMMITTED_BLOCK_COUNT); + if (xMsBlobCommittedBlockCount != null) { + this.xMsBlobCommittedBlockCount = Integer.parseInt(xMsBlobCommittedBlockCount); + } + String lastModified = rawHeaders.getValue(HttpHeaderName.LAST_MODIFIED); + if (lastModified != null) { + this.lastModified = new DateTimeRfc1123(lastModified); + } + this.xMsEncryptionKeySha256 = rawHeaders.getValue(X_MS_ENCRYPTION_KEY_SHA256); + this.xMsRequestId = rawHeaders.getValue(HttpHeaderName.fromString("x-ms-request-id")); + String xMsRequestServerEncrypted = rawHeaders.getValue(X_MS_REQUEST_SERVER_ENCRYPTED); + if (xMsRequestServerEncrypted != null) { + this.xMsRequestServerEncrypted = Boolean.parseBoolean(xMsRequestServerEncrypted); + } + String date = rawHeaders.getValue(HttpHeaderName.DATE); + if (date != null) { + this.date = new DateTimeRfc1123(date); + } + String contentMD5 = rawHeaders.getValue(HttpHeaderName.CONTENT_MD5); + if (contentMD5 != null) { + this.contentMD5 = Base64.getDecoder().decode(contentMD5); + } + this.xMsBlobAppendOffset = rawHeaders.getValue(X_MS_BLOB_APPEND_OFFSET); + this.xMsEncryptionScope = rawHeaders.getValue(X_MS_ENCRYPTION_SCOPE); + } + + /** + * 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 AppendBlobsAppendBlockFromUrlHeaders object itself. + */ + public AppendBlobsAppendBlockFromUrlHeaders 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 AppendBlobsAppendBlockFromUrlHeaders object itself. + */ + public AppendBlobsAppendBlockFromUrlHeaders setETag(String eTag) { + this.eTag = eTag; + return this; + } + + /** + * Get the xMsContentCrc64 property: The x-ms-content-crc64 property. + * + * @return the xMsContentCrc64 value. + */ + 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 AppendBlobsAppendBlockFromUrlHeaders object itself. + */ + public AppendBlobsAppendBlockFromUrlHeaders setXMsContentCrc64(byte[] xMsContentCrc64) { + this.xMsContentCrc64 = CoreUtils.clone(xMsContentCrc64); + return this; + } + + /** + * Get the xMsBlobCommittedBlockCount property: The x-ms-blob-committed-block-count property. + * + * @return the xMsBlobCommittedBlockCount value. + */ + 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. + */ + public AppendBlobsAppendBlockFromUrlHeaders setXMsBlobCommittedBlockCount(Integer xMsBlobCommittedBlockCount) { + this.xMsBlobCommittedBlockCount = xMsBlobCommittedBlockCount; + 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 AppendBlobsAppendBlockFromUrlHeaders object itself. + */ + public AppendBlobsAppendBlockFromUrlHeaders setLastModified(OffsetDateTime lastModified) { + if (lastModified == null) { + this.lastModified = null; + } else { + this.lastModified = new DateTimeRfc1123(lastModified); + } + return this; + } + + /** + * Get the xMsEncryptionKeySha256 property: The x-ms-encryption-key-sha256 property. + * + * @return the xMsEncryptionKeySha256 value. + */ + 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. + */ + public AppendBlobsAppendBlockFromUrlHeaders setXMsEncryptionKeySha256(String xMsEncryptionKeySha256) { + this.xMsEncryptionKeySha256 = xMsEncryptionKeySha256; + 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 AppendBlobsAppendBlockFromUrlHeaders object itself. + */ + public AppendBlobsAppendBlockFromUrlHeaders setXMsRequestId(String xMsRequestId) { + this.xMsRequestId = xMsRequestId; + return this; + } + + /** + * Get the xMsRequestServerEncrypted property: The x-ms-request-server-encrypted property. + * + * @return the xMsRequestServerEncrypted value. + */ + 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 AppendBlobsAppendBlockFromUrlHeaders object itself. + */ + public AppendBlobsAppendBlockFromUrlHeaders setXMsRequestServerEncrypted(Boolean xMsRequestServerEncrypted) { + this.xMsRequestServerEncrypted = xMsRequestServerEncrypted; + return this; + } + + /** + * Get the date property: The Date property. + * + * @return the date value. + */ + 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 AppendBlobsAppendBlockFromUrlHeaders object itself. + */ + public AppendBlobsAppendBlockFromUrlHeaders setDate(OffsetDateTime date) { + if (date == null) { + this.date = null; + } else { + this.date = new DateTimeRfc1123(date); + } + return this; + } + + /** + * Get the contentMD5 property: The Content-MD5 property. + * + * @return the contentMD5 value. + */ + 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 AppendBlobsAppendBlockFromUrlHeaders object itself. + */ + public AppendBlobsAppendBlockFromUrlHeaders setContentMD5(byte[] contentMD5) { + this.contentMD5 = CoreUtils.clone(contentMD5); + return this; + } + + /** + * Get the xMsBlobAppendOffset property: The x-ms-blob-append-offset property. + * + * @return the xMsBlobAppendOffset value. + */ + 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. + */ + public AppendBlobsAppendBlockFromUrlHeaders setXMsBlobAppendOffset(String xMsBlobAppendOffset) { + this.xMsBlobAppendOffset = xMsBlobAppendOffset; + return this; + } + + /** + * Get the xMsEncryptionScope property: The x-ms-encryption-scope property. + * + * @return the xMsEncryptionScope value. + */ + 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 AppendBlobsAppendBlockFromUrlHeaders object itself. + */ + public AppendBlobsAppendBlockFromUrlHeaders setXMsEncryptionScope(String xMsEncryptionScope) { + this.xMsEncryptionScope = xMsEncryptionScope; + return this; + } +} diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/AppendBlobsAppendBlockHeaders.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/AppendBlobsAppendBlockHeaders.java new file mode 100644 index 000000000000..644f08a85d2d --- /dev/null +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/AppendBlobsAppendBlockHeaders.java @@ -0,0 +1,444 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.storage.blob.models; + +import com.azure.core.v2.annotation.Fluent; +import com.azure.core.v2.util.CoreUtils; +import io.clientcore.core.http.models.DateTimeRfc1123; +import io.clientcore.core.http.models.HttpHeaderName; +import io.clientcore.core.http.models.HttpHeaders; + +import java.time.OffsetDateTime; +import java.util.Base64; + +/** + * The AppendBlobsAppendBlockHeaders model. + */ +@Fluent +public final class AppendBlobsAppendBlockHeaders { + /* + * The x-ms-version property. + */ + private String xMsVersion; + + /* + * The x-ms-content-crc64 property. + */ + private byte[] xMsContentCrc64; + + /* + * The x-ms-blob-committed-block-count property. + */ + private Integer xMsBlobCommittedBlockCount; + + /* + * The Last-Modified property. + */ + private DateTimeRfc1123 lastModified; + + /* + * The x-ms-encryption-key-sha256 property. + */ + private String xMsEncryptionKeySha256; + + /* + * The x-ms-structured-body property. + */ + private String xMsStructuredBody; + + /* + * The x-ms-request-server-encrypted property. + */ + private Boolean xMsRequestServerEncrypted; + + /* + * The Date property. + */ + private DateTimeRfc1123 date; + + /* + * The Content-MD5 property. + */ + private byte[] contentMD5; + + /* + * The ETag property. + */ + private String eTag; + + /* + * The x-ms-request-id property. + */ + private String xMsRequestId; + + /* + * The x-ms-client-request-id property. + */ + private String xMsClientRequestId; + + /* + * The x-ms-blob-append-offset property. + */ + private String xMsBlobAppendOffset; + + /* + * The x-ms-encryption-scope property. + */ + private String xMsEncryptionScope; + + private static final HttpHeaderName X_MS_VERSION = HttpHeaderName.fromString("x-ms-version"); + + private static final HttpHeaderName X_MS_CONTENT_CRC64 = HttpHeaderName.fromString("x-ms-content-crc64"); + + private static final HttpHeaderName X_MS_BLOB_COMMITTED_BLOCK_COUNT + = HttpHeaderName.fromString("x-ms-blob-committed-block-count"); + + private static final HttpHeaderName X_MS_ENCRYPTION_KEY_SHA256 + = HttpHeaderName.fromString("x-ms-encryption-key-sha256"); + + private static final HttpHeaderName X_MS_STRUCTURED_BODY = HttpHeaderName.fromString("x-ms-structured-body"); + + private static final HttpHeaderName X_MS_REQUEST_SERVER_ENCRYPTED + = HttpHeaderName.fromString("x-ms-request-server-encrypted"); + + private static final HttpHeaderName X_MS_BLOB_APPEND_OFFSET = HttpHeaderName.fromString("x-ms-blob-append-offset"); + + private static final HttpHeaderName X_MS_ENCRYPTION_SCOPE = HttpHeaderName.fromString("x-ms-encryption-scope"); + + // HttpHeaders containing the raw property values. + /** + * Creates an instance of AppendBlobsAppendBlockHeaders class. + * + * @param rawHeaders The raw HttpHeaders that will be used to create the property values. + */ + public AppendBlobsAppendBlockHeaders(HttpHeaders rawHeaders) { + this.xMsVersion = rawHeaders.getValue(X_MS_VERSION); + String xMsContentCrc64 = rawHeaders.getValue(X_MS_CONTENT_CRC64); + if (xMsContentCrc64 != null) { + this.xMsContentCrc64 = Base64.getDecoder().decode(xMsContentCrc64); + } + String xMsBlobCommittedBlockCount = rawHeaders.getValue(X_MS_BLOB_COMMITTED_BLOCK_COUNT); + if (xMsBlobCommittedBlockCount != null) { + this.xMsBlobCommittedBlockCount = Integer.parseInt(xMsBlobCommittedBlockCount); + } + String lastModified = rawHeaders.getValue(HttpHeaderName.LAST_MODIFIED); + if (lastModified != null) { + this.lastModified = new DateTimeRfc1123(lastModified); + } + this.xMsEncryptionKeySha256 = rawHeaders.getValue(X_MS_ENCRYPTION_KEY_SHA256); + this.xMsStructuredBody = rawHeaders.getValue(X_MS_STRUCTURED_BODY); + String xMsRequestServerEncrypted = rawHeaders.getValue(X_MS_REQUEST_SERVER_ENCRYPTED); + if (xMsRequestServerEncrypted != null) { + this.xMsRequestServerEncrypted = Boolean.parseBoolean(xMsRequestServerEncrypted); + } + String date = rawHeaders.getValue(HttpHeaderName.DATE); + if (date != null) { + this.date = new DateTimeRfc1123(date); + } + String contentMD5 = rawHeaders.getValue(HttpHeaderName.CONTENT_MD5); + if (contentMD5 != null) { + this.contentMD5 = Base64.getDecoder().decode(contentMD5); + } + this.eTag = rawHeaders.getValue(HttpHeaderName.ETAG); + this.xMsRequestId = rawHeaders.getValue(HttpHeaderName.fromString("x-ms-request-id")); + this.xMsClientRequestId = rawHeaders.getValue(HttpHeaderName.fromString("x-ms-client-request-id")); + this.xMsBlobAppendOffset = rawHeaders.getValue(X_MS_BLOB_APPEND_OFFSET); + this.xMsEncryptionScope = rawHeaders.getValue(X_MS_ENCRYPTION_SCOPE); + } + + /** + * 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 AppendBlobsAppendBlockHeaders object itself. + */ + public AppendBlobsAppendBlockHeaders setXMsVersion(String xMsVersion) { + this.xMsVersion = xMsVersion; + return this; + } + + /** + * Get the xMsContentCrc64 property: The x-ms-content-crc64 property. + * + * @return the xMsContentCrc64 value. + */ + 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 AppendBlobsAppendBlockHeaders object itself. + */ + public AppendBlobsAppendBlockHeaders setXMsContentCrc64(byte[] xMsContentCrc64) { + this.xMsContentCrc64 = CoreUtils.clone(xMsContentCrc64); + return this; + } + + /** + * Get the xMsBlobCommittedBlockCount property: The x-ms-blob-committed-block-count property. + * + * @return the xMsBlobCommittedBlockCount value. + */ + 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. + */ + public AppendBlobsAppendBlockHeaders setXMsBlobCommittedBlockCount(Integer xMsBlobCommittedBlockCount) { + this.xMsBlobCommittedBlockCount = xMsBlobCommittedBlockCount; + 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 AppendBlobsAppendBlockHeaders object itself. + */ + public AppendBlobsAppendBlockHeaders setLastModified(OffsetDateTime lastModified) { + if (lastModified == null) { + this.lastModified = null; + } else { + this.lastModified = new DateTimeRfc1123(lastModified); + } + return this; + } + + /** + * Get the xMsEncryptionKeySha256 property: The x-ms-encryption-key-sha256 property. + * + * @return the xMsEncryptionKeySha256 value. + */ + 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. + */ + public AppendBlobsAppendBlockHeaders setXMsEncryptionKeySha256(String xMsEncryptionKeySha256) { + this.xMsEncryptionKeySha256 = xMsEncryptionKeySha256; + return this; + } + + /** + * Get the xMsStructuredBody property: The x-ms-structured-body property. + * + * @return the xMsStructuredBody value. + */ + public String getXMsStructuredBody() { + return this.xMsStructuredBody; + } + + /** + * Set the xMsStructuredBody property: The x-ms-structured-body property. + * + * @param xMsStructuredBody the xMsStructuredBody value to set. + * @return the AppendBlobsAppendBlockHeaders object itself. + */ + public AppendBlobsAppendBlockHeaders setXMsStructuredBody(String xMsStructuredBody) { + this.xMsStructuredBody = xMsStructuredBody; + return this; + } + + /** + * Get the xMsRequestServerEncrypted property: The x-ms-request-server-encrypted property. + * + * @return the xMsRequestServerEncrypted value. + */ + 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. + */ + public AppendBlobsAppendBlockHeaders setXMsRequestServerEncrypted(Boolean xMsRequestServerEncrypted) { + this.xMsRequestServerEncrypted = xMsRequestServerEncrypted; + return this; + } + + /** + * Get the date property: The Date property. + * + * @return the date value. + */ + 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 AppendBlobsAppendBlockHeaders object itself. + */ + public AppendBlobsAppendBlockHeaders setDate(OffsetDateTime date) { + if (date == null) { + this.date = null; + } else { + this.date = new DateTimeRfc1123(date); + } + return this; + } + + /** + * Get the contentMD5 property: The Content-MD5 property. + * + * @return the contentMD5 value. + */ + 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 AppendBlobsAppendBlockHeaders object itself. + */ + public AppendBlobsAppendBlockHeaders setContentMD5(byte[] contentMD5) { + this.contentMD5 = CoreUtils.clone(contentMD5); + 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 AppendBlobsAppendBlockHeaders object itself. + */ + public AppendBlobsAppendBlockHeaders setETag(String eTag) { + this.eTag = eTag; + 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 AppendBlobsAppendBlockHeaders object itself. + */ + public AppendBlobsAppendBlockHeaders 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 AppendBlobsAppendBlockHeaders object itself. + */ + public AppendBlobsAppendBlockHeaders setXMsClientRequestId(String xMsClientRequestId) { + this.xMsClientRequestId = xMsClientRequestId; + return this; + } + + /** + * Get the xMsBlobAppendOffset property: The x-ms-blob-append-offset property. + * + * @return the xMsBlobAppendOffset value. + */ + 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. + */ + public AppendBlobsAppendBlockHeaders setXMsBlobAppendOffset(String xMsBlobAppendOffset) { + this.xMsBlobAppendOffset = xMsBlobAppendOffset; + return this; + } + + /** + * Get the xMsEncryptionScope property: The x-ms-encryption-scope property. + * + * @return the xMsEncryptionScope value. + */ + 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 AppendBlobsAppendBlockHeaders object itself. + */ + public AppendBlobsAppendBlockHeaders setXMsEncryptionScope(String xMsEncryptionScope) { + this.xMsEncryptionScope = xMsEncryptionScope; + return this; + } +} diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/AppendBlobsCreateHeaders.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/AppendBlobsCreateHeaders.java new file mode 100644 index 000000000000..d2aad9c6bb14 --- /dev/null +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/AppendBlobsCreateHeaders.java @@ -0,0 +1,353 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.storage.blob.models; + +import com.azure.core.v2.annotation.Fluent; +import com.azure.core.v2.util.CoreUtils; +import io.clientcore.core.http.models.DateTimeRfc1123; +import io.clientcore.core.http.models.HttpHeaderName; +import io.clientcore.core.http.models.HttpHeaders; + +import java.time.OffsetDateTime; +import java.util.Base64; + +/** + * The AppendBlobsCreateHeaders model. + */ +@Fluent +public final class AppendBlobsCreateHeaders { + /* + * The x-ms-version property. + */ + private String xMsVersion; + + /* + * The ETag property. + */ + private String eTag; + + /* + * The Last-Modified property. + */ + private DateTimeRfc1123 lastModified; + + /* + * The x-ms-version-id property. + */ + private String xMsVersionId; + + /* + * The x-ms-encryption-key-sha256 property. + */ + private String xMsEncryptionKeySha256; + + /* + * The x-ms-request-id property. + */ + private String xMsRequestId; + + /* + * The x-ms-request-server-encrypted property. + */ + private Boolean xMsRequestServerEncrypted; + + /* + * The x-ms-client-request-id property. + */ + private String xMsClientRequestId; + + /* + * The Date property. + */ + private DateTimeRfc1123 date; + + /* + * The Content-MD5 property. + */ + private byte[] contentMD5; + + /* + * The x-ms-encryption-scope property. + */ + private String xMsEncryptionScope; + + private static final HttpHeaderName X_MS_VERSION = HttpHeaderName.fromString("x-ms-version"); + + private static final HttpHeaderName X_MS_VERSION_ID = HttpHeaderName.fromString("x-ms-version-id"); + + private static final HttpHeaderName X_MS_ENCRYPTION_KEY_SHA256 + = HttpHeaderName.fromString("x-ms-encryption-key-sha256"); + + private static final HttpHeaderName X_MS_REQUEST_SERVER_ENCRYPTED + = HttpHeaderName.fromString("x-ms-request-server-encrypted"); + + private static final HttpHeaderName X_MS_ENCRYPTION_SCOPE = HttpHeaderName.fromString("x-ms-encryption-scope"); + + // HttpHeaders containing the raw property values. + /** + * Creates an instance of AppendBlobsCreateHeaders class. + * + * @param rawHeaders The raw HttpHeaders that will be used to create the property values. + */ + public AppendBlobsCreateHeaders(HttpHeaders rawHeaders) { + this.xMsVersion = rawHeaders.getValue(X_MS_VERSION); + this.eTag = rawHeaders.getValue(HttpHeaderName.ETAG); + String lastModified = rawHeaders.getValue(HttpHeaderName.LAST_MODIFIED); + if (lastModified != null) { + this.lastModified = new DateTimeRfc1123(lastModified); + } + this.xMsVersionId = rawHeaders.getValue(X_MS_VERSION_ID); + this.xMsEncryptionKeySha256 = rawHeaders.getValue(X_MS_ENCRYPTION_KEY_SHA256); + this.xMsRequestId = rawHeaders.getValue(HttpHeaderName.fromString("x-ms-request-id")); + String xMsRequestServerEncrypted = rawHeaders.getValue(X_MS_REQUEST_SERVER_ENCRYPTED); + if (xMsRequestServerEncrypted != null) { + this.xMsRequestServerEncrypted = Boolean.parseBoolean(xMsRequestServerEncrypted); + } + this.xMsClientRequestId = rawHeaders.getValue(HttpHeaderName.fromString("x-ms-client-request-id")); + String date = rawHeaders.getValue(HttpHeaderName.DATE); + if (date != null) { + this.date = new DateTimeRfc1123(date); + } + String contentMD5 = rawHeaders.getValue(HttpHeaderName.CONTENT_MD5); + if (contentMD5 != null) { + this.contentMD5 = Base64.getDecoder().decode(contentMD5); + } + this.xMsEncryptionScope = rawHeaders.getValue(X_MS_ENCRYPTION_SCOPE); + } + + /** + * 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 AppendBlobsCreateHeaders object itself. + */ + public AppendBlobsCreateHeaders 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 AppendBlobsCreateHeaders object itself. + */ + public AppendBlobsCreateHeaders 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 AppendBlobsCreateHeaders object itself. + */ + public AppendBlobsCreateHeaders setLastModified(OffsetDateTime lastModified) { + if (lastModified == null) { + this.lastModified = null; + } else { + this.lastModified = new DateTimeRfc1123(lastModified); + } + return this; + } + + /** + * Get the xMsVersionId property: The x-ms-version-id property. + * + * @return the xMsVersionId value. + */ + 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 AppendBlobsCreateHeaders object itself. + */ + public AppendBlobsCreateHeaders setXMsVersionId(String xMsVersionId) { + this.xMsVersionId = xMsVersionId; + return this; + } + + /** + * Get the xMsEncryptionKeySha256 property: The x-ms-encryption-key-sha256 property. + * + * @return the xMsEncryptionKeySha256 value. + */ + 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 AppendBlobsCreateHeaders object itself. + */ + public AppendBlobsCreateHeaders setXMsEncryptionKeySha256(String xMsEncryptionKeySha256) { + this.xMsEncryptionKeySha256 = xMsEncryptionKeySha256; + 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 AppendBlobsCreateHeaders object itself. + */ + public AppendBlobsCreateHeaders setXMsRequestId(String xMsRequestId) { + this.xMsRequestId = xMsRequestId; + return this; + } + + /** + * Get the xMsRequestServerEncrypted property: The x-ms-request-server-encrypted property. + * + * @return the xMsRequestServerEncrypted value. + */ + 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. + */ + public AppendBlobsCreateHeaders setXMsRequestServerEncrypted(Boolean xMsRequestServerEncrypted) { + this.xMsRequestServerEncrypted = xMsRequestServerEncrypted; + 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 AppendBlobsCreateHeaders object itself. + */ + public AppendBlobsCreateHeaders setXMsClientRequestId(String xMsClientRequestId) { + this.xMsClientRequestId = xMsClientRequestId; + return this; + } + + /** + * Get the date property: The Date property. + * + * @return the date value. + */ + 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 AppendBlobsCreateHeaders object itself. + */ + public AppendBlobsCreateHeaders setDate(OffsetDateTime date) { + if (date == null) { + this.date = null; + } else { + this.date = new DateTimeRfc1123(date); + } + return this; + } + + /** + * Get the contentMD5 property: The Content-MD5 property. + * + * @return the contentMD5 value. + */ + 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. + */ + public AppendBlobsCreateHeaders setContentMD5(byte[] contentMD5) { + this.contentMD5 = CoreUtils.clone(contentMD5); + return this; + } + + /** + * Get the xMsEncryptionScope property: The x-ms-encryption-scope property. + * + * @return the xMsEncryptionScope value. + */ + 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 AppendBlobsCreateHeaders object itself. + */ + public AppendBlobsCreateHeaders setXMsEncryptionScope(String xMsEncryptionScope) { + this.xMsEncryptionScope = xMsEncryptionScope; + return this; + } +} diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/AppendBlobsSealHeaders.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/AppendBlobsSealHeaders.java new file mode 100644 index 000000000000..aa8f2ca4af2f --- /dev/null +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/AppendBlobsSealHeaders.java @@ -0,0 +1,236 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.storage.blob.models; + +import com.azure.core.v2.annotation.Fluent; +import io.clientcore.core.http.models.DateTimeRfc1123; +import io.clientcore.core.http.models.HttpHeaderName; +import io.clientcore.core.http.models.HttpHeaders; + +import java.time.OffsetDateTime; + +/** + * The AppendBlobsSealHeaders model. + */ +@Fluent +public final class AppendBlobsSealHeaders { + /* + * The x-ms-version property. + */ + private String xMsVersion; + + /* + * The ETag property. + */ + private String eTag; + + /* + * The x-ms-blob-sealed property. + */ + private Boolean xMsBlobSealed; + + /* + * 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 date; + + private static final HttpHeaderName X_MS_VERSION = HttpHeaderName.fromString("x-ms-version"); + + private static final HttpHeaderName X_MS_BLOB_SEALED = HttpHeaderName.fromString("x-ms-blob-sealed"); + + // HttpHeaders containing the raw property values. + /** + * Creates an instance of AppendBlobsSealHeaders class. + * + * @param rawHeaders The raw HttpHeaders that will be used to create the property values. + */ + public AppendBlobsSealHeaders(HttpHeaders rawHeaders) { + this.xMsVersion = rawHeaders.getValue(X_MS_VERSION); + this.eTag = rawHeaders.getValue(HttpHeaderName.ETAG); + String xMsBlobSealed = rawHeaders.getValue(X_MS_BLOB_SEALED); + if (xMsBlobSealed != null) { + this.xMsBlobSealed = Boolean.parseBoolean(xMsBlobSealed); + } + String lastModified = rawHeaders.getValue(HttpHeaderName.LAST_MODIFIED); + if (lastModified != null) { + this.lastModified = new DateTimeRfc1123(lastModified); + } + this.xMsRequestId = rawHeaders.getValue(HttpHeaderName.fromString("x-ms-request-id")); + this.xMsClientRequestId = rawHeaders.getValue(HttpHeaderName.fromString("x-ms-client-request-id")); + String date = rawHeaders.getValue(HttpHeaderName.DATE); + if (date != null) { + this.date = new DateTimeRfc1123(date); + } + } + + /** + * 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 AppendBlobsSealHeaders object itself. + */ + public AppendBlobsSealHeaders 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 AppendBlobsSealHeaders object itself. + */ + public AppendBlobsSealHeaders setETag(String eTag) { + this.eTag = eTag; + return this; + } + + /** + * Get the xMsBlobSealed property: The x-ms-blob-sealed property. + * + * @return the xMsBlobSealed value. + */ + 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 AppendBlobsSealHeaders object itself. + */ + public AppendBlobsSealHeaders setXMsBlobSealed(Boolean xMsBlobSealed) { + this.xMsBlobSealed = xMsBlobSealed; + 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 AppendBlobsSealHeaders object itself. + */ + public AppendBlobsSealHeaders 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 AppendBlobsSealHeaders object itself. + */ + public AppendBlobsSealHeaders 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 AppendBlobsSealHeaders object itself. + */ + public AppendBlobsSealHeaders setXMsClientRequestId(String xMsClientRequestId) { + this.xMsClientRequestId = xMsClientRequestId; + return this; + } + + /** + * Get the date property: The Date property. + * + * @return the date value. + */ + 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 AppendBlobsSealHeaders object itself. + */ + public AppendBlobsSealHeaders 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-v2/src/main/java/com/azure/storage/blob/models/ArchiveStatus.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/ArchiveStatus.java new file mode 100644 index 000000000000..fb1bda118538 --- /dev/null +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/ArchiveStatus.java @@ -0,0 +1,69 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.storage.blob.models; + +import io.clientcore.core.util.ExpandableEnum; +import java.util.Map; +import java.util.concurrent.ConcurrentHashMap; + +/** + * Defines values for ArchiveStatus. + */ +public final class ArchiveStatus implements ExpandableEnum { + private static final Map VALUES = new ConcurrentHashMap<>(); + + /** + * Static value rehydrate-pending-to-hot for ArchiveStatus. + */ + public static final ArchiveStatus REHYDRATE_PENDING_TO_HOT = fromString("rehydrate-pending-to-hot"); + + /** + * Static value rehydrate-pending-to-cool for ArchiveStatus. + */ + public static final ArchiveStatus REHYDRATE_PENDING_TO_COOL = fromString("rehydrate-pending-to-cool"); + + /** + * Static value rehydrate-pending-to-cold for ArchiveStatus. + */ + public static final ArchiveStatus REHYDRATE_PENDING_TO_COLD = fromString("rehydrate-pending-to-cold"); + + private final String name; + + private ArchiveStatus(String name) { + this.name = name; + } + + /** + * Creates or finds a ArchiveStatus. + * + * @param name a name to look for. + * @return the corresponding ArchiveStatus. + */ + public static ArchiveStatus fromString(String name) { + if (name == null) { + return null; + } + ArchiveStatus value = VALUES.get(name); + if (value != null) { + return value; + } + return VALUES.computeIfAbsent(name, key -> new ArchiveStatus(key)); + } + + /** + * Gets the value of the ArchiveStatus instance. + * + * @return the value of the ArchiveStatus instance. + */ + @Override + public String getValue() { + return this.name; + } + + @Override + public String toString() { + return name; + } +} diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/ArrowConfiguration.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/ArrowConfiguration.java new file mode 100644 index 000000000000..78f6b9b03251 --- /dev/null +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/ArrowConfiguration.java @@ -0,0 +1,125 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.storage.blob.models; + +import com.azure.core.v2.annotation.Fluent; +import com.azure.core.v2.util.CoreUtils; +import io.clientcore.core.serialization.xml.XmlReader; +import io.clientcore.core.serialization.xml.XmlSerializable; +import io.clientcore.core.serialization.xml.XmlToken; +import io.clientcore.core.serialization.xml.XmlWriter; +import java.util.ArrayList; +import java.util.List; +import javax.xml.namespace.QName; +import javax.xml.stream.XMLStreamException; + +/** + * Groups the settings used for formatting the response if the response should be Arrow formatted. + */ +@Fluent +public final class ArrowConfiguration implements XmlSerializable { + /* + * The Schema property. + */ + private List schema; + + /** + * Creates an instance of ArrowConfiguration class. + */ + public ArrowConfiguration() { + } + + /** + * Get the schema property: The Schema property. + * + * @return the schema value. + */ + public List getSchema() { + if (this.schema == null) { + this.schema = new ArrayList<>(); + } + return this.schema; + } + + /** + * Set the schema property: The Schema property. + * + * @param schema the schema value to set. + * @return the ArrowConfiguration object itself. + */ + public ArrowConfiguration setSchema(List schema) { + this.schema = schema; + return this; + } + + @Override + public XmlWriter toXml(XmlWriter xmlWriter) throws XMLStreamException { + return toXml(xmlWriter, null); + } + + @Override + public XmlWriter toXml(XmlWriter xmlWriter, String rootElementName) throws XMLStreamException { + rootElementName = CoreUtils.isNullOrEmpty(rootElementName) ? "ArrowConfiguration" : rootElementName; + xmlWriter.writeStartElement(rootElementName); + if (this.schema != null) { + xmlWriter.writeStartElement("Schema"); + for (ArrowField element : this.schema) { + xmlWriter.writeXml(element, "Field"); + } + xmlWriter.writeEndElement(); + } + return xmlWriter.writeEndElement(); + } + + /** + * Reads an instance of ArrowConfiguration from the XmlReader. + * + * @param xmlReader The XmlReader being read. + * @return An instance of ArrowConfiguration if the XmlReader was pointing to an instance of it, or null if it was + * pointing to XML null. + * @throws XMLStreamException If an error occurs while reading the ArrowConfiguration. + */ + public static ArrowConfiguration fromXml(XmlReader xmlReader) throws XMLStreamException { + return fromXml(xmlReader, null); + } + + /** + * Reads an instance of ArrowConfiguration from the XmlReader. + * + * @param xmlReader The XmlReader being read. + * @param rootElementName Optional root element name to override the default defined by the model. Used to support + * cases where the model can deserialize from different root element names. + * @return An instance of ArrowConfiguration if the XmlReader was pointing to an instance of it, or null if it was + * pointing to XML null. + * @throws XMLStreamException If an error occurs while reading the ArrowConfiguration. + */ + public static ArrowConfiguration fromXml(XmlReader xmlReader, String rootElementName) throws XMLStreamException { + String finalRootElementName = CoreUtils.isNullOrEmpty(rootElementName) ? "ArrowConfiguration" : rootElementName; + return xmlReader.readObject(finalRootElementName, reader -> { + ArrowConfiguration deserializedArrowConfiguration = new ArrowConfiguration(); + while (reader.nextElement() != XmlToken.END_ELEMENT) { + QName elementName = reader.getElementName(); + + if ("Schema".equals(elementName.getLocalPart())) { + while (reader.nextElement() != XmlToken.END_ELEMENT) { + elementName = reader.getElementName(); + if ("Field".equals(elementName.getLocalPart())) { + if (deserializedArrowConfiguration.schema == null) { + deserializedArrowConfiguration.schema = new ArrayList<>(); + } + deserializedArrowConfiguration.schema.add(ArrowField.fromXml(reader, "Field")); + } else { + reader.skipElement(); + } + } + } else { + reader.skipElement(); + } + } + + return deserializedArrowConfiguration; + }); + } +} diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/ArrowField.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/ArrowField.java new file mode 100644 index 000000000000..bc32a734ae4e --- /dev/null +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/ArrowField.java @@ -0,0 +1,188 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.storage.blob.models; + +import com.azure.core.v2.annotation.Fluent; +import com.azure.core.v2.util.CoreUtils; +import io.clientcore.core.serialization.xml.XmlReader; +import io.clientcore.core.serialization.xml.XmlSerializable; +import io.clientcore.core.serialization.xml.XmlToken; +import io.clientcore.core.serialization.xml.XmlWriter; +import javax.xml.namespace.QName; +import javax.xml.stream.XMLStreamException; + +/** + * Groups settings regarding specific field of an arrow schema. + */ +@Fluent +public final class ArrowField implements XmlSerializable { + /* + * The Type property. + */ + private String type; + + /* + * The Name property. + */ + private String name; + + /* + * The Precision property. + */ + private Integer precision; + + /* + * The Scale property. + */ + private Integer scale; + + /** + * Creates an instance of ArrowField class. + */ + public ArrowField() { + } + + /** + * Get the type property: The Type property. + * + * @return the type value. + */ + public String getType() { + return this.type; + } + + /** + * Set the type property: The Type property. + * + * @param type the type value to set. + * @return the ArrowField object itself. + */ + public ArrowField setType(String type) { + this.type = type; + return this; + } + + /** + * Get the name property: The Name property. + * + * @return the name value. + */ + public String getName() { + return this.name; + } + + /** + * Set the name property: The Name property. + * + * @param name the name value to set. + * @return the ArrowField object itself. + */ + public ArrowField setName(String name) { + this.name = name; + return this; + } + + /** + * Get the precision property: The Precision property. + * + * @return the precision value. + */ + public Integer getPrecision() { + return this.precision; + } + + /** + * Set the precision property: The Precision property. + * + * @param precision the precision value to set. + * @return the ArrowField object itself. + */ + public ArrowField setPrecision(Integer precision) { + this.precision = precision; + return this; + } + + /** + * Get the scale property: The Scale property. + * + * @return the scale value. + */ + public Integer getScale() { + return this.scale; + } + + /** + * Set the scale property: The Scale property. + * + * @param scale the scale value to set. + * @return the ArrowField object itself. + */ + public ArrowField setScale(Integer scale) { + this.scale = scale; + return this; + } + + @Override + public XmlWriter toXml(XmlWriter xmlWriter) throws XMLStreamException { + return toXml(xmlWriter, null); + } + + @Override + public XmlWriter toXml(XmlWriter xmlWriter, String rootElementName) throws XMLStreamException { + rootElementName = CoreUtils.isNullOrEmpty(rootElementName) ? "Field" : rootElementName; + xmlWriter.writeStartElement(rootElementName); + xmlWriter.writeStringElement("Type", this.type); + xmlWriter.writeStringElement("Name", this.name); + xmlWriter.writeNumberElement("Precision", this.precision); + xmlWriter.writeNumberElement("Scale", this.scale); + return xmlWriter.writeEndElement(); + } + + /** + * Reads an instance of ArrowField from the XmlReader. + * + * @param xmlReader The XmlReader being read. + * @return An instance of ArrowField if the XmlReader was pointing to an instance of it, or null if it was pointing + * to XML null. + * @throws XMLStreamException If an error occurs while reading the ArrowField. + */ + public static ArrowField fromXml(XmlReader xmlReader) throws XMLStreamException { + return fromXml(xmlReader, null); + } + + /** + * Reads an instance of ArrowField from the XmlReader. + * + * @param xmlReader The XmlReader being read. + * @param rootElementName Optional root element name to override the default defined by the model. Used to support + * cases where the model can deserialize from different root element names. + * @return An instance of ArrowField if the XmlReader was pointing to an instance of it, or null if it was pointing + * to XML null. + * @throws XMLStreamException If an error occurs while reading the ArrowField. + */ + public static ArrowField fromXml(XmlReader xmlReader, String rootElementName) throws XMLStreamException { + String finalRootElementName = CoreUtils.isNullOrEmpty(rootElementName) ? "Field" : rootElementName; + return xmlReader.readObject(finalRootElementName, reader -> { + ArrowField deserializedArrowField = new ArrowField(); + while (reader.nextElement() != XmlToken.END_ELEMENT) { + QName elementName = reader.getElementName(); + + if ("Type".equals(elementName.getLocalPart())) { + deserializedArrowField.type = reader.getStringElement(); + } else if ("Name".equals(elementName.getLocalPart())) { + deserializedArrowField.name = reader.getStringElement(); + } else if ("Precision".equals(elementName.getLocalPart())) { + deserializedArrowField.precision = reader.getNullableElement(Integer::parseInt); + } else if ("Scale".equals(elementName.getLocalPart())) { + deserializedArrowField.scale = reader.getNullableElement(Integer::parseInt); + } else { + reader.skipElement(); + } + } + + return deserializedArrowField; + }); + } +} diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlobAccessPolicy.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlobAccessPolicy.java new file mode 100644 index 000000000000..d46921b48e9b --- /dev/null +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlobAccessPolicy.java @@ -0,0 +1,166 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.storage.blob.models; + +import com.azure.core.v2.annotation.Fluent; +import com.azure.core.v2.util.CoreUtils; +import io.clientcore.core.serialization.xml.XmlReader; +import io.clientcore.core.serialization.xml.XmlSerializable; +import io.clientcore.core.serialization.xml.XmlToken; +import io.clientcore.core.serialization.xml.XmlWriter; +import java.time.OffsetDateTime; +import java.time.format.DateTimeFormatter; +import javax.xml.namespace.QName; +import javax.xml.stream.XMLStreamException; + +/** + * An Access policy. + */ +@Fluent +public final class BlobAccessPolicy implements XmlSerializable { + /* + * the date-time the policy is active + */ + private OffsetDateTime startsOn; + + /* + * the date-time the policy expires + */ + private OffsetDateTime expiresOn; + + /* + * the permissions for the acl policy + */ + private String permissions; + + /** + * Creates an instance of BlobAccessPolicy class. + */ + public BlobAccessPolicy() { + } + + /** + * Get the startsOn property: the date-time the policy is active. + * + * @return the startsOn value. + */ + public OffsetDateTime getStartsOn() { + return this.startsOn; + } + + /** + * Set the startsOn property: the date-time the policy is active. + * + * @param startsOn the startsOn value to set. + * @return the BlobAccessPolicy object itself. + */ + public BlobAccessPolicy setStartsOn(OffsetDateTime startsOn) { + this.startsOn = startsOn; + return this; + } + + /** + * Get the expiresOn property: the date-time the policy expires. + * + * @return the expiresOn value. + */ + public OffsetDateTime getExpiresOn() { + return this.expiresOn; + } + + /** + * Set the expiresOn property: the date-time the policy expires. + * + * @param expiresOn the expiresOn value to set. + * @return the BlobAccessPolicy object itself. + */ + public BlobAccessPolicy setExpiresOn(OffsetDateTime expiresOn) { + this.expiresOn = expiresOn; + return this; + } + + /** + * Get the permissions property: the permissions for the acl policy. + * + * @return the permissions value. + */ + public String getPermissions() { + return this.permissions; + } + + /** + * Set the permissions property: the permissions for the acl policy. + * + * @param permissions the permissions value to set. + * @return the BlobAccessPolicy object itself. + */ + public BlobAccessPolicy setPermissions(String permissions) { + this.permissions = permissions; + return this; + } + + @Override + public XmlWriter toXml(XmlWriter xmlWriter) throws XMLStreamException { + return toXml(xmlWriter, null); + } + + @Override + public XmlWriter toXml(XmlWriter xmlWriter, String rootElementName) throws XMLStreamException { + rootElementName = CoreUtils.isNullOrEmpty(rootElementName) ? "BlobAccessPolicy" : rootElementName; + xmlWriter.writeStartElement(rootElementName); + xmlWriter.writeStringElement("Start", + this.startsOn == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.startsOn)); + xmlWriter.writeStringElement("Expiry", + this.expiresOn == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.expiresOn)); + xmlWriter.writeStringElement("Permission", this.permissions); + return xmlWriter.writeEndElement(); + } + + /** + * Reads an instance of BlobAccessPolicy from the XmlReader. + * + * @param xmlReader The XmlReader being read. + * @return An instance of BlobAccessPolicy if the XmlReader was pointing to an instance of it, or null if it was + * pointing to XML null. + * @throws XMLStreamException If an error occurs while reading the BlobAccessPolicy. + */ + public static BlobAccessPolicy fromXml(XmlReader xmlReader) throws XMLStreamException { + return fromXml(xmlReader, null); + } + + /** + * Reads an instance of BlobAccessPolicy from the XmlReader. + * + * @param xmlReader The XmlReader being read. + * @param rootElementName Optional root element name to override the default defined by the model. Used to support + * cases where the model can deserialize from different root element names. + * @return An instance of BlobAccessPolicy if the XmlReader was pointing to an instance of it, or null if it was + * pointing to XML null. + * @throws XMLStreamException If an error occurs while reading the BlobAccessPolicy. + */ + public static BlobAccessPolicy fromXml(XmlReader xmlReader, String rootElementName) throws XMLStreamException { + String finalRootElementName = CoreUtils.isNullOrEmpty(rootElementName) ? "BlobAccessPolicy" : rootElementName; + return xmlReader.readObject(finalRootElementName, reader -> { + BlobAccessPolicy deserializedBlobAccessPolicy = new BlobAccessPolicy(); + while (reader.nextElement() != XmlToken.END_ELEMENT) { + QName elementName = reader.getElementName(); + + if ("Start".equals(elementName.getLocalPart())) { + deserializedBlobAccessPolicy.startsOn + = reader.getNullableElement(dateString -> CoreUtils.parseBestOffsetDateTime(dateString)); + } else if ("Expiry".equals(elementName.getLocalPart())) { + deserializedBlobAccessPolicy.expiresOn + = reader.getNullableElement(dateString -> CoreUtils.parseBestOffsetDateTime(dateString)); + } else if ("Permission".equals(elementName.getLocalPart())) { + deserializedBlobAccessPolicy.permissions = reader.getStringElement(); + } else { + reader.skipElement(); + } + } + + return deserializedBlobAccessPolicy; + }); + } +} diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlobAnalyticsLogging.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlobAnalyticsLogging.java new file mode 100644 index 000000000000..c93cfaf4687c --- /dev/null +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlobAnalyticsLogging.java @@ -0,0 +1,220 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.storage.blob.models; + +import com.azure.core.v2.annotation.Fluent; +import com.azure.core.v2.util.CoreUtils; +import io.clientcore.core.serialization.xml.XmlReader; +import io.clientcore.core.serialization.xml.XmlSerializable; +import io.clientcore.core.serialization.xml.XmlToken; +import io.clientcore.core.serialization.xml.XmlWriter; +import javax.xml.namespace.QName; +import javax.xml.stream.XMLStreamException; + +/** + * Azure Analytics Logging settings. + */ +@Fluent +public final class BlobAnalyticsLogging implements XmlSerializable { + /* + * The version of Storage Analytics to configure. + */ + private String version; + + /* + * Indicates whether all delete requests should be logged. + */ + private boolean delete; + + /* + * Indicates whether all read requests should be logged. + */ + private boolean read; + + /* + * Indicates whether all write requests should be logged. + */ + private boolean write; + + /* + * the retention policy which determines how long the associated data should persist + */ + private BlobRetentionPolicy retentionPolicy; + + /** + * Creates an instance of BlobAnalyticsLogging class. + */ + public BlobAnalyticsLogging() { + } + + /** + * Get the version property: The version of Storage Analytics to configure. + * + * @return the version value. + */ + public String getVersion() { + return this.version; + } + + /** + * Set the version property: The version of Storage Analytics to configure. + * + * @param version the version value to set. + * @return the BlobAnalyticsLogging object itself. + */ + public BlobAnalyticsLogging setVersion(String version) { + this.version = version; + return this; + } + + /** + * Get the delete property: Indicates whether all delete requests should be logged. + * + * @return the delete value. + */ + public boolean isDelete() { + return this.delete; + } + + /** + * Set the delete property: Indicates whether all delete requests should be logged. + * + * @param delete the delete value to set. + * @return the BlobAnalyticsLogging object itself. + */ + public BlobAnalyticsLogging setDelete(boolean delete) { + this.delete = delete; + return this; + } + + /** + * Get the read property: Indicates whether all read requests should be logged. + * + * @return the read value. + */ + public boolean isRead() { + return this.read; + } + + /** + * Set the read property: Indicates whether all read requests should be logged. + * + * @param read the read value to set. + * @return the BlobAnalyticsLogging object itself. + */ + public BlobAnalyticsLogging setRead(boolean read) { + this.read = read; + return this; + } + + /** + * Get the write property: Indicates whether all write requests should be logged. + * + * @return the write value. + */ + public boolean isWrite() { + return this.write; + } + + /** + * Set the write property: Indicates whether all write requests should be logged. + * + * @param write the write value to set. + * @return the BlobAnalyticsLogging object itself. + */ + public BlobAnalyticsLogging setWrite(boolean write) { + this.write = write; + return this; + } + + /** + * Get the retentionPolicy property: the retention policy which determines how long the associated data should + * persist. + * + * @return the retentionPolicy value. + */ + public BlobRetentionPolicy getRetentionPolicy() { + return this.retentionPolicy; + } + + /** + * Set the retentionPolicy property: the retention policy which determines how long the associated data should + * persist. + * + * @param retentionPolicy the retentionPolicy value to set. + * @return the BlobAnalyticsLogging object itself. + */ + public BlobAnalyticsLogging setRetentionPolicy(BlobRetentionPolicy retentionPolicy) { + this.retentionPolicy = retentionPolicy; + return this; + } + + @Override + public XmlWriter toXml(XmlWriter xmlWriter) throws XMLStreamException { + return toXml(xmlWriter, null); + } + + @Override + public XmlWriter toXml(XmlWriter xmlWriter, String rootElementName) throws XMLStreamException { + rootElementName = CoreUtils.isNullOrEmpty(rootElementName) ? "BlobAnalyticsLogging" : rootElementName; + xmlWriter.writeStartElement(rootElementName); + xmlWriter.writeStringElement("Version", this.version); + xmlWriter.writeBooleanElement("Delete", this.delete); + xmlWriter.writeBooleanElement("Read", this.read); + xmlWriter.writeBooleanElement("Write", this.write); + xmlWriter.writeXml(this.retentionPolicy, "RetentionPolicy"); + return xmlWriter.writeEndElement(); + } + + /** + * Reads an instance of BlobAnalyticsLogging from the XmlReader. + * + * @param xmlReader The XmlReader being read. + * @return An instance of BlobAnalyticsLogging if the XmlReader was pointing to an instance of it, or null if it was + * pointing to XML null. + * @throws XMLStreamException If an error occurs while reading the BlobAnalyticsLogging. + */ + public static BlobAnalyticsLogging fromXml(XmlReader xmlReader) throws XMLStreamException { + return fromXml(xmlReader, null); + } + + /** + * Reads an instance of BlobAnalyticsLogging from the XmlReader. + * + * @param xmlReader The XmlReader being read. + * @param rootElementName Optional root element name to override the default defined by the model. Used to support + * cases where the model can deserialize from different root element names. + * @return An instance of BlobAnalyticsLogging if the XmlReader was pointing to an instance of it, or null if it was + * pointing to XML null. + * @throws XMLStreamException If an error occurs while reading the BlobAnalyticsLogging. + */ + public static BlobAnalyticsLogging fromXml(XmlReader xmlReader, String rootElementName) throws XMLStreamException { + String finalRootElementName + = CoreUtils.isNullOrEmpty(rootElementName) ? "BlobAnalyticsLogging" : rootElementName; + return xmlReader.readObject(finalRootElementName, reader -> { + BlobAnalyticsLogging deserializedBlobAnalyticsLogging = new BlobAnalyticsLogging(); + while (reader.nextElement() != XmlToken.END_ELEMENT) { + QName elementName = reader.getElementName(); + + if ("Version".equals(elementName.getLocalPart())) { + deserializedBlobAnalyticsLogging.version = reader.getStringElement(); + } else if ("Delete".equals(elementName.getLocalPart())) { + deserializedBlobAnalyticsLogging.delete = reader.getBooleanElement(); + } else if ("Read".equals(elementName.getLocalPart())) { + deserializedBlobAnalyticsLogging.read = reader.getBooleanElement(); + } else if ("Write".equals(elementName.getLocalPart())) { + deserializedBlobAnalyticsLogging.write = reader.getBooleanElement(); + } else if ("RetentionPolicy".equals(elementName.getLocalPart())) { + deserializedBlobAnalyticsLogging.retentionPolicy + = BlobRetentionPolicy.fromXml(reader, "RetentionPolicy"); + } else { + reader.skipElement(); + } + } + + return deserializedBlobAnalyticsLogging; + }); + } +} diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlobContainerEncryptionScope.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlobContainerEncryptionScope.java new file mode 100644 index 000000000000..2dd644332be7 --- /dev/null +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlobContainerEncryptionScope.java @@ -0,0 +1,75 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.storage.blob.models; + +import com.azure.core.v2.annotation.Fluent; + +/** + * Parameter group. + */ +@Fluent +public final class BlobContainerEncryptionScope { + /* + * Optional. Version 2019-07-07 and later. Specifies the default encryption scope to set on the container and use + * for all future writes. + */ + private String defaultEncryptionScope; + + /* + * Optional. Version 2019-07-07 and newer. If true, prevents any request from specifying a different encryption + * scope than the scope set on the container. + */ + private Boolean encryptionScopeOverridePrevented; + + /** + * Creates an instance of BlobContainerEncryptionScope class. + */ + public BlobContainerEncryptionScope() { + } + + /** + * Get the defaultEncryptionScope property: Optional. Version 2019-07-07 and later. Specifies the default encryption + * scope to set on the container and use for all future writes. + * + * @return the defaultEncryptionScope value. + */ + public String getDefaultEncryptionScope() { + return this.defaultEncryptionScope; + } + + /** + * Set the defaultEncryptionScope property: Optional. Version 2019-07-07 and later. Specifies the default encryption + * scope to set on the container and use for all future writes. + * + * @param defaultEncryptionScope the defaultEncryptionScope value to set. + * @return the BlobContainerEncryptionScope object itself. + */ + public BlobContainerEncryptionScope setDefaultEncryptionScope(String defaultEncryptionScope) { + this.defaultEncryptionScope = defaultEncryptionScope; + return this; + } + + /** + * Get the encryptionScopeOverridePrevented property: Optional. Version 2019-07-07 and newer. If true, prevents any + * request from specifying a different encryption scope than the scope set on the container. + * + * @return the encryptionScopeOverridePrevented value. + */ + public Boolean isEncryptionScopeOverridePrevented() { + return this.encryptionScopeOverridePrevented; + } + + /** + * Set the encryptionScopeOverridePrevented property: Optional. Version 2019-07-07 and newer. If true, prevents any + * request from specifying a different encryption scope than the scope set on the container. + * + * @param encryptionScopeOverridePrevented the encryptionScopeOverridePrevented value to set. + * @return the BlobContainerEncryptionScope object itself. + */ + public BlobContainerEncryptionScope setEncryptionScopeOverridePrevented(Boolean encryptionScopeOverridePrevented) { + this.encryptionScopeOverridePrevented = encryptionScopeOverridePrevented; + return this; + } +} diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlobContainerItem.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlobContainerItem.java new file mode 100644 index 000000000000..2f8534a824b9 --- /dev/null +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlobContainerItem.java @@ -0,0 +1,231 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.storage.blob.models; + +import com.azure.core.v2.annotation.Fluent; +import com.azure.core.v2.util.CoreUtils; +import io.clientcore.core.serialization.xml.XmlReader; +import io.clientcore.core.serialization.xml.XmlSerializable; +import io.clientcore.core.serialization.xml.XmlToken; +import io.clientcore.core.serialization.xml.XmlWriter; +import java.util.LinkedHashMap; +import java.util.Map; +import javax.xml.namespace.QName; +import javax.xml.stream.XMLStreamException; + +/** + * An Azure Storage container. + */ +@Fluent +public final class BlobContainerItem implements XmlSerializable { + /* + * The Name property. + */ + private String name; + + /* + * The Deleted property. + */ + private Boolean deleted; + + /* + * The Version property. + */ + private String version; + + /* + * Properties of a container + */ + private BlobContainerItemProperties properties; + + /* + * Dictionary of + */ + private Map metadata; + + /** + * Creates an instance of BlobContainerItem class. + */ + public BlobContainerItem() { + } + + /** + * Get the name property: The Name property. + * + * @return the name value. + */ + public String getName() { + return this.name; + } + + /** + * Set the name property: The Name property. + * + * @param name the name value to set. + * @return the BlobContainerItem object itself. + */ + public BlobContainerItem setName(String name) { + this.name = name; + return this; + } + + /** + * Get the deleted property: The Deleted property. + * + * @return the deleted value. + */ + public Boolean isDeleted() { + return this.deleted; + } + + /** + * Set the deleted property: The Deleted property. + * + * @param deleted the deleted value to set. + * @return the BlobContainerItem object itself. + */ + public BlobContainerItem setDeleted(Boolean deleted) { + this.deleted = deleted; + return this; + } + + /** + * Get the version property: The Version property. + * + * @return the version value. + */ + public String getVersion() { + return this.version; + } + + /** + * Set the version property: The Version property. + * + * @param version the version value to set. + * @return the BlobContainerItem object itself. + */ + public BlobContainerItem setVersion(String version) { + this.version = version; + return this; + } + + /** + * Get the properties property: Properties of a container. + * + * @return the properties value. + */ + public BlobContainerItemProperties getProperties() { + return this.properties; + } + + /** + * Set the properties property: Properties of a container. + * + * @param properties the properties value to set. + * @return the BlobContainerItem object itself. + */ + public BlobContainerItem setProperties(BlobContainerItemProperties properties) { + this.properties = properties; + return this; + } + + /** + * Get the metadata property: Dictionary of <string>. + * + * @return the metadata value. + */ + public Map getMetadata() { + return this.metadata; + } + + /** + * Set the metadata property: Dictionary of <string>. + * + * @param metadata the metadata value to set. + * @return the BlobContainerItem object itself. + */ + public BlobContainerItem setMetadata(Map metadata) { + this.metadata = metadata; + return this; + } + + @Override + public XmlWriter toXml(XmlWriter xmlWriter) throws XMLStreamException { + return toXml(xmlWriter, null); + } + + @Override + public XmlWriter toXml(XmlWriter xmlWriter, String rootElementName) throws XMLStreamException { + rootElementName = CoreUtils.isNullOrEmpty(rootElementName) ? "Container" : rootElementName; + xmlWriter.writeStartElement(rootElementName); + xmlWriter.writeStringElement("Name", this.name); + xmlWriter.writeBooleanElement("Deleted", this.deleted); + xmlWriter.writeStringElement("Version", this.version); + xmlWriter.writeXml(this.properties, "Properties"); + if (this.metadata != null) { + xmlWriter.writeStartElement("Metadata"); + for (Map.Entry entry : this.metadata.entrySet()) { + xmlWriter.writeStringElement(entry.getKey(), entry.getValue()); + } + xmlWriter.writeEndElement(); + } + return xmlWriter.writeEndElement(); + } + + /** + * Reads an instance of BlobContainerItem from the XmlReader. + * + * @param xmlReader The XmlReader being read. + * @return An instance of BlobContainerItem if the XmlReader was pointing to an instance of it, or null if it was + * pointing to XML null. + * @throws XMLStreamException If an error occurs while reading the BlobContainerItem. + */ + public static BlobContainerItem fromXml(XmlReader xmlReader) throws XMLStreamException { + return fromXml(xmlReader, null); + } + + /** + * Reads an instance of BlobContainerItem from the XmlReader. + * + * @param xmlReader The XmlReader being read. + * @param rootElementName Optional root element name to override the default defined by the model. Used to support + * cases where the model can deserialize from different root element names. + * @return An instance of BlobContainerItem if the XmlReader was pointing to an instance of it, or null if it was + * pointing to XML null. + * @throws XMLStreamException If an error occurs while reading the BlobContainerItem. + */ + public static BlobContainerItem fromXml(XmlReader xmlReader, String rootElementName) throws XMLStreamException { + String finalRootElementName = CoreUtils.isNullOrEmpty(rootElementName) ? "Container" : rootElementName; + return xmlReader.readObject(finalRootElementName, reader -> { + BlobContainerItem deserializedBlobContainerItem = new BlobContainerItem(); + while (reader.nextElement() != XmlToken.END_ELEMENT) { + QName elementName = reader.getElementName(); + + if ("Name".equals(elementName.getLocalPart())) { + deserializedBlobContainerItem.name = reader.getStringElement(); + } else if ("Deleted".equals(elementName.getLocalPart())) { + deserializedBlobContainerItem.deleted = reader.getNullableElement(Boolean::parseBoolean); + } else if ("Version".equals(elementName.getLocalPart())) { + deserializedBlobContainerItem.version = reader.getStringElement(); + } else if ("Properties".equals(elementName.getLocalPart())) { + deserializedBlobContainerItem.properties + = BlobContainerItemProperties.fromXml(reader, "Properties"); + } else if ("Metadata".equals(elementName.getLocalPart())) { + while (reader.nextElement() != XmlToken.END_ELEMENT) { + if (deserializedBlobContainerItem.metadata == null) { + deserializedBlobContainerItem.metadata = new LinkedHashMap<>(); + } + deserializedBlobContainerItem.metadata.put(reader.getElementName().getLocalPart(), + reader.getStringElement()); + } + } else { + reader.skipElement(); + } + } + + return deserializedBlobContainerItem; + }); + } +} diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlobContainerItemProperties.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlobContainerItemProperties.java new file mode 100644 index 000000000000..b1a173f628a4 --- /dev/null +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlobContainerItemProperties.java @@ -0,0 +1,475 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.storage.blob.models; + +import com.azure.core.v2.annotation.Fluent; +import com.azure.core.v2.util.CoreUtils; +import io.clientcore.core.http.models.DateTimeRfc1123; +import io.clientcore.core.serialization.xml.XmlReader; +import io.clientcore.core.serialization.xml.XmlSerializable; +import io.clientcore.core.serialization.xml.XmlToken; +import io.clientcore.core.serialization.xml.XmlWriter; +import java.time.OffsetDateTime; +import java.util.Objects; +import javax.xml.namespace.QName; +import javax.xml.stream.XMLStreamException; + +/** + * Properties of a container. + */ +@Fluent +public final class BlobContainerItemProperties implements XmlSerializable { + /* + * The Last-Modified property. + */ + private DateTimeRfc1123 lastModified; + + /* + * The Etag property. + */ + private String eTag; + + /* + * The LeaseStatus property. + */ + private LeaseStatusType leaseStatus; + + /* + * The LeaseState property. + */ + private LeaseStateType leaseState; + + /* + * The LeaseDuration property. + */ + private LeaseDurationType leaseDuration; + + /* + * The PublicAccess property. + */ + private PublicAccessType publicAccess; + + /* + * The HasImmutabilityPolicy property. + */ + private Boolean hasImmutabilityPolicy; + + /* + * The HasLegalHold property. + */ + private Boolean hasLegalHold; + + /* + * The DefaultEncryptionScope property. + */ + private String defaultEncryptionScope; + + /* + * The DenyEncryptionScopeOverride property. + */ + private Boolean encryptionScopeOverridePrevented; + + /* + * The DeletedTime property. + */ + private DateTimeRfc1123 deletedTime; + + /* + * The RemainingRetentionDays property. + */ + private Integer remainingRetentionDays; + + /* + * Indicates if version level worm is enabled on this container. + */ + private Boolean isImmutableStorageWithVersioningEnabled; + + /** + * Creates an instance of BlobContainerItemProperties class. + */ + public BlobContainerItemProperties() { + } + + /** + * 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 BlobContainerItemProperties object itself. + */ + public BlobContainerItemProperties setLastModified(OffsetDateTime lastModified) { + if (lastModified == null) { + this.lastModified = null; + } else { + this.lastModified = new DateTimeRfc1123(lastModified); + } + 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 BlobContainerItemProperties object itself. + */ + public BlobContainerItemProperties setETag(String eTag) { + this.eTag = eTag; + return this; + } + + /** + * Get the leaseStatus property: The LeaseStatus property. + * + * @return the leaseStatus value. + */ + public LeaseStatusType getLeaseStatus() { + return this.leaseStatus; + } + + /** + * Set the leaseStatus property: The LeaseStatus property. + * + * @param leaseStatus the leaseStatus value to set. + * @return the BlobContainerItemProperties object itself. + */ + public BlobContainerItemProperties setLeaseStatus(LeaseStatusType leaseStatus) { + this.leaseStatus = leaseStatus; + return this; + } + + /** + * Get the leaseState property: The LeaseState property. + * + * @return the leaseState value. + */ + public LeaseStateType getLeaseState() { + return this.leaseState; + } + + /** + * Set the leaseState property: The LeaseState property. + * + * @param leaseState the leaseState value to set. + * @return the BlobContainerItemProperties object itself. + */ + public BlobContainerItemProperties setLeaseState(LeaseStateType leaseState) { + this.leaseState = leaseState; + return this; + } + + /** + * Get the leaseDuration property: The LeaseDuration property. + * + * @return the leaseDuration value. + */ + public LeaseDurationType getLeaseDuration() { + return this.leaseDuration; + } + + /** + * Set the leaseDuration property: The LeaseDuration property. + * + * @param leaseDuration the leaseDuration value to set. + * @return the BlobContainerItemProperties object itself. + */ + public BlobContainerItemProperties setLeaseDuration(LeaseDurationType leaseDuration) { + this.leaseDuration = leaseDuration; + return this; + } + + /** + * Get the publicAccess property: The PublicAccess property. + * + * @return the publicAccess value. + */ + public PublicAccessType getPublicAccess() { + return this.publicAccess; + } + + /** + * Set the publicAccess property: The PublicAccess property. + * + * @param publicAccess the publicAccess value to set. + * @return the BlobContainerItemProperties object itself. + */ + public BlobContainerItemProperties setPublicAccess(PublicAccessType publicAccess) { + this.publicAccess = publicAccess; + return this; + } + + /** + * Get the hasImmutabilityPolicy property: The HasImmutabilityPolicy property. + * + * @return the hasImmutabilityPolicy value. + */ + public Boolean isHasImmutabilityPolicy() { + return this.hasImmutabilityPolicy; + } + + /** + * Set the hasImmutabilityPolicy property: The HasImmutabilityPolicy property. + * + * @param hasImmutabilityPolicy the hasImmutabilityPolicy value to set. + * @return the BlobContainerItemProperties object itself. + */ + public BlobContainerItemProperties setHasImmutabilityPolicy(Boolean hasImmutabilityPolicy) { + this.hasImmutabilityPolicy = hasImmutabilityPolicy; + return this; + } + + /** + * Get the hasLegalHold property: The HasLegalHold property. + * + * @return the hasLegalHold value. + */ + public Boolean isHasLegalHold() { + return this.hasLegalHold; + } + + /** + * Set the hasLegalHold property: The HasLegalHold property. + * + * @param hasLegalHold the hasLegalHold value to set. + * @return the BlobContainerItemProperties object itself. + */ + public BlobContainerItemProperties setHasLegalHold(Boolean hasLegalHold) { + this.hasLegalHold = hasLegalHold; + return this; + } + + /** + * Get the defaultEncryptionScope property: The DefaultEncryptionScope property. + * + * @return the defaultEncryptionScope value. + */ + public String getDefaultEncryptionScope() { + return this.defaultEncryptionScope; + } + + /** + * Set the defaultEncryptionScope property: The DefaultEncryptionScope property. + * + * @param defaultEncryptionScope the defaultEncryptionScope value to set. + * @return the BlobContainerItemProperties object itself. + */ + public BlobContainerItemProperties setDefaultEncryptionScope(String defaultEncryptionScope) { + this.defaultEncryptionScope = defaultEncryptionScope; + return this; + } + + /** + * Get the encryptionScopeOverridePrevented property: The DenyEncryptionScopeOverride property. + * + * @return the encryptionScopeOverridePrevented value. + */ + public Boolean isEncryptionScopeOverridePrevented() { + return this.encryptionScopeOverridePrevented; + } + + /** + * Set the encryptionScopeOverridePrevented property: The DenyEncryptionScopeOverride property. + * + * @param encryptionScopeOverridePrevented the encryptionScopeOverridePrevented value to set. + * @return the BlobContainerItemProperties object itself. + */ + public BlobContainerItemProperties setEncryptionScopeOverridePrevented(Boolean encryptionScopeOverridePrevented) { + this.encryptionScopeOverridePrevented = encryptionScopeOverridePrevented; + return this; + } + + /** + * Get the deletedTime property: The DeletedTime property. + * + * @return the deletedTime value. + */ + public OffsetDateTime getDeletedTime() { + if (this.deletedTime == null) { + return null; + } + return this.deletedTime.getDateTime(); + } + + /** + * Set the deletedTime property: The DeletedTime property. + * + * @param deletedTime the deletedTime value to set. + * @return the BlobContainerItemProperties object itself. + */ + public BlobContainerItemProperties setDeletedTime(OffsetDateTime deletedTime) { + if (deletedTime == null) { + this.deletedTime = null; + } else { + this.deletedTime = new DateTimeRfc1123(deletedTime); + } + return this; + } + + /** + * Get the remainingRetentionDays property: The RemainingRetentionDays property. + * + * @return the remainingRetentionDays value. + */ + public Integer getRemainingRetentionDays() { + return this.remainingRetentionDays; + } + + /** + * Set the remainingRetentionDays property: The RemainingRetentionDays property. + * + * @param remainingRetentionDays the remainingRetentionDays value to set. + * @return the BlobContainerItemProperties object itself. + */ + public BlobContainerItemProperties setRemainingRetentionDays(Integer remainingRetentionDays) { + this.remainingRetentionDays = remainingRetentionDays; + return this; + } + + /** + * Get the isImmutableStorageWithVersioningEnabled property: Indicates if version level worm is enabled on this + * container. + * + * @return the isImmutableStorageWithVersioningEnabled value. + */ + public Boolean isImmutableStorageWithVersioningEnabled() { + return this.isImmutableStorageWithVersioningEnabled; + } + + /** + * Set the isImmutableStorageWithVersioningEnabled property: Indicates if version level worm is enabled on this + * container. + * + * @param isImmutableStorageWithVersioningEnabled the isImmutableStorageWithVersioningEnabled value to set. + * @return the BlobContainerItemProperties object itself. + */ + public BlobContainerItemProperties + setIsImmutableStorageWithVersioningEnabled(Boolean isImmutableStorageWithVersioningEnabled) { + this.isImmutableStorageWithVersioningEnabled = isImmutableStorageWithVersioningEnabled; + return this; + } + + @Override + public XmlWriter toXml(XmlWriter xmlWriter) throws XMLStreamException { + return toXml(xmlWriter, null); + } + + @Override + public XmlWriter toXml(XmlWriter xmlWriter, String rootElementName) throws XMLStreamException { + rootElementName = CoreUtils.isNullOrEmpty(rootElementName) ? "BlobContainerItemProperties" : rootElementName; + xmlWriter.writeStartElement(rootElementName); + xmlWriter.writeStringElement("Last-Modified", Objects.toString(this.lastModified, null)); + xmlWriter.writeStringElement("Etag", this.eTag); + xmlWriter.writeStringElement("LeaseStatus", this.leaseStatus == null ? null : this.leaseStatus.toString()); + xmlWriter.writeStringElement("LeaseState", this.leaseState == null ? null : this.leaseState.toString()); + xmlWriter.writeStringElement("LeaseDuration", + this.leaseDuration == null ? null : this.leaseDuration.toString()); + xmlWriter.writeStringElement("PublicAccess", this.publicAccess == null ? null : this.publicAccess.toString()); + xmlWriter.writeBooleanElement("HasImmutabilityPolicy", this.hasImmutabilityPolicy); + xmlWriter.writeBooleanElement("HasLegalHold", this.hasLegalHold); + xmlWriter.writeStringElement("DefaultEncryptionScope", this.defaultEncryptionScope); + xmlWriter.writeBooleanElement("DenyEncryptionScopeOverride", this.encryptionScopeOverridePrevented); + xmlWriter.writeStringElement("DeletedTime", Objects.toString(this.deletedTime, null)); + xmlWriter.writeNumberElement("RemainingRetentionDays", this.remainingRetentionDays); + xmlWriter.writeBooleanElement("ImmutableStorageWithVersioningEnabled", + this.isImmutableStorageWithVersioningEnabled); + return xmlWriter.writeEndElement(); + } + + /** + * Reads an instance of BlobContainerItemProperties from the XmlReader. + * + * @param xmlReader The XmlReader being read. + * @return An instance of BlobContainerItemProperties if the XmlReader was pointing to an instance of it, or null if + * it was pointing to XML null. + * @throws XMLStreamException If an error occurs while reading the BlobContainerItemProperties. + */ + public static BlobContainerItemProperties fromXml(XmlReader xmlReader) throws XMLStreamException { + return fromXml(xmlReader, null); + } + + /** + * Reads an instance of BlobContainerItemProperties from the XmlReader. + * + * @param xmlReader The XmlReader being read. + * @param rootElementName Optional root element name to override the default defined by the model. Used to support + * cases where the model can deserialize from different root element names. + * @return An instance of BlobContainerItemProperties if the XmlReader was pointing to an instance of it, or null if + * it was pointing to XML null. + * @throws XMLStreamException If an error occurs while reading the BlobContainerItemProperties. + */ + public static BlobContainerItemProperties fromXml(XmlReader xmlReader, String rootElementName) + throws XMLStreamException { + String finalRootElementName + = CoreUtils.isNullOrEmpty(rootElementName) ? "BlobContainerItemProperties" : rootElementName; + return xmlReader.readObject(finalRootElementName, reader -> { + BlobContainerItemProperties deserializedBlobContainerItemProperties = new BlobContainerItemProperties(); + while (reader.nextElement() != XmlToken.END_ELEMENT) { + QName elementName = reader.getElementName(); + + if ("Last-Modified".equals(elementName.getLocalPart())) { + deserializedBlobContainerItemProperties.lastModified + = reader.getNullableElement(DateTimeRfc1123::new); + } else if ("Etag".equals(elementName.getLocalPart())) { + deserializedBlobContainerItemProperties.eTag = reader.getStringElement(); + } else if ("LeaseStatus".equals(elementName.getLocalPart())) { + deserializedBlobContainerItemProperties.leaseStatus + = LeaseStatusType.fromString(reader.getStringElement()); + } else if ("LeaseState".equals(elementName.getLocalPart())) { + deserializedBlobContainerItemProperties.leaseState + = LeaseStateType.fromString(reader.getStringElement()); + } else if ("LeaseDuration".equals(elementName.getLocalPart())) { + deserializedBlobContainerItemProperties.leaseDuration + = LeaseDurationType.fromString(reader.getStringElement()); + } else if ("PublicAccess".equals(elementName.getLocalPart())) { + deserializedBlobContainerItemProperties.publicAccess + = PublicAccessType.fromString(reader.getStringElement()); + } else if ("HasImmutabilityPolicy".equals(elementName.getLocalPart())) { + deserializedBlobContainerItemProperties.hasImmutabilityPolicy + = reader.getNullableElement(Boolean::parseBoolean); + } else if ("HasLegalHold".equals(elementName.getLocalPart())) { + deserializedBlobContainerItemProperties.hasLegalHold + = reader.getNullableElement(Boolean::parseBoolean); + } else if ("DefaultEncryptionScope".equals(elementName.getLocalPart())) { + deserializedBlobContainerItemProperties.defaultEncryptionScope = reader.getStringElement(); + } else if ("DenyEncryptionScopeOverride".equals(elementName.getLocalPart())) { + deserializedBlobContainerItemProperties.encryptionScopeOverridePrevented + = reader.getNullableElement(Boolean::parseBoolean); + } else if ("DeletedTime".equals(elementName.getLocalPart())) { + deserializedBlobContainerItemProperties.deletedTime + = reader.getNullableElement(DateTimeRfc1123::new); + } else if ("RemainingRetentionDays".equals(elementName.getLocalPart())) { + deserializedBlobContainerItemProperties.remainingRetentionDays + = reader.getNullableElement(Integer::parseInt); + } else if ("ImmutableStorageWithVersioningEnabled".equals(elementName.getLocalPart())) { + deserializedBlobContainerItemProperties.isImmutableStorageWithVersioningEnabled + = reader.getNullableElement(Boolean::parseBoolean); + } else { + reader.skipElement(); + } + } + + return deserializedBlobContainerItemProperties; + }); + } +} diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlobContainersSegment.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlobContainersSegment.java new file mode 100644 index 000000000000..3a1017cbf486 --- /dev/null +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlobContainersSegment.java @@ -0,0 +1,265 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.storage.blob.models; + +import com.azure.core.v2.annotation.Fluent; +import com.azure.core.v2.util.CoreUtils; +import io.clientcore.core.serialization.xml.XmlReader; +import io.clientcore.core.serialization.xml.XmlSerializable; +import io.clientcore.core.serialization.xml.XmlToken; +import io.clientcore.core.serialization.xml.XmlWriter; +import java.util.ArrayList; +import java.util.List; +import javax.xml.namespace.QName; +import javax.xml.stream.XMLStreamException; + +/** + * An enumeration of containers. + */ +@Fluent +public final class BlobContainersSegment implements XmlSerializable { + /* + * The ServiceEndpoint property. + */ + private String serviceEndpoint; + + /* + * The Prefix property. + */ + private String prefix; + + /* + * The Marker property. + */ + private String marker; + + /* + * The MaxResults property. + */ + private Integer maxResults; + + /* + * The NextMarker property. + */ + private String nextMarker; + + /* + * The BlobContainerItems property. + */ + private List blobContainerItems; + + /** + * Creates an instance of BlobContainersSegment class. + */ + public BlobContainersSegment() { + } + + /** + * Get the serviceEndpoint property: The ServiceEndpoint property. + * + * @return the serviceEndpoint value. + */ + public String getServiceEndpoint() { + return this.serviceEndpoint; + } + + /** + * Set the serviceEndpoint property: The ServiceEndpoint property. + * + * @param serviceEndpoint the serviceEndpoint value to set. + * @return the BlobContainersSegment object itself. + */ + public BlobContainersSegment setServiceEndpoint(String serviceEndpoint) { + this.serviceEndpoint = serviceEndpoint; + return this; + } + + /** + * Get the prefix property: The Prefix property. + * + * @return the prefix value. + */ + public String getPrefix() { + return this.prefix; + } + + /** + * Set the prefix property: The Prefix property. + * + * @param prefix the prefix value to set. + * @return the BlobContainersSegment object itself. + */ + public BlobContainersSegment setPrefix(String prefix) { + this.prefix = prefix; + return this; + } + + /** + * Get the marker property: The Marker property. + * + * @return the marker value. + */ + public String getMarker() { + return this.marker; + } + + /** + * Set the marker property: The Marker property. + * + * @param marker the marker value to set. + * @return the BlobContainersSegment object itself. + */ + public BlobContainersSegment setMarker(String marker) { + this.marker = marker; + return this; + } + + /** + * Get the maxResults property: The MaxResults property. + * + * @return the maxResults value. + */ + public Integer getMaxResults() { + return this.maxResults; + } + + /** + * Set the maxResults property: The MaxResults property. + * + * @param maxResults the maxResults value to set. + * @return the BlobContainersSegment object itself. + */ + public BlobContainersSegment setMaxResults(Integer maxResults) { + this.maxResults = maxResults; + 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 BlobContainersSegment object itself. + */ + public BlobContainersSegment setNextMarker(String nextMarker) { + this.nextMarker = nextMarker; + return this; + } + + /** + * Get the blobContainerItems property: The BlobContainerItems property. + * + * @return the blobContainerItems value. + */ + 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. + */ + public BlobContainersSegment setBlobContainerItems(List blobContainerItems) { + this.blobContainerItems = blobContainerItems; + return this; + } + + @Override + public XmlWriter toXml(XmlWriter xmlWriter) throws XMLStreamException { + return toXml(xmlWriter, null); + } + + @Override + public XmlWriter toXml(XmlWriter xmlWriter, String rootElementName) throws XMLStreamException { + rootElementName = CoreUtils.isNullOrEmpty(rootElementName) ? "EnumerationResults" : rootElementName; + xmlWriter.writeStartElement(rootElementName); + xmlWriter.writeStringAttribute("ServiceEndpoint", this.serviceEndpoint); + xmlWriter.writeStringElement("Prefix", this.prefix); + xmlWriter.writeStringElement("Marker", this.marker); + xmlWriter.writeNumberElement("MaxResults", this.maxResults); + xmlWriter.writeStringElement("NextMarker", this.nextMarker); + if (this.blobContainerItems != null) { + xmlWriter.writeStartElement("Containers"); + for (BlobContainerItem element : this.blobContainerItems) { + xmlWriter.writeXml(element, "Container"); + } + xmlWriter.writeEndElement(); + } + return xmlWriter.writeEndElement(); + } + + /** + * Reads an instance of BlobContainersSegment from the XmlReader. + * + * @param xmlReader The XmlReader being read. + * @return An instance of BlobContainersSegment if the XmlReader was pointing to an instance of it, or null if it + * was pointing to XML null. + * @throws XMLStreamException If an error occurs while reading the BlobContainersSegment. + */ + public static BlobContainersSegment fromXml(XmlReader xmlReader) throws XMLStreamException { + return fromXml(xmlReader, null); + } + + /** + * Reads an instance of BlobContainersSegment from the XmlReader. + * + * @param xmlReader The XmlReader being read. + * @param rootElementName Optional root element name to override the default defined by the model. Used to support + * cases where the model can deserialize from different root element names. + * @return An instance of BlobContainersSegment if the XmlReader was pointing to an instance of it, or null if it + * was pointing to XML null. + * @throws XMLStreamException If an error occurs while reading the BlobContainersSegment. + */ + public static BlobContainersSegment fromXml(XmlReader xmlReader, String rootElementName) throws XMLStreamException { + String finalRootElementName = CoreUtils.isNullOrEmpty(rootElementName) ? "EnumerationResults" : rootElementName; + return xmlReader.readObject(finalRootElementName, reader -> { + BlobContainersSegment deserializedBlobContainersSegment = new BlobContainersSegment(); + deserializedBlobContainersSegment.serviceEndpoint = reader.getStringAttribute(null, "ServiceEndpoint"); + while (reader.nextElement() != XmlToken.END_ELEMENT) { + QName elementName = reader.getElementName(); + + if ("Prefix".equals(elementName.getLocalPart())) { + deserializedBlobContainersSegment.prefix = reader.getStringElement(); + } else if ("Marker".equals(elementName.getLocalPart())) { + deserializedBlobContainersSegment.marker = reader.getStringElement(); + } else if ("MaxResults".equals(elementName.getLocalPart())) { + deserializedBlobContainersSegment.maxResults = reader.getNullableElement(Integer::parseInt); + } else if ("NextMarker".equals(elementName.getLocalPart())) { + deserializedBlobContainersSegment.nextMarker = reader.getStringElement(); + } else if ("Containers".equals(elementName.getLocalPart())) { + while (reader.nextElement() != XmlToken.END_ELEMENT) { + elementName = reader.getElementName(); + if ("Container".equals(elementName.getLocalPart())) { + if (deserializedBlobContainersSegment.blobContainerItems == null) { + deserializedBlobContainersSegment.blobContainerItems = new ArrayList<>(); + } + deserializedBlobContainersSegment.blobContainerItems + .add(BlobContainerItem.fromXml(reader, "Container")); + } else { + reader.skipElement(); + } + } + } else { + reader.skipElement(); + } + } + + return deserializedBlobContainersSegment; + }); + } +} diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlobCopySourceTagsMode.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlobCopySourceTagsMode.java new file mode 100644 index 000000000000..79278a06b505 --- /dev/null +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlobCopySourceTagsMode.java @@ -0,0 +1,64 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.storage.blob.models; + +import io.clientcore.core.util.ExpandableEnum; +import java.util.Map; +import java.util.concurrent.ConcurrentHashMap; + +/** + * Defines values for BlobCopySourceTagsMode. + */ +public final class BlobCopySourceTagsMode implements ExpandableEnum { + private static final Map VALUES = new ConcurrentHashMap<>(); + + /** + * Static value REPLACE for BlobCopySourceTagsMode. + */ + public static final BlobCopySourceTagsMode REPLACE = fromString("REPLACE"); + + /** + * Static value COPY for BlobCopySourceTagsMode. + */ + public static final BlobCopySourceTagsMode COPY = fromString("COPY"); + + private final String name; + + private BlobCopySourceTagsMode(String name) { + this.name = name; + } + + /** + * Creates or finds a BlobCopySourceTagsMode. + * + * @param name a name to look for. + * @return the corresponding BlobCopySourceTagsMode. + */ + public static BlobCopySourceTagsMode fromString(String name) { + if (name == null) { + return null; + } + BlobCopySourceTagsMode value = VALUES.get(name); + if (value != null) { + return value; + } + return VALUES.computeIfAbsent(name, key -> new BlobCopySourceTagsMode(key)); + } + + /** + * Gets the value of the BlobCopySourceTagsMode instance. + * + * @return the value of the BlobCopySourceTagsMode instance. + */ + @Override + public String getValue() { + return this.name; + } + + @Override + public String toString() { + return name; + } +} diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlobCorsRule.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlobCorsRule.java new file mode 100644 index 000000000000..d1571c086735 --- /dev/null +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlobCorsRule.java @@ -0,0 +1,235 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.storage.blob.models; + +import com.azure.core.v2.annotation.Fluent; +import com.azure.core.v2.util.CoreUtils; +import io.clientcore.core.serialization.xml.XmlReader; +import io.clientcore.core.serialization.xml.XmlSerializable; +import io.clientcore.core.serialization.xml.XmlToken; +import io.clientcore.core.serialization.xml.XmlWriter; +import javax.xml.namespace.QName; +import javax.xml.stream.XMLStreamException; + +/** + * CORS is an HTTP feature that enables a web application running under one domain to access resources in another + * 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. + */ +@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. + */ + private String allowedOrigins; + + /* + * The methods (HTTP request verbs) that the origin domain may use for a CORS request. (comma separated) + */ + private String allowedMethods; + + /* + * the request headers that the origin domain may specify on the CORS request. + */ + 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 + */ + private String exposedHeaders; + + /* + * The maximum amount time that a browser should cache the preflight OPTIONS request. + */ + private int maxAgeInSeconds; + + /** + * Creates an instance of BlobCorsRule class. + */ + public BlobCorsRule() { + } + + /** + * Get the allowedOrigins property: The origin domains that are permitted to make a request against the storage + * service via CORS. The origin domain is the domain from which the request originates. Note that the origin must be + * an exact case-sensitive match with the origin that the user age sends to the service. You can also use the + * wildcard character '*' to allow all origin domains to make requests via CORS. + * + * @return the allowedOrigins value. + */ + public String getAllowedOrigins() { + return this.allowedOrigins; + } + + /** + * 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. + * + * @param allowedOrigins the allowedOrigins value to set. + * @return the BlobCorsRule object itself. + */ + public BlobCorsRule setAllowedOrigins(String allowedOrigins) { + this.allowedOrigins = allowedOrigins; + return this; + } + + /** + * Get the allowedMethods property: The methods (HTTP request verbs) that the origin domain may use for a CORS + * request. (comma separated). + * + * @return the allowedMethods value. + */ + public String getAllowedMethods() { + return this.allowedMethods; + } + + /** + * Set the allowedMethods property: The methods (HTTP request verbs) that the origin domain may use for a CORS + * request. (comma separated). + * + * @param allowedMethods the allowedMethods value to set. + * @return the BlobCorsRule object itself. + */ + public BlobCorsRule setAllowedMethods(String allowedMethods) { + this.allowedMethods = allowedMethods; + return this; + } + + /** + * Get the allowedHeaders property: the request headers that the origin domain may specify on the CORS request. + * + * @return the allowedHeaders value. + */ + public String getAllowedHeaders() { + return this.allowedHeaders; + } + + /** + * Set the allowedHeaders property: the request headers that the origin domain may specify on the CORS request. + * + * @param allowedHeaders the allowedHeaders value to set. + * @return the BlobCorsRule object itself. + */ + public BlobCorsRule setAllowedHeaders(String allowedHeaders) { + this.allowedHeaders = allowedHeaders; + return this; + } + + /** + * Get the exposedHeaders property: The response headers that may be sent in the response to the CORS request and + * exposed by the browser to the request issuer. + * + * @return the exposedHeaders value. + */ + public String getExposedHeaders() { + return this.exposedHeaders; + } + + /** + * Set the exposedHeaders property: The response headers that may be sent in the response to the CORS request and + * exposed by the browser to the request issuer. + * + * @param exposedHeaders the exposedHeaders value to set. + * @return the BlobCorsRule object itself. + */ + public BlobCorsRule setExposedHeaders(String exposedHeaders) { + this.exposedHeaders = exposedHeaders; + return this; + } + + /** + * Get the maxAgeInSeconds property: The maximum amount time that a browser should cache the preflight OPTIONS + * request. + * + * @return the maxAgeInSeconds value. + */ + public int getMaxAgeInSeconds() { + return this.maxAgeInSeconds; + } + + /** + * Set the maxAgeInSeconds property: The maximum amount time that a browser should cache the preflight OPTIONS + * request. + * + * @param maxAgeInSeconds the maxAgeInSeconds value to set. + * @return the BlobCorsRule object itself. + */ + public BlobCorsRule setMaxAgeInSeconds(int maxAgeInSeconds) { + this.maxAgeInSeconds = maxAgeInSeconds; + return this; + } + + @Override + public XmlWriter toXml(XmlWriter xmlWriter) throws XMLStreamException { + return toXml(xmlWriter, null); + } + + @Override + public XmlWriter toXml(XmlWriter xmlWriter, String rootElementName) throws XMLStreamException { + rootElementName = CoreUtils.isNullOrEmpty(rootElementName) ? "CorsRule" : rootElementName; + xmlWriter.writeStartElement(rootElementName); + xmlWriter.writeStringElement("AllowedOrigins", this.allowedOrigins); + xmlWriter.writeStringElement("AllowedMethods", this.allowedMethods); + xmlWriter.writeStringElement("AllowedHeaders", this.allowedHeaders); + xmlWriter.writeStringElement("ExposedHeaders", this.exposedHeaders); + xmlWriter.writeIntElement("MaxAgeInSeconds", this.maxAgeInSeconds); + return xmlWriter.writeEndElement(); + } + + /** + * Reads an instance of BlobCorsRule from the XmlReader. + * + * @param xmlReader The XmlReader being read. + * @return An instance of BlobCorsRule if the XmlReader was pointing to an instance of it, or null if it was + * pointing to XML null. + * @throws XMLStreamException If an error occurs while reading the BlobCorsRule. + */ + public static BlobCorsRule fromXml(XmlReader xmlReader) throws XMLStreamException { + return fromXml(xmlReader, null); + } + + /** + * Reads an instance of BlobCorsRule from the XmlReader. + * + * @param xmlReader The XmlReader being read. + * @param rootElementName Optional root element name to override the default defined by the model. Used to support + * cases where the model can deserialize from different root element names. + * @return An instance of BlobCorsRule if the XmlReader was pointing to an instance of it, or null if it was + * pointing to XML null. + * @throws XMLStreamException If an error occurs while reading the BlobCorsRule. + */ + public static BlobCorsRule fromXml(XmlReader xmlReader, String rootElementName) throws XMLStreamException { + String finalRootElementName = CoreUtils.isNullOrEmpty(rootElementName) ? "CorsRule" : rootElementName; + return xmlReader.readObject(finalRootElementName, reader -> { + BlobCorsRule deserializedBlobCorsRule = new BlobCorsRule(); + while (reader.nextElement() != XmlToken.END_ELEMENT) { + QName elementName = reader.getElementName(); + + if ("AllowedOrigins".equals(elementName.getLocalPart())) { + deserializedBlobCorsRule.allowedOrigins = reader.getStringElement(); + } else if ("AllowedMethods".equals(elementName.getLocalPart())) { + deserializedBlobCorsRule.allowedMethods = reader.getStringElement(); + } else if ("AllowedHeaders".equals(elementName.getLocalPart())) { + deserializedBlobCorsRule.allowedHeaders = reader.getStringElement(); + } else if ("ExposedHeaders".equals(elementName.getLocalPart())) { + deserializedBlobCorsRule.exposedHeaders = reader.getStringElement(); + } else if ("MaxAgeInSeconds".equals(elementName.getLocalPart())) { + deserializedBlobCorsRule.maxAgeInSeconds = reader.getIntElement(); + } else { + reader.skipElement(); + } + } + + return deserializedBlobCorsRule; + }); + } +} diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlobDeleteType.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlobDeleteType.java new file mode 100644 index 000000000000..258cbba8b12b --- /dev/null +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlobDeleteType.java @@ -0,0 +1,59 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.storage.blob.models; + +import io.clientcore.core.util.ExpandableEnum; +import java.util.Map; +import java.util.concurrent.ConcurrentHashMap; + +/** + * Defines values for BlobDeleteType. + */ +public final class BlobDeleteType implements ExpandableEnum { + private static final Map VALUES = new ConcurrentHashMap<>(); + + /** + * Static value Permanent for BlobDeleteType. + */ + public static final BlobDeleteType PERMANENT = fromString("Permanent"); + + private final String name; + + private BlobDeleteType(String name) { + this.name = name; + } + + /** + * Creates or finds a BlobDeleteType. + * + * @param name a name to look for. + * @return the corresponding BlobDeleteType. + */ + public static BlobDeleteType fromString(String name) { + if (name == null) { + return null; + } + BlobDeleteType value = VALUES.get(name); + if (value != null) { + return value; + } + return VALUES.computeIfAbsent(name, key -> new BlobDeleteType(key)); + } + + /** + * Gets the value of the BlobDeleteType instance. + * + * @return the value of the BlobDeleteType instance. + */ + @Override + public String getValue() { + return this.name; + } + + @Override + public String toString() { + return name; + } +} diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlobErrorCode.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlobErrorCode.java new file mode 100644 index 000000000000..766cc9ec75e3 --- /dev/null +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlobErrorCode.java @@ -0,0 +1,656 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.storage.blob.models; + +import io.clientcore.core.util.ExpandableEnum; +import java.util.Map; +import java.util.concurrent.ConcurrentHashMap; + +/** + * Error codes returned by the service. + */ +public final class BlobErrorCode implements ExpandableEnum { + private static final Map VALUES = new ConcurrentHashMap<>(); + + /** + * Static value AccountAlreadyExists for BlobErrorCode. + */ + public static final BlobErrorCode ACCOUNT_ALREADY_EXISTS = fromString("AccountAlreadyExists"); + + /** + * Static value AccountBeingCreated for BlobErrorCode. + */ + public static final BlobErrorCode ACCOUNT_BEING_CREATED = fromString("AccountBeingCreated"); + + /** + * Static value AccountIsDisabled for BlobErrorCode. + */ + public static final BlobErrorCode ACCOUNT_IS_DISABLED = fromString("AccountIsDisabled"); + + /** + * Static value AuthenticationFailed for BlobErrorCode. + */ + public static final BlobErrorCode AUTHENTICATION_FAILED = fromString("AuthenticationFailed"); + + /** + * Static value AuthorizationFailure for BlobErrorCode. + */ + public static final BlobErrorCode AUTHORIZATION_FAILURE = fromString("AuthorizationFailure"); + + /** + * Static value ConditionHeadersNotSupported for BlobErrorCode. + */ + public static final BlobErrorCode CONDITION_HEADERS_NOT_SUPPORTED = fromString("ConditionHeadersNotSupported"); + + /** + * Static value ConditionNotMet for BlobErrorCode. + */ + public static final BlobErrorCode CONDITION_NOT_MET = fromString("ConditionNotMet"); + + /** + * Static value EmptyMetadataKey for BlobErrorCode. + */ + public static final BlobErrorCode EMPTY_METADATA_KEY = fromString("EmptyMetadataKey"); + + /** + * Static value InsufficientAccountPermissions for BlobErrorCode. + */ + public static final BlobErrorCode INSUFFICIENT_ACCOUNT_PERMISSIONS = fromString("InsufficientAccountPermissions"); + + /** + * Static value InternalError for BlobErrorCode. + */ + public static final BlobErrorCode INTERNAL_ERROR = fromString("InternalError"); + + /** + * Static value InvalidAuthenticationInfo for BlobErrorCode. + */ + public static final BlobErrorCode INVALID_AUTHENTICATION_INFO = fromString("InvalidAuthenticationInfo"); + + /** + * Static value InvalidHeaderValue for BlobErrorCode. + */ + public static final BlobErrorCode INVALID_HEADER_VALUE = fromString("InvalidHeaderValue"); + + /** + * Static value InvalidHttpVerb for BlobErrorCode. + */ + public static final BlobErrorCode INVALID_HTTP_VERB = fromString("InvalidHttpVerb"); + + /** + * Static value InvalidInput for BlobErrorCode. + */ + public static final BlobErrorCode INVALID_INPUT = fromString("InvalidInput"); + + /** + * Static value InvalidMd5 for BlobErrorCode. + */ + public static final BlobErrorCode INVALID_MD5 = fromString("InvalidMd5"); + + /** + * Static value InvalidMetadata for BlobErrorCode. + */ + public static final BlobErrorCode INVALID_METADATA = fromString("InvalidMetadata"); + + /** + * Static value InvalidQueryParameterValue for BlobErrorCode. + */ + public static final BlobErrorCode INVALID_QUERY_PARAMETER_VALUE = fromString("InvalidQueryParameterValue"); + + /** + * Static value InvalidRange for BlobErrorCode. + */ + public static final BlobErrorCode INVALID_RANGE = fromString("InvalidRange"); + + /** + * Static value InvalidResourceName for BlobErrorCode. + */ + public static final BlobErrorCode INVALID_RESOURCE_NAME = fromString("InvalidResourceName"); + + /** + * Static value InvalidUri for BlobErrorCode. + */ + public static final BlobErrorCode INVALID_URI = fromString("InvalidUri"); + + /** + * Static value InvalidXmlDocument for BlobErrorCode. + */ + public static final BlobErrorCode INVALID_XML_DOCUMENT = fromString("InvalidXmlDocument"); + + /** + * Static value InvalidXmlNodeValue for BlobErrorCode. + */ + public static final BlobErrorCode INVALID_XML_NODE_VALUE = fromString("InvalidXmlNodeValue"); + + /** + * Static value Md5Mismatch for BlobErrorCode. + */ + public static final BlobErrorCode MD5MISMATCH = fromString("Md5Mismatch"); + + /** + * Static value MetadataTooLarge for BlobErrorCode. + */ + public static final BlobErrorCode METADATA_TOO_LARGE = fromString("MetadataTooLarge"); + + /** + * Static value MissingContentLengthHeader for BlobErrorCode. + */ + public static final BlobErrorCode MISSING_CONTENT_LENGTH_HEADER = fromString("MissingContentLengthHeader"); + + /** + * Static value MissingRequiredQueryParameter for BlobErrorCode. + */ + public static final BlobErrorCode MISSING_REQUIRED_QUERY_PARAMETER = fromString("MissingRequiredQueryParameter"); + + /** + * Static value MissingRequiredHeader for BlobErrorCode. + */ + public static final BlobErrorCode MISSING_REQUIRED_HEADER = fromString("MissingRequiredHeader"); + + /** + * Static value MissingRequiredXmlNode for BlobErrorCode. + */ + public static final BlobErrorCode MISSING_REQUIRED_XML_NODE = fromString("MissingRequiredXmlNode"); + + /** + * Static value MultipleConditionHeadersNotSupported for BlobErrorCode. + */ + public static final BlobErrorCode MULTIPLE_CONDITION_HEADERS_NOT_SUPPORTED + = fromString("MultipleConditionHeadersNotSupported"); + + /** + * Static value OperationTimedOut for BlobErrorCode. + */ + public static final BlobErrorCode OPERATION_TIMED_OUT = fromString("OperationTimedOut"); + + /** + * Static value OutOfRangeInput for BlobErrorCode. + */ + public static final BlobErrorCode OUT_OF_RANGE_INPUT = fromString("OutOfRangeInput"); + + /** + * Static value OutOfRangeQueryParameterValue for BlobErrorCode. + */ + public static final BlobErrorCode OUT_OF_RANGE_QUERY_PARAMETER_VALUE = fromString("OutOfRangeQueryParameterValue"); + + /** + * Static value RequestBodyTooLarge for BlobErrorCode. + */ + public static final BlobErrorCode REQUEST_BODY_TOO_LARGE = fromString("RequestBodyTooLarge"); + + /** + * Static value ResourceTypeMismatch for BlobErrorCode. + */ + public static final BlobErrorCode RESOURCE_TYPE_MISMATCH = fromString("ResourceTypeMismatch"); + + /** + * Static value RequestUrlFailedToParse for BlobErrorCode. + */ + public static final BlobErrorCode REQUEST_URL_FAILED_TO_PARSE = fromString("RequestUrlFailedToParse"); + + /** + * Static value ResourceAlreadyExists for BlobErrorCode. + */ + public static final BlobErrorCode RESOURCE_ALREADY_EXISTS = fromString("ResourceAlreadyExists"); + + /** + * Static value ResourceNotFound for BlobErrorCode. + */ + public static final BlobErrorCode RESOURCE_NOT_FOUND = fromString("ResourceNotFound"); + + /** + * Static value ServerBusy for BlobErrorCode. + */ + public static final BlobErrorCode SERVER_BUSY = fromString("ServerBusy"); + + /** + * Static value UnsupportedHeader for BlobErrorCode. + */ + public static final BlobErrorCode UNSUPPORTED_HEADER = fromString("UnsupportedHeader"); + + /** + * Static value UnsupportedXmlNode for BlobErrorCode. + */ + public static final BlobErrorCode UNSUPPORTED_XML_NODE = fromString("UnsupportedXmlNode"); + + /** + * Static value UnsupportedQueryParameter for BlobErrorCode. + */ + public static final BlobErrorCode UNSUPPORTED_QUERY_PARAMETER = fromString("UnsupportedQueryParameter"); + + /** + * Static value UnsupportedHttpVerb for BlobErrorCode. + */ + public static final BlobErrorCode UNSUPPORTED_HTTP_VERB = fromString("UnsupportedHttpVerb"); + + /** + * Static value AppendPositionConditionNotMet for BlobErrorCode. + */ + public static final BlobErrorCode APPEND_POSITION_CONDITION_NOT_MET = fromString("AppendPositionConditionNotMet"); + + /** + * Static value BlobAlreadyExists for BlobErrorCode. + */ + public static final BlobErrorCode BLOB_ALREADY_EXISTS = fromString("BlobAlreadyExists"); + + /** + * Static value BlobImmutableDueToPolicy for BlobErrorCode. + */ + public static final BlobErrorCode BLOB_IMMUTABLE_DUE_TO_POLICY = fromString("BlobImmutableDueToPolicy"); + + /** + * Static value BlobNotFound for BlobErrorCode. + */ + public static final BlobErrorCode BLOB_NOT_FOUND = fromString("BlobNotFound"); + + /** + * Static value BlobOverwritten for BlobErrorCode. + */ + public static final BlobErrorCode BLOB_OVERWRITTEN = fromString("BlobOverwritten"); + + /** + * Static value BlobTierInadequateForContentLength for BlobErrorCode. + */ + public static final BlobErrorCode BLOB_TIER_INADEQUATE_FOR_CONTENT_LENGTH + = fromString("BlobTierInadequateForContentLength"); + + /** + * Static value BlobUsesCustomerSpecifiedEncryption for BlobErrorCode. + */ + public static final BlobErrorCode BLOB_USES_CUSTOMER_SPECIFIED_ENCRYPTION + = fromString("BlobUsesCustomerSpecifiedEncryption"); + + /** + * Static value BlockCountExceedsLimit for BlobErrorCode. + */ + public static final BlobErrorCode BLOCK_COUNT_EXCEEDS_LIMIT = fromString("BlockCountExceedsLimit"); + + /** + * Static value BlockListTooLong for BlobErrorCode. + */ + public static final BlobErrorCode BLOCK_LIST_TOO_LONG = fromString("BlockListTooLong"); + + /** + * Static value CannotChangeToLowerTier for BlobErrorCode. + */ + public static final BlobErrorCode CANNOT_CHANGE_TO_LOWER_TIER = fromString("CannotChangeToLowerTier"); + + /** + * Static value CannotVerifyCopySource for BlobErrorCode. + */ + public static final BlobErrorCode CANNOT_VERIFY_COPY_SOURCE = fromString("CannotVerifyCopySource"); + + /** + * Static value ContainerAlreadyExists for BlobErrorCode. + */ + public static final BlobErrorCode CONTAINER_ALREADY_EXISTS = fromString("ContainerAlreadyExists"); + + /** + * Static value ContainerBeingDeleted for BlobErrorCode. + */ + public static final BlobErrorCode CONTAINER_BEING_DELETED = fromString("ContainerBeingDeleted"); + + /** + * Static value ContainerDisabled for BlobErrorCode. + */ + public static final BlobErrorCode CONTAINER_DISABLED = fromString("ContainerDisabled"); + + /** + * Static value ContainerNotFound for BlobErrorCode. + */ + public static final BlobErrorCode CONTAINER_NOT_FOUND = fromString("ContainerNotFound"); + + /** + * Static value ContentLengthLargerThanTierLimit for BlobErrorCode. + */ + public static final BlobErrorCode CONTENT_LENGTH_LARGER_THAN_TIER_LIMIT + = fromString("ContentLengthLargerThanTierLimit"); + + /** + * Static value CopyAcrossAccountsNotSupported for BlobErrorCode. + */ + public static final BlobErrorCode COPY_ACROSS_ACCOUNTS_NOT_SUPPORTED = fromString("CopyAcrossAccountsNotSupported"); + + /** + * Static value CopyIdMismatch for BlobErrorCode. + */ + public static final BlobErrorCode COPY_ID_MISMATCH = fromString("CopyIdMismatch"); + + /** + * Static value FeatureVersionMismatch for BlobErrorCode. + */ + public static final BlobErrorCode FEATURE_VERSION_MISMATCH = fromString("FeatureVersionMismatch"); + + /** + * Static value IncrementalCopyBlobMismatch for BlobErrorCode. + */ + public static final BlobErrorCode INCREMENTAL_COPY_BLOB_MISMATCH = fromString("IncrementalCopyBlobMismatch"); + + /** + * Static value IncrementalCopyOfEarlierVersionSnapshotNotAllowed for BlobErrorCode. + */ + public static final BlobErrorCode INCREMENTAL_COPY_OF_EARLIER_VERSION_SNAPSHOT_NOT_ALLOWED + = fromString("IncrementalCopyOfEarlierVersionSnapshotNotAllowed"); + + /** + * Static value IncrementalCopySourceMustBeSnapshot for BlobErrorCode. + */ + public static final BlobErrorCode INCREMENTAL_COPY_SOURCE_MUST_BE_SNAPSHOT + = fromString("IncrementalCopySourceMustBeSnapshot"); + + /** + * Static value InfiniteLeaseDurationRequired for BlobErrorCode. + */ + public static final BlobErrorCode INFINITE_LEASE_DURATION_REQUIRED = fromString("InfiniteLeaseDurationRequired"); + + /** + * Static value InvalidBlobOrBlock for BlobErrorCode. + */ + public static final BlobErrorCode INVALID_BLOB_OR_BLOCK = fromString("InvalidBlobOrBlock"); + + /** + * Static value InvalidBlobTier for BlobErrorCode. + */ + public static final BlobErrorCode INVALID_BLOB_TIER = fromString("InvalidBlobTier"); + + /** + * Static value InvalidBlobType for BlobErrorCode. + */ + public static final BlobErrorCode INVALID_BLOB_TYPE = fromString("InvalidBlobType"); + + /** + * Static value InvalidBlockId for BlobErrorCode. + */ + public static final BlobErrorCode INVALID_BLOCK_ID = fromString("InvalidBlockId"); + + /** + * Static value InvalidBlockList for BlobErrorCode. + */ + public static final BlobErrorCode INVALID_BLOCK_LIST = fromString("InvalidBlockList"); + + /** + * Static value InvalidOperation for BlobErrorCode. + */ + public static final BlobErrorCode INVALID_OPERATION = fromString("InvalidOperation"); + + /** + * Static value InvalidPageRange for BlobErrorCode. + */ + public static final BlobErrorCode INVALID_PAGE_RANGE = fromString("InvalidPageRange"); + + /** + * Static value InvalidSourceBlobType for BlobErrorCode. + */ + public static final BlobErrorCode INVALID_SOURCE_BLOB_TYPE = fromString("InvalidSourceBlobType"); + + /** + * Static value InvalidSourceBlobUrl for BlobErrorCode. + */ + public static final BlobErrorCode INVALID_SOURCE_BLOB_URL = fromString("InvalidSourceBlobUrl"); + + /** + * Static value InvalidVersionForPageBlobOperation for BlobErrorCode. + */ + public static final BlobErrorCode INVALID_VERSION_FOR_PAGE_BLOB_OPERATION + = fromString("InvalidVersionForPageBlobOperation"); + + /** + * Static value LeaseAlreadyPresent for BlobErrorCode. + */ + public static final BlobErrorCode LEASE_ALREADY_PRESENT = fromString("LeaseAlreadyPresent"); + + /** + * Static value LeaseAlreadyBroken for BlobErrorCode. + */ + public static final BlobErrorCode LEASE_ALREADY_BROKEN = fromString("LeaseAlreadyBroken"); + + /** + * Static value LeaseIdMismatchWithBlobOperation for BlobErrorCode. + */ + public static final BlobErrorCode LEASE_ID_MISMATCH_WITH_BLOB_OPERATION + = fromString("LeaseIdMismatchWithBlobOperation"); + + /** + * Static value LeaseIdMismatchWithContainerOperation for BlobErrorCode. + */ + public static final BlobErrorCode LEASE_ID_MISMATCH_WITH_CONTAINER_OPERATION + = fromString("LeaseIdMismatchWithContainerOperation"); + + /** + * Static value LeaseIdMismatchWithLeaseOperation for BlobErrorCode. + */ + public static final BlobErrorCode LEASE_ID_MISMATCH_WITH_LEASE_OPERATION + = fromString("LeaseIdMismatchWithLeaseOperation"); + + /** + * Static value LeaseIdMissing for BlobErrorCode. + */ + public static final BlobErrorCode LEASE_ID_MISSING = fromString("LeaseIdMissing"); + + /** + * Static value LeaseIsBreakingAndCannotBeAcquired for BlobErrorCode. + */ + public static final BlobErrorCode LEASE_IS_BREAKING_AND_CANNOT_BE_ACQUIRED + = fromString("LeaseIsBreakingAndCannotBeAcquired"); + + /** + * Static value LeaseIsBreakingAndCannotBeChanged for BlobErrorCode. + */ + public static final BlobErrorCode LEASE_IS_BREAKING_AND_CANNOT_BE_CHANGED + = fromString("LeaseIsBreakingAndCannotBeChanged"); + + /** + * Static value LeaseIsBrokenAndCannotBeRenewed for BlobErrorCode. + */ + public static final BlobErrorCode LEASE_IS_BROKEN_AND_CANNOT_BE_RENEWED + = fromString("LeaseIsBrokenAndCannotBeRenewed"); + + /** + * Static value LeaseLost for BlobErrorCode. + */ + public static final BlobErrorCode LEASE_LOST = fromString("LeaseLost"); + + /** + * Static value LeaseNotPresentWithBlobOperation for BlobErrorCode. + */ + public static final BlobErrorCode LEASE_NOT_PRESENT_WITH_BLOB_OPERATION + = fromString("LeaseNotPresentWithBlobOperation"); + + /** + * Static value LeaseNotPresentWithContainerOperation for BlobErrorCode. + */ + public static final BlobErrorCode LEASE_NOT_PRESENT_WITH_CONTAINER_OPERATION + = fromString("LeaseNotPresentWithContainerOperation"); + + /** + * Static value LeaseNotPresentWithLeaseOperation for BlobErrorCode. + */ + public static final BlobErrorCode LEASE_NOT_PRESENT_WITH_LEASE_OPERATION + = fromString("LeaseNotPresentWithLeaseOperation"); + + /** + * Static value MaxBlobSizeConditionNotMet for BlobErrorCode. + */ + public static final BlobErrorCode MAX_BLOB_SIZE_CONDITION_NOT_MET = fromString("MaxBlobSizeConditionNotMet"); + + /** + * Static value NoAuthenticationInformation for BlobErrorCode. + */ + public static final BlobErrorCode NO_AUTHENTICATION_INFORMATION = fromString("NoAuthenticationInformation"); + + /** + * Static value NoPendingCopyOperation for BlobErrorCode. + */ + public static final BlobErrorCode NO_PENDING_COPY_OPERATION = fromString("NoPendingCopyOperation"); + + /** + * Static value OperationNotAllowedOnIncrementalCopyBlob for BlobErrorCode. + */ + public static final BlobErrorCode OPERATION_NOT_ALLOWED_ON_INCREMENTAL_COPY_BLOB + = fromString("OperationNotAllowedOnIncrementalCopyBlob"); + + /** + * Static value PendingCopyOperation for BlobErrorCode. + */ + public static final BlobErrorCode PENDING_COPY_OPERATION = fromString("PendingCopyOperation"); + + /** + * Static value PreviousSnapshotCannotBeNewer for BlobErrorCode. + */ + public static final BlobErrorCode PREVIOUS_SNAPSHOT_CANNOT_BE_NEWER = fromString("PreviousSnapshotCannotBeNewer"); + + /** + * Static value PreviousSnapshotNotFound for BlobErrorCode. + */ + public static final BlobErrorCode PREVIOUS_SNAPSHOT_NOT_FOUND = fromString("PreviousSnapshotNotFound"); + + /** + * Static value PreviousSnapshotOperationNotSupported for BlobErrorCode. + */ + public static final BlobErrorCode PREVIOUS_SNAPSHOT_OPERATION_NOT_SUPPORTED + = fromString("PreviousSnapshotOperationNotSupported"); + + /** + * Static value SequenceNumberConditionNotMet for BlobErrorCode. + */ + public static final BlobErrorCode SEQUENCE_NUMBER_CONDITION_NOT_MET = fromString("SequenceNumberConditionNotMet"); + + /** + * Static value SequenceNumberIncrementTooLarge for BlobErrorCode. + */ + public static final BlobErrorCode SEQUENCE_NUMBER_INCREMENT_TOO_LARGE + = fromString("SequenceNumberIncrementTooLarge"); + + /** + * Static value SnapshotCountExceeded for BlobErrorCode. + */ + public static final BlobErrorCode SNAPSHOT_COUNT_EXCEEDED = fromString("SnapshotCountExceeded"); + + /** + * Static value SnapshotOperationRateExceeded for BlobErrorCode. + */ + public static final BlobErrorCode SNAPSHOT_OPERATION_RATE_EXCEEDED = fromString("SnapshotOperationRateExceeded"); + + /** + * Static value SnapshotsPresent for BlobErrorCode. + */ + public static final BlobErrorCode SNAPSHOTS_PRESENT = fromString("SnapshotsPresent"); + + /** + * Static value SourceConditionNotMet for BlobErrorCode. + */ + public static final BlobErrorCode SOURCE_CONDITION_NOT_MET = fromString("SourceConditionNotMet"); + + /** + * Static value SystemInUse for BlobErrorCode. + */ + public static final BlobErrorCode SYSTEM_IN_USE = fromString("SystemInUse"); + + /** + * Static value TargetConditionNotMet for BlobErrorCode. + */ + public static final BlobErrorCode TARGET_CONDITION_NOT_MET = fromString("TargetConditionNotMet"); + + /** + * Static value UnauthorizedBlobOverwrite for BlobErrorCode. + */ + public static final BlobErrorCode UNAUTHORIZED_BLOB_OVERWRITE = fromString("UnauthorizedBlobOverwrite"); + + /** + * Static value BlobBeingRehydrated for BlobErrorCode. + */ + public static final BlobErrorCode BLOB_BEING_REHYDRATED = fromString("BlobBeingRehydrated"); + + /** + * Static value BlobArchived for BlobErrorCode. + */ + public static final BlobErrorCode BLOB_ARCHIVED = fromString("BlobArchived"); + + /** + * Static value BlobNotArchived for BlobErrorCode. + */ + public static final BlobErrorCode BLOB_NOT_ARCHIVED = fromString("BlobNotArchived"); + + /** + * Static value AuthorizationSourceIPMismatch for BlobErrorCode. + */ + public static final BlobErrorCode AUTHORIZATION_SOURCE_IPMISMATCH = fromString("AuthorizationSourceIPMismatch"); + + /** + * Static value AuthorizationProtocolMismatch for BlobErrorCode. + */ + public static final BlobErrorCode AUTHORIZATION_PROTOCOL_MISMATCH = fromString("AuthorizationProtocolMismatch"); + + /** + * Static value AuthorizationPermissionMismatch for BlobErrorCode. + */ + public static final BlobErrorCode AUTHORIZATION_PERMISSION_MISMATCH = fromString("AuthorizationPermissionMismatch"); + + /** + * Static value AuthorizationServiceMismatch for BlobErrorCode. + */ + public static final BlobErrorCode AUTHORIZATION_SERVICE_MISMATCH = fromString("AuthorizationServiceMismatch"); + + /** + * Static value AuthorizationResourceTypeMismatch for BlobErrorCode. + */ + public static final BlobErrorCode AUTHORIZATION_RESOURCE_TYPE_MISMATCH + = fromString("AuthorizationResourceTypeMismatch"); + + /** + * Static value BlobAccessTierNotSupportedForAccountType for BlobErrorCode. + */ + public static final BlobErrorCode BLOB_ACCESS_TIER_NOT_SUPPORTED_FOR_ACCOUNT_TYPE + = fromString("BlobAccessTierNotSupportedForAccountType"); + + /** + * Static value SnaphotOperationRateExceeded for BlobErrorCode. + */ + public static final BlobErrorCode SNAPHOT_OPERATION_RATE_EXCEEDED = fromString("SnaphotOperationRateExceeded"); + + /** + * Static value IncrementalCopyOfEralierVersionSnapshotNotAllowed for BlobErrorCode. + */ + public static final BlobErrorCode INCREMENTAL_COPY_OF_ERALIER_VERSION_SNAPSHOT_NOT_ALLOWED + = fromString("IncrementalCopyOfEralierVersionSnapshotNotAllowed"); + + private final String name; + + private BlobErrorCode(String name) { + this.name = name; + } + + /** + * Creates or finds a BlobErrorCode. + * + * @param name a name to look for. + * @return the corresponding BlobErrorCode. + */ + public static BlobErrorCode fromString(String name) { + if (name == null) { + return null; + } + BlobErrorCode value = VALUES.get(name); + if (value != null) { + return value; + } + return VALUES.computeIfAbsent(name, key -> new BlobErrorCode(key)); + } + + /** + * Gets the value of the BlobErrorCode instance. + * + * @return the value of the BlobErrorCode instance. + */ + @Override + public String getValue() { + return this.name; + } + + @Override + public String toString() { + return name; + } +} diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlobExpiryOptions.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlobExpiryOptions.java new file mode 100644 index 000000000000..080412d75e2c --- /dev/null +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlobExpiryOptions.java @@ -0,0 +1,74 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.storage.blob.models; + +import io.clientcore.core.util.ExpandableEnum; +import java.util.Map; +import java.util.concurrent.ConcurrentHashMap; + +/** + * Defines values for BlobExpiryOptions. + */ +public final class BlobExpiryOptions implements ExpandableEnum { + private static final Map VALUES = new ConcurrentHashMap<>(); + + /** + * Static value NeverExpire for BlobExpiryOptions. + */ + public static final BlobExpiryOptions NEVER_EXPIRE = fromString("NeverExpire"); + + /** + * Static value RelativeToCreation for BlobExpiryOptions. + */ + public static final BlobExpiryOptions RELATIVE_TO_CREATION = fromString("RelativeToCreation"); + + /** + * Static value RelativeToNow for BlobExpiryOptions. + */ + public static final BlobExpiryOptions RELATIVE_TO_NOW = fromString("RelativeToNow"); + + /** + * Static value Absolute for BlobExpiryOptions. + */ + public static final BlobExpiryOptions ABSOLUTE = fromString("Absolute"); + + private final String name; + + private BlobExpiryOptions(String name) { + this.name = name; + } + + /** + * Creates or finds a BlobExpiryOptions. + * + * @param name a name to look for. + * @return the corresponding BlobExpiryOptions. + */ + public static BlobExpiryOptions fromString(String name) { + if (name == null) { + return null; + } + BlobExpiryOptions value = VALUES.get(name); + if (value != null) { + return value; + } + return VALUES.computeIfAbsent(name, key -> new BlobExpiryOptions(key)); + } + + /** + * Gets the value of the BlobExpiryOptions instance. + * + * @return the value of the BlobExpiryOptions instance. + */ + @Override + public String getValue() { + return this.name; + } + + @Override + public String toString() { + return name; + } +} diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlobFlatListSegment.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlobFlatListSegment.java new file mode 100644 index 000000000000..0873ed5d0987 --- /dev/null +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlobFlatListSegment.java @@ -0,0 +1,110 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.storage.blob.models; + +import com.azure.core.v2.annotation.Fluent; +import com.azure.core.v2.util.CoreUtils; +import io.clientcore.core.serialization.xml.XmlReader; +import io.clientcore.core.serialization.xml.XmlSerializable; +import io.clientcore.core.serialization.xml.XmlToken; +import io.clientcore.core.serialization.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. + */ + private List blobItems = new ArrayList<>(); + + /** + * Creates an instance of BlobFlatListSegment class. + */ + public BlobFlatListSegment() { + } + + /** + * Get the blobItems property: The BlobItems property. + * + * @return the blobItems value. + */ + 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. + */ + public BlobFlatListSegment setBlobItems(List blobItems) { + this.blobItems = blobItems; + return this; + } + + @Override + public XmlWriter toXml(XmlWriter xmlWriter) throws XMLStreamException { + return toXml(xmlWriter, null); + } + + @Override + public XmlWriter toXml(XmlWriter xmlWriter, String rootElementName) throws XMLStreamException { + rootElementName = CoreUtils.isNullOrEmpty(rootElementName) ? "Blobs" : rootElementName; + xmlWriter.writeStartElement(rootElementName); + if (this.blobItems != null) { + for (BlobItemInternal element : this.blobItems) { + xmlWriter.writeXml(element, "Blob"); + } + } + return xmlWriter.writeEndElement(); + } + + /** + * Reads an instance of BlobFlatListSegment from the XmlReader. + * + * @param xmlReader The XmlReader being read. + * @return An instance of BlobFlatListSegment if the XmlReader was pointing to an instance of it, or null if it was + * pointing to XML null. + * @throws XMLStreamException If an error occurs while reading the BlobFlatListSegment. + */ + public static BlobFlatListSegment fromXml(XmlReader xmlReader) throws XMLStreamException { + return fromXml(xmlReader, null); + } + + /** + * Reads an instance of BlobFlatListSegment from the XmlReader. + * + * @param xmlReader The XmlReader being read. + * @param rootElementName Optional root element name to override the default defined by the model. Used to support + * cases where the model can deserialize from different root element names. + * @return An instance of BlobFlatListSegment if the XmlReader was pointing to an instance of it, or null if it was + * pointing to XML null. + * @throws XMLStreamException If an error occurs while reading the BlobFlatListSegment. + */ + public static BlobFlatListSegment fromXml(XmlReader xmlReader, String rootElementName) throws XMLStreamException { + String finalRootElementName = CoreUtils.isNullOrEmpty(rootElementName) ? "Blobs" : rootElementName; + return xmlReader.readObject(finalRootElementName, reader -> { + BlobFlatListSegment deserializedBlobFlatListSegment = new BlobFlatListSegment(); + while (reader.nextElement() != XmlToken.END_ELEMENT) { + QName elementName = reader.getElementName(); + + if ("Blob".equals(elementName.getLocalPart())) { + deserializedBlobFlatListSegment.blobItems.add(BlobItemInternal.fromXml(reader, "Blob")); + } else { + reader.skipElement(); + } + } + + return deserializedBlobFlatListSegment; + }); + } +} diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlobHierarchyListSegment.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlobHierarchyListSegment.java new file mode 100644 index 000000000000..f24505596eb5 --- /dev/null +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlobHierarchyListSegment.java @@ -0,0 +1,144 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.storage.blob.models; + +import com.azure.core.v2.annotation.Fluent; +import com.azure.core.v2.util.CoreUtils; +import io.clientcore.core.serialization.xml.XmlReader; +import io.clientcore.core.serialization.xml.XmlSerializable; +import io.clientcore.core.serialization.xml.XmlToken; +import io.clientcore.core.serialization.xml.XmlWriter; +import java.util.ArrayList; +import java.util.List; +import javax.xml.namespace.QName; +import javax.xml.stream.XMLStreamException; + +/** + * The BlobHierarchyListSegment model. + */ +@Fluent +public final class BlobHierarchyListSegment implements XmlSerializable { + /* + * The BlobPrefixes property. + */ + private List blobPrefixes = new ArrayList<>(); + + /* + * The BlobItems property. + */ + private List blobItems = new ArrayList<>(); + + /** + * Creates an instance of BlobHierarchyListSegment class. + */ + public BlobHierarchyListSegment() { + } + + /** + * Get the blobPrefixes property: The BlobPrefixes property. + * + * @return the blobPrefixes value. + */ + 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. + */ + public BlobHierarchyListSegment setBlobPrefixes(List blobPrefixes) { + this.blobPrefixes = blobPrefixes; + return this; + } + + /** + * Get the blobItems property: The BlobItems property. + * + * @return the blobItems value. + */ + public List getBlobItems() { + return this.blobItems; + } + + /** + * Set the blobItems property: The BlobItems property. + * + * @param blobItems the blobItems value to set. + * @return the BlobHierarchyListSegment object itself. + */ + public BlobHierarchyListSegment setBlobItems(List blobItems) { + this.blobItems = blobItems; + return this; + } + + @Override + public XmlWriter toXml(XmlWriter xmlWriter) throws XMLStreamException { + return toXml(xmlWriter, null); + } + + @Override + public XmlWriter toXml(XmlWriter xmlWriter, String rootElementName) throws XMLStreamException { + rootElementName = CoreUtils.isNullOrEmpty(rootElementName) ? "Blobs" : rootElementName; + xmlWriter.writeStartElement(rootElementName); + if (this.blobPrefixes != null) { + for (BlobPrefixInternal element : this.blobPrefixes) { + xmlWriter.writeXml(element, "BlobPrefix"); + } + } + if (this.blobItems != null) { + for (BlobItemInternal element : this.blobItems) { + xmlWriter.writeXml(element, "Blob"); + } + } + return xmlWriter.writeEndElement(); + } + + /** + * Reads an instance of BlobHierarchyListSegment from the XmlReader. + * + * @param xmlReader The XmlReader being read. + * @return An instance of BlobHierarchyListSegment if the XmlReader was pointing to an instance of it, or null if it + * was pointing to XML null. + * @throws XMLStreamException If an error occurs while reading the BlobHierarchyListSegment. + */ + public static BlobHierarchyListSegment fromXml(XmlReader xmlReader) throws XMLStreamException { + return fromXml(xmlReader, null); + } + + /** + * Reads an instance of BlobHierarchyListSegment from the XmlReader. + * + * @param xmlReader The XmlReader being read. + * @param rootElementName Optional root element name to override the default defined by the model. Used to support + * cases where the model can deserialize from different root element names. + * @return An instance of BlobHierarchyListSegment if the XmlReader was pointing to an instance of it, or null if it + * was pointing to XML null. + * @throws XMLStreamException If an error occurs while reading the BlobHierarchyListSegment. + */ + public static BlobHierarchyListSegment fromXml(XmlReader xmlReader, String rootElementName) + throws XMLStreamException { + String finalRootElementName = CoreUtils.isNullOrEmpty(rootElementName) ? "Blobs" : rootElementName; + return xmlReader.readObject(finalRootElementName, reader -> { + BlobHierarchyListSegment deserializedBlobHierarchyListSegment = new BlobHierarchyListSegment(); + while (reader.nextElement() != XmlToken.END_ELEMENT) { + QName elementName = reader.getElementName(); + + if ("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(); + } + } + + return deserializedBlobHierarchyListSegment; + }); + } +} diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlobHttpHeaders.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlobHttpHeaders.java new file mode 100644 index 000000000000..4c76fd93dcc9 --- /dev/null +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlobHttpHeaders.java @@ -0,0 +1,188 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.storage.blob.models; + +import com.azure.core.v2.annotation.Fluent; +import com.azure.core.v2.util.CoreUtils; + +/** + * Parameter group. + */ +@Fluent +public final class BlobHttpHeaders { + /* + * Optional. Sets the blob's cache control. If specified, this property is stored with the blob and returned with a + * read request. + */ + private String cacheControl; + + /* + * Optional. Sets the blob's content type. If specified, this property is stored with the blob and returned with a + * read request. + */ + private String contentType; + + /* + * Optional. An MD5 hash of the blob content. Note that this hash is not validated, as the hashes for the individual + * blocks were validated when each was uploaded. The value does not need to be base64 encoded as the SDK will + * perform the encoding. + */ + private byte[] contentMd5; + + /* + * Optional. Sets the blob's content encoding. If specified, this property is stored with the blob and returned with + * a read request. + */ + private String contentEncoding; + + /* + * Optional. Set the blob's content language. If specified, this property is stored with the blob and returned with + * a read request. + */ + private String contentLanguage; + + /* + * Optional. Sets the blob's Content-Disposition header. + */ + private String contentDisposition; + + /** + * Creates an instance of BlobHttpHeaders class. + */ + public BlobHttpHeaders() { + } + + /** + * Get the cacheControl property: Optional. Sets the blob's cache control. If specified, this property is stored + * with the blob and returned with a read request. + * + * @return the cacheControl value. + */ + public String getCacheControl() { + return this.cacheControl; + } + + /** + * Set the cacheControl property: Optional. Sets the blob's cache control. If specified, this property is stored + * with the blob and returned with a read request. + * + * @param cacheControl the cacheControl value to set. + * @return the BlobHttpHeaders object itself. + */ + public BlobHttpHeaders setCacheControl(String cacheControl) { + this.cacheControl = cacheControl; + return this; + } + + /** + * Get the contentType property: Optional. Sets the blob's content type. If specified, this property is stored with + * the blob and returned with a read request. + * + * @return the contentType value. + */ + public String getContentType() { + return this.contentType; + } + + /** + * Set the contentType property: Optional. Sets the blob's content type. If specified, this property is stored with + * the blob and returned with a read request. + * + * @param contentType the contentType value to set. + * @return the BlobHttpHeaders object itself. + */ + public BlobHttpHeaders setContentType(String contentType) { + this.contentType = contentType; + return this; + } + + /** + * Get the contentMd5 property: Optional. An MD5 hash of the blob content. Note that this hash is not validated, as + * the hashes for the individual blocks were validated when each was uploaded. The value does not need to be base64 + * encoded as the SDK will perform the encoding. + * + * @return the contentMd5 value. + */ + public byte[] getContentMd5() { + return CoreUtils.clone(this.contentMd5); + } + + /** + * Set the contentMd5 property: Optional. An MD5 hash of the blob content. Note that this hash is not validated, as + * the hashes for the individual blocks were validated when each was uploaded. The value does not need to be base64 + * encoded as the SDK will perform the encoding. + * + * @param contentMd5 the contentMd5 value to set. + * @return the BlobHttpHeaders object itself. + */ + public BlobHttpHeaders setContentMd5(byte[] contentMd5) { + this.contentMd5 = CoreUtils.clone(contentMd5); + return this; + } + + /** + * Get the contentEncoding property: Optional. Sets the blob's content encoding. If specified, this property is + * stored with the blob and returned with a read request. + * + * @return the contentEncoding value. + */ + public String getContentEncoding() { + return this.contentEncoding; + } + + /** + * Set the contentEncoding property: Optional. Sets the blob's content encoding. If specified, this property is + * stored with the blob and returned with a read request. + * + * @param contentEncoding the contentEncoding value to set. + * @return the BlobHttpHeaders object itself. + */ + public BlobHttpHeaders setContentEncoding(String contentEncoding) { + this.contentEncoding = contentEncoding; + return this; + } + + /** + * Get the contentLanguage property: Optional. Set the blob's content language. If specified, this property is + * stored with the blob and returned with a read request. + * + * @return the contentLanguage value. + */ + public String getContentLanguage() { + return this.contentLanguage; + } + + /** + * Set the contentLanguage property: Optional. Set the blob's content language. If specified, this property is + * stored with the blob and returned with a read request. + * + * @param contentLanguage the contentLanguage value to set. + * @return the BlobHttpHeaders object itself. + */ + public BlobHttpHeaders setContentLanguage(String contentLanguage) { + this.contentLanguage = contentLanguage; + return this; + } + + /** + * Get the contentDisposition property: Optional. Sets the blob's Content-Disposition header. + * + * @return the contentDisposition value. + */ + public String getContentDisposition() { + return this.contentDisposition; + } + + /** + * Set the contentDisposition property: Optional. Sets the blob's Content-Disposition header. + * + * @param contentDisposition the contentDisposition value to set. + * @return the BlobHttpHeaders object itself. + */ + public BlobHttpHeaders setContentDisposition(String contentDisposition) { + this.contentDisposition = contentDisposition; + return this; + } +} diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlobImmutabilityPolicyMode.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlobImmutabilityPolicyMode.java new file mode 100644 index 000000000000..cdbf65dad1d0 --- /dev/null +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlobImmutabilityPolicyMode.java @@ -0,0 +1,61 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.storage.blob.models; + +/** + * Defines values for BlobImmutabilityPolicyMode. + */ +public enum BlobImmutabilityPolicyMode { + /** + * Enum value Mutable. + */ + MUTABLE("Mutable"), + + /** + * Enum value Unlocked. + */ + UNLOCKED("Unlocked"), + + /** + * Enum value Locked. + */ + LOCKED("Locked"); + + /** + * The actual serialized value for a BlobImmutabilityPolicyMode instance. + */ + private final String value; + + BlobImmutabilityPolicyMode(String value) { + this.value = value; + } + + /** + * 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. + */ + public static BlobImmutabilityPolicyMode fromString(String value) { + if (value == null) { + return null; + } + BlobImmutabilityPolicyMode[] items = BlobImmutabilityPolicyMode.values(); + for (BlobImmutabilityPolicyMode 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-v2/src/main/java/com/azure/storage/blob/models/BlobItemInternal.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlobItemInternal.java new file mode 100644 index 000000000000..40ce02defc28 --- /dev/null +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlobItemInternal.java @@ -0,0 +1,410 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.storage.blob.models; + +import com.azure.core.v2.annotation.Fluent; +import com.azure.core.v2.util.CoreUtils; +import io.clientcore.core.serialization.xml.XmlReader; +import io.clientcore.core.serialization.xml.XmlSerializable; +import io.clientcore.core.serialization.xml.XmlToken; +import io.clientcore.core.serialization.xml.XmlWriter; +import java.util.LinkedHashMap; +import java.util.Map; +import javax.xml.namespace.QName; +import javax.xml.stream.XMLStreamException; + +/** + * An Azure Storage blob. + */ +@Fluent +public final class BlobItemInternal implements XmlSerializable { + /* + * The Name property. + */ + private BlobName name; + + /* + * The Deleted property. + */ + private boolean deleted; + + /* + * The Snapshot property. + */ + private String snapshot; + + /* + * The VersionId property. + */ + private String versionId; + + /* + * The IsCurrentVersion property. + */ + private Boolean isCurrentVersion; + + /* + * Properties of a blob + */ + private BlobItemPropertiesInternal properties; + + /* + * Dictionary of + */ + private Map metadata; + + /* + * Blob tags + */ + private BlobTags blobTags; + + /* + * Dictionary of + */ + private Map objectReplicationMetadata; + + /* + * The HasVersionsOnly property. + */ + private Boolean hasVersionsOnly; + + /* + * The IsPrefix property. + */ + private Boolean isPrefix; + + /** + * Creates an instance of BlobItemInternal class. + */ + public BlobItemInternal() { + } + + /** + * Get the name property: The Name property. + * + * @return the name value. + */ + public BlobName getName() { + return this.name; + } + + /** + * Set the name property: The Name property. + * + * @param name the name value to set. + * @return the BlobItemInternal object itself. + */ + public BlobItemInternal setName(BlobName name) { + this.name = name; + return this; + } + + /** + * Get the deleted property: The Deleted property. + * + * @return the deleted value. + */ + public boolean isDeleted() { + return this.deleted; + } + + /** + * Set the deleted property: The Deleted property. + * + * @param deleted the deleted value to set. + * @return the BlobItemInternal object itself. + */ + public BlobItemInternal setDeleted(boolean deleted) { + this.deleted = deleted; + return this; + } + + /** + * Get the snapshot property: The Snapshot property. + * + * @return the snapshot value. + */ + public String getSnapshot() { + return this.snapshot; + } + + /** + * Set the snapshot property: The Snapshot property. + * + * @param snapshot the snapshot value to set. + * @return the BlobItemInternal object itself. + */ + public BlobItemInternal setSnapshot(String snapshot) { + this.snapshot = snapshot; + return this; + } + + /** + * Get the versionId property: The VersionId property. + * + * @return the versionId value. + */ + public String getVersionId() { + return this.versionId; + } + + /** + * Set the versionId property: The VersionId property. + * + * @param versionId the versionId value to set. + * @return the BlobItemInternal object itself. + */ + public BlobItemInternal setVersionId(String versionId) { + this.versionId = versionId; + return this; + } + + /** + * Get the isCurrentVersion property: The IsCurrentVersion property. + * + * @return the isCurrentVersion value. + */ + public Boolean isCurrentVersion() { + return this.isCurrentVersion; + } + + /** + * Set the isCurrentVersion property: The IsCurrentVersion property. + * + * @param isCurrentVersion the isCurrentVersion value to set. + * @return the BlobItemInternal object itself. + */ + public BlobItemInternal setIsCurrentVersion(Boolean isCurrentVersion) { + this.isCurrentVersion = isCurrentVersion; + return this; + } + + /** + * Get the properties property: Properties of a blob. + * + * @return the properties value. + */ + public BlobItemPropertiesInternal getProperties() { + return this.properties; + } + + /** + * Set the properties property: Properties of a blob. + * + * @param properties the properties value to set. + * @return the BlobItemInternal object itself. + */ + public BlobItemInternal setProperties(BlobItemPropertiesInternal properties) { + this.properties = properties; + return this; + } + + /** + * Get the metadata property: Dictionary of <string>. + * + * @return the metadata value. + */ + public Map getMetadata() { + return this.metadata; + } + + /** + * Set the metadata property: Dictionary of <string>. + * + * @param metadata the metadata value to set. + * @return the BlobItemInternal object itself. + */ + public BlobItemInternal setMetadata(Map metadata) { + this.metadata = metadata; + return this; + } + + /** + * Get the blobTags property: Blob tags. + * + * @return the blobTags value. + */ + public BlobTags getBlobTags() { + return this.blobTags; + } + + /** + * Set the blobTags property: Blob tags. + * + * @param blobTags the blobTags value to set. + * @return the BlobItemInternal object itself. + */ + public BlobItemInternal setBlobTags(BlobTags blobTags) { + this.blobTags = blobTags; + return this; + } + + /** + * Get the objectReplicationMetadata property: Dictionary of <string>. + * + * @return the objectReplicationMetadata value. + */ + public Map getObjectReplicationMetadata() { + return this.objectReplicationMetadata; + } + + /** + * Set the objectReplicationMetadata property: Dictionary of <string>. + * + * @param objectReplicationMetadata the objectReplicationMetadata value to set. + * @return the BlobItemInternal object itself. + */ + public BlobItemInternal setObjectReplicationMetadata(Map objectReplicationMetadata) { + this.objectReplicationMetadata = objectReplicationMetadata; + return this; + } + + /** + * Get the hasVersionsOnly property: The HasVersionsOnly property. + * + * @return the hasVersionsOnly value. + */ + public Boolean isHasVersionsOnly() { + return this.hasVersionsOnly; + } + + /** + * Set the hasVersionsOnly property: The HasVersionsOnly property. + * + * @param hasVersionsOnly the hasVersionsOnly value to set. + * @return the BlobItemInternal object itself. + */ + public BlobItemInternal setHasVersionsOnly(Boolean hasVersionsOnly) { + this.hasVersionsOnly = hasVersionsOnly; + return this; + } + + /** + * Get the isPrefix property: The IsPrefix property. + * + * @return the isPrefix value. + */ + 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. + */ + public BlobItemInternal setIsPrefix(Boolean isPrefix) { + this.isPrefix = isPrefix; + return this; + } + + @Override + public XmlWriter toXml(XmlWriter xmlWriter) throws XMLStreamException { + return toXml(xmlWriter, null); + } + + @Override + public XmlWriter toXml(XmlWriter xmlWriter, String rootElementName) throws XMLStreamException { + rootElementName = CoreUtils.isNullOrEmpty(rootElementName) ? "Blob" : rootElementName; + xmlWriter.writeStartElement(rootElementName); + xmlWriter.writeXml(this.name, "Name"); + xmlWriter.writeBooleanElement("Deleted", this.deleted); + xmlWriter.writeStringElement("Snapshot", this.snapshot); + xmlWriter.writeStringElement("VersionId", this.versionId); + xmlWriter.writeBooleanElement("IsCurrentVersion", this.isCurrentVersion); + xmlWriter.writeXml(this.properties, "Properties"); + if (this.metadata != null) { + xmlWriter.writeStartElement("Metadata"); + for (Map.Entry entry : this.metadata.entrySet()) { + xmlWriter.writeStringElement(entry.getKey(), entry.getValue()); + } + xmlWriter.writeEndElement(); + } + xmlWriter.writeXml(this.blobTags, "Tags"); + if (this.objectReplicationMetadata != null) { + xmlWriter.writeStartElement("OrMetadata"); + for (Map.Entry entry : this.objectReplicationMetadata.entrySet()) { + xmlWriter.writeStringElement(entry.getKey(), entry.getValue()); + } + xmlWriter.writeEndElement(); + } + xmlWriter.writeBooleanElement("HasVersionsOnly", this.hasVersionsOnly); + xmlWriter.writeBooleanElement("IsPrefix", this.isPrefix); + return xmlWriter.writeEndElement(); + } + + /** + * Reads an instance of BlobItemInternal from the XmlReader. + * + * @param xmlReader The XmlReader being read. + * @return An instance of BlobItemInternal if the XmlReader was pointing to an instance of it, or null if it was + * pointing to XML null. + * @throws XMLStreamException If an error occurs while reading the BlobItemInternal. + */ + public static BlobItemInternal fromXml(XmlReader xmlReader) throws XMLStreamException { + return fromXml(xmlReader, null); + } + + /** + * Reads an instance of BlobItemInternal from the XmlReader. + * + * @param xmlReader The XmlReader being read. + * @param rootElementName Optional root element name to override the default defined by the model. Used to support + * cases where the model can deserialize from different root element names. + * @return An instance of BlobItemInternal if the XmlReader was pointing to an instance of it, or null if it was + * pointing to XML null. + * @throws XMLStreamException If an error occurs while reading the BlobItemInternal. + */ + public static BlobItemInternal fromXml(XmlReader xmlReader, String rootElementName) throws XMLStreamException { + String finalRootElementName = CoreUtils.isNullOrEmpty(rootElementName) ? "Blob" : rootElementName; + return xmlReader.readObject(finalRootElementName, reader -> { + BlobItemInternal deserializedBlobItemInternal = new BlobItemInternal(); + while (reader.nextElement() != XmlToken.END_ELEMENT) { + QName elementName = reader.getElementName(); + + if ("Name".equals(elementName.getLocalPart())) { + deserializedBlobItemInternal.name = BlobName.fromXml(reader, "Name"); + } else if ("Deleted".equals(elementName.getLocalPart())) { + deserializedBlobItemInternal.deleted = reader.getBooleanElement(); + } else if ("Snapshot".equals(elementName.getLocalPart())) { + deserializedBlobItemInternal.snapshot = reader.getStringElement(); + } else if ("VersionId".equals(elementName.getLocalPart())) { + deserializedBlobItemInternal.versionId = reader.getStringElement(); + } else if ("IsCurrentVersion".equals(elementName.getLocalPart())) { + deserializedBlobItemInternal.isCurrentVersion = reader.getNullableElement(Boolean::parseBoolean); + } else if ("Properties".equals(elementName.getLocalPart())) { + deserializedBlobItemInternal.properties = BlobItemPropertiesInternal.fromXml(reader, "Properties"); + } else if ("Metadata".equals(elementName.getLocalPart())) { + while (reader.nextElement() != XmlToken.END_ELEMENT) { + if (deserializedBlobItemInternal.metadata == null) { + deserializedBlobItemInternal.metadata = new LinkedHashMap<>(); + } + deserializedBlobItemInternal.metadata.put(reader.getElementName().getLocalPart(), + reader.getStringElement()); + } + } else if ("Tags".equals(elementName.getLocalPart())) { + deserializedBlobItemInternal.blobTags = BlobTags.fromXml(reader, "Tags"); + } else if ("OrMetadata".equals(elementName.getLocalPart())) { + while (reader.nextElement() != XmlToken.END_ELEMENT) { + if (deserializedBlobItemInternal.objectReplicationMetadata == null) { + deserializedBlobItemInternal.objectReplicationMetadata = new LinkedHashMap<>(); + } + deserializedBlobItemInternal.objectReplicationMetadata + .put(reader.getElementName().getLocalPart(), reader.getStringElement()); + } + } else if ("HasVersionsOnly".equals(elementName.getLocalPart())) { + deserializedBlobItemInternal.hasVersionsOnly = reader.getNullableElement(Boolean::parseBoolean); + } else if ("IsPrefix".equals(elementName.getLocalPart())) { + deserializedBlobItemInternal.isPrefix = reader.getNullableElement(Boolean::parseBoolean); + } else { + reader.skipElement(); + } + } + + return deserializedBlobItemInternal; + }); + } +} diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlobItemPropertiesInternal.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlobItemPropertiesInternal.java new file mode 100644 index 000000000000..c982597df4a6 --- /dev/null +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlobItemPropertiesInternal.java @@ -0,0 +1,1284 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.storage.blob.models; + +import com.azure.core.v2.annotation.Fluent; +import com.azure.core.v2.util.CoreUtils; +import io.clientcore.core.http.models.DateTimeRfc1123; +import io.clientcore.core.serialization.xml.XmlReader; +import io.clientcore.core.serialization.xml.XmlSerializable; +import io.clientcore.core.serialization.xml.XmlToken; +import io.clientcore.core.serialization.xml.XmlWriter; +import java.time.OffsetDateTime; +import java.util.Objects; +import javax.xml.namespace.QName; +import javax.xml.stream.XMLStreamException; + +/** + * Properties of a blob. + */ +@Fluent +public final class BlobItemPropertiesInternal implements XmlSerializable { + /* + * The Creation-Time property. + */ + private DateTimeRfc1123 creationTime; + + /* + * The Last-Modified property. + */ + private DateTimeRfc1123 lastModified; + + /* + * The Etag property. + */ + private String eTag; + + /* + * Size in bytes + */ + private Long contentLength; + + /* + * The Content-Type property. + */ + private String contentType; + + /* + * The Content-Encoding property. + */ + private String contentEncoding; + + /* + * The Content-Language property. + */ + private String contentLanguage; + + /* + * The Content-MD5 property. + */ + private byte[] contentMd5; + + /* + * The Content-Disposition property. + */ + private String contentDisposition; + + /* + * The Cache-Control property. + */ + private String cacheControl; + + /* + * The x-ms-blob-sequence-number property. + */ + private Long blobSequenceNumber; + + /* + * The BlobType property. + */ + private BlobType blobType; + + /* + * The LeaseStatus property. + */ + private LeaseStatusType leaseStatus; + + /* + * The LeaseState property. + */ + private LeaseStateType leaseState; + + /* + * The LeaseDuration property. + */ + private LeaseDurationType leaseDuration; + + /* + * The CopyId property. + */ + private String copyId; + + /* + * The CopyStatus property. + */ + private CopyStatusType copyStatus; + + /* + * The CopySource property. + */ + private String copySource; + + /* + * The CopyProgress property. + */ + private String copyProgress; + + /* + * The CopyCompletionTime property. + */ + private DateTimeRfc1123 copyCompletionTime; + + /* + * The CopyStatusDescription property. + */ + private String copyStatusDescription; + + /* + * The ServerEncrypted property. + */ + private Boolean serverEncrypted; + + /* + * The IncrementalCopy property. + */ + private Boolean incrementalCopy; + + /* + * The DestinationSnapshot property. + */ + private String destinationSnapshot; + + /* + * The DeletedTime property. + */ + private DateTimeRfc1123 deletedTime; + + /* + * The RemainingRetentionDays property. + */ + private Integer remainingRetentionDays; + + /* + * The AccessTier property. + */ + private AccessTier accessTier; + + /* + * The AccessTierInferred property. + */ + private Boolean accessTierInferred; + + /* + * The ArchiveStatus property. + */ + private ArchiveStatus archiveStatus; + + /* + * The CustomerProvidedKeySha256 property. + */ + private String customerProvidedKeySha256; + + /* + * The name of the encryption scope under which the blob is encrypted. + */ + private String encryptionScope; + + /* + * The AccessTierChangeTime property. + */ + private DateTimeRfc1123 accessTierChangeTime; + + /* + * The TagCount property. + */ + private Integer tagCount; + + /* + * The Expiry-Time property. + */ + private DateTimeRfc1123 expiresOn; + + /* + * The Sealed property. + */ + 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. + */ + private RehydratePriority rehydratePriority; + + /* + * The LastAccessTime property. + */ + private DateTimeRfc1123 lastAccessedOn; + + /* + * The ImmutabilityPolicyUntilDate property. + */ + private DateTimeRfc1123 immutabilityPolicyExpiresOn; + + /* + * The ImmutabilityPolicyMode property. + */ + private BlobImmutabilityPolicyMode immutabilityPolicyMode; + + /* + * The LegalHold property. + */ + private Boolean legalHold; + + /** + * Creates an instance of BlobItemPropertiesInternal class. + */ + public BlobItemPropertiesInternal() { + } + + /** + * Get the creationTime property: The Creation-Time property. + * + * @return the creationTime value. + */ + public OffsetDateTime getCreationTime() { + if (this.creationTime == null) { + return null; + } + return this.creationTime.getDateTime(); + } + + /** + * Set the creationTime property: The Creation-Time property. + * + * @param creationTime the creationTime value to set. + * @return the BlobItemPropertiesInternal object itself. + */ + public BlobItemPropertiesInternal setCreationTime(OffsetDateTime creationTime) { + if (creationTime == null) { + this.creationTime = null; + } else { + this.creationTime = new DateTimeRfc1123(creationTime); + } + 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 BlobItemPropertiesInternal object itself. + */ + public BlobItemPropertiesInternal setLastModified(OffsetDateTime lastModified) { + if (lastModified == null) { + this.lastModified = null; + } else { + this.lastModified = new DateTimeRfc1123(lastModified); + } + 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 BlobItemPropertiesInternal object itself. + */ + public BlobItemPropertiesInternal setETag(String eTag) { + this.eTag = eTag; + return this; + } + + /** + * Get the contentLength property: Size in bytes. + * + * @return the contentLength value. + */ + public Long getContentLength() { + return this.contentLength; + } + + /** + * Set the contentLength property: Size in bytes. + * + * @param contentLength the contentLength value to set. + * @return the BlobItemPropertiesInternal object itself. + */ + public BlobItemPropertiesInternal setContentLength(Long contentLength) { + this.contentLength = contentLength; + return this; + } + + /** + * Get the contentType property: The Content-Type property. + * + * @return the contentType value. + */ + public String getContentType() { + return this.contentType; + } + + /** + * Set the contentType property: The Content-Type property. + * + * @param contentType the contentType value to set. + * @return the BlobItemPropertiesInternal object itself. + */ + public BlobItemPropertiesInternal setContentType(String contentType) { + this.contentType = contentType; + return this; + } + + /** + * Get the contentEncoding property: The Content-Encoding property. + * + * @return the contentEncoding value. + */ + public String getContentEncoding() { + return this.contentEncoding; + } + + /** + * Set the contentEncoding property: The Content-Encoding property. + * + * @param contentEncoding the contentEncoding value to set. + * @return the BlobItemPropertiesInternal object itself. + */ + public BlobItemPropertiesInternal setContentEncoding(String contentEncoding) { + this.contentEncoding = contentEncoding; + return this; + } + + /** + * Get the contentLanguage property: The Content-Language property. + * + * @return the contentLanguage value. + */ + public String getContentLanguage() { + return this.contentLanguage; + } + + /** + * Set the contentLanguage property: The Content-Language property. + * + * @param contentLanguage the contentLanguage value to set. + * @return the BlobItemPropertiesInternal object itself. + */ + public BlobItemPropertiesInternal setContentLanguage(String contentLanguage) { + this.contentLanguage = contentLanguage; + return this; + } + + /** + * Get the contentMd5 property: The Content-MD5 property. + * + * @return the contentMd5 value. + */ + 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 BlobItemPropertiesInternal object itself. + */ + public BlobItemPropertiesInternal setContentMd5(byte[] contentMd5) { + this.contentMd5 = CoreUtils.clone(contentMd5); + return this; + } + + /** + * Get the contentDisposition property: The Content-Disposition property. + * + * @return the contentDisposition value. + */ + public String getContentDisposition() { + return this.contentDisposition; + } + + /** + * Set the contentDisposition property: The Content-Disposition property. + * + * @param contentDisposition the contentDisposition value to set. + * @return the BlobItemPropertiesInternal object itself. + */ + public BlobItemPropertiesInternal setContentDisposition(String contentDisposition) { + this.contentDisposition = contentDisposition; + return this; + } + + /** + * Get the cacheControl property: The Cache-Control property. + * + * @return the cacheControl value. + */ + public String getCacheControl() { + return this.cacheControl; + } + + /** + * Set the cacheControl property: The Cache-Control property. + * + * @param cacheControl the cacheControl value to set. + * @return the BlobItemPropertiesInternal object itself. + */ + public BlobItemPropertiesInternal setCacheControl(String cacheControl) { + this.cacheControl = cacheControl; + return this; + } + + /** + * Get the blobSequenceNumber property: The x-ms-blob-sequence-number property. + * + * @return the blobSequenceNumber value. + */ + public Long getBlobSequenceNumber() { + return this.blobSequenceNumber; + } + + /** + * Set the blobSequenceNumber property: The x-ms-blob-sequence-number property. + * + * @param blobSequenceNumber the blobSequenceNumber value to set. + * @return the BlobItemPropertiesInternal object itself. + */ + public BlobItemPropertiesInternal setBlobSequenceNumber(Long blobSequenceNumber) { + this.blobSequenceNumber = blobSequenceNumber; + return this; + } + + /** + * Get the blobType property: The BlobType property. + * + * @return the blobType value. + */ + public BlobType getBlobType() { + return this.blobType; + } + + /** + * Set the blobType property: The BlobType property. + * + * @param blobType the blobType value to set. + * @return the BlobItemPropertiesInternal object itself. + */ + public BlobItemPropertiesInternal setBlobType(BlobType blobType) { + this.blobType = blobType; + return this; + } + + /** + * Get the leaseStatus property: The LeaseStatus property. + * + * @return the leaseStatus value. + */ + public LeaseStatusType getLeaseStatus() { + return this.leaseStatus; + } + + /** + * Set the leaseStatus property: The LeaseStatus property. + * + * @param leaseStatus the leaseStatus value to set. + * @return the BlobItemPropertiesInternal object itself. + */ + public BlobItemPropertiesInternal setLeaseStatus(LeaseStatusType leaseStatus) { + this.leaseStatus = leaseStatus; + return this; + } + + /** + * Get the leaseState property: The LeaseState property. + * + * @return the leaseState value. + */ + public LeaseStateType getLeaseState() { + return this.leaseState; + } + + /** + * Set the leaseState property: The LeaseState property. + * + * @param leaseState the leaseState value to set. + * @return the BlobItemPropertiesInternal object itself. + */ + public BlobItemPropertiesInternal setLeaseState(LeaseStateType leaseState) { + this.leaseState = leaseState; + return this; + } + + /** + * Get the leaseDuration property: The LeaseDuration property. + * + * @return the leaseDuration value. + */ + public LeaseDurationType getLeaseDuration() { + return this.leaseDuration; + } + + /** + * Set the leaseDuration property: The LeaseDuration property. + * + * @param leaseDuration the leaseDuration value to set. + * @return the BlobItemPropertiesInternal object itself. + */ + public BlobItemPropertiesInternal setLeaseDuration(LeaseDurationType leaseDuration) { + this.leaseDuration = leaseDuration; + return this; + } + + /** + * Get the copyId property: The CopyId property. + * + * @return the copyId value. + */ + public String getCopyId() { + return this.copyId; + } + + /** + * Set the copyId property: The CopyId property. + * + * @param copyId the copyId value to set. + * @return the BlobItemPropertiesInternal object itself. + */ + public BlobItemPropertiesInternal setCopyId(String copyId) { + this.copyId = copyId; + return this; + } + + /** + * Get the copyStatus property: The CopyStatus property. + * + * @return the copyStatus value. + */ + public CopyStatusType getCopyStatus() { + return this.copyStatus; + } + + /** + * Set the copyStatus property: The CopyStatus property. + * + * @param copyStatus the copyStatus value to set. + * @return the BlobItemPropertiesInternal object itself. + */ + public BlobItemPropertiesInternal setCopyStatus(CopyStatusType copyStatus) { + this.copyStatus = copyStatus; + return this; + } + + /** + * Get the copySource property: The CopySource property. + * + * @return the copySource value. + */ + public String getCopySource() { + return this.copySource; + } + + /** + * Set the copySource property: The CopySource property. + * + * @param copySource the copySource value to set. + * @return the BlobItemPropertiesInternal object itself. + */ + public BlobItemPropertiesInternal setCopySource(String copySource) { + this.copySource = copySource; + return this; + } + + /** + * Get the copyProgress property: The CopyProgress property. + * + * @return the copyProgress value. + */ + public String getCopyProgress() { + return this.copyProgress; + } + + /** + * Set the copyProgress property: The CopyProgress property. + * + * @param copyProgress the copyProgress value to set. + * @return the BlobItemPropertiesInternal object itself. + */ + public BlobItemPropertiesInternal setCopyProgress(String copyProgress) { + this.copyProgress = copyProgress; + return this; + } + + /** + * Get the copyCompletionTime property: The CopyCompletionTime property. + * + * @return the copyCompletionTime value. + */ + public OffsetDateTime getCopyCompletionTime() { + if (this.copyCompletionTime == null) { + return null; + } + return this.copyCompletionTime.getDateTime(); + } + + /** + * Set the copyCompletionTime property: The CopyCompletionTime property. + * + * @param copyCompletionTime the copyCompletionTime value to set. + * @return the BlobItemPropertiesInternal object itself. + */ + public BlobItemPropertiesInternal setCopyCompletionTime(OffsetDateTime copyCompletionTime) { + if (copyCompletionTime == null) { + this.copyCompletionTime = null; + } else { + this.copyCompletionTime = new DateTimeRfc1123(copyCompletionTime); + } + return this; + } + + /** + * Get the copyStatusDescription property: The CopyStatusDescription property. + * + * @return the copyStatusDescription value. + */ + public String getCopyStatusDescription() { + return this.copyStatusDescription; + } + + /** + * Set the copyStatusDescription property: The CopyStatusDescription property. + * + * @param copyStatusDescription the copyStatusDescription value to set. + * @return the BlobItemPropertiesInternal object itself. + */ + public BlobItemPropertiesInternal setCopyStatusDescription(String copyStatusDescription) { + this.copyStatusDescription = copyStatusDescription; + return this; + } + + /** + * Get the serverEncrypted property: The ServerEncrypted property. + * + * @return the serverEncrypted value. + */ + public Boolean isServerEncrypted() { + return this.serverEncrypted; + } + + /** + * Set the serverEncrypted property: The ServerEncrypted property. + * + * @param serverEncrypted the serverEncrypted value to set. + * @return the BlobItemPropertiesInternal object itself. + */ + public BlobItemPropertiesInternal setServerEncrypted(Boolean serverEncrypted) { + this.serverEncrypted = serverEncrypted; + return this; + } + + /** + * Get the incrementalCopy property: The IncrementalCopy property. + * + * @return the incrementalCopy value. + */ + public Boolean isIncrementalCopy() { + return this.incrementalCopy; + } + + /** + * Set the incrementalCopy property: The IncrementalCopy property. + * + * @param incrementalCopy the incrementalCopy value to set. + * @return the BlobItemPropertiesInternal object itself. + */ + public BlobItemPropertiesInternal setIncrementalCopy(Boolean incrementalCopy) { + this.incrementalCopy = incrementalCopy; + return this; + } + + /** + * Get the destinationSnapshot property: The DestinationSnapshot property. + * + * @return the destinationSnapshot value. + */ + public String getDestinationSnapshot() { + return this.destinationSnapshot; + } + + /** + * Set the destinationSnapshot property: The DestinationSnapshot property. + * + * @param destinationSnapshot the destinationSnapshot value to set. + * @return the BlobItemPropertiesInternal object itself. + */ + public BlobItemPropertiesInternal setDestinationSnapshot(String destinationSnapshot) { + this.destinationSnapshot = destinationSnapshot; + return this; + } + + /** + * Get the deletedTime property: The DeletedTime property. + * + * @return the deletedTime value. + */ + public OffsetDateTime getDeletedTime() { + if (this.deletedTime == null) { + return null; + } + return this.deletedTime.getDateTime(); + } + + /** + * Set the deletedTime property: The DeletedTime property. + * + * @param deletedTime the deletedTime value to set. + * @return the BlobItemPropertiesInternal object itself. + */ + public BlobItemPropertiesInternal setDeletedTime(OffsetDateTime deletedTime) { + if (deletedTime == null) { + this.deletedTime = null; + } else { + this.deletedTime = new DateTimeRfc1123(deletedTime); + } + return this; + } + + /** + * Get the remainingRetentionDays property: The RemainingRetentionDays property. + * + * @return the remainingRetentionDays value. + */ + public Integer getRemainingRetentionDays() { + return this.remainingRetentionDays; + } + + /** + * Set the remainingRetentionDays property: The RemainingRetentionDays property. + * + * @param remainingRetentionDays the remainingRetentionDays value to set. + * @return the BlobItemPropertiesInternal object itself. + */ + public BlobItemPropertiesInternal setRemainingRetentionDays(Integer remainingRetentionDays) { + this.remainingRetentionDays = remainingRetentionDays; + return this; + } + + /** + * Get the accessTier property: The AccessTier property. + * + * @return the accessTier value. + */ + public AccessTier getAccessTier() { + return this.accessTier; + } + + /** + * Set the accessTier property: The AccessTier property. + * + * @param accessTier the accessTier value to set. + * @return the BlobItemPropertiesInternal object itself. + */ + public BlobItemPropertiesInternal setAccessTier(AccessTier accessTier) { + this.accessTier = accessTier; + return this; + } + + /** + * Get the accessTierInferred property: The AccessTierInferred property. + * + * @return the accessTierInferred value. + */ + public Boolean isAccessTierInferred() { + return this.accessTierInferred; + } + + /** + * Set the accessTierInferred property: The AccessTierInferred property. + * + * @param accessTierInferred the accessTierInferred value to set. + * @return the BlobItemPropertiesInternal object itself. + */ + public BlobItemPropertiesInternal setAccessTierInferred(Boolean accessTierInferred) { + this.accessTierInferred = accessTierInferred; + return this; + } + + /** + * Get the archiveStatus property: The ArchiveStatus property. + * + * @return the archiveStatus value. + */ + public ArchiveStatus getArchiveStatus() { + return this.archiveStatus; + } + + /** + * Set the archiveStatus property: The ArchiveStatus property. + * + * @param archiveStatus the archiveStatus value to set. + * @return the BlobItemPropertiesInternal object itself. + */ + public BlobItemPropertiesInternal setArchiveStatus(ArchiveStatus archiveStatus) { + this.archiveStatus = archiveStatus; + return this; + } + + /** + * Get the customerProvidedKeySha256 property: The CustomerProvidedKeySha256 property. + * + * @return the customerProvidedKeySha256 value. + */ + public String getCustomerProvidedKeySha256() { + return this.customerProvidedKeySha256; + } + + /** + * Set the customerProvidedKeySha256 property: The CustomerProvidedKeySha256 property. + * + * @param customerProvidedKeySha256 the customerProvidedKeySha256 value to set. + * @return the BlobItemPropertiesInternal object itself. + */ + public BlobItemPropertiesInternal setCustomerProvidedKeySha256(String customerProvidedKeySha256) { + this.customerProvidedKeySha256 = customerProvidedKeySha256; + return this; + } + + /** + * Get the encryptionScope property: The name of the encryption scope under which the blob is encrypted. + * + * @return the encryptionScope value. + */ + public String getEncryptionScope() { + return this.encryptionScope; + } + + /** + * Set the encryptionScope property: The name of the encryption scope under which the blob is encrypted. + * + * @param encryptionScope the encryptionScope value to set. + * @return the BlobItemPropertiesInternal object itself. + */ + public BlobItemPropertiesInternal setEncryptionScope(String encryptionScope) { + this.encryptionScope = encryptionScope; + return this; + } + + /** + * Get the accessTierChangeTime property: The AccessTierChangeTime property. + * + * @return the accessTierChangeTime value. + */ + public OffsetDateTime getAccessTierChangeTime() { + if (this.accessTierChangeTime == null) { + return null; + } + return this.accessTierChangeTime.getDateTime(); + } + + /** + * Set the accessTierChangeTime property: The AccessTierChangeTime property. + * + * @param accessTierChangeTime the accessTierChangeTime value to set. + * @return the BlobItemPropertiesInternal object itself. + */ + public BlobItemPropertiesInternal setAccessTierChangeTime(OffsetDateTime accessTierChangeTime) { + if (accessTierChangeTime == null) { + this.accessTierChangeTime = null; + } else { + this.accessTierChangeTime = new DateTimeRfc1123(accessTierChangeTime); + } + return this; + } + + /** + * Get the tagCount property: The TagCount property. + * + * @return the tagCount value. + */ + public Integer getTagCount() { + return this.tagCount; + } + + /** + * Set the tagCount property: The TagCount property. + * + * @param tagCount the tagCount value to set. + * @return the BlobItemPropertiesInternal object itself. + */ + public BlobItemPropertiesInternal setTagCount(Integer tagCount) { + this.tagCount = tagCount; + return this; + } + + /** + * Get the expiresOn property: The Expiry-Time property. + * + * @return the expiresOn value. + */ + public OffsetDateTime getExpiresOn() { + if (this.expiresOn == null) { + return null; + } + return this.expiresOn.getDateTime(); + } + + /** + * Set the expiresOn property: The Expiry-Time property. + * + * @param expiresOn the expiresOn value to set. + * @return the BlobItemPropertiesInternal object itself. + */ + public BlobItemPropertiesInternal setExpiresOn(OffsetDateTime expiresOn) { + if (expiresOn == null) { + this.expiresOn = null; + } else { + this.expiresOn = new DateTimeRfc1123(expiresOn); + } + return this; + } + + /** + * Get the isSealed property: The Sealed property. + * + * @return the isSealed value. + */ + public Boolean isSealed() { + return this.isSealed; + } + + /** + * Set the isSealed property: The Sealed property. + * + * @param isSealed the isSealed value to set. + * @return the BlobItemPropertiesInternal object itself. + */ + public BlobItemPropertiesInternal setIsSealed(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. + * + * @return the rehydratePriority value. + */ + public RehydratePriority getRehydratePriority() { + return this.rehydratePriority; + } + + /** + * Set the rehydratePriority property: If an object is in rehydrate pending state then this header is returned with + * priority of rehydrate. Valid values are High and Standard. + * + * @param rehydratePriority the rehydratePriority value to set. + * @return the BlobItemPropertiesInternal object itself. + */ + public BlobItemPropertiesInternal setRehydratePriority(RehydratePriority rehydratePriority) { + this.rehydratePriority = rehydratePriority; + return this; + } + + /** + * Get the lastAccessedOn property: The LastAccessTime property. + * + * @return the lastAccessedOn value. + */ + public OffsetDateTime getLastAccessedOn() { + if (this.lastAccessedOn == null) { + return null; + } + return this.lastAccessedOn.getDateTime(); + } + + /** + * Set the lastAccessedOn property: The LastAccessTime property. + * + * @param lastAccessedOn the lastAccessedOn value to set. + * @return the BlobItemPropertiesInternal object itself. + */ + public BlobItemPropertiesInternal setLastAccessedOn(OffsetDateTime lastAccessedOn) { + if (lastAccessedOn == null) { + this.lastAccessedOn = null; + } else { + this.lastAccessedOn = new DateTimeRfc1123(lastAccessedOn); + } + return this; + } + + /** + * Get the immutabilityPolicyExpiresOn property: The ImmutabilityPolicyUntilDate property. + * + * @return the immutabilityPolicyExpiresOn value. + */ + public OffsetDateTime getImmutabilityPolicyExpiresOn() { + if (this.immutabilityPolicyExpiresOn == null) { + return null; + } + return this.immutabilityPolicyExpiresOn.getDateTime(); + } + + /** + * Set the immutabilityPolicyExpiresOn property: The ImmutabilityPolicyUntilDate property. + * + * @param immutabilityPolicyExpiresOn the immutabilityPolicyExpiresOn value to set. + * @return the BlobItemPropertiesInternal object itself. + */ + public BlobItemPropertiesInternal setImmutabilityPolicyExpiresOn(OffsetDateTime immutabilityPolicyExpiresOn) { + if (immutabilityPolicyExpiresOn == null) { + this.immutabilityPolicyExpiresOn = null; + } else { + this.immutabilityPolicyExpiresOn = new DateTimeRfc1123(immutabilityPolicyExpiresOn); + } + return this; + } + + /** + * Get the immutabilityPolicyMode property: The ImmutabilityPolicyMode property. + * + * @return the immutabilityPolicyMode value. + */ + public BlobImmutabilityPolicyMode getImmutabilityPolicyMode() { + return this.immutabilityPolicyMode; + } + + /** + * Set the immutabilityPolicyMode property: The ImmutabilityPolicyMode property. + * + * @param immutabilityPolicyMode the immutabilityPolicyMode value to set. + * @return the BlobItemPropertiesInternal object itself. + */ + public BlobItemPropertiesInternal setImmutabilityPolicyMode(BlobImmutabilityPolicyMode immutabilityPolicyMode) { + this.immutabilityPolicyMode = immutabilityPolicyMode; + return this; + } + + /** + * Get the legalHold property: The LegalHold property. + * + * @return the legalHold value. + */ + public Boolean isLegalHold() { + return this.legalHold; + } + + /** + * Set the legalHold property: The LegalHold property. + * + * @param legalHold the legalHold value to set. + * @return the BlobItemPropertiesInternal object itself. + */ + public BlobItemPropertiesInternal setLegalHold(Boolean legalHold) { + this.legalHold = legalHold; + return this; + } + + @Override + public XmlWriter toXml(XmlWriter xmlWriter) throws XMLStreamException { + return toXml(xmlWriter, null); + } + + @Override + public XmlWriter toXml(XmlWriter xmlWriter, String rootElementName) throws XMLStreamException { + rootElementName = CoreUtils.isNullOrEmpty(rootElementName) ? "Properties" : rootElementName; + xmlWriter.writeStartElement(rootElementName); + xmlWriter.writeStringElement("Creation-Time", Objects.toString(this.creationTime, null)); + xmlWriter.writeStringElement("Last-Modified", Objects.toString(this.lastModified, null)); + xmlWriter.writeStringElement("Etag", this.eTag); + xmlWriter.writeNumberElement("Content-Length", this.contentLength); + xmlWriter.writeStringElement("Content-Type", this.contentType); + xmlWriter.writeStringElement("Content-Encoding", this.contentEncoding); + xmlWriter.writeStringElement("Content-Language", this.contentLanguage); + xmlWriter.writeBinaryElement("Content-MD5", this.contentMd5); + xmlWriter.writeStringElement("Content-Disposition", this.contentDisposition); + xmlWriter.writeStringElement("Cache-Control", this.cacheControl); + xmlWriter.writeNumberElement("x-ms-blob-sequence-number", this.blobSequenceNumber); + xmlWriter.writeStringElement("BlobType", this.blobType == null ? null : this.blobType.toString()); + xmlWriter.writeStringElement("LeaseStatus", this.leaseStatus == null ? null : this.leaseStatus.toString()); + xmlWriter.writeStringElement("LeaseState", this.leaseState == null ? null : this.leaseState.toString()); + xmlWriter.writeStringElement("LeaseDuration", + this.leaseDuration == null ? null : this.leaseDuration.toString()); + xmlWriter.writeStringElement("CopyId", this.copyId); + xmlWriter.writeStringElement("CopyStatus", this.copyStatus == null ? null : this.copyStatus.toString()); + xmlWriter.writeStringElement("CopySource", this.copySource); + xmlWriter.writeStringElement("CopyProgress", this.copyProgress); + xmlWriter.writeStringElement("CopyCompletionTime", Objects.toString(this.copyCompletionTime, null)); + xmlWriter.writeStringElement("CopyStatusDescription", this.copyStatusDescription); + xmlWriter.writeBooleanElement("ServerEncrypted", this.serverEncrypted); + xmlWriter.writeBooleanElement("IncrementalCopy", this.incrementalCopy); + xmlWriter.writeStringElement("DestinationSnapshot", this.destinationSnapshot); + xmlWriter.writeStringElement("DeletedTime", Objects.toString(this.deletedTime, null)); + xmlWriter.writeNumberElement("RemainingRetentionDays", this.remainingRetentionDays); + xmlWriter.writeStringElement("AccessTier", this.accessTier == null ? null : this.accessTier.toString()); + xmlWriter.writeBooleanElement("AccessTierInferred", this.accessTierInferred); + xmlWriter.writeStringElement("ArchiveStatus", + this.archiveStatus == null ? null : this.archiveStatus.toString()); + xmlWriter.writeStringElement("CustomerProvidedKeySha256", this.customerProvidedKeySha256); + xmlWriter.writeStringElement("EncryptionScope", this.encryptionScope); + xmlWriter.writeStringElement("AccessTierChangeTime", Objects.toString(this.accessTierChangeTime, null)); + xmlWriter.writeNumberElement("TagCount", this.tagCount); + xmlWriter.writeStringElement("Expiry-Time", Objects.toString(this.expiresOn, null)); + xmlWriter.writeBooleanElement("Sealed", this.isSealed); + xmlWriter.writeStringElement("RehydratePriority", + this.rehydratePriority == null ? null : this.rehydratePriority.toString()); + xmlWriter.writeStringElement("LastAccessTime", Objects.toString(this.lastAccessedOn, null)); + xmlWriter.writeStringElement("ImmutabilityPolicyUntilDate", + Objects.toString(this.immutabilityPolicyExpiresOn, null)); + xmlWriter.writeStringElement("ImmutabilityPolicyMode", + this.immutabilityPolicyMode == null ? null : this.immutabilityPolicyMode.toString()); + xmlWriter.writeBooleanElement("LegalHold", this.legalHold); + return xmlWriter.writeEndElement(); + } + + /** + * Reads an instance of BlobItemPropertiesInternal from the XmlReader. + * + * @param xmlReader The XmlReader being read. + * @return An instance of BlobItemPropertiesInternal if the XmlReader was pointing to an instance of it, or null if + * it was pointing to XML null. + * @throws XMLStreamException If an error occurs while reading the BlobItemPropertiesInternal. + */ + public static BlobItemPropertiesInternal fromXml(XmlReader xmlReader) throws XMLStreamException { + return fromXml(xmlReader, null); + } + + /** + * Reads an instance of BlobItemPropertiesInternal from the XmlReader. + * + * @param xmlReader The XmlReader being read. + * @param rootElementName Optional root element name to override the default defined by the model. Used to support + * cases where the model can deserialize from different root element names. + * @return An instance of BlobItemPropertiesInternal if the XmlReader was pointing to an instance of it, or null if + * it was pointing to XML null. + * @throws XMLStreamException If an error occurs while reading the BlobItemPropertiesInternal. + */ + public static BlobItemPropertiesInternal fromXml(XmlReader xmlReader, String rootElementName) + throws XMLStreamException { + String finalRootElementName = CoreUtils.isNullOrEmpty(rootElementName) ? "Properties" : rootElementName; + return xmlReader.readObject(finalRootElementName, reader -> { + BlobItemPropertiesInternal deserializedBlobItemPropertiesInternal = new BlobItemPropertiesInternal(); + while (reader.nextElement() != XmlToken.END_ELEMENT) { + QName elementName = reader.getElementName(); + + if ("Creation-Time".equals(elementName.getLocalPart())) { + deserializedBlobItemPropertiesInternal.creationTime + = reader.getNullableElement(DateTimeRfc1123::new); + } else if ("Last-Modified".equals(elementName.getLocalPart())) { + deserializedBlobItemPropertiesInternal.lastModified + = reader.getNullableElement(DateTimeRfc1123::new); + } else if ("Etag".equals(elementName.getLocalPart())) { + deserializedBlobItemPropertiesInternal.eTag = reader.getStringElement(); + } else if ("Content-Length".equals(elementName.getLocalPart())) { + deserializedBlobItemPropertiesInternal.contentLength = reader.getNullableElement(Long::parseLong); + } else if ("Content-Type".equals(elementName.getLocalPart())) { + deserializedBlobItemPropertiesInternal.contentType = reader.getStringElement(); + } else if ("Content-Encoding".equals(elementName.getLocalPart())) { + deserializedBlobItemPropertiesInternal.contentEncoding = reader.getStringElement(); + } else if ("Content-Language".equals(elementName.getLocalPart())) { + deserializedBlobItemPropertiesInternal.contentLanguage = reader.getStringElement(); + } else if ("Content-MD5".equals(elementName.getLocalPart())) { + deserializedBlobItemPropertiesInternal.contentMd5 = reader.getBinaryElement(); + } else if ("Content-Disposition".equals(elementName.getLocalPart())) { + deserializedBlobItemPropertiesInternal.contentDisposition = reader.getStringElement(); + } else if ("Cache-Control".equals(elementName.getLocalPart())) { + deserializedBlobItemPropertiesInternal.cacheControl = reader.getStringElement(); + } else if ("x-ms-blob-sequence-number".equals(elementName.getLocalPart())) { + deserializedBlobItemPropertiesInternal.blobSequenceNumber + = reader.getNullableElement(Long::parseLong); + } else if ("BlobType".equals(elementName.getLocalPart())) { + deserializedBlobItemPropertiesInternal.blobType = BlobType.fromString(reader.getStringElement()); + } else if ("LeaseStatus".equals(elementName.getLocalPart())) { + deserializedBlobItemPropertiesInternal.leaseStatus + = LeaseStatusType.fromString(reader.getStringElement()); + } else if ("LeaseState".equals(elementName.getLocalPart())) { + deserializedBlobItemPropertiesInternal.leaseState + = LeaseStateType.fromString(reader.getStringElement()); + } else if ("LeaseDuration".equals(elementName.getLocalPart())) { + deserializedBlobItemPropertiesInternal.leaseDuration + = LeaseDurationType.fromString(reader.getStringElement()); + } else if ("CopyId".equals(elementName.getLocalPart())) { + deserializedBlobItemPropertiesInternal.copyId = reader.getStringElement(); + } else if ("CopyStatus".equals(elementName.getLocalPart())) { + deserializedBlobItemPropertiesInternal.copyStatus + = CopyStatusType.fromString(reader.getStringElement()); + } else if ("CopySource".equals(elementName.getLocalPart())) { + deserializedBlobItemPropertiesInternal.copySource = reader.getStringElement(); + } else if ("CopyProgress".equals(elementName.getLocalPart())) { + deserializedBlobItemPropertiesInternal.copyProgress = reader.getStringElement(); + } else if ("CopyCompletionTime".equals(elementName.getLocalPart())) { + deserializedBlobItemPropertiesInternal.copyCompletionTime + = reader.getNullableElement(DateTimeRfc1123::new); + } else if ("CopyStatusDescription".equals(elementName.getLocalPart())) { + deserializedBlobItemPropertiesInternal.copyStatusDescription = reader.getStringElement(); + } else if ("ServerEncrypted".equals(elementName.getLocalPart())) { + deserializedBlobItemPropertiesInternal.serverEncrypted + = reader.getNullableElement(Boolean::parseBoolean); + } else if ("IncrementalCopy".equals(elementName.getLocalPart())) { + deserializedBlobItemPropertiesInternal.incrementalCopy + = reader.getNullableElement(Boolean::parseBoolean); + } else if ("DestinationSnapshot".equals(elementName.getLocalPart())) { + deserializedBlobItemPropertiesInternal.destinationSnapshot = reader.getStringElement(); + } else if ("DeletedTime".equals(elementName.getLocalPart())) { + deserializedBlobItemPropertiesInternal.deletedTime + = reader.getNullableElement(DateTimeRfc1123::new); + } else if ("RemainingRetentionDays".equals(elementName.getLocalPart())) { + deserializedBlobItemPropertiesInternal.remainingRetentionDays + = reader.getNullableElement(Integer::parseInt); + } else if ("AccessTier".equals(elementName.getLocalPart())) { + deserializedBlobItemPropertiesInternal.accessTier + = AccessTier.fromString(reader.getStringElement()); + } else if ("AccessTierInferred".equals(elementName.getLocalPart())) { + deserializedBlobItemPropertiesInternal.accessTierInferred + = reader.getNullableElement(Boolean::parseBoolean); + } else if ("ArchiveStatus".equals(elementName.getLocalPart())) { + deserializedBlobItemPropertiesInternal.archiveStatus + = ArchiveStatus.fromString(reader.getStringElement()); + } else if ("CustomerProvidedKeySha256".equals(elementName.getLocalPart())) { + deserializedBlobItemPropertiesInternal.customerProvidedKeySha256 = reader.getStringElement(); + } else if ("EncryptionScope".equals(elementName.getLocalPart())) { + deserializedBlobItemPropertiesInternal.encryptionScope = reader.getStringElement(); + } else if ("AccessTierChangeTime".equals(elementName.getLocalPart())) { + deserializedBlobItemPropertiesInternal.accessTierChangeTime + = reader.getNullableElement(DateTimeRfc1123::new); + } else if ("TagCount".equals(elementName.getLocalPart())) { + deserializedBlobItemPropertiesInternal.tagCount = reader.getNullableElement(Integer::parseInt); + } else if ("Expiry-Time".equals(elementName.getLocalPart())) { + deserializedBlobItemPropertiesInternal.expiresOn = reader.getNullableElement(DateTimeRfc1123::new); + } else if ("Sealed".equals(elementName.getLocalPart())) { + deserializedBlobItemPropertiesInternal.isSealed = reader.getNullableElement(Boolean::parseBoolean); + } else if ("RehydratePriority".equals(elementName.getLocalPart())) { + deserializedBlobItemPropertiesInternal.rehydratePriority + = RehydratePriority.fromString(reader.getStringElement()); + } else if ("LastAccessTime".equals(elementName.getLocalPart())) { + deserializedBlobItemPropertiesInternal.lastAccessedOn + = reader.getNullableElement(DateTimeRfc1123::new); + } else if ("ImmutabilityPolicyUntilDate".equals(elementName.getLocalPart())) { + deserializedBlobItemPropertiesInternal.immutabilityPolicyExpiresOn + = reader.getNullableElement(DateTimeRfc1123::new); + } else if ("ImmutabilityPolicyMode".equals(elementName.getLocalPart())) { + deserializedBlobItemPropertiesInternal.immutabilityPolicyMode + = BlobImmutabilityPolicyMode.fromString(reader.getStringElement()); + } else if ("LegalHold".equals(elementName.getLocalPart())) { + deserializedBlobItemPropertiesInternal.legalHold = reader.getNullableElement(Boolean::parseBoolean); + } else { + reader.skipElement(); + } + } + + return deserializedBlobItemPropertiesInternal; + }); + } +} diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlobMetrics.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlobMetrics.java new file mode 100644 index 000000000000..f2567916d54d --- /dev/null +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlobMetrics.java @@ -0,0 +1,192 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.storage.blob.models; + +import com.azure.core.v2.annotation.Fluent; +import com.azure.core.v2.util.CoreUtils; +import io.clientcore.core.serialization.xml.XmlReader; +import io.clientcore.core.serialization.xml.XmlSerializable; +import io.clientcore.core.serialization.xml.XmlToken; +import io.clientcore.core.serialization.xml.XmlWriter; +import javax.xml.namespace.QName; +import javax.xml.stream.XMLStreamException; + +/** + * a summary of request statistics grouped by API in hour or minute aggregates for blobs. + */ +@Fluent +public final class BlobMetrics implements XmlSerializable { + /* + * The version of Storage Analytics to configure. + */ + private String version; + + /* + * Indicates whether metrics are enabled for the Blob service. + */ + private boolean enabled; + + /* + * Indicates whether metrics should generate summary statistics for called API operations. + */ + private Boolean includeApis; + + /* + * the retention policy which determines how long the associated data should persist + */ + private BlobRetentionPolicy retentionPolicy; + + /** + * Creates an instance of BlobMetrics class. + */ + public BlobMetrics() { + } + + /** + * Get the version property: The version of Storage Analytics to configure. + * + * @return the version value. + */ + public String getVersion() { + return this.version; + } + + /** + * Set the version property: The version of Storage Analytics to configure. + * + * @param version the version value to set. + * @return the BlobMetrics object itself. + */ + public BlobMetrics setVersion(String version) { + this.version = version; + return this; + } + + /** + * Get the enabled property: Indicates whether metrics are enabled for the Blob service. + * + * @return the enabled value. + */ + public boolean isEnabled() { + return this.enabled; + } + + /** + * Set the enabled property: Indicates whether metrics are enabled for the Blob service. + * + * @param enabled the enabled value to set. + * @return the BlobMetrics object itself. + */ + public BlobMetrics setEnabled(boolean enabled) { + this.enabled = enabled; + return this; + } + + /** + * Get the includeApis property: Indicates whether metrics should generate summary statistics for called API + * operations. + * + * @return the includeApis value. + */ + public Boolean isIncludeApis() { + return this.includeApis; + } + + /** + * Set the includeApis property: Indicates whether metrics should generate summary statistics for called API + * operations. + * + * @param includeApis the includeApis value to set. + * @return the BlobMetrics object itself. + */ + public BlobMetrics setIncludeApis(Boolean includeApis) { + this.includeApis = includeApis; + return this; + } + + /** + * Get the retentionPolicy property: the retention policy which determines how long the associated data should + * persist. + * + * @return the retentionPolicy value. + */ + public BlobRetentionPolicy getRetentionPolicy() { + return this.retentionPolicy; + } + + /** + * Set the retentionPolicy property: the retention policy which determines how long the associated data should + * persist. + * + * @param retentionPolicy the retentionPolicy value to set. + * @return the BlobMetrics object itself. + */ + public BlobMetrics setRetentionPolicy(BlobRetentionPolicy retentionPolicy) { + this.retentionPolicy = retentionPolicy; + return this; + } + + @Override + public XmlWriter toXml(XmlWriter xmlWriter) throws XMLStreamException { + return toXml(xmlWriter, null); + } + + @Override + public XmlWriter toXml(XmlWriter xmlWriter, String rootElementName) throws XMLStreamException { + rootElementName = CoreUtils.isNullOrEmpty(rootElementName) ? "BlobMetrics" : rootElementName; + xmlWriter.writeStartElement(rootElementName); + xmlWriter.writeStringElement("Version", this.version); + xmlWriter.writeBooleanElement("Enabled", this.enabled); + xmlWriter.writeBooleanElement("IncludeAPIs", this.includeApis); + xmlWriter.writeXml(this.retentionPolicy, "RetentionPolicy"); + return xmlWriter.writeEndElement(); + } + + /** + * Reads an instance of BlobMetrics from the XmlReader. + * + * @param xmlReader The XmlReader being read. + * @return An instance of BlobMetrics if the XmlReader was pointing to an instance of it, or null if it was pointing + * to XML null. + * @throws XMLStreamException If an error occurs while reading the BlobMetrics. + */ + public static BlobMetrics fromXml(XmlReader xmlReader) throws XMLStreamException { + return fromXml(xmlReader, null); + } + + /** + * Reads an instance of BlobMetrics from the XmlReader. + * + * @param xmlReader The XmlReader being read. + * @param rootElementName Optional root element name to override the default defined by the model. Used to support + * cases where the model can deserialize from different root element names. + * @return An instance of BlobMetrics if the XmlReader was pointing to an instance of it, or null if it was pointing + * to XML null. + * @throws XMLStreamException If an error occurs while reading the BlobMetrics. + */ + public static BlobMetrics fromXml(XmlReader xmlReader, String rootElementName) throws XMLStreamException { + String finalRootElementName = CoreUtils.isNullOrEmpty(rootElementName) ? "BlobMetrics" : rootElementName; + return xmlReader.readObject(finalRootElementName, reader -> { + BlobMetrics deserializedBlobMetrics = new BlobMetrics(); + while (reader.nextElement() != XmlToken.END_ELEMENT) { + QName elementName = reader.getElementName(); + + if ("Version".equals(elementName.getLocalPart())) { + deserializedBlobMetrics.version = reader.getStringElement(); + } else if ("Enabled".equals(elementName.getLocalPart())) { + deserializedBlobMetrics.enabled = reader.getBooleanElement(); + } else if ("IncludeAPIs".equals(elementName.getLocalPart())) { + deserializedBlobMetrics.includeApis = reader.getNullableElement(Boolean::parseBoolean); + } else if ("RetentionPolicy".equals(elementName.getLocalPart())) { + deserializedBlobMetrics.retentionPolicy = BlobRetentionPolicy.fromXml(reader, "RetentionPolicy"); + } else { + reader.skipElement(); + } + } + + return deserializedBlobMetrics; + }); + } +} diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlobName.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlobName.java new file mode 100644 index 000000000000..df9054ccb3c3 --- /dev/null +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlobName.java @@ -0,0 +1,121 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.storage.blob.models; + +import com.azure.core.v2.annotation.Fluent; +import com.azure.core.v2.util.CoreUtils; +import io.clientcore.core.serialization.xml.XmlReader; +import io.clientcore.core.serialization.xml.XmlSerializable; +import io.clientcore.core.serialization.xml.XmlWriter; +import javax.xml.stream.XMLStreamException; + +/** + * The BlobName model. + */ +@Fluent +public final class BlobName implements XmlSerializable { + /* + * Indicates if the blob name is encoded. + */ + private Boolean encoded; + + /* + * The name of the blob. + */ + private String content; + + /** + * Creates an instance of BlobName class. + */ + public BlobName() { + } + + /** + * Get the encoded property: Indicates if the blob name is encoded. + * + * @return the encoded value. + */ + public Boolean isEncoded() { + return this.encoded; + } + + /** + * Set the encoded property: Indicates if the blob name is encoded. + * + * @param encoded the encoded value to set. + * @return the BlobName object itself. + */ + public BlobName setEncoded(Boolean encoded) { + this.encoded = encoded; + return this; + } + + /** + * Get the content property: The name of the blob. + * + * @return the content value. + */ + public String getContent() { + return this.content; + } + + /** + * Set the content property: The name of the blob. + * + * @param content the content value to set. + * @return the BlobName object itself. + */ + public BlobName setContent(String content) { + this.content = content; + return this; + } + + @Override + public XmlWriter toXml(XmlWriter xmlWriter) throws XMLStreamException { + return toXml(xmlWriter, null); + } + + @Override + public XmlWriter toXml(XmlWriter xmlWriter, String rootElementName) throws XMLStreamException { + rootElementName = CoreUtils.isNullOrEmpty(rootElementName) ? "BlobName" : rootElementName; + xmlWriter.writeStartElement(rootElementName); + xmlWriter.writeBooleanAttribute("Encoded", this.encoded); + xmlWriter.writeString(this.content); + return xmlWriter.writeEndElement(); + } + + /** + * Reads an instance of BlobName from the XmlReader. + * + * @param xmlReader The XmlReader being read. + * @return An instance of BlobName if the XmlReader was pointing to an instance of it, or null if it was pointing to + * XML null. + * @throws XMLStreamException If an error occurs while reading the BlobName. + */ + public static BlobName fromXml(XmlReader xmlReader) throws XMLStreamException { + return fromXml(xmlReader, null); + } + + /** + * Reads an instance of BlobName from the XmlReader. + * + * @param xmlReader The XmlReader being read. + * @param rootElementName Optional root element name to override the default defined by the model. Used to support + * cases where the model can deserialize from different root element names. + * @return An instance of BlobName if the XmlReader was pointing to an instance of it, or null if it was pointing to + * XML null. + * @throws XMLStreamException If an error occurs while reading the BlobName. + */ + public static BlobName fromXml(XmlReader xmlReader, String rootElementName) throws XMLStreamException { + String finalRootElementName = CoreUtils.isNullOrEmpty(rootElementName) ? "BlobName" : rootElementName; + return xmlReader.readObject(finalRootElementName, reader -> { + BlobName deserializedBlobName = new BlobName(); + deserializedBlobName.encoded = reader.getNullableAttribute(null, "Encoded", Boolean::parseBoolean); + deserializedBlobName.content = reader.getStringElement(); + + return deserializedBlobName; + }); + } +} diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlobPrefixInternal.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlobPrefixInternal.java new file mode 100644 index 000000000000..22bee2dde06a --- /dev/null +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlobPrefixInternal.java @@ -0,0 +1,104 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.storage.blob.models; + +import com.azure.core.v2.annotation.Fluent; +import com.azure.core.v2.util.CoreUtils; +import io.clientcore.core.serialization.xml.XmlReader; +import io.clientcore.core.serialization.xml.XmlSerializable; +import io.clientcore.core.serialization.xml.XmlToken; +import io.clientcore.core.serialization.xml.XmlWriter; +import javax.xml.namespace.QName; +import javax.xml.stream.XMLStreamException; + +/** + * The BlobPrefixInternal model. + */ +@Fluent +public final class BlobPrefixInternal implements XmlSerializable { + /* + * The Name property. + */ + private BlobName name; + + /** + * Creates an instance of BlobPrefixInternal class. + */ + public BlobPrefixInternal() { + } + + /** + * Get the name property: The Name property. + * + * @return the name value. + */ + 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. + */ + public BlobPrefixInternal setName(BlobName name) { + this.name = name; + return this; + } + + @Override + public XmlWriter toXml(XmlWriter xmlWriter) throws XMLStreamException { + return toXml(xmlWriter, null); + } + + @Override + public XmlWriter toXml(XmlWriter xmlWriter, String rootElementName) throws XMLStreamException { + rootElementName = CoreUtils.isNullOrEmpty(rootElementName) ? "BlobPrefix" : rootElementName; + xmlWriter.writeStartElement(rootElementName); + xmlWriter.writeXml(this.name, "Name"); + return xmlWriter.writeEndElement(); + } + + /** + * Reads an instance of BlobPrefixInternal from the XmlReader. + * + * @param xmlReader The XmlReader being read. + * @return An instance of BlobPrefixInternal if the XmlReader was pointing to an instance of it, or null if it was + * pointing to XML null. + * @throws XMLStreamException If an error occurs while reading the BlobPrefixInternal. + */ + public static BlobPrefixInternal fromXml(XmlReader xmlReader) throws XMLStreamException { + return fromXml(xmlReader, null); + } + + /** + * Reads an instance of BlobPrefixInternal from the XmlReader. + * + * @param xmlReader The XmlReader being read. + * @param rootElementName Optional root element name to override the default defined by the model. Used to support + * cases where the model can deserialize from different root element names. + * @return An instance of BlobPrefixInternal if the XmlReader was pointing to an instance of it, or null if it was + * pointing to XML null. + * @throws XMLStreamException If an error occurs while reading the BlobPrefixInternal. + */ + public static BlobPrefixInternal fromXml(XmlReader xmlReader, String rootElementName) throws XMLStreamException { + String finalRootElementName = CoreUtils.isNullOrEmpty(rootElementName) ? "BlobPrefix" : rootElementName; + return xmlReader.readObject(finalRootElementName, reader -> { + BlobPrefixInternal deserializedBlobPrefixInternal = new BlobPrefixInternal(); + while (reader.nextElement() != XmlToken.END_ELEMENT) { + QName elementName = reader.getElementName(); + + if ("Name".equals(elementName.getLocalPart())) { + deserializedBlobPrefixInternal.name = BlobName.fromXml(reader, "Name"); + } else { + reader.skipElement(); + } + } + + return deserializedBlobPrefixInternal; + }); + } +} diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlobRetentionPolicy.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlobRetentionPolicy.java new file mode 100644 index 000000000000..96778372f763 --- /dev/null +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlobRetentionPolicy.java @@ -0,0 +1,136 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.storage.blob.models; + +import com.azure.core.v2.annotation.Fluent; +import com.azure.core.v2.util.CoreUtils; +import io.clientcore.core.serialization.xml.XmlReader; +import io.clientcore.core.serialization.xml.XmlSerializable; +import io.clientcore.core.serialization.xml.XmlToken; +import io.clientcore.core.serialization.xml.XmlWriter; +import javax.xml.namespace.QName; +import javax.xml.stream.XMLStreamException; + +/** + * the retention policy which determines how long the associated data should persist. + */ +@Fluent +public final class BlobRetentionPolicy implements XmlSerializable { + /* + * Indicates whether a retention policy is enabled for the storage service + */ + 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 + */ + private Integer days; + + /** + * Creates an instance of BlobRetentionPolicy class. + */ + public BlobRetentionPolicy() { + } + + /** + * Get the enabled property: Indicates whether a retention policy is enabled for the storage service. + * + * @return the enabled value. + */ + public boolean isEnabled() { + return this.enabled; + } + + /** + * Set the enabled property: Indicates whether a retention policy is enabled for the storage service. + * + * @param enabled the enabled value to set. + * @return the BlobRetentionPolicy object itself. + */ + public BlobRetentionPolicy setEnabled(boolean enabled) { + this.enabled = enabled; + return this; + } + + /** + * Get the days property: Indicates the number of days that metrics or logging or soft-deleted data should be + * retained. All data older than this value will be deleted. + * + * @return the days value. + */ + public Integer getDays() { + return this.days; + } + + /** + * Set the days property: Indicates the number of days that metrics or logging or soft-deleted data should be + * retained. All data older than this value will be deleted. + * + * @param days the days value to set. + * @return the BlobRetentionPolicy object itself. + */ + public BlobRetentionPolicy setDays(Integer days) { + this.days = days; + return this; + } + + @Override + public XmlWriter toXml(XmlWriter xmlWriter) throws XMLStreamException { + return toXml(xmlWriter, null); + } + + @Override + public XmlWriter toXml(XmlWriter xmlWriter, String rootElementName) throws XMLStreamException { + rootElementName = CoreUtils.isNullOrEmpty(rootElementName) ? "BlobRetentionPolicy" : rootElementName; + xmlWriter.writeStartElement(rootElementName); + xmlWriter.writeBooleanElement("Enabled", this.enabled); + xmlWriter.writeNumberElement("Days", this.days); + return xmlWriter.writeEndElement(); + } + + /** + * Reads an instance of BlobRetentionPolicy from the XmlReader. + * + * @param xmlReader The XmlReader being read. + * @return An instance of BlobRetentionPolicy if the XmlReader was pointing to an instance of it, or null if it was + * pointing to XML null. + * @throws XMLStreamException If an error occurs while reading the BlobRetentionPolicy. + */ + public static BlobRetentionPolicy fromXml(XmlReader xmlReader) throws XMLStreamException { + return fromXml(xmlReader, null); + } + + /** + * Reads an instance of BlobRetentionPolicy from the XmlReader. + * + * @param xmlReader The XmlReader being read. + * @param rootElementName Optional root element name to override the default defined by the model. Used to support + * cases where the model can deserialize from different root element names. + * @return An instance of BlobRetentionPolicy if the XmlReader was pointing to an instance of it, or null if it was + * pointing to XML null. + * @throws XMLStreamException If an error occurs while reading the BlobRetentionPolicy. + */ + public static BlobRetentionPolicy fromXml(XmlReader xmlReader, String rootElementName) throws XMLStreamException { + String finalRootElementName + = CoreUtils.isNullOrEmpty(rootElementName) ? "BlobRetentionPolicy" : rootElementName; + return xmlReader.readObject(finalRootElementName, reader -> { + BlobRetentionPolicy deserializedBlobRetentionPolicy = new BlobRetentionPolicy(); + while (reader.nextElement() != XmlToken.END_ELEMENT) { + QName elementName = reader.getElementName(); + + if ("Enabled".equals(elementName.getLocalPart())) { + deserializedBlobRetentionPolicy.enabled = reader.getBooleanElement(); + } else if ("Days".equals(elementName.getLocalPart())) { + deserializedBlobRetentionPolicy.days = reader.getNullableElement(Integer::parseInt); + } else { + reader.skipElement(); + } + } + + return deserializedBlobRetentionPolicy; + }); + } +} diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlobServiceProperties.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlobServiceProperties.java new file mode 100644 index 000000000000..c9c5fae10989 --- /dev/null +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlobServiceProperties.java @@ -0,0 +1,306 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.storage.blob.models; + +import com.azure.core.v2.annotation.Fluent; +import com.azure.core.v2.util.CoreUtils; +import io.clientcore.core.serialization.xml.XmlReader; +import io.clientcore.core.serialization.xml.XmlSerializable; +import io.clientcore.core.serialization.xml.XmlToken; +import io.clientcore.core.serialization.xml.XmlWriter; +import java.util.ArrayList; +import java.util.List; +import javax.xml.namespace.QName; +import javax.xml.stream.XMLStreamException; + +/** + * Storage Service Properties. + */ +@Fluent +public final class BlobServiceProperties implements XmlSerializable { + /* + * Azure Analytics Logging settings. + */ + private BlobAnalyticsLogging logging; + + /* + * a summary of request statistics grouped by API in hour or minute aggregates for blobs + */ + private BlobMetrics hourMetrics; + + /* + * a summary of request statistics grouped by API in hour or minute aggregates for blobs + */ + private BlobMetrics minuteMetrics; + + /* + * The set of CORS rules. + */ + 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 + */ + private String defaultServiceVersion; + + /* + * the retention policy which determines how long the associated data should persist + */ + private BlobRetentionPolicy deleteRetentionPolicy; + + /* + * The properties that enable an account to host a static website + */ + private StaticWebsite staticWebsite; + + /** + * Creates an instance of BlobServiceProperties class. + */ + public BlobServiceProperties() { + } + + /** + * Get the logging property: Azure Analytics Logging settings. + * + * @return the logging value. + */ + public BlobAnalyticsLogging getLogging() { + return this.logging; + } + + /** + * Set the logging property: Azure Analytics Logging settings. + * + * @param logging the logging value to set. + * @return the BlobServiceProperties object itself. + */ + public BlobServiceProperties setLogging(BlobAnalyticsLogging logging) { + this.logging = logging; + return this; + } + + /** + * Get the hourMetrics property: a summary of request statistics grouped by API in hour or minute aggregates for + * blobs. + * + * @return the hourMetrics value. + */ + public BlobMetrics getHourMetrics() { + return this.hourMetrics; + } + + /** + * Set the hourMetrics property: a summary of request statistics grouped by API in hour or minute aggregates for + * blobs. + * + * @param hourMetrics the hourMetrics value to set. + * @return the BlobServiceProperties object itself. + */ + public BlobServiceProperties setHourMetrics(BlobMetrics hourMetrics) { + this.hourMetrics = hourMetrics; + return this; + } + + /** + * Get the minuteMetrics property: a summary of request statistics grouped by API in hour or minute aggregates for + * blobs. + * + * @return the minuteMetrics value. + */ + public BlobMetrics getMinuteMetrics() { + return this.minuteMetrics; + } + + /** + * Set the minuteMetrics property: a summary of request statistics grouped by API in hour or minute aggregates for + * blobs. + * + * @param minuteMetrics the minuteMetrics value to set. + * @return the BlobServiceProperties object itself. + */ + public BlobServiceProperties setMinuteMetrics(BlobMetrics minuteMetrics) { + this.minuteMetrics = minuteMetrics; + return this; + } + + /** + * Get the cors property: The set of CORS rules. + * + * @return the cors value. + */ + public List getCors() { + if (this.cors == null) { + this.cors = new ArrayList<>(); + } + return this.cors; + } + + /** + * Set the cors property: The set of CORS rules. + * + * @param cors the cors value to set. + * @return the BlobServiceProperties object itself. + */ + public BlobServiceProperties setCors(List cors) { + this.cors = cors; + return this; + } + + /** + * Get the defaultServiceVersion property: The default version to use for requests to the Blob service if an + * incoming request's version is not specified. Possible values include version 2008-10-27 and all more recent + * versions. + * + * @return the defaultServiceVersion value. + */ + public String getDefaultServiceVersion() { + return this.defaultServiceVersion; + } + + /** + * Set the defaultServiceVersion property: The default version to use for requests to the Blob service if an + * incoming request's version is not specified. Possible values include version 2008-10-27 and all more recent + * versions. + * + * @param defaultServiceVersion the defaultServiceVersion value to set. + * @return the BlobServiceProperties object itself. + */ + public BlobServiceProperties setDefaultServiceVersion(String defaultServiceVersion) { + this.defaultServiceVersion = defaultServiceVersion; + return this; + } + + /** + * Get the deleteRetentionPolicy property: the retention policy which determines how long the associated data should + * persist. + * + * @return the deleteRetentionPolicy value. + */ + public BlobRetentionPolicy getDeleteRetentionPolicy() { + return this.deleteRetentionPolicy; + } + + /** + * Set the deleteRetentionPolicy property: the retention policy which determines how long the associated data should + * persist. + * + * @param deleteRetentionPolicy the deleteRetentionPolicy value to set. + * @return the BlobServiceProperties object itself. + */ + public BlobServiceProperties setDeleteRetentionPolicy(BlobRetentionPolicy deleteRetentionPolicy) { + this.deleteRetentionPolicy = deleteRetentionPolicy; + return this; + } + + /** + * Get the staticWebsite property: The properties that enable an account to host a static website. + * + * @return the staticWebsite value. + */ + public StaticWebsite getStaticWebsite() { + return this.staticWebsite; + } + + /** + * Set the staticWebsite property: The properties that enable an account to host a static website. + * + * @param staticWebsite the staticWebsite value to set. + * @return the BlobServiceProperties object itself. + */ + public BlobServiceProperties setStaticWebsite(StaticWebsite staticWebsite) { + this.staticWebsite = staticWebsite; + return this; + } + + @Override + public XmlWriter toXml(XmlWriter xmlWriter) throws XMLStreamException { + return toXml(xmlWriter, null); + } + + @Override + public XmlWriter toXml(XmlWriter xmlWriter, String rootElementName) throws XMLStreamException { + rootElementName = CoreUtils.isNullOrEmpty(rootElementName) ? "StorageServiceProperties" : rootElementName; + xmlWriter.writeStartElement(rootElementName); + xmlWriter.writeXml(this.logging, "Logging"); + xmlWriter.writeXml(this.hourMetrics, "HourMetrics"); + xmlWriter.writeXml(this.minuteMetrics, "MinuteMetrics"); + if (this.cors != null) { + xmlWriter.writeStartElement("Cors"); + for (BlobCorsRule element : this.cors) { + xmlWriter.writeXml(element, "CorsRule"); + } + xmlWriter.writeEndElement(); + } + xmlWriter.writeStringElement("DefaultServiceVersion", this.defaultServiceVersion); + xmlWriter.writeXml(this.deleteRetentionPolicy, "DeleteRetentionPolicy"); + xmlWriter.writeXml(this.staticWebsite, "StaticWebsite"); + return xmlWriter.writeEndElement(); + } + + /** + * Reads an instance of BlobServiceProperties from the XmlReader. + * + * @param xmlReader The XmlReader being read. + * @return An instance of BlobServiceProperties if the XmlReader was pointing to an instance of it, or null if it + * was pointing to XML null. + * @throws XMLStreamException If an error occurs while reading the BlobServiceProperties. + */ + public static BlobServiceProperties fromXml(XmlReader xmlReader) throws XMLStreamException { + return fromXml(xmlReader, null); + } + + /** + * Reads an instance of BlobServiceProperties from the XmlReader. + * + * @param xmlReader The XmlReader being read. + * @param rootElementName Optional root element name to override the default defined by the model. Used to support + * cases where the model can deserialize from different root element names. + * @return An instance of BlobServiceProperties if the XmlReader was pointing to an instance of it, or null if it + * was pointing to XML null. + * @throws XMLStreamException If an error occurs while reading the BlobServiceProperties. + */ + public static BlobServiceProperties fromXml(XmlReader xmlReader, String rootElementName) throws XMLStreamException { + String finalRootElementName + = CoreUtils.isNullOrEmpty(rootElementName) ? "StorageServiceProperties" : rootElementName; + return xmlReader.readObject(finalRootElementName, reader -> { + BlobServiceProperties deserializedBlobServiceProperties = new BlobServiceProperties(); + while (reader.nextElement() != XmlToken.END_ELEMENT) { + QName elementName = reader.getElementName(); + + if ("Logging".equals(elementName.getLocalPart())) { + deserializedBlobServiceProperties.logging = BlobAnalyticsLogging.fromXml(reader, "Logging"); + } else if ("HourMetrics".equals(elementName.getLocalPart())) { + deserializedBlobServiceProperties.hourMetrics = BlobMetrics.fromXml(reader, "HourMetrics"); + } else if ("MinuteMetrics".equals(elementName.getLocalPart())) { + deserializedBlobServiceProperties.minuteMetrics = BlobMetrics.fromXml(reader, "MinuteMetrics"); + } else if ("Cors".equals(elementName.getLocalPart())) { + while (reader.nextElement() != XmlToken.END_ELEMENT) { + elementName = reader.getElementName(); + if ("CorsRule".equals(elementName.getLocalPart())) { + if (deserializedBlobServiceProperties.cors == null) { + deserializedBlobServiceProperties.cors = new ArrayList<>(); + } + deserializedBlobServiceProperties.cors.add(BlobCorsRule.fromXml(reader, "CorsRule")); + } else { + reader.skipElement(); + } + } + } else if ("DefaultServiceVersion".equals(elementName.getLocalPart())) { + deserializedBlobServiceProperties.defaultServiceVersion = reader.getStringElement(); + } else if ("DeleteRetentionPolicy".equals(elementName.getLocalPart())) { + deserializedBlobServiceProperties.deleteRetentionPolicy + = BlobRetentionPolicy.fromXml(reader, "DeleteRetentionPolicy"); + } else if ("StaticWebsite".equals(elementName.getLocalPart())) { + deserializedBlobServiceProperties.staticWebsite = StaticWebsite.fromXml(reader, "StaticWebsite"); + } else { + reader.skipElement(); + } + } + + return deserializedBlobServiceProperties; + }); + } +} diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlobServiceStatistics.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlobServiceStatistics.java new file mode 100644 index 000000000000..7da1a02bd451 --- /dev/null +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlobServiceStatistics.java @@ -0,0 +1,105 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.storage.blob.models; + +import com.azure.core.v2.annotation.Fluent; +import com.azure.core.v2.util.CoreUtils; +import io.clientcore.core.serialization.xml.XmlReader; +import io.clientcore.core.serialization.xml.XmlSerializable; +import io.clientcore.core.serialization.xml.XmlToken; +import io.clientcore.core.serialization.xml.XmlWriter; +import javax.xml.namespace.QName; +import javax.xml.stream.XMLStreamException; + +/** + * Stats for the storage service. + */ +@Fluent +public final class BlobServiceStatistics implements XmlSerializable { + /* + * Geo-Replication information for the Secondary Storage Service + */ + private GeoReplication geoReplication; + + /** + * Creates an instance of BlobServiceStatistics class. + */ + public BlobServiceStatistics() { + } + + /** + * Get the geoReplication property: Geo-Replication information for the Secondary Storage Service. + * + * @return the geoReplication value. + */ + public GeoReplication getGeoReplication() { + return this.geoReplication; + } + + /** + * Set the geoReplication property: Geo-Replication information for the Secondary Storage Service. + * + * @param geoReplication the geoReplication value to set. + * @return the BlobServiceStatistics object itself. + */ + public BlobServiceStatistics setGeoReplication(GeoReplication geoReplication) { + this.geoReplication = geoReplication; + return this; + } + + @Override + public XmlWriter toXml(XmlWriter xmlWriter) throws XMLStreamException { + return toXml(xmlWriter, null); + } + + @Override + public XmlWriter toXml(XmlWriter xmlWriter, String rootElementName) throws XMLStreamException { + rootElementName = CoreUtils.isNullOrEmpty(rootElementName) ? "StorageServiceStats" : rootElementName; + xmlWriter.writeStartElement(rootElementName); + xmlWriter.writeXml(this.geoReplication, "GeoReplication"); + return xmlWriter.writeEndElement(); + } + + /** + * Reads an instance of BlobServiceStatistics from the XmlReader. + * + * @param xmlReader The XmlReader being read. + * @return An instance of BlobServiceStatistics if the XmlReader was pointing to an instance of it, or null if it + * was pointing to XML null. + * @throws XMLStreamException If an error occurs while reading the BlobServiceStatistics. + */ + public static BlobServiceStatistics fromXml(XmlReader xmlReader) throws XMLStreamException { + return fromXml(xmlReader, null); + } + + /** + * Reads an instance of BlobServiceStatistics from the XmlReader. + * + * @param xmlReader The XmlReader being read. + * @param rootElementName Optional root element name to override the default defined by the model. Used to support + * cases where the model can deserialize from different root element names. + * @return An instance of BlobServiceStatistics if the XmlReader was pointing to an instance of it, or null if it + * was pointing to XML null. + * @throws XMLStreamException If an error occurs while reading the BlobServiceStatistics. + */ + public static BlobServiceStatistics fromXml(XmlReader xmlReader, String rootElementName) throws XMLStreamException { + String finalRootElementName + = CoreUtils.isNullOrEmpty(rootElementName) ? "StorageServiceStats" : rootElementName; + return xmlReader.readObject(finalRootElementName, reader -> { + BlobServiceStatistics deserializedBlobServiceStatistics = new BlobServiceStatistics(); + while (reader.nextElement() != XmlToken.END_ELEMENT) { + QName elementName = reader.getElementName(); + + if ("GeoReplication".equals(elementName.getLocalPart())) { + deserializedBlobServiceStatistics.geoReplication = GeoReplication.fromXml(reader, "GeoReplication"); + } else { + reader.skipElement(); + } + } + + return deserializedBlobServiceStatistics; + }); + } +} diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlobSignedIdentifier.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlobSignedIdentifier.java new file mode 100644 index 000000000000..4c857ab52a41 --- /dev/null +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlobSignedIdentifier.java @@ -0,0 +1,132 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.storage.blob.models; + +import com.azure.core.v2.annotation.Fluent; +import com.azure.core.v2.util.CoreUtils; +import io.clientcore.core.serialization.xml.XmlReader; +import io.clientcore.core.serialization.xml.XmlSerializable; +import io.clientcore.core.serialization.xml.XmlToken; +import io.clientcore.core.serialization.xml.XmlWriter; +import javax.xml.namespace.QName; +import javax.xml.stream.XMLStreamException; + +/** + * signed identifier. + */ +@Fluent +public final class BlobSignedIdentifier implements XmlSerializable { + /* + * a unique id + */ + private String id; + + /* + * An Access policy + */ + private BlobAccessPolicy accessPolicy; + + /** + * Creates an instance of BlobSignedIdentifier class. + */ + public BlobSignedIdentifier() { + } + + /** + * Get the id property: a unique id. + * + * @return the id value. + */ + public String getId() { + return this.id; + } + + /** + * Set the id property: a unique id. + * + * @param id the id value to set. + * @return the BlobSignedIdentifier object itself. + */ + public BlobSignedIdentifier setId(String id) { + this.id = id; + return this; + } + + /** + * Get the accessPolicy property: An Access policy. + * + * @return the accessPolicy value. + */ + public BlobAccessPolicy getAccessPolicy() { + return this.accessPolicy; + } + + /** + * Set the accessPolicy property: An Access policy. + * + * @param accessPolicy the accessPolicy value to set. + * @return the BlobSignedIdentifier object itself. + */ + public BlobSignedIdentifier setAccessPolicy(BlobAccessPolicy accessPolicy) { + this.accessPolicy = accessPolicy; + return this; + } + + @Override + public XmlWriter toXml(XmlWriter xmlWriter) throws XMLStreamException { + return toXml(xmlWriter, null); + } + + @Override + public XmlWriter toXml(XmlWriter xmlWriter, String rootElementName) throws XMLStreamException { + rootElementName = CoreUtils.isNullOrEmpty(rootElementName) ? "SignedIdentifier" : rootElementName; + xmlWriter.writeStartElement(rootElementName); + xmlWriter.writeStringElement("Id", this.id); + xmlWriter.writeXml(this.accessPolicy, "AccessPolicy"); + return xmlWriter.writeEndElement(); + } + + /** + * Reads an instance of BlobSignedIdentifier from the XmlReader. + * + * @param xmlReader The XmlReader being read. + * @return An instance of BlobSignedIdentifier if the XmlReader was pointing to an instance of it, or null if it was + * pointing to XML null. + * @throws XMLStreamException If an error occurs while reading the BlobSignedIdentifier. + */ + public static BlobSignedIdentifier fromXml(XmlReader xmlReader) throws XMLStreamException { + return fromXml(xmlReader, null); + } + + /** + * Reads an instance of BlobSignedIdentifier from the XmlReader. + * + * @param xmlReader The XmlReader being read. + * @param rootElementName Optional root element name to override the default defined by the model. Used to support + * cases where the model can deserialize from different root element names. + * @return An instance of BlobSignedIdentifier if the XmlReader was pointing to an instance of it, or null if it was + * pointing to XML null. + * @throws XMLStreamException If an error occurs while reading the BlobSignedIdentifier. + */ + public static BlobSignedIdentifier fromXml(XmlReader xmlReader, String rootElementName) throws XMLStreamException { + String finalRootElementName = CoreUtils.isNullOrEmpty(rootElementName) ? "SignedIdentifier" : rootElementName; + return xmlReader.readObject(finalRootElementName, reader -> { + BlobSignedIdentifier deserializedBlobSignedIdentifier = new BlobSignedIdentifier(); + while (reader.nextElement() != XmlToken.END_ELEMENT) { + QName elementName = reader.getElementName(); + + if ("Id".equals(elementName.getLocalPart())) { + deserializedBlobSignedIdentifier.id = reader.getStringElement(); + } else if ("AccessPolicy".equals(elementName.getLocalPart())) { + deserializedBlobSignedIdentifier.accessPolicy = BlobAccessPolicy.fromXml(reader, "AccessPolicy"); + } else { + reader.skipElement(); + } + } + + return deserializedBlobSignedIdentifier; + }); + } +} diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlobTag.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlobTag.java new file mode 100644 index 000000000000..57ffff5a3627 --- /dev/null +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlobTag.java @@ -0,0 +1,132 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.storage.blob.models; + +import com.azure.core.v2.annotation.Fluent; +import com.azure.core.v2.util.CoreUtils; +import io.clientcore.core.serialization.xml.XmlReader; +import io.clientcore.core.serialization.xml.XmlSerializable; +import io.clientcore.core.serialization.xml.XmlToken; +import io.clientcore.core.serialization.xml.XmlWriter; +import javax.xml.namespace.QName; +import javax.xml.stream.XMLStreamException; + +/** + * The BlobTag model. + */ +@Fluent +public final class BlobTag implements XmlSerializable { + /* + * The Key property. + */ + private String key; + + /* + * The Value property. + */ + private String value; + + /** + * Creates an instance of BlobTag class. + */ + public BlobTag() { + } + + /** + * Get the key property: The Key property. + * + * @return the key value. + */ + public String getKey() { + return this.key; + } + + /** + * Set the key property: The Key property. + * + * @param key the key value to set. + * @return the BlobTag object itself. + */ + public BlobTag setKey(String key) { + this.key = key; + return this; + } + + /** + * Get the value property: The Value property. + * + * @return the value value. + */ + 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. + */ + public BlobTag setValue(String value) { + this.value = value; + return this; + } + + @Override + public XmlWriter toXml(XmlWriter xmlWriter) throws XMLStreamException { + return toXml(xmlWriter, null); + } + + @Override + public XmlWriter toXml(XmlWriter xmlWriter, String rootElementName) throws XMLStreamException { + rootElementName = CoreUtils.isNullOrEmpty(rootElementName) ? "Tag" : rootElementName; + xmlWriter.writeStartElement(rootElementName); + xmlWriter.writeStringElement("Key", this.key); + xmlWriter.writeStringElement("Value", this.value); + return xmlWriter.writeEndElement(); + } + + /** + * Reads an instance of BlobTag from the XmlReader. + * + * @param xmlReader The XmlReader being read. + * @return An instance of BlobTag if the XmlReader was pointing to an instance of it, or null if it was pointing to + * XML null. + * @throws XMLStreamException If an error occurs while reading the BlobTag. + */ + public static BlobTag fromXml(XmlReader xmlReader) throws XMLStreamException { + return fromXml(xmlReader, null); + } + + /** + * Reads an instance of BlobTag from the XmlReader. + * + * @param xmlReader The XmlReader being read. + * @param rootElementName Optional root element name to override the default defined by the model. Used to support + * cases where the model can deserialize from different root element names. + * @return An instance of BlobTag if the XmlReader was pointing to an instance of it, or null if it was pointing to + * XML null. + * @throws XMLStreamException If an error occurs while reading the BlobTag. + */ + public static BlobTag fromXml(XmlReader xmlReader, String rootElementName) throws XMLStreamException { + String finalRootElementName = CoreUtils.isNullOrEmpty(rootElementName) ? "Tag" : rootElementName; + return xmlReader.readObject(finalRootElementName, reader -> { + BlobTag deserializedBlobTag = new BlobTag(); + while (reader.nextElement() != XmlToken.END_ELEMENT) { + QName elementName = reader.getElementName(); + + if ("Key".equals(elementName.getLocalPart())) { + deserializedBlobTag.key = reader.getStringElement(); + } else if ("Value".equals(elementName.getLocalPart())) { + deserializedBlobTag.value = reader.getStringElement(); + } else { + reader.skipElement(); + } + } + + return deserializedBlobTag; + }); + } +} diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlobTags.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlobTags.java new file mode 100644 index 000000000000..0f1041f4dab0 --- /dev/null +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlobTags.java @@ -0,0 +1,125 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.storage.blob.models; + +import com.azure.core.v2.annotation.Fluent; +import com.azure.core.v2.util.CoreUtils; +import io.clientcore.core.serialization.xml.XmlReader; +import io.clientcore.core.serialization.xml.XmlSerializable; +import io.clientcore.core.serialization.xml.XmlToken; +import io.clientcore.core.serialization.xml.XmlWriter; +import java.util.ArrayList; +import java.util.List; +import javax.xml.namespace.QName; +import javax.xml.stream.XMLStreamException; + +/** + * Blob tags. + */ +@Fluent +public final class BlobTags implements XmlSerializable { + /* + * The BlobTagSet property. + */ + private List blobTagSet; + + /** + * Creates an instance of BlobTags class. + */ + public BlobTags() { + } + + /** + * Get the blobTagSet property: The BlobTagSet property. + * + * @return the blobTagSet value. + */ + public List getBlobTagSet() { + if (this.blobTagSet == null) { + this.blobTagSet = new ArrayList<>(); + } + return this.blobTagSet; + } + + /** + * Set the blobTagSet property: The BlobTagSet property. + * + * @param blobTagSet the blobTagSet value to set. + * @return the BlobTags object itself. + */ + public BlobTags setBlobTagSet(List blobTagSet) { + this.blobTagSet = blobTagSet; + return this; + } + + @Override + public XmlWriter toXml(XmlWriter xmlWriter) throws XMLStreamException { + return toXml(xmlWriter, null); + } + + @Override + public XmlWriter toXml(XmlWriter xmlWriter, String rootElementName) throws XMLStreamException { + rootElementName = CoreUtils.isNullOrEmpty(rootElementName) ? "Tags" : rootElementName; + xmlWriter.writeStartElement(rootElementName); + if (this.blobTagSet != null) { + xmlWriter.writeStartElement("TagSet"); + for (BlobTag element : this.blobTagSet) { + xmlWriter.writeXml(element, "Tag"); + } + xmlWriter.writeEndElement(); + } + return xmlWriter.writeEndElement(); + } + + /** + * Reads an instance of BlobTags from the XmlReader. + * + * @param xmlReader The XmlReader being read. + * @return An instance of BlobTags if the XmlReader was pointing to an instance of it, or null if it was pointing to + * XML null. + * @throws XMLStreamException If an error occurs while reading the BlobTags. + */ + public static BlobTags fromXml(XmlReader xmlReader) throws XMLStreamException { + return fromXml(xmlReader, null); + } + + /** + * Reads an instance of BlobTags from the XmlReader. + * + * @param xmlReader The XmlReader being read. + * @param rootElementName Optional root element name to override the default defined by the model. Used to support + * cases where the model can deserialize from different root element names. + * @return An instance of BlobTags if the XmlReader was pointing to an instance of it, or null if it was pointing to + * XML null. + * @throws XMLStreamException If an error occurs while reading the BlobTags. + */ + public static BlobTags fromXml(XmlReader xmlReader, String rootElementName) throws XMLStreamException { + String finalRootElementName = CoreUtils.isNullOrEmpty(rootElementName) ? "Tags" : rootElementName; + return xmlReader.readObject(finalRootElementName, reader -> { + BlobTags deserializedBlobTags = new BlobTags(); + while (reader.nextElement() != XmlToken.END_ELEMENT) { + QName elementName = reader.getElementName(); + + if ("TagSet".equals(elementName.getLocalPart())) { + while (reader.nextElement() != XmlToken.END_ELEMENT) { + elementName = reader.getElementName(); + if ("Tag".equals(elementName.getLocalPart())) { + if (deserializedBlobTags.blobTagSet == null) { + deserializedBlobTags.blobTagSet = new ArrayList<>(); + } + deserializedBlobTags.blobTagSet.add(BlobTag.fromXml(reader, "Tag")); + } else { + reader.skipElement(); + } + } + } else { + reader.skipElement(); + } + } + + return deserializedBlobTags; + }); + } +} diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlobType.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlobType.java new file mode 100644 index 000000000000..8e4447a018fd --- /dev/null +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlobType.java @@ -0,0 +1,61 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.storage.blob.models; + +/** + * Defines values for BlobType. + */ +public enum BlobType { + /** + * Enum value BlockBlob. + */ + BLOCK_BLOB("BlockBlob"), + + /** + * Enum value PageBlob. + */ + PAGE_BLOB("PageBlob"), + + /** + * Enum value AppendBlob. + */ + APPEND_BLOB("AppendBlob"); + + /** + * The actual serialized value for a BlobType instance. + */ + private final String value; + + BlobType(String value) { + this.value = value; + } + + /** + * Parses a serialized value to a BlobType instance. + * + * @param value the serialized value to parse. + * @return the parsed BlobType object, or null if unable to parse. + */ + public static BlobType fromString(String value) { + if (value == null) { + return null; + } + BlobType[] items = BlobType.values(); + for (BlobType 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-v2/src/main/java/com/azure/storage/blob/models/BlobsAbortCopyFromURLHeaders.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlobsAbortCopyFromURLHeaders.java new file mode 100644 index 000000000000..8ca669cbce40 --- /dev/null +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlobsAbortCopyFromURLHeaders.java @@ -0,0 +1,143 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.storage.blob.models; + +import com.azure.core.v2.annotation.Fluent; +import io.clientcore.core.http.models.DateTimeRfc1123; +import io.clientcore.core.http.models.HttpHeaderName; +import io.clientcore.core.http.models.HttpHeaders; + +import java.time.OffsetDateTime; + +/** + * The BlobsAbortCopyFromURLHeaders model. + */ +@Fluent +public final class BlobsAbortCopyFromURLHeaders { + /* + * The x-ms-version property. + */ + private String xMsVersion; + + /* + * The x-ms-request-id property. + */ + private String xMsRequestId; + + /* + * The x-ms-client-request-id property. + */ + private String xMsClientRequestId; + + /* + * The Date property. + */ + 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.xMsVersion = rawHeaders.getValue(X_MS_VERSION); + this.xMsRequestId = rawHeaders.getValue(HttpHeaderName.fromString("x-ms-request-id")); + this.xMsClientRequestId = rawHeaders.getValue(HttpHeaderName.fromString("x-ms-client-request-id")); + String date = rawHeaders.getValue(HttpHeaderName.DATE); + if (date != null) { + this.date = new DateTimeRfc1123(date); + } + } + + /** + * 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 BlobsAbortCopyFromURLHeaders object itself. + */ + public BlobsAbortCopyFromURLHeaders setXMsVersion(String xMsVersion) { + this.xMsVersion = xMsVersion; + 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 BlobsAbortCopyFromURLHeaders object itself. + */ + public BlobsAbortCopyFromURLHeaders 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 BlobsAbortCopyFromURLHeaders object itself. + */ + public BlobsAbortCopyFromURLHeaders setXMsClientRequestId(String xMsClientRequestId) { + this.xMsClientRequestId = xMsClientRequestId; + return this; + } + + /** + * Get the date property: The Date property. + * + * @return the date value. + */ + 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. + */ + 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-v2/src/main/java/com/azure/storage/blob/models/BlobsAcquireLeaseHeaders.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlobsAcquireLeaseHeaders.java new file mode 100644 index 000000000000..206ec3154da4 --- /dev/null +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlobsAcquireLeaseHeaders.java @@ -0,0 +1,233 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.storage.blob.models; + +import com.azure.core.v2.annotation.Fluent; +import io.clientcore.core.http.models.DateTimeRfc1123; +import io.clientcore.core.http.models.HttpHeaderName; +import io.clientcore.core.http.models.HttpHeaders; + +import java.time.OffsetDateTime; + +/** + * The BlobsAcquireLeaseHeaders model. + */ +@Fluent +public final class BlobsAcquireLeaseHeaders { + /* + * The x-ms-version property. + */ + private String xMsVersion; + + /* + * The ETag property. + */ + private String eTag; + + /* + * The x-ms-lease-id property. + */ + private String xMsLeaseId; + + /* + * 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 date; + + private static final HttpHeaderName X_MS_VERSION = HttpHeaderName.fromString("x-ms-version"); + + private static final HttpHeaderName X_MS_LEASE_ID = HttpHeaderName.fromString("x-ms-lease-id"); + + // HttpHeaders containing the raw property values. + /** + * Creates an instance of BlobsAcquireLeaseHeaders class. + * + * @param rawHeaders The raw HttpHeaders that will be used to create the property values. + */ + public BlobsAcquireLeaseHeaders(HttpHeaders rawHeaders) { + this.xMsVersion = rawHeaders.getValue(X_MS_VERSION); + this.eTag = rawHeaders.getValue(HttpHeaderName.ETAG); + this.xMsLeaseId = rawHeaders.getValue(X_MS_LEASE_ID); + String lastModified = rawHeaders.getValue(HttpHeaderName.LAST_MODIFIED); + if (lastModified != null) { + this.lastModified = new DateTimeRfc1123(lastModified); + } + this.xMsRequestId = rawHeaders.getValue(HttpHeaderName.fromString("x-ms-request-id")); + this.xMsClientRequestId = rawHeaders.getValue(HttpHeaderName.fromString("x-ms-client-request-id")); + String date = rawHeaders.getValue(HttpHeaderName.DATE); + if (date != null) { + this.date = new DateTimeRfc1123(date); + } + } + + /** + * 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 BlobsAcquireLeaseHeaders object itself. + */ + public BlobsAcquireLeaseHeaders 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 BlobsAcquireLeaseHeaders object itself. + */ + public BlobsAcquireLeaseHeaders setETag(String eTag) { + this.eTag = eTag; + return this; + } + + /** + * Get the xMsLeaseId property: The x-ms-lease-id property. + * + * @return the xMsLeaseId value. + */ + 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. + */ + public BlobsAcquireLeaseHeaders setXMsLeaseId(String xMsLeaseId) { + this.xMsLeaseId = xMsLeaseId; + 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 BlobsAcquireLeaseHeaders object itself. + */ + public BlobsAcquireLeaseHeaders 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 BlobsAcquireLeaseHeaders object itself. + */ + public BlobsAcquireLeaseHeaders 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 BlobsAcquireLeaseHeaders object itself. + */ + public BlobsAcquireLeaseHeaders setXMsClientRequestId(String xMsClientRequestId) { + this.xMsClientRequestId = xMsClientRequestId; + return this; + } + + /** + * Get the date property: The Date property. + * + * @return the date value. + */ + 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 BlobsAcquireLeaseHeaders object itself. + */ + public BlobsAcquireLeaseHeaders 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-v2/src/main/java/com/azure/storage/blob/models/BlobsBreakLeaseHeaders.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlobsBreakLeaseHeaders.java new file mode 100644 index 000000000000..c23552c1bd03 --- /dev/null +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlobsBreakLeaseHeaders.java @@ -0,0 +1,236 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.storage.blob.models; + +import com.azure.core.v2.annotation.Fluent; +import io.clientcore.core.http.models.DateTimeRfc1123; +import io.clientcore.core.http.models.HttpHeaderName; +import io.clientcore.core.http.models.HttpHeaders; + +import java.time.OffsetDateTime; + +/** + * The BlobsBreakLeaseHeaders model. + */ +@Fluent +public final class BlobsBreakLeaseHeaders { + /* + * The x-ms-version property. + */ + private String xMsVersion; + + /* + * The ETag property. + */ + private String eTag; + + /* + * The x-ms-lease-time property. + */ + private Integer xMsLeaseTime; + + /* + * 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 date; + + private static final HttpHeaderName X_MS_VERSION = HttpHeaderName.fromString("x-ms-version"); + + private static final HttpHeaderName X_MS_LEASE_TIME = HttpHeaderName.fromString("x-ms-lease-time"); + + // HttpHeaders containing the raw property values. + /** + * Creates an instance of BlobsBreakLeaseHeaders class. + * + * @param rawHeaders The raw HttpHeaders that will be used to create the property values. + */ + public BlobsBreakLeaseHeaders(HttpHeaders rawHeaders) { + this.xMsVersion = rawHeaders.getValue(X_MS_VERSION); + this.eTag = rawHeaders.getValue(HttpHeaderName.ETAG); + String xMsLeaseTime = rawHeaders.getValue(X_MS_LEASE_TIME); + if (xMsLeaseTime != null) { + this.xMsLeaseTime = Integer.parseInt(xMsLeaseTime); + } + String lastModified = rawHeaders.getValue(HttpHeaderName.LAST_MODIFIED); + if (lastModified != null) { + this.lastModified = new DateTimeRfc1123(lastModified); + } + this.xMsRequestId = rawHeaders.getValue(HttpHeaderName.fromString("x-ms-request-id")); + this.xMsClientRequestId = rawHeaders.getValue(HttpHeaderName.fromString("x-ms-client-request-id")); + String date = rawHeaders.getValue(HttpHeaderName.DATE); + if (date != null) { + this.date = new DateTimeRfc1123(date); + } + } + + /** + * 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 BlobsBreakLeaseHeaders object itself. + */ + public BlobsBreakLeaseHeaders 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 BlobsBreakLeaseHeaders object itself. + */ + public BlobsBreakLeaseHeaders setETag(String eTag) { + this.eTag = eTag; + return this; + } + + /** + * Get the xMsLeaseTime property: The x-ms-lease-time property. + * + * @return the xMsLeaseTime value. + */ + 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. + */ + public BlobsBreakLeaseHeaders setXMsLeaseTime(Integer xMsLeaseTime) { + this.xMsLeaseTime = xMsLeaseTime; + 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 BlobsBreakLeaseHeaders object itself. + */ + public BlobsBreakLeaseHeaders 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 BlobsBreakLeaseHeaders object itself. + */ + public BlobsBreakLeaseHeaders 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 BlobsBreakLeaseHeaders object itself. + */ + public BlobsBreakLeaseHeaders setXMsClientRequestId(String xMsClientRequestId) { + this.xMsClientRequestId = xMsClientRequestId; + return this; + } + + /** + * Get the date property: The Date property. + * + * @return the date value. + */ + 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 BlobsBreakLeaseHeaders object itself. + */ + public BlobsBreakLeaseHeaders 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-v2/src/main/java/com/azure/storage/blob/models/BlobsChangeLeaseHeaders.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlobsChangeLeaseHeaders.java new file mode 100644 index 000000000000..98bced8d589e --- /dev/null +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlobsChangeLeaseHeaders.java @@ -0,0 +1,233 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.storage.blob.models; + +import com.azure.core.v2.annotation.Fluent; +import io.clientcore.core.http.models.DateTimeRfc1123; +import io.clientcore.core.http.models.HttpHeaderName; +import io.clientcore.core.http.models.HttpHeaders; + +import java.time.OffsetDateTime; + +/** + * The BlobsChangeLeaseHeaders model. + */ +@Fluent +public final class BlobsChangeLeaseHeaders { + /* + * The x-ms-version property. + */ + private String xMsVersion; + + /* + * The ETag property. + */ + private String eTag; + + /* + * The x-ms-lease-id property. + */ + private String xMsLeaseId; + + /* + * 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 date; + + private static final HttpHeaderName X_MS_VERSION = HttpHeaderName.fromString("x-ms-version"); + + private static final HttpHeaderName X_MS_LEASE_ID = HttpHeaderName.fromString("x-ms-lease-id"); + + // HttpHeaders containing the raw property values. + /** + * Creates an instance of BlobsChangeLeaseHeaders class. + * + * @param rawHeaders The raw HttpHeaders that will be used to create the property values. + */ + public BlobsChangeLeaseHeaders(HttpHeaders rawHeaders) { + this.xMsVersion = rawHeaders.getValue(X_MS_VERSION); + this.eTag = rawHeaders.getValue(HttpHeaderName.ETAG); + this.xMsLeaseId = rawHeaders.getValue(X_MS_LEASE_ID); + String lastModified = rawHeaders.getValue(HttpHeaderName.LAST_MODIFIED); + if (lastModified != null) { + this.lastModified = new DateTimeRfc1123(lastModified); + } + this.xMsRequestId = rawHeaders.getValue(HttpHeaderName.fromString("x-ms-request-id")); + this.xMsClientRequestId = rawHeaders.getValue(HttpHeaderName.fromString("x-ms-client-request-id")); + String date = rawHeaders.getValue(HttpHeaderName.DATE); + if (date != null) { + this.date = new DateTimeRfc1123(date); + } + } + + /** + * 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 BlobsChangeLeaseHeaders object itself. + */ + public BlobsChangeLeaseHeaders 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 BlobsChangeLeaseHeaders object itself. + */ + public BlobsChangeLeaseHeaders setETag(String eTag) { + this.eTag = eTag; + return this; + } + + /** + * Get the xMsLeaseId property: The x-ms-lease-id property. + * + * @return the xMsLeaseId value. + */ + 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 BlobsChangeLeaseHeaders object itself. + */ + public BlobsChangeLeaseHeaders setXMsLeaseId(String xMsLeaseId) { + this.xMsLeaseId = xMsLeaseId; + 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 BlobsChangeLeaseHeaders object itself. + */ + public BlobsChangeLeaseHeaders 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 BlobsChangeLeaseHeaders object itself. + */ + public BlobsChangeLeaseHeaders 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 BlobsChangeLeaseHeaders object itself. + */ + public BlobsChangeLeaseHeaders setXMsClientRequestId(String xMsClientRequestId) { + this.xMsClientRequestId = xMsClientRequestId; + return this; + } + + /** + * Get the date property: The Date property. + * + * @return the date value. + */ + 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 BlobsChangeLeaseHeaders object itself. + */ + public BlobsChangeLeaseHeaders 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-v2/src/main/java/com/azure/storage/blob/models/BlobsCopyFromURLHeaders.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlobsCopyFromURLHeaders.java new file mode 100644 index 000000000000..0c376e17bf6c --- /dev/null +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlobsCopyFromURLHeaders.java @@ -0,0 +1,379 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.storage.blob.models; + +import com.azure.core.v2.annotation.Fluent; +import com.azure.core.v2.util.CoreUtils; +import io.clientcore.core.http.models.DateTimeRfc1123; +import io.clientcore.core.http.models.HttpHeaderName; +import io.clientcore.core.http.models.HttpHeaders; + +import java.time.OffsetDateTime; +import java.util.Base64; + +/** + * The BlobsCopyFromURLHeaders model. + */ +@Fluent +public final class BlobsCopyFromURLHeaders { + /* + * The x-ms-version property. + */ + private String xMsVersion; + + /* + * The x-ms-copy-id property. + */ + private String xMsCopyId; + + /* + * The ETag property. + */ + private String eTag; + + /* + * The x-ms-content-crc64 property. + */ + private byte[] xMsContentCrc64; + + /* + * The Last-Modified property. + */ + private DateTimeRfc1123 lastModified; + + /* + * The x-ms-version-id property. + */ + private String xMsVersionId; + + /* + * The x-ms-copy-status property. + */ + private String xMsCopyStatus = "success"; + + /* + * The x-ms-request-id property. + */ + private String xMsRequestId; + + /* + * The x-ms-client-request-id property. + */ + private String xMsClientRequestId; + + /* + * The Date property. + */ + private DateTimeRfc1123 date; + + /* + * The Content-MD5 property. + */ + private byte[] contentMD5; + + /* + * The x-ms-encryption-scope property. + */ + private String xMsEncryptionScope; + + private static final HttpHeaderName X_MS_VERSION = HttpHeaderName.fromString("x-ms-version"); + + private static final HttpHeaderName X_MS_COPY_ID = HttpHeaderName.fromString("x-ms-copy-id"); + + 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_COPY_STATUS = HttpHeaderName.fromString("x-ms-copy-status"); + + 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.xMsVersion = rawHeaders.getValue(X_MS_VERSION); + this.xMsCopyId = rawHeaders.getValue(X_MS_COPY_ID); + this.eTag = rawHeaders.getValue(HttpHeaderName.ETAG); + String xMsContentCrc64 = rawHeaders.getValue(X_MS_CONTENT_CRC64); + if (xMsContentCrc64 != null) { + this.xMsContentCrc64 = Base64.getDecoder().decode(xMsContentCrc64); + } + String lastModified = rawHeaders.getValue(HttpHeaderName.LAST_MODIFIED); + if (lastModified != null) { + this.lastModified = new DateTimeRfc1123(lastModified); + } + this.xMsVersionId = rawHeaders.getValue(X_MS_VERSION_ID); + this.xMsCopyStatus = rawHeaders.getValue(X_MS_COPY_STATUS); + this.xMsRequestId = rawHeaders.getValue(HttpHeaderName.fromString("x-ms-request-id")); + this.xMsClientRequestId = rawHeaders.getValue(HttpHeaderName.fromString("x-ms-client-request-id")); + String date = rawHeaders.getValue(HttpHeaderName.DATE); + if (date != null) { + this.date = new DateTimeRfc1123(date); + } + String contentMD5 = rawHeaders.getValue(HttpHeaderName.CONTENT_MD5); + if (contentMD5 != null) { + this.contentMD5 = Base64.getDecoder().decode(contentMD5); + } + this.xMsEncryptionScope = rawHeaders.getValue(X_MS_ENCRYPTION_SCOPE); + } + + /** + * 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 BlobsCopyFromURLHeaders object itself. + */ + public BlobsCopyFromURLHeaders setXMsVersion(String xMsVersion) { + this.xMsVersion = xMsVersion; + return this; + } + + /** + * Get the xMsCopyId property: The x-ms-copy-id property. + * + * @return the xMsCopyId value. + */ + 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. + */ + public BlobsCopyFromURLHeaders setXMsCopyId(String xMsCopyId) { + this.xMsCopyId = xMsCopyId; + 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 BlobsCopyFromURLHeaders object itself. + */ + public BlobsCopyFromURLHeaders setETag(String eTag) { + this.eTag = eTag; + return this; + } + + /** + * Get the xMsContentCrc64 property: The x-ms-content-crc64 property. + * + * @return the xMsContentCrc64 value. + */ + 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. + */ + public BlobsCopyFromURLHeaders setXMsContentCrc64(byte[] xMsContentCrc64) { + this.xMsContentCrc64 = CoreUtils.clone(xMsContentCrc64); + 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 BlobsCopyFromURLHeaders object itself. + */ + public BlobsCopyFromURLHeaders setLastModified(OffsetDateTime lastModified) { + if (lastModified == null) { + this.lastModified = null; + } else { + this.lastModified = new DateTimeRfc1123(lastModified); + } + return this; + } + + /** + * Get the xMsVersionId property: The x-ms-version-id property. + * + * @return the xMsVersionId value. + */ + 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. + */ + public BlobsCopyFromURLHeaders setXMsVersionId(String xMsVersionId) { + this.xMsVersionId = xMsVersionId; + return this; + } + + /** + * Get the xMsCopyStatus property: The x-ms-copy-status property. + * + * @return the xMsCopyStatus value. + */ + 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. + */ + public BlobsCopyFromURLHeaders setXMsCopyStatus(String xMsCopyStatus) { + this.xMsCopyStatus = xMsCopyStatus; + 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 BlobsCopyFromURLHeaders object itself. + */ + public BlobsCopyFromURLHeaders 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 BlobsCopyFromURLHeaders object itself. + */ + public BlobsCopyFromURLHeaders setXMsClientRequestId(String xMsClientRequestId) { + this.xMsClientRequestId = xMsClientRequestId; + return this; + } + + /** + * Get the date property: The Date property. + * + * @return the date value. + */ + 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. + */ + public BlobsCopyFromURLHeaders setDate(OffsetDateTime date) { + if (date == null) { + this.date = null; + } else { + this.date = new DateTimeRfc1123(date); + } + return this; + } + + /** + * Get the contentMD5 property: The Content-MD5 property. + * + * @return the contentMD5 value. + */ + 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. + */ + public BlobsCopyFromURLHeaders setContentMD5(byte[] contentMD5) { + this.contentMD5 = CoreUtils.clone(contentMD5); + return this; + } + + /** + * Get the xMsEncryptionScope property: The x-ms-encryption-scope property. + * + * @return the xMsEncryptionScope value. + */ + 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. + */ + public BlobsCopyFromURLHeaders setXMsEncryptionScope(String xMsEncryptionScope) { + this.xMsEncryptionScope = xMsEncryptionScope; + return this; + } +} diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlobsCreateSnapshotHeaders.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlobsCreateSnapshotHeaders.java new file mode 100644 index 000000000000..48f893da99b0 --- /dev/null +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlobsCreateSnapshotHeaders.java @@ -0,0 +1,293 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.storage.blob.models; + +import com.azure.core.v2.annotation.Fluent; +import io.clientcore.core.http.models.DateTimeRfc1123; +import io.clientcore.core.http.models.HttpHeaderName; +import io.clientcore.core.http.models.HttpHeaders; + +import java.time.OffsetDateTime; + +/** + * The BlobsCreateSnapshotHeaders model. + */ +@Fluent +public final class BlobsCreateSnapshotHeaders { + /* + * The x-ms-snapshot property. + */ + private String xMsSnapshot; + + /* + * The x-ms-version property. + */ + private String xMsVersion; + + /* + * The ETag property. + */ + private String eTag; + + /* + * The Last-Modified property. + */ + private DateTimeRfc1123 lastModified; + + /* + * The x-ms-version-id property. + */ + private String xMsVersionId; + + /* + * The x-ms-request-id property. + */ + private String xMsRequestId; + + /* + * The x-ms-request-server-encrypted property. + */ + private Boolean xMsRequestServerEncrypted; + + /* + * The x-ms-client-request-id property. + */ + private String xMsClientRequestId; + + /* + * The Date property. + */ + private DateTimeRfc1123 date; + + 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"); + + // HttpHeaders containing the raw property values. + /** + * Creates an instance of BlobsCreateSnapshotHeaders class. + * + * @param rawHeaders The raw HttpHeaders that will be used to create the property values. + */ + public BlobsCreateSnapshotHeaders(HttpHeaders rawHeaders) { + this.xMsSnapshot = rawHeaders.getValue(X_MS_SNAPSHOT); + this.xMsVersion = rawHeaders.getValue(X_MS_VERSION); + this.eTag = rawHeaders.getValue(HttpHeaderName.ETAG); + String lastModified = rawHeaders.getValue(HttpHeaderName.LAST_MODIFIED); + if (lastModified != null) { + this.lastModified = new DateTimeRfc1123(lastModified); + } + this.xMsVersionId = rawHeaders.getValue(X_MS_VERSION_ID); + this.xMsRequestId = rawHeaders.getValue(HttpHeaderName.fromString("x-ms-request-id")); + String xMsRequestServerEncrypted = rawHeaders.getValue(X_MS_REQUEST_SERVER_ENCRYPTED); + if (xMsRequestServerEncrypted != null) { + this.xMsRequestServerEncrypted = Boolean.parseBoolean(xMsRequestServerEncrypted); + } + this.xMsClientRequestId = rawHeaders.getValue(HttpHeaderName.fromString("x-ms-client-request-id")); + String date = rawHeaders.getValue(HttpHeaderName.DATE); + if (date != null) { + this.date = new DateTimeRfc1123(date); + } + } + + /** + * Get the xMsSnapshot property: The x-ms-snapshot property. + * + * @return the xMsSnapshot value. + */ + 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. + */ + public BlobsCreateSnapshotHeaders setXMsSnapshot(String xMsSnapshot) { + this.xMsSnapshot = xMsSnapshot; + 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 BlobsCreateSnapshotHeaders object itself. + */ + public BlobsCreateSnapshotHeaders 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 BlobsCreateSnapshotHeaders object itself. + */ + public BlobsCreateSnapshotHeaders 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 BlobsCreateSnapshotHeaders object itself. + */ + public BlobsCreateSnapshotHeaders setLastModified(OffsetDateTime lastModified) { + if (lastModified == null) { + this.lastModified = null; + } else { + this.lastModified = new DateTimeRfc1123(lastModified); + } + return this; + } + + /** + * Get the xMsVersionId property: The x-ms-version-id property. + * + * @return the xMsVersionId value. + */ + 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. + */ + public BlobsCreateSnapshotHeaders setXMsVersionId(String xMsVersionId) { + this.xMsVersionId = xMsVersionId; + 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 BlobsCreateSnapshotHeaders object itself. + */ + public BlobsCreateSnapshotHeaders setXMsRequestId(String xMsRequestId) { + this.xMsRequestId = xMsRequestId; + return this; + } + + /** + * Get the xMsRequestServerEncrypted property: The x-ms-request-server-encrypted property. + * + * @return the xMsRequestServerEncrypted value. + */ + 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 BlobsCreateSnapshotHeaders object itself. + */ + public BlobsCreateSnapshotHeaders setXMsRequestServerEncrypted(Boolean xMsRequestServerEncrypted) { + this.xMsRequestServerEncrypted = xMsRequestServerEncrypted; + 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 BlobsCreateSnapshotHeaders object itself. + */ + public BlobsCreateSnapshotHeaders setXMsClientRequestId(String xMsClientRequestId) { + this.xMsClientRequestId = xMsClientRequestId; + return this; + } + + /** + * Get the date property: The Date property. + * + * @return the date value. + */ + 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 BlobsCreateSnapshotHeaders object itself. + */ + public BlobsCreateSnapshotHeaders 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-v2/src/main/java/com/azure/storage/blob/models/BlobsDeleteHeaders.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlobsDeleteHeaders.java new file mode 100644 index 000000000000..11fc601b775f --- /dev/null +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlobsDeleteHeaders.java @@ -0,0 +1,143 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.storage.blob.models; + +import com.azure.core.v2.annotation.Fluent; +import io.clientcore.core.http.models.DateTimeRfc1123; +import io.clientcore.core.http.models.HttpHeaderName; +import io.clientcore.core.http.models.HttpHeaders; + +import java.time.OffsetDateTime; + +/** + * The BlobsDeleteHeaders model. + */ +@Fluent +public final class BlobsDeleteHeaders { + /* + * The x-ms-version property. + */ + private String xMsVersion; + + /* + * The x-ms-request-id property. + */ + private String xMsRequestId; + + /* + * The x-ms-client-request-id property. + */ + private String xMsClientRequestId; + + /* + * The Date property. + */ + 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 BlobsDeleteHeaders class. + * + * @param rawHeaders The raw HttpHeaders that will be used to create the property values. + */ + public BlobsDeleteHeaders(HttpHeaders rawHeaders) { + this.xMsVersion = rawHeaders.getValue(X_MS_VERSION); + this.xMsRequestId = rawHeaders.getValue(HttpHeaderName.fromString("x-ms-request-id")); + this.xMsClientRequestId = rawHeaders.getValue(HttpHeaderName.fromString("x-ms-client-request-id")); + String date = rawHeaders.getValue(HttpHeaderName.DATE); + if (date != null) { + this.date = new DateTimeRfc1123(date); + } + } + + /** + * 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 BlobsDeleteHeaders object itself. + */ + public BlobsDeleteHeaders setXMsVersion(String xMsVersion) { + this.xMsVersion = xMsVersion; + 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 BlobsDeleteHeaders object itself. + */ + public BlobsDeleteHeaders 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 BlobsDeleteHeaders object itself. + */ + public BlobsDeleteHeaders setXMsClientRequestId(String xMsClientRequestId) { + this.xMsClientRequestId = xMsClientRequestId; + return this; + } + + /** + * Get the date property: The Date property. + * + * @return the date value. + */ + 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 BlobsDeleteHeaders object itself. + */ + public BlobsDeleteHeaders 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-v2/src/main/java/com/azure/storage/blob/models/BlobsDeleteImmutabilityPolicyHeaders.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlobsDeleteImmutabilityPolicyHeaders.java new file mode 100644 index 000000000000..ceea285f5e99 --- /dev/null +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlobsDeleteImmutabilityPolicyHeaders.java @@ -0,0 +1,143 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.storage.blob.models; + +import com.azure.core.v2.annotation.Fluent; +import io.clientcore.core.http.models.DateTimeRfc1123; +import io.clientcore.core.http.models.HttpHeaderName; +import io.clientcore.core.http.models.HttpHeaders; + +import java.time.OffsetDateTime; + +/** + * The BlobsDeleteImmutabilityPolicyHeaders model. + */ +@Fluent +public final class BlobsDeleteImmutabilityPolicyHeaders { + /* + * The x-ms-version property. + */ + private String xMsVersion; + + /* + * The x-ms-request-id property. + */ + private String xMsRequestId; + + /* + * The x-ms-client-request-id property. + */ + private String xMsClientRequestId; + + /* + * The Date property. + */ + 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 BlobsDeleteImmutabilityPolicyHeaders class. + * + * @param rawHeaders The raw HttpHeaders that will be used to create the property values. + */ + public BlobsDeleteImmutabilityPolicyHeaders(HttpHeaders rawHeaders) { + this.xMsVersion = rawHeaders.getValue(X_MS_VERSION); + this.xMsRequestId = rawHeaders.getValue(HttpHeaderName.fromString("x-ms-request-id")); + this.xMsClientRequestId = rawHeaders.getValue(HttpHeaderName.fromString("x-ms-client-request-id")); + String date = rawHeaders.getValue(HttpHeaderName.DATE); + if (date != null) { + this.date = new DateTimeRfc1123(date); + } + } + + /** + * 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 BlobsDeleteImmutabilityPolicyHeaders object itself. + */ + public BlobsDeleteImmutabilityPolicyHeaders setXMsVersion(String xMsVersion) { + this.xMsVersion = xMsVersion; + 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 BlobsDeleteImmutabilityPolicyHeaders object itself. + */ + public BlobsDeleteImmutabilityPolicyHeaders 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 BlobsDeleteImmutabilityPolicyHeaders object itself. + */ + public BlobsDeleteImmutabilityPolicyHeaders setXMsClientRequestId(String xMsClientRequestId) { + this.xMsClientRequestId = xMsClientRequestId; + return this; + } + + /** + * Get the date property: The Date property. + * + * @return the date value. + */ + 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 BlobsDeleteImmutabilityPolicyHeaders object itself. + */ + public BlobsDeleteImmutabilityPolicyHeaders 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-v2/src/main/java/com/azure/storage/blob/models/BlobsDownloadHeaders.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlobsDownloadHeaders.java new file mode 100644 index 000000000000..876d72763d69 --- /dev/null +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlobsDownloadHeaders.java @@ -0,0 +1,1421 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.storage.blob.models; + +import com.azure.core.v2.annotation.Fluent; +import io.clientcore.core.http.models.HttpHeader; +import com.azure.core.v2.util.CoreUtils; +import io.clientcore.core.http.models.DateTimeRfc1123; +import io.clientcore.core.http.models.HttpHeaderName; +import io.clientcore.core.http.models.HttpHeaders; + +import java.time.OffsetDateTime; +import java.util.Base64; +import java.util.HashMap; +import java.util.Map; + +/** + * The BlobsDownloadHeaders model. + */ +@Fluent +public final class BlobsDownloadHeaders { + /* + * The x-ms-is-current-version property. + */ + private Boolean xMsIsCurrentVersion; + + /* + * The x-ms-lease-status property. + */ + private LeaseStatusType xMsLeaseStatus; + + /* + * The x-ms-tag-count property. + */ + private Long xMsTagCount; + + /* + * The Content-Range property. + */ + private String contentRange; + + /* + * The x-ms-lease-state property. + */ + private LeaseStateType xMsLeaseState; + + /* + * The x-ms-blob-sealed property. + */ + private Boolean xMsBlobSealed; + + /* + * The Last-Modified property. + */ + private DateTimeRfc1123 lastModified; + + /* + * The x-ms-version-id property. + */ + private String xMsVersionId; + + /* + * The x-ms-encryption-key-sha256 property. + */ + private String xMsEncryptionKeySha256; + + /* + * The x-ms-structured-body property. + */ + private String xMsStructuredBody; + + /* + * The x-ms-blob-type property. + */ + private BlobType xMsBlobType; + + /* + * The x-ms-immutability-policy-mode property. + */ + private String xMsImmutabilityPolicyMode; + + /* + * The x-ms-structured-content-length property. + */ + private Long xMsStructuredContentLength; + + /* + * The Content-Encoding property. + */ + private String contentEncoding; + + /* + * The x-ms-copy-status-description property. + */ + private String xMsCopyStatusDescription; + + /* + * The x-ms-creation-time property. + */ + private DateTimeRfc1123 xMsCreationTime; + + /* + * The x-ms-lease-duration property. + */ + private LeaseDurationType xMsLeaseDuration; + + /* + * The Content-Length property. + */ + private Long contentLength; + + /* + * The x-ms-request-id property. + */ + private String xMsRequestId; + + /* + * The Content-Type property. + */ + private String contentType; + + /* + * The x-ms-last-access-time property. + */ + private DateTimeRfc1123 xMsLastAccessTime; + + /* + * The x-ms-version property. + */ + private String xMsVersion; + + /* + * The x-ms-copy-id property. + */ + private String xMsCopyId; + + /* + * The x-ms-copy-source property. + */ + private String xMsCopySource; + + /* + * The x-ms-immutability-policy-until-date property. + */ + private DateTimeRfc1123 xMsImmutabilityPolicyUntilDate; + + /* + * The x-ms-content-crc64 property. + */ + private byte[] xMsContentCrc64; + + /* + * The x-ms-blob-sequence-number property. + */ + private Long xMsBlobSequenceNumber; + + /* + * The x-ms-copy-progress property. + */ + private String xMsCopyProgress; + + /* + * The x-ms-blob-committed-block-count property. + */ + private Integer xMsBlobCommittedBlockCount; + + /* + * The x-ms-blob-content-md5 property. + */ + private byte[] xMsBlobContentMd5; + + /* + * The x-ms-meta- property. + */ + private Map xMsMeta; + + /* + * The x-ms-legal-hold property. + */ + private Boolean xMsLegalHold; + + /* + * The Date property. + */ + private DateTimeRfc1123 date; + + /* + * The Content-MD5 property. + */ + private byte[] contentMD5; + + /* + * The x-ms-copy-completion-time property. + */ + private DateTimeRfc1123 xMsCopyCompletionTime; + + /* + * The Accept-Ranges property. + */ + private String acceptRanges; + + /* + * The x-ms-server-encrypted property. + */ + private Boolean xMsServerEncrypted; + + /* + * The x-ms-or-policy-id property. + */ + private String xMsOrPolicyId; + + /* + * The Cache-Control property. + */ + private String cacheControl; + + /* + * The ETag property. + */ + private String eTag; + + /* + * The Content-Disposition property. + */ + private String contentDisposition; + + /* + * The x-ms-copy-status property. + */ + private CopyStatusType xMsCopyStatus; + + /* + * The Content-Language property. + */ + private String contentLanguage; + + /* + * The x-ms-client-request-id property. + */ + private String xMsClientRequestId; + + /* + * The x-ms-or- property. + */ + private Map xMsOr; + + /* + * The x-ms-encryption-scope property. + */ + private String xMsEncryptionScope; + + private static final HttpHeaderName X_MS_IS_CURRENT_VERSION = HttpHeaderName.fromString("x-ms-is-current-version"); + + private static final HttpHeaderName X_MS_LEASE_STATUS = HttpHeaderName.fromString("x-ms-lease-status"); + + private static final HttpHeaderName X_MS_TAG_COUNT = HttpHeaderName.fromString("x-ms-tag-count"); + + private static final HttpHeaderName X_MS_LEASE_STATE = HttpHeaderName.fromString("x-ms-lease-state"); + + private static final HttpHeaderName X_MS_BLOB_SEALED = HttpHeaderName.fromString("x-ms-blob-sealed"); + + private static final HttpHeaderName X_MS_VERSION_ID = HttpHeaderName.fromString("x-ms-version-id"); + + private static final HttpHeaderName X_MS_ENCRYPTION_KEY_SHA256 + = HttpHeaderName.fromString("x-ms-encryption-key-sha256"); + + private static final HttpHeaderName X_MS_STRUCTURED_BODY = HttpHeaderName.fromString("x-ms-structured-body"); + + private static final HttpHeaderName X_MS_BLOB_TYPE = HttpHeaderName.fromString("x-ms-blob-type"); + + private static final HttpHeaderName X_MS_IMMUTABILITY_POLICY_MODE + = HttpHeaderName.fromString("x-ms-immutability-policy-mode"); + + private static final HttpHeaderName X_MS_STRUCTURED_CONTENT_LENGTH + = HttpHeaderName.fromString("x-ms-structured-content-length"); + + private static final HttpHeaderName X_MS_COPY_STATUS_DESCRIPTION + = HttpHeaderName.fromString("x-ms-copy-status-description"); + + private static final HttpHeaderName X_MS_CREATION_TIME = HttpHeaderName.fromString("x-ms-creation-time"); + + private static final HttpHeaderName X_MS_LEASE_DURATION = HttpHeaderName.fromString("x-ms-lease-duration"); + + private static final HttpHeaderName X_MS_LAST_ACCESS_TIME = HttpHeaderName.fromString("x-ms-last-access-time"); + + private static final HttpHeaderName X_MS_VERSION = HttpHeaderName.fromString("x-ms-version"); + + private static final HttpHeaderName X_MS_COPY_ID = HttpHeaderName.fromString("x-ms-copy-id"); + + private static final HttpHeaderName X_MS_COPY_SOURCE = HttpHeaderName.fromString("x-ms-copy-source"); + + private static final HttpHeaderName X_MS_IMMUTABILITY_POLICY_UNTIL_DATE + = HttpHeaderName.fromString("x-ms-immutability-policy-until-date"); + + private static final HttpHeaderName X_MS_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_COPY_PROGRESS = HttpHeaderName.fromString("x-ms-copy-progress"); + + private static final HttpHeaderName X_MS_BLOB_COMMITTED_BLOCK_COUNT + = HttpHeaderName.fromString("x-ms-blob-committed-block-count"); + + private static final HttpHeaderName X_MS_BLOB_CONTENT_MD5 = HttpHeaderName.fromString("x-ms-blob-content-md5"); + + private static final HttpHeaderName X_MS_LEGAL_HOLD = HttpHeaderName.fromString("x-ms-legal-hold"); + + private static final HttpHeaderName X_MS_COPY_COMPLETION_TIME + = HttpHeaderName.fromString("x-ms-copy-completion-time"); + + private static final HttpHeaderName X_MS_SERVER_ENCRYPTED = HttpHeaderName.fromString("x-ms-server-encrypted"); + + private static final HttpHeaderName X_MS_OR_POLICY_ID = HttpHeaderName.fromString("x-ms-or-policy-id"); + + private static final HttpHeaderName X_MS_COPY_STATUS = HttpHeaderName.fromString("x-ms-copy-status"); + + private static final HttpHeaderName X_MS_ENCRYPTION_SCOPE = HttpHeaderName.fromString("x-ms-encryption-scope"); + + // 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) { + String xMsIsCurrentVersion = rawHeaders.getValue(X_MS_IS_CURRENT_VERSION); + if (xMsIsCurrentVersion != null) { + this.xMsIsCurrentVersion = Boolean.parseBoolean(xMsIsCurrentVersion); + } + String xMsLeaseStatus = rawHeaders.getValue(X_MS_LEASE_STATUS); + if (xMsLeaseStatus != null) { + this.xMsLeaseStatus = LeaseStatusType.fromString(xMsLeaseStatus); + } + String xMsTagCount = rawHeaders.getValue(X_MS_TAG_COUNT); + if (xMsTagCount != null) { + this.xMsTagCount = Long.parseLong(xMsTagCount); + } + this.contentRange = rawHeaders.getValue(HttpHeaderName.CONTENT_RANGE); + String xMsLeaseState = rawHeaders.getValue(X_MS_LEASE_STATE); + if (xMsLeaseState != null) { + this.xMsLeaseState = LeaseStateType.fromString(xMsLeaseState); + } + String xMsBlobSealed = rawHeaders.getValue(X_MS_BLOB_SEALED); + if (xMsBlobSealed != null) { + this.xMsBlobSealed = Boolean.parseBoolean(xMsBlobSealed); + } + String lastModified = rawHeaders.getValue(HttpHeaderName.LAST_MODIFIED); + if (lastModified != null) { + this.lastModified = new DateTimeRfc1123(lastModified); + } + this.xMsVersionId = rawHeaders.getValue(X_MS_VERSION_ID); + this.xMsEncryptionKeySha256 = rawHeaders.getValue(X_MS_ENCRYPTION_KEY_SHA256); + this.xMsStructuredBody = rawHeaders.getValue(X_MS_STRUCTURED_BODY); + String xMsBlobType = rawHeaders.getValue(X_MS_BLOB_TYPE); + if (xMsBlobType != null) { + this.xMsBlobType = BlobType.fromString(xMsBlobType); + } + this.xMsImmutabilityPolicyMode = rawHeaders.getValue(X_MS_IMMUTABILITY_POLICY_MODE); + String xMsStructuredContentLength = rawHeaders.getValue(X_MS_STRUCTURED_CONTENT_LENGTH); + if (xMsStructuredContentLength != null) { + this.xMsStructuredContentLength = Long.parseLong(xMsStructuredContentLength); + } + this.contentEncoding = rawHeaders.getValue(HttpHeaderName.CONTENT_ENCODING); + this.xMsCopyStatusDescription = rawHeaders.getValue(X_MS_COPY_STATUS_DESCRIPTION); + String xMsCreationTime = rawHeaders.getValue(X_MS_CREATION_TIME); + if (xMsCreationTime != null) { + this.xMsCreationTime = new DateTimeRfc1123(xMsCreationTime); + } + String xMsLeaseDuration = rawHeaders.getValue(X_MS_LEASE_DURATION); + if (xMsLeaseDuration != null) { + this.xMsLeaseDuration = LeaseDurationType.fromString(xMsLeaseDuration); + } + String contentLength = rawHeaders.getValue(HttpHeaderName.CONTENT_LENGTH); + if (contentLength != null) { + this.contentLength = Long.parseLong(contentLength); + } + this.xMsRequestId = rawHeaders.getValue(HttpHeaderName.fromString("x-ms-request-id")); + this.contentType = rawHeaders.getValue(HttpHeaderName.CONTENT_TYPE); + String xMsLastAccessTime = rawHeaders.getValue(X_MS_LAST_ACCESS_TIME); + if (xMsLastAccessTime != null) { + this.xMsLastAccessTime = new DateTimeRfc1123(xMsLastAccessTime); + } + this.xMsVersion = rawHeaders.getValue(X_MS_VERSION); + this.xMsCopyId = rawHeaders.getValue(X_MS_COPY_ID); + this.xMsCopySource = rawHeaders.getValue(X_MS_COPY_SOURCE); + String xMsImmutabilityPolicyUntilDate = rawHeaders.getValue(X_MS_IMMUTABILITY_POLICY_UNTIL_DATE); + if (xMsImmutabilityPolicyUntilDate != null) { + this.xMsImmutabilityPolicyUntilDate = new DateTimeRfc1123(xMsImmutabilityPolicyUntilDate); + } + String xMsContentCrc64 = rawHeaders.getValue(X_MS_CONTENT_CRC64); + if (xMsContentCrc64 != null) { + this.xMsContentCrc64 = Base64.getDecoder().decode(xMsContentCrc64); + } + String xMsBlobSequenceNumber = rawHeaders.getValue(X_MS_BLOB_SEQUENCE_NUMBER); + if (xMsBlobSequenceNumber != null) { + this.xMsBlobSequenceNumber = Long.parseLong(xMsBlobSequenceNumber); + } + this.xMsCopyProgress = rawHeaders.getValue(X_MS_COPY_PROGRESS); + String xMsBlobCommittedBlockCount = rawHeaders.getValue(X_MS_BLOB_COMMITTED_BLOCK_COUNT); + if (xMsBlobCommittedBlockCount != null) { + this.xMsBlobCommittedBlockCount = Integer.parseInt(xMsBlobCommittedBlockCount); + } + String xMsBlobContentMd5 = rawHeaders.getValue(X_MS_BLOB_CONTENT_MD5); + if (xMsBlobContentMd5 != null) { + this.xMsBlobContentMd5 = Base64.getDecoder().decode(xMsBlobContentMd5); + } + 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); + } + String contentMD5 = rawHeaders.getValue(HttpHeaderName.CONTENT_MD5); + if (contentMD5 != null) { + this.contentMD5 = Base64.getDecoder().decode(contentMD5); + } + String xMsCopyCompletionTime = rawHeaders.getValue(X_MS_COPY_COMPLETION_TIME); + if (xMsCopyCompletionTime != null) { + this.xMsCopyCompletionTime = new DateTimeRfc1123(xMsCopyCompletionTime); + } + this.acceptRanges = rawHeaders.getValue(HttpHeaderName.ACCEPT_RANGES); + String xMsServerEncrypted = rawHeaders.getValue(X_MS_SERVER_ENCRYPTED); + if (xMsServerEncrypted != null) { + this.xMsServerEncrypted = Boolean.parseBoolean(xMsServerEncrypted); + } + this.xMsOrPolicyId = rawHeaders.getValue(X_MS_OR_POLICY_ID); + this.cacheControl = rawHeaders.getValue(HttpHeaderName.CACHE_CONTROL); + this.eTag = rawHeaders.getValue(HttpHeaderName.ETAG); + this.contentDisposition = rawHeaders.getValue(HttpHeaderName.CONTENT_DISPOSITION); + String xMsCopyStatus = rawHeaders.getValue(X_MS_COPY_STATUS); + if (xMsCopyStatus != null) { + this.xMsCopyStatus = CopyStatusType.fromString(xMsCopyStatus); + } + this.contentLanguage = rawHeaders.getValue(HttpHeaderName.CONTENT_LANGUAGE); + this.xMsClientRequestId = rawHeaders.getValue(HttpHeaderName.fromString("x-ms-client-request-id")); + this.xMsEncryptionScope = rawHeaders.getValue(X_MS_ENCRYPTION_SCOPE); + Map xMsMetaHeaderCollection = new HashMap<>(); + Map xMsOrHeaderCollection = new HashMap<>(); + + for (HttpHeader header : rawHeaders) { + String headerName = header.getValue(); + if (headerName.startsWith("x-ms-meta-")) { + xMsMetaHeaderCollection.put(headerName.substring(10), header.getValue()); + continue; + } + if (headerName.startsWith("x-ms-or-")) { + xMsOrHeaderCollection.put(headerName.substring(8), header.getValue()); + } + } + + this.xMsMeta = xMsMetaHeaderCollection; + this.xMsOr = xMsOrHeaderCollection; + } + + /** + * Get the xMsIsCurrentVersion property: The x-ms-is-current-version property. + * + * @return the xMsIsCurrentVersion value. + */ + 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 BlobsDownloadHeaders object itself. + */ + public BlobsDownloadHeaders setXMsIsCurrentVersion(Boolean xMsIsCurrentVersion) { + this.xMsIsCurrentVersion = xMsIsCurrentVersion; + return this; + } + + /** + * Get the xMsLeaseStatus property: The x-ms-lease-status property. + * + * @return the xMsLeaseStatus value. + */ + 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 BlobsDownloadHeaders object itself. + */ + public BlobsDownloadHeaders setXMsLeaseStatus(LeaseStatusType xMsLeaseStatus) { + this.xMsLeaseStatus = xMsLeaseStatus; + return this; + } + + /** + * Get the xMsTagCount property: The x-ms-tag-count property. + * + * @return the xMsTagCount value. + */ + 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 BlobsDownloadHeaders object itself. + */ + public BlobsDownloadHeaders setXMsTagCount(Long xMsTagCount) { + this.xMsTagCount = xMsTagCount; + return this; + } + + /** + * Get the contentRange property: The Content-Range property. + * + * @return the contentRange value. + */ + public String getContentRange() { + return this.contentRange; + } + + /** + * Set the contentRange property: The Content-Range property. + * + * @param contentRange the contentRange value to set. + * @return the BlobsDownloadHeaders object itself. + */ + public BlobsDownloadHeaders setContentRange(String contentRange) { + this.contentRange = contentRange; + return this; + } + + /** + * Get the xMsLeaseState property: The x-ms-lease-state property. + * + * @return the xMsLeaseState value. + */ + 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 BlobsDownloadHeaders object itself. + */ + public BlobsDownloadHeaders setXMsLeaseState(LeaseStateType xMsLeaseState) { + this.xMsLeaseState = xMsLeaseState; + return this; + } + + /** + * Get the xMsBlobSealed property: The x-ms-blob-sealed property. + * + * @return the xMsBlobSealed value. + */ + 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 BlobsDownloadHeaders object itself. + */ + public BlobsDownloadHeaders setXMsBlobSealed(Boolean xMsBlobSealed) { + this.xMsBlobSealed = xMsBlobSealed; + 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 BlobsDownloadHeaders object itself. + */ + public BlobsDownloadHeaders setLastModified(OffsetDateTime lastModified) { + if (lastModified == null) { + this.lastModified = null; + } else { + this.lastModified = new DateTimeRfc1123(lastModified); + } + return this; + } + + /** + * Get the xMsVersionId property: The x-ms-version-id property. + * + * @return the xMsVersionId value. + */ + 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 BlobsDownloadHeaders object itself. + */ + public BlobsDownloadHeaders setXMsVersionId(String xMsVersionId) { + this.xMsVersionId = xMsVersionId; + return this; + } + + /** + * Get the xMsEncryptionKeySha256 property: The x-ms-encryption-key-sha256 property. + * + * @return the xMsEncryptionKeySha256 value. + */ + 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 BlobsDownloadHeaders object itself. + */ + public BlobsDownloadHeaders setXMsEncryptionKeySha256(String xMsEncryptionKeySha256) { + this.xMsEncryptionKeySha256 = xMsEncryptionKeySha256; + return this; + } + + /** + * Get the xMsStructuredBody property: The x-ms-structured-body property. + * + * @return the xMsStructuredBody value. + */ + public String getXMsStructuredBody() { + return this.xMsStructuredBody; + } + + /** + * Set the xMsStructuredBody property: The x-ms-structured-body property. + * + * @param xMsStructuredBody the xMsStructuredBody value to set. + * @return the BlobsDownloadHeaders object itself. + */ + public BlobsDownloadHeaders setXMsStructuredBody(String xMsStructuredBody) { + this.xMsStructuredBody = xMsStructuredBody; + return this; + } + + /** + * Get the xMsBlobType property: The x-ms-blob-type property. + * + * @return the xMsBlobType value. + */ + public BlobType getXMsBlobType() { + return this.xMsBlobType; + } + + /** + * Set the xMsBlobType property: The x-ms-blob-type property. + * + * @param xMsBlobType the xMsBlobType value to set. + * @return the BlobsDownloadHeaders object itself. + */ + public BlobsDownloadHeaders setXMsBlobType(BlobType xMsBlobType) { + this.xMsBlobType = xMsBlobType; + return this; + } + + /** + * Get the xMsImmutabilityPolicyMode property: The x-ms-immutability-policy-mode property. + * + * @return the xMsImmutabilityPolicyMode value. + */ + public String getXMsImmutabilityPolicyMode() { + return this.xMsImmutabilityPolicyMode; + } + + /** + * Set the xMsImmutabilityPolicyMode property: The x-ms-immutability-policy-mode property. + * + * @param xMsImmutabilityPolicyMode the xMsImmutabilityPolicyMode value to set. + * @return the BlobsDownloadHeaders object itself. + */ + public BlobsDownloadHeaders setXMsImmutabilityPolicyMode(String xMsImmutabilityPolicyMode) { + this.xMsImmutabilityPolicyMode = xMsImmutabilityPolicyMode; + return this; + } + + /** + * Get the xMsStructuredContentLength property: The x-ms-structured-content-length property. + * + * @return the xMsStructuredContentLength value. + */ + public Long getXMsStructuredContentLength() { + return this.xMsStructuredContentLength; + } + + /** + * Set the xMsStructuredContentLength property: The x-ms-structured-content-length property. + * + * @param xMsStructuredContentLength the xMsStructuredContentLength value to set. + * @return the BlobsDownloadHeaders object itself. + */ + public BlobsDownloadHeaders setXMsStructuredContentLength(Long xMsStructuredContentLength) { + this.xMsStructuredContentLength = xMsStructuredContentLength; + return this; + } + + /** + * Get the contentEncoding property: The Content-Encoding property. + * + * @return the contentEncoding value. + */ + public String getContentEncoding() { + return this.contentEncoding; + } + + /** + * Set the contentEncoding property: The Content-Encoding property. + * + * @param contentEncoding the contentEncoding value to set. + * @return the BlobsDownloadHeaders object itself. + */ + public BlobsDownloadHeaders setContentEncoding(String contentEncoding) { + this.contentEncoding = contentEncoding; + return this; + } + + /** + * Get the xMsCopyStatusDescription property: The x-ms-copy-status-description property. + * + * @return the xMsCopyStatusDescription value. + */ + 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. + */ + public BlobsDownloadHeaders setXMsCopyStatusDescription(String xMsCopyStatusDescription) { + this.xMsCopyStatusDescription = xMsCopyStatusDescription; + return this; + } + + /** + * Get the xMsCreationTime property: The x-ms-creation-time property. + * + * @return the xMsCreationTime value. + */ + 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 BlobsDownloadHeaders object itself. + */ + public BlobsDownloadHeaders setXMsCreationTime(OffsetDateTime xMsCreationTime) { + if (xMsCreationTime == null) { + this.xMsCreationTime = null; + } else { + this.xMsCreationTime = new DateTimeRfc1123(xMsCreationTime); + } + return this; + } + + /** + * Get the xMsLeaseDuration property: The x-ms-lease-duration property. + * + * @return the xMsLeaseDuration value. + */ + 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 BlobsDownloadHeaders object itself. + */ + public BlobsDownloadHeaders setXMsLeaseDuration(LeaseDurationType xMsLeaseDuration) { + this.xMsLeaseDuration = xMsLeaseDuration; + 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 BlobsDownloadHeaders object itself. + */ + public BlobsDownloadHeaders 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 BlobsDownloadHeaders object itself. + */ + public BlobsDownloadHeaders setXMsRequestId(String xMsRequestId) { + this.xMsRequestId = xMsRequestId; + return this; + } + + /** + * Get the contentType property: The Content-Type property. + * + * @return the contentType value. + */ + public String getContentType() { + return this.contentType; + } + + /** + * Set the contentType property: The Content-Type property. + * + * @param contentType the contentType value to set. + * @return the BlobsDownloadHeaders object itself. + */ + public BlobsDownloadHeaders setContentType(String contentType) { + this.contentType = contentType; + return this; + } + + /** + * Get the xMsLastAccessTime property: The x-ms-last-access-time property. + * + * @return the xMsLastAccessTime value. + */ + public OffsetDateTime getXMsLastAccessTime() { + if (this.xMsLastAccessTime == null) { + return null; + } + return this.xMsLastAccessTime.getDateTime(); + } + + /** + * Set the xMsLastAccessTime property: The x-ms-last-access-time property. + * + * @param xMsLastAccessTime the xMsLastAccessTime value to set. + * @return the BlobsDownloadHeaders object itself. + */ + public BlobsDownloadHeaders setXMsLastAccessTime(OffsetDateTime xMsLastAccessTime) { + if (xMsLastAccessTime == null) { + this.xMsLastAccessTime = null; + } else { + this.xMsLastAccessTime = new DateTimeRfc1123(xMsLastAccessTime); + } + 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 BlobsDownloadHeaders object itself. + */ + public BlobsDownloadHeaders setXMsVersion(String xMsVersion) { + this.xMsVersion = xMsVersion; + return this; + } + + /** + * Get the xMsCopyId property: The x-ms-copy-id property. + * + * @return the xMsCopyId value. + */ + 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. + */ + public BlobsDownloadHeaders setXMsCopyId(String xMsCopyId) { + this.xMsCopyId = xMsCopyId; + return this; + } + + /** + * Get the xMsCopySource property: The x-ms-copy-source property. + * + * @return the xMsCopySource value. + */ + 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 BlobsDownloadHeaders object itself. + */ + public BlobsDownloadHeaders setXMsCopySource(String xMsCopySource) { + this.xMsCopySource = xMsCopySource; + return this; + } + + /** + * Get the xMsImmutabilityPolicyUntilDate property: The x-ms-immutability-policy-until-date property. + * + * @return the xMsImmutabilityPolicyUntilDate value. + */ + 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 BlobsDownloadHeaders object itself. + */ + public BlobsDownloadHeaders setXMsImmutabilityPolicyUntilDate(OffsetDateTime xMsImmutabilityPolicyUntilDate) { + if (xMsImmutabilityPolicyUntilDate == null) { + this.xMsImmutabilityPolicyUntilDate = null; + } else { + this.xMsImmutabilityPolicyUntilDate = new DateTimeRfc1123(xMsImmutabilityPolicyUntilDate); + } + return this; + } + + /** + * Get the xMsContentCrc64 property: The x-ms-content-crc64 property. + * + * @return the xMsContentCrc64 value. + */ + 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 BlobsDownloadHeaders object itself. + */ + public BlobsDownloadHeaders 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. + */ + 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 BlobsDownloadHeaders object itself. + */ + public BlobsDownloadHeaders setXMsBlobSequenceNumber(Long xMsBlobSequenceNumber) { + this.xMsBlobSequenceNumber = xMsBlobSequenceNumber; + return this; + } + + /** + * Get the xMsCopyProgress property: The x-ms-copy-progress property. + * + * @return the xMsCopyProgress value. + */ + 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 BlobsDownloadHeaders object itself. + */ + public BlobsDownloadHeaders setXMsCopyProgress(String xMsCopyProgress) { + this.xMsCopyProgress = xMsCopyProgress; + return this; + } + + /** + * Get the xMsBlobCommittedBlockCount property: The x-ms-blob-committed-block-count property. + * + * @return the xMsBlobCommittedBlockCount value. + */ + 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 BlobsDownloadHeaders object itself. + */ + public BlobsDownloadHeaders setXMsBlobCommittedBlockCount(Integer xMsBlobCommittedBlockCount) { + this.xMsBlobCommittedBlockCount = xMsBlobCommittedBlockCount; + return this; + } + + /** + * Get the xMsBlobContentMd5 property: The x-ms-blob-content-md5 property. + * + * @return the xMsBlobContentMd5 value. + */ + public byte[] getXMsBlobContentMd5() { + return CoreUtils.clone(this.xMsBlobContentMd5); + } + + /** + * Set the xMsBlobContentMd5 property: The x-ms-blob-content-md5 property. + * + * @param xMsBlobContentMd5 the xMsBlobContentMd5 value to set. + * @return the BlobsDownloadHeaders object itself. + */ + public BlobsDownloadHeaders setXMsBlobContentMd5(byte[] xMsBlobContentMd5) { + this.xMsBlobContentMd5 = CoreUtils.clone(xMsBlobContentMd5); + return this; + } + + /** + * Get the xMsMeta property: The x-ms-meta- property. + * + * @return the xMsMeta value. + */ + public Map getXMsMeta() { + return this.xMsMeta; + } + + /** + * Set the xMsMeta property: The x-ms-meta- property. + * + * @param xMsMeta the xMsMeta value to set. + * @return the BlobsDownloadHeaders object itself. + */ + public BlobsDownloadHeaders setXMsMeta(Map xMsMeta) { + this.xMsMeta = xMsMeta; + return this; + } + + /** + * Get the xMsLegalHold property: The x-ms-legal-hold property. + * + * @return the xMsLegalHold value. + */ + public Boolean isXMsLegalHold() { + return this.xMsLegalHold; + } + + /** + * Set the xMsLegalHold property: The x-ms-legal-hold property. + * + * @param xMsLegalHold the xMsLegalHold value to set. + * @return the BlobsDownloadHeaders object itself. + */ + public BlobsDownloadHeaders setXMsLegalHold(Boolean xMsLegalHold) { + this.xMsLegalHold = xMsLegalHold; + return this; + } + + /** + * Get the date property: The Date property. + * + * @return the date value. + */ + 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 BlobsDownloadHeaders object itself. + */ + public BlobsDownloadHeaders setDate(OffsetDateTime date) { + if (date == null) { + this.date = null; + } else { + this.date = new DateTimeRfc1123(date); + } + return this; + } + + /** + * Get the contentMD5 property: The Content-MD5 property. + * + * @return the contentMD5 value. + */ + 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 BlobsDownloadHeaders object itself. + */ + public BlobsDownloadHeaders setContentMD5(byte[] contentMD5) { + this.contentMD5 = CoreUtils.clone(contentMD5); + return this; + } + + /** + * Get the xMsCopyCompletionTime property: The x-ms-copy-completion-time property. + * + * @return the xMsCopyCompletionTime value. + */ + public OffsetDateTime getXMsCopyCompletionTime() { + if (this.xMsCopyCompletionTime == null) { + return null; + } + return this.xMsCopyCompletionTime.getDateTime(); + } + + /** + * Set the xMsCopyCompletionTime property: The x-ms-copy-completion-time property. + * + * @param xMsCopyCompletionTime the xMsCopyCompletionTime value to set. + * @return the BlobsDownloadHeaders object itself. + */ + public BlobsDownloadHeaders setXMsCopyCompletionTime(OffsetDateTime xMsCopyCompletionTime) { + if (xMsCopyCompletionTime == null) { + this.xMsCopyCompletionTime = null; + } else { + this.xMsCopyCompletionTime = new DateTimeRfc1123(xMsCopyCompletionTime); + } + return this; + } + + /** + * Get the acceptRanges property: The Accept-Ranges property. + * + * @return the acceptRanges value. + */ + public String getAcceptRanges() { + return this.acceptRanges; + } + + /** + * Set the acceptRanges property: The Accept-Ranges property. + * + * @param acceptRanges the acceptRanges value to set. + * @return the BlobsDownloadHeaders object itself. + */ + public BlobsDownloadHeaders setAcceptRanges(String acceptRanges) { + this.acceptRanges = acceptRanges; + return this; + } + + /** + * Get the xMsServerEncrypted property: The x-ms-server-encrypted property. + * + * @return the xMsServerEncrypted value. + */ + 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 BlobsDownloadHeaders object itself. + */ + public BlobsDownloadHeaders setXMsServerEncrypted(Boolean xMsServerEncrypted) { + this.xMsServerEncrypted = xMsServerEncrypted; + return this; + } + + /** + * Get the xMsOrPolicyId property: The x-ms-or-policy-id property. + * + * @return the xMsOrPolicyId value. + */ + 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 BlobsDownloadHeaders object itself. + */ + public BlobsDownloadHeaders setXMsOrPolicyId(String xMsOrPolicyId) { + this.xMsOrPolicyId = xMsOrPolicyId; + return this; + } + + /** + * Get the cacheControl property: The Cache-Control property. + * + * @return the cacheControl value. + */ + public String getCacheControl() { + return this.cacheControl; + } + + /** + * Set the cacheControl property: The Cache-Control property. + * + * @param cacheControl the cacheControl value to set. + * @return the BlobsDownloadHeaders object itself. + */ + public BlobsDownloadHeaders setCacheControl(String cacheControl) { + this.cacheControl = cacheControl; + 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 BlobsDownloadHeaders object itself. + */ + public BlobsDownloadHeaders setETag(String eTag) { + this.eTag = eTag; + return this; + } + + /** + * Get the contentDisposition property: The Content-Disposition property. + * + * @return the contentDisposition value. + */ + public String getContentDisposition() { + return this.contentDisposition; + } + + /** + * Set the contentDisposition property: The Content-Disposition property. + * + * @param contentDisposition the contentDisposition value to set. + * @return the BlobsDownloadHeaders object itself. + */ + public BlobsDownloadHeaders setContentDisposition(String contentDisposition) { + this.contentDisposition = contentDisposition; + return this; + } + + /** + * Get the xMsCopyStatus property: The x-ms-copy-status property. + * + * @return the xMsCopyStatus value. + */ + 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 BlobsDownloadHeaders object itself. + */ + public BlobsDownloadHeaders setXMsCopyStatus(CopyStatusType xMsCopyStatus) { + this.xMsCopyStatus = xMsCopyStatus; + return this; + } + + /** + * Get the contentLanguage property: The Content-Language property. + * + * @return the contentLanguage value. + */ + public String getContentLanguage() { + return this.contentLanguage; + } + + /** + * Set the contentLanguage property: The Content-Language property. + * + * @param contentLanguage the contentLanguage value to set. + * @return the BlobsDownloadHeaders object itself. + */ + public BlobsDownloadHeaders setContentLanguage(String contentLanguage) { + this.contentLanguage = contentLanguage; + 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 BlobsDownloadHeaders object itself. + */ + public BlobsDownloadHeaders setXMsClientRequestId(String xMsClientRequestId) { + this.xMsClientRequestId = xMsClientRequestId; + return this; + } + + /** + * Get the xMsOr property: The x-ms-or- property. + * + * @return the xMsOr value. + */ + public Map getXMsOr() { + return this.xMsOr; + } + + /** + * Set the xMsOr property: The x-ms-or- property. + * + * @param xMsOr the xMsOr value to set. + * @return the BlobsDownloadHeaders object itself. + */ + public BlobsDownloadHeaders setXMsOr(Map xMsOr) { + this.xMsOr = xMsOr; + return this; + } + + /** + * Get the xMsEncryptionScope property: The x-ms-encryption-scope property. + * + * @return the xMsEncryptionScope value. + */ + 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 BlobsDownloadHeaders object itself. + */ + public BlobsDownloadHeaders setXMsEncryptionScope(String xMsEncryptionScope) { + this.xMsEncryptionScope = xMsEncryptionScope; + return this; + } +} diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlobsGetAccountInfoHeaders.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlobsGetAccountInfoHeaders.java new file mode 100644 index 000000000000..8373bd23c664 --- /dev/null +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlobsGetAccountInfoHeaders.java @@ -0,0 +1,236 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.storage.blob.models; + +import com.azure.core.v2.annotation.Fluent; +import io.clientcore.core.http.models.DateTimeRfc1123; +import io.clientcore.core.http.models.HttpHeaderName; +import io.clientcore.core.http.models.HttpHeaders; + +import java.time.OffsetDateTime; + +/** + * The BlobsGetAccountInfoHeaders model. + */ +@Fluent +public final class BlobsGetAccountInfoHeaders { + /* + * The x-ms-version property. + */ + private String xMsVersion; + + /* + * The x-ms-account-kind property. + */ + private AccountKind xMsAccountKind; + + /* + * The x-ms-is-hns-enabled property. + */ + private Boolean xMsIsHnsEnabled; + + /* + * The x-ms-sku-name property. + */ + private SkuName xMsSkuName; + + /* + * The x-ms-request-id property. + */ + private String xMsRequestId; + + /* + * The x-ms-client-request-id property. + */ + private String xMsClientRequestId; + + /* + * The Date property. + */ + private DateTimeRfc1123 date; + + private static final HttpHeaderName X_MS_VERSION = HttpHeaderName.fromString("x-ms-version"); + + private static final HttpHeaderName X_MS_ACCOUNT_KIND = HttpHeaderName.fromString("x-ms-account-kind"); + + private static final HttpHeaderName X_MS_IS_HNS_ENABLED = HttpHeaderName.fromString("x-ms-is-hns-enabled"); + + private static final HttpHeaderName X_MS_SKU_NAME = HttpHeaderName.fromString("x-ms-sku-name"); + + // HttpHeaders containing the raw property values. + /** + * Creates an instance of BlobsGetAccountInfoHeaders class. + * + * @param rawHeaders The raw HttpHeaders that will be used to create the property values. + */ + public BlobsGetAccountInfoHeaders(HttpHeaders rawHeaders) { + this.xMsVersion = rawHeaders.getValue(X_MS_VERSION); + String xMsAccountKind = rawHeaders.getValue(X_MS_ACCOUNT_KIND); + if (xMsAccountKind != null) { + this.xMsAccountKind = AccountKind.fromString(xMsAccountKind); + } + String xMsIsHnsEnabled = rawHeaders.getValue(X_MS_IS_HNS_ENABLED); + if (xMsIsHnsEnabled != null) { + this.xMsIsHnsEnabled = Boolean.parseBoolean(xMsIsHnsEnabled); + } + String xMsSkuName = rawHeaders.getValue(X_MS_SKU_NAME); + if (xMsSkuName != null) { + this.xMsSkuName = SkuName.fromString(xMsSkuName); + } + this.xMsRequestId = rawHeaders.getValue(HttpHeaderName.fromString("x-ms-request-id")); + this.xMsClientRequestId = rawHeaders.getValue(HttpHeaderName.fromString("x-ms-client-request-id")); + String date = rawHeaders.getValue(HttpHeaderName.DATE); + if (date != null) { + this.date = new DateTimeRfc1123(date); + } + } + + /** + * 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 BlobsGetAccountInfoHeaders object itself. + */ + public BlobsGetAccountInfoHeaders setXMsVersion(String xMsVersion) { + this.xMsVersion = xMsVersion; + return this; + } + + /** + * Get the xMsAccountKind property: The x-ms-account-kind property. + * + * @return the xMsAccountKind value. + */ + public AccountKind getXMsAccountKind() { + return this.xMsAccountKind; + } + + /** + * Set the xMsAccountKind property: The x-ms-account-kind property. + * + * @param xMsAccountKind the xMsAccountKind value to set. + * @return the BlobsGetAccountInfoHeaders object itself. + */ + public BlobsGetAccountInfoHeaders setXMsAccountKind(AccountKind xMsAccountKind) { + this.xMsAccountKind = xMsAccountKind; + return this; + } + + /** + * Get the xMsIsHnsEnabled property: The x-ms-is-hns-enabled property. + * + * @return the xMsIsHnsEnabled value. + */ + public Boolean isXMsIsHnsEnabled() { + return this.xMsIsHnsEnabled; + } + + /** + * Set the xMsIsHnsEnabled property: The x-ms-is-hns-enabled property. + * + * @param xMsIsHnsEnabled the xMsIsHnsEnabled value to set. + * @return the BlobsGetAccountInfoHeaders object itself. + */ + public BlobsGetAccountInfoHeaders setXMsIsHnsEnabled(Boolean xMsIsHnsEnabled) { + this.xMsIsHnsEnabled = xMsIsHnsEnabled; + return this; + } + + /** + * Get the xMsSkuName property: The x-ms-sku-name property. + * + * @return the xMsSkuName value. + */ + public SkuName getXMsSkuName() { + 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. + */ + public BlobsGetAccountInfoHeaders setXMsSkuName(SkuName xMsSkuName) { + this.xMsSkuName = xMsSkuName; + 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 BlobsGetAccountInfoHeaders object itself. + */ + public BlobsGetAccountInfoHeaders 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 BlobsGetAccountInfoHeaders object itself. + */ + public BlobsGetAccountInfoHeaders setXMsClientRequestId(String xMsClientRequestId) { + this.xMsClientRequestId = xMsClientRequestId; + return this; + } + + /** + * Get the date property: The Date property. + * + * @return the date value. + */ + 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 BlobsGetAccountInfoHeaders object itself. + */ + public BlobsGetAccountInfoHeaders 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-v2/src/main/java/com/azure/storage/blob/models/BlobsGetPropertiesHeaders.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlobsGetPropertiesHeaders.java new file mode 100644 index 000000000000..14db68b3c116 --- /dev/null +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlobsGetPropertiesHeaders.java @@ -0,0 +1,1530 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.storage.blob.models; + +import com.azure.core.v2.annotation.Fluent; +import io.clientcore.core.http.models.HttpHeader; +import com.azure.core.v2.util.CoreUtils; +import io.clientcore.core.http.models.DateTimeRfc1123; +import io.clientcore.core.http.models.HttpHeaderName; +import io.clientcore.core.http.models.HttpHeaders; + +import java.time.OffsetDateTime; +import java.util.Base64; +import java.util.HashMap; +import java.util.Map; + +/** + * The BlobsGetPropertiesHeaders model. + */ +@Fluent +public final class BlobsGetPropertiesHeaders { + /* + * The x-ms-is-current-version property. + */ + private Boolean xMsIsCurrentVersion; + + /* + * The x-ms-lease-status property. + */ + private LeaseStatusType xMsLeaseStatus; + + /* + * The x-ms-copy-destination-snapshot property. + */ + private String xMsCopyDestinationSnapshot; + + /* + * The x-ms-lease-state property. + */ + private LeaseStateType xMsLeaseState; + + /* + * The x-ms-blob-sealed property. + */ + private Boolean xMsBlobSealed; + + /* + * The x-ms-version-id property. + */ + private String xMsVersionId; + + /* + * The x-ms-encryption-key-sha256 property. + */ + private String xMsEncryptionKeySha256; + + /* + * The x-ms-access-tier-change-time property. + */ + private DateTimeRfc1123 xMsAccessTierChangeTime; + + /* + * The x-ms-blob-type property. + */ + private BlobType xMsBlobType; + + /* + * The Content-Encoding property. + */ + private String contentEncoding; + + /* + * The x-ms-creation-time property. + */ + private DateTimeRfc1123 xMsCreationTime; + + /* + * The x-ms-incremental-copy property. + */ + private Boolean xMsIncrementalCopy; + + /* + * The x-ms-lease-duration property. + */ + private LeaseDurationType xMsLeaseDuration; + + /* + * The x-ms-version property. + */ + private String xMsVersion; + + /* + * The x-ms-copy-id property. + */ + private String xMsCopyId; + + /* + * The x-ms-immutability-policy-until-date property. + */ + private DateTimeRfc1123 xMsImmutabilityPolicyUntilDate; + + /* + * The x-ms-blob-sequence-number property. + */ + private Long xMsBlobSequenceNumber; + + /* + * The x-ms-blob-committed-block-count property. + */ + private Integer xMsBlobCommittedBlockCount; + + /* + * The x-ms-legal-hold property. + */ + private Boolean xMsLegalHold; + + /* + * The Content-MD5 property. + */ + private byte[] contentMD5; + + /* + * The x-ms-or-policy-id property. + */ + private String xMsOrPolicyId; + + /* + * The Cache-Control property. + */ + private String cacheControl; + + /* + * The ETag property. + */ + private String eTag; + + /* + * The Content-Disposition property. + */ + private String contentDisposition; + + /* + * The Content-Language property. + */ + private String contentLanguage; + + /* + * The x-ms-client-request-id property. + */ + private String xMsClientRequestId; + + /* + * The x-ms-or- property. + */ + private Map xMsOr; + + /* + * The x-ms-encryption-scope property. + */ + private String xMsEncryptionScope; + + /* + * The x-ms-tag-count property. + */ + private Long xMsTagCount; + + /* + * The Last-Modified property. + */ + private DateTimeRfc1123 lastModified; + + /* + * The x-ms-access-tier-inferred property. + */ + private Boolean xMsAccessTierInferred; + + /* + * The x-ms-immutability-policy-mode property. + */ + private BlobImmutabilityPolicyMode xMsImmutabilityPolicyMode; + + /* + * The x-ms-access-tier property. + */ + private String xMsAccessTier; + + /* + * The x-ms-copy-status-description property. + */ + private String xMsCopyStatusDescription; + + /* + * The Content-Length property. + */ + private Long contentLength; + + /* + * The x-ms-request-id property. + */ + private String xMsRequestId; + + /* + * The Content-Type property. + */ + private String contentType; + + /* + * The x-ms-last-access-time property. + */ + private DateTimeRfc1123 xMsLastAccessTime; + + /* + * The x-ms-copy-source property. + */ + private String xMsCopySource; + + /* + * The x-ms-copy-progress property. + */ + private String xMsCopyProgress; + + /* + * The x-ms-meta- property. + */ + private Map xMsMeta; + + /* + * The Date property. + */ + private DateTimeRfc1123 date; + + /* + * The x-ms-expiry-time property. + */ + private DateTimeRfc1123 xMsExpiryTime; + + /* + * The x-ms-copy-completion-time property. + */ + private DateTimeRfc1123 xMsCopyCompletionTime; + + /* + * The Accept-Ranges property. + */ + private String acceptRanges; + + /* + * The x-ms-server-encrypted property. + */ + private Boolean xMsServerEncrypted; + + /* + * The x-ms-rehydrate-priority property. + */ + private String xMsRehydratePriority; + + /* + * The x-ms-copy-status property. + */ + private CopyStatusType xMsCopyStatus; + + /* + * The x-ms-archive-status property. + */ + private String xMsArchiveStatus; + + private static final HttpHeaderName X_MS_IS_CURRENT_VERSION = HttpHeaderName.fromString("x-ms-is-current-version"); + + private static final HttpHeaderName X_MS_LEASE_STATUS = HttpHeaderName.fromString("x-ms-lease-status"); + + private static final HttpHeaderName X_MS_COPY_DESTINATION_SNAPSHOT + = HttpHeaderName.fromString("x-ms-copy-destination-snapshot"); + + private static final HttpHeaderName X_MS_LEASE_STATE = HttpHeaderName.fromString("x-ms-lease-state"); + + private static final HttpHeaderName X_MS_BLOB_SEALED = HttpHeaderName.fromString("x-ms-blob-sealed"); + + private static final HttpHeaderName X_MS_VERSION_ID = HttpHeaderName.fromString("x-ms-version-id"); + + private static final HttpHeaderName X_MS_ENCRYPTION_KEY_SHA256 + = HttpHeaderName.fromString("x-ms-encryption-key-sha256"); + + private static final HttpHeaderName X_MS_ACCESS_TIER_CHANGE_TIME + = HttpHeaderName.fromString("x-ms-access-tier-change-time"); + + private static final HttpHeaderName X_MS_BLOB_TYPE = HttpHeaderName.fromString("x-ms-blob-type"); + + private static final HttpHeaderName X_MS_CREATION_TIME = HttpHeaderName.fromString("x-ms-creation-time"); + + private static final HttpHeaderName X_MS_INCREMENTAL_COPY = HttpHeaderName.fromString("x-ms-incremental-copy"); + + private static final HttpHeaderName X_MS_LEASE_DURATION = HttpHeaderName.fromString("x-ms-lease-duration"); + + private static final HttpHeaderName X_MS_VERSION = HttpHeaderName.fromString("x-ms-version"); + + private static final HttpHeaderName X_MS_COPY_ID = HttpHeaderName.fromString("x-ms-copy-id"); + + private static final HttpHeaderName X_MS_IMMUTABILITY_POLICY_UNTIL_DATE + = HttpHeaderName.fromString("x-ms-immutability-policy-until-date"); + + private static final HttpHeaderName X_MS_BLOB_SEQUENCE_NUMBER + = HttpHeaderName.fromString("x-ms-blob-sequence-number"); + + private static final HttpHeaderName X_MS_BLOB_COMMITTED_BLOCK_COUNT + = HttpHeaderName.fromString("x-ms-blob-committed-block-count"); + + private static final HttpHeaderName X_MS_LEGAL_HOLD = HttpHeaderName.fromString("x-ms-legal-hold"); + + private static final HttpHeaderName X_MS_OR_POLICY_ID = HttpHeaderName.fromString("x-ms-or-policy-id"); + + private static final HttpHeaderName X_MS_ENCRYPTION_SCOPE = HttpHeaderName.fromString("x-ms-encryption-scope"); + + private static final HttpHeaderName X_MS_TAG_COUNT = HttpHeaderName.fromString("x-ms-tag-count"); + + private static final HttpHeaderName X_MS_ACCESS_TIER_INFERRED + = HttpHeaderName.fromString("x-ms-access-tier-inferred"); + + private static final HttpHeaderName X_MS_IMMUTABILITY_POLICY_MODE + = HttpHeaderName.fromString("x-ms-immutability-policy-mode"); + + private static final HttpHeaderName X_MS_ACCESS_TIER = HttpHeaderName.fromString("x-ms-access-tier"); + + private static final HttpHeaderName X_MS_COPY_STATUS_DESCRIPTION + = HttpHeaderName.fromString("x-ms-copy-status-description"); + + private static final HttpHeaderName X_MS_LAST_ACCESS_TIME = HttpHeaderName.fromString("x-ms-last-access-time"); + + private static final HttpHeaderName X_MS_COPY_SOURCE = HttpHeaderName.fromString("x-ms-copy-source"); + + private static final HttpHeaderName X_MS_COPY_PROGRESS = HttpHeaderName.fromString("x-ms-copy-progress"); + + private static final HttpHeaderName X_MS_EXPIRY_TIME = HttpHeaderName.fromString("x-ms-expiry-time"); + + private static final HttpHeaderName X_MS_COPY_COMPLETION_TIME + = HttpHeaderName.fromString("x-ms-copy-completion-time"); + + private static final HttpHeaderName X_MS_SERVER_ENCRYPTED = HttpHeaderName.fromString("x-ms-server-encrypted"); + + private static final HttpHeaderName X_MS_REHYDRATE_PRIORITY = HttpHeaderName.fromString("x-ms-rehydrate-priority"); + + private static final HttpHeaderName X_MS_COPY_STATUS = HttpHeaderName.fromString("x-ms-copy-status"); + + private static final HttpHeaderName X_MS_ARCHIVE_STATUS = HttpHeaderName.fromString("x-ms-archive-status"); + + // HttpHeaders containing the raw property values. + /** + * Creates an instance of BlobsGetPropertiesHeaders class. + * + * @param rawHeaders The raw HttpHeaders that will be used to create the property values. + */ + public BlobsGetPropertiesHeaders(HttpHeaders rawHeaders) { + String xMsIsCurrentVersion = rawHeaders.getValue(X_MS_IS_CURRENT_VERSION); + if (xMsIsCurrentVersion != null) { + this.xMsIsCurrentVersion = Boolean.parseBoolean(xMsIsCurrentVersion); + } + String xMsLeaseStatus = rawHeaders.getValue(X_MS_LEASE_STATUS); + if (xMsLeaseStatus != null) { + this.xMsLeaseStatus = LeaseStatusType.fromString(xMsLeaseStatus); + } + this.xMsCopyDestinationSnapshot = rawHeaders.getValue(X_MS_COPY_DESTINATION_SNAPSHOT); + String xMsLeaseState = rawHeaders.getValue(X_MS_LEASE_STATE); + if (xMsLeaseState != null) { + this.xMsLeaseState = LeaseStateType.fromString(xMsLeaseState); + } + String xMsBlobSealed = rawHeaders.getValue(X_MS_BLOB_SEALED); + if (xMsBlobSealed != null) { + this.xMsBlobSealed = Boolean.parseBoolean(xMsBlobSealed); + } + this.xMsVersionId = rawHeaders.getValue(X_MS_VERSION_ID); + this.xMsEncryptionKeySha256 = rawHeaders.getValue(X_MS_ENCRYPTION_KEY_SHA256); + String xMsAccessTierChangeTime = rawHeaders.getValue(X_MS_ACCESS_TIER_CHANGE_TIME); + if (xMsAccessTierChangeTime != null) { + this.xMsAccessTierChangeTime = new DateTimeRfc1123(xMsAccessTierChangeTime); + } + String xMsBlobType = rawHeaders.getValue(X_MS_BLOB_TYPE); + if (xMsBlobType != null) { + this.xMsBlobType = BlobType.fromString(xMsBlobType); + } + this.contentEncoding = rawHeaders.getValue(HttpHeaderName.CONTENT_ENCODING); + String xMsCreationTime = rawHeaders.getValue(X_MS_CREATION_TIME); + if (xMsCreationTime != null) { + this.xMsCreationTime = new DateTimeRfc1123(xMsCreationTime); + } + String xMsIncrementalCopy = rawHeaders.getValue(X_MS_INCREMENTAL_COPY); + if (xMsIncrementalCopy != null) { + this.xMsIncrementalCopy = Boolean.parseBoolean(xMsIncrementalCopy); + } + String xMsLeaseDuration = rawHeaders.getValue(X_MS_LEASE_DURATION); + if (xMsLeaseDuration != null) { + this.xMsLeaseDuration = LeaseDurationType.fromString(xMsLeaseDuration); + } + this.xMsVersion = rawHeaders.getValue(X_MS_VERSION); + this.xMsCopyId = rawHeaders.getValue(X_MS_COPY_ID); + String xMsImmutabilityPolicyUntilDate = rawHeaders.getValue(X_MS_IMMUTABILITY_POLICY_UNTIL_DATE); + if (xMsImmutabilityPolicyUntilDate != null) { + this.xMsImmutabilityPolicyUntilDate = new DateTimeRfc1123(xMsImmutabilityPolicyUntilDate); + } + String xMsBlobSequenceNumber = rawHeaders.getValue(X_MS_BLOB_SEQUENCE_NUMBER); + if (xMsBlobSequenceNumber != null) { + this.xMsBlobSequenceNumber = Long.parseLong(xMsBlobSequenceNumber); + } + String xMsBlobCommittedBlockCount = rawHeaders.getValue(X_MS_BLOB_COMMITTED_BLOCK_COUNT); + if (xMsBlobCommittedBlockCount != null) { + this.xMsBlobCommittedBlockCount = Integer.parseInt(xMsBlobCommittedBlockCount); + } + String xMsLegalHold = rawHeaders.getValue(X_MS_LEGAL_HOLD); + if (xMsLegalHold != null) { + this.xMsLegalHold = Boolean.parseBoolean(xMsLegalHold); + } + String contentMD5 = rawHeaders.getValue(HttpHeaderName.CONTENT_MD5); + if (contentMD5 != null) { + this.contentMD5 = Base64.getDecoder().decode(contentMD5); + } + this.xMsOrPolicyId = rawHeaders.getValue(X_MS_OR_POLICY_ID); + this.cacheControl = rawHeaders.getValue(HttpHeaderName.CACHE_CONTROL); + this.eTag = rawHeaders.getValue(HttpHeaderName.ETAG); + this.contentDisposition = rawHeaders.getValue(HttpHeaderName.CONTENT_DISPOSITION); + this.contentLanguage = rawHeaders.getValue(HttpHeaderName.CONTENT_LANGUAGE); + this.xMsClientRequestId = rawHeaders.getValue(HttpHeaderName.fromString("x-ms-client-request-id")); + this.xMsEncryptionScope = rawHeaders.getValue(X_MS_ENCRYPTION_SCOPE); + String xMsTagCount = rawHeaders.getValue(X_MS_TAG_COUNT); + if (xMsTagCount != null) { + this.xMsTagCount = Long.parseLong(xMsTagCount); + } + String lastModified = rawHeaders.getValue(HttpHeaderName.LAST_MODIFIED); + if (lastModified != null) { + this.lastModified = new DateTimeRfc1123(lastModified); + } + String xMsAccessTierInferred = rawHeaders.getValue(X_MS_ACCESS_TIER_INFERRED); + if (xMsAccessTierInferred != null) { + this.xMsAccessTierInferred = Boolean.parseBoolean(xMsAccessTierInferred); + } + String xMsImmutabilityPolicyMode = rawHeaders.getValue(X_MS_IMMUTABILITY_POLICY_MODE); + if (xMsImmutabilityPolicyMode != null) { + this.xMsImmutabilityPolicyMode = BlobImmutabilityPolicyMode.fromString(xMsImmutabilityPolicyMode); + } + this.xMsAccessTier = rawHeaders.getValue(X_MS_ACCESS_TIER); + this.xMsCopyStatusDescription = rawHeaders.getValue(X_MS_COPY_STATUS_DESCRIPTION); + String contentLength = rawHeaders.getValue(HttpHeaderName.CONTENT_LENGTH); + if (contentLength != null) { + this.contentLength = Long.parseLong(contentLength); + } + this.xMsRequestId = rawHeaders.getValue(HttpHeaderName.fromString("x-ms-request-id")); + this.contentType = rawHeaders.getValue(HttpHeaderName.CONTENT_TYPE); + String xMsLastAccessTime = rawHeaders.getValue(X_MS_LAST_ACCESS_TIME); + if (xMsLastAccessTime != null) { + this.xMsLastAccessTime = new DateTimeRfc1123(xMsLastAccessTime); + } + this.xMsCopySource = rawHeaders.getValue(X_MS_COPY_SOURCE); + this.xMsCopyProgress = rawHeaders.getValue(X_MS_COPY_PROGRESS); + String date = rawHeaders.getValue(HttpHeaderName.DATE); + if (date != null) { + this.date = new DateTimeRfc1123(date); + } + String xMsExpiryTime = rawHeaders.getValue(X_MS_EXPIRY_TIME); + if (xMsExpiryTime != null) { + this.xMsExpiryTime = new DateTimeRfc1123(xMsExpiryTime); + } + String xMsCopyCompletionTime = rawHeaders.getValue(X_MS_COPY_COMPLETION_TIME); + if (xMsCopyCompletionTime != null) { + this.xMsCopyCompletionTime = new DateTimeRfc1123(xMsCopyCompletionTime); + } + this.acceptRanges = rawHeaders.getValue(HttpHeaderName.ACCEPT_RANGES); + String xMsServerEncrypted = rawHeaders.getValue(X_MS_SERVER_ENCRYPTED); + if (xMsServerEncrypted != null) { + this.xMsServerEncrypted = Boolean.parseBoolean(xMsServerEncrypted); + } + this.xMsRehydratePriority = rawHeaders.getValue(X_MS_REHYDRATE_PRIORITY); + String xMsCopyStatus = rawHeaders.getValue(X_MS_COPY_STATUS); + if (xMsCopyStatus != null) { + this.xMsCopyStatus = CopyStatusType.fromString(xMsCopyStatus); + } + this.xMsArchiveStatus = rawHeaders.getValue(X_MS_ARCHIVE_STATUS); + Map xMsOrHeaderCollection = new HashMap<>(); + Map xMsMetaHeaderCollection = new HashMap<>(); + + for (HttpHeader header : rawHeaders) { + String headerName = header.getValue(); + if (headerName.startsWith("x-ms-or-")) { + xMsOrHeaderCollection.put(headerName.substring(8), header.getValue()); + continue; + } + if (headerName.startsWith("x-ms-meta-")) { + xMsMetaHeaderCollection.put(headerName.substring(10), header.getValue()); + } + } + + this.xMsOr = xMsOrHeaderCollection; + this.xMsMeta = xMsMetaHeaderCollection; + } + + /** + * Get the xMsIsCurrentVersion property: The x-ms-is-current-version property. + * + * @return the xMsIsCurrentVersion value. + */ + 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 BlobsGetPropertiesHeaders object itself. + */ + public BlobsGetPropertiesHeaders setXMsIsCurrentVersion(Boolean xMsIsCurrentVersion) { + this.xMsIsCurrentVersion = xMsIsCurrentVersion; + return this; + } + + /** + * Get the xMsLeaseStatus property: The x-ms-lease-status property. + * + * @return the xMsLeaseStatus value. + */ + 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 BlobsGetPropertiesHeaders object itself. + */ + public BlobsGetPropertiesHeaders setXMsLeaseStatus(LeaseStatusType xMsLeaseStatus) { + this.xMsLeaseStatus = xMsLeaseStatus; + return this; + } + + /** + * Get the xMsCopyDestinationSnapshot property: The x-ms-copy-destination-snapshot property. + * + * @return the xMsCopyDestinationSnapshot value. + */ + 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 BlobsGetPropertiesHeaders object itself. + */ + public BlobsGetPropertiesHeaders setXMsCopyDestinationSnapshot(String xMsCopyDestinationSnapshot) { + this.xMsCopyDestinationSnapshot = xMsCopyDestinationSnapshot; + return this; + } + + /** + * Get the xMsLeaseState property: The x-ms-lease-state property. + * + * @return the xMsLeaseState value. + */ + 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 BlobsGetPropertiesHeaders object itself. + */ + public BlobsGetPropertiesHeaders setXMsLeaseState(LeaseStateType xMsLeaseState) { + this.xMsLeaseState = xMsLeaseState; + return this; + } + + /** + * Get the xMsBlobSealed property: The x-ms-blob-sealed property. + * + * @return the xMsBlobSealed value. + */ + 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. + */ + public BlobsGetPropertiesHeaders setXMsBlobSealed(Boolean xMsBlobSealed) { + this.xMsBlobSealed = xMsBlobSealed; + return this; + } + + /** + * Get the xMsVersionId property: The x-ms-version-id property. + * + * @return the xMsVersionId value. + */ + 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. + */ + public BlobsGetPropertiesHeaders setXMsVersionId(String xMsVersionId) { + this.xMsVersionId = xMsVersionId; + return this; + } + + /** + * Get the xMsEncryptionKeySha256 property: The x-ms-encryption-key-sha256 property. + * + * @return the xMsEncryptionKeySha256 value. + */ + 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. + */ + public BlobsGetPropertiesHeaders setXMsEncryptionKeySha256(String xMsEncryptionKeySha256) { + this.xMsEncryptionKeySha256 = xMsEncryptionKeySha256; + return this; + } + + /** + * Get the xMsAccessTierChangeTime property: The x-ms-access-tier-change-time property. + * + * @return the xMsAccessTierChangeTime value. + */ + public OffsetDateTime getXMsAccessTierChangeTime() { + if (this.xMsAccessTierChangeTime == 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. + */ + public BlobsGetPropertiesHeaders setXMsAccessTierChangeTime(OffsetDateTime xMsAccessTierChangeTime) { + if (xMsAccessTierChangeTime == null) { + this.xMsAccessTierChangeTime = null; + } else { + this.xMsAccessTierChangeTime = new DateTimeRfc1123(xMsAccessTierChangeTime); + } + return this; + } + + /** + * Get the xMsBlobType property: The x-ms-blob-type property. + * + * @return the xMsBlobType value. + */ + public BlobType getXMsBlobType() { + return this.xMsBlobType; + } + + /** + * Set the xMsBlobType property: The x-ms-blob-type property. + * + * @param xMsBlobType the xMsBlobType value to set. + * @return the BlobsGetPropertiesHeaders object itself. + */ + public BlobsGetPropertiesHeaders setXMsBlobType(BlobType xMsBlobType) { + this.xMsBlobType = xMsBlobType; + return this; + } + + /** + * Get the contentEncoding property: The Content-Encoding property. + * + * @return the contentEncoding value. + */ + 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. + */ + public BlobsGetPropertiesHeaders setContentEncoding(String contentEncoding) { + this.contentEncoding = contentEncoding; + return this; + } + + /** + * Get the xMsCreationTime property: The x-ms-creation-time property. + * + * @return the xMsCreationTime value. + */ + 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. + */ + public BlobsGetPropertiesHeaders setXMsCreationTime(OffsetDateTime xMsCreationTime) { + if (xMsCreationTime == null) { + this.xMsCreationTime = null; + } else { + this.xMsCreationTime = new DateTimeRfc1123(xMsCreationTime); + } + return this; + } + + /** + * Get the xMsIncrementalCopy property: The x-ms-incremental-copy property. + * + * @return the xMsIncrementalCopy value. + */ + 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 BlobsGetPropertiesHeaders object itself. + */ + public BlobsGetPropertiesHeaders setXMsIncrementalCopy(Boolean xMsIncrementalCopy) { + this.xMsIncrementalCopy = xMsIncrementalCopy; + return this; + } + + /** + * Get the xMsLeaseDuration property: The x-ms-lease-duration property. + * + * @return the xMsLeaseDuration value. + */ + 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 BlobsGetPropertiesHeaders object itself. + */ + public BlobsGetPropertiesHeaders setXMsLeaseDuration(LeaseDurationType xMsLeaseDuration) { + this.xMsLeaseDuration = xMsLeaseDuration; + 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 BlobsGetPropertiesHeaders object itself. + */ + public BlobsGetPropertiesHeaders setXMsVersion(String xMsVersion) { + this.xMsVersion = xMsVersion; + return this; + } + + /** + * Get the xMsCopyId property: The x-ms-copy-id property. + * + * @return the xMsCopyId value. + */ + 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. + */ + public BlobsGetPropertiesHeaders setXMsCopyId(String xMsCopyId) { + this.xMsCopyId = xMsCopyId; + return this; + } + + /** + * Get the xMsImmutabilityPolicyUntilDate property: The x-ms-immutability-policy-until-date property. + * + * @return the xMsImmutabilityPolicyUntilDate value. + */ + 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 BlobsGetPropertiesHeaders object itself. + */ + public BlobsGetPropertiesHeaders setXMsImmutabilityPolicyUntilDate(OffsetDateTime xMsImmutabilityPolicyUntilDate) { + if (xMsImmutabilityPolicyUntilDate == null) { + this.xMsImmutabilityPolicyUntilDate = null; + } else { + this.xMsImmutabilityPolicyUntilDate = new DateTimeRfc1123(xMsImmutabilityPolicyUntilDate); + } + return this; + } + + /** + * Get the xMsBlobSequenceNumber property: The x-ms-blob-sequence-number property. + * + * @return the xMsBlobSequenceNumber value. + */ + 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. + */ + public BlobsGetPropertiesHeaders setXMsBlobSequenceNumber(Long xMsBlobSequenceNumber) { + this.xMsBlobSequenceNumber = xMsBlobSequenceNumber; + return this; + } + + /** + * Get the xMsBlobCommittedBlockCount property: The x-ms-blob-committed-block-count property. + * + * @return the xMsBlobCommittedBlockCount value. + */ + 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. + */ + public BlobsGetPropertiesHeaders setXMsBlobCommittedBlockCount(Integer xMsBlobCommittedBlockCount) { + this.xMsBlobCommittedBlockCount = xMsBlobCommittedBlockCount; + return this; + } + + /** + * Get the xMsLegalHold property: The x-ms-legal-hold property. + * + * @return the xMsLegalHold value. + */ + public Boolean isXMsLegalHold() { + return this.xMsLegalHold; + } + + /** + * Set the xMsLegalHold property: The x-ms-legal-hold property. + * + * @param xMsLegalHold the xMsLegalHold value to set. + * @return the BlobsGetPropertiesHeaders object itself. + */ + public BlobsGetPropertiesHeaders setXMsLegalHold(Boolean xMsLegalHold) { + this.xMsLegalHold = xMsLegalHold; + return this; + } + + /** + * Get the contentMD5 property: The Content-MD5 property. + * + * @return the contentMD5 value. + */ + 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 BlobsGetPropertiesHeaders object itself. + */ + public BlobsGetPropertiesHeaders setContentMD5(byte[] contentMD5) { + this.contentMD5 = CoreUtils.clone(contentMD5); + return this; + } + + /** + * Get the xMsOrPolicyId property: The x-ms-or-policy-id property. + * + * @return the xMsOrPolicyId value. + */ + 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. + */ + public BlobsGetPropertiesHeaders setXMsOrPolicyId(String xMsOrPolicyId) { + this.xMsOrPolicyId = xMsOrPolicyId; + return this; + } + + /** + * Get the cacheControl property: The Cache-Control property. + * + * @return the cacheControl value. + */ + public String getCacheControl() { + return this.cacheControl; + } + + /** + * Set the cacheControl property: The Cache-Control property. + * + * @param cacheControl the cacheControl value to set. + * @return the BlobsGetPropertiesHeaders object itself. + */ + public BlobsGetPropertiesHeaders setCacheControl(String cacheControl) { + this.cacheControl = cacheControl; + 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 BlobsGetPropertiesHeaders object itself. + */ + public BlobsGetPropertiesHeaders setETag(String eTag) { + this.eTag = eTag; + return this; + } + + /** + * Get the contentDisposition property: The Content-Disposition property. + * + * @return the contentDisposition value. + */ + 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. + */ + public BlobsGetPropertiesHeaders setContentDisposition(String contentDisposition) { + this.contentDisposition = contentDisposition; + return this; + } + + /** + * Get the contentLanguage property: The Content-Language property. + * + * @return the contentLanguage value. + */ + 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. + */ + public BlobsGetPropertiesHeaders setContentLanguage(String contentLanguage) { + this.contentLanguage = contentLanguage; + 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 BlobsGetPropertiesHeaders object itself. + */ + public BlobsGetPropertiesHeaders setXMsClientRequestId(String xMsClientRequestId) { + this.xMsClientRequestId = xMsClientRequestId; + return this; + } + + /** + * Get the xMsOr property: The x-ms-or- property. + * + * @return the xMsOr value. + */ + public Map getXMsOr() { + return this.xMsOr; + } + + /** + * Set the xMsOr property: The x-ms-or- property. + * + * @param xMsOr the xMsOr value to set. + * @return the BlobsGetPropertiesHeaders object itself. + */ + public BlobsGetPropertiesHeaders setXMsOr(Map xMsOr) { + this.xMsOr = xMsOr; + return this; + } + + /** + * Get the xMsEncryptionScope property: The x-ms-encryption-scope property. + * + * @return the xMsEncryptionScope value. + */ + 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 BlobsGetPropertiesHeaders object itself. + */ + public BlobsGetPropertiesHeaders setXMsEncryptionScope(String xMsEncryptionScope) { + this.xMsEncryptionScope = xMsEncryptionScope; + return this; + } + + /** + * Get the xMsTagCount property: The x-ms-tag-count property. + * + * @return the xMsTagCount value. + */ + 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 BlobsGetPropertiesHeaders object itself. + */ + public BlobsGetPropertiesHeaders setXMsTagCount(Long xMsTagCount) { + this.xMsTagCount = xMsTagCount; + 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 BlobsGetPropertiesHeaders object itself. + */ + public BlobsGetPropertiesHeaders setLastModified(OffsetDateTime lastModified) { + if (lastModified == null) { + this.lastModified = null; + } else { + this.lastModified = new DateTimeRfc1123(lastModified); + } + return this; + } + + /** + * Get the xMsAccessTierInferred property: The x-ms-access-tier-inferred property. + * + * @return the xMsAccessTierInferred value. + */ + 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 BlobsGetPropertiesHeaders object itself. + */ + public BlobsGetPropertiesHeaders setXMsAccessTierInferred(Boolean xMsAccessTierInferred) { + this.xMsAccessTierInferred = xMsAccessTierInferred; + return this; + } + + /** + * Get the xMsImmutabilityPolicyMode property: The x-ms-immutability-policy-mode property. + * + * @return the xMsImmutabilityPolicyMode value. + */ + public BlobImmutabilityPolicyMode getXMsImmutabilityPolicyMode() { + return this.xMsImmutabilityPolicyMode; + } + + /** + * Set the xMsImmutabilityPolicyMode property: The x-ms-immutability-policy-mode property. + * + * @param xMsImmutabilityPolicyMode the xMsImmutabilityPolicyMode value to set. + * @return the BlobsGetPropertiesHeaders object itself. + */ + public BlobsGetPropertiesHeaders + setXMsImmutabilityPolicyMode(BlobImmutabilityPolicyMode xMsImmutabilityPolicyMode) { + this.xMsImmutabilityPolicyMode = xMsImmutabilityPolicyMode; + return this; + } + + /** + * Get the xMsAccessTier property: The x-ms-access-tier property. + * + * @return the xMsAccessTier value. + */ + public String getXMsAccessTier() { + return this.xMsAccessTier; + } + + /** + * Set the xMsAccessTier property: The x-ms-access-tier property. + * + * @param xMsAccessTier the xMsAccessTier value to set. + * @return the BlobsGetPropertiesHeaders object itself. + */ + public BlobsGetPropertiesHeaders setXMsAccessTier(String xMsAccessTier) { + this.xMsAccessTier = xMsAccessTier; + return this; + } + + /** + * Get the xMsCopyStatusDescription property: The x-ms-copy-status-description property. + * + * @return the xMsCopyStatusDescription value. + */ + 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 BlobsGetPropertiesHeaders object itself. + */ + public BlobsGetPropertiesHeaders setXMsCopyStatusDescription(String xMsCopyStatusDescription) { + this.xMsCopyStatusDescription = xMsCopyStatusDescription; + 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 BlobsGetPropertiesHeaders object itself. + */ + public BlobsGetPropertiesHeaders 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 BlobsGetPropertiesHeaders object itself. + */ + public BlobsGetPropertiesHeaders setXMsRequestId(String xMsRequestId) { + this.xMsRequestId = xMsRequestId; + return this; + } + + /** + * Get the contentType property: The Content-Type property. + * + * @return the contentType value. + */ + 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. + */ + public BlobsGetPropertiesHeaders setContentType(String contentType) { + this.contentType = contentType; + return this; + } + + /** + * Get the xMsLastAccessTime property: The x-ms-last-access-time property. + * + * @return the xMsLastAccessTime value. + */ + public OffsetDateTime getXMsLastAccessTime() { + if (this.xMsLastAccessTime == null) { + return null; + } + return this.xMsLastAccessTime.getDateTime(); + } + + /** + * Set the xMsLastAccessTime property: The x-ms-last-access-time property. + * + * @param xMsLastAccessTime the xMsLastAccessTime value to set. + * @return the BlobsGetPropertiesHeaders object itself. + */ + public BlobsGetPropertiesHeaders setXMsLastAccessTime(OffsetDateTime xMsLastAccessTime) { + if (xMsLastAccessTime == null) { + this.xMsLastAccessTime = null; + } else { + this.xMsLastAccessTime = new DateTimeRfc1123(xMsLastAccessTime); + } + return this; + } + + /** + * Get the xMsCopySource property: The x-ms-copy-source property. + * + * @return the xMsCopySource value. + */ + 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. + */ + public BlobsGetPropertiesHeaders setXMsCopySource(String xMsCopySource) { + this.xMsCopySource = xMsCopySource; + return this; + } + + /** + * Get the xMsCopyProgress property: The x-ms-copy-progress property. + * + * @return the xMsCopyProgress value. + */ + 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. + */ + public BlobsGetPropertiesHeaders setXMsCopyProgress(String xMsCopyProgress) { + this.xMsCopyProgress = xMsCopyProgress; + return this; + } + + /** + * Get the xMsMeta property: The x-ms-meta- property. + * + * @return the xMsMeta value. + */ + 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. + */ + public BlobsGetPropertiesHeaders setXMsMeta(Map xMsMeta) { + this.xMsMeta = xMsMeta; + return this; + } + + /** + * Get the date property: The Date property. + * + * @return the date value. + */ + 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 BlobsGetPropertiesHeaders object itself. + */ + public BlobsGetPropertiesHeaders setDate(OffsetDateTime date) { + if (date == null) { + this.date = null; + } else { + this.date = new DateTimeRfc1123(date); + } + return this; + } + + /** + * Get the xMsExpiryTime property: The x-ms-expiry-time property. + * + * @return the xMsExpiryTime value. + */ + public OffsetDateTime getXMsExpiryTime() { + if (this.xMsExpiryTime == 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. + */ + public BlobsGetPropertiesHeaders setXMsExpiryTime(OffsetDateTime xMsExpiryTime) { + if (xMsExpiryTime == null) { + this.xMsExpiryTime = null; + } else { + this.xMsExpiryTime = new DateTimeRfc1123(xMsExpiryTime); + } + return this; + } + + /** + * Get the xMsCopyCompletionTime property: The x-ms-copy-completion-time property. + * + * @return the xMsCopyCompletionTime value. + */ + public OffsetDateTime getXMsCopyCompletionTime() { + if (this.xMsCopyCompletionTime == null) { + return null; + } + return this.xMsCopyCompletionTime.getDateTime(); + } + + /** + * Set the xMsCopyCompletionTime property: The x-ms-copy-completion-time property. + * + * @param xMsCopyCompletionTime the xMsCopyCompletionTime value to set. + * @return the BlobsGetPropertiesHeaders object itself. + */ + public BlobsGetPropertiesHeaders setXMsCopyCompletionTime(OffsetDateTime xMsCopyCompletionTime) { + if (xMsCopyCompletionTime == null) { + this.xMsCopyCompletionTime = null; + } else { + this.xMsCopyCompletionTime = new DateTimeRfc1123(xMsCopyCompletionTime); + } + return this; + } + + /** + * Get the acceptRanges property: The Accept-Ranges property. + * + * @return the acceptRanges value. + */ + public String getAcceptRanges() { + return this.acceptRanges; + } + + /** + * Set the acceptRanges property: The Accept-Ranges property. + * + * @param acceptRanges the acceptRanges value to set. + * @return the BlobsGetPropertiesHeaders object itself. + */ + public BlobsGetPropertiesHeaders setAcceptRanges(String acceptRanges) { + this.acceptRanges = acceptRanges; + return this; + } + + /** + * Get the xMsServerEncrypted property: The x-ms-server-encrypted property. + * + * @return the xMsServerEncrypted value. + */ + 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. + */ + public BlobsGetPropertiesHeaders setXMsServerEncrypted(Boolean xMsServerEncrypted) { + this.xMsServerEncrypted = xMsServerEncrypted; + return this; + } + + /** + * Get the xMsRehydratePriority property: The x-ms-rehydrate-priority property. + * + * @return the xMsRehydratePriority value. + */ + public String getXMsRehydratePriority() { + return this.xMsRehydratePriority; + } + + /** + * Set the xMsRehydratePriority property: The x-ms-rehydrate-priority property. + * + * @param xMsRehydratePriority the xMsRehydratePriority value to set. + * @return the BlobsGetPropertiesHeaders object itself. + */ + public BlobsGetPropertiesHeaders setXMsRehydratePriority(String xMsRehydratePriority) { + this.xMsRehydratePriority = xMsRehydratePriority; + return this; + } + + /** + * Get the xMsCopyStatus property: The x-ms-copy-status property. + * + * @return the xMsCopyStatus value. + */ + 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. + */ + public BlobsGetPropertiesHeaders setXMsCopyStatus(CopyStatusType xMsCopyStatus) { + this.xMsCopyStatus = xMsCopyStatus; + return this; + } + + /** + * Get the xMsArchiveStatus property: The x-ms-archive-status property. + * + * @return the xMsArchiveStatus value. + */ + 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 BlobsGetPropertiesHeaders object itself. + */ + public BlobsGetPropertiesHeaders setXMsArchiveStatus(String xMsArchiveStatus) { + this.xMsArchiveStatus = xMsArchiveStatus; + return this; + } +} diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlobsGetTagsHeaders.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlobsGetTagsHeaders.java new file mode 100644 index 000000000000..9716237b6f8c --- /dev/null +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlobsGetTagsHeaders.java @@ -0,0 +1,143 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.storage.blob.models; + +import com.azure.core.v2.annotation.Fluent; +import io.clientcore.core.http.models.DateTimeRfc1123; +import io.clientcore.core.http.models.HttpHeaderName; +import io.clientcore.core.http.models.HttpHeaders; + +import java.time.OffsetDateTime; + +/** + * The BlobsGetTagsHeaders model. + */ +@Fluent +public final class BlobsGetTagsHeaders { + /* + * The x-ms-version property. + */ + private String xMsVersion; + + /* + * The x-ms-request-id property. + */ + private String xMsRequestId; + + /* + * The x-ms-client-request-id property. + */ + private String xMsClientRequestId; + + /* + * The Date property. + */ + 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 BlobsGetTagsHeaders class. + * + * @param rawHeaders The raw HttpHeaders that will be used to create the property values. + */ + public BlobsGetTagsHeaders(HttpHeaders rawHeaders) { + this.xMsVersion = rawHeaders.getValue(X_MS_VERSION); + this.xMsRequestId = rawHeaders.getValue(HttpHeaderName.fromString("x-ms-request-id")); + this.xMsClientRequestId = rawHeaders.getValue(HttpHeaderName.fromString("x-ms-client-request-id")); + String date = rawHeaders.getValue(HttpHeaderName.DATE); + if (date != null) { + this.date = new DateTimeRfc1123(date); + } + } + + /** + * 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 BlobsGetTagsHeaders object itself. + */ + public BlobsGetTagsHeaders setXMsVersion(String xMsVersion) { + this.xMsVersion = xMsVersion; + 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 BlobsGetTagsHeaders object itself. + */ + public BlobsGetTagsHeaders 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 BlobsGetTagsHeaders object itself. + */ + public BlobsGetTagsHeaders setXMsClientRequestId(String xMsClientRequestId) { + this.xMsClientRequestId = xMsClientRequestId; + return this; + } + + /** + * Get the date property: The Date property. + * + * @return the date value. + */ + 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 BlobsGetTagsHeaders object itself. + */ + public BlobsGetTagsHeaders 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-v2/src/main/java/com/azure/storage/blob/models/BlobsQueryHeaders.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlobsQueryHeaders.java new file mode 100644 index 000000000000..66c629964e1a --- /dev/null +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlobsQueryHeaders.java @@ -0,0 +1,1006 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.storage.blob.models; + +import com.azure.core.v2.annotation.Fluent; +import io.clientcore.core.http.models.HttpHeader; +import com.azure.core.v2.util.CoreUtils; +import io.clientcore.core.http.models.DateTimeRfc1123; +import io.clientcore.core.http.models.HttpHeaderName; +import io.clientcore.core.http.models.HttpHeaders; + +import java.time.OffsetDateTime; +import java.util.Base64; +import java.util.HashMap; +import java.util.Map; + +/** + * The BlobsQueryHeaders model. + */ +@Fluent +public final class BlobsQueryHeaders { + /* + * The x-ms-lease-status property. + */ + private LeaseStatusType xMsLeaseStatus; + + /* + * The Content-Range property. + */ + private String contentRange; + + /* + * The x-ms-lease-state property. + */ + private LeaseStateType xMsLeaseState; + + /* + * The Last-Modified property. + */ + private DateTimeRfc1123 lastModified; + + /* + * The x-ms-encryption-key-sha256 property. + */ + private String xMsEncryptionKeySha256; + + /* + * The x-ms-blob-type property. + */ + private BlobType xMsBlobType; + + /* + * The Content-Encoding property. + */ + private String contentEncoding; + + /* + * The x-ms-copy-status-description property. + */ + private String xMsCopyStatusDescription; + + /* + * The x-ms-lease-duration property. + */ + private LeaseDurationType xMsLeaseDuration; + + /* + * The Content-Length property. + */ + private Long contentLength; + + /* + * The x-ms-request-id property. + */ + private String xMsRequestId; + + /* + * The Content-Type property. + */ + private String contentType; + + /* + * The x-ms-version property. + */ + private String xMsVersion; + + /* + * The x-ms-copy-id property. + */ + private String xMsCopyId; + + /* + * The x-ms-copy-source property. + */ + private String xMsCopySource; + + /* + * The x-ms-content-crc64 property. + */ + private byte[] xMsContentCrc64; + + /* + * The x-ms-blob-sequence-number property. + */ + private Long xMsBlobSequenceNumber; + + /* + * The x-ms-copy-progress property. + */ + private String xMsCopyProgress; + + /* + * The x-ms-blob-committed-block-count property. + */ + private Integer xMsBlobCommittedBlockCount; + + /* + * The x-ms-blob-content-md5 property. + */ + private byte[] xMsBlobContentMd5; + + /* + * The x-ms-meta- property. + */ + private Map xMsMeta; + + /* + * The Date property. + */ + private DateTimeRfc1123 date; + + /* + * The Content-MD5 property. + */ + private byte[] contentMD5; + + /* + * The x-ms-copy-completion-time property. + */ + private DateTimeRfc1123 xMsCopyCompletionTime; + + /* + * The Accept-Ranges property. + */ + private String acceptRanges; + + /* + * The x-ms-server-encrypted property. + */ + private Boolean xMsServerEncrypted; + + /* + * The Cache-Control property. + */ + private String cacheControl; + + /* + * The ETag property. + */ + private String eTag; + + /* + * The Content-Disposition property. + */ + private String contentDisposition; + + /* + * The x-ms-copy-status property. + */ + private CopyStatusType xMsCopyStatus; + + /* + * The Content-Language property. + */ + private String contentLanguage; + + /* + * The x-ms-client-request-id property. + */ + private String xMsClientRequestId; + + /* + * The x-ms-encryption-scope property. + */ + private String xMsEncryptionScope; + + private static final HttpHeaderName X_MS_LEASE_STATUS = HttpHeaderName.fromString("x-ms-lease-status"); + + private static final HttpHeaderName X_MS_LEASE_STATE = HttpHeaderName.fromString("x-ms-lease-state"); + + private static final HttpHeaderName X_MS_ENCRYPTION_KEY_SHA256 + = HttpHeaderName.fromString("x-ms-encryption-key-sha256"); + + private static final HttpHeaderName X_MS_BLOB_TYPE = HttpHeaderName.fromString("x-ms-blob-type"); + + private static final HttpHeaderName X_MS_COPY_STATUS_DESCRIPTION + = HttpHeaderName.fromString("x-ms-copy-status-description"); + + private static final HttpHeaderName X_MS_LEASE_DURATION = HttpHeaderName.fromString("x-ms-lease-duration"); + + private static final HttpHeaderName X_MS_VERSION = HttpHeaderName.fromString("x-ms-version"); + + private static final HttpHeaderName X_MS_COPY_ID = HttpHeaderName.fromString("x-ms-copy-id"); + + private static final HttpHeaderName X_MS_COPY_SOURCE = HttpHeaderName.fromString("x-ms-copy-source"); + + 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_COPY_PROGRESS = HttpHeaderName.fromString("x-ms-copy-progress"); + + private static final HttpHeaderName X_MS_BLOB_COMMITTED_BLOCK_COUNT + = HttpHeaderName.fromString("x-ms-blob-committed-block-count"); + + private static final HttpHeaderName X_MS_BLOB_CONTENT_MD5 = HttpHeaderName.fromString("x-ms-blob-content-md5"); + + private static final HttpHeaderName X_MS_COPY_COMPLETION_TIME + = HttpHeaderName.fromString("x-ms-copy-completion-time"); + + private static final HttpHeaderName X_MS_SERVER_ENCRYPTED = HttpHeaderName.fromString("x-ms-server-encrypted"); + + private static final HttpHeaderName X_MS_COPY_STATUS = HttpHeaderName.fromString("x-ms-copy-status"); + + private static final HttpHeaderName X_MS_ENCRYPTION_SCOPE = HttpHeaderName.fromString("x-ms-encryption-scope"); + + // 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) { + String xMsLeaseStatus = rawHeaders.getValue(X_MS_LEASE_STATUS); + if (xMsLeaseStatus != null) { + this.xMsLeaseStatus = LeaseStatusType.fromString(xMsLeaseStatus); + } + this.contentRange = rawHeaders.getValue(HttpHeaderName.CONTENT_RANGE); + String xMsLeaseState = rawHeaders.getValue(X_MS_LEASE_STATE); + if (xMsLeaseState != null) { + this.xMsLeaseState = LeaseStateType.fromString(xMsLeaseState); + } + String lastModified = rawHeaders.getValue(HttpHeaderName.LAST_MODIFIED); + if (lastModified != null) { + this.lastModified = new DateTimeRfc1123(lastModified); + } + this.xMsEncryptionKeySha256 = rawHeaders.getValue(X_MS_ENCRYPTION_KEY_SHA256); + String xMsBlobType = rawHeaders.getValue(X_MS_BLOB_TYPE); + if (xMsBlobType != null) { + this.xMsBlobType = BlobType.fromString(xMsBlobType); + } + this.contentEncoding = rawHeaders.getValue(HttpHeaderName.CONTENT_ENCODING); + this.xMsCopyStatusDescription = rawHeaders.getValue(X_MS_COPY_STATUS_DESCRIPTION); + String xMsLeaseDuration = rawHeaders.getValue(X_MS_LEASE_DURATION); + if (xMsLeaseDuration != null) { + this.xMsLeaseDuration = LeaseDurationType.fromString(xMsLeaseDuration); + } + String contentLength = rawHeaders.getValue(HttpHeaderName.CONTENT_LENGTH); + if (contentLength != null) { + this.contentLength = Long.parseLong(contentLength); + } + this.xMsRequestId = rawHeaders.getValue(HttpHeaderName.fromString("x-ms-request-id")); + this.contentType = rawHeaders.getValue(HttpHeaderName.CONTENT_TYPE); + this.xMsVersion = rawHeaders.getValue(X_MS_VERSION); + this.xMsCopyId = rawHeaders.getValue(X_MS_COPY_ID); + this.xMsCopySource = rawHeaders.getValue(X_MS_COPY_SOURCE); + String xMsContentCrc64 = rawHeaders.getValue(X_MS_CONTENT_CRC64); + if (xMsContentCrc64 != null) { + this.xMsContentCrc64 = Base64.getDecoder().decode(xMsContentCrc64); + } + String xMsBlobSequenceNumber = rawHeaders.getValue(X_MS_BLOB_SEQUENCE_NUMBER); + if (xMsBlobSequenceNumber != null) { + this.xMsBlobSequenceNumber = Long.parseLong(xMsBlobSequenceNumber); + } + this.xMsCopyProgress = rawHeaders.getValue(X_MS_COPY_PROGRESS); + String xMsBlobCommittedBlockCount = rawHeaders.getValue(X_MS_BLOB_COMMITTED_BLOCK_COUNT); + if (xMsBlobCommittedBlockCount != null) { + this.xMsBlobCommittedBlockCount = Integer.parseInt(xMsBlobCommittedBlockCount); + } + String xMsBlobContentMd5 = rawHeaders.getValue(X_MS_BLOB_CONTENT_MD5); + if (xMsBlobContentMd5 != null) { + this.xMsBlobContentMd5 = Base64.getDecoder().decode(xMsBlobContentMd5); + } + String date = rawHeaders.getValue(HttpHeaderName.DATE); + if (date != null) { + this.date = new DateTimeRfc1123(date); + } + String contentMD5 = rawHeaders.getValue(HttpHeaderName.CONTENT_MD5); + if (contentMD5 != null) { + this.contentMD5 = Base64.getDecoder().decode(contentMD5); + } + String xMsCopyCompletionTime = rawHeaders.getValue(X_MS_COPY_COMPLETION_TIME); + if (xMsCopyCompletionTime != null) { + this.xMsCopyCompletionTime = new DateTimeRfc1123(xMsCopyCompletionTime); + } + this.acceptRanges = rawHeaders.getValue(HttpHeaderName.ACCEPT_RANGES); + String xMsServerEncrypted = rawHeaders.getValue(X_MS_SERVER_ENCRYPTED); + if (xMsServerEncrypted != null) { + this.xMsServerEncrypted = Boolean.parseBoolean(xMsServerEncrypted); + } + this.cacheControl = rawHeaders.getValue(HttpHeaderName.CACHE_CONTROL); + this.eTag = rawHeaders.getValue(HttpHeaderName.ETAG); + this.contentDisposition = rawHeaders.getValue(HttpHeaderName.CONTENT_DISPOSITION); + String xMsCopyStatus = rawHeaders.getValue(X_MS_COPY_STATUS); + if (xMsCopyStatus != null) { + this.xMsCopyStatus = CopyStatusType.fromString(xMsCopyStatus); + } + this.contentLanguage = rawHeaders.getValue(HttpHeaderName.CONTENT_LANGUAGE); + this.xMsClientRequestId = rawHeaders.getValue(HttpHeaderName.fromString("x-ms-client-request-id")); + this.xMsEncryptionScope = rawHeaders.getValue(X_MS_ENCRYPTION_SCOPE); + Map xMsMetaHeaderCollection = new HashMap<>(); + + for (HttpHeader header : rawHeaders) { + String headerName = header.getValue(); + if (headerName.startsWith("x-ms-meta-")) { + xMsMetaHeaderCollection.put(headerName.substring(10), header.getValue()); + } + } + + this.xMsMeta = xMsMetaHeaderCollection; + } + + /** + * Get the xMsLeaseStatus property: The x-ms-lease-status property. + * + * @return the xMsLeaseStatus value. + */ + 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 BlobsQueryHeaders object itself. + */ + public BlobsQueryHeaders setXMsLeaseStatus(LeaseStatusType xMsLeaseStatus) { + this.xMsLeaseStatus = xMsLeaseStatus; + return this; + } + + /** + * Get the contentRange property: The Content-Range property. + * + * @return the contentRange value. + */ + public String getContentRange() { + return this.contentRange; + } + + /** + * Set the contentRange property: The Content-Range property. + * + * @param contentRange the contentRange value to set. + * @return the BlobsQueryHeaders object itself. + */ + public BlobsQueryHeaders setContentRange(String contentRange) { + this.contentRange = contentRange; + return this; + } + + /** + * Get the xMsLeaseState property: The x-ms-lease-state property. + * + * @return the xMsLeaseState value. + */ + 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 BlobsQueryHeaders object itself. + */ + public BlobsQueryHeaders setXMsLeaseState(LeaseStateType xMsLeaseState) { + this.xMsLeaseState = xMsLeaseState; + 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 BlobsQueryHeaders object itself. + */ + public BlobsQueryHeaders setLastModified(OffsetDateTime lastModified) { + if (lastModified == null) { + this.lastModified = null; + } else { + this.lastModified = new DateTimeRfc1123(lastModified); + } + return this; + } + + /** + * Get the xMsEncryptionKeySha256 property: The x-ms-encryption-key-sha256 property. + * + * @return the xMsEncryptionKeySha256 value. + */ + 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 BlobsQueryHeaders object itself. + */ + public BlobsQueryHeaders setXMsEncryptionKeySha256(String xMsEncryptionKeySha256) { + this.xMsEncryptionKeySha256 = xMsEncryptionKeySha256; + return this; + } + + /** + * Get the xMsBlobType property: The x-ms-blob-type property. + * + * @return the xMsBlobType value. + */ + public BlobType getXMsBlobType() { + return this.xMsBlobType; + } + + /** + * Set the xMsBlobType property: The x-ms-blob-type property. + * + * @param xMsBlobType the xMsBlobType value to set. + * @return the BlobsQueryHeaders object itself. + */ + public BlobsQueryHeaders setXMsBlobType(BlobType xMsBlobType) { + this.xMsBlobType = xMsBlobType; + return this; + } + + /** + * Get the contentEncoding property: The Content-Encoding property. + * + * @return the contentEncoding value. + */ + public String getContentEncoding() { + return this.contentEncoding; + } + + /** + * Set the contentEncoding property: The Content-Encoding property. + * + * @param contentEncoding the contentEncoding value to set. + * @return the BlobsQueryHeaders object itself. + */ + public BlobsQueryHeaders setContentEncoding(String contentEncoding) { + this.contentEncoding = contentEncoding; + return this; + } + + /** + * Get the xMsCopyStatusDescription property: The x-ms-copy-status-description property. + * + * @return the xMsCopyStatusDescription value. + */ + 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 BlobsQueryHeaders object itself. + */ + public BlobsQueryHeaders setXMsCopyStatusDescription(String xMsCopyStatusDescription) { + this.xMsCopyStatusDescription = xMsCopyStatusDescription; + return this; + } + + /** + * Get the xMsLeaseDuration property: The x-ms-lease-duration property. + * + * @return the xMsLeaseDuration value. + */ + 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 BlobsQueryHeaders object itself. + */ + public BlobsQueryHeaders setXMsLeaseDuration(LeaseDurationType xMsLeaseDuration) { + this.xMsLeaseDuration = xMsLeaseDuration; + 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 BlobsQueryHeaders object itself. + */ + public BlobsQueryHeaders 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 BlobsQueryHeaders object itself. + */ + public BlobsQueryHeaders setXMsRequestId(String xMsRequestId) { + this.xMsRequestId = xMsRequestId; + return this; + } + + /** + * Get the contentType property: The Content-Type property. + * + * @return the contentType value. + */ + 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. + */ + public BlobsQueryHeaders setContentType(String contentType) { + this.contentType = contentType; + 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 BlobsQueryHeaders object itself. + */ + public BlobsQueryHeaders setXMsVersion(String xMsVersion) { + this.xMsVersion = xMsVersion; + return this; + } + + /** + * Get the xMsCopyId property: The x-ms-copy-id property. + * + * @return the xMsCopyId value. + */ + 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 BlobsQueryHeaders object itself. + */ + public BlobsQueryHeaders setXMsCopyId(String xMsCopyId) { + this.xMsCopyId = xMsCopyId; + return this; + } + + /** + * Get the xMsCopySource property: The x-ms-copy-source property. + * + * @return the xMsCopySource value. + */ + 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 BlobsQueryHeaders object itself. + */ + public BlobsQueryHeaders setXMsCopySource(String xMsCopySource) { + this.xMsCopySource = xMsCopySource; + return this; + } + + /** + * Get the xMsContentCrc64 property: The x-ms-content-crc64 property. + * + * @return the xMsContentCrc64 value. + */ + 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 BlobsQueryHeaders object itself. + */ + public BlobsQueryHeaders 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. + */ + 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 BlobsQueryHeaders object itself. + */ + public BlobsQueryHeaders setXMsBlobSequenceNumber(Long xMsBlobSequenceNumber) { + this.xMsBlobSequenceNumber = xMsBlobSequenceNumber; + return this; + } + + /** + * Get the xMsCopyProgress property: The x-ms-copy-progress property. + * + * @return the xMsCopyProgress value. + */ + 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 BlobsQueryHeaders object itself. + */ + public BlobsQueryHeaders setXMsCopyProgress(String xMsCopyProgress) { + this.xMsCopyProgress = xMsCopyProgress; + return this; + } + + /** + * Get the xMsBlobCommittedBlockCount property: The x-ms-blob-committed-block-count property. + * + * @return the xMsBlobCommittedBlockCount value. + */ + 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 BlobsQueryHeaders object itself. + */ + public BlobsQueryHeaders setXMsBlobCommittedBlockCount(Integer xMsBlobCommittedBlockCount) { + this.xMsBlobCommittedBlockCount = xMsBlobCommittedBlockCount; + return this; + } + + /** + * Get the xMsBlobContentMd5 property: The x-ms-blob-content-md5 property. + * + * @return the xMsBlobContentMd5 value. + */ + public byte[] getXMsBlobContentMd5() { + return CoreUtils.clone(this.xMsBlobContentMd5); + } + + /** + * Set the xMsBlobContentMd5 property: The x-ms-blob-content-md5 property. + * + * @param xMsBlobContentMd5 the xMsBlobContentMd5 value to set. + * @return the BlobsQueryHeaders object itself. + */ + public BlobsQueryHeaders setXMsBlobContentMd5(byte[] xMsBlobContentMd5) { + this.xMsBlobContentMd5 = CoreUtils.clone(xMsBlobContentMd5); + return this; + } + + /** + * Get the xMsMeta property: The x-ms-meta- property. + * + * @return the xMsMeta value. + */ + public Map getXMsMeta() { + return this.xMsMeta; + } + + /** + * Set the xMsMeta property: The x-ms-meta- property. + * + * @param xMsMeta the xMsMeta value to set. + * @return the BlobsQueryHeaders object itself. + */ + public BlobsQueryHeaders setXMsMeta(Map xMsMeta) { + this.xMsMeta = xMsMeta; + return this; + } + + /** + * Get the date property: The Date property. + * + * @return the date value. + */ + 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 BlobsQueryHeaders object itself. + */ + public BlobsQueryHeaders setDate(OffsetDateTime date) { + if (date == null) { + this.date = null; + } else { + this.date = new DateTimeRfc1123(date); + } + return this; + } + + /** + * Get the contentMD5 property: The Content-MD5 property. + * + * @return the contentMD5 value. + */ + 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 BlobsQueryHeaders object itself. + */ + public BlobsQueryHeaders setContentMD5(byte[] contentMD5) { + this.contentMD5 = CoreUtils.clone(contentMD5); + return this; + } + + /** + * Get the xMsCopyCompletionTime property: The x-ms-copy-completion-time property. + * + * @return the xMsCopyCompletionTime value. + */ + public OffsetDateTime getXMsCopyCompletionTime() { + if (this.xMsCopyCompletionTime == null) { + return null; + } + return this.xMsCopyCompletionTime.getDateTime(); + } + + /** + * Set the xMsCopyCompletionTime property: The x-ms-copy-completion-time property. + * + * @param xMsCopyCompletionTime the xMsCopyCompletionTime value to set. + * @return the BlobsQueryHeaders object itself. + */ + public BlobsQueryHeaders setXMsCopyCompletionTime(OffsetDateTime xMsCopyCompletionTime) { + if (xMsCopyCompletionTime == null) { + this.xMsCopyCompletionTime = null; + } else { + this.xMsCopyCompletionTime = new DateTimeRfc1123(xMsCopyCompletionTime); + } + return this; + } + + /** + * Get the acceptRanges property: The Accept-Ranges property. + * + * @return the acceptRanges value. + */ + public String getAcceptRanges() { + return this.acceptRanges; + } + + /** + * Set the acceptRanges property: The Accept-Ranges property. + * + * @param acceptRanges the acceptRanges value to set. + * @return the BlobsQueryHeaders object itself. + */ + public BlobsQueryHeaders setAcceptRanges(String acceptRanges) { + this.acceptRanges = acceptRanges; + return this; + } + + /** + * Get the xMsServerEncrypted property: The x-ms-server-encrypted property. + * + * @return the xMsServerEncrypted value. + */ + 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 BlobsQueryHeaders object itself. + */ + public BlobsQueryHeaders setXMsServerEncrypted(Boolean xMsServerEncrypted) { + this.xMsServerEncrypted = xMsServerEncrypted; + return this; + } + + /** + * Get the cacheControl property: The Cache-Control property. + * + * @return the cacheControl value. + */ + public String getCacheControl() { + return this.cacheControl; + } + + /** + * Set the cacheControl property: The Cache-Control property. + * + * @param cacheControl the cacheControl value to set. + * @return the BlobsQueryHeaders object itself. + */ + public BlobsQueryHeaders setCacheControl(String cacheControl) { + this.cacheControl = cacheControl; + 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 BlobsQueryHeaders object itself. + */ + public BlobsQueryHeaders setETag(String eTag) { + this.eTag = eTag; + return this; + } + + /** + * Get the contentDisposition property: The Content-Disposition property. + * + * @return the contentDisposition value. + */ + public String getContentDisposition() { + return this.contentDisposition; + } + + /** + * Set the contentDisposition property: The Content-Disposition property. + * + * @param contentDisposition the contentDisposition value to set. + * @return the BlobsQueryHeaders object itself. + */ + public BlobsQueryHeaders setContentDisposition(String contentDisposition) { + this.contentDisposition = contentDisposition; + return this; + } + + /** + * Get the xMsCopyStatus property: The x-ms-copy-status property. + * + * @return the xMsCopyStatus value. + */ + 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 BlobsQueryHeaders object itself. + */ + public BlobsQueryHeaders setXMsCopyStatus(CopyStatusType xMsCopyStatus) { + this.xMsCopyStatus = xMsCopyStatus; + return this; + } + + /** + * Get the contentLanguage property: The Content-Language property. + * + * @return the contentLanguage value. + */ + public String getContentLanguage() { + return this.contentLanguage; + } + + /** + * Set the contentLanguage property: The Content-Language property. + * + * @param contentLanguage the contentLanguage value to set. + * @return the BlobsQueryHeaders object itself. + */ + public BlobsQueryHeaders setContentLanguage(String contentLanguage) { + this.contentLanguage = contentLanguage; + 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 BlobsQueryHeaders object itself. + */ + public BlobsQueryHeaders setXMsClientRequestId(String xMsClientRequestId) { + this.xMsClientRequestId = xMsClientRequestId; + return this; + } + + /** + * Get the xMsEncryptionScope property: The x-ms-encryption-scope property. + * + * @return the xMsEncryptionScope value. + */ + 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 BlobsQueryHeaders object itself. + */ + public BlobsQueryHeaders setXMsEncryptionScope(String xMsEncryptionScope) { + this.xMsEncryptionScope = xMsEncryptionScope; + return this; + } +} diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlobsReleaseLeaseHeaders.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlobsReleaseLeaseHeaders.java new file mode 100644 index 000000000000..1a59228ff75f --- /dev/null +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlobsReleaseLeaseHeaders.java @@ -0,0 +1,205 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.storage.blob.models; + +import com.azure.core.v2.annotation.Fluent; +import io.clientcore.core.http.models.DateTimeRfc1123; +import io.clientcore.core.http.models.HttpHeaderName; +import io.clientcore.core.http.models.HttpHeaders; + +import java.time.OffsetDateTime; + +/** + * The BlobsReleaseLeaseHeaders model. + */ +@Fluent +public final class BlobsReleaseLeaseHeaders { + /* + * 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 x-ms-client-request-id property. + */ + private String xMsClientRequestId; + + /* + * The Date property. + */ + 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 BlobsReleaseLeaseHeaders class. + * + * @param rawHeaders The raw HttpHeaders that will be used to create the property values. + */ + public BlobsReleaseLeaseHeaders(HttpHeaders rawHeaders) { + this.xMsVersion = rawHeaders.getValue(X_MS_VERSION); + this.eTag = rawHeaders.getValue(HttpHeaderName.ETAG); + String lastModified = rawHeaders.getValue(HttpHeaderName.LAST_MODIFIED); + if (lastModified != null) { + this.lastModified = new DateTimeRfc1123(lastModified); + } + this.xMsRequestId = rawHeaders.getValue(HttpHeaderName.fromString("x-ms-request-id")); + this.xMsClientRequestId = rawHeaders.getValue(HttpHeaderName.fromString("x-ms-client-request-id")); + String date = rawHeaders.getValue(HttpHeaderName.DATE); + if (date != null) { + this.date = new DateTimeRfc1123(date); + } + } + + /** + * 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 BlobsReleaseLeaseHeaders object itself. + */ + public BlobsReleaseLeaseHeaders 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 BlobsReleaseLeaseHeaders object itself. + */ + public BlobsReleaseLeaseHeaders 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 BlobsReleaseLeaseHeaders object itself. + */ + public BlobsReleaseLeaseHeaders 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 BlobsReleaseLeaseHeaders object itself. + */ + public BlobsReleaseLeaseHeaders 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 BlobsReleaseLeaseHeaders object itself. + */ + public BlobsReleaseLeaseHeaders setXMsClientRequestId(String xMsClientRequestId) { + this.xMsClientRequestId = xMsClientRequestId; + return this; + } + + /** + * Get the date property: The Date property. + * + * @return the date value. + */ + 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 BlobsReleaseLeaseHeaders object itself. + */ + public BlobsReleaseLeaseHeaders 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-v2/src/main/java/com/azure/storage/blob/models/BlobsRenewLeaseHeaders.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlobsRenewLeaseHeaders.java new file mode 100644 index 000000000000..349e18f8fab5 --- /dev/null +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlobsRenewLeaseHeaders.java @@ -0,0 +1,233 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.storage.blob.models; + +import com.azure.core.v2.annotation.Fluent; +import io.clientcore.core.http.models.DateTimeRfc1123; +import io.clientcore.core.http.models.HttpHeaderName; +import io.clientcore.core.http.models.HttpHeaders; + +import java.time.OffsetDateTime; + +/** + * The BlobsRenewLeaseHeaders model. + */ +@Fluent +public final class BlobsRenewLeaseHeaders { + /* + * The x-ms-version property. + */ + private String xMsVersion; + + /* + * The ETag property. + */ + private String eTag; + + /* + * The x-ms-lease-id property. + */ + private String xMsLeaseId; + + /* + * 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 date; + + private static final HttpHeaderName X_MS_VERSION = HttpHeaderName.fromString("x-ms-version"); + + private static final HttpHeaderName X_MS_LEASE_ID = HttpHeaderName.fromString("x-ms-lease-id"); + + // HttpHeaders containing the raw property values. + /** + * Creates an instance of BlobsRenewLeaseHeaders class. + * + * @param rawHeaders The raw HttpHeaders that will be used to create the property values. + */ + public BlobsRenewLeaseHeaders(HttpHeaders rawHeaders) { + this.xMsVersion = rawHeaders.getValue(X_MS_VERSION); + this.eTag = rawHeaders.getValue(HttpHeaderName.ETAG); + this.xMsLeaseId = rawHeaders.getValue(X_MS_LEASE_ID); + String lastModified = rawHeaders.getValue(HttpHeaderName.LAST_MODIFIED); + if (lastModified != null) { + this.lastModified = new DateTimeRfc1123(lastModified); + } + this.xMsRequestId = rawHeaders.getValue(HttpHeaderName.fromString("x-ms-request-id")); + this.xMsClientRequestId = rawHeaders.getValue(HttpHeaderName.fromString("x-ms-client-request-id")); + String date = rawHeaders.getValue(HttpHeaderName.DATE); + if (date != null) { + this.date = new DateTimeRfc1123(date); + } + } + + /** + * 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 BlobsRenewLeaseHeaders object itself. + */ + public BlobsRenewLeaseHeaders 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 BlobsRenewLeaseHeaders object itself. + */ + public BlobsRenewLeaseHeaders setETag(String eTag) { + this.eTag = eTag; + return this; + } + + /** + * Get the xMsLeaseId property: The x-ms-lease-id property. + * + * @return the xMsLeaseId value. + */ + 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. + */ + public BlobsRenewLeaseHeaders setXMsLeaseId(String xMsLeaseId) { + this.xMsLeaseId = xMsLeaseId; + 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 BlobsRenewLeaseHeaders object itself. + */ + public BlobsRenewLeaseHeaders 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 BlobsRenewLeaseHeaders object itself. + */ + public BlobsRenewLeaseHeaders 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 BlobsRenewLeaseHeaders object itself. + */ + public BlobsRenewLeaseHeaders setXMsClientRequestId(String xMsClientRequestId) { + this.xMsClientRequestId = xMsClientRequestId; + return this; + } + + /** + * Get the date property: The Date property. + * + * @return the date value. + */ + 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 BlobsRenewLeaseHeaders object itself. + */ + public BlobsRenewLeaseHeaders 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-v2/src/main/java/com/azure/storage/blob/models/BlobsSetExpiryHeaders.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlobsSetExpiryHeaders.java new file mode 100644 index 000000000000..a47699c609c0 --- /dev/null +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlobsSetExpiryHeaders.java @@ -0,0 +1,205 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.storage.blob.models; + +import com.azure.core.v2.annotation.Fluent; +import io.clientcore.core.http.models.DateTimeRfc1123; +import io.clientcore.core.http.models.HttpHeaderName; +import io.clientcore.core.http.models.HttpHeaders; + +import java.time.OffsetDateTime; + +/** + * The BlobsSetExpiryHeaders model. + */ +@Fluent +public final class BlobsSetExpiryHeaders { + /* + * 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 x-ms-client-request-id property. + */ + private String xMsClientRequestId; + + /* + * The Date property. + */ + 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 BlobsSetExpiryHeaders class. + * + * @param rawHeaders The raw HttpHeaders that will be used to create the property values. + */ + public BlobsSetExpiryHeaders(HttpHeaders rawHeaders) { + this.xMsVersion = rawHeaders.getValue(X_MS_VERSION); + this.eTag = rawHeaders.getValue(HttpHeaderName.ETAG); + String lastModified = rawHeaders.getValue(HttpHeaderName.LAST_MODIFIED); + if (lastModified != null) { + this.lastModified = new DateTimeRfc1123(lastModified); + } + this.xMsRequestId = rawHeaders.getValue(HttpHeaderName.fromString("x-ms-request-id")); + this.xMsClientRequestId = rawHeaders.getValue(HttpHeaderName.fromString("x-ms-client-request-id")); + String date = rawHeaders.getValue(HttpHeaderName.DATE); + if (date != null) { + this.date = new DateTimeRfc1123(date); + } + } + + /** + * 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 BlobsSetExpiryHeaders object itself. + */ + public BlobsSetExpiryHeaders 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 BlobsSetExpiryHeaders object itself. + */ + public BlobsSetExpiryHeaders 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 BlobsSetExpiryHeaders object itself. + */ + public BlobsSetExpiryHeaders 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 BlobsSetExpiryHeaders object itself. + */ + public BlobsSetExpiryHeaders 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 BlobsSetExpiryHeaders object itself. + */ + public BlobsSetExpiryHeaders setXMsClientRequestId(String xMsClientRequestId) { + this.xMsClientRequestId = xMsClientRequestId; + return this; + } + + /** + * Get the date property: The Date property. + * + * @return the date value. + */ + 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 BlobsSetExpiryHeaders object itself. + */ + public BlobsSetExpiryHeaders 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-v2/src/main/java/com/azure/storage/blob/models/BlobsSetHttpHeadersHeaders.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlobsSetHttpHeadersHeaders.java new file mode 100644 index 000000000000..365ad5640f95 --- /dev/null +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlobsSetHttpHeadersHeaders.java @@ -0,0 +1,237 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.storage.blob.models; + +import com.azure.core.v2.annotation.Fluent; +import io.clientcore.core.http.models.DateTimeRfc1123; +import io.clientcore.core.http.models.HttpHeaderName; +import io.clientcore.core.http.models.HttpHeaders; + +import java.time.OffsetDateTime; + +/** + * The BlobsSetHttpHeadersHeaders model. + */ +@Fluent +public final class BlobsSetHttpHeadersHeaders { + /* + * The x-ms-version property. + */ + private String xMsVersion; + + /* + * The ETag property. + */ + private String eTag; + + /* + * The x-ms-blob-sequence-number property. + */ + private Long xMsBlobSequenceNumber; + + /* + * 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 date; + + private static final HttpHeaderName X_MS_VERSION = HttpHeaderName.fromString("x-ms-version"); + + private static final HttpHeaderName X_MS_BLOB_SEQUENCE_NUMBER + = HttpHeaderName.fromString("x-ms-blob-sequence-number"); + + // HttpHeaders containing the raw property values. + /** + * Creates an instance of BlobsSetHttpHeadersHeaders class. + * + * @param rawHeaders The raw HttpHeaders that will be used to create the property values. + */ + public BlobsSetHttpHeadersHeaders(HttpHeaders rawHeaders) { + this.xMsVersion = rawHeaders.getValue(X_MS_VERSION); + this.eTag = rawHeaders.getValue(HttpHeaderName.ETAG); + String xMsBlobSequenceNumber = rawHeaders.getValue(X_MS_BLOB_SEQUENCE_NUMBER); + if (xMsBlobSequenceNumber != null) { + this.xMsBlobSequenceNumber = Long.parseLong(xMsBlobSequenceNumber); + } + String lastModified = rawHeaders.getValue(HttpHeaderName.LAST_MODIFIED); + if (lastModified != null) { + this.lastModified = new DateTimeRfc1123(lastModified); + } + this.xMsRequestId = rawHeaders.getValue(HttpHeaderName.fromString("x-ms-request-id")); + this.xMsClientRequestId = rawHeaders.getValue(HttpHeaderName.fromString("x-ms-client-request-id")); + String date = rawHeaders.getValue(HttpHeaderName.DATE); + if (date != null) { + this.date = new DateTimeRfc1123(date); + } + } + + /** + * 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 BlobsSetHttpHeadersHeaders object itself. + */ + public BlobsSetHttpHeadersHeaders 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 BlobsSetHttpHeadersHeaders object itself. + */ + public BlobsSetHttpHeadersHeaders setETag(String eTag) { + this.eTag = eTag; + return this; + } + + /** + * Get the xMsBlobSequenceNumber property: The x-ms-blob-sequence-number property. + * + * @return the xMsBlobSequenceNumber value. + */ + 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. + */ + public BlobsSetHttpHeadersHeaders setXMsBlobSequenceNumber(Long xMsBlobSequenceNumber) { + this.xMsBlobSequenceNumber = xMsBlobSequenceNumber; + 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 BlobsSetHttpHeadersHeaders object itself. + */ + public BlobsSetHttpHeadersHeaders 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 BlobsSetHttpHeadersHeaders object itself. + */ + public BlobsSetHttpHeadersHeaders 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 BlobsSetHttpHeadersHeaders object itself. + */ + public BlobsSetHttpHeadersHeaders setXMsClientRequestId(String xMsClientRequestId) { + this.xMsClientRequestId = xMsClientRequestId; + return this; + } + + /** + * Get the date property: The Date property. + * + * @return the date value. + */ + 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 BlobsSetHttpHeadersHeaders object itself. + */ + public BlobsSetHttpHeadersHeaders 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-v2/src/main/java/com/azure/storage/blob/models/BlobsSetImmutabilityPolicyHeaders.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlobsSetImmutabilityPolicyHeaders.java new file mode 100644 index 000000000000..c5688f50ded6 --- /dev/null +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlobsSetImmutabilityPolicyHeaders.java @@ -0,0 +1,216 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.storage.blob.models; + +import com.azure.core.v2.annotation.Fluent; +import io.clientcore.core.http.models.DateTimeRfc1123; +import io.clientcore.core.http.models.HttpHeaderName; +import io.clientcore.core.http.models.HttpHeaders; + +import java.time.OffsetDateTime; + +/** + * The BlobsSetImmutabilityPolicyHeaders model. + */ +@Fluent +public final class BlobsSetImmutabilityPolicyHeaders { + /* + * The x-ms-immutability-policy-mode property. + */ + private BlobImmutabilityPolicyMode xMsImmutabilityPolicyMode; + + /* + * The x-ms-version property. + */ + private String xMsVersion; + + /* + * The x-ms-immutability-policy-until-date property. + */ + private DateTimeRfc1123 xMsImmutabilityPolicyUntilDate; + + /* + * The x-ms-request-id property. + */ + private String xMsRequestId; + + /* + * The x-ms-client-request-id property. + */ + private String xMsClientRequestId; + + /* + * The Date property. + */ + private DateTimeRfc1123 date; + + private static final HttpHeaderName X_MS_IMMUTABILITY_POLICY_MODE + = HttpHeaderName.fromString("x-ms-immutability-policy-mode"); + + private static final HttpHeaderName X_MS_VERSION = HttpHeaderName.fromString("x-ms-version"); + + private static final HttpHeaderName X_MS_IMMUTABILITY_POLICY_UNTIL_DATE + = HttpHeaderName.fromString("x-ms-immutability-policy-until-date"); + + // HttpHeaders containing the raw property values. + /** + * Creates an instance of BlobsSetImmutabilityPolicyHeaders class. + * + * @param rawHeaders The raw HttpHeaders that will be used to create the property values. + */ + public BlobsSetImmutabilityPolicyHeaders(HttpHeaders rawHeaders) { + String xMsImmutabilityPolicyMode = rawHeaders.getValue(X_MS_IMMUTABILITY_POLICY_MODE); + if (xMsImmutabilityPolicyMode != null) { + this.xMsImmutabilityPolicyMode = BlobImmutabilityPolicyMode.fromString(xMsImmutabilityPolicyMode); + } + this.xMsVersion = rawHeaders.getValue(X_MS_VERSION); + String xMsImmutabilityPolicyUntilDate = rawHeaders.getValue(X_MS_IMMUTABILITY_POLICY_UNTIL_DATE); + if (xMsImmutabilityPolicyUntilDate != null) { + this.xMsImmutabilityPolicyUntilDate = new DateTimeRfc1123(xMsImmutabilityPolicyUntilDate); + } + this.xMsRequestId = rawHeaders.getValue(HttpHeaderName.fromString("x-ms-request-id")); + this.xMsClientRequestId = rawHeaders.getValue(HttpHeaderName.fromString("x-ms-client-request-id")); + String date = rawHeaders.getValue(HttpHeaderName.DATE); + if (date != null) { + this.date = new DateTimeRfc1123(date); + } + } + + /** + * Get the xMsImmutabilityPolicyMode property: The x-ms-immutability-policy-mode property. + * + * @return the xMsImmutabilityPolicyMode value. + */ + public BlobImmutabilityPolicyMode getXMsImmutabilityPolicyMode() { + return this.xMsImmutabilityPolicyMode; + } + + /** + * Set the xMsImmutabilityPolicyMode property: The x-ms-immutability-policy-mode property. + * + * @param xMsImmutabilityPolicyMode the xMsImmutabilityPolicyMode value to set. + * @return the BlobsSetImmutabilityPolicyHeaders object itself. + */ + public BlobsSetImmutabilityPolicyHeaders + setXMsImmutabilityPolicyMode(BlobImmutabilityPolicyMode xMsImmutabilityPolicyMode) { + this.xMsImmutabilityPolicyMode = xMsImmutabilityPolicyMode; + 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 BlobsSetImmutabilityPolicyHeaders object itself. + */ + public BlobsSetImmutabilityPolicyHeaders setXMsVersion(String xMsVersion) { + this.xMsVersion = xMsVersion; + return this; + } + + /** + * Get the xMsImmutabilityPolicyUntilDate property: The x-ms-immutability-policy-until-date property. + * + * @return the xMsImmutabilityPolicyUntilDate value. + */ + 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. + */ + public BlobsSetImmutabilityPolicyHeaders + setXMsImmutabilityPolicyUntilDate(OffsetDateTime xMsImmutabilityPolicyUntilDate) { + if (xMsImmutabilityPolicyUntilDate == null) { + this.xMsImmutabilityPolicyUntilDate = null; + } else { + this.xMsImmutabilityPolicyUntilDate = new DateTimeRfc1123(xMsImmutabilityPolicyUntilDate); + } + 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 BlobsSetImmutabilityPolicyHeaders object itself. + */ + public BlobsSetImmutabilityPolicyHeaders 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 BlobsSetImmutabilityPolicyHeaders object itself. + */ + public BlobsSetImmutabilityPolicyHeaders setXMsClientRequestId(String xMsClientRequestId) { + this.xMsClientRequestId = xMsClientRequestId; + return this; + } + + /** + * Get the date property: The Date property. + * + * @return the date value. + */ + 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 BlobsSetImmutabilityPolicyHeaders object itself. + */ + public BlobsSetImmutabilityPolicyHeaders 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-v2/src/main/java/com/azure/storage/blob/models/BlobsSetLegalHoldHeaders.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlobsSetLegalHoldHeaders.java new file mode 100644 index 000000000000..35a8bb67df9d --- /dev/null +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlobsSetLegalHoldHeaders.java @@ -0,0 +1,174 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.storage.blob.models; + +import com.azure.core.v2.annotation.Fluent; +import io.clientcore.core.http.models.DateTimeRfc1123; +import io.clientcore.core.http.models.HttpHeaderName; +import io.clientcore.core.http.models.HttpHeaders; + +import java.time.OffsetDateTime; + +/** + * The BlobsSetLegalHoldHeaders model. + */ +@Fluent +public final class BlobsSetLegalHoldHeaders { + /* + * The x-ms-version property. + */ + private String xMsVersion; + + /* + * The x-ms-request-id property. + */ + private String xMsRequestId; + + /* + * The x-ms-legal-hold property. + */ + private Boolean xMsLegalHold; + + /* + * The x-ms-client-request-id property. + */ + private String xMsClientRequestId; + + /* + * The Date property. + */ + private DateTimeRfc1123 date; + + private static final HttpHeaderName X_MS_VERSION = HttpHeaderName.fromString("x-ms-version"); + + private static final HttpHeaderName X_MS_LEGAL_HOLD = HttpHeaderName.fromString("x-ms-legal-hold"); + + // HttpHeaders containing the raw property values. + /** + * Creates an instance of BlobsSetLegalHoldHeaders class. + * + * @param rawHeaders The raw HttpHeaders that will be used to create the property values. + */ + public BlobsSetLegalHoldHeaders(HttpHeaders rawHeaders) { + this.xMsVersion = rawHeaders.getValue(X_MS_VERSION); + this.xMsRequestId = rawHeaders.getValue(HttpHeaderName.fromString("x-ms-request-id")); + String xMsLegalHold = rawHeaders.getValue(X_MS_LEGAL_HOLD); + if (xMsLegalHold != null) { + this.xMsLegalHold = Boolean.parseBoolean(xMsLegalHold); + } + this.xMsClientRequestId = rawHeaders.getValue(HttpHeaderName.fromString("x-ms-client-request-id")); + String date = rawHeaders.getValue(HttpHeaderName.DATE); + if (date != null) { + this.date = new DateTimeRfc1123(date); + } + } + + /** + * 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 BlobsSetLegalHoldHeaders object itself. + */ + public BlobsSetLegalHoldHeaders setXMsVersion(String xMsVersion) { + this.xMsVersion = xMsVersion; + 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 BlobsSetLegalHoldHeaders object itself. + */ + public BlobsSetLegalHoldHeaders setXMsRequestId(String xMsRequestId) { + this.xMsRequestId = xMsRequestId; + return this; + } + + /** + * Get the xMsLegalHold property: The x-ms-legal-hold property. + * + * @return the xMsLegalHold value. + */ + public Boolean isXMsLegalHold() { + return this.xMsLegalHold; + } + + /** + * Set the xMsLegalHold property: The x-ms-legal-hold property. + * + * @param xMsLegalHold the xMsLegalHold value to set. + * @return the BlobsSetLegalHoldHeaders object itself. + */ + public BlobsSetLegalHoldHeaders setXMsLegalHold(Boolean xMsLegalHold) { + this.xMsLegalHold = xMsLegalHold; + 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 BlobsSetLegalHoldHeaders object itself. + */ + public BlobsSetLegalHoldHeaders setXMsClientRequestId(String xMsClientRequestId) { + this.xMsClientRequestId = xMsClientRequestId; + return this; + } + + /** + * Get the date property: The Date property. + * + * @return the date value. + */ + 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 BlobsSetLegalHoldHeaders object itself. + */ + public BlobsSetLegalHoldHeaders 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-v2/src/main/java/com/azure/storage/blob/models/BlobsSetMetadataHeaders.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlobsSetMetadataHeaders.java new file mode 100644 index 000000000000..11cfb6ada2f0 --- /dev/null +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlobsSetMetadataHeaders.java @@ -0,0 +1,322 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.storage.blob.models; + +import com.azure.core.v2.annotation.Fluent; +import io.clientcore.core.http.models.DateTimeRfc1123; +import io.clientcore.core.http.models.HttpHeaderName; +import io.clientcore.core.http.models.HttpHeaders; + +import java.time.OffsetDateTime; + +/** + * The BlobsSetMetadataHeaders model. + */ +@Fluent +public final class BlobsSetMetadataHeaders { + /* + * The x-ms-version property. + */ + private String xMsVersion; + + /* + * The ETag property. + */ + private String eTag; + + /* + * The Last-Modified property. + */ + private DateTimeRfc1123 lastModified; + + /* + * The x-ms-version-id property. + */ + private String xMsVersionId; + + /* + * The x-ms-encryption-key-sha256 property. + */ + private String xMsEncryptionKeySha256; + + /* + * The x-ms-request-id property. + */ + private String xMsRequestId; + + /* + * The x-ms-request-server-encrypted property. + */ + private Boolean xMsRequestServerEncrypted; + + /* + * The x-ms-client-request-id property. + */ + private String xMsClientRequestId; + + /* + * The Date property. + */ + private DateTimeRfc1123 date; + + /* + * The x-ms-encryption-scope property. + */ + private String xMsEncryptionScope; + + private static final HttpHeaderName X_MS_VERSION = HttpHeaderName.fromString("x-ms-version"); + + private static final HttpHeaderName X_MS_VERSION_ID = HttpHeaderName.fromString("x-ms-version-id"); + + private static final HttpHeaderName X_MS_ENCRYPTION_KEY_SHA256 + = HttpHeaderName.fromString("x-ms-encryption-key-sha256"); + + private static final HttpHeaderName X_MS_REQUEST_SERVER_ENCRYPTED + = HttpHeaderName.fromString("x-ms-request-server-encrypted"); + + private static final HttpHeaderName X_MS_ENCRYPTION_SCOPE = HttpHeaderName.fromString("x-ms-encryption-scope"); + + // HttpHeaders containing the raw property values. + /** + * Creates an instance of BlobsSetMetadataHeaders class. + * + * @param rawHeaders The raw HttpHeaders that will be used to create the property values. + */ + public BlobsSetMetadataHeaders(HttpHeaders rawHeaders) { + this.xMsVersion = rawHeaders.getValue(X_MS_VERSION); + this.eTag = rawHeaders.getValue(HttpHeaderName.ETAG); + String lastModified = rawHeaders.getValue(HttpHeaderName.LAST_MODIFIED); + if (lastModified != null) { + this.lastModified = new DateTimeRfc1123(lastModified); + } + this.xMsVersionId = rawHeaders.getValue(X_MS_VERSION_ID); + this.xMsEncryptionKeySha256 = rawHeaders.getValue(X_MS_ENCRYPTION_KEY_SHA256); + this.xMsRequestId = rawHeaders.getValue(HttpHeaderName.fromString("x-ms-request-id")); + String xMsRequestServerEncrypted = rawHeaders.getValue(X_MS_REQUEST_SERVER_ENCRYPTED); + if (xMsRequestServerEncrypted != null) { + this.xMsRequestServerEncrypted = Boolean.parseBoolean(xMsRequestServerEncrypted); + } + this.xMsClientRequestId = rawHeaders.getValue(HttpHeaderName.fromString("x-ms-client-request-id")); + String date = rawHeaders.getValue(HttpHeaderName.DATE); + if (date != null) { + this.date = new DateTimeRfc1123(date); + } + this.xMsEncryptionScope = rawHeaders.getValue(X_MS_ENCRYPTION_SCOPE); + } + + /** + * 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 BlobsSetMetadataHeaders object itself. + */ + public BlobsSetMetadataHeaders 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 BlobsSetMetadataHeaders object itself. + */ + public BlobsSetMetadataHeaders 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 BlobsSetMetadataHeaders object itself. + */ + public BlobsSetMetadataHeaders setLastModified(OffsetDateTime lastModified) { + if (lastModified == null) { + this.lastModified = null; + } else { + this.lastModified = new DateTimeRfc1123(lastModified); + } + return this; + } + + /** + * Get the xMsVersionId property: The x-ms-version-id property. + * + * @return the xMsVersionId value. + */ + 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. + */ + public BlobsSetMetadataHeaders setXMsVersionId(String xMsVersionId) { + this.xMsVersionId = xMsVersionId; + return this; + } + + /** + * Get the xMsEncryptionKeySha256 property: The x-ms-encryption-key-sha256 property. + * + * @return the xMsEncryptionKeySha256 value. + */ + 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 BlobsSetMetadataHeaders object itself. + */ + public BlobsSetMetadataHeaders setXMsEncryptionKeySha256(String xMsEncryptionKeySha256) { + this.xMsEncryptionKeySha256 = xMsEncryptionKeySha256; + 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 BlobsSetMetadataHeaders object itself. + */ + public BlobsSetMetadataHeaders setXMsRequestId(String xMsRequestId) { + this.xMsRequestId = xMsRequestId; + return this; + } + + /** + * Get the xMsRequestServerEncrypted property: The x-ms-request-server-encrypted property. + * + * @return the xMsRequestServerEncrypted value. + */ + 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. + */ + public BlobsSetMetadataHeaders setXMsRequestServerEncrypted(Boolean xMsRequestServerEncrypted) { + this.xMsRequestServerEncrypted = xMsRequestServerEncrypted; + 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 BlobsSetMetadataHeaders object itself. + */ + public BlobsSetMetadataHeaders setXMsClientRequestId(String xMsClientRequestId) { + this.xMsClientRequestId = xMsClientRequestId; + return this; + } + + /** + * Get the date property: The Date property. + * + * @return the date value. + */ + 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 BlobsSetMetadataHeaders object itself. + */ + public BlobsSetMetadataHeaders setDate(OffsetDateTime date) { + if (date == null) { + this.date = null; + } else { + this.date = new DateTimeRfc1123(date); + } + return this; + } + + /** + * Get the xMsEncryptionScope property: The x-ms-encryption-scope property. + * + * @return the xMsEncryptionScope value. + */ + 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 BlobsSetMetadataHeaders object itself. + */ + public BlobsSetMetadataHeaders setXMsEncryptionScope(String xMsEncryptionScope) { + this.xMsEncryptionScope = xMsEncryptionScope; + return this; + } +} diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlobsSetTagsHeaders.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlobsSetTagsHeaders.java new file mode 100644 index 000000000000..781446fbf7d4 --- /dev/null +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlobsSetTagsHeaders.java @@ -0,0 +1,143 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.storage.blob.models; + +import com.azure.core.v2.annotation.Fluent; +import io.clientcore.core.http.models.DateTimeRfc1123; +import io.clientcore.core.http.models.HttpHeaderName; +import io.clientcore.core.http.models.HttpHeaders; + +import java.time.OffsetDateTime; + +/** + * The BlobsSetTagsHeaders model. + */ +@Fluent +public final class BlobsSetTagsHeaders { + /* + * The x-ms-version property. + */ + private String xMsVersion; + + /* + * The x-ms-request-id property. + */ + private String xMsRequestId; + + /* + * The x-ms-client-request-id property. + */ + private String xMsClientRequestId; + + /* + * The Date property. + */ + 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 BlobsSetTagsHeaders class. + * + * @param rawHeaders The raw HttpHeaders that will be used to create the property values. + */ + public BlobsSetTagsHeaders(HttpHeaders rawHeaders) { + this.xMsVersion = rawHeaders.getValue(X_MS_VERSION); + this.xMsRequestId = rawHeaders.getValue(HttpHeaderName.fromString("x-ms-request-id")); + this.xMsClientRequestId = rawHeaders.getValue(HttpHeaderName.fromString("x-ms-client-request-id")); + String date = rawHeaders.getValue(HttpHeaderName.DATE); + if (date != null) { + this.date = new DateTimeRfc1123(date); + } + } + + /** + * 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 BlobsSetTagsHeaders object itself. + */ + public BlobsSetTagsHeaders setXMsVersion(String xMsVersion) { + this.xMsVersion = xMsVersion; + 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 BlobsSetTagsHeaders object itself. + */ + public BlobsSetTagsHeaders 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 BlobsSetTagsHeaders object itself. + */ + public BlobsSetTagsHeaders setXMsClientRequestId(String xMsClientRequestId) { + this.xMsClientRequestId = xMsClientRequestId; + return this; + } + + /** + * Get the date property: The Date property. + * + * @return the date value. + */ + 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 BlobsSetTagsHeaders object itself. + */ + public BlobsSetTagsHeaders 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-v2/src/main/java/com/azure/storage/blob/models/BlobsSetTierHeaders.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlobsSetTierHeaders.java new file mode 100644 index 000000000000..9d7a12bc75f1 --- /dev/null +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlobsSetTierHeaders.java @@ -0,0 +1,104 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.storage.blob.models; + +import com.azure.core.v2.annotation.Fluent; +import io.clientcore.core.http.models.HttpHeaderName; +import io.clientcore.core.http.models.HttpHeaders; + +/** + * The BlobsSetTierHeaders model. + */ +@Fluent +public final class BlobsSetTierHeaders { + /* + * The x-ms-version property. + */ + private String xMsVersion; + + /* + * The x-ms-request-id property. + */ + private String xMsRequestId; + + /* + * The x-ms-client-request-id property. + */ + private String xMsClientRequestId; + + private static final HttpHeaderName X_MS_VERSION = HttpHeaderName.fromString("x-ms-version"); + + // HttpHeaders containing the raw property values. + /** + * Creates an instance of BlobsSetTierHeaders class. + * + * @param rawHeaders The raw HttpHeaders that will be used to create the property values. + */ + public BlobsSetTierHeaders(HttpHeaders rawHeaders) { + this.xMsVersion = rawHeaders.getValue(X_MS_VERSION); + this.xMsRequestId = rawHeaders.getValue(HttpHeaderName.fromString("x-ms-request-id")); + this.xMsClientRequestId = rawHeaders.getValue(HttpHeaderName.fromString("x-ms-client-request-id")); + } + + /** + * 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 BlobsSetTierHeaders object itself. + */ + public BlobsSetTierHeaders setXMsVersion(String xMsVersion) { + this.xMsVersion = xMsVersion; + 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 BlobsSetTierHeaders object itself. + */ + public BlobsSetTierHeaders 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 BlobsSetTierHeaders object itself. + */ + public BlobsSetTierHeaders setXMsClientRequestId(String xMsClientRequestId) { + this.xMsClientRequestId = xMsClientRequestId; + return this; + } +} diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlobsStartCopyFromURLHeaders.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlobsStartCopyFromURLHeaders.java new file mode 100644 index 000000000000..983b58bda06e --- /dev/null +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlobsStartCopyFromURLHeaders.java @@ -0,0 +1,292 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.storage.blob.models; + +import com.azure.core.v2.annotation.Fluent; +import io.clientcore.core.http.models.DateTimeRfc1123; +import io.clientcore.core.http.models.HttpHeaderName; +import io.clientcore.core.http.models.HttpHeaders; + +import java.time.OffsetDateTime; + +/** + * The BlobsStartCopyFromURLHeaders model. + */ +@Fluent +public final class BlobsStartCopyFromURLHeaders { + /* + * The x-ms-version property. + */ + private String xMsVersion; + + /* + * The x-ms-copy-id property. + */ + private String xMsCopyId; + + /* + * The ETag property. + */ + private String eTag; + + /* + * The Last-Modified property. + */ + private DateTimeRfc1123 lastModified; + + /* + * The x-ms-version-id property. + */ + private String xMsVersionId; + + /* + * The x-ms-copy-status property. + */ + private CopyStatusType xMsCopyStatus; + + /* + * The x-ms-request-id property. + */ + private String xMsRequestId; + + /* + * The x-ms-client-request-id property. + */ + private String xMsClientRequestId; + + /* + * The Date property. + */ + private DateTimeRfc1123 date; + + private static final HttpHeaderName X_MS_VERSION = HttpHeaderName.fromString("x-ms-version"); + + private static final HttpHeaderName X_MS_COPY_ID = HttpHeaderName.fromString("x-ms-copy-id"); + + private static final HttpHeaderName X_MS_VERSION_ID = HttpHeaderName.fromString("x-ms-version-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.xMsVersion = rawHeaders.getValue(X_MS_VERSION); + this.xMsCopyId = rawHeaders.getValue(X_MS_COPY_ID); + this.eTag = rawHeaders.getValue(HttpHeaderName.ETAG); + String lastModified = rawHeaders.getValue(HttpHeaderName.LAST_MODIFIED); + if (lastModified != null) { + this.lastModified = new DateTimeRfc1123(lastModified); + } + this.xMsVersionId = rawHeaders.getValue(X_MS_VERSION_ID); + String xMsCopyStatus = rawHeaders.getValue(X_MS_COPY_STATUS); + if (xMsCopyStatus != null) { + this.xMsCopyStatus = CopyStatusType.fromString(xMsCopyStatus); + } + this.xMsRequestId = rawHeaders.getValue(HttpHeaderName.fromString("x-ms-request-id")); + this.xMsClientRequestId = rawHeaders.getValue(HttpHeaderName.fromString("x-ms-client-request-id")); + String date = rawHeaders.getValue(HttpHeaderName.DATE); + if (date != null) { + this.date = new DateTimeRfc1123(date); + } + } + + /** + * 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 BlobsStartCopyFromURLHeaders object itself. + */ + public BlobsStartCopyFromURLHeaders setXMsVersion(String xMsVersion) { + this.xMsVersion = xMsVersion; + return this; + } + + /** + * Get the xMsCopyId property: The x-ms-copy-id property. + * + * @return the xMsCopyId value. + */ + 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. + */ + public BlobsStartCopyFromURLHeaders setXMsCopyId(String xMsCopyId) { + this.xMsCopyId = xMsCopyId; + 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 BlobsStartCopyFromURLHeaders object itself. + */ + public BlobsStartCopyFromURLHeaders 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 BlobsStartCopyFromURLHeaders object itself. + */ + public BlobsStartCopyFromURLHeaders setLastModified(OffsetDateTime lastModified) { + if (lastModified == null) { + this.lastModified = null; + } else { + this.lastModified = new DateTimeRfc1123(lastModified); + } + return this; + } + + /** + * Get the xMsVersionId property: The x-ms-version-id property. + * + * @return the xMsVersionId value. + */ + 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. + */ + public BlobsStartCopyFromURLHeaders setXMsVersionId(String xMsVersionId) { + this.xMsVersionId = xMsVersionId; + return this; + } + + /** + * Get the xMsCopyStatus property: The x-ms-copy-status property. + * + * @return the xMsCopyStatus value. + */ + 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. + */ + public BlobsStartCopyFromURLHeaders setXMsCopyStatus(CopyStatusType xMsCopyStatus) { + this.xMsCopyStatus = xMsCopyStatus; + 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 BlobsStartCopyFromURLHeaders object itself. + */ + public BlobsStartCopyFromURLHeaders 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 BlobsStartCopyFromURLHeaders object itself. + */ + public BlobsStartCopyFromURLHeaders setXMsClientRequestId(String xMsClientRequestId) { + this.xMsClientRequestId = xMsClientRequestId; + return this; + } + + /** + * Get the date property: The Date property. + * + * @return the date value. + */ + 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. + */ + public BlobsStartCopyFromURLHeaders 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-v2/src/main/java/com/azure/storage/blob/models/BlobsUndeleteHeaders.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlobsUndeleteHeaders.java new file mode 100644 index 000000000000..3a9604daa9a3 --- /dev/null +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlobsUndeleteHeaders.java @@ -0,0 +1,143 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.storage.blob.models; + +import com.azure.core.v2.annotation.Fluent; +import io.clientcore.core.http.models.DateTimeRfc1123; +import io.clientcore.core.http.models.HttpHeaderName; +import io.clientcore.core.http.models.HttpHeaders; + +import java.time.OffsetDateTime; + +/** + * The BlobsUndeleteHeaders model. + */ +@Fluent +public final class BlobsUndeleteHeaders { + /* + * The x-ms-version property. + */ + private String xMsVersion; + + /* + * The x-ms-request-id property. + */ + private String xMsRequestId; + + /* + * The x-ms-client-request-id property. + */ + private String xMsClientRequestId; + + /* + * The Date property. + */ + 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 BlobsUndeleteHeaders class. + * + * @param rawHeaders The raw HttpHeaders that will be used to create the property values. + */ + public BlobsUndeleteHeaders(HttpHeaders rawHeaders) { + this.xMsVersion = rawHeaders.getValue(X_MS_VERSION); + this.xMsRequestId = rawHeaders.getValue(HttpHeaderName.fromString("x-ms-request-id")); + this.xMsClientRequestId = rawHeaders.getValue(HttpHeaderName.fromString("x-ms-client-request-id")); + String date = rawHeaders.getValue(HttpHeaderName.DATE); + if (date != null) { + this.date = new DateTimeRfc1123(date); + } + } + + /** + * 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 BlobsUndeleteHeaders object itself. + */ + public BlobsUndeleteHeaders setXMsVersion(String xMsVersion) { + this.xMsVersion = xMsVersion; + 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 BlobsUndeleteHeaders object itself. + */ + public BlobsUndeleteHeaders 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 BlobsUndeleteHeaders object itself. + */ + public BlobsUndeleteHeaders setXMsClientRequestId(String xMsClientRequestId) { + this.xMsClientRequestId = xMsClientRequestId; + return this; + } + + /** + * Get the date property: The Date property. + * + * @return the date value. + */ + 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 BlobsUndeleteHeaders object itself. + */ + public BlobsUndeleteHeaders 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-v2/src/main/java/com/azure/storage/blob/models/Block.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/Block.java new file mode 100644 index 000000000000..1d45496ec4ff --- /dev/null +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/Block.java @@ -0,0 +1,160 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.storage.blob.models; + +import com.azure.core.v2.annotation.Fluent; +import com.azure.core.v2.util.CoreUtils; +import io.clientcore.core.serialization.xml.XmlReader; +import io.clientcore.core.serialization.xml.XmlSerializable; +import io.clientcore.core.serialization.xml.XmlToken; +import io.clientcore.core.serialization.xml.XmlWriter; +import javax.xml.namespace.QName; +import javax.xml.stream.XMLStreamException; + +/** + * Represents a single block in a block blob. It describes the block's ID and size. + */ +@Fluent +public final class Block implements XmlSerializable { + /* + * The base64 encoded block ID. + */ + private String name; + + /* + * The block size in bytes. + */ + private long sizeLong; + + /* + * The SizeInt property. + */ + private int sizeInt; + + /** + * Creates an instance of Block class. + */ + public Block() { + } + + /** + * Get the name property: The base64 encoded block ID. + * + * @return the name value. + */ + public String getName() { + return this.name; + } + + /** + * Set the name property: The base64 encoded block ID. + * + * @param name the name value to set. + * @return the Block object itself. + */ + public Block setName(String name) { + this.name = name; + return this; + } + + /** + * Get the sizeLong property: The block size in bytes. + * + * @return the sizeLong value. + */ + public long getSizeLong() { + return this.sizeLong; + } + + /** + * Set the sizeLong property: The block size in bytes. + * + * @param sizeLong the sizeLong value to set. + * @return the Block object itself. + */ + public Block setSizeLong(long sizeLong) { + this.sizeLong = sizeLong; + return this; + } + + /** + * Get the sizeInt property: The SizeInt property. + * + * @return the sizeInt value. + */ + public int getSizeInt() { + return this.sizeInt; + } + + /** + * Set the sizeInt property: The SizeInt property. + * + * @param sizeInt the sizeInt value to set. + * @return the Block object itself. + */ + public Block setSizeInt(int sizeInt) { + this.sizeInt = sizeInt; + 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) ? "Block" : rootElementName; + xmlWriter.writeStartElement(rootElementName); + xmlWriter.writeStringElement("Name", this.name); + xmlWriter.writeLongElement("Size", this.sizeLong); + xmlWriter.writeIntElement("SizeInt", this.sizeInt); + return xmlWriter.writeEndElement(); + } + + /** + * Reads an instance of Block from the XmlReader. + * + * @param xmlReader The XmlReader being read. + * @return An instance of Block if the XmlReader was pointing to an instance of it, or null if it was pointing to + * XML null. + * @throws XMLStreamException If an error occurs while reading the Block. + */ + public static Block fromXml(XmlReader xmlReader) throws XMLStreamException { + return fromXml(xmlReader, null); + } + + /** + * Reads an instance of Block from the XmlReader. + * + * @param xmlReader The XmlReader being read. + * @param rootElementName Optional root element name to override the default defined by the model. Used to support + * cases where the model can deserialize from different root element names. + * @return An instance of Block if the XmlReader was pointing to an instance of it, or null if it was pointing to + * XML null. + * @throws XMLStreamException If an error occurs while reading the Block. + */ + public static Block fromXml(XmlReader xmlReader, String rootElementName) throws XMLStreamException { + String finalRootElementName = CoreUtils.isNullOrEmpty(rootElementName) ? "Block" : rootElementName; + return xmlReader.readObject(finalRootElementName, reader -> { + Block deserializedBlock = new Block(); + while (reader.nextElement() != XmlToken.END_ELEMENT) { + QName elementName = reader.getElementName(); + + if ("Name".equals(elementName.getLocalPart())) { + deserializedBlock.name = reader.getStringElement(); + } else if ("Size".equals(elementName.getLocalPart())) { + deserializedBlock.sizeLong = reader.getLongElement(); + } else if ("SizeInt".equals(elementName.getLocalPart())) { + deserializedBlock.sizeInt = reader.getIntElement(); + } else { + reader.skipElement(); + } + } + + return deserializedBlock; + }); + } +} diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlockBlobsCommitBlockListHeaders.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlockBlobsCommitBlockListHeaders.java new file mode 100644 index 000000000000..f7b73b643ac8 --- /dev/null +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlockBlobsCommitBlockListHeaders.java @@ -0,0 +1,384 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.storage.blob.models; + +import com.azure.core.v2.annotation.Fluent; +import com.azure.core.v2.util.CoreUtils; +import io.clientcore.core.http.models.DateTimeRfc1123; +import io.clientcore.core.http.models.HttpHeaderName; +import io.clientcore.core.http.models.HttpHeaders; + +import java.time.OffsetDateTime; +import java.util.Base64; + +/** + * The BlockBlobsCommitBlockListHeaders model. + */ +@Fluent +public final class BlockBlobsCommitBlockListHeaders { + /* + * The x-ms-version property. + */ + private String xMsVersion; + + /* + * The ETag property. + */ + private String eTag; + + /* + * The x-ms-content-crc64 property. + */ + private byte[] xMsContentCrc64; + + /* + * The Last-Modified property. + */ + private DateTimeRfc1123 lastModified; + + /* + * The x-ms-version-id property. + */ + private String xMsVersionId; + + /* + * The x-ms-encryption-key-sha256 property. + */ + private String xMsEncryptionKeySha256; + + /* + * The x-ms-request-id property. + */ + private String xMsRequestId; + + /* + * The x-ms-request-server-encrypted property. + */ + private Boolean xMsRequestServerEncrypted; + + /* + * The x-ms-client-request-id property. + */ + private String xMsClientRequestId; + + /* + * The Date property. + */ + private DateTimeRfc1123 date; + + /* + * The Content-MD5 property. + */ + private byte[] contentMD5; + + /* + * The x-ms-encryption-scope property. + */ + private String xMsEncryptionScope; + + private static final HttpHeaderName X_MS_VERSION = HttpHeaderName.fromString("x-ms-version"); + + private static final HttpHeaderName X_MS_CONTENT_CRC64 = HttpHeaderName.fromString("x-ms-content-crc64"); + + private static final HttpHeaderName X_MS_VERSION_ID = HttpHeaderName.fromString("x-ms-version-id"); + + private static final HttpHeaderName X_MS_ENCRYPTION_KEY_SHA256 + = HttpHeaderName.fromString("x-ms-encryption-key-sha256"); + + private static final HttpHeaderName X_MS_REQUEST_SERVER_ENCRYPTED + = HttpHeaderName.fromString("x-ms-request-server-encrypted"); + + private static final HttpHeaderName X_MS_ENCRYPTION_SCOPE = HttpHeaderName.fromString("x-ms-encryption-scope"); + + // HttpHeaders containing the raw property values. + /** + * Creates an instance of BlockBlobsCommitBlockListHeaders class. + * + * @param rawHeaders The raw HttpHeaders that will be used to create the property values. + */ + public BlockBlobsCommitBlockListHeaders(HttpHeaders rawHeaders) { + this.xMsVersion = rawHeaders.getValue(X_MS_VERSION); + this.eTag = rawHeaders.getValue(HttpHeaderName.ETAG); + String xMsContentCrc64 = rawHeaders.getValue(X_MS_CONTENT_CRC64); + if (xMsContentCrc64 != null) { + this.xMsContentCrc64 = Base64.getDecoder().decode(xMsContentCrc64); + } + String lastModified = rawHeaders.getValue(HttpHeaderName.LAST_MODIFIED); + if (lastModified != null) { + this.lastModified = new DateTimeRfc1123(lastModified); + } + this.xMsVersionId = rawHeaders.getValue(X_MS_VERSION_ID); + this.xMsEncryptionKeySha256 = rawHeaders.getValue(X_MS_ENCRYPTION_KEY_SHA256); + this.xMsRequestId = rawHeaders.getValue(HttpHeaderName.fromString("x-ms-request-id")); + String xMsRequestServerEncrypted = rawHeaders.getValue(X_MS_REQUEST_SERVER_ENCRYPTED); + if (xMsRequestServerEncrypted != null) { + this.xMsRequestServerEncrypted = Boolean.parseBoolean(xMsRequestServerEncrypted); + } + this.xMsClientRequestId = rawHeaders.getValue(HttpHeaderName.fromString("x-ms-client-request-id")); + String date = rawHeaders.getValue(HttpHeaderName.DATE); + if (date != null) { + this.date = new DateTimeRfc1123(date); + } + String contentMD5 = rawHeaders.getValue(HttpHeaderName.CONTENT_MD5); + if (contentMD5 != null) { + this.contentMD5 = Base64.getDecoder().decode(contentMD5); + } + this.xMsEncryptionScope = rawHeaders.getValue(X_MS_ENCRYPTION_SCOPE); + } + + /** + * 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 BlockBlobsCommitBlockListHeaders object itself. + */ + public BlockBlobsCommitBlockListHeaders 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 BlockBlobsCommitBlockListHeaders object itself. + */ + public BlockBlobsCommitBlockListHeaders setETag(String eTag) { + this.eTag = eTag; + return this; + } + + /** + * Get the xMsContentCrc64 property: The x-ms-content-crc64 property. + * + * @return the xMsContentCrc64 value. + */ + 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. + */ + public BlockBlobsCommitBlockListHeaders setXMsContentCrc64(byte[] xMsContentCrc64) { + this.xMsContentCrc64 = CoreUtils.clone(xMsContentCrc64); + 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 BlockBlobsCommitBlockListHeaders object itself. + */ + public BlockBlobsCommitBlockListHeaders setLastModified(OffsetDateTime lastModified) { + if (lastModified == null) { + this.lastModified = null; + } else { + this.lastModified = new DateTimeRfc1123(lastModified); + } + return this; + } + + /** + * Get the xMsVersionId property: The x-ms-version-id property. + * + * @return the xMsVersionId value. + */ + 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. + */ + public BlockBlobsCommitBlockListHeaders setXMsVersionId(String xMsVersionId) { + this.xMsVersionId = xMsVersionId; + return this; + } + + /** + * Get the xMsEncryptionKeySha256 property: The x-ms-encryption-key-sha256 property. + * + * @return the xMsEncryptionKeySha256 value. + */ + 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 BlockBlobsCommitBlockListHeaders object itself. + */ + public BlockBlobsCommitBlockListHeaders setXMsEncryptionKeySha256(String xMsEncryptionKeySha256) { + this.xMsEncryptionKeySha256 = xMsEncryptionKeySha256; + 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 BlockBlobsCommitBlockListHeaders object itself. + */ + public BlockBlobsCommitBlockListHeaders setXMsRequestId(String xMsRequestId) { + this.xMsRequestId = xMsRequestId; + return this; + } + + /** + * Get the xMsRequestServerEncrypted property: The x-ms-request-server-encrypted property. + * + * @return the xMsRequestServerEncrypted value. + */ + 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. + */ + public BlockBlobsCommitBlockListHeaders setXMsRequestServerEncrypted(Boolean xMsRequestServerEncrypted) { + this.xMsRequestServerEncrypted = xMsRequestServerEncrypted; + 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 BlockBlobsCommitBlockListHeaders object itself. + */ + public BlockBlobsCommitBlockListHeaders setXMsClientRequestId(String xMsClientRequestId) { + this.xMsClientRequestId = xMsClientRequestId; + return this; + } + + /** + * Get the date property: The Date property. + * + * @return the date value. + */ + 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 BlockBlobsCommitBlockListHeaders object itself. + */ + public BlockBlobsCommitBlockListHeaders setDate(OffsetDateTime date) { + if (date == null) { + this.date = null; + } else { + this.date = new DateTimeRfc1123(date); + } + return this; + } + + /** + * Get the contentMD5 property: The Content-MD5 property. + * + * @return the contentMD5 value. + */ + 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. + */ + public BlockBlobsCommitBlockListHeaders setContentMD5(byte[] contentMD5) { + this.contentMD5 = CoreUtils.clone(contentMD5); + return this; + } + + /** + * Get the xMsEncryptionScope property: The x-ms-encryption-scope property. + * + * @return the xMsEncryptionScope value. + */ + 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 BlockBlobsCommitBlockListHeaders object itself. + */ + public BlockBlobsCommitBlockListHeaders setXMsEncryptionScope(String xMsEncryptionScope) { + this.xMsEncryptionScope = xMsEncryptionScope; + return this; + } +} diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlockBlobsGetBlockListHeaders.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlockBlobsGetBlockListHeaders.java new file mode 100644 index 000000000000..a8c7e8b841ee --- /dev/null +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlockBlobsGetBlockListHeaders.java @@ -0,0 +1,263 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.storage.blob.models; + +import com.azure.core.v2.annotation.Fluent; +import io.clientcore.core.http.models.DateTimeRfc1123; +import io.clientcore.core.http.models.HttpHeaderName; +import io.clientcore.core.http.models.HttpHeaders; + +import java.time.OffsetDateTime; + +/** + * The BlockBlobsGetBlockListHeaders model. + */ +@Fluent +public final class BlockBlobsGetBlockListHeaders { + /* + * 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 date; + + /* + * The Content-Type property. + */ + private String contentType; + + private static final HttpHeaderName X_MS_VERSION = HttpHeaderName.fromString("x-ms-version"); + + private static final HttpHeaderName X_MS_BLOB_CONTENT_LENGTH + = HttpHeaderName.fromString("x-ms-blob-content-length"); + + // HttpHeaders containing the raw property values. + /** + * Creates an instance of BlockBlobsGetBlockListHeaders class. + * + * @param rawHeaders The raw HttpHeaders that will be used to create the property values. + */ + public BlockBlobsGetBlockListHeaders(HttpHeaders rawHeaders) { + this.xMsVersion = rawHeaders.getValue(X_MS_VERSION); + String xMsBlobContentLength = rawHeaders.getValue(X_MS_BLOB_CONTENT_LENGTH); + if (xMsBlobContentLength != null) { + this.xMsBlobContentLength = Long.parseLong(xMsBlobContentLength); + } + this.eTag = rawHeaders.getValue(HttpHeaderName.ETAG); + String lastModified = rawHeaders.getValue(HttpHeaderName.LAST_MODIFIED); + if (lastModified != null) { + this.lastModified = new DateTimeRfc1123(lastModified); + } + this.xMsRequestId = rawHeaders.getValue(HttpHeaderName.fromString("x-ms-request-id")); + this.xMsClientRequestId = rawHeaders.getValue(HttpHeaderName.fromString("x-ms-client-request-id")); + String date = rawHeaders.getValue(HttpHeaderName.DATE); + if (date != null) { + this.date = new DateTimeRfc1123(date); + } + this.contentType = rawHeaders.getValue(HttpHeaderName.CONTENT_TYPE); + } + + /** + * 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 BlockBlobsGetBlockListHeaders object itself. + */ + public BlockBlobsGetBlockListHeaders 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 BlockBlobsGetBlockListHeaders object itself. + */ + public BlockBlobsGetBlockListHeaders 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 BlockBlobsGetBlockListHeaders object itself. + */ + public BlockBlobsGetBlockListHeaders 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 BlockBlobsGetBlockListHeaders object itself. + */ + public BlockBlobsGetBlockListHeaders 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 BlockBlobsGetBlockListHeaders object itself. + */ + public BlockBlobsGetBlockListHeaders 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 BlockBlobsGetBlockListHeaders object itself. + */ + public BlockBlobsGetBlockListHeaders setXMsClientRequestId(String xMsClientRequestId) { + this.xMsClientRequestId = xMsClientRequestId; + return this; + } + + /** + * Get the date property: The Date property. + * + * @return the date value. + */ + 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 BlockBlobsGetBlockListHeaders object itself. + */ + public BlockBlobsGetBlockListHeaders setDate(OffsetDateTime date) { + if (date == null) { + this.date = null; + } else { + this.date = new DateTimeRfc1123(date); + } + return this; + } + + /** + * Get the contentType property: The Content-Type property. + * + * @return the contentType value. + */ + 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. + */ + public BlockBlobsGetBlockListHeaders setContentType(String contentType) { + this.contentType = contentType; + return this; + } +} diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlockBlobsPutBlobFromUrlHeaders.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlockBlobsPutBlobFromUrlHeaders.java new file mode 100644 index 000000000000..5e620aded57e --- /dev/null +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlockBlobsPutBlobFromUrlHeaders.java @@ -0,0 +1,353 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.storage.blob.models; + +import com.azure.core.v2.annotation.Fluent; +import com.azure.core.v2.util.CoreUtils; +import io.clientcore.core.http.models.DateTimeRfc1123; +import io.clientcore.core.http.models.HttpHeaderName; +import io.clientcore.core.http.models.HttpHeaders; + +import java.time.OffsetDateTime; +import java.util.Base64; + +/** + * The BlockBlobsPutBlobFromUrlHeaders model. + */ +@Fluent +public final class BlockBlobsPutBlobFromUrlHeaders { + /* + * The x-ms-version property. + */ + private String xMsVersion; + + /* + * The ETag property. + */ + private String eTag; + + /* + * The Last-Modified property. + */ + private DateTimeRfc1123 lastModified; + + /* + * The x-ms-version-id property. + */ + private String xMsVersionId; + + /* + * The x-ms-encryption-key-sha256 property. + */ + private String xMsEncryptionKeySha256; + + /* + * The x-ms-request-id property. + */ + private String xMsRequestId; + + /* + * The x-ms-request-server-encrypted property. + */ + private Boolean xMsRequestServerEncrypted; + + /* + * The x-ms-client-request-id property. + */ + private String xMsClientRequestId; + + /* + * The Date property. + */ + private DateTimeRfc1123 date; + + /* + * The Content-MD5 property. + */ + private byte[] contentMD5; + + /* + * The x-ms-encryption-scope property. + */ + private String xMsEncryptionScope; + + private static final HttpHeaderName X_MS_VERSION = HttpHeaderName.fromString("x-ms-version"); + + private static final HttpHeaderName X_MS_VERSION_ID = HttpHeaderName.fromString("x-ms-version-id"); + + private static final HttpHeaderName X_MS_ENCRYPTION_KEY_SHA256 + = HttpHeaderName.fromString("x-ms-encryption-key-sha256"); + + private static final HttpHeaderName X_MS_REQUEST_SERVER_ENCRYPTED + = HttpHeaderName.fromString("x-ms-request-server-encrypted"); + + private static final HttpHeaderName X_MS_ENCRYPTION_SCOPE = HttpHeaderName.fromString("x-ms-encryption-scope"); + + // HttpHeaders containing the raw property values. + /** + * Creates an instance of BlockBlobsPutBlobFromUrlHeaders class. + * + * @param rawHeaders The raw HttpHeaders that will be used to create the property values. + */ + public BlockBlobsPutBlobFromUrlHeaders(HttpHeaders rawHeaders) { + this.xMsVersion = rawHeaders.getValue(X_MS_VERSION); + this.eTag = rawHeaders.getValue(HttpHeaderName.ETAG); + String lastModified = rawHeaders.getValue(HttpHeaderName.LAST_MODIFIED); + if (lastModified != null) { + this.lastModified = new DateTimeRfc1123(lastModified); + } + this.xMsVersionId = rawHeaders.getValue(X_MS_VERSION_ID); + this.xMsEncryptionKeySha256 = rawHeaders.getValue(X_MS_ENCRYPTION_KEY_SHA256); + this.xMsRequestId = rawHeaders.getValue(HttpHeaderName.fromString("x-ms-request-id")); + String xMsRequestServerEncrypted = rawHeaders.getValue(X_MS_REQUEST_SERVER_ENCRYPTED); + if (xMsRequestServerEncrypted != null) { + this.xMsRequestServerEncrypted = Boolean.parseBoolean(xMsRequestServerEncrypted); + } + this.xMsClientRequestId = rawHeaders.getValue(HttpHeaderName.fromString("x-ms-client-request-id")); + String date = rawHeaders.getValue(HttpHeaderName.DATE); + if (date != null) { + this.date = new DateTimeRfc1123(date); + } + String contentMD5 = rawHeaders.getValue(HttpHeaderName.CONTENT_MD5); + if (contentMD5 != null) { + this.contentMD5 = Base64.getDecoder().decode(contentMD5); + } + this.xMsEncryptionScope = rawHeaders.getValue(X_MS_ENCRYPTION_SCOPE); + } + + /** + * 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 BlockBlobsPutBlobFromUrlHeaders object itself. + */ + public BlockBlobsPutBlobFromUrlHeaders 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 BlockBlobsPutBlobFromUrlHeaders object itself. + */ + public BlockBlobsPutBlobFromUrlHeaders 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 BlockBlobsPutBlobFromUrlHeaders object itself. + */ + public BlockBlobsPutBlobFromUrlHeaders setLastModified(OffsetDateTime lastModified) { + if (lastModified == null) { + this.lastModified = null; + } else { + this.lastModified = new DateTimeRfc1123(lastModified); + } + return this; + } + + /** + * Get the xMsVersionId property: The x-ms-version-id property. + * + * @return the xMsVersionId value. + */ + 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. + */ + public BlockBlobsPutBlobFromUrlHeaders setXMsVersionId(String xMsVersionId) { + this.xMsVersionId = xMsVersionId; + return this; + } + + /** + * Get the xMsEncryptionKeySha256 property: The x-ms-encryption-key-sha256 property. + * + * @return the xMsEncryptionKeySha256 value. + */ + 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. + */ + public BlockBlobsPutBlobFromUrlHeaders setXMsEncryptionKeySha256(String xMsEncryptionKeySha256) { + this.xMsEncryptionKeySha256 = xMsEncryptionKeySha256; + 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 BlockBlobsPutBlobFromUrlHeaders object itself. + */ + public BlockBlobsPutBlobFromUrlHeaders setXMsRequestId(String xMsRequestId) { + this.xMsRequestId = xMsRequestId; + return this; + } + + /** + * Get the xMsRequestServerEncrypted property: The x-ms-request-server-encrypted property. + * + * @return the xMsRequestServerEncrypted value. + */ + 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. + */ + public BlockBlobsPutBlobFromUrlHeaders setXMsRequestServerEncrypted(Boolean xMsRequestServerEncrypted) { + this.xMsRequestServerEncrypted = xMsRequestServerEncrypted; + 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 BlockBlobsPutBlobFromUrlHeaders object itself. + */ + public BlockBlobsPutBlobFromUrlHeaders setXMsClientRequestId(String xMsClientRequestId) { + this.xMsClientRequestId = xMsClientRequestId; + return this; + } + + /** + * Get the date property: The Date property. + * + * @return the date value. + */ + 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. + */ + public BlockBlobsPutBlobFromUrlHeaders setDate(OffsetDateTime date) { + if (date == null) { + this.date = null; + } else { + this.date = new DateTimeRfc1123(date); + } + return this; + } + + /** + * Get the contentMD5 property: The Content-MD5 property. + * + * @return the contentMD5 value. + */ + 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. + */ + public BlockBlobsPutBlobFromUrlHeaders setContentMD5(byte[] contentMD5) { + this.contentMD5 = CoreUtils.clone(contentMD5); + return this; + } + + /** + * Get the xMsEncryptionScope property: The x-ms-encryption-scope property. + * + * @return the xMsEncryptionScope value. + */ + 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. + */ + public BlockBlobsPutBlobFromUrlHeaders setXMsEncryptionScope(String xMsEncryptionScope) { + this.xMsEncryptionScope = xMsEncryptionScope; + return this; + } +} diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlockBlobsStageBlockFromURLHeaders.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlockBlobsStageBlockFromURLHeaders.java new file mode 100644 index 000000000000..ae0893873ee2 --- /dev/null +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlockBlobsStageBlockFromURLHeaders.java @@ -0,0 +1,294 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.storage.blob.models; + +import com.azure.core.v2.annotation.Fluent; +import com.azure.core.v2.util.CoreUtils; +import io.clientcore.core.http.models.DateTimeRfc1123; +import io.clientcore.core.http.models.HttpHeaderName; +import io.clientcore.core.http.models.HttpHeaders; + +import java.time.OffsetDateTime; +import java.util.Base64; + +/** + * The BlockBlobsStageBlockFromURLHeaders model. + */ +@Fluent +public final class BlockBlobsStageBlockFromURLHeaders { + /* + * The x-ms-version property. + */ + private String xMsVersion; + + /* + * The x-ms-content-crc64 property. + */ + private byte[] xMsContentCrc64; + + /* + * The x-ms-encryption-key-sha256 property. + */ + private String xMsEncryptionKeySha256; + + /* + * The x-ms-request-id property. + */ + private String xMsRequestId; + + /* + * The x-ms-request-server-encrypted property. + */ + private Boolean xMsRequestServerEncrypted; + + /* + * The x-ms-client-request-id property. + */ + private String xMsClientRequestId; + + /* + * The Date property. + */ + private DateTimeRfc1123 date; + + /* + * The Content-MD5 property. + */ + private byte[] contentMD5; + + /* + * The x-ms-encryption-scope property. + */ + private String xMsEncryptionScope; + + private static final HttpHeaderName X_MS_VERSION = HttpHeaderName.fromString("x-ms-version"); + + private static final HttpHeaderName X_MS_CONTENT_CRC64 = HttpHeaderName.fromString("x-ms-content-crc64"); + + private static final HttpHeaderName X_MS_ENCRYPTION_KEY_SHA256 + = HttpHeaderName.fromString("x-ms-encryption-key-sha256"); + + private static final HttpHeaderName X_MS_REQUEST_SERVER_ENCRYPTED + = HttpHeaderName.fromString("x-ms-request-server-encrypted"); + + private static final HttpHeaderName X_MS_ENCRYPTION_SCOPE = HttpHeaderName.fromString("x-ms-encryption-scope"); + + // HttpHeaders containing the raw property values. + /** + * Creates an instance of BlockBlobsStageBlockFromURLHeaders class. + * + * @param rawHeaders The raw HttpHeaders that will be used to create the property values. + */ + public BlockBlobsStageBlockFromURLHeaders(HttpHeaders rawHeaders) { + this.xMsVersion = rawHeaders.getValue(X_MS_VERSION); + String xMsContentCrc64 = rawHeaders.getValue(X_MS_CONTENT_CRC64); + if (xMsContentCrc64 != null) { + this.xMsContentCrc64 = Base64.getDecoder().decode(xMsContentCrc64); + } + this.xMsEncryptionKeySha256 = rawHeaders.getValue(X_MS_ENCRYPTION_KEY_SHA256); + this.xMsRequestId = rawHeaders.getValue(HttpHeaderName.fromString("x-ms-request-id")); + String xMsRequestServerEncrypted = rawHeaders.getValue(X_MS_REQUEST_SERVER_ENCRYPTED); + if (xMsRequestServerEncrypted != null) { + this.xMsRequestServerEncrypted = Boolean.parseBoolean(xMsRequestServerEncrypted); + } + this.xMsClientRequestId = rawHeaders.getValue(HttpHeaderName.fromString("x-ms-client-request-id")); + String date = rawHeaders.getValue(HttpHeaderName.DATE); + if (date != null) { + this.date = new DateTimeRfc1123(date); + } + String contentMD5 = rawHeaders.getValue(HttpHeaderName.CONTENT_MD5); + if (contentMD5 != null) { + this.contentMD5 = Base64.getDecoder().decode(contentMD5); + } + this.xMsEncryptionScope = rawHeaders.getValue(X_MS_ENCRYPTION_SCOPE); + } + + /** + * 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 BlockBlobsStageBlockFromURLHeaders object itself. + */ + public BlockBlobsStageBlockFromURLHeaders setXMsVersion(String xMsVersion) { + this.xMsVersion = xMsVersion; + return this; + } + + /** + * Get the xMsContentCrc64 property: The x-ms-content-crc64 property. + * + * @return the xMsContentCrc64 value. + */ + 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. + */ + public BlockBlobsStageBlockFromURLHeaders setXMsContentCrc64(byte[] xMsContentCrc64) { + this.xMsContentCrc64 = CoreUtils.clone(xMsContentCrc64); + return this; + } + + /** + * Get the xMsEncryptionKeySha256 property: The x-ms-encryption-key-sha256 property. + * + * @return the xMsEncryptionKeySha256 value. + */ + 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. + */ + public BlockBlobsStageBlockFromURLHeaders setXMsEncryptionKeySha256(String xMsEncryptionKeySha256) { + this.xMsEncryptionKeySha256 = xMsEncryptionKeySha256; + 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 BlockBlobsStageBlockFromURLHeaders object itself. + */ + public BlockBlobsStageBlockFromURLHeaders setXMsRequestId(String xMsRequestId) { + this.xMsRequestId = xMsRequestId; + return this; + } + + /** + * Get the xMsRequestServerEncrypted property: The x-ms-request-server-encrypted property. + * + * @return the xMsRequestServerEncrypted value. + */ + 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. + */ + public BlockBlobsStageBlockFromURLHeaders setXMsRequestServerEncrypted(Boolean xMsRequestServerEncrypted) { + this.xMsRequestServerEncrypted = xMsRequestServerEncrypted; + 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 BlockBlobsStageBlockFromURLHeaders object itself. + */ + public BlockBlobsStageBlockFromURLHeaders setXMsClientRequestId(String xMsClientRequestId) { + this.xMsClientRequestId = xMsClientRequestId; + return this; + } + + /** + * Get the date property: The Date property. + * + * @return the date value. + */ + 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. + */ + public BlockBlobsStageBlockFromURLHeaders setDate(OffsetDateTime date) { + if (date == null) { + this.date = null; + } else { + this.date = new DateTimeRfc1123(date); + } + return this; + } + + /** + * Get the contentMD5 property: The Content-MD5 property. + * + * @return the contentMD5 value. + */ + 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. + */ + public BlockBlobsStageBlockFromURLHeaders setContentMD5(byte[] contentMD5) { + this.contentMD5 = CoreUtils.clone(contentMD5); + return this; + } + + /** + * Get the xMsEncryptionScope property: The x-ms-encryption-scope property. + * + * @return the xMsEncryptionScope value. + */ + 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. + */ + public BlockBlobsStageBlockFromURLHeaders setXMsEncryptionScope(String xMsEncryptionScope) { + this.xMsEncryptionScope = xMsEncryptionScope; + return this; + } +} diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlockBlobsStageBlockHeaders.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlockBlobsStageBlockHeaders.java new file mode 100644 index 000000000000..0e9f89135f71 --- /dev/null +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlockBlobsStageBlockHeaders.java @@ -0,0 +1,322 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.storage.blob.models; + +import com.azure.core.v2.annotation.Fluent; +import com.azure.core.v2.util.CoreUtils; +import io.clientcore.core.http.models.DateTimeRfc1123; +import io.clientcore.core.http.models.HttpHeaderName; +import io.clientcore.core.http.models.HttpHeaders; + +import java.time.OffsetDateTime; +import java.util.Base64; + +/** + * The BlockBlobsStageBlockHeaders model. + */ +@Fluent +public final class BlockBlobsStageBlockHeaders { + /* + * The x-ms-version property. + */ + private String xMsVersion; + + /* + * The x-ms-content-crc64 property. + */ + private byte[] xMsContentCrc64; + + /* + * The x-ms-encryption-key-sha256 property. + */ + private String xMsEncryptionKeySha256; + + /* + * The x-ms-structured-body property. + */ + private String xMsStructuredBody; + + /* + * The x-ms-request-id property. + */ + private String xMsRequestId; + + /* + * The x-ms-request-server-encrypted property. + */ + private Boolean xMsRequestServerEncrypted; + + /* + * The x-ms-client-request-id property. + */ + private String xMsClientRequestId; + + /* + * The Date property. + */ + private DateTimeRfc1123 date; + + /* + * The Content-MD5 property. + */ + private byte[] contentMD5; + + /* + * The x-ms-encryption-scope property. + */ + private String xMsEncryptionScope; + + private static final HttpHeaderName X_MS_VERSION = HttpHeaderName.fromString("x-ms-version"); + + private static final HttpHeaderName X_MS_CONTENT_CRC64 = HttpHeaderName.fromString("x-ms-content-crc64"); + + private static final HttpHeaderName X_MS_ENCRYPTION_KEY_SHA256 + = HttpHeaderName.fromString("x-ms-encryption-key-sha256"); + + private static final HttpHeaderName X_MS_STRUCTURED_BODY = HttpHeaderName.fromString("x-ms-structured-body"); + + private static final HttpHeaderName X_MS_REQUEST_SERVER_ENCRYPTED + = HttpHeaderName.fromString("x-ms-request-server-encrypted"); + + private static final HttpHeaderName X_MS_ENCRYPTION_SCOPE = HttpHeaderName.fromString("x-ms-encryption-scope"); + + // HttpHeaders containing the raw property values. + /** + * Creates an instance of BlockBlobsStageBlockHeaders class. + * + * @param rawHeaders The raw HttpHeaders that will be used to create the property values. + */ + public BlockBlobsStageBlockHeaders(HttpHeaders rawHeaders) { + this.xMsVersion = rawHeaders.getValue(X_MS_VERSION); + String xMsContentCrc64 = rawHeaders.getValue(X_MS_CONTENT_CRC64); + if (xMsContentCrc64 != null) { + this.xMsContentCrc64 = Base64.getDecoder().decode(xMsContentCrc64); + } + this.xMsEncryptionKeySha256 = rawHeaders.getValue(X_MS_ENCRYPTION_KEY_SHA256); + this.xMsStructuredBody = rawHeaders.getValue(X_MS_STRUCTURED_BODY); + this.xMsRequestId = rawHeaders.getValue(HttpHeaderName.fromString("x-ms-request-id")); + String xMsRequestServerEncrypted = rawHeaders.getValue(X_MS_REQUEST_SERVER_ENCRYPTED); + if (xMsRequestServerEncrypted != null) { + this.xMsRequestServerEncrypted = Boolean.parseBoolean(xMsRequestServerEncrypted); + } + this.xMsClientRequestId = rawHeaders.getValue(HttpHeaderName.fromString("x-ms-client-request-id")); + String date = rawHeaders.getValue(HttpHeaderName.DATE); + if (date != null) { + this.date = new DateTimeRfc1123(date); + } + String contentMD5 = rawHeaders.getValue(HttpHeaderName.CONTENT_MD5); + if (contentMD5 != null) { + this.contentMD5 = Base64.getDecoder().decode(contentMD5); + } + this.xMsEncryptionScope = rawHeaders.getValue(X_MS_ENCRYPTION_SCOPE); + } + + /** + * 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 BlockBlobsStageBlockHeaders object itself. + */ + public BlockBlobsStageBlockHeaders setXMsVersion(String xMsVersion) { + this.xMsVersion = xMsVersion; + return this; + } + + /** + * Get the xMsContentCrc64 property: The x-ms-content-crc64 property. + * + * @return the xMsContentCrc64 value. + */ + 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. + */ + public BlockBlobsStageBlockHeaders setXMsContentCrc64(byte[] xMsContentCrc64) { + this.xMsContentCrc64 = CoreUtils.clone(xMsContentCrc64); + return this; + } + + /** + * Get the xMsEncryptionKeySha256 property: The x-ms-encryption-key-sha256 property. + * + * @return the xMsEncryptionKeySha256 value. + */ + 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. + */ + public BlockBlobsStageBlockHeaders setXMsEncryptionKeySha256(String xMsEncryptionKeySha256) { + this.xMsEncryptionKeySha256 = xMsEncryptionKeySha256; + return this; + } + + /** + * Get the xMsStructuredBody property: The x-ms-structured-body property. + * + * @return the xMsStructuredBody value. + */ + public String getXMsStructuredBody() { + return this.xMsStructuredBody; + } + + /** + * Set the xMsStructuredBody property: The x-ms-structured-body property. + * + * @param xMsStructuredBody the xMsStructuredBody value to set. + * @return the BlockBlobsStageBlockHeaders object itself. + */ + public BlockBlobsStageBlockHeaders setXMsStructuredBody(String xMsStructuredBody) { + this.xMsStructuredBody = xMsStructuredBody; + 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 BlockBlobsStageBlockHeaders object itself. + */ + public BlockBlobsStageBlockHeaders setXMsRequestId(String xMsRequestId) { + this.xMsRequestId = xMsRequestId; + return this; + } + + /** + * Get the xMsRequestServerEncrypted property: The x-ms-request-server-encrypted property. + * + * @return the xMsRequestServerEncrypted value. + */ + 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. + */ + public BlockBlobsStageBlockHeaders setXMsRequestServerEncrypted(Boolean xMsRequestServerEncrypted) { + this.xMsRequestServerEncrypted = xMsRequestServerEncrypted; + 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 BlockBlobsStageBlockHeaders object itself. + */ + public BlockBlobsStageBlockHeaders setXMsClientRequestId(String xMsClientRequestId) { + this.xMsClientRequestId = xMsClientRequestId; + return this; + } + + /** + * Get the date property: The Date property. + * + * @return the date value. + */ + 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 BlockBlobsStageBlockHeaders object itself. + */ + public BlockBlobsStageBlockHeaders setDate(OffsetDateTime date) { + if (date == null) { + this.date = null; + } else { + this.date = new DateTimeRfc1123(date); + } + return this; + } + + /** + * Get the contentMD5 property: The Content-MD5 property. + * + * @return the contentMD5 value. + */ + 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 BlockBlobsStageBlockHeaders object itself. + */ + public BlockBlobsStageBlockHeaders setContentMD5(byte[] contentMD5) { + this.contentMD5 = CoreUtils.clone(contentMD5); + return this; + } + + /** + * Get the xMsEncryptionScope property: The x-ms-encryption-scope property. + * + * @return the xMsEncryptionScope value. + */ + 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 BlockBlobsStageBlockHeaders object itself. + */ + public BlockBlobsStageBlockHeaders setXMsEncryptionScope(String xMsEncryptionScope) { + this.xMsEncryptionScope = xMsEncryptionScope; + return this; + } +} diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlockBlobsUploadHeaders.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlockBlobsUploadHeaders.java new file mode 100644 index 000000000000..70f8bcb510a1 --- /dev/null +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlockBlobsUploadHeaders.java @@ -0,0 +1,381 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.storage.blob.models; + +import com.azure.core.v2.annotation.Fluent; +import com.azure.core.v2.util.CoreUtils; +import io.clientcore.core.http.models.DateTimeRfc1123; +import io.clientcore.core.http.models.HttpHeaderName; +import io.clientcore.core.http.models.HttpHeaders; + +import java.time.OffsetDateTime; +import java.util.Base64; + +/** + * The BlockBlobsUploadHeaders model. + */ +@Fluent +public final class BlockBlobsUploadHeaders { + /* + * The x-ms-version property. + */ + private String xMsVersion; + + /* + * The ETag property. + */ + private String eTag; + + /* + * The Last-Modified property. + */ + private DateTimeRfc1123 lastModified; + + /* + * The x-ms-version-id property. + */ + private String xMsVersionId; + + /* + * The x-ms-encryption-key-sha256 property. + */ + private String xMsEncryptionKeySha256; + + /* + * The x-ms-structured-body property. + */ + private String xMsStructuredBody; + + /* + * The x-ms-request-id property. + */ + private String xMsRequestId; + + /* + * The x-ms-request-server-encrypted property. + */ + private Boolean xMsRequestServerEncrypted; + + /* + * The x-ms-client-request-id property. + */ + private String xMsClientRequestId; + + /* + * The Date property. + */ + private DateTimeRfc1123 date; + + /* + * The Content-MD5 property. + */ + private byte[] contentMD5; + + /* + * The x-ms-encryption-scope property. + */ + private String xMsEncryptionScope; + + private static final HttpHeaderName X_MS_VERSION = HttpHeaderName.fromString("x-ms-version"); + + private static final HttpHeaderName X_MS_VERSION_ID = HttpHeaderName.fromString("x-ms-version-id"); + + private static final HttpHeaderName X_MS_ENCRYPTION_KEY_SHA256 + = HttpHeaderName.fromString("x-ms-encryption-key-sha256"); + + private static final HttpHeaderName X_MS_STRUCTURED_BODY = HttpHeaderName.fromString("x-ms-structured-body"); + + private static final HttpHeaderName X_MS_REQUEST_SERVER_ENCRYPTED + = HttpHeaderName.fromString("x-ms-request-server-encrypted"); + + private static final HttpHeaderName X_MS_ENCRYPTION_SCOPE = HttpHeaderName.fromString("x-ms-encryption-scope"); + + // HttpHeaders containing the raw property values. + /** + * Creates an instance of BlockBlobsUploadHeaders class. + * + * @param rawHeaders The raw HttpHeaders that will be used to create the property values. + */ + public BlockBlobsUploadHeaders(HttpHeaders rawHeaders) { + this.xMsVersion = rawHeaders.getValue(X_MS_VERSION); + this.eTag = rawHeaders.getValue(HttpHeaderName.ETAG); + String lastModified = rawHeaders.getValue(HttpHeaderName.LAST_MODIFIED); + if (lastModified != null) { + this.lastModified = new DateTimeRfc1123(lastModified); + } + this.xMsVersionId = rawHeaders.getValue(X_MS_VERSION_ID); + this.xMsEncryptionKeySha256 = rawHeaders.getValue(X_MS_ENCRYPTION_KEY_SHA256); + this.xMsStructuredBody = rawHeaders.getValue(X_MS_STRUCTURED_BODY); + this.xMsRequestId = rawHeaders.getValue(HttpHeaderName.fromString("x-ms-request-id")); + String xMsRequestServerEncrypted = rawHeaders.getValue(X_MS_REQUEST_SERVER_ENCRYPTED); + if (xMsRequestServerEncrypted != null) { + this.xMsRequestServerEncrypted = Boolean.parseBoolean(xMsRequestServerEncrypted); + } + this.xMsClientRequestId = rawHeaders.getValue(HttpHeaderName.fromString("x-ms-client-request-id")); + String date = rawHeaders.getValue(HttpHeaderName.DATE); + if (date != null) { + this.date = new DateTimeRfc1123(date); + } + String contentMD5 = rawHeaders.getValue(HttpHeaderName.CONTENT_MD5); + if (contentMD5 != null) { + this.contentMD5 = Base64.getDecoder().decode(contentMD5); + } + this.xMsEncryptionScope = rawHeaders.getValue(X_MS_ENCRYPTION_SCOPE); + } + + /** + * 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 BlockBlobsUploadHeaders object itself. + */ + public BlockBlobsUploadHeaders 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 BlockBlobsUploadHeaders object itself. + */ + public BlockBlobsUploadHeaders 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 BlockBlobsUploadHeaders object itself. + */ + public BlockBlobsUploadHeaders setLastModified(OffsetDateTime lastModified) { + if (lastModified == null) { + this.lastModified = null; + } else { + this.lastModified = new DateTimeRfc1123(lastModified); + } + return this; + } + + /** + * Get the xMsVersionId property: The x-ms-version-id property. + * + * @return the xMsVersionId value. + */ + 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 BlockBlobsUploadHeaders object itself. + */ + public BlockBlobsUploadHeaders setXMsVersionId(String xMsVersionId) { + this.xMsVersionId = xMsVersionId; + return this; + } + + /** + * Get the xMsEncryptionKeySha256 property: The x-ms-encryption-key-sha256 property. + * + * @return the xMsEncryptionKeySha256 value. + */ + 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. + */ + public BlockBlobsUploadHeaders setXMsEncryptionKeySha256(String xMsEncryptionKeySha256) { + this.xMsEncryptionKeySha256 = xMsEncryptionKeySha256; + return this; + } + + /** + * Get the xMsStructuredBody property: The x-ms-structured-body property. + * + * @return the xMsStructuredBody value. + */ + public String getXMsStructuredBody() { + return this.xMsStructuredBody; + } + + /** + * Set the xMsStructuredBody property: The x-ms-structured-body property. + * + * @param xMsStructuredBody the xMsStructuredBody value to set. + * @return the BlockBlobsUploadHeaders object itself. + */ + public BlockBlobsUploadHeaders setXMsStructuredBody(String xMsStructuredBody) { + this.xMsStructuredBody = xMsStructuredBody; + 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 BlockBlobsUploadHeaders object itself. + */ + public BlockBlobsUploadHeaders setXMsRequestId(String xMsRequestId) { + this.xMsRequestId = xMsRequestId; + return this; + } + + /** + * Get the xMsRequestServerEncrypted property: The x-ms-request-server-encrypted property. + * + * @return the xMsRequestServerEncrypted value. + */ + 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. + */ + public BlockBlobsUploadHeaders setXMsRequestServerEncrypted(Boolean xMsRequestServerEncrypted) { + this.xMsRequestServerEncrypted = xMsRequestServerEncrypted; + 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 BlockBlobsUploadHeaders object itself. + */ + public BlockBlobsUploadHeaders setXMsClientRequestId(String xMsClientRequestId) { + this.xMsClientRequestId = xMsClientRequestId; + return this; + } + + /** + * Get the date property: The Date property. + * + * @return the date value. + */ + 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 BlockBlobsUploadHeaders object itself. + */ + public BlockBlobsUploadHeaders setDate(OffsetDateTime date) { + if (date == null) { + this.date = null; + } else { + this.date = new DateTimeRfc1123(date); + } + return this; + } + + /** + * Get the contentMD5 property: The Content-MD5 property. + * + * @return the contentMD5 value. + */ + 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. + */ + public BlockBlobsUploadHeaders setContentMD5(byte[] contentMD5) { + this.contentMD5 = CoreUtils.clone(contentMD5); + return this; + } + + /** + * Get the xMsEncryptionScope property: The x-ms-encryption-scope property. + * + * @return the xMsEncryptionScope value. + */ + 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 BlockBlobsUploadHeaders object itself. + */ + public BlockBlobsUploadHeaders setXMsEncryptionScope(String xMsEncryptionScope) { + this.xMsEncryptionScope = xMsEncryptionScope; + return this; + } +} diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlockList.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlockList.java new file mode 100644 index 000000000000..15ffdc2dbdb2 --- /dev/null +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlockList.java @@ -0,0 +1,172 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.storage.blob.models; + +import com.azure.core.v2.annotation.Fluent; +import com.azure.core.v2.util.CoreUtils; +import io.clientcore.core.serialization.xml.XmlReader; +import io.clientcore.core.serialization.xml.XmlSerializable; +import io.clientcore.core.serialization.xml.XmlToken; +import io.clientcore.core.serialization.xml.XmlWriter; +import java.util.ArrayList; +import java.util.List; +import javax.xml.namespace.QName; +import javax.xml.stream.XMLStreamException; + +/** + * The BlockList model. + */ +@Fluent +public final class BlockList implements XmlSerializable { + /* + * The CommittedBlocks property. + */ + private List committedBlocks; + + /* + * The UncommittedBlocks property. + */ + private List uncommittedBlocks; + + /** + * Creates an instance of BlockList class. + */ + public BlockList() { + } + + /** + * Get the committedBlocks property: The CommittedBlocks property. + * + * @return the committedBlocks value. + */ + public List getCommittedBlocks() { + if (this.committedBlocks == null) { + this.committedBlocks = new ArrayList<>(); + } + return this.committedBlocks; + } + + /** + * Set the committedBlocks property: The CommittedBlocks property. + * + * @param committedBlocks the committedBlocks value to set. + * @return the BlockList object itself. + */ + public BlockList setCommittedBlocks(List committedBlocks) { + this.committedBlocks = committedBlocks; + return this; + } + + /** + * Get the uncommittedBlocks property: The UncommittedBlocks property. + * + * @return the uncommittedBlocks value. + */ + public List getUncommittedBlocks() { + if (this.uncommittedBlocks == null) { + this.uncommittedBlocks = new ArrayList<>(); + } + return this.uncommittedBlocks; + } + + /** + * Set the uncommittedBlocks property: The UncommittedBlocks property. + * + * @param uncommittedBlocks the uncommittedBlocks value to set. + * @return the BlockList object itself. + */ + public BlockList setUncommittedBlocks(List uncommittedBlocks) { + this.uncommittedBlocks = uncommittedBlocks; + return this; + } + + @Override + public XmlWriter toXml(XmlWriter xmlWriter) throws XMLStreamException { + return toXml(xmlWriter, null); + } + + @Override + public XmlWriter toXml(XmlWriter xmlWriter, String rootElementName) throws XMLStreamException { + rootElementName = CoreUtils.isNullOrEmpty(rootElementName) ? "BlockList" : rootElementName; + xmlWriter.writeStartElement(rootElementName); + if (this.committedBlocks != null) { + xmlWriter.writeStartElement("CommittedBlocks"); + for (Block element : this.committedBlocks) { + xmlWriter.writeXml(element, "Block"); + } + xmlWriter.writeEndElement(); + } + if (this.uncommittedBlocks != null) { + xmlWriter.writeStartElement("UncommittedBlocks"); + for (Block element : this.uncommittedBlocks) { + xmlWriter.writeXml(element, "Block"); + } + xmlWriter.writeEndElement(); + } + return xmlWriter.writeEndElement(); + } + + /** + * Reads an instance of BlockList from the XmlReader. + * + * @param xmlReader The XmlReader being read. + * @return An instance of BlockList if the XmlReader was pointing to an instance of it, or null if it was pointing + * to XML null. + * @throws XMLStreamException If an error occurs while reading the BlockList. + */ + public static BlockList fromXml(XmlReader xmlReader) throws XMLStreamException { + return fromXml(xmlReader, null); + } + + /** + * Reads an instance of BlockList from the XmlReader. + * + * @param xmlReader The XmlReader being read. + * @param rootElementName Optional root element name to override the default defined by the model. Used to support + * cases where the model can deserialize from different root element names. + * @return An instance of BlockList if the XmlReader was pointing to an instance of it, or null if it was pointing + * to XML null. + * @throws XMLStreamException If an error occurs while reading the BlockList. + */ + public static BlockList fromXml(XmlReader xmlReader, String rootElementName) throws XMLStreamException { + String finalRootElementName = CoreUtils.isNullOrEmpty(rootElementName) ? "BlockList" : rootElementName; + return xmlReader.readObject(finalRootElementName, reader -> { + BlockList deserializedBlockList = new BlockList(); + while (reader.nextElement() != XmlToken.END_ELEMENT) { + QName elementName = reader.getElementName(); + + if ("CommittedBlocks".equals(elementName.getLocalPart())) { + while (reader.nextElement() != XmlToken.END_ELEMENT) { + elementName = reader.getElementName(); + if ("Block".equals(elementName.getLocalPart())) { + if (deserializedBlockList.committedBlocks == null) { + deserializedBlockList.committedBlocks = new ArrayList<>(); + } + deserializedBlockList.committedBlocks.add(Block.fromXml(reader, "Block")); + } else { + reader.skipElement(); + } + } + } else if ("UncommittedBlocks".equals(elementName.getLocalPart())) { + while (reader.nextElement() != XmlToken.END_ELEMENT) { + elementName = reader.getElementName(); + if ("Block".equals(elementName.getLocalPart())) { + if (deserializedBlockList.uncommittedBlocks == null) { + deserializedBlockList.uncommittedBlocks = new ArrayList<>(); + } + deserializedBlockList.uncommittedBlocks.add(Block.fromXml(reader, "Block")); + } else { + reader.skipElement(); + } + } + } else { + reader.skipElement(); + } + } + + return deserializedBlockList; + }); + } +} diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlockListType.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlockListType.java new file mode 100644 index 000000000000..1169afc1805a --- /dev/null +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlockListType.java @@ -0,0 +1,61 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.storage.blob.models; + +/** + * Defines values for BlockListType. + */ +public enum BlockListType { + /** + * Enum value committed. + */ + COMMITTED("committed"), + + /** + * Enum value uncommitted. + */ + UNCOMMITTED("uncommitted"), + + /** + * Enum value all. + */ + ALL("all"); + + /** + * The actual serialized value for a BlockListType instance. + */ + private final String value; + + BlockListType(String value) { + this.value = value; + } + + /** + * Parses a serialized value to a BlockListType instance. + * + * @param value the serialized value to parse. + * @return the parsed BlockListType object, or null if unable to parse. + */ + public static BlockListType fromString(String value) { + if (value == null) { + return null; + } + BlockListType[] items = BlockListType.values(); + for (BlockListType 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-v2/src/main/java/com/azure/storage/blob/models/BlockLookupList.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlockLookupList.java new file mode 100644 index 000000000000..105812f83c1e --- /dev/null +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlockLookupList.java @@ -0,0 +1,174 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.storage.blob.models; + +import com.azure.core.v2.annotation.Fluent; +import com.azure.core.v2.util.CoreUtils; +import io.clientcore.core.serialization.xml.XmlReader; +import io.clientcore.core.serialization.xml.XmlSerializable; +import io.clientcore.core.serialization.xml.XmlToken; +import io.clientcore.core.serialization.xml.XmlWriter; +import java.util.ArrayList; +import java.util.List; +import javax.xml.namespace.QName; +import javax.xml.stream.XMLStreamException; + +/** + * The BlockLookupList model. + */ +@Fluent +public final class BlockLookupList implements XmlSerializable { + /* + * The Committed property. + */ + private List committed = new ArrayList<>(); + + /* + * The Uncommitted property. + */ + private List uncommitted = new ArrayList<>(); + + /* + * The Latest property. + */ + private List latest = new ArrayList<>(); + + /** + * Creates an instance of BlockLookupList class. + */ + public BlockLookupList() { + } + + /** + * Get the committed property: The Committed property. + * + * @return the committed value. + */ + public List getCommitted() { + return this.committed; + } + + /** + * Set the committed property: The Committed property. + * + * @param committed the committed value to set. + * @return the BlockLookupList object itself. + */ + public BlockLookupList setCommitted(List committed) { + this.committed = committed; + return this; + } + + /** + * Get the uncommitted property: The Uncommitted property. + * + * @return the uncommitted value. + */ + public List getUncommitted() { + return this.uncommitted; + } + + /** + * Set the uncommitted property: The Uncommitted property. + * + * @param uncommitted the uncommitted value to set. + * @return the BlockLookupList object itself. + */ + public BlockLookupList setUncommitted(List uncommitted) { + this.uncommitted = uncommitted; + return this; + } + + /** + * Get the latest property: The Latest property. + * + * @return the latest value. + */ + public List getLatest() { + return this.latest; + } + + /** + * Set the latest property: The Latest property. + * + * @param latest the latest value to set. + * @return the BlockLookupList object itself. + */ + public BlockLookupList setLatest(List latest) { + this.latest = latest; + return this; + } + + @Override + public XmlWriter toXml(XmlWriter xmlWriter) throws XMLStreamException { + return toXml(xmlWriter, null); + } + + @Override + public XmlWriter toXml(XmlWriter xmlWriter, String rootElementName) throws XMLStreamException { + rootElementName = CoreUtils.isNullOrEmpty(rootElementName) ? "BlockList" : rootElementName; + xmlWriter.writeStartElement(rootElementName); + if (this.committed != null) { + for (String element : this.committed) { + xmlWriter.writeStringElement("Committed", element); + } + } + if (this.uncommitted != null) { + for (String element : this.uncommitted) { + xmlWriter.writeStringElement("Uncommitted", element); + } + } + if (this.latest != null) { + for (String element : this.latest) { + xmlWriter.writeStringElement("Latest", element); + } + } + return xmlWriter.writeEndElement(); + } + + /** + * Reads an instance of BlockLookupList from the XmlReader. + * + * @param xmlReader The XmlReader being read. + * @return An instance of BlockLookupList if the XmlReader was pointing to an instance of it, or null if it was + * pointing to XML null. + * @throws XMLStreamException If an error occurs while reading the BlockLookupList. + */ + public static BlockLookupList fromXml(XmlReader xmlReader) throws XMLStreamException { + return fromXml(xmlReader, null); + } + + /** + * Reads an instance of BlockLookupList from the XmlReader. + * + * @param xmlReader The XmlReader being read. + * @param rootElementName Optional root element name to override the default defined by the model. Used to support + * cases where the model can deserialize from different root element names. + * @return An instance of BlockLookupList if the XmlReader was pointing to an instance of it, or null if it was + * pointing to XML null. + * @throws XMLStreamException If an error occurs while reading the BlockLookupList. + */ + public static BlockLookupList fromXml(XmlReader xmlReader, String rootElementName) throws XMLStreamException { + String finalRootElementName = CoreUtils.isNullOrEmpty(rootElementName) ? "BlockList" : rootElementName; + return xmlReader.readObject(finalRootElementName, reader -> { + BlockLookupList deserializedBlockLookupList = new BlockLookupList(); + while (reader.nextElement() != XmlToken.END_ELEMENT) { + QName elementName = reader.getElementName(); + + if ("Committed".equals(elementName.getLocalPart())) { + deserializedBlockLookupList.committed.add(reader.getStringElement()); + } else if ("Uncommitted".equals(elementName.getLocalPart())) { + deserializedBlockLookupList.uncommitted.add(reader.getStringElement()); + } else if ("Latest".equals(elementName.getLocalPart())) { + deserializedBlockLookupList.latest.add(reader.getStringElement()); + } else { + reader.skipElement(); + } + } + + return deserializedBlockLookupList; + }); + } +} diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/ClearRange.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/ClearRange.java new file mode 100644 index 000000000000..eac1acbe7cd4 --- /dev/null +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/ClearRange.java @@ -0,0 +1,132 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.storage.blob.models; + +import com.azure.core.v2.annotation.Fluent; +import com.azure.core.v2.util.CoreUtils; +import io.clientcore.core.serialization.xml.XmlReader; +import io.clientcore.core.serialization.xml.XmlSerializable; +import io.clientcore.core.serialization.xml.XmlToken; +import io.clientcore.core.serialization.xml.XmlWriter; +import javax.xml.namespace.QName; +import javax.xml.stream.XMLStreamException; + +/** + * The ClearRange model. + */ +@Fluent +public final class ClearRange implements XmlSerializable { + /* + * The Start property. + */ + private long start; + + /* + * The End property. + */ + private long end; + + /** + * Creates an instance of ClearRange class. + */ + public ClearRange() { + } + + /** + * Get the start property: The Start property. + * + * @return the start value. + */ + public long getStart() { + return this.start; + } + + /** + * Set the start property: The Start property. + * + * @param start the start value to set. + * @return the ClearRange object itself. + */ + public ClearRange setStart(long start) { + this.start = start; + return this; + } + + /** + * Get the end property: The End property. + * + * @return the end value. + */ + public long getEnd() { + return this.end; + } + + /** + * Set the end property: The End property. + * + * @param end the end value to set. + * @return the ClearRange object itself. + */ + public ClearRange setEnd(long end) { + this.end = end; + return this; + } + + @Override + public XmlWriter toXml(XmlWriter xmlWriter) throws XMLStreamException { + return toXml(xmlWriter, null); + } + + @Override + public XmlWriter toXml(XmlWriter xmlWriter, String rootElementName) throws XMLStreamException { + rootElementName = CoreUtils.isNullOrEmpty(rootElementName) ? "ClearRange" : rootElementName; + xmlWriter.writeStartElement(rootElementName); + xmlWriter.writeLongElement("Start", this.start); + xmlWriter.writeLongElement("End", this.end); + return xmlWriter.writeEndElement(); + } + + /** + * Reads an instance of ClearRange from the XmlReader. + * + * @param xmlReader The XmlReader being read. + * @return An instance of ClearRange if the XmlReader was pointing to an instance of it, or null if it was pointing + * to XML null. + * @throws XMLStreamException If an error occurs while reading the ClearRange. + */ + public static ClearRange fromXml(XmlReader xmlReader) throws XMLStreamException { + return fromXml(xmlReader, null); + } + + /** + * Reads an instance of ClearRange from the XmlReader. + * + * @param xmlReader The XmlReader being read. + * @param rootElementName Optional root element name to override the default defined by the model. Used to support + * cases where the model can deserialize from different root element names. + * @return An instance of ClearRange if the XmlReader was pointing to an instance of it, or null if it was pointing + * to XML null. + * @throws XMLStreamException If an error occurs while reading the ClearRange. + */ + public static ClearRange fromXml(XmlReader xmlReader, String rootElementName) throws XMLStreamException { + String finalRootElementName = CoreUtils.isNullOrEmpty(rootElementName) ? "ClearRange" : rootElementName; + return xmlReader.readObject(finalRootElementName, reader -> { + ClearRange deserializedClearRange = new ClearRange(); + while (reader.nextElement() != XmlToken.END_ELEMENT) { + QName elementName = reader.getElementName(); + + if ("Start".equals(elementName.getLocalPart())) { + deserializedClearRange.start = reader.getLongElement(); + } else if ("End".equals(elementName.getLocalPart())) { + deserializedClearRange.end = reader.getLongElement(); + } else { + reader.skipElement(); + } + } + + return deserializedClearRange; + }); + } +} diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/ContainersAcquireLeaseHeaders.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/ContainersAcquireLeaseHeaders.java new file mode 100644 index 000000000000..e80dbc473ac1 --- /dev/null +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/ContainersAcquireLeaseHeaders.java @@ -0,0 +1,233 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.storage.blob.models; + +import com.azure.core.v2.annotation.Fluent; +import io.clientcore.core.http.models.DateTimeRfc1123; +import io.clientcore.core.http.models.HttpHeaderName; +import io.clientcore.core.http.models.HttpHeaders; + +import java.time.OffsetDateTime; + +/** + * The ContainersAcquireLeaseHeaders model. + */ +@Fluent +public final class ContainersAcquireLeaseHeaders { + /* + * The x-ms-version property. + */ + private String xMsVersion; + + /* + * The ETag property. + */ + private String eTag; + + /* + * The x-ms-lease-id property. + */ + private String xMsLeaseId; + + /* + * 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 date; + + private static final HttpHeaderName X_MS_VERSION = HttpHeaderName.fromString("x-ms-version"); + + private static final HttpHeaderName X_MS_LEASE_ID = HttpHeaderName.fromString("x-ms-lease-id"); + + // HttpHeaders containing the raw property values. + /** + * Creates an instance of ContainersAcquireLeaseHeaders class. + * + * @param rawHeaders The raw HttpHeaders that will be used to create the property values. + */ + public ContainersAcquireLeaseHeaders(HttpHeaders rawHeaders) { + this.xMsVersion = rawHeaders.getValue(X_MS_VERSION); + this.eTag = rawHeaders.getValue(HttpHeaderName.ETAG); + this.xMsLeaseId = rawHeaders.getValue(X_MS_LEASE_ID); + String lastModified = rawHeaders.getValue(HttpHeaderName.LAST_MODIFIED); + if (lastModified != null) { + this.lastModified = new DateTimeRfc1123(lastModified); + } + this.xMsRequestId = rawHeaders.getValue(HttpHeaderName.fromString("x-ms-request-id")); + this.xMsClientRequestId = rawHeaders.getValue(HttpHeaderName.fromString("x-ms-client-request-id")); + String date = rawHeaders.getValue(HttpHeaderName.DATE); + if (date != null) { + this.date = new DateTimeRfc1123(date); + } + } + + /** + * 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 ContainersAcquireLeaseHeaders object itself. + */ + public ContainersAcquireLeaseHeaders 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 ContainersAcquireLeaseHeaders object itself. + */ + public ContainersAcquireLeaseHeaders setETag(String eTag) { + this.eTag = eTag; + return this; + } + + /** + * Get the xMsLeaseId property: The x-ms-lease-id property. + * + * @return the xMsLeaseId value. + */ + 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. + */ + public ContainersAcquireLeaseHeaders setXMsLeaseId(String xMsLeaseId) { + this.xMsLeaseId = xMsLeaseId; + 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 ContainersAcquireLeaseHeaders object itself. + */ + public ContainersAcquireLeaseHeaders 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 ContainersAcquireLeaseHeaders object itself. + */ + public ContainersAcquireLeaseHeaders 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 ContainersAcquireLeaseHeaders object itself. + */ + public ContainersAcquireLeaseHeaders setXMsClientRequestId(String xMsClientRequestId) { + this.xMsClientRequestId = xMsClientRequestId; + return this; + } + + /** + * Get the date property: The Date property. + * + * @return the date value. + */ + 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. + */ + public ContainersAcquireLeaseHeaders 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-v2/src/main/java/com/azure/storage/blob/models/ContainersBreakLeaseHeaders.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/ContainersBreakLeaseHeaders.java new file mode 100644 index 000000000000..e4a67b535eb4 --- /dev/null +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/ContainersBreakLeaseHeaders.java @@ -0,0 +1,236 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.storage.blob.models; + +import com.azure.core.v2.annotation.Fluent; +import io.clientcore.core.http.models.DateTimeRfc1123; +import io.clientcore.core.http.models.HttpHeaderName; +import io.clientcore.core.http.models.HttpHeaders; + +import java.time.OffsetDateTime; + +/** + * The ContainersBreakLeaseHeaders model. + */ +@Fluent +public final class ContainersBreakLeaseHeaders { + /* + * The x-ms-version property. + */ + private String xMsVersion; + + /* + * The ETag property. + */ + private String eTag; + + /* + * The x-ms-lease-time property. + */ + private Integer xMsLeaseTime; + + /* + * 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 date; + + private static final HttpHeaderName X_MS_VERSION = HttpHeaderName.fromString("x-ms-version"); + + private static final HttpHeaderName X_MS_LEASE_TIME = HttpHeaderName.fromString("x-ms-lease-time"); + + // HttpHeaders containing the raw property values. + /** + * Creates an instance of ContainersBreakLeaseHeaders class. + * + * @param rawHeaders The raw HttpHeaders that will be used to create the property values. + */ + public ContainersBreakLeaseHeaders(HttpHeaders rawHeaders) { + this.xMsVersion = rawHeaders.getValue(X_MS_VERSION); + this.eTag = rawHeaders.getValue(HttpHeaderName.ETAG); + String xMsLeaseTime = rawHeaders.getValue(X_MS_LEASE_TIME); + if (xMsLeaseTime != null) { + this.xMsLeaseTime = Integer.parseInt(xMsLeaseTime); + } + String lastModified = rawHeaders.getValue(HttpHeaderName.LAST_MODIFIED); + if (lastModified != null) { + this.lastModified = new DateTimeRfc1123(lastModified); + } + this.xMsRequestId = rawHeaders.getValue(HttpHeaderName.fromString("x-ms-request-id")); + this.xMsClientRequestId = rawHeaders.getValue(HttpHeaderName.fromString("x-ms-client-request-id")); + String date = rawHeaders.getValue(HttpHeaderName.DATE); + if (date != null) { + this.date = new DateTimeRfc1123(date); + } + } + + /** + * 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 ContainersBreakLeaseHeaders object itself. + */ + public ContainersBreakLeaseHeaders 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 ContainersBreakLeaseHeaders object itself. + */ + public ContainersBreakLeaseHeaders setETag(String eTag) { + this.eTag = eTag; + return this; + } + + /** + * Get the xMsLeaseTime property: The x-ms-lease-time property. + * + * @return the xMsLeaseTime value. + */ + 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. + */ + public ContainersBreakLeaseHeaders setXMsLeaseTime(Integer xMsLeaseTime) { + this.xMsLeaseTime = xMsLeaseTime; + 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 ContainersBreakLeaseHeaders object itself. + */ + public ContainersBreakLeaseHeaders 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 ContainersBreakLeaseHeaders object itself. + */ + public ContainersBreakLeaseHeaders 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 ContainersBreakLeaseHeaders object itself. + */ + public ContainersBreakLeaseHeaders setXMsClientRequestId(String xMsClientRequestId) { + this.xMsClientRequestId = xMsClientRequestId; + return this; + } + + /** + * Get the date property: The Date property. + * + * @return the date value. + */ + 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 ContainersBreakLeaseHeaders object itself. + */ + public ContainersBreakLeaseHeaders 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-v2/src/main/java/com/azure/storage/blob/models/ContainersChangeLeaseHeaders.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/ContainersChangeLeaseHeaders.java new file mode 100644 index 000000000000..c1c11bb1dc3c --- /dev/null +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/ContainersChangeLeaseHeaders.java @@ -0,0 +1,233 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.storage.blob.models; + +import com.azure.core.v2.annotation.Fluent; +import io.clientcore.core.http.models.DateTimeRfc1123; +import io.clientcore.core.http.models.HttpHeaderName; +import io.clientcore.core.http.models.HttpHeaders; + +import java.time.OffsetDateTime; + +/** + * The ContainersChangeLeaseHeaders model. + */ +@Fluent +public final class ContainersChangeLeaseHeaders { + /* + * The x-ms-version property. + */ + private String xMsVersion; + + /* + * The ETag property. + */ + private String eTag; + + /* + * The x-ms-lease-id property. + */ + private String xMsLeaseId; + + /* + * 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 date; + + private static final HttpHeaderName X_MS_VERSION = HttpHeaderName.fromString("x-ms-version"); + + private static final HttpHeaderName X_MS_LEASE_ID = HttpHeaderName.fromString("x-ms-lease-id"); + + // HttpHeaders containing the raw property values. + /** + * Creates an instance of ContainersChangeLeaseHeaders class. + * + * @param rawHeaders The raw HttpHeaders that will be used to create the property values. + */ + public ContainersChangeLeaseHeaders(HttpHeaders rawHeaders) { + this.xMsVersion = rawHeaders.getValue(X_MS_VERSION); + this.eTag = rawHeaders.getValue(HttpHeaderName.ETAG); + this.xMsLeaseId = rawHeaders.getValue(X_MS_LEASE_ID); + String lastModified = rawHeaders.getValue(HttpHeaderName.LAST_MODIFIED); + if (lastModified != null) { + this.lastModified = new DateTimeRfc1123(lastModified); + } + this.xMsRequestId = rawHeaders.getValue(HttpHeaderName.fromString("x-ms-request-id")); + this.xMsClientRequestId = rawHeaders.getValue(HttpHeaderName.fromString("x-ms-client-request-id")); + String date = rawHeaders.getValue(HttpHeaderName.DATE); + if (date != null) { + this.date = new DateTimeRfc1123(date); + } + } + + /** + * 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 ContainersChangeLeaseHeaders object itself. + */ + public ContainersChangeLeaseHeaders 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 ContainersChangeLeaseHeaders object itself. + */ + public ContainersChangeLeaseHeaders setETag(String eTag) { + this.eTag = eTag; + return this; + } + + /** + * Get the xMsLeaseId property: The x-ms-lease-id property. + * + * @return the xMsLeaseId value. + */ + 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. + */ + public ContainersChangeLeaseHeaders setXMsLeaseId(String xMsLeaseId) { + this.xMsLeaseId = xMsLeaseId; + 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 ContainersChangeLeaseHeaders object itself. + */ + public ContainersChangeLeaseHeaders 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 ContainersChangeLeaseHeaders object itself. + */ + public ContainersChangeLeaseHeaders 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 ContainersChangeLeaseHeaders object itself. + */ + public ContainersChangeLeaseHeaders setXMsClientRequestId(String xMsClientRequestId) { + this.xMsClientRequestId = xMsClientRequestId; + return this; + } + + /** + * Get the date property: The Date property. + * + * @return the date value. + */ + 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. + */ + public ContainersChangeLeaseHeaders 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-v2/src/main/java/com/azure/storage/blob/models/ContainersCreateHeaders.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/ContainersCreateHeaders.java new file mode 100644 index 000000000000..e6a6944727b0 --- /dev/null +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/ContainersCreateHeaders.java @@ -0,0 +1,205 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.storage.blob.models; + +import com.azure.core.v2.annotation.Fluent; +import io.clientcore.core.http.models.DateTimeRfc1123; +import io.clientcore.core.http.models.HttpHeaderName; +import io.clientcore.core.http.models.HttpHeaders; + +import java.time.OffsetDateTime; + +/** + * The ContainersCreateHeaders model. + */ +@Fluent +public final class ContainersCreateHeaders { + /* + * 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 x-ms-client-request-id property. + */ + private String xMsClientRequestId; + + /* + * The Date property. + */ + 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 ContainersCreateHeaders class. + * + * @param rawHeaders The raw HttpHeaders that will be used to create the property values. + */ + public ContainersCreateHeaders(HttpHeaders rawHeaders) { + this.xMsVersion = rawHeaders.getValue(X_MS_VERSION); + this.eTag = rawHeaders.getValue(HttpHeaderName.ETAG); + String lastModified = rawHeaders.getValue(HttpHeaderName.LAST_MODIFIED); + if (lastModified != null) { + this.lastModified = new DateTimeRfc1123(lastModified); + } + this.xMsRequestId = rawHeaders.getValue(HttpHeaderName.fromString("x-ms-request-id")); + this.xMsClientRequestId = rawHeaders.getValue(HttpHeaderName.fromString("x-ms-client-request-id")); + String date = rawHeaders.getValue(HttpHeaderName.DATE); + if (date != null) { + this.date = new DateTimeRfc1123(date); + } + } + + /** + * 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 ContainersCreateHeaders object itself. + */ + public ContainersCreateHeaders 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 ContainersCreateHeaders object itself. + */ + public ContainersCreateHeaders 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 ContainersCreateHeaders object itself. + */ + public ContainersCreateHeaders 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 ContainersCreateHeaders object itself. + */ + public ContainersCreateHeaders 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 ContainersCreateHeaders object itself. + */ + public ContainersCreateHeaders setXMsClientRequestId(String xMsClientRequestId) { + this.xMsClientRequestId = xMsClientRequestId; + return this; + } + + /** + * Get the date property: The Date property. + * + * @return the date value. + */ + 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 ContainersCreateHeaders object itself. + */ + public ContainersCreateHeaders 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-v2/src/main/java/com/azure/storage/blob/models/ContainersDeleteHeaders.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/ContainersDeleteHeaders.java new file mode 100644 index 000000000000..7e8912245a1e --- /dev/null +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/ContainersDeleteHeaders.java @@ -0,0 +1,143 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.storage.blob.models; + +import com.azure.core.v2.annotation.Fluent; +import io.clientcore.core.http.models.DateTimeRfc1123; +import io.clientcore.core.http.models.HttpHeaderName; +import io.clientcore.core.http.models.HttpHeaders; + +import java.time.OffsetDateTime; + +/** + * The ContainersDeleteHeaders model. + */ +@Fluent +public final class ContainersDeleteHeaders { + /* + * The x-ms-version property. + */ + private String xMsVersion; + + /* + * The x-ms-request-id property. + */ + private String xMsRequestId; + + /* + * The x-ms-client-request-id property. + */ + private String xMsClientRequestId; + + /* + * The Date property. + */ + 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 ContainersDeleteHeaders class. + * + * @param rawHeaders The raw HttpHeaders that will be used to create the property values. + */ + public ContainersDeleteHeaders(HttpHeaders rawHeaders) { + this.xMsVersion = rawHeaders.getValue(X_MS_VERSION); + this.xMsRequestId = rawHeaders.getValue(HttpHeaderName.fromString("x-ms-request-id")); + this.xMsClientRequestId = rawHeaders.getValue(HttpHeaderName.fromString("x-ms-client-request-id")); + String date = rawHeaders.getValue(HttpHeaderName.DATE); + if (date != null) { + this.date = new DateTimeRfc1123(date); + } + } + + /** + * 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 ContainersDeleteHeaders object itself. + */ + public ContainersDeleteHeaders setXMsVersion(String xMsVersion) { + this.xMsVersion = xMsVersion; + 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 ContainersDeleteHeaders object itself. + */ + public ContainersDeleteHeaders 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 ContainersDeleteHeaders object itself. + */ + public ContainersDeleteHeaders setXMsClientRequestId(String xMsClientRequestId) { + this.xMsClientRequestId = xMsClientRequestId; + return this; + } + + /** + * Get the date property: The Date property. + * + * @return the date value. + */ + 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 ContainersDeleteHeaders object itself. + */ + public ContainersDeleteHeaders 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-v2/src/main/java/com/azure/storage/blob/models/ContainersFilterBlobsHeaders.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/ContainersFilterBlobsHeaders.java new file mode 100644 index 000000000000..2f6da352533c --- /dev/null +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/ContainersFilterBlobsHeaders.java @@ -0,0 +1,143 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.storage.blob.models; + +import com.azure.core.v2.annotation.Fluent; +import io.clientcore.core.http.models.DateTimeRfc1123; +import io.clientcore.core.http.models.HttpHeaderName; +import io.clientcore.core.http.models.HttpHeaders; + +import java.time.OffsetDateTime; + +/** + * The ContainersFilterBlobsHeaders model. + */ +@Fluent +public final class ContainersFilterBlobsHeaders { + /* + * The x-ms-version property. + */ + private String xMsVersion; + + /* + * The x-ms-request-id property. + */ + private String xMsRequestId; + + /* + * The x-ms-client-request-id property. + */ + private String xMsClientRequestId; + + /* + * The Date property. + */ + 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 ContainersFilterBlobsHeaders class. + * + * @param rawHeaders The raw HttpHeaders that will be used to create the property values. + */ + public ContainersFilterBlobsHeaders(HttpHeaders rawHeaders) { + this.xMsVersion = rawHeaders.getValue(X_MS_VERSION); + this.xMsRequestId = rawHeaders.getValue(HttpHeaderName.fromString("x-ms-request-id")); + this.xMsClientRequestId = rawHeaders.getValue(HttpHeaderName.fromString("x-ms-client-request-id")); + String date = rawHeaders.getValue(HttpHeaderName.DATE); + if (date != null) { + this.date = new DateTimeRfc1123(date); + } + } + + /** + * 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 ContainersFilterBlobsHeaders object itself. + */ + public ContainersFilterBlobsHeaders setXMsVersion(String xMsVersion) { + this.xMsVersion = xMsVersion; + 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 ContainersFilterBlobsHeaders object itself. + */ + public ContainersFilterBlobsHeaders 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 ContainersFilterBlobsHeaders object itself. + */ + public ContainersFilterBlobsHeaders setXMsClientRequestId(String xMsClientRequestId) { + this.xMsClientRequestId = xMsClientRequestId; + return this; + } + + /** + * Get the date property: The Date property. + * + * @return the date value. + */ + 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 ContainersFilterBlobsHeaders object itself. + */ + public ContainersFilterBlobsHeaders 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-v2/src/main/java/com/azure/storage/blob/models/ContainersGetAccessPolicyHeaders.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/ContainersGetAccessPolicyHeaders.java new file mode 100644 index 000000000000..65ed114a47f1 --- /dev/null +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/ContainersGetAccessPolicyHeaders.java @@ -0,0 +1,236 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.storage.blob.models; + +import com.azure.core.v2.annotation.Fluent; +import io.clientcore.core.http.models.DateTimeRfc1123; +import io.clientcore.core.http.models.HttpHeaderName; +import io.clientcore.core.http.models.HttpHeaders; + +import java.time.OffsetDateTime; + +/** + * The ContainersGetAccessPolicyHeaders model. + */ +@Fluent +public final class ContainersGetAccessPolicyHeaders { + /* + * The x-ms-version property. + */ + private String xMsVersion; + + /* + * The ETag property. + */ + private String eTag; + + /* + * The Last-Modified property. + */ + private DateTimeRfc1123 lastModified; + + /* + * The x-ms-blob-public-access property. + */ + private PublicAccessType xMsBlobPublicAccess; + + /* + * The x-ms-request-id property. + */ + private String xMsRequestId; + + /* + * The x-ms-client-request-id property. + */ + private String xMsClientRequestId; + + /* + * The Date property. + */ + private DateTimeRfc1123 date; + + private static final HttpHeaderName X_MS_VERSION = HttpHeaderName.fromString("x-ms-version"); + + private static final HttpHeaderName X_MS_BLOB_PUBLIC_ACCESS = HttpHeaderName.fromString("x-ms-blob-public-access"); + + // HttpHeaders containing the raw property values. + /** + * Creates an instance of ContainersGetAccessPolicyHeaders class. + * + * @param rawHeaders The raw HttpHeaders that will be used to create the property values. + */ + public ContainersGetAccessPolicyHeaders(HttpHeaders rawHeaders) { + this.xMsVersion = rawHeaders.getValue(X_MS_VERSION); + this.eTag = rawHeaders.getValue(HttpHeaderName.ETAG); + String lastModified = rawHeaders.getValue(HttpHeaderName.LAST_MODIFIED); + if (lastModified != null) { + this.lastModified = new DateTimeRfc1123(lastModified); + } + String xMsBlobPublicAccess = rawHeaders.getValue(X_MS_BLOB_PUBLIC_ACCESS); + if (xMsBlobPublicAccess != null) { + this.xMsBlobPublicAccess = PublicAccessType.fromString(xMsBlobPublicAccess); + } + this.xMsRequestId = rawHeaders.getValue(HttpHeaderName.fromString("x-ms-request-id")); + this.xMsClientRequestId = rawHeaders.getValue(HttpHeaderName.fromString("x-ms-client-request-id")); + String date = rawHeaders.getValue(HttpHeaderName.DATE); + if (date != null) { + this.date = new DateTimeRfc1123(date); + } + } + + /** + * 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 ContainersGetAccessPolicyHeaders object itself. + */ + public ContainersGetAccessPolicyHeaders 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 ContainersGetAccessPolicyHeaders object itself. + */ + public ContainersGetAccessPolicyHeaders 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 ContainersGetAccessPolicyHeaders object itself. + */ + public ContainersGetAccessPolicyHeaders setLastModified(OffsetDateTime lastModified) { + if (lastModified == null) { + this.lastModified = null; + } else { + this.lastModified = new DateTimeRfc1123(lastModified); + } + return this; + } + + /** + * Get the xMsBlobPublicAccess property: The x-ms-blob-public-access property. + * + * @return the xMsBlobPublicAccess value. + */ + 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 ContainersGetAccessPolicyHeaders object itself. + */ + public ContainersGetAccessPolicyHeaders setXMsBlobPublicAccess(PublicAccessType xMsBlobPublicAccess) { + this.xMsBlobPublicAccess = xMsBlobPublicAccess; + 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 ContainersGetAccessPolicyHeaders object itself. + */ + public ContainersGetAccessPolicyHeaders 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 ContainersGetAccessPolicyHeaders object itself. + */ + public ContainersGetAccessPolicyHeaders setXMsClientRequestId(String xMsClientRequestId) { + this.xMsClientRequestId = xMsClientRequestId; + return this; + } + + /** + * Get the date property: The Date property. + * + * @return the date value. + */ + 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 ContainersGetAccessPolicyHeaders object itself. + */ + public ContainersGetAccessPolicyHeaders 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-v2/src/main/java/com/azure/storage/blob/models/ContainersGetAccountInfoHeaders.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/ContainersGetAccountInfoHeaders.java new file mode 100644 index 000000000000..7b7e4cfe22c0 --- /dev/null +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/ContainersGetAccountInfoHeaders.java @@ -0,0 +1,236 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.storage.blob.models; + +import com.azure.core.v2.annotation.Fluent; +import io.clientcore.core.http.models.DateTimeRfc1123; +import io.clientcore.core.http.models.HttpHeaderName; +import io.clientcore.core.http.models.HttpHeaders; + +import java.time.OffsetDateTime; + +/** + * The ContainersGetAccountInfoHeaders model. + */ +@Fluent +public final class ContainersGetAccountInfoHeaders { + /* + * The x-ms-version property. + */ + private String xMsVersion; + + /* + * The x-ms-account-kind property. + */ + private AccountKind xMsAccountKind; + + /* + * The x-ms-is-hns-enabled property. + */ + private Boolean xMsIsHnsEnabled; + + /* + * The x-ms-sku-name property. + */ + private SkuName xMsSkuName; + + /* + * The x-ms-request-id property. + */ + private String xMsRequestId; + + /* + * The x-ms-client-request-id property. + */ + private String xMsClientRequestId; + + /* + * The Date property. + */ + private DateTimeRfc1123 date; + + private static final HttpHeaderName X_MS_VERSION = HttpHeaderName.fromString("x-ms-version"); + + private static final HttpHeaderName X_MS_ACCOUNT_KIND = HttpHeaderName.fromString("x-ms-account-kind"); + + private static final HttpHeaderName X_MS_IS_HNS_ENABLED = HttpHeaderName.fromString("x-ms-is-hns-enabled"); + + private static final HttpHeaderName X_MS_SKU_NAME = HttpHeaderName.fromString("x-ms-sku-name"); + + // HttpHeaders containing the raw property values. + /** + * Creates an instance of ContainersGetAccountInfoHeaders class. + * + * @param rawHeaders The raw HttpHeaders that will be used to create the property values. + */ + public ContainersGetAccountInfoHeaders(HttpHeaders rawHeaders) { + this.xMsVersion = rawHeaders.getValue(X_MS_VERSION); + String xMsAccountKind = rawHeaders.getValue(X_MS_ACCOUNT_KIND); + if (xMsAccountKind != null) { + this.xMsAccountKind = AccountKind.fromString(xMsAccountKind); + } + String xMsIsHnsEnabled = rawHeaders.getValue(X_MS_IS_HNS_ENABLED); + if (xMsIsHnsEnabled != null) { + this.xMsIsHnsEnabled = Boolean.parseBoolean(xMsIsHnsEnabled); + } + String xMsSkuName = rawHeaders.getValue(X_MS_SKU_NAME); + if (xMsSkuName != null) { + this.xMsSkuName = SkuName.fromString(xMsSkuName); + } + this.xMsRequestId = rawHeaders.getValue(HttpHeaderName.fromString("x-ms-request-id")); + this.xMsClientRequestId = rawHeaders.getValue(HttpHeaderName.fromString("x-ms-client-request-id")); + String date = rawHeaders.getValue(HttpHeaderName.DATE); + if (date != null) { + this.date = new DateTimeRfc1123(date); + } + } + + /** + * 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 ContainersGetAccountInfoHeaders object itself. + */ + public ContainersGetAccountInfoHeaders setXMsVersion(String xMsVersion) { + this.xMsVersion = xMsVersion; + return this; + } + + /** + * Get the xMsAccountKind property: The x-ms-account-kind property. + * + * @return the xMsAccountKind value. + */ + public AccountKind getXMsAccountKind() { + return this.xMsAccountKind; + } + + /** + * Set the xMsAccountKind property: The x-ms-account-kind property. + * + * @param xMsAccountKind the xMsAccountKind value to set. + * @return the ContainersGetAccountInfoHeaders object itself. + */ + public ContainersGetAccountInfoHeaders setXMsAccountKind(AccountKind xMsAccountKind) { + this.xMsAccountKind = xMsAccountKind; + return this; + } + + /** + * Get the xMsIsHnsEnabled property: The x-ms-is-hns-enabled property. + * + * @return the xMsIsHnsEnabled value. + */ + public Boolean isXMsIsHnsEnabled() { + return this.xMsIsHnsEnabled; + } + + /** + * Set the xMsIsHnsEnabled property: The x-ms-is-hns-enabled property. + * + * @param xMsIsHnsEnabled the xMsIsHnsEnabled value to set. + * @return the ContainersGetAccountInfoHeaders object itself. + */ + public ContainersGetAccountInfoHeaders setXMsIsHnsEnabled(Boolean xMsIsHnsEnabled) { + this.xMsIsHnsEnabled = xMsIsHnsEnabled; + return this; + } + + /** + * Get the xMsSkuName property: The x-ms-sku-name property. + * + * @return the xMsSkuName value. + */ + public SkuName getXMsSkuName() { + 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. + */ + public ContainersGetAccountInfoHeaders setXMsSkuName(SkuName xMsSkuName) { + this.xMsSkuName = xMsSkuName; + 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 ContainersGetAccountInfoHeaders object itself. + */ + public ContainersGetAccountInfoHeaders 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 ContainersGetAccountInfoHeaders object itself. + */ + public ContainersGetAccountInfoHeaders setXMsClientRequestId(String xMsClientRequestId) { + this.xMsClientRequestId = xMsClientRequestId; + return this; + } + + /** + * Get the date property: The Date property. + * + * @return the date value. + */ + 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 ContainersGetAccountInfoHeaders object itself. + */ + public ContainersGetAccountInfoHeaders 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-v2/src/main/java/com/azure/storage/blob/models/ContainersGetPropertiesHeaders.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/ContainersGetPropertiesHeaders.java new file mode 100644 index 000000000000..bb505e8826fa --- /dev/null +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/ContainersGetPropertiesHeaders.java @@ -0,0 +1,528 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.storage.blob.models; + +import com.azure.core.v2.annotation.Fluent; +import io.clientcore.core.http.models.HttpHeader; +import io.clientcore.core.http.models.DateTimeRfc1123; +import io.clientcore.core.http.models.HttpHeaderName; +import io.clientcore.core.http.models.HttpHeaders; + +import java.time.OffsetDateTime; +import java.util.HashMap; +import java.util.Map; + +/** + * The ContainersGetPropertiesHeaders model. + */ +@Fluent +public final class ContainersGetPropertiesHeaders { + /* + * The x-ms-lease-status property. + */ + private LeaseStatusType xMsLeaseStatus; + + /* + * The x-ms-version property. + */ + private String xMsVersion; + + /* + * The x-ms-immutable-storage-with-versioning-enabled property. + */ + private Boolean xMsImmutableStorageWithVersioningEnabled; + + /* + * The x-ms-lease-state property. + */ + private LeaseStateType xMsLeaseState; + + /* + * The x-ms-deny-encryption-scope-override property. + */ + private Boolean xMsDenyEncryptionScopeOverride; + + /* + * The Last-Modified property. + */ + private DateTimeRfc1123 lastModified; + + /* + * The x-ms-meta- property. + */ + private Map xMsMeta; + + /* + * The Date property. + */ + private DateTimeRfc1123 date; + + /* + * The x-ms-has-legal-hold property. + */ + private Boolean xMsHasLegalHold; + + /* + * The x-ms-default-encryption-scope property. + */ + private String xMsDefaultEncryptionScope; + + /* + * The ETag property. + */ + private String eTag; + + /* + * The x-ms-has-immutability-policy property. + */ + private Boolean xMsHasImmutabilityPolicy; + + /* + * The x-ms-lease-duration property. + */ + private LeaseDurationType xMsLeaseDuration; + + /* + * The x-ms-blob-public-access property. + */ + private PublicAccessType xMsBlobPublicAccess; + + /* + * The x-ms-request-id property. + */ + private String xMsRequestId; + + /* + * The x-ms-client-request-id property. + */ + private String xMsClientRequestId; + + private static final HttpHeaderName X_MS_LEASE_STATUS = HttpHeaderName.fromString("x-ms-lease-status"); + + private static final HttpHeaderName X_MS_VERSION = HttpHeaderName.fromString("x-ms-version"); + + private static final HttpHeaderName X_MS_IMMUTABLE_STORAGE_WITH_VERSIONING_ENABLED + = HttpHeaderName.fromString("x-ms-immutable-storage-with-versioning-enabled"); + + private static final HttpHeaderName X_MS_LEASE_STATE = HttpHeaderName.fromString("x-ms-lease-state"); + + private static final HttpHeaderName X_MS_DENY_ENCRYPTION_SCOPE_OVERRIDE + = HttpHeaderName.fromString("x-ms-deny-encryption-scope-override"); + + private static final HttpHeaderName X_MS_HAS_LEGAL_HOLD = HttpHeaderName.fromString("x-ms-has-legal-hold"); + + private static final HttpHeaderName X_MS_DEFAULT_ENCRYPTION_SCOPE + = HttpHeaderName.fromString("x-ms-default-encryption-scope"); + + private static final HttpHeaderName X_MS_HAS_IMMUTABILITY_POLICY + = HttpHeaderName.fromString("x-ms-has-immutability-policy"); + + private static final HttpHeaderName X_MS_LEASE_DURATION = HttpHeaderName.fromString("x-ms-lease-duration"); + + private static final HttpHeaderName X_MS_BLOB_PUBLIC_ACCESS = HttpHeaderName.fromString("x-ms-blob-public-access"); + + // HttpHeaders containing the raw property values. + /** + * Creates an instance of ContainersGetPropertiesHeaders class. + * + * @param rawHeaders The raw HttpHeaders that will be used to create the property values. + */ + public ContainersGetPropertiesHeaders(HttpHeaders rawHeaders) { + String xMsLeaseStatus = rawHeaders.getValue(X_MS_LEASE_STATUS); + if (xMsLeaseStatus != null) { + this.xMsLeaseStatus = LeaseStatusType.fromString(xMsLeaseStatus); + } + this.xMsVersion = rawHeaders.getValue(X_MS_VERSION); + String xMsImmutableStorageWithVersioningEnabled + = rawHeaders.getValue(X_MS_IMMUTABLE_STORAGE_WITH_VERSIONING_ENABLED); + if (xMsImmutableStorageWithVersioningEnabled != null) { + this.xMsImmutableStorageWithVersioningEnabled + = Boolean.parseBoolean(xMsImmutableStorageWithVersioningEnabled); + } + String xMsLeaseState = rawHeaders.getValue(X_MS_LEASE_STATE); + if (xMsLeaseState != null) { + this.xMsLeaseState = LeaseStateType.fromString(xMsLeaseState); + } + String xMsDenyEncryptionScopeOverride = rawHeaders.getValue(X_MS_DENY_ENCRYPTION_SCOPE_OVERRIDE); + if (xMsDenyEncryptionScopeOverride != null) { + this.xMsDenyEncryptionScopeOverride = Boolean.parseBoolean(xMsDenyEncryptionScopeOverride); + } + String lastModified = rawHeaders.getValue(HttpHeaderName.LAST_MODIFIED); + if (lastModified != null) { + this.lastModified = new DateTimeRfc1123(lastModified); + } + String date = rawHeaders.getValue(HttpHeaderName.DATE); + if (date != null) { + this.date = new DateTimeRfc1123(date); + } + String xMsHasLegalHold = rawHeaders.getValue(X_MS_HAS_LEGAL_HOLD); + if (xMsHasLegalHold != null) { + this.xMsHasLegalHold = Boolean.parseBoolean(xMsHasLegalHold); + } + this.xMsDefaultEncryptionScope = rawHeaders.getValue(X_MS_DEFAULT_ENCRYPTION_SCOPE); + this.eTag = rawHeaders.getValue(HttpHeaderName.ETAG); + String xMsHasImmutabilityPolicy = rawHeaders.getValue(X_MS_HAS_IMMUTABILITY_POLICY); + if (xMsHasImmutabilityPolicy != null) { + this.xMsHasImmutabilityPolicy = Boolean.parseBoolean(xMsHasImmutabilityPolicy); + } + String xMsLeaseDuration = rawHeaders.getValue(X_MS_LEASE_DURATION); + if (xMsLeaseDuration != null) { + this.xMsLeaseDuration = LeaseDurationType.fromString(xMsLeaseDuration); + } + String xMsBlobPublicAccess = rawHeaders.getValue(X_MS_BLOB_PUBLIC_ACCESS); + if (xMsBlobPublicAccess != null) { + this.xMsBlobPublicAccess = PublicAccessType.fromString(xMsBlobPublicAccess); + } + this.xMsRequestId = rawHeaders.getValue(HttpHeaderName.fromString("x-ms-request-id")); + this.xMsClientRequestId = rawHeaders.getValue(HttpHeaderName.fromString("x-ms-client-request-id")); + Map xMsMetaHeaderCollection = new HashMap<>(); + + for (HttpHeader header : rawHeaders) { + String headerName = header.getValue(); + if (headerName.startsWith("x-ms-meta-")) { + xMsMetaHeaderCollection.put(headerName.substring(10), header.getValue()); + } + } + + this.xMsMeta = xMsMetaHeaderCollection; + } + + /** + * Get the xMsLeaseStatus property: The x-ms-lease-status property. + * + * @return the xMsLeaseStatus value. + */ + 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 ContainersGetPropertiesHeaders object itself. + */ + public ContainersGetPropertiesHeaders setXMsLeaseStatus(LeaseStatusType xMsLeaseStatus) { + this.xMsLeaseStatus = xMsLeaseStatus; + 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 ContainersGetPropertiesHeaders object itself. + */ + public ContainersGetPropertiesHeaders setXMsVersion(String xMsVersion) { + this.xMsVersion = xMsVersion; + return this; + } + + /** + * Get the xMsImmutableStorageWithVersioningEnabled property: The x-ms-immutable-storage-with-versioning-enabled + * property. + * + * @return the xMsImmutableStorageWithVersioningEnabled value. + */ + public Boolean isXMsImmutableStorageWithVersioningEnabled() { + return this.xMsImmutableStorageWithVersioningEnabled; + } + + /** + * Set the xMsImmutableStorageWithVersioningEnabled property: The x-ms-immutable-storage-with-versioning-enabled + * property. + * + * @param xMsImmutableStorageWithVersioningEnabled the xMsImmutableStorageWithVersioningEnabled value to set. + * @return the ContainersGetPropertiesHeaders object itself. + */ + public ContainersGetPropertiesHeaders + setXMsImmutableStorageWithVersioningEnabled(Boolean xMsImmutableStorageWithVersioningEnabled) { + this.xMsImmutableStorageWithVersioningEnabled = xMsImmutableStorageWithVersioningEnabled; + return this; + } + + /** + * Get the xMsLeaseState property: The x-ms-lease-state property. + * + * @return the xMsLeaseState value. + */ + 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 ContainersGetPropertiesHeaders object itself. + */ + public ContainersGetPropertiesHeaders setXMsLeaseState(LeaseStateType xMsLeaseState) { + this.xMsLeaseState = xMsLeaseState; + return this; + } + + /** + * Get the xMsDenyEncryptionScopeOverride property: The x-ms-deny-encryption-scope-override property. + * + * @return the xMsDenyEncryptionScopeOverride value. + */ + 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. + */ + public ContainersGetPropertiesHeaders setXMsDenyEncryptionScopeOverride(Boolean xMsDenyEncryptionScopeOverride) { + this.xMsDenyEncryptionScopeOverride = xMsDenyEncryptionScopeOverride; + 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 ContainersGetPropertiesHeaders object itself. + */ + public ContainersGetPropertiesHeaders setLastModified(OffsetDateTime lastModified) { + if (lastModified == null) { + this.lastModified = null; + } else { + this.lastModified = new DateTimeRfc1123(lastModified); + } + return this; + } + + /** + * Get the xMsMeta property: The x-ms-meta- property. + * + * @return the xMsMeta value. + */ + 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. + */ + public ContainersGetPropertiesHeaders setXMsMeta(Map xMsMeta) { + this.xMsMeta = xMsMeta; + return this; + } + + /** + * Get the date property: The Date property. + * + * @return the date value. + */ + 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 ContainersGetPropertiesHeaders object itself. + */ + public ContainersGetPropertiesHeaders setDate(OffsetDateTime date) { + if (date == null) { + this.date = null; + } else { + this.date = new DateTimeRfc1123(date); + } + return this; + } + + /** + * Get the xMsHasLegalHold property: The x-ms-has-legal-hold property. + * + * @return the xMsHasLegalHold value. + */ + public Boolean isXMsHasLegalHold() { + return this.xMsHasLegalHold; + } + + /** + * Set the xMsHasLegalHold property: The x-ms-has-legal-hold property. + * + * @param xMsHasLegalHold the xMsHasLegalHold value to set. + * @return the ContainersGetPropertiesHeaders object itself. + */ + public ContainersGetPropertiesHeaders setXMsHasLegalHold(Boolean xMsHasLegalHold) { + this.xMsHasLegalHold = xMsHasLegalHold; + return this; + } + + /** + * Get the xMsDefaultEncryptionScope property: The x-ms-default-encryption-scope property. + * + * @return the xMsDefaultEncryptionScope value. + */ + public String getXMsDefaultEncryptionScope() { + return this.xMsDefaultEncryptionScope; + } + + /** + * Set the xMsDefaultEncryptionScope property: The x-ms-default-encryption-scope property. + * + * @param xMsDefaultEncryptionScope the xMsDefaultEncryptionScope value to set. + * @return the ContainersGetPropertiesHeaders object itself. + */ + public ContainersGetPropertiesHeaders setXMsDefaultEncryptionScope(String xMsDefaultEncryptionScope) { + this.xMsDefaultEncryptionScope = xMsDefaultEncryptionScope; + 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 ContainersGetPropertiesHeaders object itself. + */ + public ContainersGetPropertiesHeaders setETag(String eTag) { + this.eTag = eTag; + return this; + } + + /** + * Get the xMsHasImmutabilityPolicy property: The x-ms-has-immutability-policy property. + * + * @return the xMsHasImmutabilityPolicy value. + */ + 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. + */ + public ContainersGetPropertiesHeaders setXMsHasImmutabilityPolicy(Boolean xMsHasImmutabilityPolicy) { + this.xMsHasImmutabilityPolicy = xMsHasImmutabilityPolicy; + return this; + } + + /** + * Get the xMsLeaseDuration property: The x-ms-lease-duration property. + * + * @return the xMsLeaseDuration value. + */ + 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 ContainersGetPropertiesHeaders object itself. + */ + public ContainersGetPropertiesHeaders setXMsLeaseDuration(LeaseDurationType xMsLeaseDuration) { + this.xMsLeaseDuration = xMsLeaseDuration; + return this; + } + + /** + * Get the xMsBlobPublicAccess property: The x-ms-blob-public-access property. + * + * @return the xMsBlobPublicAccess value. + */ + 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. + */ + public ContainersGetPropertiesHeaders setXMsBlobPublicAccess(PublicAccessType xMsBlobPublicAccess) { + this.xMsBlobPublicAccess = xMsBlobPublicAccess; + 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 ContainersGetPropertiesHeaders object itself. + */ + public ContainersGetPropertiesHeaders 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 ContainersGetPropertiesHeaders object itself. + */ + public ContainersGetPropertiesHeaders setXMsClientRequestId(String xMsClientRequestId) { + this.xMsClientRequestId = xMsClientRequestId; + return this; + } +} diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/ContainersListBlobFlatSegmentHeaders.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/ContainersListBlobFlatSegmentHeaders.java new file mode 100644 index 000000000000..d681b6cd95a1 --- /dev/null +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/ContainersListBlobFlatSegmentHeaders.java @@ -0,0 +1,169 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.storage.blob.models; + +import com.azure.core.v2.annotation.Fluent; +import io.clientcore.core.http.models.DateTimeRfc1123; +import io.clientcore.core.http.models.HttpHeaderName; +import io.clientcore.core.http.models.HttpHeaders; + +import java.time.OffsetDateTime; + +/** + * The ContainersListBlobFlatSegmentHeaders model. + */ +@Fluent +public final class ContainersListBlobFlatSegmentHeaders { + /* + * The x-ms-version property. + */ + private String xMsVersion; + + /* + * The x-ms-request-id property. + */ + private String xMsRequestId; + + /* + * The x-ms-client-request-id property. + */ + private String xMsClientRequestId; + + /* + * The Date property. + */ + private DateTimeRfc1123 date; + + /* + * The Content-Type property. + */ + private String contentType; + + private static final HttpHeaderName X_MS_VERSION = HttpHeaderName.fromString("x-ms-version"); + + // HttpHeaders containing the raw property values. + /** + * Creates an instance of ContainersListBlobFlatSegmentHeaders class. + * + * @param rawHeaders The raw HttpHeaders that will be used to create the property values. + */ + public ContainersListBlobFlatSegmentHeaders(HttpHeaders rawHeaders) { + this.xMsVersion = rawHeaders.getValue(X_MS_VERSION); + this.xMsRequestId = rawHeaders.getValue(HttpHeaderName.fromString("x-ms-request-id")); + this.xMsClientRequestId = rawHeaders.getValue(HttpHeaderName.fromString("x-ms-client-request-id")); + String date = rawHeaders.getValue(HttpHeaderName.DATE); + if (date != null) { + this.date = new DateTimeRfc1123(date); + } + this.contentType = rawHeaders.getValue(HttpHeaderName.CONTENT_TYPE); + } + + /** + * 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 ContainersListBlobFlatSegmentHeaders object itself. + */ + public ContainersListBlobFlatSegmentHeaders setXMsVersion(String xMsVersion) { + this.xMsVersion = xMsVersion; + 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 ContainersListBlobFlatSegmentHeaders object itself. + */ + public ContainersListBlobFlatSegmentHeaders 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 ContainersListBlobFlatSegmentHeaders object itself. + */ + public ContainersListBlobFlatSegmentHeaders setXMsClientRequestId(String xMsClientRequestId) { + this.xMsClientRequestId = xMsClientRequestId; + return this; + } + + /** + * Get the date property: The Date property. + * + * @return the date value. + */ + 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 ContainersListBlobFlatSegmentHeaders object itself. + */ + public ContainersListBlobFlatSegmentHeaders setDate(OffsetDateTime date) { + if (date == null) { + this.date = null; + } else { + this.date = new DateTimeRfc1123(date); + } + return this; + } + + /** + * Get the contentType property: The Content-Type property. + * + * @return the contentType value. + */ + 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. + */ + public ContainersListBlobFlatSegmentHeaders setContentType(String contentType) { + this.contentType = contentType; + return this; + } +} diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/ContainersListBlobHierarchySegmentHeaders.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/ContainersListBlobHierarchySegmentHeaders.java new file mode 100644 index 000000000000..d92a3c819d00 --- /dev/null +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/ContainersListBlobHierarchySegmentHeaders.java @@ -0,0 +1,169 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.storage.blob.models; + +import com.azure.core.v2.annotation.Fluent; +import io.clientcore.core.http.models.DateTimeRfc1123; +import io.clientcore.core.http.models.HttpHeaderName; +import io.clientcore.core.http.models.HttpHeaders; + +import java.time.OffsetDateTime; + +/** + * The ContainersListBlobHierarchySegmentHeaders model. + */ +@Fluent +public final class ContainersListBlobHierarchySegmentHeaders { + /* + * The x-ms-version property. + */ + private String xMsVersion; + + /* + * The x-ms-request-id property. + */ + private String xMsRequestId; + + /* + * The x-ms-client-request-id property. + */ + private String xMsClientRequestId; + + /* + * The Date property. + */ + private DateTimeRfc1123 date; + + /* + * The Content-Type property. + */ + private String contentType; + + private static final HttpHeaderName X_MS_VERSION = HttpHeaderName.fromString("x-ms-version"); + + // HttpHeaders containing the raw property values. + /** + * Creates an instance of ContainersListBlobHierarchySegmentHeaders class. + * + * @param rawHeaders The raw HttpHeaders that will be used to create the property values. + */ + public ContainersListBlobHierarchySegmentHeaders(HttpHeaders rawHeaders) { + this.xMsVersion = rawHeaders.getValue(X_MS_VERSION); + this.xMsRequestId = rawHeaders.getValue(HttpHeaderName.fromString("x-ms-request-id")); + this.xMsClientRequestId = rawHeaders.getValue(HttpHeaderName.fromString("x-ms-client-request-id")); + String date = rawHeaders.getValue(HttpHeaderName.DATE); + if (date != null) { + this.date = new DateTimeRfc1123(date); + } + this.contentType = rawHeaders.getValue(HttpHeaderName.CONTENT_TYPE); + } + + /** + * 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 ContainersListBlobHierarchySegmentHeaders object itself. + */ + public ContainersListBlobHierarchySegmentHeaders setXMsVersion(String xMsVersion) { + this.xMsVersion = xMsVersion; + 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 ContainersListBlobHierarchySegmentHeaders object itself. + */ + public ContainersListBlobHierarchySegmentHeaders 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 ContainersListBlobHierarchySegmentHeaders object itself. + */ + public ContainersListBlobHierarchySegmentHeaders setXMsClientRequestId(String xMsClientRequestId) { + this.xMsClientRequestId = xMsClientRequestId; + return this; + } + + /** + * Get the date property: The Date property. + * + * @return the date value. + */ + 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 ContainersListBlobHierarchySegmentHeaders object itself. + */ + public ContainersListBlobHierarchySegmentHeaders setDate(OffsetDateTime date) { + if (date == null) { + this.date = null; + } else { + this.date = new DateTimeRfc1123(date); + } + return this; + } + + /** + * Get the contentType property: The Content-Type property. + * + * @return the contentType value. + */ + 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. + */ + public ContainersListBlobHierarchySegmentHeaders setContentType(String contentType) { + this.contentType = contentType; + return this; + } +} diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/ContainersReleaseLeaseHeaders.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/ContainersReleaseLeaseHeaders.java new file mode 100644 index 000000000000..eb29922d5c82 --- /dev/null +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/ContainersReleaseLeaseHeaders.java @@ -0,0 +1,205 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.storage.blob.models; + +import com.azure.core.v2.annotation.Fluent; +import io.clientcore.core.http.models.DateTimeRfc1123; +import io.clientcore.core.http.models.HttpHeaderName; +import io.clientcore.core.http.models.HttpHeaders; + +import java.time.OffsetDateTime; + +/** + * The ContainersReleaseLeaseHeaders model. + */ +@Fluent +public final class ContainersReleaseLeaseHeaders { + /* + * 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 x-ms-client-request-id property. + */ + private String xMsClientRequestId; + + /* + * The Date property. + */ + 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 ContainersReleaseLeaseHeaders class. + * + * @param rawHeaders The raw HttpHeaders that will be used to create the property values. + */ + public ContainersReleaseLeaseHeaders(HttpHeaders rawHeaders) { + this.xMsVersion = rawHeaders.getValue(X_MS_VERSION); + this.eTag = rawHeaders.getValue(HttpHeaderName.ETAG); + String lastModified = rawHeaders.getValue(HttpHeaderName.LAST_MODIFIED); + if (lastModified != null) { + this.lastModified = new DateTimeRfc1123(lastModified); + } + this.xMsRequestId = rawHeaders.getValue(HttpHeaderName.fromString("x-ms-request-id")); + this.xMsClientRequestId = rawHeaders.getValue(HttpHeaderName.fromString("x-ms-client-request-id")); + String date = rawHeaders.getValue(HttpHeaderName.DATE); + if (date != null) { + this.date = new DateTimeRfc1123(date); + } + } + + /** + * 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 ContainersReleaseLeaseHeaders object itself. + */ + public ContainersReleaseLeaseHeaders 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 ContainersReleaseLeaseHeaders object itself. + */ + public ContainersReleaseLeaseHeaders 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 ContainersReleaseLeaseHeaders object itself. + */ + public ContainersReleaseLeaseHeaders 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 ContainersReleaseLeaseHeaders object itself. + */ + public ContainersReleaseLeaseHeaders 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 ContainersReleaseLeaseHeaders object itself. + */ + public ContainersReleaseLeaseHeaders setXMsClientRequestId(String xMsClientRequestId) { + this.xMsClientRequestId = xMsClientRequestId; + return this; + } + + /** + * Get the date property: The Date property. + * + * @return the date value. + */ + 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 ContainersReleaseLeaseHeaders object itself. + */ + public ContainersReleaseLeaseHeaders 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-v2/src/main/java/com/azure/storage/blob/models/ContainersRenameHeaders.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/ContainersRenameHeaders.java new file mode 100644 index 000000000000..d6f995646153 --- /dev/null +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/ContainersRenameHeaders.java @@ -0,0 +1,143 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.storage.blob.models; + +import com.azure.core.v2.annotation.Fluent; +import io.clientcore.core.http.models.DateTimeRfc1123; +import io.clientcore.core.http.models.HttpHeaderName; +import io.clientcore.core.http.models.HttpHeaders; + +import java.time.OffsetDateTime; + +/** + * The ContainersRenameHeaders model. + */ +@Fluent +public final class ContainersRenameHeaders { + /* + * The x-ms-version property. + */ + private String xMsVersion; + + /* + * The x-ms-request-id property. + */ + private String xMsRequestId; + + /* + * The x-ms-client-request-id property. + */ + private String xMsClientRequestId; + + /* + * The Date property. + */ + 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 ContainersRenameHeaders class. + * + * @param rawHeaders The raw HttpHeaders that will be used to create the property values. + */ + public ContainersRenameHeaders(HttpHeaders rawHeaders) { + this.xMsVersion = rawHeaders.getValue(X_MS_VERSION); + this.xMsRequestId = rawHeaders.getValue(HttpHeaderName.fromString("x-ms-request-id")); + this.xMsClientRequestId = rawHeaders.getValue(HttpHeaderName.fromString("x-ms-client-request-id")); + String date = rawHeaders.getValue(HttpHeaderName.DATE); + if (date != null) { + this.date = new DateTimeRfc1123(date); + } + } + + /** + * 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 ContainersRenameHeaders object itself. + */ + public ContainersRenameHeaders setXMsVersion(String xMsVersion) { + this.xMsVersion = xMsVersion; + 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 ContainersRenameHeaders object itself. + */ + public ContainersRenameHeaders 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 ContainersRenameHeaders object itself. + */ + public ContainersRenameHeaders setXMsClientRequestId(String xMsClientRequestId) { + this.xMsClientRequestId = xMsClientRequestId; + return this; + } + + /** + * Get the date property: The Date property. + * + * @return the date value. + */ + 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 ContainersRenameHeaders object itself. + */ + public ContainersRenameHeaders 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-v2/src/main/java/com/azure/storage/blob/models/ContainersRenewLeaseHeaders.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/ContainersRenewLeaseHeaders.java new file mode 100644 index 000000000000..c2d38506b410 --- /dev/null +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/ContainersRenewLeaseHeaders.java @@ -0,0 +1,233 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.storage.blob.models; + +import com.azure.core.v2.annotation.Fluent; +import io.clientcore.core.http.models.DateTimeRfc1123; +import io.clientcore.core.http.models.HttpHeaderName; +import io.clientcore.core.http.models.HttpHeaders; + +import java.time.OffsetDateTime; + +/** + * The ContainersRenewLeaseHeaders model. + */ +@Fluent +public final class ContainersRenewLeaseHeaders { + /* + * The x-ms-version property. + */ + private String xMsVersion; + + /* + * The ETag property. + */ + private String eTag; + + /* + * The x-ms-lease-id property. + */ + private String xMsLeaseId; + + /* + * 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 date; + + private static final HttpHeaderName X_MS_VERSION = HttpHeaderName.fromString("x-ms-version"); + + private static final HttpHeaderName X_MS_LEASE_ID = HttpHeaderName.fromString("x-ms-lease-id"); + + // HttpHeaders containing the raw property values. + /** + * Creates an instance of ContainersRenewLeaseHeaders class. + * + * @param rawHeaders The raw HttpHeaders that will be used to create the property values. + */ + public ContainersRenewLeaseHeaders(HttpHeaders rawHeaders) { + this.xMsVersion = rawHeaders.getValue(X_MS_VERSION); + this.eTag = rawHeaders.getValue(HttpHeaderName.ETAG); + this.xMsLeaseId = rawHeaders.getValue(X_MS_LEASE_ID); + String lastModified = rawHeaders.getValue(HttpHeaderName.LAST_MODIFIED); + if (lastModified != null) { + this.lastModified = new DateTimeRfc1123(lastModified); + } + this.xMsRequestId = rawHeaders.getValue(HttpHeaderName.fromString("x-ms-request-id")); + this.xMsClientRequestId = rawHeaders.getValue(HttpHeaderName.fromString("x-ms-client-request-id")); + String date = rawHeaders.getValue(HttpHeaderName.DATE); + if (date != null) { + this.date = new DateTimeRfc1123(date); + } + } + + /** + * 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 ContainersRenewLeaseHeaders object itself. + */ + public ContainersRenewLeaseHeaders 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 ContainersRenewLeaseHeaders object itself. + */ + public ContainersRenewLeaseHeaders setETag(String eTag) { + this.eTag = eTag; + return this; + } + + /** + * Get the xMsLeaseId property: The x-ms-lease-id property. + * + * @return the xMsLeaseId value. + */ + 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. + */ + public ContainersRenewLeaseHeaders setXMsLeaseId(String xMsLeaseId) { + this.xMsLeaseId = xMsLeaseId; + 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 ContainersRenewLeaseHeaders object itself. + */ + public ContainersRenewLeaseHeaders 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 ContainersRenewLeaseHeaders object itself. + */ + public ContainersRenewLeaseHeaders 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 ContainersRenewLeaseHeaders object itself. + */ + public ContainersRenewLeaseHeaders setXMsClientRequestId(String xMsClientRequestId) { + this.xMsClientRequestId = xMsClientRequestId; + return this; + } + + /** + * Get the date property: The Date property. + * + * @return the date value. + */ + 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. + */ + public ContainersRenewLeaseHeaders 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-v2/src/main/java/com/azure/storage/blob/models/ContainersRestoreHeaders.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/ContainersRestoreHeaders.java new file mode 100644 index 000000000000..5d09d4dfa5a1 --- /dev/null +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/ContainersRestoreHeaders.java @@ -0,0 +1,143 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.storage.blob.models; + +import com.azure.core.v2.annotation.Fluent; +import io.clientcore.core.http.models.DateTimeRfc1123; +import io.clientcore.core.http.models.HttpHeaderName; +import io.clientcore.core.http.models.HttpHeaders; + +import java.time.OffsetDateTime; + +/** + * The ContainersRestoreHeaders model. + */ +@Fluent +public final class ContainersRestoreHeaders { + /* + * The x-ms-version property. + */ + private String xMsVersion; + + /* + * The x-ms-request-id property. + */ + private String xMsRequestId; + + /* + * The x-ms-client-request-id property. + */ + private String xMsClientRequestId; + + /* + * The Date property. + */ + 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 ContainersRestoreHeaders class. + * + * @param rawHeaders The raw HttpHeaders that will be used to create the property values. + */ + public ContainersRestoreHeaders(HttpHeaders rawHeaders) { + this.xMsVersion = rawHeaders.getValue(X_MS_VERSION); + this.xMsRequestId = rawHeaders.getValue(HttpHeaderName.fromString("x-ms-request-id")); + this.xMsClientRequestId = rawHeaders.getValue(HttpHeaderName.fromString("x-ms-client-request-id")); + String date = rawHeaders.getValue(HttpHeaderName.DATE); + if (date != null) { + this.date = new DateTimeRfc1123(date); + } + } + + /** + * 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 ContainersRestoreHeaders object itself. + */ + public ContainersRestoreHeaders setXMsVersion(String xMsVersion) { + this.xMsVersion = xMsVersion; + 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 ContainersRestoreHeaders object itself. + */ + public ContainersRestoreHeaders 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 ContainersRestoreHeaders object itself. + */ + public ContainersRestoreHeaders setXMsClientRequestId(String xMsClientRequestId) { + this.xMsClientRequestId = xMsClientRequestId; + return this; + } + + /** + * Get the date property: The Date property. + * + * @return the date value. + */ + 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 ContainersRestoreHeaders object itself. + */ + public ContainersRestoreHeaders 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-v2/src/main/java/com/azure/storage/blob/models/ContainersSetAccessPolicyHeaders.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/ContainersSetAccessPolicyHeaders.java new file mode 100644 index 000000000000..929f6795598d --- /dev/null +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/ContainersSetAccessPolicyHeaders.java @@ -0,0 +1,205 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.storage.blob.models; + +import com.azure.core.v2.annotation.Fluent; +import io.clientcore.core.http.models.DateTimeRfc1123; +import io.clientcore.core.http.models.HttpHeaderName; +import io.clientcore.core.http.models.HttpHeaders; + +import java.time.OffsetDateTime; + +/** + * The ContainersSetAccessPolicyHeaders model. + */ +@Fluent +public final class ContainersSetAccessPolicyHeaders { + /* + * 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 x-ms-client-request-id property. + */ + private String xMsClientRequestId; + + /* + * The Date property. + */ + 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 ContainersSetAccessPolicyHeaders class. + * + * @param rawHeaders The raw HttpHeaders that will be used to create the property values. + */ + public ContainersSetAccessPolicyHeaders(HttpHeaders rawHeaders) { + this.xMsVersion = rawHeaders.getValue(X_MS_VERSION); + this.eTag = rawHeaders.getValue(HttpHeaderName.ETAG); + String lastModified = rawHeaders.getValue(HttpHeaderName.LAST_MODIFIED); + if (lastModified != null) { + this.lastModified = new DateTimeRfc1123(lastModified); + } + this.xMsRequestId = rawHeaders.getValue(HttpHeaderName.fromString("x-ms-request-id")); + this.xMsClientRequestId = rawHeaders.getValue(HttpHeaderName.fromString("x-ms-client-request-id")); + String date = rawHeaders.getValue(HttpHeaderName.DATE); + if (date != null) { + this.date = new DateTimeRfc1123(date); + } + } + + /** + * 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 ContainersSetAccessPolicyHeaders object itself. + */ + public ContainersSetAccessPolicyHeaders 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 ContainersSetAccessPolicyHeaders object itself. + */ + public ContainersSetAccessPolicyHeaders 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 ContainersSetAccessPolicyHeaders object itself. + */ + public ContainersSetAccessPolicyHeaders 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 ContainersSetAccessPolicyHeaders object itself. + */ + public ContainersSetAccessPolicyHeaders 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 ContainersSetAccessPolicyHeaders object itself. + */ + public ContainersSetAccessPolicyHeaders setXMsClientRequestId(String xMsClientRequestId) { + this.xMsClientRequestId = xMsClientRequestId; + return this; + } + + /** + * Get the date property: The Date property. + * + * @return the date value. + */ + 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 ContainersSetAccessPolicyHeaders object itself. + */ + public ContainersSetAccessPolicyHeaders 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-v2/src/main/java/com/azure/storage/blob/models/ContainersSetMetadataHeaders.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/ContainersSetMetadataHeaders.java new file mode 100644 index 000000000000..6742ee4d522e --- /dev/null +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/ContainersSetMetadataHeaders.java @@ -0,0 +1,205 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.storage.blob.models; + +import com.azure.core.v2.annotation.Fluent; +import io.clientcore.core.http.models.DateTimeRfc1123; +import io.clientcore.core.http.models.HttpHeaderName; +import io.clientcore.core.http.models.HttpHeaders; + +import java.time.OffsetDateTime; + +/** + * The ContainersSetMetadataHeaders model. + */ +@Fluent +public final class ContainersSetMetadataHeaders { + /* + * 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 x-ms-client-request-id property. + */ + private String xMsClientRequestId; + + /* + * The Date property. + */ + 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 ContainersSetMetadataHeaders class. + * + * @param rawHeaders The raw HttpHeaders that will be used to create the property values. + */ + public ContainersSetMetadataHeaders(HttpHeaders rawHeaders) { + this.xMsVersion = rawHeaders.getValue(X_MS_VERSION); + this.eTag = rawHeaders.getValue(HttpHeaderName.ETAG); + String lastModified = rawHeaders.getValue(HttpHeaderName.LAST_MODIFIED); + if (lastModified != null) { + this.lastModified = new DateTimeRfc1123(lastModified); + } + this.xMsRequestId = rawHeaders.getValue(HttpHeaderName.fromString("x-ms-request-id")); + this.xMsClientRequestId = rawHeaders.getValue(HttpHeaderName.fromString("x-ms-client-request-id")); + String date = rawHeaders.getValue(HttpHeaderName.DATE); + if (date != null) { + this.date = new DateTimeRfc1123(date); + } + } + + /** + * 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 ContainersSetMetadataHeaders object itself. + */ + public ContainersSetMetadataHeaders 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 ContainersSetMetadataHeaders object itself. + */ + public ContainersSetMetadataHeaders 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 ContainersSetMetadataHeaders object itself. + */ + public ContainersSetMetadataHeaders 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 ContainersSetMetadataHeaders object itself. + */ + public ContainersSetMetadataHeaders 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 ContainersSetMetadataHeaders object itself. + */ + public ContainersSetMetadataHeaders setXMsClientRequestId(String xMsClientRequestId) { + this.xMsClientRequestId = xMsClientRequestId; + return this; + } + + /** + * Get the date property: The Date property. + * + * @return the date value. + */ + 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 ContainersSetMetadataHeaders object itself. + */ + public ContainersSetMetadataHeaders 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-v2/src/main/java/com/azure/storage/blob/models/ContainersSubmitBatchHeaders.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/ContainersSubmitBatchHeaders.java new file mode 100644 index 000000000000..9c8941aebd27 --- /dev/null +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/ContainersSubmitBatchHeaders.java @@ -0,0 +1,104 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.storage.blob.models; + +import com.azure.core.v2.annotation.Fluent; +import io.clientcore.core.http.models.HttpHeaderName; +import io.clientcore.core.http.models.HttpHeaders; + +/** + * The ContainersSubmitBatchHeaders model. + */ +@Fluent +public final class ContainersSubmitBatchHeaders { + /* + * The x-ms-version property. + */ + private String xMsVersion; + + /* + * The x-ms-request-id property. + */ + private String xMsRequestId; + + /* + * The Content-Type property. + */ + private String contentType; + + 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.xMsVersion = rawHeaders.getValue(X_MS_VERSION); + this.xMsRequestId = rawHeaders.getValue(HttpHeaderName.fromString("x-ms-request-id")); + this.contentType = rawHeaders.getValue(HttpHeaderName.CONTENT_TYPE); + } + + /** + * Get the xMsVersion property: The x-ms-version property. + * + * @return the xMsVersion value. + */ + public String getXMsVersion() { + return this.xMsVersion; + } + + /** + * Set the xMsVersion property: The x-ms-version property. + * + * @param xMsVersion the xMsVersion value to set. + * @return the ContainersSubmitBatchHeaders object itself. + */ + public ContainersSubmitBatchHeaders setXMsVersion(String xMsVersion) { + this.xMsVersion = xMsVersion; + 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 ContainersSubmitBatchHeaders object itself. + */ + public ContainersSubmitBatchHeaders setXMsRequestId(String xMsRequestId) { + this.xMsRequestId = xMsRequestId; + return this; + } + + /** + * Get the contentType property: The Content-Type property. + * + * @return the contentType value. + */ + 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. + */ + public ContainersSubmitBatchHeaders setContentType(String contentType) { + this.contentType = contentType; + return this; + } +} diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/CopyStatusType.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/CopyStatusType.java new file mode 100644 index 000000000000..7ff46019be09 --- /dev/null +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/CopyStatusType.java @@ -0,0 +1,66 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.storage.blob.models; + +/** + * Defines values for CopyStatusType. + */ +public enum CopyStatusType { + /** + * Enum value pending. + */ + PENDING("pending"), + + /** + * Enum value success. + */ + SUCCESS("success"), + + /** + * Enum value aborted. + */ + ABORTED("aborted"), + + /** + * Enum value failed. + */ + FAILED("failed"); + + /** + * The actual serialized value for a CopyStatusType instance. + */ + private final String value; + + CopyStatusType(String value) { + this.value = value; + } + + /** + * 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. + */ + public static CopyStatusType fromString(String value) { + if (value == null) { + return null; + } + CopyStatusType[] items = CopyStatusType.values(); + for (CopyStatusType 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-v2/src/main/java/com/azure/storage/blob/models/CpkInfo.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/CpkInfo.java new file mode 100644 index 000000000000..6b7a622ef5c2 --- /dev/null +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/CpkInfo.java @@ -0,0 +1,105 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.storage.blob.models; + +import com.azure.core.v2.annotation.Fluent; + +/** + * Parameter group. + */ +@Fluent +public final class CpkInfo { + /* + * Optional. Specifies the encryption key to use to encrypt the data provided in the request. If not specified, + * encryption is performed with the root account encryption key. For more information, see Encryption at Rest for + * Azure Storage Services. + */ + private String encryptionKey; + + /* + * The SHA-256 hash of the provided encryption key. Must be provided if the x-ms-encryption-key header is provided. + */ + private String encryptionKeySha256; + + /* + * The algorithm used to produce the encryption key hash. Currently, the only accepted value is "AES256". Must be + * provided if the x-ms-encryption-key header is provided. + */ + private EncryptionAlgorithmType encryptionAlgorithm; + + /** + * Creates an instance of CpkInfo class. + */ + public CpkInfo() { + } + + /** + * Get the encryptionKey property: Optional. Specifies the encryption key to use to encrypt the data provided in the + * request. If not specified, encryption is performed with the root account encryption key. For more information, + * see Encryption at Rest for Azure Storage Services. + * + * @return the encryptionKey value. + */ + public String getEncryptionKey() { + return this.encryptionKey; + } + + /** + * Set the encryptionKey property: Optional. Specifies the encryption key to use to encrypt the data provided in the + * request. If not specified, encryption is performed with the root account encryption key. For more information, + * see Encryption at Rest for Azure Storage Services. + * + * @param encryptionKey the encryptionKey value to set. + * @return the CpkInfo object itself. + */ + public CpkInfo setEncryptionKey(String encryptionKey) { + this.encryptionKey = encryptionKey; + return this; + } + + /** + * Get the encryptionKeySha256 property: The SHA-256 hash of the provided encryption key. Must be provided if the + * x-ms-encryption-key header is provided. + * + * @return the encryptionKeySha256 value. + */ + public String getEncryptionKeySha256() { + return this.encryptionKeySha256; + } + + /** + * Set the encryptionKeySha256 property: The SHA-256 hash of the provided encryption key. Must be provided if the + * x-ms-encryption-key header is provided. + * + * @param encryptionKeySha256 the encryptionKeySha256 value to set. + * @return the CpkInfo object itself. + */ + public CpkInfo setEncryptionKeySha256(String encryptionKeySha256) { + this.encryptionKeySha256 = encryptionKeySha256; + return this; + } + + /** + * Get the encryptionAlgorithm property: The algorithm used to produce the encryption key hash. Currently, the only + * accepted value is "AES256". Must be provided if the x-ms-encryption-key header is provided. + * + * @return the encryptionAlgorithm value. + */ + public EncryptionAlgorithmType getEncryptionAlgorithm() { + return this.encryptionAlgorithm; + } + + /** + * Set the encryptionAlgorithm property: The algorithm used to produce the encryption key hash. Currently, the only + * accepted value is "AES256". Must be provided if the x-ms-encryption-key header is provided. + * + * @param encryptionAlgorithm the encryptionAlgorithm value to set. + * @return the CpkInfo object itself. + */ + public CpkInfo setEncryptionAlgorithm(EncryptionAlgorithmType encryptionAlgorithm) { + this.encryptionAlgorithm = encryptionAlgorithm; + return this; + } +} diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/DeleteSnapshotsOptionType.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/DeleteSnapshotsOptionType.java new file mode 100644 index 000000000000..d0905a9f3e02 --- /dev/null +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/DeleteSnapshotsOptionType.java @@ -0,0 +1,56 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.storage.blob.models; + +/** + * Defines values for DeleteSnapshotsOptionType. + */ +public enum DeleteSnapshotsOptionType { + /** + * Enum value include. + */ + INCLUDE("include"), + + /** + * Enum value only. + */ + ONLY("only"); + + /** + * The actual serialized value for a DeleteSnapshotsOptionType instance. + */ + private final String value; + + DeleteSnapshotsOptionType(String value) { + this.value = value; + } + + /** + * 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. + */ + public static DeleteSnapshotsOptionType fromString(String value) { + if (value == null) { + return null; + } + DeleteSnapshotsOptionType[] items = DeleteSnapshotsOptionType.values(); + for (DeleteSnapshotsOptionType 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-v2/src/main/java/com/azure/storage/blob/models/DelimitedTextConfiguration.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/DelimitedTextConfiguration.java new file mode 100644 index 000000000000..21c8e4121c10 --- /dev/null +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/DelimitedTextConfiguration.java @@ -0,0 +1,219 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.storage.blob.models; + +import com.azure.core.v2.annotation.Fluent; +import com.azure.core.v2.util.CoreUtils; +import io.clientcore.core.serialization.xml.XmlReader; +import io.clientcore.core.serialization.xml.XmlSerializable; +import io.clientcore.core.serialization.xml.XmlToken; +import io.clientcore.core.serialization.xml.XmlWriter; +import javax.xml.namespace.QName; +import javax.xml.stream.XMLStreamException; + +/** + * Groups the settings used for interpreting the blob data if the blob is delimited text formatted. + */ +@Fluent +public final class DelimitedTextConfiguration implements XmlSerializable { + /* + * The string used to separate columns. + */ + private String columnSeparator; + + /* + * The string used to quote a specific field. + */ + private String fieldQuote; + + /* + * The string used to separate records. + */ + private String recordSeparator; + + /* + * The string used as an escape character. + */ + private String escapeChar; + + /* + * Represents whether the data has headers. + */ + private Boolean headersPresent; + + /** + * Creates an instance of DelimitedTextConfiguration class. + */ + public DelimitedTextConfiguration() { + } + + /** + * Get the columnSeparator property: The string used to separate columns. + * + * @return the columnSeparator value. + */ + public String getColumnSeparator() { + return this.columnSeparator; + } + + /** + * Set the columnSeparator property: The string used to separate columns. + * + * @param columnSeparator the columnSeparator value to set. + * @return the DelimitedTextConfiguration object itself. + */ + public DelimitedTextConfiguration setColumnSeparator(String columnSeparator) { + this.columnSeparator = columnSeparator; + return this; + } + + /** + * Get the fieldQuote property: The string used to quote a specific field. + * + * @return the fieldQuote value. + */ + public String getFieldQuote() { + return this.fieldQuote; + } + + /** + * Set the fieldQuote property: The string used to quote a specific field. + * + * @param fieldQuote the fieldQuote value to set. + * @return the DelimitedTextConfiguration object itself. + */ + public DelimitedTextConfiguration setFieldQuote(String fieldQuote) { + this.fieldQuote = fieldQuote; + return this; + } + + /** + * Get the recordSeparator property: The string used to separate records. + * + * @return the recordSeparator value. + */ + public String getRecordSeparator() { + return this.recordSeparator; + } + + /** + * Set the recordSeparator property: The string used to separate records. + * + * @param recordSeparator the recordSeparator value to set. + * @return the DelimitedTextConfiguration object itself. + */ + public DelimitedTextConfiguration setRecordSeparator(String recordSeparator) { + this.recordSeparator = recordSeparator; + return this; + } + + /** + * Get the escapeChar property: The string used as an escape character. + * + * @return the escapeChar value. + */ + public String getEscapeChar() { + return this.escapeChar; + } + + /** + * Set the escapeChar property: The string used as an escape character. + * + * @param escapeChar the escapeChar value to set. + * @return the DelimitedTextConfiguration object itself. + */ + public DelimitedTextConfiguration setEscapeChar(String escapeChar) { + this.escapeChar = escapeChar; + return this; + } + + /** + * Get the headersPresent property: Represents whether the data has headers. + * + * @return the headersPresent value. + */ + public Boolean isHeadersPresent() { + return this.headersPresent; + } + + /** + * Set the headersPresent property: Represents whether the data has headers. + * + * @param headersPresent the headersPresent value to set. + * @return the DelimitedTextConfiguration object itself. + */ + public DelimitedTextConfiguration setHeadersPresent(Boolean headersPresent) { + this.headersPresent = headersPresent; + return this; + } + + @Override + public XmlWriter toXml(XmlWriter xmlWriter) throws XMLStreamException { + return toXml(xmlWriter, null); + } + + @Override + public XmlWriter toXml(XmlWriter xmlWriter, String rootElementName) throws XMLStreamException { + rootElementName = CoreUtils.isNullOrEmpty(rootElementName) ? "DelimitedTextConfiguration" : rootElementName; + xmlWriter.writeStartElement(rootElementName); + xmlWriter.writeStringElement("ColumnSeparator", this.columnSeparator); + xmlWriter.writeStringElement("FieldQuote", this.fieldQuote); + xmlWriter.writeStringElement("RecordSeparator", this.recordSeparator); + xmlWriter.writeStringElement("EscapeChar", this.escapeChar); + xmlWriter.writeBooleanElement("HasHeaders", this.headersPresent); + return xmlWriter.writeEndElement(); + } + + /** + * Reads an instance of DelimitedTextConfiguration from the XmlReader. + * + * @param xmlReader The XmlReader being read. + * @return An instance of DelimitedTextConfiguration if the XmlReader was pointing to an instance of it, or null if + * it was pointing to XML null. + * @throws XMLStreamException If an error occurs while reading the DelimitedTextConfiguration. + */ + public static DelimitedTextConfiguration fromXml(XmlReader xmlReader) throws XMLStreamException { + return fromXml(xmlReader, null); + } + + /** + * Reads an instance of DelimitedTextConfiguration from the XmlReader. + * + * @param xmlReader The XmlReader being read. + * @param rootElementName Optional root element name to override the default defined by the model. Used to support + * cases where the model can deserialize from different root element names. + * @return An instance of DelimitedTextConfiguration if the XmlReader was pointing to an instance of it, or null if + * it was pointing to XML null. + * @throws XMLStreamException If an error occurs while reading the DelimitedTextConfiguration. + */ + public static DelimitedTextConfiguration fromXml(XmlReader xmlReader, String rootElementName) + throws XMLStreamException { + String finalRootElementName + = CoreUtils.isNullOrEmpty(rootElementName) ? "DelimitedTextConfiguration" : rootElementName; + return xmlReader.readObject(finalRootElementName, reader -> { + DelimitedTextConfiguration deserializedDelimitedTextConfiguration = new DelimitedTextConfiguration(); + while (reader.nextElement() != XmlToken.END_ELEMENT) { + QName elementName = reader.getElementName(); + + if ("ColumnSeparator".equals(elementName.getLocalPart())) { + deserializedDelimitedTextConfiguration.columnSeparator = reader.getStringElement(); + } else if ("FieldQuote".equals(elementName.getLocalPart())) { + deserializedDelimitedTextConfiguration.fieldQuote = reader.getStringElement(); + } else if ("RecordSeparator".equals(elementName.getLocalPart())) { + deserializedDelimitedTextConfiguration.recordSeparator = reader.getStringElement(); + } else if ("EscapeChar".equals(elementName.getLocalPart())) { + deserializedDelimitedTextConfiguration.escapeChar = reader.getStringElement(); + } else if ("HasHeaders".equals(elementName.getLocalPart())) { + deserializedDelimitedTextConfiguration.headersPresent + = reader.getNullableElement(Boolean::parseBoolean); + } else { + reader.skipElement(); + } + } + + return deserializedDelimitedTextConfiguration; + }); + } +} diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/EncryptionAlgorithmType.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/EncryptionAlgorithmType.java new file mode 100644 index 000000000000..182cc57063a7 --- /dev/null +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/EncryptionAlgorithmType.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.storage.blob.models; + +/** + * Defines values for EncryptionAlgorithmType. + */ +public enum EncryptionAlgorithmType { + /** + * Enum value AES256. + */ + AES256("AES256"); + + /** + * The actual serialized value for a EncryptionAlgorithmType instance. + */ + private final String value; + + EncryptionAlgorithmType(String value) { + this.value = value; + } + + /** + * Parses a serialized value to a EncryptionAlgorithmType instance. + * + * @param value the serialized value to parse. + * @return the parsed EncryptionAlgorithmType object, or null if unable to parse. + */ + public static EncryptionAlgorithmType fromString(String value) { + if (value == null) { + return null; + } + EncryptionAlgorithmType[] items = EncryptionAlgorithmType.values(); + for (EncryptionAlgorithmType 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-v2/src/main/java/com/azure/storage/blob/models/EncryptionScope.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/EncryptionScope.java new file mode 100644 index 000000000000..0ee0437ef3aa --- /dev/null +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/EncryptionScope.java @@ -0,0 +1,50 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.storage.blob.models; + +import com.azure.core.v2.annotation.Fluent; + +/** + * Parameter group. + */ +@Fluent +public final class EncryptionScope { + /* + * Optional. Version 2019-07-07 and later. Specifies the name of the encryption scope to use to encrypt the data + * provided in the request. If not specified, encryption is performed with the default account encryption scope. For + * more information, see Encryption at Rest for Azure Storage Services. + */ + private String encryptionScope; + + /** + * Creates an instance of EncryptionScope class. + */ + public EncryptionScope() { + } + + /** + * Get the encryptionScope property: Optional. Version 2019-07-07 and later. Specifies the name of the encryption + * scope to use to encrypt the data provided in the request. If not specified, encryption is performed with the + * default account encryption scope. For more information, see Encryption at Rest for Azure Storage Services. + * + * @return the encryptionScope value. + */ + public String getEncryptionScope() { + return this.encryptionScope; + } + + /** + * Set the encryptionScope property: Optional. Version 2019-07-07 and later. Specifies the name of the encryption + * scope to use to encrypt the data provided in the request. If not specified, encryption is performed with the + * default account encryption scope. For more information, see Encryption at Rest for Azure Storage Services. + * + * @param encryptionScope the encryptionScope value to set. + * @return the EncryptionScope object itself. + */ + public EncryptionScope setEncryptionScope(String encryptionScope) { + this.encryptionScope = encryptionScope; + return this; + } +} diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/FilterBlobItem.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/FilterBlobItem.java new file mode 100644 index 000000000000..b622fece7698 --- /dev/null +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/FilterBlobItem.java @@ -0,0 +1,216 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.storage.blob.models; + +import com.azure.core.v2.annotation.Fluent; +import com.azure.core.v2.util.CoreUtils; +import io.clientcore.core.serialization.xml.XmlReader; +import io.clientcore.core.serialization.xml.XmlSerializable; +import io.clientcore.core.serialization.xml.XmlToken; +import io.clientcore.core.serialization.xml.XmlWriter; +import javax.xml.namespace.QName; +import javax.xml.stream.XMLStreamException; + +/** + * Blob info from a Filter Blobs API call. + */ +@Fluent +public final class FilterBlobItem implements XmlSerializable { + /* + * The Name property. + */ + private String name; + + /* + * The ContainerName property. + */ + private String containerName; + + /* + * Blob tags + */ + private BlobTags tags; + + /* + * The VersionId property. + */ + private String versionId; + + /* + * The IsCurrentVersion property. + */ + private Boolean isCurrentVersion; + + /** + * Creates an instance of FilterBlobItem class. + */ + public FilterBlobItem() { + } + + /** + * Get the name property: The Name property. + * + * @return the name value. + */ + public String getName() { + return this.name; + } + + /** + * Set the name property: The Name property. + * + * @param name the name value to set. + * @return the FilterBlobItem object itself. + */ + public FilterBlobItem setName(String name) { + this.name = name; + return this; + } + + /** + * Get the containerName property: The ContainerName property. + * + * @return the containerName value. + */ + public String getContainerName() { + return this.containerName; + } + + /** + * Set the containerName property: The ContainerName property. + * + * @param containerName the containerName value to set. + * @return the FilterBlobItem object itself. + */ + public FilterBlobItem setContainerName(String containerName) { + this.containerName = containerName; + return this; + } + + /** + * Get the tags property: Blob tags. + * + * @return the tags value. + */ + public BlobTags getTags() { + return this.tags; + } + + /** + * Set the tags property: Blob tags. + * + * @param tags the tags value to set. + * @return the FilterBlobItem object itself. + */ + public FilterBlobItem setTags(BlobTags tags) { + this.tags = tags; + return this; + } + + /** + * Get the versionId property: The VersionId property. + * + * @return the versionId value. + */ + public String getVersionId() { + return this.versionId; + } + + /** + * Set the versionId property: The VersionId property. + * + * @param versionId the versionId value to set. + * @return the FilterBlobItem object itself. + */ + public FilterBlobItem setVersionId(String versionId) { + this.versionId = versionId; + return this; + } + + /** + * Get the isCurrentVersion property: The IsCurrentVersion property. + * + * @return the isCurrentVersion value. + */ + 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. + */ + public FilterBlobItem setIsCurrentVersion(Boolean isCurrentVersion) { + this.isCurrentVersion = isCurrentVersion; + return this; + } + + @Override + public XmlWriter toXml(XmlWriter xmlWriter) throws XMLStreamException { + return toXml(xmlWriter, null); + } + + @Override + public XmlWriter toXml(XmlWriter xmlWriter, String rootElementName) throws XMLStreamException { + rootElementName = CoreUtils.isNullOrEmpty(rootElementName) ? "Blob" : rootElementName; + xmlWriter.writeStartElement(rootElementName); + xmlWriter.writeStringElement("Name", this.name); + xmlWriter.writeStringElement("ContainerName", this.containerName); + xmlWriter.writeXml(this.tags, "Tags"); + xmlWriter.writeStringElement("VersionId", this.versionId); + xmlWriter.writeBooleanElement("IsCurrentVersion", this.isCurrentVersion); + return xmlWriter.writeEndElement(); + } + + /** + * Reads an instance of FilterBlobItem from the XmlReader. + * + * @param xmlReader The XmlReader being read. + * @return An instance of FilterBlobItem if the XmlReader was pointing to an instance of it, or null if it was + * pointing to XML null. + * @throws XMLStreamException If an error occurs while reading the FilterBlobItem. + */ + public static FilterBlobItem fromXml(XmlReader xmlReader) throws XMLStreamException { + return fromXml(xmlReader, null); + } + + /** + * Reads an instance of FilterBlobItem from the XmlReader. + * + * @param xmlReader The XmlReader being read. + * @param rootElementName Optional root element name to override the default defined by the model. Used to support + * cases where the model can deserialize from different root element names. + * @return An instance of FilterBlobItem if the XmlReader was pointing to an instance of it, or null if it was + * pointing to XML null. + * @throws XMLStreamException If an error occurs while reading the FilterBlobItem. + */ + public static FilterBlobItem fromXml(XmlReader xmlReader, String rootElementName) throws XMLStreamException { + String finalRootElementName = CoreUtils.isNullOrEmpty(rootElementName) ? "Blob" : rootElementName; + return xmlReader.readObject(finalRootElementName, reader -> { + FilterBlobItem deserializedFilterBlobItem = new FilterBlobItem(); + while (reader.nextElement() != XmlToken.END_ELEMENT) { + QName elementName = reader.getElementName(); + + if ("Name".equals(elementName.getLocalPart())) { + deserializedFilterBlobItem.name = reader.getStringElement(); + } else if ("ContainerName".equals(elementName.getLocalPart())) { + deserializedFilterBlobItem.containerName = reader.getStringElement(); + } else if ("Tags".equals(elementName.getLocalPart())) { + deserializedFilterBlobItem.tags = BlobTags.fromXml(reader, "Tags"); + } else if ("VersionId".equals(elementName.getLocalPart())) { + deserializedFilterBlobItem.versionId = reader.getStringElement(); + } else if ("IsCurrentVersion".equals(elementName.getLocalPart())) { + deserializedFilterBlobItem.isCurrentVersion = reader.getNullableElement(Boolean::parseBoolean); + } else { + reader.skipElement(); + } + } + + return deserializedFilterBlobItem; + }); + } +} diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/FilterBlobSegment.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/FilterBlobSegment.java new file mode 100644 index 000000000000..2ddaebed7e28 --- /dev/null +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/FilterBlobSegment.java @@ -0,0 +1,208 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.storage.blob.models; + +import com.azure.core.v2.annotation.Fluent; +import com.azure.core.v2.util.CoreUtils; +import io.clientcore.core.serialization.xml.XmlReader; +import io.clientcore.core.serialization.xml.XmlSerializable; +import io.clientcore.core.serialization.xml.XmlToken; +import io.clientcore.core.serialization.xml.XmlWriter; +import java.util.ArrayList; +import java.util.List; +import javax.xml.namespace.QName; +import javax.xml.stream.XMLStreamException; + +/** + * The result of a Filter Blobs API call. + */ +@Fluent +public final class FilterBlobSegment implements XmlSerializable { + /* + * The ServiceEndpoint property. + */ + private String serviceEndpoint; + + /* + * The Where property. + */ + private String where; + + /* + * The Blobs property. + */ + private List blobs; + + /* + * The NextMarker property. + */ + private String nextMarker; + + /** + * Creates an instance of FilterBlobSegment class. + */ + public FilterBlobSegment() { + } + + /** + * Get the serviceEndpoint property: The ServiceEndpoint property. + * + * @return the serviceEndpoint value. + */ + public String getServiceEndpoint() { + return this.serviceEndpoint; + } + + /** + * Set the serviceEndpoint property: The ServiceEndpoint property. + * + * @param serviceEndpoint the serviceEndpoint value to set. + * @return the FilterBlobSegment object itself. + */ + public FilterBlobSegment setServiceEndpoint(String serviceEndpoint) { + this.serviceEndpoint = serviceEndpoint; + return this; + } + + /** + * Get the where property: The Where property. + * + * @return the where value. + */ + public String getWhere() { + return this.where; + } + + /** + * Set the where property: The Where property. + * + * @param where the where value to set. + * @return the FilterBlobSegment object itself. + */ + public FilterBlobSegment setWhere(String where) { + this.where = where; + return this; + } + + /** + * Get the blobs property: The Blobs property. + * + * @return the blobs value. + */ + public List getBlobs() { + if (this.blobs == null) { + this.blobs = new ArrayList<>(); + } + return this.blobs; + } + + /** + * Set the blobs property: The Blobs property. + * + * @param blobs the blobs value to set. + * @return the FilterBlobSegment object itself. + */ + public FilterBlobSegment setBlobs(List blobs) { + this.blobs = blobs; + 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 FilterBlobSegment object itself. + */ + public FilterBlobSegment setNextMarker(String nextMarker) { + this.nextMarker = nextMarker; + return this; + } + + @Override + public XmlWriter toXml(XmlWriter xmlWriter) throws XMLStreamException { + return toXml(xmlWriter, null); + } + + @Override + public XmlWriter toXml(XmlWriter xmlWriter, String rootElementName) throws XMLStreamException { + rootElementName = CoreUtils.isNullOrEmpty(rootElementName) ? "EnumerationResults" : rootElementName; + xmlWriter.writeStartElement(rootElementName); + xmlWriter.writeStringAttribute("ServiceEndpoint", this.serviceEndpoint); + xmlWriter.writeStringElement("Where", this.where); + if (this.blobs != null) { + xmlWriter.writeStartElement("Blobs"); + for (FilterBlobItem element : this.blobs) { + xmlWriter.writeXml(element, "Blob"); + } + xmlWriter.writeEndElement(); + } + xmlWriter.writeStringElement("NextMarker", this.nextMarker); + return xmlWriter.writeEndElement(); + } + + /** + * Reads an instance of FilterBlobSegment from the XmlReader. + * + * @param xmlReader The XmlReader being read. + * @return An instance of FilterBlobSegment if the XmlReader was pointing to an instance of it, or null if it was + * pointing to XML null. + * @throws XMLStreamException If an error occurs while reading the FilterBlobSegment. + */ + public static FilterBlobSegment fromXml(XmlReader xmlReader) throws XMLStreamException { + return fromXml(xmlReader, null); + } + + /** + * Reads an instance of FilterBlobSegment from the XmlReader. + * + * @param xmlReader The XmlReader being read. + * @param rootElementName Optional root element name to override the default defined by the model. Used to support + * cases where the model can deserialize from different root element names. + * @return An instance of FilterBlobSegment if the XmlReader was pointing to an instance of it, or null if it was + * pointing to XML null. + * @throws XMLStreamException If an error occurs while reading the FilterBlobSegment. + */ + public static FilterBlobSegment fromXml(XmlReader xmlReader, String rootElementName) throws XMLStreamException { + String finalRootElementName = CoreUtils.isNullOrEmpty(rootElementName) ? "EnumerationResults" : rootElementName; + return xmlReader.readObject(finalRootElementName, reader -> { + FilterBlobSegment deserializedFilterBlobSegment = new FilterBlobSegment(); + deserializedFilterBlobSegment.serviceEndpoint = reader.getStringAttribute(null, "ServiceEndpoint"); + while (reader.nextElement() != XmlToken.END_ELEMENT) { + QName elementName = reader.getElementName(); + + if ("Where".equals(elementName.getLocalPart())) { + deserializedFilterBlobSegment.where = reader.getStringElement(); + } else if ("Blobs".equals(elementName.getLocalPart())) { + while (reader.nextElement() != XmlToken.END_ELEMENT) { + elementName = reader.getElementName(); + if ("Blob".equals(elementName.getLocalPart())) { + if (deserializedFilterBlobSegment.blobs == null) { + deserializedFilterBlobSegment.blobs = new ArrayList<>(); + } + deserializedFilterBlobSegment.blobs.add(FilterBlobItem.fromXml(reader, "Blob")); + } else { + reader.skipElement(); + } + } + } else if ("NextMarker".equals(elementName.getLocalPart())) { + deserializedFilterBlobSegment.nextMarker = reader.getStringElement(); + } else { + reader.skipElement(); + } + } + + return deserializedFilterBlobSegment; + }); + } +} diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/FilterBlobsIncludeItem.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/FilterBlobsIncludeItem.java new file mode 100644 index 000000000000..d6e2c6577e44 --- /dev/null +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/FilterBlobsIncludeItem.java @@ -0,0 +1,56 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.storage.blob.models; + +/** + * Defines values for FilterBlobsIncludeItem. + */ +public enum FilterBlobsIncludeItem { + /** + * Enum value none. + */ + NONE("none"), + + /** + * Enum value versions. + */ + VERSIONS("versions"); + + /** + * The actual serialized value for a FilterBlobsIncludeItem instance. + */ + private final String value; + + FilterBlobsIncludeItem(String value) { + this.value = value; + } + + /** + * Parses a serialized value to a FilterBlobsIncludeItem instance. + * + * @param value the serialized value to parse. + * @return the parsed FilterBlobsIncludeItem object, or null if unable to parse. + */ + public static FilterBlobsIncludeItem fromString(String value) { + if (value == null) { + return null; + } + FilterBlobsIncludeItem[] items = FilterBlobsIncludeItem.values(); + for (FilterBlobsIncludeItem 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-v2/src/main/java/com/azure/storage/blob/models/GeoReplication.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/GeoReplication.java new file mode 100644 index 000000000000..f10f5a8ec3a1 --- /dev/null +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/GeoReplication.java @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.storage.blob.models; + +import com.azure.core.v2.annotation.Fluent; +import com.azure.core.v2.util.CoreUtils; +import io.clientcore.core.http.models.DateTimeRfc1123; +import io.clientcore.core.serialization.xml.XmlReader; +import io.clientcore.core.serialization.xml.XmlSerializable; +import io.clientcore.core.serialization.xml.XmlToken; +import io.clientcore.core.serialization.xml.XmlWriter; +import java.time.OffsetDateTime; +import java.util.Objects; +import javax.xml.namespace.QName; +import javax.xml.stream.XMLStreamException; + +/** + * Geo-Replication information for the Secondary Storage Service. + */ +@Fluent +public final class GeoReplication implements XmlSerializable { + /* + * The status of the secondary location + */ + private GeoReplicationStatus status; + + /* + * A GMT date/time value, to the second. All primary writes preceding this value are guaranteed to be available for + * read operations at the secondary. Primary writes after this point in time may or may not be available for reads. + */ + private DateTimeRfc1123 lastSyncTime; + + /** + * Creates an instance of GeoReplication class. + */ + public GeoReplication() { + } + + /** + * Get the status property: The status of the secondary location. + * + * @return the status value. + */ + public GeoReplicationStatus getStatus() { + return this.status; + } + + /** + * Set the status property: The status of the secondary location. + * + * @param status the status value to set. + * @return the GeoReplication object itself. + */ + public GeoReplication setStatus(GeoReplicationStatus status) { + this.status = status; + return this; + } + + /** + * Get the lastSyncTime property: A GMT date/time value, to the second. All primary writes preceding this value are + * guaranteed to be available for read operations at the secondary. Primary writes after this point in time may or + * may not be available for reads. + * + * @return the lastSyncTime value. + */ + public OffsetDateTime getLastSyncTime() { + if (this.lastSyncTime == null) { + return null; + } + return this.lastSyncTime.getDateTime(); + } + + /** + * Set the lastSyncTime property: A GMT date/time value, to the second. All primary writes preceding this value are + * guaranteed to be available for read operations at the secondary. Primary writes after this point in time may or + * may not be available for reads. + * + * @param lastSyncTime the lastSyncTime value to set. + * @return the GeoReplication object itself. + */ + public GeoReplication setLastSyncTime(OffsetDateTime lastSyncTime) { + if (lastSyncTime == null) { + this.lastSyncTime = null; + } else { + this.lastSyncTime = new DateTimeRfc1123(lastSyncTime); + } + return this; + } + + @Override + public XmlWriter toXml(XmlWriter xmlWriter) throws XMLStreamException { + return toXml(xmlWriter, null); + } + + @Override + public XmlWriter toXml(XmlWriter xmlWriter, String rootElementName) throws XMLStreamException { + rootElementName = CoreUtils.isNullOrEmpty(rootElementName) ? "GeoReplication" : rootElementName; + xmlWriter.writeStartElement(rootElementName); + xmlWriter.writeStringElement("Status", this.status == null ? null : this.status.toString()); + xmlWriter.writeStringElement("LastSyncTime", Objects.toString(this.lastSyncTime, null)); + return xmlWriter.writeEndElement(); + } + + /** + * Reads an instance of GeoReplication from the XmlReader. + * + * @param xmlReader The XmlReader being read. + * @return An instance of GeoReplication if the XmlReader was pointing to an instance of it, or null if it was + * pointing to XML null. + * @throws XMLStreamException If an error occurs while reading the GeoReplication. + */ + public static GeoReplication fromXml(XmlReader xmlReader) throws XMLStreamException { + return fromXml(xmlReader, null); + } + + /** + * Reads an instance of GeoReplication from the XmlReader. + * + * @param xmlReader The XmlReader being read. + * @param rootElementName Optional root element name to override the default defined by the model. Used to support + * cases where the model can deserialize from different root element names. + * @return An instance of GeoReplication if the XmlReader was pointing to an instance of it, or null if it was + * pointing to XML null. + * @throws XMLStreamException If an error occurs while reading the GeoReplication. + */ + public static GeoReplication fromXml(XmlReader xmlReader, String rootElementName) throws XMLStreamException { + String finalRootElementName = CoreUtils.isNullOrEmpty(rootElementName) ? "GeoReplication" : rootElementName; + return xmlReader.readObject(finalRootElementName, reader -> { + GeoReplication deserializedGeoReplication = new GeoReplication(); + while (reader.nextElement() != XmlToken.END_ELEMENT) { + QName elementName = reader.getElementName(); + + if ("Status".equals(elementName.getLocalPart())) { + deserializedGeoReplication.status = GeoReplicationStatus.fromString(reader.getStringElement()); + } else if ("LastSyncTime".equals(elementName.getLocalPart())) { + deserializedGeoReplication.lastSyncTime = reader.getNullableElement(DateTimeRfc1123::new); + } else { + reader.skipElement(); + } + } + + return deserializedGeoReplication; + }); + } +} diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/GeoReplicationStatus.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/GeoReplicationStatus.java new file mode 100644 index 000000000000..033977e85874 --- /dev/null +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/GeoReplicationStatus.java @@ -0,0 +1,69 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.storage.blob.models; + +import io.clientcore.core.util.ExpandableEnum; +import java.util.Map; +import java.util.concurrent.ConcurrentHashMap; + +/** + * The status of the secondary location. + */ +public final class GeoReplicationStatus implements ExpandableEnum { + private static final Map VALUES = new ConcurrentHashMap<>(); + + /** + * Static value live for GeoReplicationStatus. + */ + public static final GeoReplicationStatus LIVE = fromString("live"); + + /** + * Static value bootstrap for GeoReplicationStatus. + */ + public static final GeoReplicationStatus BOOTSTRAP = fromString("bootstrap"); + + /** + * Static value unavailable for GeoReplicationStatus. + */ + public static final GeoReplicationStatus UNAVAILABLE = fromString("unavailable"); + + private final String name; + + private GeoReplicationStatus(String name) { + this.name = name; + } + + /** + * Creates or finds a GeoReplicationStatus. + * + * @param name a name to look for. + * @return the corresponding GeoReplicationStatus. + */ + public static GeoReplicationStatus fromString(String name) { + if (name == null) { + return null; + } + GeoReplicationStatus value = VALUES.get(name); + if (value != null) { + return value; + } + return VALUES.computeIfAbsent(name, key -> new GeoReplicationStatus(key)); + } + + /** + * Gets the value of the GeoReplicationStatus instance. + * + * @return the value of the GeoReplicationStatus instance. + */ + @Override + public String getValue() { + return this.name; + } + + @Override + public String toString() { + return name; + } +} diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/JsonTextConfiguration.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/JsonTextConfiguration.java new file mode 100644 index 000000000000..08b787d93286 --- /dev/null +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/JsonTextConfiguration.java @@ -0,0 +1,105 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.storage.blob.models; + +import com.azure.core.v2.annotation.Fluent; +import com.azure.core.v2.util.CoreUtils; +import io.clientcore.core.serialization.xml.XmlReader; +import io.clientcore.core.serialization.xml.XmlSerializable; +import io.clientcore.core.serialization.xml.XmlToken; +import io.clientcore.core.serialization.xml.XmlWriter; +import javax.xml.namespace.QName; +import javax.xml.stream.XMLStreamException; + +/** + * json text configuration. + */ +@Fluent +public final class JsonTextConfiguration implements XmlSerializable { + /* + * The string used to separate records. + */ + private String recordSeparator; + + /** + * Creates an instance of JsonTextConfiguration class. + */ + public JsonTextConfiguration() { + } + + /** + * Get the recordSeparator property: The string used to separate records. + * + * @return the recordSeparator value. + */ + public String getRecordSeparator() { + return this.recordSeparator; + } + + /** + * Set the recordSeparator property: The string used to separate records. + * + * @param recordSeparator the recordSeparator value to set. + * @return the JsonTextConfiguration object itself. + */ + public JsonTextConfiguration setRecordSeparator(String recordSeparator) { + this.recordSeparator = recordSeparator; + return this; + } + + @Override + public XmlWriter toXml(XmlWriter xmlWriter) throws XMLStreamException { + return toXml(xmlWriter, null); + } + + @Override + public XmlWriter toXml(XmlWriter xmlWriter, String rootElementName) throws XMLStreamException { + rootElementName = CoreUtils.isNullOrEmpty(rootElementName) ? "JsonTextConfiguration" : rootElementName; + xmlWriter.writeStartElement(rootElementName); + xmlWriter.writeStringElement("RecordSeparator", this.recordSeparator); + return xmlWriter.writeEndElement(); + } + + /** + * Reads an instance of JsonTextConfiguration from the XmlReader. + * + * @param xmlReader The XmlReader being read. + * @return An instance of JsonTextConfiguration if the XmlReader was pointing to an instance of it, or null if it + * was pointing to XML null. + * @throws XMLStreamException If an error occurs while reading the JsonTextConfiguration. + */ + public static JsonTextConfiguration fromXml(XmlReader xmlReader) throws XMLStreamException { + return fromXml(xmlReader, null); + } + + /** + * Reads an instance of JsonTextConfiguration from the XmlReader. + * + * @param xmlReader The XmlReader being read. + * @param rootElementName Optional root element name to override the default defined by the model. Used to support + * cases where the model can deserialize from different root element names. + * @return An instance of JsonTextConfiguration if the XmlReader was pointing to an instance of it, or null if it + * was pointing to XML null. + * @throws XMLStreamException If an error occurs while reading the JsonTextConfiguration. + */ + public static JsonTextConfiguration fromXml(XmlReader xmlReader, String rootElementName) throws XMLStreamException { + String finalRootElementName + = CoreUtils.isNullOrEmpty(rootElementName) ? "JsonTextConfiguration" : rootElementName; + return xmlReader.readObject(finalRootElementName, reader -> { + JsonTextConfiguration deserializedJsonTextConfiguration = new JsonTextConfiguration(); + while (reader.nextElement() != XmlToken.END_ELEMENT) { + QName elementName = reader.getElementName(); + + if ("RecordSeparator".equals(elementName.getLocalPart())) { + deserializedJsonTextConfiguration.recordSeparator = reader.getStringElement(); + } else { + reader.skipElement(); + } + } + + return deserializedJsonTextConfiguration; + }); + } +} diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/KeyInfo.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/KeyInfo.java new file mode 100644 index 000000000000..b690b68eb8b6 --- /dev/null +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/KeyInfo.java @@ -0,0 +1,132 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.storage.blob.models; + +import com.azure.core.v2.annotation.Fluent; +import com.azure.core.v2.util.CoreUtils; +import io.clientcore.core.serialization.xml.XmlReader; +import io.clientcore.core.serialization.xml.XmlSerializable; +import io.clientcore.core.serialization.xml.XmlToken; +import io.clientcore.core.serialization.xml.XmlWriter; +import javax.xml.namespace.QName; +import javax.xml.stream.XMLStreamException; + +/** + * Key information. + */ +@Fluent +public final class KeyInfo implements XmlSerializable { + /* + * The date-time the key is active in ISO 8601 UTC time + */ + private String start; + + /* + * The date-time the key expires in ISO 8601 UTC time + */ + private String expiry; + + /** + * Creates an instance of KeyInfo class. + */ + public KeyInfo() { + } + + /** + * Get the start property: The date-time the key is active in ISO 8601 UTC time. + * + * @return the start value. + */ + public String getStart() { + return this.start; + } + + /** + * Set the start property: The date-time the key is active in ISO 8601 UTC time. + * + * @param start the start value to set. + * @return the KeyInfo object itself. + */ + public KeyInfo setStart(String start) { + this.start = start; + return this; + } + + /** + * Get the expiry property: The date-time the key expires in ISO 8601 UTC time. + * + * @return the expiry value. + */ + public String getExpiry() { + return this.expiry; + } + + /** + * Set the expiry property: The date-time the key expires in ISO 8601 UTC time. + * + * @param expiry the expiry value to set. + * @return the KeyInfo object itself. + */ + public KeyInfo setExpiry(String expiry) { + this.expiry = expiry; + return this; + } + + @Override + public XmlWriter toXml(XmlWriter xmlWriter) throws XMLStreamException { + return toXml(xmlWriter, null); + } + + @Override + public XmlWriter toXml(XmlWriter xmlWriter, String rootElementName) throws XMLStreamException { + rootElementName = CoreUtils.isNullOrEmpty(rootElementName) ? "KeyInfo" : rootElementName; + xmlWriter.writeStartElement(rootElementName); + xmlWriter.writeStringElement("Start", this.start); + xmlWriter.writeStringElement("Expiry", this.expiry); + return xmlWriter.writeEndElement(); + } + + /** + * Reads an instance of KeyInfo from the XmlReader. + * + * @param xmlReader The XmlReader being read. + * @return An instance of KeyInfo if the XmlReader was pointing to an instance of it, or null if it was pointing to + * XML null. + * @throws XMLStreamException If an error occurs while reading the KeyInfo. + */ + public static KeyInfo fromXml(XmlReader xmlReader) throws XMLStreamException { + return fromXml(xmlReader, null); + } + + /** + * Reads an instance of KeyInfo from the XmlReader. + * + * @param xmlReader The XmlReader being read. + * @param rootElementName Optional root element name to override the default defined by the model. Used to support + * cases where the model can deserialize from different root element names. + * @return An instance of KeyInfo if the XmlReader was pointing to an instance of it, or null if it was pointing to + * XML null. + * @throws XMLStreamException If an error occurs while reading the KeyInfo. + */ + public static KeyInfo fromXml(XmlReader xmlReader, String rootElementName) throws XMLStreamException { + String finalRootElementName = CoreUtils.isNullOrEmpty(rootElementName) ? "KeyInfo" : rootElementName; + return xmlReader.readObject(finalRootElementName, reader -> { + KeyInfo deserializedKeyInfo = new KeyInfo(); + while (reader.nextElement() != XmlToken.END_ELEMENT) { + QName elementName = reader.getElementName(); + + if ("Start".equals(elementName.getLocalPart())) { + deserializedKeyInfo.start = reader.getStringElement(); + } else if ("Expiry".equals(elementName.getLocalPart())) { + deserializedKeyInfo.expiry = reader.getStringElement(); + } else { + reader.skipElement(); + } + } + + return deserializedKeyInfo; + }); + } +} diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/LeaseDurationType.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/LeaseDurationType.java new file mode 100644 index 000000000000..ce5ac31938a7 --- /dev/null +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/LeaseDurationType.java @@ -0,0 +1,56 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.storage.blob.models; + +/** + * Defines values for LeaseDurationType. + */ +public enum LeaseDurationType { + /** + * Enum value infinite. + */ + INFINITE("infinite"), + + /** + * Enum value fixed. + */ + FIXED("fixed"); + + /** + * The actual serialized value for a LeaseDurationType instance. + */ + private final String value; + + LeaseDurationType(String value) { + this.value = value; + } + + /** + * Parses a serialized value to a LeaseDurationType instance. + * + * @param value the serialized value to parse. + * @return the parsed LeaseDurationType object, or null if unable to parse. + */ + public static LeaseDurationType fromString(String value) { + if (value == null) { + return null; + } + LeaseDurationType[] items = LeaseDurationType.values(); + for (LeaseDurationType 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-v2/src/main/java/com/azure/storage/blob/models/LeaseStateType.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/LeaseStateType.java new file mode 100644 index 000000000000..c76a09b519fb --- /dev/null +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/LeaseStateType.java @@ -0,0 +1,71 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.storage.blob.models; + +/** + * Defines values for LeaseStateType. + */ +public enum LeaseStateType { + /** + * Enum value available. + */ + AVAILABLE("available"), + + /** + * Enum value leased. + */ + LEASED("leased"), + + /** + * Enum value expired. + */ + EXPIRED("expired"), + + /** + * Enum value breaking. + */ + BREAKING("breaking"), + + /** + * Enum value broken. + */ + BROKEN("broken"); + + /** + * The actual serialized value for a LeaseStateType instance. + */ + private final String value; + + LeaseStateType(String value) { + this.value = value; + } + + /** + * Parses a serialized value to a LeaseStateType instance. + * + * @param value the serialized value to parse. + * @return the parsed LeaseStateType object, or null if unable to parse. + */ + public static LeaseStateType fromString(String value) { + if (value == null) { + return null; + } + LeaseStateType[] items = LeaseStateType.values(); + for (LeaseStateType 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-v2/src/main/java/com/azure/storage/blob/models/LeaseStatusType.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/LeaseStatusType.java new file mode 100644 index 000000000000..2de9c2c87362 --- /dev/null +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/LeaseStatusType.java @@ -0,0 +1,56 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.storage.blob.models; + +/** + * Defines values for LeaseStatusType. + */ +public enum LeaseStatusType { + /** + * Enum value locked. + */ + LOCKED("locked"), + + /** + * Enum value unlocked. + */ + UNLOCKED("unlocked"); + + /** + * The actual serialized value for a LeaseStatusType instance. + */ + private final String value; + + LeaseStatusType(String value) { + this.value = value; + } + + /** + * 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. + */ + public static LeaseStatusType fromString(String value) { + if (value == null) { + return null; + } + LeaseStatusType[] items = LeaseStatusType.values(); + for (LeaseStatusType 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-v2/src/main/java/com/azure/storage/blob/models/ListBlobContainersIncludeType.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/ListBlobContainersIncludeType.java new file mode 100644 index 000000000000..9615a6ce401b --- /dev/null +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/ListBlobContainersIncludeType.java @@ -0,0 +1,61 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.storage.blob.models; + +/** + * Defines values for ListBlobContainersIncludeType. + */ +public enum ListBlobContainersIncludeType { + /** + * Enum value metadata. + */ + METADATA("metadata"), + + /** + * Enum value deleted. + */ + DELETED("deleted"), + + /** + * Enum value system. + */ + SYSTEM("system"); + + /** + * The actual serialized value for a ListBlobContainersIncludeType instance. + */ + private final String value; + + ListBlobContainersIncludeType(String value) { + this.value = value; + } + + /** + * Parses a serialized value to a ListBlobContainersIncludeType instance. + * + * @param value the serialized value to parse. + * @return the parsed ListBlobContainersIncludeType object, or null if unable to parse. + */ + public static ListBlobContainersIncludeType fromString(String value) { + if (value == null) { + return null; + } + ListBlobContainersIncludeType[] items = ListBlobContainersIncludeType.values(); + for (ListBlobContainersIncludeType 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-v2/src/main/java/com/azure/storage/blob/models/ListBlobsFlatSegmentResponse.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/ListBlobsFlatSegmentResponse.java new file mode 100644 index 000000000000..84a017fa1374 --- /dev/null +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/ListBlobsFlatSegmentResponse.java @@ -0,0 +1,272 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.storage.blob.models; + +import com.azure.core.v2.annotation.Fluent; +import com.azure.core.v2.util.CoreUtils; +import io.clientcore.core.serialization.xml.XmlReader; +import io.clientcore.core.serialization.xml.XmlSerializable; +import io.clientcore.core.serialization.xml.XmlToken; +import io.clientcore.core.serialization.xml.XmlWriter; +import javax.xml.namespace.QName; +import javax.xml.stream.XMLStreamException; + +/** + * An enumeration of blobs. + */ +@Fluent +public final class ListBlobsFlatSegmentResponse implements XmlSerializable { + /* + * The ServiceEndpoint property. + */ + private String serviceEndpoint; + + /* + * The ContainerName property. + */ + private String containerName; + + /* + * The Prefix property. + */ + private String prefix; + + /* + * The Marker property. + */ + private String marker; + + /* + * The MaxResults property. + */ + private int maxResults; + + /* + * The Segment property. + */ + private BlobFlatListSegment segment; + + /* + * The NextMarker property. + */ + private String nextMarker; + + /** + * Creates an instance of ListBlobsFlatSegmentResponse class. + */ + public ListBlobsFlatSegmentResponse() { + } + + /** + * Get the serviceEndpoint property: The ServiceEndpoint property. + * + * @return the serviceEndpoint value. + */ + public String getServiceEndpoint() { + return this.serviceEndpoint; + } + + /** + * Set the serviceEndpoint property: The ServiceEndpoint property. + * + * @param serviceEndpoint the serviceEndpoint value to set. + * @return the ListBlobsFlatSegmentResponse object itself. + */ + public ListBlobsFlatSegmentResponse setServiceEndpoint(String serviceEndpoint) { + this.serviceEndpoint = serviceEndpoint; + return this; + } + + /** + * Get the containerName property: The ContainerName property. + * + * @return the containerName value. + */ + public String getContainerName() { + return this.containerName; + } + + /** + * Set the containerName property: The ContainerName property. + * + * @param containerName the containerName value to set. + * @return the ListBlobsFlatSegmentResponse object itself. + */ + public ListBlobsFlatSegmentResponse setContainerName(String containerName) { + this.containerName = containerName; + return this; + } + + /** + * Get the prefix property: The Prefix property. + * + * @return the prefix value. + */ + public String getPrefix() { + return this.prefix; + } + + /** + * Set the prefix property: The Prefix property. + * + * @param prefix the prefix value to set. + * @return the ListBlobsFlatSegmentResponse object itself. + */ + public ListBlobsFlatSegmentResponse setPrefix(String prefix) { + this.prefix = prefix; + return this; + } + + /** + * Get the marker property: The Marker property. + * + * @return the marker value. + */ + public String getMarker() { + return this.marker; + } + + /** + * Set the marker property: The Marker property. + * + * @param marker the marker value to set. + * @return the ListBlobsFlatSegmentResponse object itself. + */ + public ListBlobsFlatSegmentResponse setMarker(String marker) { + this.marker = marker; + return this; + } + + /** + * Get the maxResults property: The MaxResults property. + * + * @return the maxResults value. + */ + public int getMaxResults() { + return this.maxResults; + } + + /** + * Set the maxResults property: The MaxResults property. + * + * @param maxResults the maxResults value to set. + * @return the ListBlobsFlatSegmentResponse object itself. + */ + public ListBlobsFlatSegmentResponse setMaxResults(int maxResults) { + this.maxResults = maxResults; + return this; + } + + /** + * Get the segment property: The Segment property. + * + * @return the segment value. + */ + public BlobFlatListSegment getSegment() { + return this.segment; + } + + /** + * Set the segment property: The Segment property. + * + * @param segment the segment value to set. + * @return the ListBlobsFlatSegmentResponse object itself. + */ + public ListBlobsFlatSegmentResponse setSegment(BlobFlatListSegment segment) { + this.segment = segment; + 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 ListBlobsFlatSegmentResponse object itself. + */ + public ListBlobsFlatSegmentResponse setNextMarker(String nextMarker) { + this.nextMarker = nextMarker; + return this; + } + + @Override + public XmlWriter toXml(XmlWriter xmlWriter) throws XMLStreamException { + return toXml(xmlWriter, null); + } + + @Override + public XmlWriter toXml(XmlWriter xmlWriter, String rootElementName) throws XMLStreamException { + rootElementName = CoreUtils.isNullOrEmpty(rootElementName) ? "EnumerationResults" : rootElementName; + xmlWriter.writeStartElement(rootElementName); + xmlWriter.writeStringAttribute("ServiceEndpoint", this.serviceEndpoint); + xmlWriter.writeStringAttribute("ContainerName", this.containerName); + xmlWriter.writeStringElement("Prefix", this.prefix); + xmlWriter.writeStringElement("Marker", this.marker); + xmlWriter.writeIntElement("MaxResults", this.maxResults); + xmlWriter.writeXml(this.segment, "Blobs"); + xmlWriter.writeStringElement("NextMarker", this.nextMarker); + return xmlWriter.writeEndElement(); + } + + /** + * Reads an instance of ListBlobsFlatSegmentResponse from the XmlReader. + * + * @param xmlReader The XmlReader being read. + * @return An instance of ListBlobsFlatSegmentResponse if the XmlReader was pointing to an instance of it, or null + * if it was pointing to XML null. + * @throws XMLStreamException If an error occurs while reading the ListBlobsFlatSegmentResponse. + */ + public static ListBlobsFlatSegmentResponse fromXml(XmlReader xmlReader) throws XMLStreamException { + return fromXml(xmlReader, null); + } + + /** + * Reads an instance of ListBlobsFlatSegmentResponse from the XmlReader. + * + * @param xmlReader The XmlReader being read. + * @param rootElementName Optional root element name to override the default defined by the model. Used to support + * cases where the model can deserialize from different root element names. + * @return An instance of ListBlobsFlatSegmentResponse if the XmlReader was pointing to an instance of it, or null + * if it was pointing to XML null. + * @throws XMLStreamException If an error occurs while reading the ListBlobsFlatSegmentResponse. + */ + public static ListBlobsFlatSegmentResponse fromXml(XmlReader xmlReader, String rootElementName) + throws XMLStreamException { + String finalRootElementName = CoreUtils.isNullOrEmpty(rootElementName) ? "EnumerationResults" : rootElementName; + return xmlReader.readObject(finalRootElementName, reader -> { + ListBlobsFlatSegmentResponse deserializedListBlobsFlatSegmentResponse = new ListBlobsFlatSegmentResponse(); + deserializedListBlobsFlatSegmentResponse.serviceEndpoint + = reader.getStringAttribute(null, "ServiceEndpoint"); + deserializedListBlobsFlatSegmentResponse.containerName = reader.getStringAttribute(null, "ContainerName"); + while (reader.nextElement() != XmlToken.END_ELEMENT) { + QName elementName = reader.getElementName(); + + if ("Prefix".equals(elementName.getLocalPart())) { + deserializedListBlobsFlatSegmentResponse.prefix = reader.getStringElement(); + } else if ("Marker".equals(elementName.getLocalPart())) { + deserializedListBlobsFlatSegmentResponse.marker = reader.getStringElement(); + } else if ("MaxResults".equals(elementName.getLocalPart())) { + deserializedListBlobsFlatSegmentResponse.maxResults = reader.getIntElement(); + } else if ("Blobs".equals(elementName.getLocalPart())) { + deserializedListBlobsFlatSegmentResponse.segment = BlobFlatListSegment.fromXml(reader, "Blobs"); + } else if ("NextMarker".equals(elementName.getLocalPart())) { + deserializedListBlobsFlatSegmentResponse.nextMarker = reader.getStringElement(); + } else { + reader.skipElement(); + } + } + + return deserializedListBlobsFlatSegmentResponse; + }); + } +} diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/ListBlobsHierarchySegmentResponse.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/ListBlobsHierarchySegmentResponse.java new file mode 100644 index 000000000000..670a011eac18 --- /dev/null +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/ListBlobsHierarchySegmentResponse.java @@ -0,0 +1,303 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.storage.blob.models; + +import com.azure.core.v2.annotation.Fluent; +import com.azure.core.v2.util.CoreUtils; +import io.clientcore.core.serialization.xml.XmlReader; +import io.clientcore.core.serialization.xml.XmlSerializable; +import io.clientcore.core.serialization.xml.XmlToken; +import io.clientcore.core.serialization.xml.XmlWriter; +import javax.xml.namespace.QName; +import javax.xml.stream.XMLStreamException; + +/** + * An enumeration of blobs. + */ +@Fluent +public final class ListBlobsHierarchySegmentResponse implements XmlSerializable { + /* + * The ServiceEndpoint property. + */ + private String serviceEndpoint; + + /* + * The ContainerName property. + */ + private String containerName; + + /* + * The Prefix property. + */ + private String prefix; + + /* + * The Marker property. + */ + private String marker; + + /* + * The MaxResults property. + */ + private int maxResults; + + /* + * The Delimiter property. + */ + private String delimiter; + + /* + * The Segment property. + */ + private BlobHierarchyListSegment segment; + + /* + * The NextMarker property. + */ + private String nextMarker; + + /** + * Creates an instance of ListBlobsHierarchySegmentResponse class. + */ + public ListBlobsHierarchySegmentResponse() { + } + + /** + * Get the serviceEndpoint property: The ServiceEndpoint property. + * + * @return the serviceEndpoint value. + */ + public String getServiceEndpoint() { + return this.serviceEndpoint; + } + + /** + * Set the serviceEndpoint property: The ServiceEndpoint property. + * + * @param serviceEndpoint the serviceEndpoint value to set. + * @return the ListBlobsHierarchySegmentResponse object itself. + */ + public ListBlobsHierarchySegmentResponse setServiceEndpoint(String serviceEndpoint) { + this.serviceEndpoint = serviceEndpoint; + return this; + } + + /** + * Get the containerName property: The ContainerName property. + * + * @return the containerName value. + */ + public String getContainerName() { + return this.containerName; + } + + /** + * Set the containerName property: The ContainerName property. + * + * @param containerName the containerName value to set. + * @return the ListBlobsHierarchySegmentResponse object itself. + */ + public ListBlobsHierarchySegmentResponse setContainerName(String containerName) { + this.containerName = containerName; + return this; + } + + /** + * Get the prefix property: The Prefix property. + * + * @return the prefix value. + */ + public String getPrefix() { + return this.prefix; + } + + /** + * Set the prefix property: The Prefix property. + * + * @param prefix the prefix value to set. + * @return the ListBlobsHierarchySegmentResponse object itself. + */ + public ListBlobsHierarchySegmentResponse setPrefix(String prefix) { + this.prefix = prefix; + return this; + } + + /** + * Get the marker property: The Marker property. + * + * @return the marker value. + */ + public String getMarker() { + return this.marker; + } + + /** + * Set the marker property: The Marker property. + * + * @param marker the marker value to set. + * @return the ListBlobsHierarchySegmentResponse object itself. + */ + public ListBlobsHierarchySegmentResponse setMarker(String marker) { + this.marker = marker; + return this; + } + + /** + * Get the maxResults property: The MaxResults property. + * + * @return the maxResults value. + */ + public int getMaxResults() { + return this.maxResults; + } + + /** + * Set the maxResults property: The MaxResults property. + * + * @param maxResults the maxResults value to set. + * @return the ListBlobsHierarchySegmentResponse object itself. + */ + public ListBlobsHierarchySegmentResponse setMaxResults(int maxResults) { + this.maxResults = maxResults; + return this; + } + + /** + * Get the delimiter property: The Delimiter property. + * + * @return the delimiter value. + */ + 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. + */ + public ListBlobsHierarchySegmentResponse setDelimiter(String delimiter) { + this.delimiter = delimiter; + return this; + } + + /** + * Get the segment property: The Segment property. + * + * @return the segment value. + */ + 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. + */ + public ListBlobsHierarchySegmentResponse setSegment(BlobHierarchyListSegment segment) { + this.segment = segment; + 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 ListBlobsHierarchySegmentResponse object itself. + */ + public ListBlobsHierarchySegmentResponse setNextMarker(String nextMarker) { + this.nextMarker = nextMarker; + return this; + } + + @Override + public XmlWriter toXml(XmlWriter xmlWriter) throws XMLStreamException { + return toXml(xmlWriter, null); + } + + @Override + public XmlWriter toXml(XmlWriter xmlWriter, String rootElementName) throws XMLStreamException { + rootElementName = CoreUtils.isNullOrEmpty(rootElementName) ? "EnumerationResults" : rootElementName; + xmlWriter.writeStartElement(rootElementName); + xmlWriter.writeStringAttribute("ServiceEndpoint", this.serviceEndpoint); + xmlWriter.writeStringAttribute("ContainerName", this.containerName); + xmlWriter.writeStringElement("Prefix", this.prefix); + xmlWriter.writeStringElement("Marker", this.marker); + xmlWriter.writeIntElement("MaxResults", this.maxResults); + xmlWriter.writeStringElement("Delimiter", this.delimiter); + xmlWriter.writeXml(this.segment, "Blobs"); + xmlWriter.writeStringElement("NextMarker", this.nextMarker); + return xmlWriter.writeEndElement(); + } + + /** + * Reads an instance of ListBlobsHierarchySegmentResponse from the XmlReader. + * + * @param xmlReader The XmlReader being read. + * @return An instance of ListBlobsHierarchySegmentResponse if the XmlReader was pointing to an instance of it, or + * null if it was pointing to XML null. + * @throws XMLStreamException If an error occurs while reading the ListBlobsHierarchySegmentResponse. + */ + public static ListBlobsHierarchySegmentResponse fromXml(XmlReader xmlReader) throws XMLStreamException { + return fromXml(xmlReader, null); + } + + /** + * Reads an instance of ListBlobsHierarchySegmentResponse from the XmlReader. + * + * @param xmlReader The XmlReader being read. + * @param rootElementName Optional root element name to override the default defined by the model. Used to support + * cases where the model can deserialize from different root element names. + * @return An instance of ListBlobsHierarchySegmentResponse if the XmlReader was pointing to an instance of it, or + * null if it was pointing to XML null. + * @throws XMLStreamException If an error occurs while reading the ListBlobsHierarchySegmentResponse. + */ + public static ListBlobsHierarchySegmentResponse fromXml(XmlReader xmlReader, String rootElementName) + throws XMLStreamException { + String finalRootElementName = CoreUtils.isNullOrEmpty(rootElementName) ? "EnumerationResults" : rootElementName; + return xmlReader.readObject(finalRootElementName, reader -> { + ListBlobsHierarchySegmentResponse deserializedListBlobsHierarchySegmentResponse + = new ListBlobsHierarchySegmentResponse(); + deserializedListBlobsHierarchySegmentResponse.serviceEndpoint + = reader.getStringAttribute(null, "ServiceEndpoint"); + deserializedListBlobsHierarchySegmentResponse.containerName + = reader.getStringAttribute(null, "ContainerName"); + while (reader.nextElement() != XmlToken.END_ELEMENT) { + QName elementName = reader.getElementName(); + + if ("Prefix".equals(elementName.getLocalPart())) { + deserializedListBlobsHierarchySegmentResponse.prefix = reader.getStringElement(); + } else if ("Marker".equals(elementName.getLocalPart())) { + deserializedListBlobsHierarchySegmentResponse.marker = reader.getStringElement(); + } else if ("MaxResults".equals(elementName.getLocalPart())) { + deserializedListBlobsHierarchySegmentResponse.maxResults = reader.getIntElement(); + } else if ("Delimiter".equals(elementName.getLocalPart())) { + deserializedListBlobsHierarchySegmentResponse.delimiter = reader.getStringElement(); + } else if ("Blobs".equals(elementName.getLocalPart())) { + deserializedListBlobsHierarchySegmentResponse.segment + = BlobHierarchyListSegment.fromXml(reader, "Blobs"); + } else if ("NextMarker".equals(elementName.getLocalPart())) { + deserializedListBlobsHierarchySegmentResponse.nextMarker = reader.getStringElement(); + } else { + reader.skipElement(); + } + } + + return deserializedListBlobsHierarchySegmentResponse; + }); + } +} diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/ListBlobsIncludeItem.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/ListBlobsIncludeItem.java new file mode 100644 index 000000000000..975ec377007b --- /dev/null +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/ListBlobsIncludeItem.java @@ -0,0 +1,96 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.storage.blob.models; + +/** + * Defines values for ListBlobsIncludeItem. + */ +public enum ListBlobsIncludeItem { + /** + * Enum value copy. + */ + COPY("copy"), + + /** + * Enum value deleted. + */ + DELETED("deleted"), + + /** + * Enum value metadata. + */ + METADATA("metadata"), + + /** + * Enum value snapshots. + */ + SNAPSHOTS("snapshots"), + + /** + * Enum value uncommittedblobs. + */ + UNCOMMITTEDBLOBS("uncommittedblobs"), + + /** + * Enum value versions. + */ + VERSIONS("versions"), + + /** + * Enum value tags. + */ + TAGS("tags"), + + /** + * Enum value immutabilitypolicy. + */ + IMMUTABILITY_POLICY("immutabilitypolicy"), + + /** + * Enum value legalhold. + */ + LEGAL_HOLD("legalhold"), + + /** + * Enum value deletedwithversions. + */ + DELETED_WITH_VERSIONS("deletedwithversions"); + + /** + * The actual serialized value for a ListBlobsIncludeItem instance. + */ + private final String value; + + ListBlobsIncludeItem(String value) { + this.value = value; + } + + /** + * Parses a serialized value to a ListBlobsIncludeItem instance. + * + * @param value the serialized value to parse. + * @return the parsed ListBlobsIncludeItem object, or null if unable to parse. + */ + public static ListBlobsIncludeItem fromString(String value) { + if (value == null) { + return null; + } + ListBlobsIncludeItem[] items = ListBlobsIncludeItem.values(); + for (ListBlobsIncludeItem 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-v2/src/main/java/com/azure/storage/blob/models/PageBlobsClearPagesHeaders.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/PageBlobsClearPagesHeaders.java new file mode 100644 index 000000000000..b204712bf948 --- /dev/null +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/PageBlobsClearPagesHeaders.java @@ -0,0 +1,360 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.storage.blob.models; + +import com.azure.core.v2.annotation.Fluent; +import com.azure.core.v2.util.CoreUtils; +import io.clientcore.core.http.models.DateTimeRfc1123; +import io.clientcore.core.http.models.HttpHeaderName; +import io.clientcore.core.http.models.HttpHeaders; + +import java.time.OffsetDateTime; +import java.util.Base64; + +/** + * The PageBlobsClearPagesHeaders model. + */ +@Fluent +public final class PageBlobsClearPagesHeaders { + /* + * The x-ms-version property. + */ + private String xMsVersion; + + /* + * The ETag property. + */ + private String eTag; + + /* + * The x-ms-content-crc64 property. + */ + private byte[] xMsContentCrc64; + + /* + * The x-ms-blob-sequence-number property. + */ + private Long xMsBlobSequenceNumber; + + /* + * The Last-Modified property. + */ + private DateTimeRfc1123 lastModified; + + /* + * The x-ms-encryption-key-sha256 property. + */ + private String xMsEncryptionKeySha256; + + /* + * The x-ms-request-id property. + */ + private String xMsRequestId; + + /* + * The x-ms-request-server-encrypted property. + */ + private Boolean xMsRequestServerEncrypted; + + /* + * The x-ms-client-request-id property. + */ + private String xMsClientRequestId; + + /* + * The Date property. + */ + private DateTimeRfc1123 date; + + /* + * The Content-MD5 property. + */ + private byte[] contentMD5; + + private static final HttpHeaderName X_MS_VERSION = HttpHeaderName.fromString("x-ms-version"); + + private static final HttpHeaderName X_MS_CONTENT_CRC64 = HttpHeaderName.fromString("x-ms-content-crc64"); + + private static final HttpHeaderName X_MS_BLOB_SEQUENCE_NUMBER + = HttpHeaderName.fromString("x-ms-blob-sequence-number"); + + private static final HttpHeaderName X_MS_ENCRYPTION_KEY_SHA256 + = HttpHeaderName.fromString("x-ms-encryption-key-sha256"); + + private static final HttpHeaderName X_MS_REQUEST_SERVER_ENCRYPTED + = HttpHeaderName.fromString("x-ms-request-server-encrypted"); + + // HttpHeaders containing the raw property values. + /** + * Creates an instance of PageBlobsClearPagesHeaders class. + * + * @param rawHeaders The raw HttpHeaders that will be used to create the property values. + */ + public PageBlobsClearPagesHeaders(HttpHeaders rawHeaders) { + this.xMsVersion = rawHeaders.getValue(X_MS_VERSION); + this.eTag = rawHeaders.getValue(HttpHeaderName.ETAG); + String xMsContentCrc64 = rawHeaders.getValue(X_MS_CONTENT_CRC64); + if (xMsContentCrc64 != null) { + this.xMsContentCrc64 = Base64.getDecoder().decode(xMsContentCrc64); + } + String xMsBlobSequenceNumber = rawHeaders.getValue(X_MS_BLOB_SEQUENCE_NUMBER); + if (xMsBlobSequenceNumber != null) { + this.xMsBlobSequenceNumber = Long.parseLong(xMsBlobSequenceNumber); + } + String lastModified = rawHeaders.getValue(HttpHeaderName.LAST_MODIFIED); + if (lastModified != null) { + this.lastModified = new DateTimeRfc1123(lastModified); + } + this.xMsEncryptionKeySha256 = rawHeaders.getValue(X_MS_ENCRYPTION_KEY_SHA256); + this.xMsRequestId = rawHeaders.getValue(HttpHeaderName.fromString("x-ms-request-id")); + String xMsRequestServerEncrypted = rawHeaders.getValue(X_MS_REQUEST_SERVER_ENCRYPTED); + if (xMsRequestServerEncrypted != null) { + this.xMsRequestServerEncrypted = Boolean.parseBoolean(xMsRequestServerEncrypted); + } + this.xMsClientRequestId = rawHeaders.getValue(HttpHeaderName.fromString("x-ms-client-request-id")); + String date = rawHeaders.getValue(HttpHeaderName.DATE); + if (date != null) { + this.date = new DateTimeRfc1123(date); + } + String contentMD5 = rawHeaders.getValue(HttpHeaderName.CONTENT_MD5); + if (contentMD5 != null) { + this.contentMD5 = Base64.getDecoder().decode(contentMD5); + } + } + + /** + * 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 PageBlobsClearPagesHeaders object itself. + */ + public PageBlobsClearPagesHeaders 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 PageBlobsClearPagesHeaders object itself. + */ + public PageBlobsClearPagesHeaders setETag(String eTag) { + this.eTag = eTag; + return this; + } + + /** + * Get the xMsContentCrc64 property: The x-ms-content-crc64 property. + * + * @return the xMsContentCrc64 value. + */ + 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 PageBlobsClearPagesHeaders object itself. + */ + public PageBlobsClearPagesHeaders 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. + */ + 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 PageBlobsClearPagesHeaders object itself. + */ + public PageBlobsClearPagesHeaders setXMsBlobSequenceNumber(Long xMsBlobSequenceNumber) { + this.xMsBlobSequenceNumber = xMsBlobSequenceNumber; + 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 PageBlobsClearPagesHeaders object itself. + */ + public PageBlobsClearPagesHeaders setLastModified(OffsetDateTime lastModified) { + if (lastModified == null) { + this.lastModified = null; + } else { + this.lastModified = new DateTimeRfc1123(lastModified); + } + return this; + } + + /** + * Get the xMsEncryptionKeySha256 property: The x-ms-encryption-key-sha256 property. + * + * @return the xMsEncryptionKeySha256 value. + */ + 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 PageBlobsClearPagesHeaders object itself. + */ + public PageBlobsClearPagesHeaders setXMsEncryptionKeySha256(String xMsEncryptionKeySha256) { + this.xMsEncryptionKeySha256 = xMsEncryptionKeySha256; + 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 PageBlobsClearPagesHeaders object itself. + */ + public PageBlobsClearPagesHeaders setXMsRequestId(String xMsRequestId) { + this.xMsRequestId = xMsRequestId; + return this; + } + + /** + * Get the xMsRequestServerEncrypted property: The x-ms-request-server-encrypted property. + * + * @return the xMsRequestServerEncrypted value. + */ + 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 PageBlobsClearPagesHeaders object itself. + */ + public PageBlobsClearPagesHeaders setXMsRequestServerEncrypted(Boolean xMsRequestServerEncrypted) { + this.xMsRequestServerEncrypted = xMsRequestServerEncrypted; + 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 PageBlobsClearPagesHeaders object itself. + */ + public PageBlobsClearPagesHeaders setXMsClientRequestId(String xMsClientRequestId) { + this.xMsClientRequestId = xMsClientRequestId; + return this; + } + + /** + * Get the date property: The Date property. + * + * @return the date value. + */ + 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 PageBlobsClearPagesHeaders object itself. + */ + public PageBlobsClearPagesHeaders setDate(OffsetDateTime date) { + if (date == null) { + this.date = null; + } else { + this.date = new DateTimeRfc1123(date); + } + return this; + } + + /** + * Get the contentMD5 property: The Content-MD5 property. + * + * @return the contentMD5 value. + */ + 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. + */ + public PageBlobsClearPagesHeaders setContentMD5(byte[] contentMD5) { + this.contentMD5 = CoreUtils.clone(contentMD5); + return this; + } +} diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/PageBlobsCopyIncrementalHeaders.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/PageBlobsCopyIncrementalHeaders.java new file mode 100644 index 000000000000..f823aca53225 --- /dev/null +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/PageBlobsCopyIncrementalHeaders.java @@ -0,0 +1,264 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.storage.blob.models; + +import com.azure.core.v2.annotation.Fluent; +import io.clientcore.core.http.models.DateTimeRfc1123; +import io.clientcore.core.http.models.HttpHeaderName; +import io.clientcore.core.http.models.HttpHeaders; + +import java.time.OffsetDateTime; + +/** + * The PageBlobsCopyIncrementalHeaders model. + */ +@Fluent +public final class PageBlobsCopyIncrementalHeaders { + /* + * The x-ms-version property. + */ + private String xMsVersion; + + /* + * The x-ms-copy-id property. + */ + private String xMsCopyId; + + /* + * The ETag property. + */ + private String eTag; + + /* + * The Last-Modified property. + */ + private DateTimeRfc1123 lastModified; + + /* + * The x-ms-copy-status property. + */ + private CopyStatusType xMsCopyStatus; + + /* + * The x-ms-request-id property. + */ + private String xMsRequestId; + + /* + * The x-ms-client-request-id property. + */ + private String xMsClientRequestId; + + /* + * The Date property. + */ + private DateTimeRfc1123 date; + + private static final HttpHeaderName X_MS_VERSION = HttpHeaderName.fromString("x-ms-version"); + + private static final HttpHeaderName X_MS_COPY_ID = HttpHeaderName.fromString("x-ms-copy-id"); + + private static final HttpHeaderName X_MS_COPY_STATUS = HttpHeaderName.fromString("x-ms-copy-status"); + + // HttpHeaders containing the raw property values. + /** + * Creates an instance of PageBlobsCopyIncrementalHeaders class. + * + * @param rawHeaders The raw HttpHeaders that will be used to create the property values. + */ + public PageBlobsCopyIncrementalHeaders(HttpHeaders rawHeaders) { + this.xMsVersion = rawHeaders.getValue(X_MS_VERSION); + this.xMsCopyId = rawHeaders.getValue(X_MS_COPY_ID); + this.eTag = rawHeaders.getValue(HttpHeaderName.ETAG); + String lastModified = rawHeaders.getValue(HttpHeaderName.LAST_MODIFIED); + if (lastModified != null) { + this.lastModified = new DateTimeRfc1123(lastModified); + } + String xMsCopyStatus = rawHeaders.getValue(X_MS_COPY_STATUS); + if (xMsCopyStatus != null) { + this.xMsCopyStatus = CopyStatusType.fromString(xMsCopyStatus); + } + this.xMsRequestId = rawHeaders.getValue(HttpHeaderName.fromString("x-ms-request-id")); + this.xMsClientRequestId = rawHeaders.getValue(HttpHeaderName.fromString("x-ms-client-request-id")); + String date = rawHeaders.getValue(HttpHeaderName.DATE); + if (date != null) { + this.date = new DateTimeRfc1123(date); + } + } + + /** + * 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 PageBlobsCopyIncrementalHeaders object itself. + */ + public PageBlobsCopyIncrementalHeaders setXMsVersion(String xMsVersion) { + this.xMsVersion = xMsVersion; + return this; + } + + /** + * Get the xMsCopyId property: The x-ms-copy-id property. + * + * @return the xMsCopyId value. + */ + 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 PageBlobsCopyIncrementalHeaders object itself. + */ + public PageBlobsCopyIncrementalHeaders setXMsCopyId(String xMsCopyId) { + this.xMsCopyId = xMsCopyId; + 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 PageBlobsCopyIncrementalHeaders object itself. + */ + public PageBlobsCopyIncrementalHeaders 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 PageBlobsCopyIncrementalHeaders object itself. + */ + public PageBlobsCopyIncrementalHeaders setLastModified(OffsetDateTime lastModified) { + if (lastModified == null) { + this.lastModified = null; + } else { + this.lastModified = new DateTimeRfc1123(lastModified); + } + return this; + } + + /** + * Get the xMsCopyStatus property: The x-ms-copy-status property. + * + * @return the xMsCopyStatus value. + */ + 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 PageBlobsCopyIncrementalHeaders object itself. + */ + public PageBlobsCopyIncrementalHeaders setXMsCopyStatus(CopyStatusType xMsCopyStatus) { + this.xMsCopyStatus = xMsCopyStatus; + 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 PageBlobsCopyIncrementalHeaders object itself. + */ + public PageBlobsCopyIncrementalHeaders 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 PageBlobsCopyIncrementalHeaders object itself. + */ + public PageBlobsCopyIncrementalHeaders setXMsClientRequestId(String xMsClientRequestId) { + this.xMsClientRequestId = xMsClientRequestId; + return this; + } + + /** + * Get the date property: The Date property. + * + * @return the date value. + */ + 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 PageBlobsCopyIncrementalHeaders object itself. + */ + public PageBlobsCopyIncrementalHeaders 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-v2/src/main/java/com/azure/storage/blob/models/PageBlobsCreateHeaders.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/PageBlobsCreateHeaders.java new file mode 100644 index 000000000000..e0cab22f658c --- /dev/null +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/PageBlobsCreateHeaders.java @@ -0,0 +1,353 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.storage.blob.models; + +import com.azure.core.v2.annotation.Fluent; +import com.azure.core.v2.util.CoreUtils; +import io.clientcore.core.http.models.DateTimeRfc1123; +import io.clientcore.core.http.models.HttpHeaderName; +import io.clientcore.core.http.models.HttpHeaders; + +import java.time.OffsetDateTime; +import java.util.Base64; + +/** + * The PageBlobsCreateHeaders model. + */ +@Fluent +public final class PageBlobsCreateHeaders { + /* + * The x-ms-version property. + */ + private String xMsVersion; + + /* + * The ETag property. + */ + private String eTag; + + /* + * The Last-Modified property. + */ + private DateTimeRfc1123 lastModified; + + /* + * The x-ms-version-id property. + */ + private String xMsVersionId; + + /* + * The x-ms-encryption-key-sha256 property. + */ + private String xMsEncryptionKeySha256; + + /* + * The x-ms-request-id property. + */ + private String xMsRequestId; + + /* + * The x-ms-request-server-encrypted property. + */ + private Boolean xMsRequestServerEncrypted; + + /* + * The x-ms-client-request-id property. + */ + private String xMsClientRequestId; + + /* + * The Date property. + */ + private DateTimeRfc1123 date; + + /* + * The Content-MD5 property. + */ + private byte[] contentMD5; + + /* + * The x-ms-encryption-scope property. + */ + private String xMsEncryptionScope; + + private static final HttpHeaderName X_MS_VERSION = HttpHeaderName.fromString("x-ms-version"); + + private static final HttpHeaderName X_MS_VERSION_ID = HttpHeaderName.fromString("x-ms-version-id"); + + private static final HttpHeaderName X_MS_ENCRYPTION_KEY_SHA256 + = HttpHeaderName.fromString("x-ms-encryption-key-sha256"); + + private static final HttpHeaderName X_MS_REQUEST_SERVER_ENCRYPTED + = HttpHeaderName.fromString("x-ms-request-server-encrypted"); + + private static final HttpHeaderName X_MS_ENCRYPTION_SCOPE = HttpHeaderName.fromString("x-ms-encryption-scope"); + + // HttpHeaders containing the raw property values. + /** + * Creates an instance of PageBlobsCreateHeaders class. + * + * @param rawHeaders The raw HttpHeaders that will be used to create the property values. + */ + public PageBlobsCreateHeaders(HttpHeaders rawHeaders) { + this.xMsVersion = rawHeaders.getValue(X_MS_VERSION); + this.eTag = rawHeaders.getValue(HttpHeaderName.ETAG); + String lastModified = rawHeaders.getValue(HttpHeaderName.LAST_MODIFIED); + if (lastModified != null) { + this.lastModified = new DateTimeRfc1123(lastModified); + } + this.xMsVersionId = rawHeaders.getValue(X_MS_VERSION_ID); + this.xMsEncryptionKeySha256 = rawHeaders.getValue(X_MS_ENCRYPTION_KEY_SHA256); + this.xMsRequestId = rawHeaders.getValue(HttpHeaderName.fromString("x-ms-request-id")); + String xMsRequestServerEncrypted = rawHeaders.getValue(X_MS_REQUEST_SERVER_ENCRYPTED); + if (xMsRequestServerEncrypted != null) { + this.xMsRequestServerEncrypted = Boolean.parseBoolean(xMsRequestServerEncrypted); + } + this.xMsClientRequestId = rawHeaders.getValue(HttpHeaderName.fromString("x-ms-client-request-id")); + String date = rawHeaders.getValue(HttpHeaderName.DATE); + if (date != null) { + this.date = new DateTimeRfc1123(date); + } + String contentMD5 = rawHeaders.getValue(HttpHeaderName.CONTENT_MD5); + if (contentMD5 != null) { + this.contentMD5 = Base64.getDecoder().decode(contentMD5); + } + this.xMsEncryptionScope = rawHeaders.getValue(X_MS_ENCRYPTION_SCOPE); + } + + /** + * 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 PageBlobsCreateHeaders object itself. + */ + public PageBlobsCreateHeaders 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 PageBlobsCreateHeaders object itself. + */ + public PageBlobsCreateHeaders 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 PageBlobsCreateHeaders object itself. + */ + public PageBlobsCreateHeaders setLastModified(OffsetDateTime lastModified) { + if (lastModified == null) { + this.lastModified = null; + } else { + this.lastModified = new DateTimeRfc1123(lastModified); + } + return this; + } + + /** + * Get the xMsVersionId property: The x-ms-version-id property. + * + * @return the xMsVersionId value. + */ + 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 PageBlobsCreateHeaders object itself. + */ + public PageBlobsCreateHeaders setXMsVersionId(String xMsVersionId) { + this.xMsVersionId = xMsVersionId; + return this; + } + + /** + * Get the xMsEncryptionKeySha256 property: The x-ms-encryption-key-sha256 property. + * + * @return the xMsEncryptionKeySha256 value. + */ + 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 PageBlobsCreateHeaders object itself. + */ + public PageBlobsCreateHeaders setXMsEncryptionKeySha256(String xMsEncryptionKeySha256) { + this.xMsEncryptionKeySha256 = xMsEncryptionKeySha256; + 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 PageBlobsCreateHeaders object itself. + */ + public PageBlobsCreateHeaders setXMsRequestId(String xMsRequestId) { + this.xMsRequestId = xMsRequestId; + return this; + } + + /** + * Get the xMsRequestServerEncrypted property: The x-ms-request-server-encrypted property. + * + * @return the xMsRequestServerEncrypted value. + */ + 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. + */ + public PageBlobsCreateHeaders setXMsRequestServerEncrypted(Boolean xMsRequestServerEncrypted) { + this.xMsRequestServerEncrypted = xMsRequestServerEncrypted; + 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 PageBlobsCreateHeaders object itself. + */ + public PageBlobsCreateHeaders setXMsClientRequestId(String xMsClientRequestId) { + this.xMsClientRequestId = xMsClientRequestId; + return this; + } + + /** + * Get the date property: The Date property. + * + * @return the date value. + */ + 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 PageBlobsCreateHeaders object itself. + */ + public PageBlobsCreateHeaders setDate(OffsetDateTime date) { + if (date == null) { + this.date = null; + } else { + this.date = new DateTimeRfc1123(date); + } + return this; + } + + /** + * Get the contentMD5 property: The Content-MD5 property. + * + * @return the contentMD5 value. + */ + 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. + */ + public PageBlobsCreateHeaders setContentMD5(byte[] contentMD5) { + this.contentMD5 = CoreUtils.clone(contentMD5); + return this; + } + + /** + * Get the xMsEncryptionScope property: The x-ms-encryption-scope property. + * + * @return the xMsEncryptionScope value. + */ + 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 PageBlobsCreateHeaders object itself. + */ + public PageBlobsCreateHeaders setXMsEncryptionScope(String xMsEncryptionScope) { + this.xMsEncryptionScope = xMsEncryptionScope; + return this; + } +} diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/PageBlobsGetPageRangesDiffHeaders.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/PageBlobsGetPageRangesDiffHeaders.java new file mode 100644 index 000000000000..2bf196b93dc9 --- /dev/null +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/PageBlobsGetPageRangesDiffHeaders.java @@ -0,0 +1,237 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.storage.blob.models; + +import com.azure.core.v2.annotation.Fluent; +import io.clientcore.core.http.models.DateTimeRfc1123; +import io.clientcore.core.http.models.HttpHeaderName; +import io.clientcore.core.http.models.HttpHeaders; + +import java.time.OffsetDateTime; + +/** + * The PageBlobsGetPageRangesDiffHeaders model. + */ +@Fluent +public final class PageBlobsGetPageRangesDiffHeaders { + /* + * 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 date; + + private static final HttpHeaderName X_MS_VERSION = HttpHeaderName.fromString("x-ms-version"); + + private static final HttpHeaderName X_MS_BLOB_CONTENT_LENGTH + = HttpHeaderName.fromString("x-ms-blob-content-length"); + + // HttpHeaders containing the raw property values. + /** + * Creates an instance of PageBlobsGetPageRangesDiffHeaders class. + * + * @param rawHeaders The raw HttpHeaders that will be used to create the property values. + */ + public PageBlobsGetPageRangesDiffHeaders(HttpHeaders rawHeaders) { + this.xMsVersion = rawHeaders.getValue(X_MS_VERSION); + String xMsBlobContentLength = rawHeaders.getValue(X_MS_BLOB_CONTENT_LENGTH); + if (xMsBlobContentLength != null) { + this.xMsBlobContentLength = Long.parseLong(xMsBlobContentLength); + } + this.eTag = rawHeaders.getValue(HttpHeaderName.ETAG); + String lastModified = rawHeaders.getValue(HttpHeaderName.LAST_MODIFIED); + if (lastModified != null) { + this.lastModified = new DateTimeRfc1123(lastModified); + } + this.xMsRequestId = rawHeaders.getValue(HttpHeaderName.fromString("x-ms-request-id")); + this.xMsClientRequestId = rawHeaders.getValue(HttpHeaderName.fromString("x-ms-client-request-id")); + String date = rawHeaders.getValue(HttpHeaderName.DATE); + if (date != null) { + this.date = new DateTimeRfc1123(date); + } + } + + /** + * 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 PageBlobsGetPageRangesDiffHeaders object itself. + */ + public PageBlobsGetPageRangesDiffHeaders 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 PageBlobsGetPageRangesDiffHeaders object itself. + */ + public PageBlobsGetPageRangesDiffHeaders 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 PageBlobsGetPageRangesDiffHeaders object itself. + */ + public PageBlobsGetPageRangesDiffHeaders 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 PageBlobsGetPageRangesDiffHeaders object itself. + */ + public PageBlobsGetPageRangesDiffHeaders 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 PageBlobsGetPageRangesDiffHeaders object itself. + */ + public PageBlobsGetPageRangesDiffHeaders 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 PageBlobsGetPageRangesDiffHeaders object itself. + */ + public PageBlobsGetPageRangesDiffHeaders setXMsClientRequestId(String xMsClientRequestId) { + this.xMsClientRequestId = xMsClientRequestId; + return this; + } + + /** + * Get the date property: The Date property. + * + * @return the date value. + */ + 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 PageBlobsGetPageRangesDiffHeaders object itself. + */ + public PageBlobsGetPageRangesDiffHeaders 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-v2/src/main/java/com/azure/storage/blob/models/PageBlobsGetPageRangesHeaders.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/PageBlobsGetPageRangesHeaders.java new file mode 100644 index 000000000000..d10d3930d2f8 --- /dev/null +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/PageBlobsGetPageRangesHeaders.java @@ -0,0 +1,237 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.storage.blob.models; + +import com.azure.core.v2.annotation.Fluent; +import io.clientcore.core.http.models.DateTimeRfc1123; +import io.clientcore.core.http.models.HttpHeaderName; +import io.clientcore.core.http.models.HttpHeaders; + +import java.time.OffsetDateTime; + +/** + * The PageBlobsGetPageRangesHeaders model. + */ +@Fluent +public final class PageBlobsGetPageRangesHeaders { + /* + * 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 date; + + private static final HttpHeaderName X_MS_VERSION = HttpHeaderName.fromString("x-ms-version"); + + private static final HttpHeaderName X_MS_BLOB_CONTENT_LENGTH + = HttpHeaderName.fromString("x-ms-blob-content-length"); + + // HttpHeaders containing the raw property values. + /** + * Creates an instance of PageBlobsGetPageRangesHeaders class. + * + * @param rawHeaders The raw HttpHeaders that will be used to create the property values. + */ + public PageBlobsGetPageRangesHeaders(HttpHeaders rawHeaders) { + this.xMsVersion = rawHeaders.getValue(X_MS_VERSION); + String xMsBlobContentLength = rawHeaders.getValue(X_MS_BLOB_CONTENT_LENGTH); + if (xMsBlobContentLength != null) { + this.xMsBlobContentLength = Long.parseLong(xMsBlobContentLength); + } + this.eTag = rawHeaders.getValue(HttpHeaderName.ETAG); + String lastModified = rawHeaders.getValue(HttpHeaderName.LAST_MODIFIED); + if (lastModified != null) { + this.lastModified = new DateTimeRfc1123(lastModified); + } + this.xMsRequestId = rawHeaders.getValue(HttpHeaderName.fromString("x-ms-request-id")); + this.xMsClientRequestId = rawHeaders.getValue(HttpHeaderName.fromString("x-ms-client-request-id")); + String date = rawHeaders.getValue(HttpHeaderName.DATE); + if (date != null) { + this.date = new DateTimeRfc1123(date); + } + } + + /** + * 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 PageBlobsGetPageRangesHeaders object itself. + */ + public PageBlobsGetPageRangesHeaders 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 PageBlobsGetPageRangesHeaders object itself. + */ + public PageBlobsGetPageRangesHeaders 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 PageBlobsGetPageRangesHeaders object itself. + */ + public PageBlobsGetPageRangesHeaders 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 PageBlobsGetPageRangesHeaders object itself. + */ + public PageBlobsGetPageRangesHeaders 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 PageBlobsGetPageRangesHeaders object itself. + */ + public PageBlobsGetPageRangesHeaders 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 PageBlobsGetPageRangesHeaders object itself. + */ + public PageBlobsGetPageRangesHeaders setXMsClientRequestId(String xMsClientRequestId) { + this.xMsClientRequestId = xMsClientRequestId; + return this; + } + + /** + * Get the date property: The Date property. + * + * @return the date value. + */ + 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 PageBlobsGetPageRangesHeaders object itself. + */ + public PageBlobsGetPageRangesHeaders 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-v2/src/main/java/com/azure/storage/blob/models/PageBlobsResizeHeaders.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/PageBlobsResizeHeaders.java new file mode 100644 index 000000000000..575d8e80a4b7 --- /dev/null +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/PageBlobsResizeHeaders.java @@ -0,0 +1,237 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.storage.blob.models; + +import com.azure.core.v2.annotation.Fluent; +import io.clientcore.core.http.models.DateTimeRfc1123; +import io.clientcore.core.http.models.HttpHeaderName; +import io.clientcore.core.http.models.HttpHeaders; + +import java.time.OffsetDateTime; + +/** + * The PageBlobsResizeHeaders model. + */ +@Fluent +public final class PageBlobsResizeHeaders { + /* + * The x-ms-version property. + */ + private String xMsVersion; + + /* + * The ETag property. + */ + private String eTag; + + /* + * The x-ms-blob-sequence-number property. + */ + private Long xMsBlobSequenceNumber; + + /* + * 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 date; + + private static final HttpHeaderName X_MS_VERSION = HttpHeaderName.fromString("x-ms-version"); + + private static final HttpHeaderName X_MS_BLOB_SEQUENCE_NUMBER + = HttpHeaderName.fromString("x-ms-blob-sequence-number"); + + // HttpHeaders containing the raw property values. + /** + * Creates an instance of PageBlobsResizeHeaders class. + * + * @param rawHeaders The raw HttpHeaders that will be used to create the property values. + */ + public PageBlobsResizeHeaders(HttpHeaders rawHeaders) { + this.xMsVersion = rawHeaders.getValue(X_MS_VERSION); + this.eTag = rawHeaders.getValue(HttpHeaderName.ETAG); + String xMsBlobSequenceNumber = rawHeaders.getValue(X_MS_BLOB_SEQUENCE_NUMBER); + if (xMsBlobSequenceNumber != null) { + this.xMsBlobSequenceNumber = Long.parseLong(xMsBlobSequenceNumber); + } + String lastModified = rawHeaders.getValue(HttpHeaderName.LAST_MODIFIED); + if (lastModified != null) { + this.lastModified = new DateTimeRfc1123(lastModified); + } + this.xMsRequestId = rawHeaders.getValue(HttpHeaderName.fromString("x-ms-request-id")); + this.xMsClientRequestId = rawHeaders.getValue(HttpHeaderName.fromString("x-ms-client-request-id")); + String date = rawHeaders.getValue(HttpHeaderName.DATE); + if (date != null) { + this.date = new DateTimeRfc1123(date); + } + } + + /** + * 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 PageBlobsResizeHeaders object itself. + */ + public PageBlobsResizeHeaders 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 PageBlobsResizeHeaders object itself. + */ + public PageBlobsResizeHeaders setETag(String eTag) { + this.eTag = eTag; + return this; + } + + /** + * Get the xMsBlobSequenceNumber property: The x-ms-blob-sequence-number property. + * + * @return the xMsBlobSequenceNumber value. + */ + 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. + */ + public PageBlobsResizeHeaders setXMsBlobSequenceNumber(Long xMsBlobSequenceNumber) { + this.xMsBlobSequenceNumber = xMsBlobSequenceNumber; + 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 PageBlobsResizeHeaders object itself. + */ + public PageBlobsResizeHeaders 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 PageBlobsResizeHeaders object itself. + */ + public PageBlobsResizeHeaders 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 PageBlobsResizeHeaders object itself. + */ + public PageBlobsResizeHeaders setXMsClientRequestId(String xMsClientRequestId) { + this.xMsClientRequestId = xMsClientRequestId; + return this; + } + + /** + * Get the date property: The Date property. + * + * @return the date value. + */ + 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 PageBlobsResizeHeaders object itself. + */ + public PageBlobsResizeHeaders 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-v2/src/main/java/com/azure/storage/blob/models/PageBlobsUpdateSequenceNumberHeaders.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/PageBlobsUpdateSequenceNumberHeaders.java new file mode 100644 index 000000000000..f17ee6a3a835 --- /dev/null +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/PageBlobsUpdateSequenceNumberHeaders.java @@ -0,0 +1,237 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.storage.blob.models; + +import com.azure.core.v2.annotation.Fluent; +import io.clientcore.core.http.models.DateTimeRfc1123; +import io.clientcore.core.http.models.HttpHeaderName; +import io.clientcore.core.http.models.HttpHeaders; + +import java.time.OffsetDateTime; + +/** + * The PageBlobsUpdateSequenceNumberHeaders model. + */ +@Fluent +public final class PageBlobsUpdateSequenceNumberHeaders { + /* + * The x-ms-version property. + */ + private String xMsVersion; + + /* + * The ETag property. + */ + private String eTag; + + /* + * The x-ms-blob-sequence-number property. + */ + private Long xMsBlobSequenceNumber; + + /* + * 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 date; + + private static final HttpHeaderName X_MS_VERSION = HttpHeaderName.fromString("x-ms-version"); + + private static final HttpHeaderName X_MS_BLOB_SEQUENCE_NUMBER + = HttpHeaderName.fromString("x-ms-blob-sequence-number"); + + // 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.xMsVersion = rawHeaders.getValue(X_MS_VERSION); + this.eTag = rawHeaders.getValue(HttpHeaderName.ETAG); + String xMsBlobSequenceNumber = rawHeaders.getValue(X_MS_BLOB_SEQUENCE_NUMBER); + if (xMsBlobSequenceNumber != null) { + this.xMsBlobSequenceNumber = Long.parseLong(xMsBlobSequenceNumber); + } + String lastModified = rawHeaders.getValue(HttpHeaderName.LAST_MODIFIED); + if (lastModified != null) { + this.lastModified = new DateTimeRfc1123(lastModified); + } + this.xMsRequestId = rawHeaders.getValue(HttpHeaderName.fromString("x-ms-request-id")); + this.xMsClientRequestId = rawHeaders.getValue(HttpHeaderName.fromString("x-ms-client-request-id")); + String date = rawHeaders.getValue(HttpHeaderName.DATE); + if (date != null) { + this.date = new DateTimeRfc1123(date); + } + } + + /** + * 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 PageBlobsUpdateSequenceNumberHeaders object itself. + */ + public PageBlobsUpdateSequenceNumberHeaders 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 PageBlobsUpdateSequenceNumberHeaders object itself. + */ + public PageBlobsUpdateSequenceNumberHeaders setETag(String eTag) { + this.eTag = eTag; + return this; + } + + /** + * Get the xMsBlobSequenceNumber property: The x-ms-blob-sequence-number property. + * + * @return the xMsBlobSequenceNumber value. + */ + 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. + */ + public PageBlobsUpdateSequenceNumberHeaders setXMsBlobSequenceNumber(Long xMsBlobSequenceNumber) { + this.xMsBlobSequenceNumber = xMsBlobSequenceNumber; + 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 PageBlobsUpdateSequenceNumberHeaders object itself. + */ + public PageBlobsUpdateSequenceNumberHeaders 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 PageBlobsUpdateSequenceNumberHeaders object itself. + */ + public PageBlobsUpdateSequenceNumberHeaders 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 PageBlobsUpdateSequenceNumberHeaders object itself. + */ + public PageBlobsUpdateSequenceNumberHeaders setXMsClientRequestId(String xMsClientRequestId) { + this.xMsClientRequestId = xMsClientRequestId; + return this; + } + + /** + * Get the date property: The Date property. + * + * @return the date value. + */ + 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. + */ + 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-v2/src/main/java/com/azure/storage/blob/models/PageBlobsUploadPagesFromURLHeaders.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/PageBlobsUploadPagesFromURLHeaders.java new file mode 100644 index 000000000000..34c5dafc3691 --- /dev/null +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/PageBlobsUploadPagesFromURLHeaders.java @@ -0,0 +1,362 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.storage.blob.models; + +import com.azure.core.v2.annotation.Fluent; +import com.azure.core.v2.util.CoreUtils; +import io.clientcore.core.http.models.DateTimeRfc1123; +import io.clientcore.core.http.models.HttpHeaderName; +import io.clientcore.core.http.models.HttpHeaders; + +import java.time.OffsetDateTime; +import java.util.Base64; + +/** + * The PageBlobsUploadPagesFromURLHeaders model. + */ +@Fluent +public final class PageBlobsUploadPagesFromURLHeaders { + /* + * The x-ms-version property. + */ + private String xMsVersion; + + /* + * The ETag property. + */ + private String eTag; + + /* + * The x-ms-content-crc64 property. + */ + private byte[] xMsContentCrc64; + + /* + * The x-ms-blob-sequence-number property. + */ + private Long xMsBlobSequenceNumber; + + /* + * The Last-Modified property. + */ + private DateTimeRfc1123 lastModified; + + /* + * The x-ms-encryption-key-sha256 property. + */ + private String xMsEncryptionKeySha256; + + /* + * The x-ms-request-id property. + */ + private String xMsRequestId; + + /* + * The x-ms-request-server-encrypted property. + */ + private Boolean xMsRequestServerEncrypted; + + /* + * The Date property. + */ + private DateTimeRfc1123 date; + + /* + * The Content-MD5 property. + */ + private byte[] contentMD5; + + /* + * The x-ms-encryption-scope property. + */ + private String xMsEncryptionScope; + + private static final HttpHeaderName X_MS_VERSION = HttpHeaderName.fromString("x-ms-version"); + + private static final HttpHeaderName X_MS_CONTENT_CRC64 = HttpHeaderName.fromString("x-ms-content-crc64"); + + private static final HttpHeaderName X_MS_BLOB_SEQUENCE_NUMBER + = HttpHeaderName.fromString("x-ms-blob-sequence-number"); + + private static final HttpHeaderName X_MS_ENCRYPTION_KEY_SHA256 + = HttpHeaderName.fromString("x-ms-encryption-key-sha256"); + + private static final HttpHeaderName X_MS_REQUEST_SERVER_ENCRYPTED + = HttpHeaderName.fromString("x-ms-request-server-encrypted"); + + private static final HttpHeaderName X_MS_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.xMsVersion = rawHeaders.getValue(X_MS_VERSION); + this.eTag = rawHeaders.getValue(HttpHeaderName.ETAG); + String xMsContentCrc64 = rawHeaders.getValue(X_MS_CONTENT_CRC64); + if (xMsContentCrc64 != null) { + this.xMsContentCrc64 = Base64.getDecoder().decode(xMsContentCrc64); + } + String xMsBlobSequenceNumber = rawHeaders.getValue(X_MS_BLOB_SEQUENCE_NUMBER); + if (xMsBlobSequenceNumber != null) { + this.xMsBlobSequenceNumber = Long.parseLong(xMsBlobSequenceNumber); + } + String lastModified = rawHeaders.getValue(HttpHeaderName.LAST_MODIFIED); + if (lastModified != null) { + this.lastModified = new DateTimeRfc1123(lastModified); + } + this.xMsEncryptionKeySha256 = rawHeaders.getValue(X_MS_ENCRYPTION_KEY_SHA256); + this.xMsRequestId = rawHeaders.getValue(HttpHeaderName.fromString("x-ms-request-id")); + String xMsRequestServerEncrypted = rawHeaders.getValue(X_MS_REQUEST_SERVER_ENCRYPTED); + if (xMsRequestServerEncrypted != null) { + this.xMsRequestServerEncrypted = Boolean.parseBoolean(xMsRequestServerEncrypted); + } + String date = rawHeaders.getValue(HttpHeaderName.DATE); + if (date != null) { + this.date = new DateTimeRfc1123(date); + } + String contentMD5 = rawHeaders.getValue(HttpHeaderName.CONTENT_MD5); + if (contentMD5 != null) { + this.contentMD5 = Base64.getDecoder().decode(contentMD5); + } + this.xMsEncryptionScope = rawHeaders.getValue(X_MS_ENCRYPTION_SCOPE); + } + + /** + * 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 PageBlobsUploadPagesFromURLHeaders object itself. + */ + public PageBlobsUploadPagesFromURLHeaders 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 PageBlobsUploadPagesFromURLHeaders object itself. + */ + public PageBlobsUploadPagesFromURLHeaders setETag(String eTag) { + this.eTag = eTag; + return this; + } + + /** + * Get the xMsContentCrc64 property: The x-ms-content-crc64 property. + * + * @return the xMsContentCrc64 value. + */ + 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. + */ + 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. + */ + 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. + */ + public PageBlobsUploadPagesFromURLHeaders setXMsBlobSequenceNumber(Long xMsBlobSequenceNumber) { + this.xMsBlobSequenceNumber = xMsBlobSequenceNumber; + 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 PageBlobsUploadPagesFromURLHeaders object itself. + */ + public PageBlobsUploadPagesFromURLHeaders setLastModified(OffsetDateTime lastModified) { + if (lastModified == null) { + this.lastModified = null; + } else { + this.lastModified = new DateTimeRfc1123(lastModified); + } + return this; + } + + /** + * Get the xMsEncryptionKeySha256 property: The x-ms-encryption-key-sha256 property. + * + * @return the xMsEncryptionKeySha256 value. + */ + 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. + */ + public PageBlobsUploadPagesFromURLHeaders setXMsEncryptionKeySha256(String xMsEncryptionKeySha256) { + this.xMsEncryptionKeySha256 = xMsEncryptionKeySha256; + 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 PageBlobsUploadPagesFromURLHeaders object itself. + */ + public PageBlobsUploadPagesFromURLHeaders setXMsRequestId(String xMsRequestId) { + this.xMsRequestId = xMsRequestId; + return this; + } + + /** + * Get the xMsRequestServerEncrypted property: The x-ms-request-server-encrypted property. + * + * @return the xMsRequestServerEncrypted value. + */ + 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. + */ + public PageBlobsUploadPagesFromURLHeaders setXMsRequestServerEncrypted(Boolean xMsRequestServerEncrypted) { + this.xMsRequestServerEncrypted = xMsRequestServerEncrypted; + return this; + } + + /** + * Get the date property: The Date property. + * + * @return the date value. + */ + 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. + */ + public PageBlobsUploadPagesFromURLHeaders setDate(OffsetDateTime date) { + if (date == null) { + this.date = null; + } else { + this.date = new DateTimeRfc1123(date); + } + return this; + } + + /** + * Get the contentMD5 property: The Content-MD5 property. + * + * @return the contentMD5 value. + */ + 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. + */ + public PageBlobsUploadPagesFromURLHeaders setContentMD5(byte[] contentMD5) { + this.contentMD5 = CoreUtils.clone(contentMD5); + return this; + } + + /** + * Get the xMsEncryptionScope property: The x-ms-encryption-scope property. + * + * @return the xMsEncryptionScope value. + */ + 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. + */ + public PageBlobsUploadPagesFromURLHeaders setXMsEncryptionScope(String xMsEncryptionScope) { + this.xMsEncryptionScope = xMsEncryptionScope; + return this; + } +} diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/PageBlobsUploadPagesHeaders.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/PageBlobsUploadPagesHeaders.java new file mode 100644 index 000000000000..7d95a15991ae --- /dev/null +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/PageBlobsUploadPagesHeaders.java @@ -0,0 +1,416 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.storage.blob.models; + +import com.azure.core.v2.annotation.Fluent; +import com.azure.core.v2.util.CoreUtils; +import io.clientcore.core.http.models.DateTimeRfc1123; +import io.clientcore.core.http.models.HttpHeaderName; +import io.clientcore.core.http.models.HttpHeaders; + +import java.time.OffsetDateTime; +import java.util.Base64; + +/** + * The PageBlobsUploadPagesHeaders model. + */ +@Fluent +public final class PageBlobsUploadPagesHeaders { + /* + * The x-ms-version property. + */ + private String xMsVersion; + + /* + * The x-ms-content-crc64 property. + */ + private byte[] xMsContentCrc64; + + /* + * The x-ms-blob-sequence-number property. + */ + private Long xMsBlobSequenceNumber; + + /* + * The Last-Modified property. + */ + private DateTimeRfc1123 lastModified; + + /* + * The x-ms-encryption-key-sha256 property. + */ + private String xMsEncryptionKeySha256; + + /* + * The x-ms-structured-body property. + */ + private String xMsStructuredBody; + + /* + * The x-ms-request-server-encrypted property. + */ + private Boolean xMsRequestServerEncrypted; + + /* + * The Date property. + */ + private DateTimeRfc1123 date; + + /* + * The Content-MD5 property. + */ + private byte[] contentMD5; + + /* + * The ETag property. + */ + private String eTag; + + /* + * The x-ms-request-id property. + */ + private String xMsRequestId; + + /* + * The x-ms-client-request-id property. + */ + private String xMsClientRequestId; + + /* + * The x-ms-encryption-scope property. + */ + private String xMsEncryptionScope; + + private static final HttpHeaderName X_MS_VERSION = HttpHeaderName.fromString("x-ms-version"); + + private static final HttpHeaderName X_MS_CONTENT_CRC64 = HttpHeaderName.fromString("x-ms-content-crc64"); + + private static final HttpHeaderName X_MS_BLOB_SEQUENCE_NUMBER + = HttpHeaderName.fromString("x-ms-blob-sequence-number"); + + private static final HttpHeaderName X_MS_ENCRYPTION_KEY_SHA256 + = HttpHeaderName.fromString("x-ms-encryption-key-sha256"); + + private static final HttpHeaderName X_MS_STRUCTURED_BODY = HttpHeaderName.fromString("x-ms-structured-body"); + + private static final HttpHeaderName X_MS_REQUEST_SERVER_ENCRYPTED + = HttpHeaderName.fromString("x-ms-request-server-encrypted"); + + private static final HttpHeaderName X_MS_ENCRYPTION_SCOPE = HttpHeaderName.fromString("x-ms-encryption-scope"); + + // HttpHeaders containing the raw property values. + /** + * Creates an instance of PageBlobsUploadPagesHeaders class. + * + * @param rawHeaders The raw HttpHeaders that will be used to create the property values. + */ + public PageBlobsUploadPagesHeaders(HttpHeaders rawHeaders) { + this.xMsVersion = rawHeaders.getValue(X_MS_VERSION); + String xMsContentCrc64 = rawHeaders.getValue(X_MS_CONTENT_CRC64); + if (xMsContentCrc64 != null) { + this.xMsContentCrc64 = Base64.getDecoder().decode(xMsContentCrc64); + } + String xMsBlobSequenceNumber = rawHeaders.getValue(X_MS_BLOB_SEQUENCE_NUMBER); + if (xMsBlobSequenceNumber != null) { + this.xMsBlobSequenceNumber = Long.parseLong(xMsBlobSequenceNumber); + } + String lastModified = rawHeaders.getValue(HttpHeaderName.LAST_MODIFIED); + if (lastModified != null) { + this.lastModified = new DateTimeRfc1123(lastModified); + } + this.xMsEncryptionKeySha256 = rawHeaders.getValue(X_MS_ENCRYPTION_KEY_SHA256); + this.xMsStructuredBody = rawHeaders.getValue(X_MS_STRUCTURED_BODY); + String xMsRequestServerEncrypted = rawHeaders.getValue(X_MS_REQUEST_SERVER_ENCRYPTED); + if (xMsRequestServerEncrypted != null) { + this.xMsRequestServerEncrypted = Boolean.parseBoolean(xMsRequestServerEncrypted); + } + String date = rawHeaders.getValue(HttpHeaderName.DATE); + if (date != null) { + this.date = new DateTimeRfc1123(date); + } + String contentMD5 = rawHeaders.getValue(HttpHeaderName.CONTENT_MD5); + if (contentMD5 != null) { + this.contentMD5 = Base64.getDecoder().decode(contentMD5); + } + this.eTag = rawHeaders.getValue(HttpHeaderName.ETAG); + this.xMsRequestId = rawHeaders.getValue(HttpHeaderName.fromString("x-ms-request-id")); + this.xMsClientRequestId = rawHeaders.getValue(HttpHeaderName.fromString("x-ms-client-request-id")); + this.xMsEncryptionScope = rawHeaders.getValue(X_MS_ENCRYPTION_SCOPE); + } + + /** + * 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 PageBlobsUploadPagesHeaders object itself. + */ + public PageBlobsUploadPagesHeaders setXMsVersion(String xMsVersion) { + this.xMsVersion = xMsVersion; + return this; + } + + /** + * Get the xMsContentCrc64 property: The x-ms-content-crc64 property. + * + * @return the xMsContentCrc64 value. + */ + 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. + */ + 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. + */ + 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 PageBlobsUploadPagesHeaders object itself. + */ + public PageBlobsUploadPagesHeaders setXMsBlobSequenceNumber(Long xMsBlobSequenceNumber) { + this.xMsBlobSequenceNumber = xMsBlobSequenceNumber; + 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 PageBlobsUploadPagesHeaders object itself. + */ + public PageBlobsUploadPagesHeaders setLastModified(OffsetDateTime lastModified) { + if (lastModified == null) { + this.lastModified = null; + } else { + this.lastModified = new DateTimeRfc1123(lastModified); + } + return this; + } + + /** + * Get the xMsEncryptionKeySha256 property: The x-ms-encryption-key-sha256 property. + * + * @return the xMsEncryptionKeySha256 value. + */ + 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. + */ + public PageBlobsUploadPagesHeaders setXMsEncryptionKeySha256(String xMsEncryptionKeySha256) { + this.xMsEncryptionKeySha256 = xMsEncryptionKeySha256; + return this; + } + + /** + * Get the xMsStructuredBody property: The x-ms-structured-body property. + * + * @return the xMsStructuredBody value. + */ + public String getXMsStructuredBody() { + return this.xMsStructuredBody; + } + + /** + * Set the xMsStructuredBody property: The x-ms-structured-body property. + * + * @param xMsStructuredBody the xMsStructuredBody value to set. + * @return the PageBlobsUploadPagesHeaders object itself. + */ + public PageBlobsUploadPagesHeaders setXMsStructuredBody(String xMsStructuredBody) { + this.xMsStructuredBody = xMsStructuredBody; + return this; + } + + /** + * Get the xMsRequestServerEncrypted property: The x-ms-request-server-encrypted property. + * + * @return the xMsRequestServerEncrypted value. + */ + 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. + */ + public PageBlobsUploadPagesHeaders setXMsRequestServerEncrypted(Boolean xMsRequestServerEncrypted) { + this.xMsRequestServerEncrypted = xMsRequestServerEncrypted; + return this; + } + + /** + * Get the date property: The Date property. + * + * @return the date value. + */ + 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 PageBlobsUploadPagesHeaders object itself. + */ + public PageBlobsUploadPagesHeaders setDate(OffsetDateTime date) { + if (date == null) { + this.date = null; + } else { + this.date = new DateTimeRfc1123(date); + } + return this; + } + + /** + * Get the contentMD5 property: The Content-MD5 property. + * + * @return the contentMD5 value. + */ + 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. + */ + public PageBlobsUploadPagesHeaders setContentMD5(byte[] contentMD5) { + this.contentMD5 = CoreUtils.clone(contentMD5); + 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 PageBlobsUploadPagesHeaders object itself. + */ + public PageBlobsUploadPagesHeaders setETag(String eTag) { + this.eTag = eTag; + 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 PageBlobsUploadPagesHeaders object itself. + */ + public PageBlobsUploadPagesHeaders 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 PageBlobsUploadPagesHeaders object itself. + */ + public PageBlobsUploadPagesHeaders setXMsClientRequestId(String xMsClientRequestId) { + this.xMsClientRequestId = xMsClientRequestId; + return this; + } + + /** + * Get the xMsEncryptionScope property: The x-ms-encryption-scope property. + * + * @return the xMsEncryptionScope value. + */ + 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 PageBlobsUploadPagesHeaders object itself. + */ + public PageBlobsUploadPagesHeaders setXMsEncryptionScope(String xMsEncryptionScope) { + this.xMsEncryptionScope = xMsEncryptionScope; + return this; + } +} diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/PageList.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/PageList.java new file mode 100644 index 000000000000..ef7300b0eb2a --- /dev/null +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/PageList.java @@ -0,0 +1,170 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.storage.blob.models; + +import com.azure.core.v2.annotation.Fluent; +import com.azure.core.v2.util.CoreUtils; +import io.clientcore.core.serialization.xml.XmlReader; +import io.clientcore.core.serialization.xml.XmlSerializable; +import io.clientcore.core.serialization.xml.XmlToken; +import io.clientcore.core.serialization.xml.XmlWriter; +import java.util.ArrayList; +import java.util.List; +import javax.xml.namespace.QName; +import javax.xml.stream.XMLStreamException; + +/** + * the list of pages. + */ +@Fluent +public final class PageList implements XmlSerializable { + /* + * The PageRange property. + */ + private List pageRange = new ArrayList<>(); + + /* + * The ClearRange property. + */ + private List clearRange = new ArrayList<>(); + + /* + * The NextMarker property. + */ + private String nextMarker; + + /** + * Creates an instance of PageList class. + */ + public PageList() { + } + + /** + * Get the pageRange property: The PageRange property. + * + * @return the pageRange value. + */ + public List getPageRange() { + return this.pageRange; + } + + /** + * Set the pageRange property: The PageRange property. + * + * @param pageRange the pageRange value to set. + * @return the PageList object itself. + */ + public PageList setPageRange(List pageRange) { + this.pageRange = pageRange; + return this; + } + + /** + * Get the clearRange property: The ClearRange property. + * + * @return the clearRange value. + */ + public List getClearRange() { + return this.clearRange; + } + + /** + * Set the clearRange property: The ClearRange property. + * + * @param clearRange the clearRange value to set. + * @return the PageList object itself. + */ + public PageList setClearRange(List clearRange) { + this.clearRange = clearRange; + 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 PageList object itself. + */ + public PageList setNextMarker(String nextMarker) { + this.nextMarker = nextMarker; + return this; + } + + @Override + public XmlWriter toXml(XmlWriter xmlWriter) throws XMLStreamException { + return toXml(xmlWriter, null); + } + + @Override + public XmlWriter toXml(XmlWriter xmlWriter, String rootElementName) throws XMLStreamException { + rootElementName = CoreUtils.isNullOrEmpty(rootElementName) ? "PageList" : rootElementName; + xmlWriter.writeStartElement(rootElementName); + if (this.pageRange != null) { + for (PageRange element : this.pageRange) { + xmlWriter.writeXml(element, "PageRange"); + } + } + if (this.clearRange != null) { + for (ClearRange element : this.clearRange) { + xmlWriter.writeXml(element, "ClearRange"); + } + } + xmlWriter.writeStringElement("NextMarker", this.nextMarker); + return xmlWriter.writeEndElement(); + } + + /** + * Reads an instance of PageList from the XmlReader. + * + * @param xmlReader The XmlReader being read. + * @return An instance of PageList if the XmlReader was pointing to an instance of it, or null if it was pointing to + * XML null. + * @throws XMLStreamException If an error occurs while reading the PageList. + */ + public static PageList fromXml(XmlReader xmlReader) throws XMLStreamException { + return fromXml(xmlReader, null); + } + + /** + * Reads an instance of PageList from the XmlReader. + * + * @param xmlReader The XmlReader being read. + * @param rootElementName Optional root element name to override the default defined by the model. Used to support + * cases where the model can deserialize from different root element names. + * @return An instance of PageList if the XmlReader was pointing to an instance of it, or null if it was pointing to + * XML null. + * @throws XMLStreamException If an error occurs while reading the PageList. + */ + public static PageList fromXml(XmlReader xmlReader, String rootElementName) throws XMLStreamException { + String finalRootElementName = CoreUtils.isNullOrEmpty(rootElementName) ? "PageList" : rootElementName; + return xmlReader.readObject(finalRootElementName, reader -> { + PageList deserializedPageList = new PageList(); + while (reader.nextElement() != XmlToken.END_ELEMENT) { + QName elementName = reader.getElementName(); + + if ("PageRange".equals(elementName.getLocalPart())) { + deserializedPageList.pageRange.add(PageRange.fromXml(reader, "PageRange")); + } else if ("ClearRange".equals(elementName.getLocalPart())) { + deserializedPageList.clearRange.add(ClearRange.fromXml(reader, "ClearRange")); + } else if ("NextMarker".equals(elementName.getLocalPart())) { + deserializedPageList.nextMarker = reader.getStringElement(); + } else { + reader.skipElement(); + } + } + + return deserializedPageList; + }); + } +} diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/PageRange.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/PageRange.java new file mode 100644 index 000000000000..43d01e8a5021 --- /dev/null +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/PageRange.java @@ -0,0 +1,132 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.storage.blob.models; + +import com.azure.core.v2.annotation.Fluent; +import com.azure.core.v2.util.CoreUtils; +import io.clientcore.core.serialization.xml.XmlReader; +import io.clientcore.core.serialization.xml.XmlSerializable; +import io.clientcore.core.serialization.xml.XmlToken; +import io.clientcore.core.serialization.xml.XmlWriter; +import javax.xml.namespace.QName; +import javax.xml.stream.XMLStreamException; + +/** + * The PageRange model. + */ +@Fluent +public final class PageRange implements XmlSerializable { + /* + * The Start property. + */ + private long start; + + /* + * The End property. + */ + private long end; + + /** + * Creates an instance of PageRange class. + */ + public PageRange() { + } + + /** + * Get the start property: The Start property. + * + * @return the start value. + */ + public long getStart() { + return this.start; + } + + /** + * Set the start property: The Start property. + * + * @param start the start value to set. + * @return the PageRange object itself. + */ + public PageRange setStart(long start) { + this.start = start; + return this; + } + + /** + * Get the end property: The End property. + * + * @return the end value. + */ + public long getEnd() { + return this.end; + } + + /** + * Set the end property: The End property. + * + * @param end the end value to set. + * @return the PageRange object itself. + */ + public PageRange setEnd(long end) { + this.end = end; + return this; + } + + @Override + public XmlWriter toXml(XmlWriter xmlWriter) throws XMLStreamException { + return toXml(xmlWriter, null); + } + + @Override + public XmlWriter toXml(XmlWriter xmlWriter, String rootElementName) throws XMLStreamException { + rootElementName = CoreUtils.isNullOrEmpty(rootElementName) ? "PageRange" : rootElementName; + xmlWriter.writeStartElement(rootElementName); + xmlWriter.writeLongElement("Start", this.start); + xmlWriter.writeLongElement("End", this.end); + return xmlWriter.writeEndElement(); + } + + /** + * Reads an instance of PageRange from the XmlReader. + * + * @param xmlReader The XmlReader being read. + * @return An instance of PageRange if the XmlReader was pointing to an instance of it, or null if it was pointing + * to XML null. + * @throws XMLStreamException If an error occurs while reading the PageRange. + */ + public static PageRange fromXml(XmlReader xmlReader) throws XMLStreamException { + return fromXml(xmlReader, null); + } + + /** + * Reads an instance of PageRange from the XmlReader. + * + * @param xmlReader The XmlReader being read. + * @param rootElementName Optional root element name to override the default defined by the model. Used to support + * cases where the model can deserialize from different root element names. + * @return An instance of PageRange if the XmlReader was pointing to an instance of it, or null if it was pointing + * to XML null. + * @throws XMLStreamException If an error occurs while reading the PageRange. + */ + public static PageRange fromXml(XmlReader xmlReader, String rootElementName) throws XMLStreamException { + String finalRootElementName = CoreUtils.isNullOrEmpty(rootElementName) ? "PageRange" : rootElementName; + return xmlReader.readObject(finalRootElementName, reader -> { + PageRange deserializedPageRange = new PageRange(); + while (reader.nextElement() != XmlToken.END_ELEMENT) { + QName elementName = reader.getElementName(); + + if ("Start".equals(elementName.getLocalPart())) { + deserializedPageRange.start = reader.getLongElement(); + } else if ("End".equals(elementName.getLocalPart())) { + deserializedPageRange.end = reader.getLongElement(); + } else { + reader.skipElement(); + } + } + + return deserializedPageRange; + }); + } +} diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/PremiumPageBlobAccessTier.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/PremiumPageBlobAccessTier.java new file mode 100644 index 000000000000..ff8f0800c5a0 --- /dev/null +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/PremiumPageBlobAccessTier.java @@ -0,0 +1,109 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.storage.blob.models; + +import io.clientcore.core.util.ExpandableEnum; +import java.util.Map; +import java.util.concurrent.ConcurrentHashMap; + +/** + * Defines values for PremiumPageBlobAccessTier. + */ +public final class PremiumPageBlobAccessTier implements ExpandableEnum { + private static final Map VALUES = new ConcurrentHashMap<>(); + + /** + * Static value P4 for PremiumPageBlobAccessTier. + */ + public static final PremiumPageBlobAccessTier P4 = fromString("P4"); + + /** + * Static value P6 for PremiumPageBlobAccessTier. + */ + public static final PremiumPageBlobAccessTier P6 = fromString("P6"); + + /** + * Static value P10 for PremiumPageBlobAccessTier. + */ + public static final PremiumPageBlobAccessTier P10 = fromString("P10"); + + /** + * Static value P15 for PremiumPageBlobAccessTier. + */ + public static final PremiumPageBlobAccessTier P15 = fromString("P15"); + + /** + * Static value P20 for PremiumPageBlobAccessTier. + */ + public static final PremiumPageBlobAccessTier P20 = fromString("P20"); + + /** + * Static value P30 for PremiumPageBlobAccessTier. + */ + public static final PremiumPageBlobAccessTier P30 = fromString("P30"); + + /** + * Static value P40 for PremiumPageBlobAccessTier. + */ + public static final PremiumPageBlobAccessTier P40 = fromString("P40"); + + /** + * Static value P50 for PremiumPageBlobAccessTier. + */ + public static final PremiumPageBlobAccessTier P50 = fromString("P50"); + + /** + * Static value P60 for PremiumPageBlobAccessTier. + */ + public static final PremiumPageBlobAccessTier P60 = fromString("P60"); + + /** + * Static value P70 for PremiumPageBlobAccessTier. + */ + public static final PremiumPageBlobAccessTier P70 = fromString("P70"); + + /** + * Static value P80 for PremiumPageBlobAccessTier. + */ + public static final PremiumPageBlobAccessTier P80 = fromString("P80"); + + private final String name; + + private PremiumPageBlobAccessTier(String name) { + this.name = name; + } + + /** + * Creates or finds a PremiumPageBlobAccessTier. + * + * @param name a name to look for. + * @return the corresponding PremiumPageBlobAccessTier. + */ + public static PremiumPageBlobAccessTier fromString(String name) { + if (name == null) { + return null; + } + PremiumPageBlobAccessTier value = VALUES.get(name); + if (value != null) { + return value; + } + return VALUES.computeIfAbsent(name, key -> new PremiumPageBlobAccessTier(key)); + } + + /** + * Gets the value of the PremiumPageBlobAccessTier instance. + * + * @return the value of the PremiumPageBlobAccessTier instance. + */ + @Override + public String getValue() { + return this.name; + } + + @Override + public String toString() { + return name; + } +} diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/PublicAccessType.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/PublicAccessType.java new file mode 100644 index 000000000000..5ce91fdd7acf --- /dev/null +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/PublicAccessType.java @@ -0,0 +1,64 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.storage.blob.models; + +import io.clientcore.core.util.ExpandableEnum; +import java.util.Map; +import java.util.concurrent.ConcurrentHashMap; + +/** + * Defines values for PublicAccessType. + */ +public final class PublicAccessType implements ExpandableEnum { + private static final Map VALUES = new ConcurrentHashMap<>(); + + /** + * Static value container for PublicAccessType. + */ + public static final PublicAccessType CONTAINER = fromString("container"); + + /** + * Static value blob for PublicAccessType. + */ + public static final PublicAccessType BLOB = fromString("blob"); + + private final String name; + + private PublicAccessType(String name) { + this.name = name; + } + + /** + * Creates or finds a PublicAccessType. + * + * @param name a name to look for. + * @return the corresponding PublicAccessType. + */ + public static PublicAccessType fromString(String name) { + if (name == null) { + return null; + } + PublicAccessType value = VALUES.get(name); + if (value != null) { + return value; + } + return VALUES.computeIfAbsent(name, key -> new PublicAccessType(key)); + } + + /** + * Gets the value of the PublicAccessType instance. + * + * @return the value of the PublicAccessType instance. + */ + @Override + public String getValue() { + return this.name; + } + + @Override + public String toString() { + return name; + } +} diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/QueryFormat.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/QueryFormat.java new file mode 100644 index 000000000000..6ed803d9b45e --- /dev/null +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/QueryFormat.java @@ -0,0 +1,224 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.storage.blob.models; + +import com.azure.core.v2.annotation.Fluent; +import com.azure.core.v2.util.CoreUtils; +import io.clientcore.core.serialization.xml.XmlReader; +import io.clientcore.core.serialization.xml.XmlSerializable; +import io.clientcore.core.serialization.xml.XmlToken; +import io.clientcore.core.serialization.xml.XmlWriter; +import javax.xml.namespace.QName; +import javax.xml.stream.XMLStreamException; + +/** + * The QueryFormat model. + */ +@Fluent +public final class QueryFormat implements XmlSerializable { + /* + * The quick query format type. + */ + private QueryFormatType type; + + /* + * Groups the settings used for interpreting the blob data if the blob is delimited text formatted. + */ + private DelimitedTextConfiguration delimitedTextConfiguration; + + /* + * json text configuration + */ + private JsonTextConfiguration jsonTextConfiguration; + + /* + * Groups the settings used for formatting the response if the response should be Arrow formatted. + */ + private ArrowConfiguration arrowConfiguration; + + /* + * parquet configuration + */ + private Object parquetTextConfiguration; + + /** + * Creates an instance of QueryFormat class. + */ + public QueryFormat() { + } + + /** + * Get the type property: The quick query format type. + * + * @return the type value. + */ + public QueryFormatType getType() { + return this.type; + } + + /** + * Set the type property: The quick query format type. + * + * @param type the type value to set. + * @return the QueryFormat object itself. + */ + 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. + * + * @return the delimitedTextConfiguration value. + */ + public DelimitedTextConfiguration getDelimitedTextConfiguration() { + return this.delimitedTextConfiguration; + } + + /** + * Set the delimitedTextConfiguration property: Groups the settings used for interpreting the blob data if the blob + * is delimited text formatted. + * + * @param delimitedTextConfiguration the delimitedTextConfiguration value to set. + * @return the QueryFormat object itself. + */ + public QueryFormat setDelimitedTextConfiguration(DelimitedTextConfiguration delimitedTextConfiguration) { + this.delimitedTextConfiguration = delimitedTextConfiguration; + return this; + } + + /** + * Get the jsonTextConfiguration property: json text configuration. + * + * @return the jsonTextConfiguration value. + */ + public JsonTextConfiguration getJsonTextConfiguration() { + return this.jsonTextConfiguration; + } + + /** + * Set the jsonTextConfiguration property: json text configuration. + * + * @param jsonTextConfiguration the jsonTextConfiguration value to set. + * @return the QueryFormat object itself. + */ + public QueryFormat setJsonTextConfiguration(JsonTextConfiguration 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. + * + * @return the arrowConfiguration value. + */ + public ArrowConfiguration getArrowConfiguration() { + return this.arrowConfiguration; + } + + /** + * Set the arrowConfiguration property: Groups the settings used for formatting the response if the response should + * be Arrow formatted. + * + * @param arrowConfiguration the arrowConfiguration value to set. + * @return the QueryFormat object itself. + */ + public QueryFormat setArrowConfiguration(ArrowConfiguration arrowConfiguration) { + this.arrowConfiguration = arrowConfiguration; + return this; + } + + /** + * Get the parquetTextConfiguration property: parquet configuration. + * + * @return the parquetTextConfiguration value. + */ + public Object getParquetTextConfiguration() { + return this.parquetTextConfiguration; + } + + /** + * Set the parquetTextConfiguration property: parquet configuration. + * + * @param parquetTextConfiguration the parquetTextConfiguration value to set. + * @return the QueryFormat object itself. + */ + public QueryFormat setParquetTextConfiguration(Object parquetTextConfiguration) { + this.parquetTextConfiguration = parquetTextConfiguration; + return this; + } + + @Override + public XmlWriter toXml(XmlWriter xmlWriter) throws XMLStreamException { + return toXml(xmlWriter, null); + } + + @Override + public XmlWriter toXml(XmlWriter xmlWriter, String rootElementName) throws XMLStreamException { + rootElementName = CoreUtils.isNullOrEmpty(rootElementName) ? "QueryFormat" : rootElementName; + xmlWriter.writeStartElement(rootElementName); + xmlWriter.writeStringElement("Type", this.type == null ? null : this.type.toString()); + xmlWriter.writeXml(this.delimitedTextConfiguration, "DelimitedTextConfiguration"); + xmlWriter.writeXml(this.jsonTextConfiguration, "JsonTextConfiguration"); + xmlWriter.writeXml(this.arrowConfiguration, "ArrowConfiguration"); + xmlWriter.writeStartElement("ParquetTextConfiguration").writeEndElement(); + return xmlWriter.writeEndElement(); + } + + /** + * Reads an instance of QueryFormat from the XmlReader. + * + * @param xmlReader The XmlReader being read. + * @return An instance of QueryFormat if the XmlReader was pointing to an instance of it, or null if it was pointing + * to XML null. + * @throws XMLStreamException If an error occurs while reading the QueryFormat. + */ + public static QueryFormat fromXml(XmlReader xmlReader) throws XMLStreamException { + return fromXml(xmlReader, null); + } + + /** + * Reads an instance of QueryFormat from the XmlReader. + * + * @param xmlReader The XmlReader being read. + * @param rootElementName Optional root element name to override the default defined by the model. Used to support + * cases where the model can deserialize from different root element names. + * @return An instance of QueryFormat if the XmlReader was pointing to an instance of it, or null if it was pointing + * to XML null. + * @throws XMLStreamException If an error occurs while reading the QueryFormat. + */ + public static QueryFormat fromXml(XmlReader xmlReader, String rootElementName) throws XMLStreamException { + String finalRootElementName = CoreUtils.isNullOrEmpty(rootElementName) ? "QueryFormat" : rootElementName; + return xmlReader.readObject(finalRootElementName, reader -> { + QueryFormat deserializedQueryFormat = new QueryFormat(); + while (reader.nextElement() != XmlToken.END_ELEMENT) { + QName elementName = reader.getElementName(); + + if ("Type".equals(elementName.getLocalPart())) { + deserializedQueryFormat.type = QueryFormatType.fromString(reader.getStringElement()); + } else if ("DelimitedTextConfiguration".equals(elementName.getLocalPart())) { + deserializedQueryFormat.delimitedTextConfiguration + = DelimitedTextConfiguration.fromXml(reader, "DelimitedTextConfiguration"); + } else if ("JsonTextConfiguration".equals(elementName.getLocalPart())) { + deserializedQueryFormat.jsonTextConfiguration + = JsonTextConfiguration.fromXml(reader, "JsonTextConfiguration"); + } else if ("ArrowConfiguration".equals(elementName.getLocalPart())) { + deserializedQueryFormat.arrowConfiguration + = ArrowConfiguration.fromXml(reader, "ArrowConfiguration"); + } else if ("ParquetTextConfiguration".equals(elementName.getLocalPart())) { + deserializedQueryFormat.parquetTextConfiguration = new Object(); + xmlReader.skipElement(); + } else { + reader.skipElement(); + } + } + + return deserializedQueryFormat; + }); + } +} diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/QueryFormatType.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/QueryFormatType.java new file mode 100644 index 000000000000..3f818deab4db --- /dev/null +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/QueryFormatType.java @@ -0,0 +1,66 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.storage.blob.models; + +/** + * The quick query format type. + */ +public enum QueryFormatType { + /** + * Enum value delimited. + */ + DELIMITED("delimited"), + + /** + * Enum value json. + */ + JSON("json"), + + /** + * Enum value arrow. + */ + ARROW("arrow"), + + /** + * Enum value parquet. + */ + PARQUET("parquet"); + + /** + * The actual serialized value for a QueryFormatType instance. + */ + private final String value; + + QueryFormatType(String value) { + this.value = value; + } + + /** + * Parses a serialized value to a QueryFormatType instance. + * + * @param value the serialized value to parse. + * @return the parsed QueryFormatType object, or null if unable to parse. + */ + public static QueryFormatType fromString(String value) { + if (value == null) { + return null; + } + QueryFormatType[] items = QueryFormatType.values(); + for (QueryFormatType 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-v2/src/main/java/com/azure/storage/blob/models/QueryRequest.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/QueryRequest.java new file mode 100644 index 000000000000..2c95a1a51aef --- /dev/null +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/QueryRequest.java @@ -0,0 +1,190 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.storage.blob.models; + +import com.azure.core.v2.annotation.Fluent; +import com.azure.core.v2.util.CoreUtils; +import io.clientcore.core.serialization.xml.XmlReader; +import io.clientcore.core.serialization.xml.XmlSerializable; +import io.clientcore.core.serialization.xml.XmlToken; +import io.clientcore.core.serialization.xml.XmlWriter; +import javax.xml.namespace.QName; +import javax.xml.stream.XMLStreamException; + +/** + * Groups the set of query request settings. + */ +@Fluent +public final class QueryRequest implements XmlSerializable { + /* + * Required. The type of the provided query expression. + */ + private String queryType = "SQL"; + + /* + * The query expression in SQL. The maximum size of the query expression is 256KiB. + */ + private String expression; + + /* + * The InputSerialization property. + */ + private QuerySerialization inputSerialization; + + /* + * The OutputSerialization property. + */ + private QuerySerialization outputSerialization; + + /** + * Creates an instance of QueryRequest class. + */ + public QueryRequest() { + } + + /** + * Get the queryType property: Required. The type of the provided query expression. + * + * @return the queryType value. + */ + public String getQueryType() { + return this.queryType; + } + + /** + * 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; + } + + /** + * Get the expression property: The query expression in SQL. The maximum size of the query expression is 256KiB. + * + * @return the expression value. + */ + public String getExpression() { + return this.expression; + } + + /** + * 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. + */ + public QueryRequest setExpression(String expression) { + this.expression = expression; + return this; + } + + /** + * Get the inputSerialization property: The InputSerialization property. + * + * @return the inputSerialization value. + */ + public QuerySerialization getInputSerialization() { + return this.inputSerialization; + } + + /** + * Set the inputSerialization property: The InputSerialization property. + * + * @param inputSerialization the inputSerialization value to set. + * @return the QueryRequest object itself. + */ + public QueryRequest setInputSerialization(QuerySerialization inputSerialization) { + this.inputSerialization = inputSerialization; + return this; + } + + /** + * Get the outputSerialization property: The OutputSerialization property. + * + * @return the outputSerialization value. + */ + public QuerySerialization getOutputSerialization() { + return this.outputSerialization; + } + + /** + * Set the outputSerialization property: The OutputSerialization property. + * + * @param outputSerialization the outputSerialization value to set. + * @return the QueryRequest object itself. + */ + public QueryRequest setOutputSerialization(QuerySerialization outputSerialization) { + this.outputSerialization = outputSerialization; + return this; + } + + @Override + public XmlWriter toXml(XmlWriter xmlWriter) throws XMLStreamException { + return toXml(xmlWriter, null); + } + + @Override + public XmlWriter toXml(XmlWriter xmlWriter, String rootElementName) throws XMLStreamException { + rootElementName = CoreUtils.isNullOrEmpty(rootElementName) ? "QueryRequest" : rootElementName; + xmlWriter.writeStartElement(rootElementName); + xmlWriter.writeStringElement("QueryType", this.queryType); + xmlWriter.writeStringElement("Expression", this.expression); + xmlWriter.writeXml(this.inputSerialization, "InputSerialization"); + xmlWriter.writeXml(this.outputSerialization, "OutputSerialization"); + return xmlWriter.writeEndElement(); + } + + /** + * Reads an instance of QueryRequest from the XmlReader. + * + * @param xmlReader The XmlReader being read. + * @return An instance of QueryRequest if the XmlReader was pointing to an instance of it, or null if it was + * pointing to XML null. + * @throws XMLStreamException If an error occurs while reading the QueryRequest. + */ + public static QueryRequest fromXml(XmlReader xmlReader) throws XMLStreamException { + return fromXml(xmlReader, null); + } + + /** + * Reads an instance of QueryRequest from the XmlReader. + * + * @param xmlReader The XmlReader being read. + * @param rootElementName Optional root element name to override the default defined by the model. Used to support + * cases where the model can deserialize from different root element names. + * @return An instance of QueryRequest if the XmlReader was pointing to an instance of it, or null if it was + * pointing to XML null. + * @throws XMLStreamException If an error occurs while reading the QueryRequest. + */ + public static QueryRequest fromXml(XmlReader xmlReader, String rootElementName) throws XMLStreamException { + String finalRootElementName = CoreUtils.isNullOrEmpty(rootElementName) ? "QueryRequest" : rootElementName; + return xmlReader.readObject(finalRootElementName, reader -> { + QueryRequest deserializedQueryRequest = new QueryRequest(); + while (reader.nextElement() != XmlToken.END_ELEMENT) { + QName elementName = reader.getElementName(); + + if ("QueryType".equals(elementName.getLocalPart())) { + deserializedQueryRequest.queryType = reader.getStringElement(); + } else if ("Expression".equals(elementName.getLocalPart())) { + deserializedQueryRequest.expression = reader.getStringElement(); + } else if ("InputSerialization".equals(elementName.getLocalPart())) { + deserializedQueryRequest.inputSerialization + = QuerySerialization.fromXml(reader, "InputSerialization"); + } else if ("OutputSerialization".equals(elementName.getLocalPart())) { + deserializedQueryRequest.outputSerialization + = QuerySerialization.fromXml(reader, "OutputSerialization"); + } else { + reader.skipElement(); + } + } + + return deserializedQueryRequest; + }); + } +} diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/QuerySerialization.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/QuerySerialization.java new file mode 100644 index 000000000000..d3da3960b1ee --- /dev/null +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/QuerySerialization.java @@ -0,0 +1,104 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.storage.blob.models; + +import com.azure.core.v2.annotation.Fluent; +import com.azure.core.v2.util.CoreUtils; +import io.clientcore.core.serialization.xml.XmlReader; +import io.clientcore.core.serialization.xml.XmlSerializable; +import io.clientcore.core.serialization.xml.XmlToken; +import io.clientcore.core.serialization.xml.XmlWriter; +import javax.xml.namespace.QName; +import javax.xml.stream.XMLStreamException; + +/** + * The QuerySerialization model. + */ +@Fluent +public final class QuerySerialization implements XmlSerializable { + /* + * The Format property. + */ + private QueryFormat format; + + /** + * Creates an instance of QuerySerialization class. + */ + public QuerySerialization() { + } + + /** + * Get the format property: The Format property. + * + * @return the format value. + */ + 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. + */ + public QuerySerialization setFormat(QueryFormat format) { + this.format = format; + return this; + } + + @Override + public XmlWriter toXml(XmlWriter xmlWriter) throws XMLStreamException { + return toXml(xmlWriter, null); + } + + @Override + public XmlWriter toXml(XmlWriter xmlWriter, String rootElementName) throws XMLStreamException { + rootElementName = CoreUtils.isNullOrEmpty(rootElementName) ? "QuerySerialization" : rootElementName; + xmlWriter.writeStartElement(rootElementName); + xmlWriter.writeXml(this.format, "Format"); + return xmlWriter.writeEndElement(); + } + + /** + * Reads an instance of QuerySerialization from the XmlReader. + * + * @param xmlReader The XmlReader being read. + * @return An instance of QuerySerialization if the XmlReader was pointing to an instance of it, or null if it was + * pointing to XML null. + * @throws XMLStreamException If an error occurs while reading the QuerySerialization. + */ + public static QuerySerialization fromXml(XmlReader xmlReader) throws XMLStreamException { + return fromXml(xmlReader, null); + } + + /** + * Reads an instance of QuerySerialization from the XmlReader. + * + * @param xmlReader The XmlReader being read. + * @param rootElementName Optional root element name to override the default defined by the model. Used to support + * cases where the model can deserialize from different root element names. + * @return An instance of QuerySerialization if the XmlReader was pointing to an instance of it, or null if it was + * pointing to XML null. + * @throws XMLStreamException If an error occurs while reading the QuerySerialization. + */ + public static QuerySerialization fromXml(XmlReader xmlReader, String rootElementName) throws XMLStreamException { + String finalRootElementName = CoreUtils.isNullOrEmpty(rootElementName) ? "QuerySerialization" : rootElementName; + return xmlReader.readObject(finalRootElementName, reader -> { + QuerySerialization deserializedQuerySerialization = new QuerySerialization(); + while (reader.nextElement() != XmlToken.END_ELEMENT) { + QName elementName = reader.getElementName(); + + if ("Format".equals(elementName.getLocalPart())) { + deserializedQuerySerialization.format = QueryFormat.fromXml(reader, "Format"); + } else { + reader.skipElement(); + } + } + + return deserializedQuerySerialization; + }); + } +} diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/RehydratePriority.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/RehydratePriority.java new file mode 100644 index 000000000000..12c21fd7a7ea --- /dev/null +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/RehydratePriority.java @@ -0,0 +1,65 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.storage.blob.models; + +import io.clientcore.core.util.ExpandableEnum; +import java.util.Map; +import java.util.concurrent.ConcurrentHashMap; + +/** + * If an object is in rehydrate pending state then this header is returned with priority of rehydrate. Valid values are + * High and Standard. + */ +public final class RehydratePriority implements ExpandableEnum { + private static final Map VALUES = new ConcurrentHashMap<>(); + + /** + * Static value High for RehydratePriority. + */ + public static final RehydratePriority HIGH = fromString("High"); + + /** + * Static value Standard for RehydratePriority. + */ + public static final RehydratePriority STANDARD = fromString("Standard"); + + private final String name; + + private RehydratePriority(String name) { + this.name = name; + } + + /** + * Creates or finds a RehydratePriority. + * + * @param name a name to look for. + * @return the corresponding RehydratePriority. + */ + public static RehydratePriority fromString(String name) { + if (name == null) { + return null; + } + RehydratePriority value = VALUES.get(name); + if (value != null) { + return value; + } + return VALUES.computeIfAbsent(name, key -> new RehydratePriority(key)); + } + + /** + * Gets the value of the RehydratePriority instance. + * + * @return the value of the RehydratePriority instance. + */ + @Override + public String getValue() { + return this.name; + } + + @Override + public String toString() { + return name; + } +} diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/SequenceNumberActionType.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/SequenceNumberActionType.java new file mode 100644 index 000000000000..b53fe1e30289 --- /dev/null +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/SequenceNumberActionType.java @@ -0,0 +1,61 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.storage.blob.models; + +/** + * Defines values for SequenceNumberActionType. + */ +public enum SequenceNumberActionType { + /** + * Enum value max. + */ + MAX("max"), + + /** + * Enum value update. + */ + UPDATE("update"), + + /** + * Enum value increment. + */ + INCREMENT("increment"); + + /** + * The actual serialized value for a SequenceNumberActionType instance. + */ + private final String value; + + SequenceNumberActionType(String value) { + this.value = value; + } + + /** + * 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. + */ + public static SequenceNumberActionType fromString(String value) { + if (value == null) { + return null; + } + SequenceNumberActionType[] items = SequenceNumberActionType.values(); + for (SequenceNumberActionType 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-v2/src/main/java/com/azure/storage/blob/models/ServicesFilterBlobsHeaders.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/ServicesFilterBlobsHeaders.java new file mode 100644 index 000000000000..36d48dc63a64 --- /dev/null +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/ServicesFilterBlobsHeaders.java @@ -0,0 +1,143 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.storage.blob.models; + +import com.azure.core.v2.annotation.Fluent; +import io.clientcore.core.http.models.DateTimeRfc1123; +import io.clientcore.core.http.models.HttpHeaderName; +import io.clientcore.core.http.models.HttpHeaders; + +import java.time.OffsetDateTime; + +/** + * The ServicesFilterBlobsHeaders model. + */ +@Fluent +public final class ServicesFilterBlobsHeaders { + /* + * The x-ms-version property. + */ + private String xMsVersion; + + /* + * The x-ms-request-id property. + */ + private String xMsRequestId; + + /* + * The x-ms-client-request-id property. + */ + private String xMsClientRequestId; + + /* + * The Date property. + */ + 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 ServicesFilterBlobsHeaders class. + * + * @param rawHeaders The raw HttpHeaders that will be used to create the property values. + */ + public ServicesFilterBlobsHeaders(HttpHeaders rawHeaders) { + this.xMsVersion = rawHeaders.getValue(X_MS_VERSION); + this.xMsRequestId = rawHeaders.getValue(HttpHeaderName.fromString("x-ms-request-id")); + this.xMsClientRequestId = rawHeaders.getValue(HttpHeaderName.fromString("x-ms-client-request-id")); + String date = rawHeaders.getValue(HttpHeaderName.DATE); + if (date != null) { + this.date = new DateTimeRfc1123(date); + } + } + + /** + * 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 ServicesFilterBlobsHeaders object itself. + */ + public ServicesFilterBlobsHeaders setXMsVersion(String xMsVersion) { + this.xMsVersion = xMsVersion; + 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 ServicesFilterBlobsHeaders object itself. + */ + public ServicesFilterBlobsHeaders 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 ServicesFilterBlobsHeaders object itself. + */ + public ServicesFilterBlobsHeaders setXMsClientRequestId(String xMsClientRequestId) { + this.xMsClientRequestId = xMsClientRequestId; + return this; + } + + /** + * Get the date property: The Date property. + * + * @return the date value. + */ + 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 ServicesFilterBlobsHeaders object itself. + */ + public ServicesFilterBlobsHeaders 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-v2/src/main/java/com/azure/storage/blob/models/ServicesGetAccountInfoHeaders.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/ServicesGetAccountInfoHeaders.java new file mode 100644 index 000000000000..02c822a54623 --- /dev/null +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/ServicesGetAccountInfoHeaders.java @@ -0,0 +1,236 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.storage.blob.models; + +import com.azure.core.v2.annotation.Fluent; +import io.clientcore.core.http.models.DateTimeRfc1123; +import io.clientcore.core.http.models.HttpHeaderName; +import io.clientcore.core.http.models.HttpHeaders; + +import java.time.OffsetDateTime; + +/** + * The ServicesGetAccountInfoHeaders model. + */ +@Fluent +public final class ServicesGetAccountInfoHeaders { + /* + * The x-ms-version property. + */ + private String xMsVersion; + + /* + * The x-ms-account-kind property. + */ + private AccountKind xMsAccountKind; + + /* + * The x-ms-is-hns-enabled property. + */ + private Boolean xMsIsHnsEnabled; + + /* + * The x-ms-sku-name property. + */ + private SkuName xMsSkuName; + + /* + * The x-ms-request-id property. + */ + private String xMsRequestId; + + /* + * The x-ms-client-request-id property. + */ + private String xMsClientRequestId; + + /* + * The Date property. + */ + private DateTimeRfc1123 date; + + private static final HttpHeaderName X_MS_VERSION = HttpHeaderName.fromString("x-ms-version"); + + private static final HttpHeaderName X_MS_ACCOUNT_KIND = HttpHeaderName.fromString("x-ms-account-kind"); + + private static final HttpHeaderName X_MS_IS_HNS_ENABLED = HttpHeaderName.fromString("x-ms-is-hns-enabled"); + + private static final HttpHeaderName X_MS_SKU_NAME = HttpHeaderName.fromString("x-ms-sku-name"); + + // HttpHeaders containing the raw property values. + /** + * Creates an instance of ServicesGetAccountInfoHeaders class. + * + * @param rawHeaders The raw HttpHeaders that will be used to create the property values. + */ + public ServicesGetAccountInfoHeaders(HttpHeaders rawHeaders) { + this.xMsVersion = rawHeaders.getValue(X_MS_VERSION); + String xMsAccountKind = rawHeaders.getValue(X_MS_ACCOUNT_KIND); + if (xMsAccountKind != null) { + this.xMsAccountKind = AccountKind.fromString(xMsAccountKind); + } + String xMsIsHnsEnabled = rawHeaders.getValue(X_MS_IS_HNS_ENABLED); + if (xMsIsHnsEnabled != null) { + this.xMsIsHnsEnabled = Boolean.parseBoolean(xMsIsHnsEnabled); + } + String xMsSkuName = rawHeaders.getValue(X_MS_SKU_NAME); + if (xMsSkuName != null) { + this.xMsSkuName = SkuName.fromString(xMsSkuName); + } + this.xMsRequestId = rawHeaders.getValue(HttpHeaderName.fromString("x-ms-request-id")); + this.xMsClientRequestId = rawHeaders.getValue(HttpHeaderName.fromString("x-ms-client-request-id")); + String date = rawHeaders.getValue(HttpHeaderName.DATE); + if (date != null) { + this.date = new DateTimeRfc1123(date); + } + } + + /** + * 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 ServicesGetAccountInfoHeaders object itself. + */ + public ServicesGetAccountInfoHeaders setXMsVersion(String xMsVersion) { + this.xMsVersion = xMsVersion; + return this; + } + + /** + * Get the xMsAccountKind property: The x-ms-account-kind property. + * + * @return the xMsAccountKind value. + */ + public AccountKind getXMsAccountKind() { + return this.xMsAccountKind; + } + + /** + * Set the xMsAccountKind property: The x-ms-account-kind property. + * + * @param xMsAccountKind the xMsAccountKind value to set. + * @return the ServicesGetAccountInfoHeaders object itself. + */ + public ServicesGetAccountInfoHeaders setXMsAccountKind(AccountKind xMsAccountKind) { + this.xMsAccountKind = xMsAccountKind; + return this; + } + + /** + * Get the xMsIsHnsEnabled property: The x-ms-is-hns-enabled property. + * + * @return the xMsIsHnsEnabled value. + */ + public Boolean isXMsIsHnsEnabled() { + return this.xMsIsHnsEnabled; + } + + /** + * Set the xMsIsHnsEnabled property: The x-ms-is-hns-enabled property. + * + * @param xMsIsHnsEnabled the xMsIsHnsEnabled value to set. + * @return the ServicesGetAccountInfoHeaders object itself. + */ + public ServicesGetAccountInfoHeaders setXMsIsHnsEnabled(Boolean xMsIsHnsEnabled) { + this.xMsIsHnsEnabled = xMsIsHnsEnabled; + return this; + } + + /** + * Get the xMsSkuName property: The x-ms-sku-name property. + * + * @return the xMsSkuName value. + */ + public SkuName getXMsSkuName() { + 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. + */ + public ServicesGetAccountInfoHeaders setXMsSkuName(SkuName xMsSkuName) { + this.xMsSkuName = xMsSkuName; + 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 ServicesGetAccountInfoHeaders object itself. + */ + public ServicesGetAccountInfoHeaders 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 ServicesGetAccountInfoHeaders object itself. + */ + public ServicesGetAccountInfoHeaders setXMsClientRequestId(String xMsClientRequestId) { + this.xMsClientRequestId = xMsClientRequestId; + return this; + } + + /** + * Get the date property: The Date property. + * + * @return the date value. + */ + 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 ServicesGetAccountInfoHeaders object itself. + */ + public ServicesGetAccountInfoHeaders 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-v2/src/main/java/com/azure/storage/blob/models/ServicesGetPropertiesHeaders.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/ServicesGetPropertiesHeaders.java new file mode 100644 index 000000000000..9ce90723e2da --- /dev/null +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/ServicesGetPropertiesHeaders.java @@ -0,0 +1,104 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.storage.blob.models; + +import com.azure.core.v2.annotation.Fluent; +import io.clientcore.core.http.models.HttpHeaderName; +import io.clientcore.core.http.models.HttpHeaders; + +/** + * The ServicesGetPropertiesHeaders model. + */ +@Fluent +public final class ServicesGetPropertiesHeaders { + /* + * The x-ms-version property. + */ + private String xMsVersion; + + /* + * The x-ms-request-id property. + */ + private String xMsRequestId; + + /* + * The x-ms-client-request-id property. + */ + private String xMsClientRequestId; + + private static final HttpHeaderName X_MS_VERSION = HttpHeaderName.fromString("x-ms-version"); + + // HttpHeaders containing the raw property values. + /** + * Creates an instance of ServicesGetPropertiesHeaders class. + * + * @param rawHeaders The raw HttpHeaders that will be used to create the property values. + */ + public ServicesGetPropertiesHeaders(HttpHeaders rawHeaders) { + this.xMsVersion = rawHeaders.getValue(X_MS_VERSION); + this.xMsRequestId = rawHeaders.getValue(HttpHeaderName.fromString("x-ms-request-id")); + this.xMsClientRequestId = rawHeaders.getValue(HttpHeaderName.fromString("x-ms-client-request-id")); + } + + /** + * 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 ServicesGetPropertiesHeaders object itself. + */ + public ServicesGetPropertiesHeaders setXMsVersion(String xMsVersion) { + this.xMsVersion = xMsVersion; + 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 ServicesGetPropertiesHeaders object itself. + */ + public ServicesGetPropertiesHeaders 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 ServicesGetPropertiesHeaders object itself. + */ + public ServicesGetPropertiesHeaders setXMsClientRequestId(String xMsClientRequestId) { + this.xMsClientRequestId = xMsClientRequestId; + return this; + } +} diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/ServicesGetStatisticsHeaders.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/ServicesGetStatisticsHeaders.java new file mode 100644 index 000000000000..47fd1a51dc00 --- /dev/null +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/ServicesGetStatisticsHeaders.java @@ -0,0 +1,143 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.storage.blob.models; + +import com.azure.core.v2.annotation.Fluent; +import io.clientcore.core.http.models.DateTimeRfc1123; +import io.clientcore.core.http.models.HttpHeaderName; +import io.clientcore.core.http.models.HttpHeaders; + +import java.time.OffsetDateTime; + +/** + * The ServicesGetStatisticsHeaders model. + */ +@Fluent +public final class ServicesGetStatisticsHeaders { + /* + * The x-ms-version property. + */ + private String xMsVersion; + + /* + * The x-ms-request-id property. + */ + private String xMsRequestId; + + /* + * The x-ms-client-request-id property. + */ + private String xMsClientRequestId; + + /* + * The Date property. + */ + 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 ServicesGetStatisticsHeaders class. + * + * @param rawHeaders The raw HttpHeaders that will be used to create the property values. + */ + public ServicesGetStatisticsHeaders(HttpHeaders rawHeaders) { + this.xMsVersion = rawHeaders.getValue(X_MS_VERSION); + this.xMsRequestId = rawHeaders.getValue(HttpHeaderName.fromString("x-ms-request-id")); + this.xMsClientRequestId = rawHeaders.getValue(HttpHeaderName.fromString("x-ms-client-request-id")); + String date = rawHeaders.getValue(HttpHeaderName.DATE); + if (date != null) { + this.date = new DateTimeRfc1123(date); + } + } + + /** + * 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 ServicesGetStatisticsHeaders object itself. + */ + public ServicesGetStatisticsHeaders setXMsVersion(String xMsVersion) { + this.xMsVersion = xMsVersion; + 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 ServicesGetStatisticsHeaders object itself. + */ + public ServicesGetStatisticsHeaders 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 ServicesGetStatisticsHeaders object itself. + */ + public ServicesGetStatisticsHeaders setXMsClientRequestId(String xMsClientRequestId) { + this.xMsClientRequestId = xMsClientRequestId; + return this; + } + + /** + * Get the date property: The Date property. + * + * @return the date value. + */ + 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 ServicesGetStatisticsHeaders object itself. + */ + public ServicesGetStatisticsHeaders 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-v2/src/main/java/com/azure/storage/blob/models/ServicesGetUserDelegationKeyHeaders.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/ServicesGetUserDelegationKeyHeaders.java new file mode 100644 index 000000000000..a2a6674f7de5 --- /dev/null +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/ServicesGetUserDelegationKeyHeaders.java @@ -0,0 +1,143 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.storage.blob.models; + +import com.azure.core.v2.annotation.Fluent; +import io.clientcore.core.http.models.DateTimeRfc1123; +import io.clientcore.core.http.models.HttpHeaderName; +import io.clientcore.core.http.models.HttpHeaders; + +import java.time.OffsetDateTime; + +/** + * The ServicesGetUserDelegationKeyHeaders model. + */ +@Fluent +public final class ServicesGetUserDelegationKeyHeaders { + /* + * The x-ms-version property. + */ + private String xMsVersion; + + /* + * The x-ms-request-id property. + */ + private String xMsRequestId; + + /* + * The x-ms-client-request-id property. + */ + private String xMsClientRequestId; + + /* + * The Date property. + */ + 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 ServicesGetUserDelegationKeyHeaders class. + * + * @param rawHeaders The raw HttpHeaders that will be used to create the property values. + */ + public ServicesGetUserDelegationKeyHeaders(HttpHeaders rawHeaders) { + this.xMsVersion = rawHeaders.getValue(X_MS_VERSION); + this.xMsRequestId = rawHeaders.getValue(HttpHeaderName.fromString("x-ms-request-id")); + this.xMsClientRequestId = rawHeaders.getValue(HttpHeaderName.fromString("x-ms-client-request-id")); + String date = rawHeaders.getValue(HttpHeaderName.DATE); + if (date != null) { + this.date = new DateTimeRfc1123(date); + } + } + + /** + * 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 ServicesGetUserDelegationKeyHeaders object itself. + */ + public ServicesGetUserDelegationKeyHeaders setXMsVersion(String xMsVersion) { + this.xMsVersion = xMsVersion; + 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 ServicesGetUserDelegationKeyHeaders object itself. + */ + public ServicesGetUserDelegationKeyHeaders 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 ServicesGetUserDelegationKeyHeaders object itself. + */ + public ServicesGetUserDelegationKeyHeaders setXMsClientRequestId(String xMsClientRequestId) { + this.xMsClientRequestId = xMsClientRequestId; + return this; + } + + /** + * Get the date property: The Date property. + * + * @return the date value. + */ + 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 ServicesGetUserDelegationKeyHeaders object itself. + */ + public ServicesGetUserDelegationKeyHeaders 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-v2/src/main/java/com/azure/storage/blob/models/ServicesListBlobContainersSegmentHeaders.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/ServicesListBlobContainersSegmentHeaders.java new file mode 100644 index 000000000000..81c019fc5cc1 --- /dev/null +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/ServicesListBlobContainersSegmentHeaders.java @@ -0,0 +1,104 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.storage.blob.models; + +import com.azure.core.v2.annotation.Fluent; +import io.clientcore.core.http.models.HttpHeaderName; +import io.clientcore.core.http.models.HttpHeaders; + +/** + * The ServicesListBlobContainersSegmentHeaders model. + */ +@Fluent +public final class ServicesListBlobContainersSegmentHeaders { + /* + * The x-ms-version property. + */ + private String xMsVersion; + + /* + * The x-ms-request-id property. + */ + private String xMsRequestId; + + /* + * The x-ms-client-request-id property. + */ + private String xMsClientRequestId; + + 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.xMsVersion = rawHeaders.getValue(X_MS_VERSION); + this.xMsRequestId = rawHeaders.getValue(HttpHeaderName.fromString("x-ms-request-id")); + this.xMsClientRequestId = rawHeaders.getValue(HttpHeaderName.fromString("x-ms-client-request-id")); + } + + /** + * 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 ServicesListBlobContainersSegmentHeaders object itself. + */ + public ServicesListBlobContainersSegmentHeaders setXMsVersion(String xMsVersion) { + this.xMsVersion = xMsVersion; + 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 ServicesListBlobContainersSegmentHeaders object itself. + */ + public ServicesListBlobContainersSegmentHeaders 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 ServicesListBlobContainersSegmentHeaders object itself. + */ + public ServicesListBlobContainersSegmentHeaders setXMsClientRequestId(String xMsClientRequestId) { + this.xMsClientRequestId = xMsClientRequestId; + return this; + } +} diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/ServicesListBlobContainersSegmentNextHeaders.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/ServicesListBlobContainersSegmentNextHeaders.java new file mode 100644 index 000000000000..8ed2d4a4ddd8 --- /dev/null +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/ServicesListBlobContainersSegmentNextHeaders.java @@ -0,0 +1,104 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.storage.blob.models; + +import com.azure.core.v2.annotation.Fluent; +import io.clientcore.core.http.models.HttpHeaderName; +import io.clientcore.core.http.models.HttpHeaders; + +/** + * The ServicesListBlobContainersSegmentNextHeaders model. + */ +@Fluent +public final class ServicesListBlobContainersSegmentNextHeaders { + /* + * The x-ms-version property. + */ + private String xMsVersion; + + /* + * The x-ms-request-id property. + */ + private String xMsRequestId; + + /* + * The x-ms-client-request-id property. + */ + private String xMsClientRequestId; + + 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.xMsVersion = rawHeaders.getValue(X_MS_VERSION); + this.xMsRequestId = rawHeaders.getValue(HttpHeaderName.fromString("x-ms-request-id")); + this.xMsClientRequestId = rawHeaders.getValue(HttpHeaderName.fromString("x-ms-client-request-id")); + } + + /** + * 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 ServicesListBlobContainersSegmentNextHeaders object itself. + */ + public ServicesListBlobContainersSegmentNextHeaders setXMsVersion(String xMsVersion) { + this.xMsVersion = xMsVersion; + 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 ServicesListBlobContainersSegmentNextHeaders object itself. + */ + public ServicesListBlobContainersSegmentNextHeaders 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 ServicesListBlobContainersSegmentNextHeaders object itself. + */ + public ServicesListBlobContainersSegmentNextHeaders setXMsClientRequestId(String xMsClientRequestId) { + this.xMsClientRequestId = xMsClientRequestId; + return this; + } +} diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/ServicesSetPropertiesHeaders.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/ServicesSetPropertiesHeaders.java new file mode 100644 index 000000000000..043f4f8ffe27 --- /dev/null +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/ServicesSetPropertiesHeaders.java @@ -0,0 +1,104 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.storage.blob.models; + +import com.azure.core.v2.annotation.Fluent; +import io.clientcore.core.http.models.HttpHeaderName; +import io.clientcore.core.http.models.HttpHeaders; + +/** + * The ServicesSetPropertiesHeaders model. + */ +@Fluent +public final class ServicesSetPropertiesHeaders { + /* + * The x-ms-version property. + */ + private String xMsVersion; + + /* + * The x-ms-request-id property. + */ + private String xMsRequestId; + + /* + * The x-ms-client-request-id property. + */ + private String xMsClientRequestId; + + private static final HttpHeaderName X_MS_VERSION = HttpHeaderName.fromString("x-ms-version"); + + // HttpHeaders containing the raw property values. + /** + * Creates an instance of ServicesSetPropertiesHeaders class. + * + * @param rawHeaders The raw HttpHeaders that will be used to create the property values. + */ + public ServicesSetPropertiesHeaders(HttpHeaders rawHeaders) { + this.xMsVersion = rawHeaders.getValue(X_MS_VERSION); + this.xMsRequestId = rawHeaders.getValue(HttpHeaderName.fromString("x-ms-request-id")); + this.xMsClientRequestId = rawHeaders.getValue(HttpHeaderName.fromString("x-ms-client-request-id")); + } + + /** + * 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 ServicesSetPropertiesHeaders object itself. + */ + public ServicesSetPropertiesHeaders setXMsVersion(String xMsVersion) { + this.xMsVersion = xMsVersion; + 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 ServicesSetPropertiesHeaders object itself. + */ + public ServicesSetPropertiesHeaders 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 ServicesSetPropertiesHeaders object itself. + */ + public ServicesSetPropertiesHeaders setXMsClientRequestId(String xMsClientRequestId) { + this.xMsClientRequestId = xMsClientRequestId; + return this; + } +} diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/ServicesSubmitBatchHeaders.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/ServicesSubmitBatchHeaders.java new file mode 100644 index 000000000000..7fd6a1d03a7b --- /dev/null +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/ServicesSubmitBatchHeaders.java @@ -0,0 +1,104 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.storage.blob.models; + +import com.azure.core.v2.annotation.Fluent; +import io.clientcore.core.http.models.HttpHeaderName; +import io.clientcore.core.http.models.HttpHeaders; + +/** + * The ServicesSubmitBatchHeaders model. + */ +@Fluent +public final class ServicesSubmitBatchHeaders { + /* + * The x-ms-version property. + */ + private String xMsVersion; + + /* + * The x-ms-request-id property. + */ + private String xMsRequestId; + + /* + * The Content-Type property. + */ + private String contentType; + + 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.xMsVersion = rawHeaders.getValue(X_MS_VERSION); + this.xMsRequestId = rawHeaders.getValue(HttpHeaderName.fromString("x-ms-request-id")); + this.contentType = rawHeaders.getValue(HttpHeaderName.CONTENT_TYPE); + } + + /** + * Get the xMsVersion property: The x-ms-version property. + * + * @return the xMsVersion value. + */ + public String getXMsVersion() { + return this.xMsVersion; + } + + /** + * Set the xMsVersion property: The x-ms-version property. + * + * @param xMsVersion the xMsVersion value to set. + * @return the ServicesSubmitBatchHeaders object itself. + */ + public ServicesSubmitBatchHeaders setXMsVersion(String xMsVersion) { + this.xMsVersion = xMsVersion; + 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 ServicesSubmitBatchHeaders object itself. + */ + public ServicesSubmitBatchHeaders setXMsRequestId(String xMsRequestId) { + this.xMsRequestId = xMsRequestId; + return this; + } + + /** + * Get the contentType property: The Content-Type property. + * + * @return the contentType value. + */ + 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. + */ + public ServicesSubmitBatchHeaders setContentType(String contentType) { + this.contentType = contentType; + return this; + } +} diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/SkuName.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/SkuName.java new file mode 100644 index 000000000000..bab2c5e601f7 --- /dev/null +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/SkuName.java @@ -0,0 +1,71 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.storage.blob.models; + +/** + * Defines values for SkuName. + */ +public enum SkuName { + /** + * Enum value Standard_LRS. + */ + STANDARD_LRS("Standard_LRS"), + + /** + * Enum value Standard_GRS. + */ + STANDARD_GRS("Standard_GRS"), + + /** + * Enum value Standard_RAGRS. + */ + STANDARD_RAGRS("Standard_RAGRS"), + + /** + * Enum value Standard_ZRS. + */ + STANDARD_ZRS("Standard_ZRS"), + + /** + * Enum value Premium_LRS. + */ + PREMIUM_LRS("Premium_LRS"); + + /** + * The actual serialized value for a SkuName instance. + */ + private final String value; + + SkuName(String value) { + this.value = value; + } + + /** + * Parses a serialized value to a SkuName instance. + * + * @param value the serialized value to parse. + * @return the parsed SkuName object, or null if unable to parse. + */ + public static SkuName fromString(String value) { + if (value == null) { + return null; + } + SkuName[] items = SkuName.values(); + for (SkuName 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-v2/src/main/java/com/azure/storage/blob/models/StaticWebsite.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/StaticWebsite.java new file mode 100644 index 000000000000..cf5a1d66f9bc --- /dev/null +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/StaticWebsite.java @@ -0,0 +1,188 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.storage.blob.models; + +import com.azure.core.v2.annotation.Fluent; +import com.azure.core.v2.util.CoreUtils; +import io.clientcore.core.serialization.xml.XmlReader; +import io.clientcore.core.serialization.xml.XmlSerializable; +import io.clientcore.core.serialization.xml.XmlToken; +import io.clientcore.core.serialization.xml.XmlWriter; +import javax.xml.namespace.QName; +import javax.xml.stream.XMLStreamException; + +/** + * The properties that enable an account to host a static website. + */ +@Fluent +public final class StaticWebsite implements XmlSerializable { + /* + * Indicates whether this account is hosting a static website + */ + private boolean enabled; + + /* + * The default name of the index page under each directory + */ + private String indexDocument; + + /* + * The absolute path of the custom 404 page + */ + private String errorDocument404Path; + + /* + * Absolute path of the default index page + */ + private String defaultIndexDocumentPath; + + /** + * Creates an instance of StaticWebsite class. + */ + public StaticWebsite() { + } + + /** + * Get the enabled property: Indicates whether this account is hosting a static website. + * + * @return the enabled value. + */ + public boolean isEnabled() { + return this.enabled; + } + + /** + * Set the enabled property: Indicates whether this account is hosting a static website. + * + * @param enabled the enabled value to set. + * @return the StaticWebsite object itself. + */ + public StaticWebsite setEnabled(boolean enabled) { + this.enabled = enabled; + return this; + } + + /** + * Get the indexDocument property: The default name of the index page under each directory. + * + * @return the indexDocument value. + */ + public String getIndexDocument() { + return this.indexDocument; + } + + /** + * Set the indexDocument property: The default name of the index page under each directory. + * + * @param indexDocument the indexDocument value to set. + * @return the StaticWebsite object itself. + */ + public StaticWebsite setIndexDocument(String indexDocument) { + this.indexDocument = indexDocument; + return this; + } + + /** + * Get the errorDocument404Path property: The absolute path of the custom 404 page. + * + * @return the errorDocument404Path value. + */ + public String getErrorDocument404Path() { + return this.errorDocument404Path; + } + + /** + * Set the errorDocument404Path property: The absolute path of the custom 404 page. + * + * @param errorDocument404Path the errorDocument404Path value to set. + * @return the StaticWebsite object itself. + */ + public StaticWebsite setErrorDocument404Path(String errorDocument404Path) { + this.errorDocument404Path = errorDocument404Path; + return this; + } + + /** + * Get the defaultIndexDocumentPath property: Absolute path of the default index page. + * + * @return the defaultIndexDocumentPath value. + */ + public String getDefaultIndexDocumentPath() { + return this.defaultIndexDocumentPath; + } + + /** + * Set the defaultIndexDocumentPath property: Absolute path of the default index page. + * + * @param defaultIndexDocumentPath the defaultIndexDocumentPath value to set. + * @return the StaticWebsite object itself. + */ + public StaticWebsite setDefaultIndexDocumentPath(String defaultIndexDocumentPath) { + this.defaultIndexDocumentPath = defaultIndexDocumentPath; + return this; + } + + @Override + public XmlWriter toXml(XmlWriter xmlWriter) throws XMLStreamException { + return toXml(xmlWriter, null); + } + + @Override + public XmlWriter toXml(XmlWriter xmlWriter, String rootElementName) throws XMLStreamException { + rootElementName = CoreUtils.isNullOrEmpty(rootElementName) ? "StaticWebsite" : rootElementName; + xmlWriter.writeStartElement(rootElementName); + xmlWriter.writeBooleanElement("Enabled", this.enabled); + xmlWriter.writeStringElement("IndexDocument", this.indexDocument); + xmlWriter.writeStringElement("ErrorDocument404Path", this.errorDocument404Path); + xmlWriter.writeStringElement("DefaultIndexDocumentPath", this.defaultIndexDocumentPath); + return xmlWriter.writeEndElement(); + } + + /** + * Reads an instance of StaticWebsite from the XmlReader. + * + * @param xmlReader The XmlReader being read. + * @return An instance of StaticWebsite if the XmlReader was pointing to an instance of it, or null if it was + * pointing to XML null. + * @throws XMLStreamException If an error occurs while reading the StaticWebsite. + */ + public static StaticWebsite fromXml(XmlReader xmlReader) throws XMLStreamException { + return fromXml(xmlReader, null); + } + + /** + * Reads an instance of StaticWebsite from the XmlReader. + * + * @param xmlReader The XmlReader being read. + * @param rootElementName Optional root element name to override the default defined by the model. Used to support + * cases where the model can deserialize from different root element names. + * @return An instance of StaticWebsite if the XmlReader was pointing to an instance of it, or null if it was + * pointing to XML null. + * @throws XMLStreamException If an error occurs while reading the StaticWebsite. + */ + public static StaticWebsite fromXml(XmlReader xmlReader, String rootElementName) throws XMLStreamException { + String finalRootElementName = CoreUtils.isNullOrEmpty(rootElementName) ? "StaticWebsite" : rootElementName; + return xmlReader.readObject(finalRootElementName, reader -> { + StaticWebsite deserializedStaticWebsite = new StaticWebsite(); + while (reader.nextElement() != XmlToken.END_ELEMENT) { + QName elementName = reader.getElementName(); + + if ("Enabled".equals(elementName.getLocalPart())) { + deserializedStaticWebsite.enabled = reader.getBooleanElement(); + } else if ("IndexDocument".equals(elementName.getLocalPart())) { + deserializedStaticWebsite.indexDocument = reader.getStringElement(); + } else if ("ErrorDocument404Path".equals(elementName.getLocalPart())) { + deserializedStaticWebsite.errorDocument404Path = reader.getStringElement(); + } else if ("DefaultIndexDocumentPath".equals(elementName.getLocalPart())) { + deserializedStaticWebsite.defaultIndexDocumentPath = reader.getStringElement(); + } else { + reader.skipElement(); + } + } + + return deserializedStaticWebsite; + }); + } +} diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/StorageError.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/StorageError.java new file mode 100644 index 000000000000..f00076fe34c0 --- /dev/null +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/StorageError.java @@ -0,0 +1,104 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.storage.blob.models; + +import com.azure.core.v2.annotation.Fluent; +import com.azure.core.v2.util.CoreUtils; +import io.clientcore.core.serialization.xml.XmlReader; +import io.clientcore.core.serialization.xml.XmlSerializable; +import io.clientcore.core.serialization.xml.XmlToken; +import io.clientcore.core.serialization.xml.XmlWriter; +import javax.xml.namespace.QName; +import javax.xml.stream.XMLStreamException; + +/** + * The StorageError model. + */ +@Fluent +public final class StorageError implements XmlSerializable { + /* + * The Message property. + */ + private String message; + + /** + * Creates an instance of StorageError class. + */ + public StorageError() { + } + + /** + * Get the message property: The Message property. + * + * @return the message value. + */ + 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. + */ + public StorageError setMessage(String message) { + this.message = message; + return this; + } + + @Override + public XmlWriter toXml(XmlWriter xmlWriter) throws XMLStreamException { + return toXml(xmlWriter, null); + } + + @Override + public XmlWriter toXml(XmlWriter xmlWriter, String rootElementName) throws XMLStreamException { + rootElementName = CoreUtils.isNullOrEmpty(rootElementName) ? "StorageError" : rootElementName; + xmlWriter.writeStartElement(rootElementName); + xmlWriter.writeStringElement("Message", this.message); + return xmlWriter.writeEndElement(); + } + + /** + * Reads an instance of StorageError from the XmlReader. + * + * @param xmlReader The XmlReader being read. + * @return An instance of StorageError if the XmlReader was pointing to an instance of it, or null if it was + * pointing to XML null. + * @throws XMLStreamException If an error occurs while reading the StorageError. + */ + public static StorageError fromXml(XmlReader xmlReader) throws XMLStreamException { + return fromXml(xmlReader, null); + } + + /** + * Reads an instance of StorageError from the XmlReader. + * + * @param xmlReader The XmlReader being read. + * @param rootElementName Optional root element name to override the default defined by the model. Used to support + * cases where the model can deserialize from different root element names. + * @return An instance of StorageError if the XmlReader was pointing to an instance of it, or null if it was + * pointing to XML null. + * @throws XMLStreamException If an error occurs while reading the StorageError. + */ + public static StorageError fromXml(XmlReader xmlReader, String rootElementName) throws XMLStreamException { + String finalRootElementName = CoreUtils.isNullOrEmpty(rootElementName) ? "StorageError" : rootElementName; + return xmlReader.readObject(finalRootElementName, reader -> { + StorageError deserializedStorageError = new StorageError(); + while (reader.nextElement() != XmlToken.END_ELEMENT) { + QName elementName = reader.getElementName(); + + if ("Message".equals(elementName.getLocalPart())) { + deserializedStorageError.message = reader.getStringElement(); + } else { + reader.skipElement(); + } + } + + return deserializedStorageError; + }); + } +} diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/StorageErrorException.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/StorageErrorException.java new file mode 100644 index 000000000000..4547e5ee9d27 --- /dev/null +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/StorageErrorException.java @@ -0,0 +1,42 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.storage.blob.models; + +import io.clientcore.core.http.exception.HttpResponseException; +import io.clientcore.core.http.models.Response; + +/** + * Exception thrown for an invalid response with StorageError information. + */ +public final class StorageErrorException extends HttpResponseException { + /** + * Initializes a new instance of the StorageErrorException class. + * + * @param message the exception message or the response content if a message is not available. + * @param response the HTTP response. + */ + public StorageErrorException(String message, Response response) { + super(message, response); + } + + /** + * Initializes a new instance of the StorageErrorException class. + * + * @param message the exception message or the response content if a message is not available. + * @param response the HTTP response. + * @param value the deserialized response value. + */ + public StorageErrorException(String message, Response response, StorageError value) { + super(message, response, value); + } + + /** + * {@inheritDoc} + */ + @Override + public StorageError getValue() { + return (StorageError) super.getValue(); + } +} diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/UserDelegationKey.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/UserDelegationKey.java new file mode 100644 index 000000000000..896c7d541a33 --- /dev/null +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/UserDelegationKey.java @@ -0,0 +1,278 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.storage.blob.models; + +import com.azure.core.v2.annotation.Fluent; +import com.azure.core.v2.util.CoreUtils; +import io.clientcore.core.serialization.xml.XmlReader; +import io.clientcore.core.serialization.xml.XmlSerializable; +import io.clientcore.core.serialization.xml.XmlToken; +import io.clientcore.core.serialization.xml.XmlWriter; +import java.time.OffsetDateTime; +import java.time.format.DateTimeFormatter; +import javax.xml.namespace.QName; +import javax.xml.stream.XMLStreamException; + +/** + * A user delegation key. + */ +@Fluent +public final class UserDelegationKey implements XmlSerializable { + /* + * The Azure Active Directory object ID in GUID format. + */ + private String signedObjectId; + + /* + * The Azure Active Directory tenant ID in GUID format + */ + private String signedTenantId; + + /* + * The date-time the key is active + */ + private OffsetDateTime signedStart; + + /* + * The date-time the key expires + */ + private OffsetDateTime signedExpiry; + + /* + * Abbreviation of the Azure Storage service that accepts the key + */ + private String signedService; + + /* + * The service version that created the key + */ + private String signedVersion; + + /* + * The key as a base64 string + */ + private String value; + + /** + * Creates an instance of UserDelegationKey class. + */ + public UserDelegationKey() { + } + + /** + * Get the signedObjectId property: The Azure Active Directory object ID in GUID format. + * + * @return the signedObjectId value. + */ + public String getSignedObjectId() { + return this.signedObjectId; + } + + /** + * Set the signedObjectId property: The Azure Active Directory object ID in GUID format. + * + * @param signedObjectId the signedObjectId value to set. + * @return the UserDelegationKey object itself. + */ + public UserDelegationKey setSignedObjectId(String signedObjectId) { + this.signedObjectId = signedObjectId; + return this; + } + + /** + * Get the signedTenantId property: The Azure Active Directory tenant ID in GUID format. + * + * @return the signedTenantId value. + */ + public String getSignedTenantId() { + return this.signedTenantId; + } + + /** + * Set the signedTenantId property: The Azure Active Directory tenant ID in GUID format. + * + * @param signedTenantId the signedTenantId value to set. + * @return the UserDelegationKey object itself. + */ + public UserDelegationKey setSignedTenantId(String signedTenantId) { + this.signedTenantId = signedTenantId; + return this; + } + + /** + * Get the signedStart property: The date-time the key is active. + * + * @return the signedStart value. + */ + public OffsetDateTime getSignedStart() { + return this.signedStart; + } + + /** + * Set the signedStart property: The date-time the key is active. + * + * @param signedStart the signedStart value to set. + * @return the UserDelegationKey object itself. + */ + public UserDelegationKey setSignedStart(OffsetDateTime signedStart) { + this.signedStart = signedStart; + return this; + } + + /** + * Get the signedExpiry property: The date-time the key expires. + * + * @return the signedExpiry value. + */ + public OffsetDateTime getSignedExpiry() { + return this.signedExpiry; + } + + /** + * Set the signedExpiry property: The date-time the key expires. + * + * @param signedExpiry the signedExpiry value to set. + * @return the UserDelegationKey object itself. + */ + public UserDelegationKey setSignedExpiry(OffsetDateTime signedExpiry) { + this.signedExpiry = signedExpiry; + return this; + } + + /** + * Get the signedService property: Abbreviation of the Azure Storage service that accepts the key. + * + * @return the signedService value. + */ + public String getSignedService() { + return this.signedService; + } + + /** + * Set the signedService property: Abbreviation of the Azure Storage service that accepts the key. + * + * @param signedService the signedService value to set. + * @return the UserDelegationKey object itself. + */ + public UserDelegationKey setSignedService(String signedService) { + this.signedService = signedService; + return this; + } + + /** + * Get the signedVersion property: The service version that created the key. + * + * @return the signedVersion value. + */ + public String getSignedVersion() { + return this.signedVersion; + } + + /** + * Set the signedVersion property: The service version that created the key. + * + * @param signedVersion the signedVersion value to set. + * @return the UserDelegationKey object itself. + */ + public UserDelegationKey setSignedVersion(String signedVersion) { + this.signedVersion = signedVersion; + return this; + } + + /** + * Get the value property: The key as a base64 string. + * + * @return the value value. + */ + public String getValue() { + return this.value; + } + + /** + * Set the value property: The key as a base64 string. + * + * @param value the value value to set. + * @return the UserDelegationKey object itself. + */ + public UserDelegationKey setValue(String value) { + this.value = value; + return this; + } + + @Override + public XmlWriter toXml(XmlWriter xmlWriter) throws XMLStreamException { + return toXml(xmlWriter, null); + } + + @Override + public XmlWriter toXml(XmlWriter xmlWriter, String rootElementName) throws XMLStreamException { + rootElementName = CoreUtils.isNullOrEmpty(rootElementName) ? "UserDelegationKey" : rootElementName; + xmlWriter.writeStartElement(rootElementName); + xmlWriter.writeStringElement("SignedOid", this.signedObjectId); + xmlWriter.writeStringElement("SignedTid", this.signedTenantId); + xmlWriter.writeStringElement("SignedStart", + this.signedStart == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.signedStart)); + xmlWriter.writeStringElement("SignedExpiry", + this.signedExpiry == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.signedExpiry)); + xmlWriter.writeStringElement("SignedService", this.signedService); + xmlWriter.writeStringElement("SignedVersion", this.signedVersion); + xmlWriter.writeStringElement("Value", this.value); + return xmlWriter.writeEndElement(); + } + + /** + * Reads an instance of UserDelegationKey from the XmlReader. + * + * @param xmlReader The XmlReader being read. + * @return An instance of UserDelegationKey if the XmlReader was pointing to an instance of it, or null if it was + * pointing to XML null. + * @throws XMLStreamException If an error occurs while reading the UserDelegationKey. + */ + public static UserDelegationKey fromXml(XmlReader xmlReader) throws XMLStreamException { + return fromXml(xmlReader, null); + } + + /** + * Reads an instance of UserDelegationKey from the XmlReader. + * + * @param xmlReader The XmlReader being read. + * @param rootElementName Optional root element name to override the default defined by the model. Used to support + * cases where the model can deserialize from different root element names. + * @return An instance of UserDelegationKey if the XmlReader was pointing to an instance of it, or null if it was + * pointing to XML null. + * @throws XMLStreamException If an error occurs while reading the UserDelegationKey. + */ + public static UserDelegationKey fromXml(XmlReader xmlReader, String rootElementName) throws XMLStreamException { + String finalRootElementName = CoreUtils.isNullOrEmpty(rootElementName) ? "UserDelegationKey" : rootElementName; + return xmlReader.readObject(finalRootElementName, reader -> { + UserDelegationKey deserializedUserDelegationKey = new UserDelegationKey(); + while (reader.nextElement() != XmlToken.END_ELEMENT) { + QName elementName = reader.getElementName(); + + if ("SignedOid".equals(elementName.getLocalPart())) { + deserializedUserDelegationKey.signedObjectId = reader.getStringElement(); + } else if ("SignedTid".equals(elementName.getLocalPart())) { + deserializedUserDelegationKey.signedTenantId = reader.getStringElement(); + } else if ("SignedStart".equals(elementName.getLocalPart())) { + deserializedUserDelegationKey.signedStart + = reader.getNullableElement(dateString -> CoreUtils.parseBestOffsetDateTime(dateString)); + } else if ("SignedExpiry".equals(elementName.getLocalPart())) { + deserializedUserDelegationKey.signedExpiry + = reader.getNullableElement(dateString -> CoreUtils.parseBestOffsetDateTime(dateString)); + } else if ("SignedService".equals(elementName.getLocalPart())) { + deserializedUserDelegationKey.signedService = reader.getStringElement(); + } else if ("SignedVersion".equals(elementName.getLocalPart())) { + deserializedUserDelegationKey.signedVersion = reader.getStringElement(); + } else if ("Value".equals(elementName.getLocalPart())) { + deserializedUserDelegationKey.value = reader.getStringElement(); + } else { + reader.skipElement(); + } + } + + return deserializedUserDelegationKey; + }); + } +} diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/package-info.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/package-info.java new file mode 100644 index 000000000000..0680e6d4bbc6 --- /dev/null +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/package-info.java @@ -0,0 +1,9 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +/** + * Package containing the data models for AzureBlobStorage. + * null. + */ +package com.azure.storage.blob.models; diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/package-info.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/package-info.java new file mode 100644 index 000000000000..5488ca6ecc7b --- /dev/null +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/package-info.java @@ -0,0 +1,9 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +/** + * Package containing the classes for AzureBlobStorage. + * null. + */ +package com.azure.storage.blob; diff --git a/sdk/storage/azure-storage-blob-v2/src/test/java/com/azure/storage/blob/BlobClientTest.java b/sdk/storage/azure-storage-blob-v2/src/test/java/com/azure/storage/blob/BlobClientTest.java new file mode 100644 index 000000000000..a58d02752ad3 --- /dev/null +++ b/sdk/storage/azure-storage-blob-v2/src/test/java/com/azure/storage/blob/BlobClientTest.java @@ -0,0 +1,28 @@ +package com.azure.storage.blob; + +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +import java.io.IOException; +import java.io.InputStream; + +public class BlobClientTest { + + @Test + @Disabled + public void testDownload() throws IOException { + + BlobClient blobClient = new AzureBlobStorageBuilder() + .url("sas-url") + .buildBlobClient(); + + InputStream sampleText = blobClient.download("testcontainer", "sample.txt", null, null, null, null, null, null, null, null, null, null, null, null, null, null, null); + + byte[] bytes = new byte[2048]; + sampleText.read(bytes); + String text = new String(bytes); + System.out.println(text); + + + } +} diff --git a/sdk/storage/azure-storage-blob-v2/src/test/java/com/azure/storage/blob/BlockBlobClientTest.java b/sdk/storage/azure-storage-blob-v2/src/test/java/com/azure/storage/blob/BlockBlobClientTest.java new file mode 100644 index 000000000000..5ac27e7cef0e --- /dev/null +++ b/sdk/storage/azure-storage-blob-v2/src/test/java/com/azure/storage/blob/BlockBlobClientTest.java @@ -0,0 +1,24 @@ +package com.azure.storage.blob; + +import io.clientcore.core.util.binarydata.BinaryData; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +public class BlockBlobClientTest { + + @Test + @Disabled + public void testUpload() { + BlockBlobClient blockBlobClient = new AzureBlobStorageBuilder() + .url("https://srnagarstorage.blob.core.windows.net/?sv=2022-11-02&ss=bfqt&srt=sco&sp=rwdlacupiytfx&se=2024-12-23T03:55:26Z&st=2024-12-12T19:55:26Z&spr=https&sig=7Dj0MbP2z9bnXRQdoohMtCKsfzXYfUKrRTfboiRZ%2Bv8%3D") + .buildBlockBlobClient(); + + String content = "Hello World!"; + blockBlobClient.upload("testcontainer", "upload.txt", content.length(), BinaryData.fromString(content), null, + null, null, null, null, null, null, + null, null, null, null, null, null, + null, null, null, null, null, + null, null, null); + + } +} diff --git a/sdk/storage/azure-storage-blob-v2/src/test/java/com/azure/storage/blob/ContainerClientTest.java b/sdk/storage/azure-storage-blob-v2/src/test/java/com/azure/storage/blob/ContainerClientTest.java new file mode 100644 index 000000000000..35fb8434e6c1 --- /dev/null +++ b/sdk/storage/azure-storage-blob-v2/src/test/java/com/azure/storage/blob/ContainerClientTest.java @@ -0,0 +1,25 @@ +package com.azure.storage.blob; + +import com.azure.storage.blob.models.ListBlobsHierarchySegmentResponse; +import io.clientcore.core.http.models.Response; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +public class ContainerClientTest { + + @Test + @Disabled + public void testContainterClient() { + + ContainerClient containerClient = new AzureBlobStorageBuilder() + .url("sas-url") + .buildContainerClient(); + + containerClient.create("container", null, null, null, null, null); + + // This will not work yet as xml serialization is not supported in clientcore. +// Response testcontainer = containerClient.listBlobHierarchySegmentNoCustomHeadersWithResponse("testcontainer", null, null, null, null, null, null, null, null); +// System.out.println(testcontainer.getStatusCode()); +// System.out.println(testcontainer.getValue().getSegment().getBlobItems().get(0)); + } +} diff --git a/sdk/storage/azure-storage-blob-v2/swagger/autorest.md b/sdk/storage/azure-storage-blob-v2/swagger/autorest.md new file mode 100644 index 000000000000..73e4956e336a --- /dev/null +++ b/sdk/storage/azure-storage-blob-v2/swagger/autorest.md @@ -0,0 +1,667 @@ +### Code generation settings + +``` yaml +use: '@autorest/java@4.1.39' +input-file: https://raw.githubusercontent.com/Azure/azure-rest-api-specs/refs/heads/feature/storage/stg96base2/specification/storage/data-plane/Microsoft.BlobStorage/stable/2025-01-05/blob.json +java: true +output-folder: . +namespace: com.azure.storage.blob +service-interface-as-public: true +license-header: MICROSOFT_MIT_SMALL +enable-sync-stack: true +context-client-method-parameter: true +optional-constant-as-enum: true +generic-response-type: true +use-input-stream-for-binary: true +no-custom-headers: true +stream-style-serialization: true +customization-class: src/main/java/StorageCustomization.java +generate-sync-async-clients: true +sync-methods: sync-only +``` + +### /{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"); +``` + +### 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"; +``` + +### 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 $.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"]; +``` + +### 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."; +``` + +### 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-v2/swagger/pom.xml b/sdk/storage/azure-storage-blob-v2/swagger/pom.xml new file mode 100644 index 000000000000..56ba4d21e02f --- /dev/null +++ b/sdk/storage/azure-storage-blob-v2/swagger/pom.xml @@ -0,0 +1,17 @@ + + + + + com.azure + azure-code-customization-parent + 1.0.0-beta.1 + ../../../parents/azure-code-customization-parent + + + com.azure + azure-storage-blob-customization-v2 + 1.0.0-beta.1 + 4.0.0 + diff --git a/sdk/storage/azure-storage-blob-v2/swagger/src/main/java/StorageCustomization.java b/sdk/storage/azure-storage-blob-v2/swagger/src/main/java/StorageCustomization.java new file mode 100644 index 000000000000..84cd8f78b321 --- /dev/null +++ b/sdk/storage/azure-storage-blob-v2/swagger/src/main/java/StorageCustomization.java @@ -0,0 +1,48 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +import com.azure.autorest.customization.ClassCustomization; +import com.azure.autorest.customization.Customization; +import com.azure.autorest.customization.JavadocCustomization; +import com.azure.autorest.customization.LibraryCustomization; +import com.azure.autorest.customization.PackageCustomization; +import com.github.javaparser.ParseProblemException; +import com.github.javaparser.StaticJavaParser; +import com.github.javaparser.ast.NodeList; +import com.github.javaparser.ast.body.ClassOrInterfaceDeclaration; +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 org.slf4j.Logger; + +import java.util.Arrays; +import java.util.List; + +/** + * Customization class for Blob Storage. + */ +public class StorageCustomization extends Customization { + @Override + public void customize(LibraryCustomization customization, Logger logger) { + + // Implementation models customizations + PackageCustomization implementationModels = customization.getPackage("com.azure.storage.blob.models"); + + //QueryFormat + customizeQueryFormat(implementationModels.getClass("QueryFormat")); + } + + 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); + } +} diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobAsyncClient.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobAsyncClient.java index 5c4b16b3b9e9..5693b17ca5c6 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobAsyncClient.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobAsyncClient.java @@ -4,6 +4,7 @@ package com.azure.storage.blob; import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceClient; import com.azure.core.annotation.ServiceMethod; import com.azure.core.http.HttpPipeline; import com.azure.core.http.rest.Response; @@ -82,6 +83,7 @@ * Azure * Docs for more information. */ +@ServiceClient(builder = BlobClientBuilder.class, isAsync = true) public class BlobAsyncClient extends BlobAsyncClientBase { /** * The block size to use if none is specified in parallel operations. 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 7254a4568737..77ce3eab3a72 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 @@ -4,6 +4,7 @@ package com.azure.storage.blob.specialized; import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceClient; import com.azure.core.annotation.ServiceMethod; import com.azure.core.http.HttpPipeline; import com.azure.core.http.HttpResponse; @@ -22,10 +23,7 @@ import com.azure.core.util.polling.LongRunningOperationStatus; import com.azure.core.util.polling.PollResponse; import com.azure.core.util.polling.PollerFlux; -import com.azure.storage.blob.BlobContainerAsyncClient; -import com.azure.storage.blob.BlobContainerClientBuilder; -import com.azure.storage.blob.BlobServiceAsyncClient; -import com.azure.storage.blob.BlobServiceVersion; +import com.azure.storage.blob.*; import com.azure.storage.blob.implementation.AzureBlobStorageImpl; import com.azure.storage.blob.implementation.AzureBlobStorageImplBuilder; import com.azure.storage.blob.implementation.accesshelpers.BlobDownloadAsyncResponseConstructorProxy; @@ -125,6 +123,7 @@ * This client offers the ability to download blobs. Note that uploading data is specific to each type of blob. Please * refer to the {@link BlockBlobClient}, {@link PageBlobClient}, or {@link AppendBlobClient} for upload options. */ +@ServiceClient(builder = BlobClientBuilder.class, isAsync = true) public class BlobAsyncClientBase { private static final ClientLogger LOGGER = new ClientLogger(BlobAsyncClientBase.class); diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlobClientBase.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlobClientBase.java index e2211b71e785..633cafdb6a2d 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 @@ -4,6 +4,7 @@ package com.azure.storage.blob.specialized; import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceClient; import com.azure.core.annotation.ServiceMethod; import com.azure.core.http.HttpPipeline; import com.azure.core.http.HttpResponse; @@ -20,10 +21,7 @@ import com.azure.core.util.polling.PollResponse; import com.azure.core.util.polling.PollingContext; import com.azure.core.util.polling.SyncPoller; -import com.azure.storage.blob.BlobContainerClient; -import com.azure.storage.blob.BlobContainerClientBuilder; -import com.azure.storage.blob.BlobServiceClient; -import com.azure.storage.blob.BlobServiceVersion; +import com.azure.storage.blob.*; import com.azure.storage.blob.implementation.AzureBlobStorageImpl; import com.azure.storage.blob.implementation.AzureBlobStorageImplBuilder; import com.azure.storage.blob.implementation.accesshelpers.BlobPropertiesConstructorProxy; @@ -132,6 +130,7 @@ * This client offers the ability to download blobs. Note that uploading data is specific to each type of blob. Please * refer to the {@link BlockBlobClient}, {@link PageBlobClient}, or {@link AppendBlobClient} for upload options. */ +@ServiceClient(builder = BlobClientBuilder.class) public class BlobClientBase { private static final ClientLogger LOGGER = new ClientLogger(BlobClientBase.class); private static final Set DEFAULT_OPEN_OPTIONS_SET = Collections.unmodifiableSet( diff --git a/sdk/storage/pom.xml b/sdk/storage/pom.xml index 60a3b0e7d3a3..bacfe64eaca0 100644 --- a/sdk/storage/pom.xml +++ b/sdk/storage/pom.xml @@ -9,20 +9,23 @@ pom 1.0.0 - azure-storage-common - azure-storage-blob - azure-storage-blob-batch - azure-storage-blob-changefeed - azure-storage-blob-cryptography - azure-storage-blob-nio - azure-storage-file-share - azure-storage-file-datalake - azure-storage-internal-avro - azure-storage-queue - azure-storage-perf + azure-storage-common + azure-storage-blob + azure-storage-blob-batch + azure-storage-blob-changefeed + azure-storage-blob-cryptography + azure-storage-blob-nio + azure-storage-file-share + azure-storage-file-datalake + azure-storage-internal-avro + azure-storage-queue + azure-storage-perf azure-storage-blob-stress azure-storage-stress azure-storage-file-datalake-stress azure-storage-file-share-stress + + + azure-storage-blob-v2 From 4a967d09f2d0fb2ce20fb731d9efe8d288eded5e Mon Sep 17 00:00:00 2001 From: Srikanta Date: Wed, 5 Feb 2025 12:12:49 -0800 Subject: [PATCH 02/26] Update package name and fix imports --- .../storage/blob/AppendBlobClient.java | 75 +++--- .../storage/blob/AzureBlobStorageBuilder.java | 22 +- .../{ => v2}/storage/blob/BlobClient.java | 224 +++++++++--------- .../storage/blob/BlockBlobClient.java | 74 +++--- .../storage/blob/ContainerClient.java | 170 ++++++------- .../{ => v2}/storage/blob/PageBlobClient.java | 94 ++++---- .../storage/blob/StorageServiceClient.java | 84 +++---- .../blob/implementation/AppendBlobsImpl.java | 48 ++-- .../implementation/AzureBlobStorageImpl.java | 22 +- .../blob/implementation/BlobsImpl.java | 224 +++++++++--------- .../blob/implementation/BlockBlobsImpl.java | 74 +++--- .../blob/implementation/ContainersImpl.java | 168 ++++++------- .../blob/implementation/PageBlobsImpl.java | 94 ++++---- .../blob/implementation/ServicesImpl.java | 96 ++++---- .../models/BlobSignedIdentifierWrapper.java | 8 +- .../blob/implementation/package-info.java | 2 +- .../storage/blob/models/AccessTier.java | 6 +- .../storage/blob/models/AccountKind.java | 4 +- .../AppendBlobsAppendBlockFromUrlHeaders.java | 52 ++-- .../models/AppendBlobsAppendBlockHeaders.java | 60 ++--- .../blob/models/AppendBlobsCreateHeaders.java | 48 ++-- .../blob/models/AppendBlobsSealHeaders.java | 32 +-- .../storage/blob/models/ArchiveStatus.java | 6 +- .../blob/models/ArrowConfiguration.java | 10 +- .../storage/blob/models/ArrowField.java | 22 +- .../storage/blob/models/BlobAccessPolicy.java | 18 +- .../blob/models/BlobAnalyticsLogging.java | 26 +- .../models/BlobContainerEncryptionScope.java | 10 +- .../blob/models/BlobContainerItem.java | 26 +- .../models/BlobContainerItemProperties.java | 58 ++--- .../blob/models/BlobContainersSegment.java | 30 +-- .../blob/models/BlobCopySourceTagsMode.java | 6 +- .../storage/blob/models/BlobCorsRule.java | 26 +- .../storage/blob/models/BlobDeleteType.java | 6 +- .../storage/blob/models/BlobErrorCode.java | 6 +- .../blob/models/BlobExpiryOptions.java | 6 +- .../blob/models/BlobFlatListSegment.java | 10 +- .../blob/models/BlobHierarchyListSegment.java | 14 +- .../storage/blob/models/BlobHttpHeaders.java | 26 +- .../models/BlobImmutabilityPolicyMode.java | 4 +- .../storage/blob/models/BlobItemInternal.java | 50 ++-- .../models/BlobItemPropertiesInternal.java | 166 ++++++------- .../storage/blob/models/BlobMetrics.java | 22 +- .../storage/blob/models/BlobName.java | 14 +- .../blob/models/BlobPrefixInternal.java | 10 +- .../blob/models/BlobRetentionPolicy.java | 14 +- .../blob/models/BlobServiceProperties.java | 34 +-- .../blob/models/BlobServiceStatistics.java | 10 +- .../blob/models/BlobSignedIdentifier.java | 14 +- .../{ => v2}/storage/blob/models/BlobTag.java | 14 +- .../storage/blob/models/BlobTags.java | 10 +- .../storage/blob/models/BlobType.java | 4 +- .../models/BlobsAbortCopyFromURLHeaders.java | 20 +- .../blob/models/BlobsAcquireLeaseHeaders.java | 32 +-- .../blob/models/BlobsBreakLeaseHeaders.java | 32 +-- .../blob/models/BlobsChangeLeaseHeaders.java | 32 +-- .../blob/models/BlobsCopyFromURLHeaders.java | 52 ++-- .../models/BlobsCreateSnapshotHeaders.java | 40 ++-- .../blob/models/BlobsDeleteHeaders.java | 20 +- .../BlobsDeleteImmutabilityPolicyHeaders.java | 20 +- .../blob/models/BlobsDownloadHeaders.java | 188 +++++++-------- .../models/BlobsGetAccountInfoHeaders.java | 32 +-- .../models/BlobsGetPropertiesHeaders.java | 200 ++++++++-------- .../blob/models/BlobsGetTagsHeaders.java | 20 +- .../blob/models/BlobsQueryHeaders.java | 136 +++++------ .../blob/models/BlobsReleaseLeaseHeaders.java | 28 +-- .../blob/models/BlobsRenewLeaseHeaders.java | 32 +-- .../blob/models/BlobsSetExpiryHeaders.java | 28 +-- .../models/BlobsSetHttpHeadersHeaders.java | 32 +-- .../BlobsSetImmutabilityPolicyHeaders.java | 28 +-- .../blob/models/BlobsSetLegalHoldHeaders.java | 24 +- .../blob/models/BlobsSetMetadataHeaders.java | 44 ++-- .../blob/models/BlobsSetTagsHeaders.java | 20 +- .../blob/models/BlobsSetTierHeaders.java | 16 +- .../models/BlobsStartCopyFromURLHeaders.java | 40 ++-- .../blob/models/BlobsUndeleteHeaders.java | 20 +- .../{ => v2}/storage/blob/models/Block.java | 18 +- .../BlockBlobsCommitBlockListHeaders.java | 52 ++-- .../models/BlockBlobsGetBlockListHeaders.java | 36 +-- .../BlockBlobsPutBlobFromUrlHeaders.java | 48 ++-- .../BlockBlobsStageBlockFromURLHeaders.java | 40 ++-- .../models/BlockBlobsStageBlockHeaders.java | 44 ++-- .../blob/models/BlockBlobsUploadHeaders.java | 52 ++-- .../storage/blob/models/BlockList.java | 14 +- .../storage/blob/models/BlockListType.java | 4 +- .../storage/blob/models/BlockLookupList.java | 18 +- .../storage/blob/models/ClearRange.java | 14 +- .../models/ContainersAcquireLeaseHeaders.java | 32 +-- .../models/ContainersBreakLeaseHeaders.java | 32 +-- .../models/ContainersChangeLeaseHeaders.java | 32 +-- .../blob/models/ContainersCreateHeaders.java | 28 +-- .../blob/models/ContainersDeleteHeaders.java | 20 +- .../models/ContainersFilterBlobsHeaders.java | 20 +- .../ContainersGetAccessPolicyHeaders.java | 32 +-- .../ContainersGetAccountInfoHeaders.java | 32 +-- .../ContainersGetPropertiesHeaders.java | 68 +++--- .../ContainersListBlobFlatSegmentHeaders.java | 24 +- ...ainersListBlobHierarchySegmentHeaders.java | 24 +- .../models/ContainersReleaseLeaseHeaders.java | 28 +-- .../blob/models/ContainersRenameHeaders.java | 20 +- .../models/ContainersRenewLeaseHeaders.java | 32 +-- .../blob/models/ContainersRestoreHeaders.java | 20 +- .../ContainersSetAccessPolicyHeaders.java | 28 +-- .../models/ContainersSetMetadataHeaders.java | 28 +-- .../models/ContainersSubmitBatchHeaders.java | 16 +- .../storage/blob/models/CopyStatusType.java | 4 +- .../{ => v2}/storage/blob/models/CpkInfo.java | 14 +- .../models/DeleteSnapshotsOptionType.java | 4 +- .../models/DelimitedTextConfiguration.java | 26 +- .../blob/models/EncryptionAlgorithmType.java | 4 +- .../storage/blob/models/EncryptionScope.java | 6 +- .../storage/blob/models/FilterBlobItem.java | 26 +- .../blob/models/FilterBlobSegment.java | 22 +- .../blob/models/FilterBlobsIncludeItem.java | 4 +- .../storage/blob/models/GeoReplication.java | 14 +- .../blob/models/GeoReplicationStatus.java | 6 +- .../blob/models/JsonTextConfiguration.java | 10 +- .../{ => v2}/storage/blob/models/KeyInfo.java | 14 +- .../blob/models/LeaseDurationType.java | 4 +- .../storage/blob/models/LeaseStateType.java | 4 +- .../storage/blob/models/LeaseStatusType.java | 4 +- .../models/ListBlobContainersIncludeType.java | 4 +- .../models/ListBlobsFlatSegmentResponse.java | 34 +-- .../ListBlobsHierarchySegmentResponse.java | 38 +-- .../blob/models/ListBlobsIncludeItem.java | 4 +- .../models/PageBlobsClearPagesHeaders.java | 48 ++-- .../PageBlobsCopyIncrementalHeaders.java | 36 +-- .../blob/models/PageBlobsCreateHeaders.java | 48 ++-- .../PageBlobsGetPageRangesDiffHeaders.java | 32 +-- .../models/PageBlobsGetPageRangesHeaders.java | 32 +-- .../blob/models/PageBlobsResizeHeaders.java | 32 +-- .../PageBlobsUpdateSequenceNumberHeaders.java | 32 +-- .../PageBlobsUploadPagesFromURLHeaders.java | 48 ++-- .../models/PageBlobsUploadPagesHeaders.java | 56 ++--- .../storage/blob/models/PageList.java | 18 +- .../storage/blob/models/PageRange.java | 14 +- .../models/PremiumPageBlobAccessTier.java | 6 +- .../storage/blob/models/PublicAccessType.java | 6 +- .../storage/blob/models/QueryFormat.java | 26 +- .../storage/blob/models/QueryFormatType.java | 4 +- .../storage/blob/models/QueryRequest.java | 22 +- .../blob/models/QuerySerialization.java | 10 +- .../blob/models/RehydratePriority.java | 6 +- .../blob/models/SequenceNumberActionType.java | 4 +- .../models/ServicesFilterBlobsHeaders.java | 20 +- .../models/ServicesGetAccountInfoHeaders.java | 32 +-- .../models/ServicesGetPropertiesHeaders.java | 16 +- .../models/ServicesGetStatisticsHeaders.java | 20 +- .../ServicesGetUserDelegationKeyHeaders.java | 20 +- ...vicesListBlobContainersSegmentHeaders.java | 16 +- ...sListBlobContainersSegmentNextHeaders.java | 16 +- .../models/ServicesSetPropertiesHeaders.java | 16 +- .../models/ServicesSubmitBatchHeaders.java | 16 +- .../{ => v2}/storage/blob/models/SkuName.java | 4 +- .../storage/blob/models/StaticWebsite.java | 22 +- .../storage/blob/models/StorageError.java | 10 +- .../blob/models/StorageErrorException.java | 6 +- .../blob/models/UserDelegationKey.java | 34 +-- .../storage/blob/models/package-info.java | 2 +- .../{ => v2}/storage/blob/package-info.java | 2 +- .../{ => v2}/storage/blob/BlobClientTest.java | 2 +- .../storage/blob/BlockBlobClientTest.java | 2 +- .../storage/blob/ContainerClientTest.java | 4 +- .../azure-storage-blob-v2/swagger/autorest.md | 2 +- .../src/main/java/StorageCustomization.java | 2 +- .../blob/specialized/BlobAsyncClientBase.java | 6 +- .../blob/specialized/BlobClientBase.java | 6 +- 167 files changed, 2681 insertions(+), 2666 deletions(-) rename sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/{ => v2}/storage/blob/AppendBlobClient.java (92%) rename sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/{ => v2}/storage/blob/AzureBlobStorageBuilder.java (98%) rename sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/{ => v2}/storage/blob/BlobClient.java (98%) rename sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/{ => v2}/storage/blob/BlockBlobClient.java (98%) rename sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/{ => v2}/storage/blob/ContainerClient.java (97%) rename sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/{ => v2}/storage/blob/PageBlobClient.java (98%) rename sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/{ => v2}/storage/blob/StorageServiceClient.java (96%) rename sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/{ => v2}/storage/blob/implementation/AppendBlobsImpl.java (99%) rename sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/{ => v2}/storage/blob/implementation/AzureBlobStorageImpl.java (96%) rename sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/{ => v2}/storage/blob/implementation/BlobsImpl.java (98%) rename sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/{ => v2}/storage/blob/implementation/BlockBlobsImpl.java (99%) rename sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/{ => v2}/storage/blob/implementation/ContainersImpl.java (98%) rename sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/{ => v2}/storage/blob/implementation/PageBlobsImpl.java (99%) rename sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/{ => v2}/storage/blob/implementation/ServicesImpl.java (97%) rename sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/{ => v2}/storage/blob/implementation/models/BlobSignedIdentifierWrapper.java (95%) rename sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/{ => v2}/storage/blob/implementation/package-info.java (82%) rename sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/{ => v2}/storage/blob/models/AccessTier.java (98%) rename sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/{ => v2}/storage/blob/models/AccountKind.java (96%) rename sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/{ => v2}/storage/blob/models/AppendBlobsAppendBlockFromUrlHeaders.java (98%) rename sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/{ => v2}/storage/blob/models/AppendBlobsAppendBlockHeaders.java (98%) rename sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/{ => v2}/storage/blob/models/AppendBlobsCreateHeaders.java (97%) rename sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/{ => v2}/storage/blob/models/AppendBlobsSealHeaders.java (97%) rename sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/{ => v2}/storage/blob/models/ArchiveStatus.java (97%) rename sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/{ => v2}/storage/blob/models/ArrowConfiguration.java (98%) rename sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/{ => v2}/storage/blob/models/ArrowField.java (97%) rename sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/{ => v2}/storage/blob/models/BlobAccessPolicy.java (98%) rename sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/{ => v2}/storage/blob/models/BlobAnalyticsLogging.java (98%) rename sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/{ => v2}/storage/blob/models/BlobContainerEncryptionScope.java (97%) rename sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/{ => v2}/storage/blob/models/BlobContainerItem.java (98%) rename sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/{ => v2}/storage/blob/models/BlobContainerItemProperties.java (98%) rename sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/{ => v2}/storage/blob/models/BlobContainersSegment.java (98%) rename sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/{ => v2}/storage/blob/models/BlobCopySourceTagsMode.java (96%) rename sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/{ => v2}/storage/blob/models/BlobCorsRule.java (98%) rename sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/{ => v2}/storage/blob/models/BlobDeleteType.java (96%) rename sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/{ => v2}/storage/blob/models/BlobErrorCode.java (99%) rename sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/{ => v2}/storage/blob/models/BlobExpiryOptions.java (97%) rename sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/{ => v2}/storage/blob/models/BlobFlatListSegment.java (98%) rename sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/{ => v2}/storage/blob/models/BlobHierarchyListSegment.java (98%) rename sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/{ => v2}/storage/blob/models/BlobHttpHeaders.java (97%) rename sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/{ => v2}/storage/blob/models/BlobImmutabilityPolicyMode.java (96%) rename sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/{ => v2}/storage/blob/models/BlobItemInternal.java (98%) rename sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/{ => v2}/storage/blob/models/BlobItemPropertiesInternal.java (98%) rename sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/{ => v2}/storage/blob/models/BlobMetrics.java (98%) rename sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/{ => v2}/storage/blob/models/BlobName.java (97%) rename sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/{ => v2}/storage/blob/models/BlobPrefixInternal.java (98%) rename sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/{ => v2}/storage/blob/models/BlobRetentionPolicy.java (98%) rename sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/{ => v2}/storage/blob/models/BlobServiceProperties.java (98%) rename sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/{ => v2}/storage/blob/models/BlobServiceStatistics.java (98%) rename sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/{ => v2}/storage/blob/models/BlobSignedIdentifier.java (98%) rename sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/{ => v2}/storage/blob/models/BlobTag.java (97%) rename sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/{ => v2}/storage/blob/models/BlobTags.java (98%) rename sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/{ => v2}/storage/blob/models/BlobType.java (96%) rename sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/{ => v2}/storage/blob/models/BlobsAbortCopyFromURLHeaders.java (97%) rename sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/{ => v2}/storage/blob/models/BlobsAcquireLeaseHeaders.java (97%) rename sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/{ => v2}/storage/blob/models/BlobsBreakLeaseHeaders.java (97%) rename sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/{ => v2}/storage/blob/models/BlobsChangeLeaseHeaders.java (97%) rename sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/{ => v2}/storage/blob/models/BlobsCopyFromURLHeaders.java (97%) rename sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/{ => v2}/storage/blob/models/BlobsCreateSnapshotHeaders.java (97%) rename sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/{ => v2}/storage/blob/models/BlobsDeleteHeaders.java (97%) rename sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/{ => v2}/storage/blob/models/BlobsDeleteImmutabilityPolicyHeaders.java (97%) rename sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/{ => v2}/storage/blob/models/BlobsDownloadHeaders.java (98%) rename sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/{ => v2}/storage/blob/models/BlobsGetAccountInfoHeaders.java (97%) rename sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/{ => v2}/storage/blob/models/BlobsGetPropertiesHeaders.java (98%) rename sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/{ => v2}/storage/blob/models/BlobsGetTagsHeaders.java (97%) rename sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/{ => v2}/storage/blob/models/BlobsQueryHeaders.java (98%) rename sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/{ => v2}/storage/blob/models/BlobsReleaseLeaseHeaders.java (97%) rename sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/{ => v2}/storage/blob/models/BlobsRenewLeaseHeaders.java (97%) rename sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/{ => v2}/storage/blob/models/BlobsSetExpiryHeaders.java (97%) rename sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/{ => v2}/storage/blob/models/BlobsSetHttpHeadersHeaders.java (97%) rename sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/{ => v2}/storage/blob/models/BlobsSetImmutabilityPolicyHeaders.java (98%) rename sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/{ => v2}/storage/blob/models/BlobsSetLegalHoldHeaders.java (97%) rename sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/{ => v2}/storage/blob/models/BlobsSetMetadataHeaders.java (97%) rename sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/{ => v2}/storage/blob/models/BlobsSetTagsHeaders.java (97%) rename sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/{ => v2}/storage/blob/models/BlobsSetTierHeaders.java (96%) rename sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/{ => v2}/storage/blob/models/BlobsStartCopyFromURLHeaders.java (97%) rename sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/{ => v2}/storage/blob/models/BlobsUndeleteHeaders.java (97%) rename sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/{ => v2}/storage/blob/models/Block.java (97%) rename sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/{ => v2}/storage/blob/models/BlockBlobsCommitBlockListHeaders.java (98%) rename sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/{ => v2}/storage/blob/models/BlockBlobsGetBlockListHeaders.java (97%) rename sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/{ => v2}/storage/blob/models/BlockBlobsPutBlobFromUrlHeaders.java (97%) rename sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/{ => v2}/storage/blob/models/BlockBlobsStageBlockFromURLHeaders.java (97%) rename sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/{ => v2}/storage/blob/models/BlockBlobsStageBlockHeaders.java (97%) rename sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/{ => v2}/storage/blob/models/BlockBlobsUploadHeaders.java (97%) rename sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/{ => v2}/storage/blob/models/BlockList.java (98%) rename sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/{ => v2}/storage/blob/models/BlockListType.java (96%) rename sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/{ => v2}/storage/blob/models/BlockLookupList.java (98%) rename sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/{ => v2}/storage/blob/models/ClearRange.java (97%) rename sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/{ => v2}/storage/blob/models/ContainersAcquireLeaseHeaders.java (97%) rename sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/{ => v2}/storage/blob/models/ContainersBreakLeaseHeaders.java (97%) rename sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/{ => v2}/storage/blob/models/ContainersChangeLeaseHeaders.java (97%) rename sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/{ => v2}/storage/blob/models/ContainersCreateHeaders.java (97%) rename sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/{ => v2}/storage/blob/models/ContainersDeleteHeaders.java (97%) rename sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/{ => v2}/storage/blob/models/ContainersFilterBlobsHeaders.java (97%) rename sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/{ => v2}/storage/blob/models/ContainersGetAccessPolicyHeaders.java (97%) rename sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/{ => v2}/storage/blob/models/ContainersGetAccountInfoHeaders.java (97%) rename sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/{ => v2}/storage/blob/models/ContainersGetPropertiesHeaders.java (98%) rename sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/{ => v2}/storage/blob/models/ContainersListBlobFlatSegmentHeaders.java (97%) rename sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/{ => v2}/storage/blob/models/ContainersListBlobHierarchySegmentHeaders.java (97%) rename sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/{ => v2}/storage/blob/models/ContainersReleaseLeaseHeaders.java (97%) rename sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/{ => v2}/storage/blob/models/ContainersRenameHeaders.java (97%) rename sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/{ => v2}/storage/blob/models/ContainersRenewLeaseHeaders.java (97%) rename sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/{ => v2}/storage/blob/models/ContainersRestoreHeaders.java (97%) rename sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/{ => v2}/storage/blob/models/ContainersSetAccessPolicyHeaders.java (97%) rename sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/{ => v2}/storage/blob/models/ContainersSetMetadataHeaders.java (97%) rename sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/{ => v2}/storage/blob/models/ContainersSubmitBatchHeaders.java (96%) rename sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/{ => v2}/storage/blob/models/CopyStatusType.java (96%) rename sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/{ => v2}/storage/blob/models/CpkInfo.java (97%) rename sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/{ => v2}/storage/blob/models/DeleteSnapshotsOptionType.java (96%) rename sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/{ => v2}/storage/blob/models/DelimitedTextConfiguration.java (98%) rename sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/{ => v2}/storage/blob/models/EncryptionAlgorithmType.java (96%) rename sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/{ => v2}/storage/blob/models/EncryptionScope.java (97%) rename sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/{ => v2}/storage/blob/models/FilterBlobItem.java (98%) rename sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/{ => v2}/storage/blob/models/FilterBlobSegment.java (98%) rename sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/{ => v2}/storage/blob/models/FilterBlobsIncludeItem.java (96%) rename sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/{ => v2}/storage/blob/models/GeoReplication.java (98%) rename sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/{ => v2}/storage/blob/models/GeoReplicationStatus.java (97%) rename sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/{ => v2}/storage/blob/models/JsonTextConfiguration.java (98%) rename sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/{ => v2}/storage/blob/models/KeyInfo.java (98%) rename sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/{ => v2}/storage/blob/models/LeaseDurationType.java (96%) rename sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/{ => v2}/storage/blob/models/LeaseStateType.java (96%) rename sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/{ => v2}/storage/blob/models/LeaseStatusType.java (96%) rename sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/{ => v2}/storage/blob/models/ListBlobContainersIncludeType.java (96%) rename sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/{ => v2}/storage/blob/models/ListBlobsFlatSegmentResponse.java (98%) rename sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/{ => v2}/storage/blob/models/ListBlobsHierarchySegmentResponse.java (98%) rename sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/{ => v2}/storage/blob/models/ListBlobsIncludeItem.java (97%) rename sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/{ => v2}/storage/blob/models/PageBlobsClearPagesHeaders.java (98%) rename sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/{ => v2}/storage/blob/models/PageBlobsCopyIncrementalHeaders.java (97%) rename sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/{ => v2}/storage/blob/models/PageBlobsCreateHeaders.java (97%) rename sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/{ => v2}/storage/blob/models/PageBlobsGetPageRangesDiffHeaders.java (97%) rename sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/{ => v2}/storage/blob/models/PageBlobsGetPageRangesHeaders.java (97%) rename sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/{ => v2}/storage/blob/models/PageBlobsResizeHeaders.java (97%) rename sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/{ => v2}/storage/blob/models/PageBlobsUpdateSequenceNumberHeaders.java (97%) rename sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/{ => v2}/storage/blob/models/PageBlobsUploadPagesFromURLHeaders.java (98%) rename sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/{ => v2}/storage/blob/models/PageBlobsUploadPagesHeaders.java (98%) rename sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/{ => v2}/storage/blob/models/PageList.java (98%) rename sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/{ => v2}/storage/blob/models/PageRange.java (97%) rename sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/{ => v2}/storage/blob/models/PremiumPageBlobAccessTier.java (98%) rename sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/{ => v2}/storage/blob/models/PublicAccessType.java (96%) rename sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/{ => v2}/storage/blob/models/QueryFormat.java (98%) rename sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/{ => v2}/storage/blob/models/QueryFormatType.java (96%) rename sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/{ => v2}/storage/blob/models/QueryRequest.java (98%) rename sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/{ => v2}/storage/blob/models/QuerySerialization.java (98%) rename sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/{ => v2}/storage/blob/models/RehydratePriority.java (96%) rename sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/{ => v2}/storage/blob/models/SequenceNumberActionType.java (96%) rename sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/{ => v2}/storage/blob/models/ServicesFilterBlobsHeaders.java (97%) rename sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/{ => v2}/storage/blob/models/ServicesGetAccountInfoHeaders.java (97%) rename sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/{ => v2}/storage/blob/models/ServicesGetPropertiesHeaders.java (96%) rename sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/{ => v2}/storage/blob/models/ServicesGetStatisticsHeaders.java (97%) rename sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/{ => v2}/storage/blob/models/ServicesGetUserDelegationKeyHeaders.java (97%) rename sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/{ => v2}/storage/blob/models/ServicesListBlobContainersSegmentHeaders.java (97%) rename sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/{ => v2}/storage/blob/models/ServicesListBlobContainersSegmentNextHeaders.java (97%) rename sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/{ => v2}/storage/blob/models/ServicesSetPropertiesHeaders.java (96%) rename sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/{ => v2}/storage/blob/models/ServicesSubmitBatchHeaders.java (96%) rename sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/{ => v2}/storage/blob/models/SkuName.java (96%) rename sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/{ => v2}/storage/blob/models/StaticWebsite.java (98%) rename sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/{ => v2}/storage/blob/models/StorageError.java (98%) rename sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/{ => v2}/storage/blob/models/StorageErrorException.java (95%) rename sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/{ => v2}/storage/blob/models/UserDelegationKey.java (98%) rename sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/{ => v2}/storage/blob/models/package-info.java (84%) rename sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/{ => v2}/storage/blob/package-info.java (86%) rename sdk/storage/azure-storage-blob-v2/src/test/java/com/azure/{ => v2}/storage/blob/BlobClientTest.java (95%) rename sdk/storage/azure-storage-blob-v2/src/test/java/com/azure/{ => v2}/storage/blob/BlockBlobClientTest.java (96%) rename sdk/storage/azure-storage-blob-v2/src/test/java/com/azure/{ => v2}/storage/blob/ContainerClientTest.java (84%) diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/AppendBlobClient.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/AppendBlobClient.java similarity index 92% rename from sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/AppendBlobClient.java rename to sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/AppendBlobClient.java index f2f0b03f62ee..0ab6d6e84e32 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/AppendBlobClient.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/AppendBlobClient.java @@ -2,15 +2,24 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.blob; +package com.azure.v2.storage.blob; import com.azure.core.v2.annotation.Generated; import com.azure.core.v2.annotation.ReturnType; import com.azure.core.v2.annotation.ServiceClient; import com.azure.core.v2.annotation.ServiceMethod; import com.azure.core.v2.http.rest.ResponseBase; -import com.azure.storage.blob.implementation.AppendBlobsImpl; +import com.azure.v2.storage.blob.implementation.AppendBlobsImpl; import com.azure.storage.blob.models.*; +import com.azure.v2.storage.blob.models.AppendBlobsAppendBlockFromUrlHeaders; +import com.azure.v2.storage.blob.models.AppendBlobsAppendBlockHeaders; +import com.azure.v2.storage.blob.models.AppendBlobsCreateHeaders; +import com.azure.v2.storage.blob.models.AppendBlobsSealHeaders; +import com.azure.v2.storage.blob.models.BlobHttpHeaders; +import com.azure.v2.storage.blob.models.BlobImmutabilityPolicyMode; +import com.azure.v2.storage.blob.models.CpkInfo; +import com.azure.v2.storage.blob.models.EncryptionScope; +import com.azure.v2.storage.blob.models.StorageErrorException; import io.clientcore.core.http.models.Response; import io.clientcore.core.util.Context; import io.clientcore.core.util.binarydata.BinaryData; @@ -27,7 +36,7 @@ public final class AppendBlobClient { /** * Initializes an instance of AppendBlobClient class. - * + * * @param serviceClient the service client implementation. */ @Generated @@ -37,7 +46,7 @@ public final class AppendBlobClient { /** * 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. @@ -76,11 +85,11 @@ public final class AppendBlobClient { @Generated @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) { + 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 this.serviceClient.createWithResponse(containerName, blob, contentLength, timeout, metadata, leaseId, ifModifiedSince, ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, requestId, blobTagsString, immutabilityPolicyExpiry, immutabilityPolicyMode, legalHold, blobHttpHeaders, cpkInfo, encryptionScopeParam, @@ -89,7 +98,7 @@ public ResponseBase createWithResponse(String co /** * 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. @@ -137,7 +146,7 @@ public void create(String containerName, String blob, long contentLength, Intege /** * The Create Append Blob operation creates a new append blob. - * + * * @param containerName The container name. * @param blob The blob name. * @param contentLength The length of the request. @@ -191,7 +200,7 @@ public Response createNoCustomHeadersWithResponse(String containerName, St * 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. @@ -234,11 +243,11 @@ public Response createNoCustomHeadersWithResponse(String containerName, St @Generated @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) { + 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 this.serviceClient.appendBlockWithResponse(containerName, blob, contentLength, body, timeout, transactionalContentMD5, transactionalContentCrc64, leaseId, maxSize, appendPosition, ifModifiedSince, ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, requestId, structuredBodyType, structuredContentLength, @@ -249,7 +258,7 @@ public ResponseBase appendBlockWithResponse * 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. @@ -303,7 +312,7 @@ public void appendBlock(String containerName, String blob, long contentLength, B * The Append Block operation commits a new block of data to the end of an existing append blob. The Append Block * operation is permitted only if the blob was created with x-ms-blob-type set to AppendBlob. Append Block is * supported only on version 2015-02-21 version or later. - * + * * @param containerName The container name. * @param blob The blob name. * @param contentLength The length of the request. @@ -361,7 +370,7 @@ public Response appendBlockNoCustomHeadersWithResponse(String containerNam * 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. @@ -411,12 +420,12 @@ public Response appendBlockNoCustomHeadersWithResponse(String containerNam @Generated @ServiceMethod(returns = ReturnType.SINGLE) public ResponseBase appendBlockFromUrlWithResponse(String containerName, - String blob, String sourceUrl, long contentLength, String sourceRange, byte[] sourceContentMD5, - byte[] sourceContentcrc64, Integer timeout, byte[] transactionalContentMD5, String leaseId, Long maxSize, - Long appendPosition, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, - String ifNoneMatch, String ifTags, OffsetDateTime sourceIfModifiedSince, OffsetDateTime sourceIfUnmodifiedSince, - String sourceIfMatch, String sourceIfNoneMatch, String requestId, String copySourceAuthorization, - CpkInfo cpkInfo, EncryptionScope encryptionScopeParam, Context context) { + String blob, String sourceUrl, long contentLength, String sourceRange, byte[] sourceContentMD5, + byte[] sourceContentcrc64, Integer timeout, byte[] transactionalContentMD5, String leaseId, Long maxSize, + Long appendPosition, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, + String ifNoneMatch, String ifTags, OffsetDateTime sourceIfModifiedSince, OffsetDateTime sourceIfUnmodifiedSince, + String sourceIfMatch, String sourceIfNoneMatch, String requestId, String copySourceAuthorization, + CpkInfo cpkInfo, EncryptionScope encryptionScopeParam, Context context) { return this.serviceClient.appendBlockFromUrlWithResponse(containerName, blob, sourceUrl, contentLength, sourceRange, sourceContentMD5, sourceContentcrc64, timeout, transactionalContentMD5, leaseId, maxSize, appendPosition, ifModifiedSince, ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, sourceIfModifiedSince, @@ -428,7 +437,7 @@ public ResponseBase appendBlockFromU * 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. @@ -493,7 +502,7 @@ public void appendBlockFromUrl(String containerName, String blob, String sourceU * The Append Block operation commits a new block of data to the end of an existing append blob where the contents * are read from a source url. The Append Block operation is permitted only if the blob was created with * x-ms-blob-type set to AppendBlob. Append Block is supported only on version 2015-02-21 version or later. - * + * * @param containerName The container name. * @param blob The blob name. * @param sourceUrl Specify a URL to the copy source. @@ -559,7 +568,7 @@ public Response appendBlockFromUrlNoCustomHeadersWithResponse(String conta /** * 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 @@ -587,8 +596,8 @@ public Response appendBlockFromUrlNoCustomHeadersWithResponse(String conta @Generated @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) { + Integer timeout, String requestId, String leaseId, OffsetDateTime ifModifiedSince, + OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, Long appendPosition, Context context) { return this.serviceClient.sealWithResponse(containerName, blob, timeout, requestId, leaseId, ifModifiedSince, ifUnmodifiedSince, ifMatch, ifNoneMatch, appendPosition, context); } @@ -596,7 +605,7 @@ public ResponseBase sealWithResponse(String contai /** * 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 @@ -631,7 +640,7 @@ public void seal(String containerName, String blob, Integer timeout, String requ /** * The Seal operation seals the Append Blob to make it read-only. Seal is supported only on version 2019-12-12 * version or later. - * + * * @param containerName The container name. * @param blob The blob name. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/AzureBlobStorageBuilder.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/AzureBlobStorageBuilder.java similarity index 98% rename from sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/AzureBlobStorageBuilder.java rename to sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/AzureBlobStorageBuilder.java index 7bf26ef801b8..81ca35e23ff0 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/AzureBlobStorageBuilder.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/AzureBlobStorageBuilder.java @@ -2,14 +2,14 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.blob; +package com.azure.v2.storage.blob; import com.azure.core.v2.annotation.Generated; import com.azure.core.v2.annotation.ServiceClientBuilder; import com.azure.core.v2.http.policy.AddDatePolicy; import com.azure.core.v2.http.policy.AddHeadersFromContextPolicy; import com.azure.core.v2.http.policy.RequestIdPolicy; -import com.azure.storage.blob.implementation.AzureBlobStorageImpl; +import com.azure.v2.storage.blob.implementation.AzureBlobStorageImpl; import io.clientcore.core.http.client.HttpClient; import io.clientcore.core.http.models.HttpLogOptions; import io.clientcore.core.http.models.HttpRedirectOptions; @@ -176,7 +176,7 @@ public AzureBlobStorageBuilder configuration(Configuration configuration) { /** * 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 AzureBlobStorageBuilder. */ @@ -194,7 +194,7 @@ public AzureBlobStorageBuilder url(String url) { /** * Sets Specifies the version of the operation to use for this request. - * + * * @param version the version value. * @return the AzureBlobStorageBuilder. */ @@ -206,7 +206,7 @@ public AzureBlobStorageBuilder version(String version) { /** * Builds an instance of AzureBlobStorageImpl with the provided parameters. - * + * * @return an instance of AzureBlobStorageImpl. */ @Generated @@ -248,7 +248,7 @@ private HttpPipeline createHttpPipeline() { /** * Builds an instance of ServiceClient class. - * + * * @return an instance of ServiceClient. */ @Generated @@ -258,7 +258,7 @@ public StorageServiceClient buildServiceClient() { /** * Builds an instance of ContainerClient class. - * + * * @return an instance of ContainerClient. */ @Generated @@ -268,7 +268,7 @@ public ContainerClient buildContainerClient() { /** * Builds an instance of BlobClient class. - * + * * @return an instance of BlobClient. */ @Generated @@ -278,7 +278,7 @@ public BlobClient buildBlobClient() { /** * Builds an instance of PageBlobClient class. - * + * * @return an instance of PageBlobClient. */ @Generated @@ -288,7 +288,7 @@ public PageBlobClient buildPageBlobClient() { /** * Builds an instance of AppendBlobClient class. - * + * * @return an instance of AppendBlobClient. */ @Generated @@ -298,7 +298,7 @@ public AppendBlobClient buildAppendBlobClient() { /** * Builds an instance of BlockBlobClient class. - * + * * @return an instance of BlockBlobClient. */ @Generated diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/BlobClient.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/BlobClient.java similarity index 98% rename from sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/BlobClient.java rename to sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/BlobClient.java index 725ea3c64409..39c1dd6ddb8e 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/BlobClient.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/BlobClient.java @@ -2,51 +2,51 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.blob; +package com.azure.v2.storage.blob; import com.azure.core.v2.annotation.Generated; import com.azure.core.v2.annotation.ReturnType; import com.azure.core.v2.annotation.ServiceClient; import com.azure.core.v2.annotation.ServiceMethod; import com.azure.core.v2.http.rest.ResponseBase; -import com.azure.storage.blob.implementation.BlobsImpl; -import com.azure.storage.blob.models.AccessTier; -import com.azure.storage.blob.models.BlobCopySourceTagsMode; -import com.azure.storage.blob.models.BlobDeleteType; -import com.azure.storage.blob.models.BlobExpiryOptions; -import com.azure.storage.blob.models.BlobHttpHeaders; -import com.azure.storage.blob.models.BlobImmutabilityPolicyMode; -import com.azure.storage.blob.models.BlobsAbortCopyFromURLHeaders; -import com.azure.storage.blob.models.BlobsAcquireLeaseHeaders; -import com.azure.storage.blob.models.BlobsBreakLeaseHeaders; -import com.azure.storage.blob.models.BlobsChangeLeaseHeaders; -import com.azure.storage.blob.models.BlobsCopyFromURLHeaders; -import com.azure.storage.blob.models.BlobsCreateSnapshotHeaders; -import com.azure.storage.blob.models.BlobsDeleteHeaders; -import com.azure.storage.blob.models.BlobsDeleteImmutabilityPolicyHeaders; -import com.azure.storage.blob.models.BlobsDownloadHeaders; -import com.azure.storage.blob.models.BlobsGetAccountInfoHeaders; -import com.azure.storage.blob.models.BlobsGetPropertiesHeaders; -import com.azure.storage.blob.models.BlobsGetTagsHeaders; -import com.azure.storage.blob.models.BlobsQueryHeaders; -import com.azure.storage.blob.models.BlobsReleaseLeaseHeaders; -import com.azure.storage.blob.models.BlobsRenewLeaseHeaders; -import com.azure.storage.blob.models.BlobsSetExpiryHeaders; -import com.azure.storage.blob.models.BlobsSetHttpHeadersHeaders; -import com.azure.storage.blob.models.BlobsSetImmutabilityPolicyHeaders; -import com.azure.storage.blob.models.BlobsSetLegalHoldHeaders; -import com.azure.storage.blob.models.BlobsSetMetadataHeaders; -import com.azure.storage.blob.models.BlobsSetTagsHeaders; -import com.azure.storage.blob.models.BlobsSetTierHeaders; -import com.azure.storage.blob.models.BlobsStartCopyFromURLHeaders; -import com.azure.storage.blob.models.BlobsUndeleteHeaders; -import com.azure.storage.blob.models.BlobTags; -import com.azure.storage.blob.models.CpkInfo; -import com.azure.storage.blob.models.DeleteSnapshotsOptionType; -import com.azure.storage.blob.models.EncryptionScope; -import com.azure.storage.blob.models.QueryRequest; -import com.azure.storage.blob.models.RehydratePriority; -import com.azure.storage.blob.models.StorageErrorException; +import com.azure.v2.storage.blob.implementation.BlobsImpl; +import com.azure.v2.storage.blob.models.AccessTier; +import com.azure.v2.storage.blob.models.BlobCopySourceTagsMode; +import com.azure.v2.storage.blob.models.BlobDeleteType; +import com.azure.v2.storage.blob.models.BlobExpiryOptions; +import com.azure.v2.storage.blob.models.BlobHttpHeaders; +import com.azure.v2.storage.blob.models.BlobImmutabilityPolicyMode; +import com.azure.v2.storage.blob.models.BlobsAbortCopyFromURLHeaders; +import com.azure.v2.storage.blob.models.BlobsAcquireLeaseHeaders; +import com.azure.v2.storage.blob.models.BlobsBreakLeaseHeaders; +import com.azure.v2.storage.blob.models.BlobsChangeLeaseHeaders; +import com.azure.v2.storage.blob.models.BlobsCopyFromURLHeaders; +import com.azure.v2.storage.blob.models.BlobsCreateSnapshotHeaders; +import com.azure.v2.storage.blob.models.BlobsDeleteHeaders; +import com.azure.v2.storage.blob.models.BlobsDeleteImmutabilityPolicyHeaders; +import com.azure.v2.storage.blob.models.BlobsDownloadHeaders; +import com.azure.v2.storage.blob.models.BlobsGetAccountInfoHeaders; +import com.azure.v2.storage.blob.models.BlobsGetPropertiesHeaders; +import com.azure.v2.storage.blob.models.BlobsGetTagsHeaders; +import com.azure.v2.storage.blob.models.BlobsQueryHeaders; +import com.azure.v2.storage.blob.models.BlobsReleaseLeaseHeaders; +import com.azure.v2.storage.blob.models.BlobsRenewLeaseHeaders; +import com.azure.v2.storage.blob.models.BlobsSetExpiryHeaders; +import com.azure.v2.storage.blob.models.BlobsSetHttpHeadersHeaders; +import com.azure.v2.storage.blob.models.BlobsSetImmutabilityPolicyHeaders; +import com.azure.v2.storage.blob.models.BlobsSetLegalHoldHeaders; +import com.azure.v2.storage.blob.models.BlobsSetMetadataHeaders; +import com.azure.v2.storage.blob.models.BlobsSetTagsHeaders; +import com.azure.v2.storage.blob.models.BlobsSetTierHeaders; +import com.azure.v2.storage.blob.models.BlobsStartCopyFromURLHeaders; +import com.azure.v2.storage.blob.models.BlobsUndeleteHeaders; +import com.azure.v2.storage.blob.models.BlobTags; +import com.azure.v2.storage.blob.models.CpkInfo; +import com.azure.v2.storage.blob.models.DeleteSnapshotsOptionType; +import com.azure.v2.storage.blob.models.EncryptionScope; +import com.azure.v2.storage.blob.models.QueryRequest; +import com.azure.v2.storage.blob.models.RehydratePriority; +import com.azure.v2.storage.blob.models.StorageErrorException; import io.clientcore.core.http.models.Response; import io.clientcore.core.util.Context; import java.io.InputStream; @@ -63,7 +63,7 @@ public final class BlobClient { /** * Initializes an instance of BlobClient class. - * + * * @param serviceClient the service client implementation. */ @Generated @@ -74,7 +74,7 @@ public final class BlobClient { /** * 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 @@ -125,7 +125,7 @@ public ResponseBase downloadWithResponse(Stri /** * 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 @@ -174,7 +174,7 @@ public InputStream download(String containerName, String blob, String snapshot, /** * 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 @@ -225,7 +225,7 @@ public Response downloadNoCustomHeadersWithResponse(String containe /** * 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 @@ -267,7 +267,7 @@ public ResponseBase getPropertiesWithResponse(S /** * 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 @@ -306,7 +306,7 @@ public void getProperties(String containerName, String blob, String snapshot, St /** * The Get Properties operation returns all user-defined metadata, standard HTTP properties, and system properties * for the blob. It does not return the content of the blob. - * + * * @param containerName The container name. * @param blob The blob name. * @param snapshot The snapshot parameter is an opaque DateTime value that, when present, specifies the blob @@ -362,7 +362,7 @@ public Response getPropertiesNoCustomHeadersWithResponse(String containerN * 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 @@ -422,7 +422,7 @@ public ResponseBase deleteWithResponse(String containe * automatic snapshot using snapshot timestamp or version id. You can restore the blob by calling Put or Copy Blob * API with automatic snapshot as source. Deleting automatic snapshot requires shared key or special SAS/RBAC * permissions. - * + * * @param containerName The container name. * @param blob The blob name. * @param snapshot The snapshot parameter is an opaque DateTime value that, when present, specifies the blob @@ -479,7 +479,7 @@ public void delete(String containerName, String blob, String snapshot, String ve * automatic snapshot using snapshot timestamp or version id. You can restore the blob by calling Put or Copy Blob * API with automatic snapshot as source. Deleting automatic snapshot requires shared key or special SAS/RBAC * permissions. - * + * * @param containerName The container name. * @param blob The blob name. * @param snapshot The snapshot parameter is an opaque DateTime value that, when present, specifies the blob @@ -525,7 +525,7 @@ public Response deleteNoCustomHeadersWithResponse(String containerName, St /** * 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 @@ -548,7 +548,7 @@ public ResponseBase undeleteWithResponse(String cont /** * Undelete a blob that was previously soft deleted. - * + * * @param containerName The container name. * @param blob The blob name. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a @@ -568,7 +568,7 @@ public void undelete(String containerName, String blob, Integer timeout, String /** * Undelete a blob that was previously soft deleted. - * + * * @param containerName The container name. * @param blob The blob name. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a @@ -591,7 +591,7 @@ public Response undeleteNoCustomHeadersWithResponse(String containerName, /** * 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. @@ -617,7 +617,7 @@ public ResponseBase setExpiryWithResponse(String co /** * 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. @@ -640,7 +640,7 @@ public void setExpiry(String containerName, String blob, BlobExpiryOptions expir /** * Sets the time a blob will expire and be deleted. - * + * * @param containerName The container name. * @param blob The blob name. * @param expiryOptions Required. Indicates mode of the expiry time. @@ -666,7 +666,7 @@ public Response setExpiryNoCustomHeadersWithResponse(String containerName, /** * 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 @@ -701,7 +701,7 @@ public ResponseBase setHttpHeadersWithResponse /** * 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 @@ -733,7 +733,7 @@ public void setHttpHeaders(String containerName, String blob, Integer timeout, S /** * The Set HTTP Headers operation sets system properties on the blob. - * + * * @param containerName The container name. * @param blob The blob name. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a @@ -767,7 +767,7 @@ public Response setHttpHeadersNoCustomHeadersWithResponse(String container /** * 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 @@ -803,7 +803,7 @@ public ResponseBase setImmutabilityPoli /** * 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 @@ -836,7 +836,7 @@ public void setImmutabilityPolicy(String containerName, String blob, Integer tim /** * The Set Immutability Policy operation sets the immutability policy on the blob. - * + * * @param containerName The container name. * @param blob The blob name. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a @@ -872,7 +872,7 @@ public Response setImmutabilityPolicyNoCustomHeadersWithResponse(String co /** * 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 @@ -903,7 +903,7 @@ public ResponseBase deleteImmutabili /** * 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 @@ -930,7 +930,7 @@ public void deleteImmutabilityPolicy(String containerName, String blob, Integer /** * The Delete Immutability Policy operation deletes the immutability policy on the blob. - * + * * @param containerName The container name. * @param blob The blob name. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a @@ -960,7 +960,7 @@ public Response deleteImmutabilityPolicyNoCustomHeadersWithResponse(String /** * The Set Legal Hold operation sets a legal hold on the blob. - * + * * @param containerName The container name. * @param blob The blob name. * @param legalHold Specified if a legal hold should be set on the blob. @@ -991,7 +991,7 @@ public ResponseBase setLegalHoldWithResponse(Str /** * 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. @@ -1019,7 +1019,7 @@ public void setLegalHold(String containerName, String blob, boolean legalHold, I /** * The Set Legal Hold operation sets a legal hold on the blob. - * + * * @param containerName The container name. * @param blob The blob name. * @param legalHold Specified if a legal hold should be set on the blob. @@ -1051,7 +1051,7 @@ public Response setLegalHoldNoCustomHeadersWithResponse(String containerNa /** * 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 @@ -1095,7 +1095,7 @@ public ResponseBase setMetadataWithResponse(Strin /** * 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 @@ -1135,7 +1135,7 @@ public void setMetadata(String containerName, String blob, Integer timeout, Map< /** * The Set Blob Metadata operation sets user-defined metadata for the specified blob as one or more name-value * pairs. - * + * * @param containerName The container name. * @param blob The blob name. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a @@ -1178,7 +1178,7 @@ public Response setMetadataNoCustomHeadersWithResponse(String containerNam /** * [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 @@ -1217,7 +1217,7 @@ public ResponseBase acquireLeaseWithResponse(Str /** * [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 @@ -1253,7 +1253,7 @@ public void acquireLease(String containerName, String blob, Integer timeout, Int /** * [Update] The Lease Blob operation establishes and manages a lock on a blob for write and delete operations. - * + * * @param containerName The container name. * @param blob The blob name. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a @@ -1291,7 +1291,7 @@ public Response acquireLeaseNoCustomHeadersWithResponse(String containerNa /** * [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. @@ -1324,7 +1324,7 @@ public ResponseBase releaseLeaseWithResponse(Str /** * [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. @@ -1355,7 +1355,7 @@ public void releaseLease(String containerName, String blob, String leaseId, Inte /** * [Update] The Lease Blob operation establishes and manages a lock on a blob for write and delete operations. - * + * * @param containerName The container name. * @param blob The blob name. * @param leaseId Specifies the current lease ID on the resource. @@ -1388,7 +1388,7 @@ public Response releaseLeaseNoCustomHeadersWithResponse(String containerNa /** * [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. @@ -1421,7 +1421,7 @@ public ResponseBase renewLeaseWithResponse(String /** * [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. @@ -1452,7 +1452,7 @@ public void renewLease(String containerName, String blob, String leaseId, Intege /** * [Update] The Lease Blob operation establishes and manages a lock on a blob for write and delete operations. - * + * * @param containerName The container name. * @param blob The blob name. * @param leaseId Specifies the current lease ID on the resource. @@ -1485,7 +1485,7 @@ public Response renewLeaseNoCustomHeadersWithResponse(String containerName /** * [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. @@ -1522,7 +1522,7 @@ public ResponseBase changeLeaseWithResponse(Strin /** * [Update] The Lease Blob operation establishes and manages a lock on a blob for write and delete operations. - * + * * @param containerName The container name. * @param blob The blob name. * @param leaseId Specifies the current lease ID on the resource. @@ -1556,7 +1556,7 @@ public void changeLease(String containerName, String blob, String leaseId, Strin /** * [Update] The Lease Blob operation establishes and manages a lock on a blob for write and delete operations. - * + * * @param containerName The container name. * @param blob The blob name. * @param leaseId Specifies the current lease ID on the resource. @@ -1592,7 +1592,7 @@ public Response changeLeaseNoCustomHeadersWithResponse(String containerNam /** * [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 @@ -1630,7 +1630,7 @@ public ResponseBase breakLeaseWithResponse(String /** * [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 @@ -1666,7 +1666,7 @@ public void breakLease(String containerName, String blob, Integer timeout, Integ /** * [Update] The Lease Blob operation establishes and manages a lock on a blob for write and delete operations. - * + * * @param containerName The container name. * @param blob The blob name. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a @@ -1704,7 +1704,7 @@ public Response breakLeaseNoCustomHeadersWithResponse(String containerName /** * 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 @@ -1747,7 +1747,7 @@ public ResponseBase createSnapshotWithResponse /** * 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 @@ -1786,7 +1786,7 @@ public void createSnapshot(String containerName, String blob, Integer timeout, M /** * The Create Snapshot operation creates a read-only snapshot of a blob. - * + * * @param containerName The container name. * @param blob The blob name. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a @@ -1829,7 +1829,7 @@ public Response createSnapshotNoCustomHeadersWithResponse(String container /** * 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 @@ -1892,7 +1892,7 @@ public ResponseBase startCopyFromURLWithResp /** * 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 @@ -1952,7 +1952,7 @@ public void startCopyFromURL(String containerName, String blob, String copySourc /** * The Start Copy From URL operation copies a blob or an internet resource to a new blob. - * + * * @param containerName The container name. * @param blob The blob name. * @param copySource Specifies the name of the source page blob snapshot. This value is a URL of up to 2 KB in @@ -2016,7 +2016,7 @@ public Response startCopyFromURLNoCustomHeadersWithResponse(String contain /** * 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 @@ -2084,7 +2084,7 @@ public ResponseBase copyFromURLWithResponse(Strin /** * 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 @@ -2148,7 +2148,7 @@ public void copyFromURL(String containerName, String blob, String copySource, In /** * The Copy From URL operation copies a blob or an internet resource to a new blob. It will not return a response * until the copy is complete. - * + * * @param containerName The container name. * @param blob The blob name. * @param copySource Specifies the name of the source page blob snapshot. This value is a URL of up to 2 KB in @@ -2216,7 +2216,7 @@ public Response copyFromURLNoCustomHeadersWithResponse(String containerNam /** * 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. @@ -2243,7 +2243,7 @@ public ResponseBase abortCopyFromURLWithResp /** * 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. @@ -2267,7 +2267,7 @@ public void abortCopyFromURL(String containerName, String blob, String copyId, I /** * The Abort Copy From URL operation aborts a pending Copy From URL operation, and leaves a destination blob with * zero length and full metadata. - * + * * @param containerName The container name. * @param blob The blob name. * @param copyId The copy identifier provided in the x-ms-copy-id header of the original Copy Blob operation. @@ -2296,7 +2296,7 @@ public Response abortCopyFromURLNoCustomHeadersWithResponse(String contain * 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. @@ -2334,7 +2334,7 @@ public ResponseBase setTierWithResponse(String contai * account and on a block blob in a blob storage account (locally redundant storage only). A premium page blob's * tier determines the allowed size, IOPS, and bandwidth of the blob. A block blob's tier determines * Hot/Cool/Archive storage type. This operation does not update the blob's ETag. - * + * * @param containerName The container name. * @param blob The blob name. * @param tier Indicates the tier to be set on the blob. @@ -2369,7 +2369,7 @@ public void setTier(String containerName, String blob, AccessTier tier, String s * account and on a block blob in a blob storage account (locally redundant storage only). A premium page blob's * tier determines the allowed size, IOPS, and bandwidth of the blob. A block blob's tier determines * Hot/Cool/Archive storage type. This operation does not update the blob's ETag. - * + * * @param containerName The container name. * @param blob The blob name. * @param tier Indicates the tier to be set on the blob. @@ -2404,7 +2404,7 @@ public Response setTierNoCustomHeadersWithResponse(String containerName, S /** * 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 @@ -2427,7 +2427,7 @@ public ResponseBase getAccountInfoWithResponse /** * 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 @@ -2447,7 +2447,7 @@ public void getAccountInfo(String containerName, String blob, Integer timeout, S /** * 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 @@ -2471,7 +2471,7 @@ public Response getAccountInfoNoCustomHeadersWithResponse(String container /** * 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 @@ -2511,7 +2511,7 @@ public ResponseBase queryWithResponse(String con /** * 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 @@ -2549,7 +2549,7 @@ public InputStream query(String containerName, String blob, String snapshot, Int /** * 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 @@ -2590,7 +2590,7 @@ public Response queryNoCustomHeadersWithResponse(String containerNa /** * 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 @@ -2623,7 +2623,7 @@ public ResponseBase getTagsWithResponse(String co /** * 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 @@ -2654,7 +2654,7 @@ public BlobTags getTags(String containerName, String blob, Integer timeout, Stri /** * 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 @@ -2686,7 +2686,7 @@ public Response getTagsNoCustomHeadersWithResponse(String containerNam /** * 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 @@ -2718,7 +2718,7 @@ public ResponseBase setTagsWithResponse(String contai /** * 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 @@ -2748,7 +2748,7 @@ public void setTags(String containerName, String blob, Integer timeout, String v /** * The Set Tags operation enables users to set tags on a blob. - * + * * @param containerName The container name. * @param blob The blob name. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/BlockBlobClient.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/BlockBlobClient.java similarity index 98% rename from sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/BlockBlobClient.java rename to sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/BlockBlobClient.java index 87a6502d8cbc..ca15e26bfc88 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/BlockBlobClient.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/BlockBlobClient.java @@ -2,30 +2,30 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.blob; +package com.azure.v2.storage.blob; import com.azure.core.v2.annotation.Generated; import com.azure.core.v2.annotation.ReturnType; import com.azure.core.v2.annotation.ServiceClient; import com.azure.core.v2.annotation.ServiceMethod; import com.azure.core.v2.http.rest.ResponseBase; -import com.azure.storage.blob.implementation.BlockBlobsImpl; -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.BlockBlobsCommitBlockListHeaders; -import com.azure.storage.blob.models.BlockBlobsGetBlockListHeaders; -import com.azure.storage.blob.models.BlockBlobsPutBlobFromUrlHeaders; -import com.azure.storage.blob.models.BlockBlobsStageBlockFromURLHeaders; -import com.azure.storage.blob.models.BlockBlobsStageBlockHeaders; -import com.azure.storage.blob.models.BlockBlobsUploadHeaders; -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.EncryptionScope; -import com.azure.storage.blob.models.StorageErrorException; +import com.azure.v2.storage.blob.implementation.BlockBlobsImpl; +import com.azure.v2.storage.blob.models.AccessTier; +import com.azure.v2.storage.blob.models.BlobCopySourceTagsMode; +import com.azure.v2.storage.blob.models.BlobHttpHeaders; +import com.azure.v2.storage.blob.models.BlobImmutabilityPolicyMode; +import com.azure.v2.storage.blob.models.BlockBlobsCommitBlockListHeaders; +import com.azure.v2.storage.blob.models.BlockBlobsGetBlockListHeaders; +import com.azure.v2.storage.blob.models.BlockBlobsPutBlobFromUrlHeaders; +import com.azure.v2.storage.blob.models.BlockBlobsStageBlockFromURLHeaders; +import com.azure.v2.storage.blob.models.BlockBlobsStageBlockHeaders; +import com.azure.v2.storage.blob.models.BlockBlobsUploadHeaders; +import com.azure.v2.storage.blob.models.BlockList; +import com.azure.v2.storage.blob.models.BlockListType; +import com.azure.v2.storage.blob.models.BlockLookupList; +import com.azure.v2.storage.blob.models.CpkInfo; +import com.azure.v2.storage.blob.models.EncryptionScope; +import com.azure.v2.storage.blob.models.StorageErrorException; import io.clientcore.core.http.models.Response; import io.clientcore.core.util.Context; import io.clientcore.core.util.binarydata.BinaryData; @@ -42,7 +42,7 @@ public final class BlockBlobClient { /** * Initializes an instance of BlockBlobClient class. - * + * * @param serviceClient the service client implementation. */ @Generated @@ -55,7 +55,7 @@ public final class BlockBlobClient { * 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. @@ -121,7 +121,7 @@ public ResponseBase uploadWithResponse(String con * overwrites any existing metadata on the blob. Partial updates are not supported with Put Blob; the content of the * existing blob is overwritten with the content of the new blob. To perform a partial update of the content of a * block blob, use the Put Block List operation. - * + * * @param containerName The container name. * @param blob The blob name. * @param contentLength The length of the request. @@ -183,7 +183,7 @@ public void upload(String containerName, String blob, long contentLength, Binary * overwrites any existing metadata on the blob. Partial updates are not supported with Put Blob; the content of the * existing blob is overwritten with the content of the new blob. To perform a partial update of the content of a * block blob, use the Put Block List operation. - * + * * @param containerName The container name. * @param blob The blob name. * @param contentLength The length of the request. @@ -249,7 +249,7 @@ public Response uploadNoCustomHeadersWithResponse(String containerName, St * 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. @@ -324,7 +324,7 @@ public ResponseBase putBlobFromUrlWithRes * from URL; the content of an existing blob is overwritten with the content of the new blob. To perform partial * updates to a block blob's contents using a source URL, use the Put Block from URL API in conjunction with Put * Block List. - * + * * @param containerName The container name. * @param blob The blob name. * @param contentLength The length of the request. @@ -397,7 +397,7 @@ public void putBlobFromUrl(String containerName, String blob, long contentLength * from URL; the content of an existing blob is overwritten with the content of the new blob. To perform partial * updates to a block blob's contents using a source URL, use the Put Block from URL API in conjunction with Put * Block List. - * + * * @param containerName The container name. * @param blob The blob name. * @param contentLength The length of the request. @@ -468,7 +468,7 @@ public Response putBlobFromUrlNoCustomHeadersWithResponse(String container /** * 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 @@ -509,7 +509,7 @@ public ResponseBase stageBlockWithResponse(St /** * 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 @@ -548,7 +548,7 @@ public void stageBlock(String containerName, String blob, String blockId, long c /** * The Stage Block operation creates a new block to be committed as part of a blob. - * + * * @param containerName The container name. * @param blob The blob name. * @param blockId A valid Base64 string value that identifies the block. Prior to encoding, the string must be less @@ -590,7 +590,7 @@ public Response stageBlockNoCustomHeadersWithResponse(String containerName /** * 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 @@ -640,7 +640,7 @@ public ResponseBase stageBlockFromURLW /** * 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 @@ -687,7 +687,7 @@ public void stageBlockFromURL(String containerName, String blob, String blockId, /** * The Stage Block operation creates a new block to be committed as part of a blob where the contents are read from * a URL. - * + * * @param containerName The container name. * @param blob The blob name. * @param blockId A valid Base64 string value that identifies the block. Prior to encoding, the string must be less @@ -741,7 +741,7 @@ public Response stageBlockFromURLNoCustomHeadersWithResponse(String contai * 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. @@ -802,7 +802,7 @@ public ResponseBase commitBlockListWithR * committing the new and existing blocks together. You can do this by specifying whether to commit a block from the * committed block list or from the uncommitted block list, or to commit the most recently uploaded version of the * block, whichever list it may belong to. - * + * * @param containerName The container name. * @param blob The blob name. * @param blocks Blob Blocks. @@ -860,7 +860,7 @@ public void commitBlockList(String containerName, String blob, BlockLookupList b * committing the new and existing blocks together. You can do this by specifying whether to commit a block from the * committed block list or from the uncommitted block list, or to commit the most recently uploaded version of the * block, whichever list it may belong to. - * + * * @param containerName The container name. * @param blob The blob name. * @param blocks Blob Blocks. @@ -916,7 +916,7 @@ public Response commitBlockListNoCustomHeadersWithResponse(String containe /** * 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 @@ -949,7 +949,7 @@ public ResponseBase getBlockListWithRe /** * 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 @@ -980,7 +980,7 @@ public BlockList getBlockList(String containerName, String blob, BlockListType l /** * 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 diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/ContainerClient.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/ContainerClient.java similarity index 97% rename from sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/ContainerClient.java rename to sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/ContainerClient.java index 0b37ede0118f..1621b3a9f2ea 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/ContainerClient.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/ContainerClient.java @@ -2,42 +2,42 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.blob; +package com.azure.v2.storage.blob; import com.azure.core.v2.annotation.Generated; import com.azure.core.v2.annotation.ReturnType; import com.azure.core.v2.annotation.ServiceClient; import com.azure.core.v2.annotation.ServiceMethod; import com.azure.core.v2.http.rest.ResponseBase; -import com.azure.storage.blob.implementation.ContainersImpl; -import com.azure.storage.blob.implementation.models.BlobSignedIdentifierWrapper; -import com.azure.storage.blob.models.BlobContainerEncryptionScope; -import com.azure.storage.blob.models.BlobSignedIdentifier; -import com.azure.storage.blob.models.ContainersAcquireLeaseHeaders; -import com.azure.storage.blob.models.ContainersBreakLeaseHeaders; -import com.azure.storage.blob.models.ContainersChangeLeaseHeaders; -import com.azure.storage.blob.models.ContainersCreateHeaders; -import com.azure.storage.blob.models.ContainersDeleteHeaders; -import com.azure.storage.blob.models.ContainersFilterBlobsHeaders; -import com.azure.storage.blob.models.ContainersGetAccessPolicyHeaders; -import com.azure.storage.blob.models.ContainersGetAccountInfoHeaders; -import com.azure.storage.blob.models.ContainersGetPropertiesHeaders; -import com.azure.storage.blob.models.ContainersListBlobFlatSegmentHeaders; -import com.azure.storage.blob.models.ContainersListBlobHierarchySegmentHeaders; -import com.azure.storage.blob.models.ContainersReleaseLeaseHeaders; -import com.azure.storage.blob.models.ContainersRenameHeaders; -import com.azure.storage.blob.models.ContainersRenewLeaseHeaders; -import com.azure.storage.blob.models.ContainersRestoreHeaders; -import com.azure.storage.blob.models.ContainersSetAccessPolicyHeaders; -import com.azure.storage.blob.models.ContainersSetMetadataHeaders; -import com.azure.storage.blob.models.ContainersSubmitBatchHeaders; -import com.azure.storage.blob.models.FilterBlobSegment; -import com.azure.storage.blob.models.FilterBlobsIncludeItem; -import com.azure.storage.blob.models.ListBlobsFlatSegmentResponse; -import com.azure.storage.blob.models.ListBlobsHierarchySegmentResponse; -import com.azure.storage.blob.models.ListBlobsIncludeItem; -import com.azure.storage.blob.models.PublicAccessType; -import com.azure.storage.blob.models.StorageErrorException; +import com.azure.v2.storage.blob.implementation.ContainersImpl; +import com.azure.v2.storage.blob.implementation.models.BlobSignedIdentifierWrapper; +import com.azure.v2.storage.blob.models.BlobContainerEncryptionScope; +import com.azure.v2.storage.blob.models.BlobSignedIdentifier; +import com.azure.v2.storage.blob.models.ContainersAcquireLeaseHeaders; +import com.azure.v2.storage.blob.models.ContainersBreakLeaseHeaders; +import com.azure.v2.storage.blob.models.ContainersChangeLeaseHeaders; +import com.azure.v2.storage.blob.models.ContainersCreateHeaders; +import com.azure.v2.storage.blob.models.ContainersDeleteHeaders; +import com.azure.v2.storage.blob.models.ContainersFilterBlobsHeaders; +import com.azure.v2.storage.blob.models.ContainersGetAccessPolicyHeaders; +import com.azure.v2.storage.blob.models.ContainersGetAccountInfoHeaders; +import com.azure.v2.storage.blob.models.ContainersGetPropertiesHeaders; +import com.azure.v2.storage.blob.models.ContainersListBlobFlatSegmentHeaders; +import com.azure.v2.storage.blob.models.ContainersListBlobHierarchySegmentHeaders; +import com.azure.v2.storage.blob.models.ContainersReleaseLeaseHeaders; +import com.azure.v2.storage.blob.models.ContainersRenameHeaders; +import com.azure.v2.storage.blob.models.ContainersRenewLeaseHeaders; +import com.azure.v2.storage.blob.models.ContainersRestoreHeaders; +import com.azure.v2.storage.blob.models.ContainersSetAccessPolicyHeaders; +import com.azure.v2.storage.blob.models.ContainersSetMetadataHeaders; +import com.azure.v2.storage.blob.models.ContainersSubmitBatchHeaders; +import com.azure.v2.storage.blob.models.FilterBlobSegment; +import com.azure.v2.storage.blob.models.FilterBlobsIncludeItem; +import com.azure.v2.storage.blob.models.ListBlobsFlatSegmentResponse; +import com.azure.v2.storage.blob.models.ListBlobsHierarchySegmentResponse; +import com.azure.v2.storage.blob.models.ListBlobsIncludeItem; +import com.azure.v2.storage.blob.models.PublicAccessType; +import com.azure.v2.storage.blob.models.StorageErrorException; import io.clientcore.core.http.models.Response; import io.clientcore.core.util.Context; import io.clientcore.core.util.binarydata.BinaryData; @@ -56,7 +56,7 @@ public final class ContainerClient { /** * Initializes an instance of ContainerClient class. - * + * * @param serviceClient the service client implementation. */ @Generated @@ -67,7 +67,7 @@ public final class ContainerClient { /** * creates a new container under the specified account. If the container with the same name already exists, the * operation fails. - * + * * @param containerName The container name. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting @@ -100,7 +100,7 @@ public ResponseBase createWithResponse(String con /** * creates a new container under the specified account. If the container with the same name already exists, the * operation fails. - * + * * @param containerName The container name. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting @@ -129,7 +129,7 @@ public void create(String containerName, Integer timeout, Map me /** * creates a new container under the specified account. If the container with the same name already exists, the * operation fails. - * + * * @param containerName The container name. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting @@ -162,7 +162,7 @@ public Response createNoCustomHeadersWithResponse(String containerName, In /** * returns all user-defined metadata and system properties for the specified container. The data returned does not * include the container's list of blobs. - * + * * @param containerName The container name. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting @@ -186,7 +186,7 @@ public ResponseBase getPropertiesWithRespo /** * returns all user-defined metadata and system properties for the specified container. The data returned does not * include the container's list of blobs. - * + * * @param containerName The container name. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting @@ -207,7 +207,7 @@ public void getProperties(String containerName, Integer timeout, String leaseId, /** * returns all user-defined metadata and system properties for the specified container. The data returned does not * include the container's list of blobs. - * + * * @param containerName The container name. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting @@ -232,7 +232,7 @@ public Response getPropertiesNoCustomHeadersWithResponse(String containerN /** * operation marks the specified container for deletion. The container and any blobs contained within it are later * deleted during garbage collection. - * + * * @param containerName The container name. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting @@ -262,7 +262,7 @@ public ResponseBase deleteWithResponse(String con /** * operation marks the specified container for deletion. The container and any blobs contained within it are later * deleted during garbage collection. - * + * * @param containerName The container name. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting @@ -288,7 +288,7 @@ public void delete(String containerName, Integer timeout, String leaseId, Offset /** * operation marks the specified container for deletion. The container and any blobs contained within it are later * deleted during garbage collection. - * + * * @param containerName The container name. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting @@ -316,7 +316,7 @@ public Response deleteNoCustomHeadersWithResponse(String containerName, In /** * operation sets one or more user-defined name-value pairs for the specified container. - * + * * @param containerName The container name. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting @@ -349,7 +349,7 @@ public ResponseBase setMetadataWithResponse( /** * operation sets one or more user-defined name-value pairs for the specified container. - * + * * @param containerName The container name. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting @@ -378,7 +378,7 @@ public void setMetadata(String containerName, Integer timeout, String leaseId, M /** * operation sets one or more user-defined name-value pairs for the specified container. - * + * * @param containerName The container name. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting @@ -411,7 +411,7 @@ public Response setMetadataNoCustomHeadersWithResponse(String containerNam /** * gets the permissions for the specified container. The permissions indicate whether container data may be accessed * publicly. - * + * * @param containerName The container name. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting @@ -435,7 +435,7 @@ public ResponseBase getAccessPolicyNoCustomHeadersWithR /** * sets the permissions for the specified container. The permissions indicate whether blobs in a container may be * accessed publicly. - * + * * @param containerName The container name. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting @@ -515,7 +515,7 @@ public ResponseBase setAccessPolicyWithR /** * sets the permissions for the specified container. The permissions indicate whether blobs in a container may be * accessed publicly. - * + * * @param containerName The container name. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting @@ -545,7 +545,7 @@ public void setAccessPolicy(String containerName, Integer timeout, String leaseI /** * sets the permissions for the specified container. The permissions indicate whether blobs in a container may be * accessed publicly. - * + * * @param containerName The container name. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting @@ -576,7 +576,7 @@ public Response setAccessPolicyNoCustomHeadersWithResponse(String containe /** * Restores a previously-deleted container. - * + * * @param containerName The container name. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting @@ -603,7 +603,7 @@ public ResponseBase restoreWithResponse(String c /** * Restores a previously-deleted container. - * + * * @param containerName The container name. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting @@ -627,7 +627,7 @@ public void restore(String containerName, Integer timeout, String requestId, Str /** * Restores a previously-deleted container. - * + * * @param containerName The container name. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting @@ -654,7 +654,7 @@ public Response restoreNoCustomHeadersWithResponse(String containerName, I /** * 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 @@ -680,7 +680,7 @@ public ResponseBase renameWithResponse(String con /** * 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 @@ -703,7 +703,7 @@ public void rename(String containerName, String sourceContainerName, Integer tim /** * Renames an existing container. - * + * * @param containerName The container name. * @param sourceContainerName Required. Specifies the name of the container to rename. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a @@ -729,7 +729,7 @@ public Response renameNoCustomHeadersWithResponse(String containerName, St /** * 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. @@ -757,7 +757,7 @@ public ResponseBase submitBatchWithRe /** * 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. @@ -783,7 +783,7 @@ public InputStream submitBatch(String containerName, long contentLength, String /** * 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. @@ -811,7 +811,7 @@ public Response submitBatchNoCustomHeadersWithResponse(String conta /** * The Filter Blobs operation enables callers to list blobs in a container whose tags match a given search * expression. Filter blobs searches within the given container. - * + * * @param containerName The container name. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting @@ -848,7 +848,7 @@ public ResponseBase filterBlobs /** * The Filter Blobs operation enables callers to list blobs in a container whose tags match a given search * expression. Filter blobs searches within the given container. - * + * * @param containerName The container name. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting @@ -882,7 +882,7 @@ public FilterBlobSegment filterBlobs(String containerName, Integer timeout, Stri /** * The Filter Blobs operation enables callers to list blobs in a container whose tags match a given search * expression. Filter blobs searches within the given container. - * + * * @param containerName The container name. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting @@ -919,7 +919,7 @@ public Response filterBlobsNoCustomHeadersWithResponse(String /** * [Update] establishes and manages a lock on a container for delete operations. The lock duration can be 15 to 60 * seconds, or can be infinite. - * + * * @param containerName The container name. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting @@ -954,7 +954,7 @@ public ResponseBase acquireLeaseWithRespons /** * [Update] establishes and manages a lock on a container for delete operations. The lock duration can be 15 to 60 * seconds, or can be infinite. - * + * * @param containerName The container name. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting @@ -986,7 +986,7 @@ public void acquireLease(String containerName, Integer timeout, Integer duration /** * [Update] establishes and manages a lock on a container for delete operations. The lock duration can be 15 to 60 * seconds, or can be infinite. - * + * * @param containerName The container name. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting @@ -1021,7 +1021,7 @@ public Response acquireLeaseNoCustomHeadersWithResponse(String containerNa /** * [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 @@ -1051,7 +1051,7 @@ public ResponseBase releaseLeaseWithRespons /** * [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 @@ -1077,7 +1077,7 @@ public void releaseLease(String containerName, String leaseId, Integer timeout, /** * [Update] establishes and manages a lock on a container for delete operations. The lock duration can be 15 to 60 * seconds, or can be infinite. - * + * * @param containerName The container name. * @param leaseId Specifies the current lease ID on the resource. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a @@ -1106,7 +1106,7 @@ public Response releaseLeaseNoCustomHeadersWithResponse(String containerNa /** * [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 @@ -1136,7 +1136,7 @@ public ResponseBase renewLeaseWithResponse(St /** * [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 @@ -1162,7 +1162,7 @@ public void renewLease(String containerName, String leaseId, Integer timeout, Of /** * [Update] establishes and manages a lock on a container for delete operations. The lock duration can be 15 to 60 * seconds, or can be infinite. - * + * * @param containerName The container name. * @param leaseId Specifies the current lease ID on the resource. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a @@ -1191,7 +1191,7 @@ public Response renewLeaseNoCustomHeadersWithResponse(String containerName /** * [Update] establishes and manages a lock on a container for delete operations. The lock duration can be 15 to 60 * seconds, or can be infinite. - * + * * @param containerName The container name. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting @@ -1226,7 +1226,7 @@ public ResponseBase breakLeaseWithResponse(St /** * [Update] establishes and manages a lock on a container for delete operations. The lock duration can be 15 to 60 * seconds, or can be infinite. - * + * * @param containerName The container name. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting @@ -1258,7 +1258,7 @@ public void breakLease(String containerName, Integer timeout, Integer breakPerio /** * [Update] establishes and manages a lock on a container for delete operations. The lock duration can be 15 to 60 * seconds, or can be infinite. - * + * * @param containerName The container name. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting @@ -1293,7 +1293,7 @@ public Response breakLeaseNoCustomHeadersWithResponse(String containerName /** * [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) @@ -1326,7 +1326,7 @@ public ResponseBase changeLeaseWithResponse( /** * [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) @@ -1356,7 +1356,7 @@ public void changeLease(String containerName, String leaseId, String proposedLea /** * [Update] establishes and manages a lock on a container for delete operations. The lock duration can be 15 to 60 * seconds, or can be infinite. - * + * * @param containerName The container name. * @param leaseId Specifies the current lease ID on the resource. * @param proposedLeaseId Proposed lease ID, in a GUID string format. The Blob service returns 400 (Invalid request) @@ -1388,7 +1388,7 @@ public Response changeLeaseNoCustomHeadersWithResponse(String containerNam /** * [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 @@ -1424,7 +1424,7 @@ public Response changeLeaseNoCustomHeadersWithResponse(String containerNam /** * [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 @@ -1458,7 +1458,7 @@ public ListBlobsFlatSegmentResponse listBlobFlatSegment(String containerName, St /** * [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 @@ -1494,7 +1494,7 @@ public Response listBlobFlatSegmentNoCustomHeaders /** * [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 @@ -1534,7 +1534,7 @@ public Response listBlobFlatSegmentNoCustomHeaders /** * [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 @@ -1572,7 +1572,7 @@ public ListBlobsHierarchySegmentResponse listBlobHierarchySegment(String contain /** * [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 @@ -1611,7 +1611,7 @@ public Response listBlobHierarchySegmentNoCus /** * Returns the sku name and account kind. - * + * * @param containerName The container name. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting @@ -1633,7 +1633,7 @@ public ResponseBase getAccountInfoWithRes /** * Returns the sku name and account kind. - * + * * @param containerName The container name. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting @@ -1652,7 +1652,7 @@ public void getAccountInfo(String containerName, Integer timeout, String request /** * Returns the sku name and account kind. - * + * * @param containerName The container name. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/PageBlobClient.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/PageBlobClient.java similarity index 98% rename from sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/PageBlobClient.java rename to sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/PageBlobClient.java index 64d00ad84a31..b1e8064d3438 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/PageBlobClient.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/PageBlobClient.java @@ -2,31 +2,31 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.blob; +package com.azure.v2.storage.blob; import com.azure.core.v2.annotation.Generated; import com.azure.core.v2.annotation.ReturnType; import com.azure.core.v2.annotation.ServiceClient; import com.azure.core.v2.annotation.ServiceMethod; import com.azure.core.v2.http.rest.ResponseBase; -import com.azure.storage.blob.implementation.PageBlobsImpl; -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.EncryptionScope; -import com.azure.storage.blob.models.PageBlobsClearPagesHeaders; -import com.azure.storage.blob.models.PageBlobsCopyIncrementalHeaders; -import com.azure.storage.blob.models.PageBlobsCreateHeaders; -import com.azure.storage.blob.models.PageBlobsGetPageRangesDiffHeaders; -import com.azure.storage.blob.models.PageBlobsGetPageRangesHeaders; -import com.azure.storage.blob.models.PageBlobsResizeHeaders; -import com.azure.storage.blob.models.PageBlobsUpdateSequenceNumberHeaders; -import com.azure.storage.blob.models.PageBlobsUploadPagesFromURLHeaders; -import com.azure.storage.blob.models.PageBlobsUploadPagesHeaders; -import com.azure.storage.blob.models.PageList; -import com.azure.storage.blob.models.PremiumPageBlobAccessTier; -import com.azure.storage.blob.models.SequenceNumberActionType; -import com.azure.storage.blob.models.StorageErrorException; +import com.azure.v2.storage.blob.implementation.PageBlobsImpl; +import com.azure.v2.storage.blob.models.BlobHttpHeaders; +import com.azure.v2.storage.blob.models.BlobImmutabilityPolicyMode; +import com.azure.v2.storage.blob.models.CpkInfo; +import com.azure.v2.storage.blob.models.EncryptionScope; +import com.azure.v2.storage.blob.models.PageBlobsClearPagesHeaders; +import com.azure.v2.storage.blob.models.PageBlobsCopyIncrementalHeaders; +import com.azure.v2.storage.blob.models.PageBlobsCreateHeaders; +import com.azure.v2.storage.blob.models.PageBlobsGetPageRangesDiffHeaders; +import com.azure.v2.storage.blob.models.PageBlobsGetPageRangesHeaders; +import com.azure.v2.storage.blob.models.PageBlobsResizeHeaders; +import com.azure.v2.storage.blob.models.PageBlobsUpdateSequenceNumberHeaders; +import com.azure.v2.storage.blob.models.PageBlobsUploadPagesFromURLHeaders; +import com.azure.v2.storage.blob.models.PageBlobsUploadPagesHeaders; +import com.azure.v2.storage.blob.models.PageList; +import com.azure.v2.storage.blob.models.PremiumPageBlobAccessTier; +import com.azure.v2.storage.blob.models.SequenceNumberActionType; +import com.azure.v2.storage.blob.models.StorageErrorException; import io.clientcore.core.http.models.Response; import io.clientcore.core.util.Context; import io.clientcore.core.util.binarydata.BinaryData; @@ -43,7 +43,7 @@ public final class PageBlobClient { /** * Initializes an instance of PageBlobClient class. - * + * * @param serviceClient the service client implementation. */ @Generated @@ -53,7 +53,7 @@ public final class PageBlobClient { /** * 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. @@ -111,7 +111,7 @@ public ResponseBase createWithResponse(String cont /** * 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. @@ -166,7 +166,7 @@ public void create(String containerName, String blob, long contentLength, long b /** * The Create operation creates a new page blob. - * + * * @param containerName The container name. * @param blob The blob name. * @param contentLength The length of the request. @@ -223,7 +223,7 @@ public Response createNoCustomHeadersWithResponse(String containerName, St /** * 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. @@ -280,7 +280,7 @@ public ResponseBase uploadPagesWithResponse(S /** * 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. @@ -333,7 +333,7 @@ public void uploadPages(String containerName, String blob, long contentLength, B /** * The Upload Pages operation writes a range of pages to a page blob. - * + * * @param containerName The container name. * @param blob The blob name. * @param contentLength The length of the request. @@ -389,7 +389,7 @@ public Response uploadPagesNoCustomHeadersWithResponse(String containerNam /** * 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. @@ -435,7 +435,7 @@ public ResponseBase clearPagesWithResponse(Str /** * 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. @@ -478,7 +478,7 @@ public void clearPages(String containerName, String blob, long contentLength, In /** * The Clear Pages operation clears a set of pages from a page blob. - * + * * @param containerName The container name. * @param blob The blob name. * @param contentLength The length of the request. @@ -525,7 +525,7 @@ public Response clearPagesNoCustomHeadersWithResponse(String containerName /** * 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. @@ -592,7 +592,7 @@ public ResponseBase uploadPagesFromURL /** * 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. @@ -655,7 +655,7 @@ public void uploadPagesFromURL(String containerName, String blob, String sourceU /** * The Upload Pages operation writes a range of pages to a page blob where the contents are read from a URL. - * + * * @param containerName The container name. * @param blob The blob name. * @param sourceUrl Specify a URL to the copy source. @@ -723,7 +723,7 @@ public Response uploadPagesFromURLNoCustomHeadersWithResponse(String conta /** * 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 @@ -773,7 +773,7 @@ public ResponseBase getPageRangesWithRe /** * 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 @@ -821,7 +821,7 @@ public PageList getPageRanges(String containerName, String blob, String snapshot /** * 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 @@ -872,7 +872,7 @@ public Response getPageRangesNoCustomHeadersWithResponse(String contai /** * [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 @@ -931,7 +931,7 @@ public ResponseBase getPageRangesDi /** * [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 @@ -989,7 +989,7 @@ public PageList getPageRangesDiff(String containerName, String blob, String snap /** * [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 @@ -1047,7 +1047,7 @@ public Response getPageRangesDiffNoCustomHeadersWithResponse(String co /** * 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 @@ -1086,7 +1086,7 @@ public ResponseBase resizeWithResponse(String cont /** * 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 @@ -1121,7 +1121,7 @@ public void resize(String containerName, String blob, long blobContentLength, In /** * Resize the Blob. - * + * * @param containerName The container name. * @param blob The blob name. * @param blobContentLength This header specifies the maximum size for the page blob, up to 1 TB. The page blob size @@ -1160,7 +1160,7 @@ public Response resizeNoCustomHeadersWithResponse(String containerName, St /** * 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 @@ -1200,7 +1200,7 @@ public ResponseBase updateSequenceNu /** * 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 @@ -1236,7 +1236,7 @@ public void updateSequenceNumber(String containerName, String blob, SequenceNumb /** * Update the sequence number of the blob. - * + * * @param containerName The container name. * @param blob The blob name. * @param sequenceNumberAction Required if the x-ms-blob-sequence-number header is set for the request. This @@ -1279,7 +1279,7 @@ public Response updateSequenceNumberNoCustomHeadersWithResponse(String con * 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 @@ -1318,7 +1318,7 @@ public ResponseBase copyIncrementalWithRe * is copied such that only the differential changes between the previously copied snapshot are transferred to the * destination. The copied snapshots are complete copies of the original snapshot and can be read or copied from as * usual. This API is supported since REST version 2016-05-31. - * + * * @param containerName The container name. * @param blob The blob name. * @param copySource Specifies the name of the source page blob snapshot. This value is a URL of up to 2 KB in @@ -1354,7 +1354,7 @@ public void copyIncremental(String containerName, String blob, String copySource * is copied such that only the differential changes between the previously copied snapshot are transferred to the * destination. The copied snapshots are complete copies of the original snapshot and can be read or copied from as * usual. This API is supported since REST version 2016-05-31. - * + * * @param containerName The container name. * @param blob The blob name. * @param copySource Specifies the name of the source page blob snapshot. This value is a URL of up to 2 KB in diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/StorageServiceClient.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/StorageServiceClient.java similarity index 96% rename from sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/StorageServiceClient.java rename to sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/StorageServiceClient.java index 2722d57553dc..eb226790ea93 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/StorageServiceClient.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/StorageServiceClient.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.blob; +package com.azure.v2.storage.blob; import com.azure.core.v2.annotation.Generated; import com.azure.core.v2.annotation.ReturnType; @@ -10,23 +10,23 @@ import com.azure.core.v2.annotation.ServiceMethod; import com.azure.core.v2.http.rest.PagedIterable; import com.azure.core.v2.http.rest.ResponseBase; -import com.azure.storage.blob.implementation.ServicesImpl; -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.FilterBlobSegment; -import com.azure.storage.blob.models.FilterBlobsIncludeItem; -import com.azure.storage.blob.models.KeyInfo; -import com.azure.storage.blob.models.ListBlobContainersIncludeType; -import com.azure.storage.blob.models.ServicesFilterBlobsHeaders; -import com.azure.storage.blob.models.ServicesGetAccountInfoHeaders; -import com.azure.storage.blob.models.ServicesGetPropertiesHeaders; -import com.azure.storage.blob.models.ServicesGetStatisticsHeaders; -import com.azure.storage.blob.models.ServicesGetUserDelegationKeyHeaders; -import com.azure.storage.blob.models.ServicesSetPropertiesHeaders; -import com.azure.storage.blob.models.ServicesSubmitBatchHeaders; -import com.azure.storage.blob.models.StorageErrorException; -import com.azure.storage.blob.models.UserDelegationKey; +import com.azure.v2.storage.blob.implementation.ServicesImpl; +import com.azure.v2.storage.blob.models.BlobContainerItem; +import com.azure.v2.storage.blob.models.BlobServiceProperties; +import com.azure.v2.storage.blob.models.BlobServiceStatistics; +import com.azure.v2.storage.blob.models.FilterBlobSegment; +import com.azure.v2.storage.blob.models.FilterBlobsIncludeItem; +import com.azure.v2.storage.blob.models.KeyInfo; +import com.azure.v2.storage.blob.models.ListBlobContainersIncludeType; +import com.azure.v2.storage.blob.models.ServicesFilterBlobsHeaders; +import com.azure.v2.storage.blob.models.ServicesGetAccountInfoHeaders; +import com.azure.v2.storage.blob.models.ServicesGetPropertiesHeaders; +import com.azure.v2.storage.blob.models.ServicesGetStatisticsHeaders; +import com.azure.v2.storage.blob.models.ServicesGetUserDelegationKeyHeaders; +import com.azure.v2.storage.blob.models.ServicesSetPropertiesHeaders; +import com.azure.v2.storage.blob.models.ServicesSubmitBatchHeaders; +import com.azure.v2.storage.blob.models.StorageErrorException; +import com.azure.v2.storage.blob.models.UserDelegationKey; import io.clientcore.core.http.models.Response; import io.clientcore.core.util.Context; import io.clientcore.core.util.binarydata.BinaryData; @@ -43,7 +43,7 @@ public final class StorageServiceClient { /** * Initializes an instance of ServiceClient class. - * + * * @param serviceClient the service client implementation. */ @Generated @@ -54,7 +54,7 @@ public final class StorageServiceClient { /** * Sets properties for a storage account's Blob service endpoint, including properties for Storage Analytics and * CORS (Cross-Origin Resource Sharing) rules. - * + * * @param blobServiceProperties The StorageService properties. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting @@ -77,7 +77,7 @@ public ResponseBase setPropertiesWithRespons /** * Sets properties for a storage account's Blob service endpoint, including properties for Storage Analytics and * CORS (Cross-Origin Resource Sharing) rules. - * + * * @param blobServiceProperties The StorageService properties. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting @@ -97,7 +97,7 @@ public void setProperties(BlobServiceProperties blobServiceProperties, Integer t /** * Sets properties for a storage account's Blob service endpoint, including properties for Storage Analytics and * CORS (Cross-Origin Resource Sharing) rules. - * + * * @param blobServiceProperties The StorageService properties. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting @@ -121,7 +121,7 @@ public Response setPropertiesNoCustomHeadersWithResponse(BlobServiceProper /** * gets the properties of a storage account's Blob service, including properties for Storage Analytics and CORS * (Cross-Origin Resource Sharing) rules. - * + * * @param timeout The timeout parameter is expressed in seconds. For more information, see <a * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting * Timeouts for Blob Service Operations.</a>. @@ -144,7 +144,7 @@ public ResponseBase getProp /** * gets the properties of a storage account's Blob service, including properties for Storage Analytics and CORS * (Cross-Origin Resource Sharing) rules. - * + * * @param timeout The timeout parameter is expressed in seconds. For more information, see <a * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting * Timeouts for Blob Service Operations.</a>. @@ -165,7 +165,7 @@ public BlobServiceProperties getProperties(Integer timeout, String requestId) { /** * gets the properties of a storage account's Blob service, including properties for Storage Analytics and CORS * (Cross-Origin Resource Sharing) rules. - * + * * @param timeout The timeout parameter is expressed in seconds. For more information, see <a * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting * Timeouts for Blob Service Operations.</a>. @@ -188,7 +188,7 @@ public Response getPropertiesNoCustomHeadersWithResponse( /** * 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>. @@ -210,7 +210,7 @@ public ResponseBase getStat /** * 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>. @@ -230,7 +230,7 @@ public BlobServiceStatistics getStatistics(Integer timeout, String requestId) { /** * 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>. @@ -251,7 +251,7 @@ public Response getStatisticsNoCustomHeadersWithResponse( /** * 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 @@ -287,7 +287,7 @@ public PagedIterable listBlobContainersSegment(String prefix, /** * The List Containers Segment operation returns a list of the containers under the specified account. - * + * * @param prefix Filters the results to return only containers whose name begins with the specified prefix. * @param marker A string value that identifies the portion of the list of containers to be returned with the next * listing operation. The operation returns the NextMarker value within the response body if the listing operation @@ -324,7 +324,7 @@ public PagedIterable listBlobContainersSegmentNoCustomHeaders /** * Retrieves a user delegation key for the Blob service. This is only a valid operation when using bearer token * authentication. - * + * * @param keyInfo Key information. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting @@ -347,7 +347,7 @@ public PagedIterable listBlobContainersSegmentNoCustomHeaders /** * Retrieves a user delegation key for the Blob service. This is only a valid operation when using bearer token * authentication. - * + * * @param keyInfo Key information. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting @@ -368,7 +368,7 @@ public UserDelegationKey getUserDelegationKey(KeyInfo keyInfo, Integer timeout, /** * Retrieves a user delegation key for the Blob service. This is only a valid operation when using bearer token * authentication. - * + * * @param keyInfo Key information. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting @@ -390,7 +390,7 @@ public Response getUserDelegationKeyNoCustomHeadersWithRespon /** * Returns the sku name and account kind. - * + * * @param timeout The timeout parameter is expressed in seconds. For more information, see <a * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting * Timeouts for Blob Service Operations.</a>. @@ -411,7 +411,7 @@ public ResponseBase getAccountInfoWithRespo /** * Returns the sku name and account kind. - * + * * @param timeout The timeout parameter is expressed in seconds. For more information, see <a * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting * Timeouts for Blob Service Operations.</a>. @@ -429,7 +429,7 @@ public void getAccountInfo(Integer timeout, String requestId) { /** * Returns the sku name and account kind. - * + * * @param timeout The timeout parameter is expressed in seconds. For more information, see <a * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting * Timeouts for Blob Service Operations.</a>. @@ -450,7 +450,7 @@ public Response getAccountInfoNoCustomHeadersWithResponse(Integer timeout, /** * 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>. @@ -476,7 +476,7 @@ public ResponseBase submitBatchWithResp /** * 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>. @@ -500,7 +500,7 @@ public InputStream submitBatch(long contentLength, String multipartContentType, /** * 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>. @@ -528,7 +528,7 @@ public Response submitBatchNoCustomHeadersWithResponse(long content * The Filter Blobs operation enables callers to list blobs across all containers whose tags match a given search * expression. Filter blobs searches across all containers within a storage account but can be scoped within the * expression to a single container. - * + * * @param timeout The timeout parameter is expressed in seconds. For more information, see <a * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting * Timeouts for Blob Service Operations.</a>. @@ -565,7 +565,7 @@ public ResponseBase filterBlobsWi * The Filter Blobs operation enables callers to list blobs across all containers whose tags match a given search * expression. Filter blobs searches across all containers within a storage account but can be scoped within the * expression to a single container. - * + * * @param timeout The timeout parameter is expressed in seconds. For more information, see <a * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting * Timeouts for Blob Service Operations.</a>. @@ -599,7 +599,7 @@ public FilterBlobSegment filterBlobs(Integer timeout, String requestId, String w * The Filter Blobs operation enables callers to list blobs across all containers whose tags match a given search * expression. Filter blobs searches across all containers within a storage account but can be scoped within the * expression to a single container. - * + * * @param timeout The timeout parameter is expressed in seconds. For more information, see <a * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting * Timeouts for Blob Service Operations.</a>. diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/implementation/AppendBlobsImpl.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/implementation/AppendBlobsImpl.java similarity index 99% rename from sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/implementation/AppendBlobsImpl.java rename to sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/implementation/AppendBlobsImpl.java index e607f0b4afb8..2b1de492ca5d 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/implementation/AppendBlobsImpl.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/implementation/AppendBlobsImpl.java @@ -2,23 +2,23 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.blob.implementation; +package com.azure.v2.storage.blob.implementation; import com.azure.core.v2.annotation.ReturnType; import com.azure.core.v2.annotation.ServiceMethod; import com.azure.core.v2.http.rest.ResponseBase; import io.clientcore.core.util.Base64Util; import io.clientcore.core.http.models.DateTimeRfc1123; -import com.azure.storage.blob.models.AppendBlobsAppendBlockFromUrlHeaders; -import com.azure.storage.blob.models.AppendBlobsAppendBlockHeaders; -import com.azure.storage.blob.models.AppendBlobsCreateHeaders; -import com.azure.storage.blob.models.AppendBlobsSealHeaders; -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.EncryptionScope; -import com.azure.storage.blob.models.StorageErrorException; +import com.azure.v2.storage.blob.models.AppendBlobsAppendBlockFromUrlHeaders; +import com.azure.v2.storage.blob.models.AppendBlobsAppendBlockHeaders; +import com.azure.v2.storage.blob.models.AppendBlobsCreateHeaders; +import com.azure.v2.storage.blob.models.AppendBlobsSealHeaders; +import com.azure.v2.storage.blob.models.BlobHttpHeaders; +import com.azure.v2.storage.blob.models.BlobImmutabilityPolicyMode; +import com.azure.v2.storage.blob.models.CpkInfo; +import com.azure.v2.storage.blob.models.EncryptionAlgorithmType; +import com.azure.v2.storage.blob.models.EncryptionScope; +import com.azure.v2.storage.blob.models.StorageErrorException; import io.clientcore.core.annotation.ServiceInterface; import io.clientcore.core.http.RestProxy; import io.clientcore.core.http.annotation.BodyParam; @@ -51,7 +51,7 @@ public final class AppendBlobsImpl { /** * Initializes an instance of AppendBlobsImpl. - * + * * @param client the instance of the service client containing this operation class. */ AppendBlobsImpl(AzureBlobStorageImpl client) { @@ -275,7 +275,7 @@ Response sealNoCustomHeadersSync(@HostParam("url") String url, /** * 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. @@ -387,7 +387,7 @@ public ResponseBase createWithResponse(String co /** * 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. @@ -434,7 +434,7 @@ public void create(String containerName, String blob, long contentLength, Intege /** * The Create Append Blob operation creates a new append blob. - * + * * @param containerName The container name. * @param blob The blob name. * @param contentLength The length of the request. @@ -548,7 +548,7 @@ public Response createNoCustomHeadersWithResponse(String containerName, St * 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. @@ -634,7 +634,7 @@ public ResponseBase appendBlockWithResponse * 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. @@ -688,7 +688,7 @@ public void appendBlock(String containerName, String blob, long contentLength, B * The Append Block operation commits a new block of data to the end of an existing append blob. The Append Block * operation is permitted only if the blob was created with x-ms-blob-type set to AppendBlob. Append Block is * supported only on version 2015-02-21 version or later. - * + * * @param containerName The container name. * @param blob The blob name. * @param contentLength The length of the request. @@ -774,7 +774,7 @@ public Response appendBlockNoCustomHeadersWithResponse(String containerNam * 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. @@ -874,7 +874,7 @@ public ResponseBase appendBlockFromU * 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. @@ -938,7 +938,7 @@ public void appendBlockFromUrl(String containerName, String blob, String sourceU * The Append Block operation commits a new block of data to the end of an existing append blob where the contents * are read from a source url. The Append Block operation is permitted only if the blob was created with * x-ms-blob-type set to AppendBlob. Append Block is supported only on version 2015-02-21 version or later. - * + * * @param containerName The container name. * @param blob The blob name. * @param sourceUrl Specify a URL to the copy source. @@ -1037,7 +1037,7 @@ public Response appendBlockFromUrlNoCustomHeadersWithResponse(String conta /** * 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 @@ -1080,7 +1080,7 @@ public ResponseBase sealWithResponse(String contai /** * 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 @@ -1114,7 +1114,7 @@ public void seal(String containerName, String blob, Integer timeout, String requ /** * The Seal operation seals the Append Blob to make it read-only. Seal is supported only on version 2019-12-12 * version or later. - * + * * @param containerName The container name. * @param blob The blob name. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/implementation/AzureBlobStorageImpl.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/implementation/AzureBlobStorageImpl.java similarity index 96% rename from sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/implementation/AzureBlobStorageImpl.java rename to sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/implementation/AzureBlobStorageImpl.java index a4d6f69a30ab..841274172f9e 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/implementation/AzureBlobStorageImpl.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/implementation/AzureBlobStorageImpl.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.blob.implementation; +package com.azure.v2.storage.blob.implementation; import io.clientcore.core.http.pipeline.HttpPipeline; @@ -17,7 +17,7 @@ public final class AzureBlobStorageImpl { /** * Gets The URL of the service account, container, or blob that is the target of the desired operation. - * + * * @return the url value. */ public String getUrl() { @@ -31,7 +31,7 @@ public String getUrl() { /** * Gets Specifies the version of the operation to use for this request. - * + * * @return the version value. */ public String getVersion() { @@ -45,7 +45,7 @@ public String getVersion() { /** * Gets The HTTP pipeline to send requests through. - * + * * @return the httpPipeline value. */ public HttpPipeline getHttpPipeline() { @@ -59,7 +59,7 @@ public HttpPipeline getHttpPipeline() { /** * Gets the ServicesImpl object to access its operations. - * + * * @return the ServicesImpl object. */ public ServicesImpl getServices() { @@ -73,7 +73,7 @@ public ServicesImpl getServices() { /** * Gets the ContainersImpl object to access its operations. - * + * * @return the ContainersImpl object. */ public ContainersImpl getContainers() { @@ -87,7 +87,7 @@ public ContainersImpl getContainers() { /** * Gets the BlobsImpl object to access its operations. - * + * * @return the BlobsImpl object. */ public BlobsImpl getBlobs() { @@ -101,7 +101,7 @@ public BlobsImpl getBlobs() { /** * Gets the PageBlobsImpl object to access its operations. - * + * * @return the PageBlobsImpl object. */ public PageBlobsImpl getPageBlobs() { @@ -115,7 +115,7 @@ public PageBlobsImpl getPageBlobs() { /** * Gets the AppendBlobsImpl object to access its operations. - * + * * @return the AppendBlobsImpl object. */ public AppendBlobsImpl getAppendBlobs() { @@ -129,7 +129,7 @@ public AppendBlobsImpl getAppendBlobs() { /** * Gets the BlockBlobsImpl object to access its operations. - * + * * @return the BlockBlobsImpl object. */ public BlockBlobsImpl getBlockBlobs() { @@ -138,7 +138,7 @@ public BlockBlobsImpl getBlockBlobs() { /** * 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. diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/implementation/BlobsImpl.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/implementation/BlobsImpl.java similarity index 98% rename from sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/implementation/BlobsImpl.java rename to sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/implementation/BlobsImpl.java index 87638aebc476..e2a2f3f0c114 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/implementation/BlobsImpl.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/implementation/BlobsImpl.java @@ -2,51 +2,51 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.blob.implementation; +package com.azure.v2.storage.blob.implementation; import com.azure.core.v2.annotation.ReturnType; import com.azure.core.v2.annotation.ServiceMethod; import com.azure.core.v2.http.rest.ResponseBase; import io.clientcore.core.util.Base64Util; import io.clientcore.core.http.models.DateTimeRfc1123; -import com.azure.storage.blob.models.AccessTier; -import com.azure.storage.blob.models.BlobCopySourceTagsMode; -import com.azure.storage.blob.models.BlobDeleteType; -import com.azure.storage.blob.models.BlobExpiryOptions; -import com.azure.storage.blob.models.BlobHttpHeaders; -import com.azure.storage.blob.models.BlobImmutabilityPolicyMode; -import com.azure.storage.blob.models.BlobsAbortCopyFromURLHeaders; -import com.azure.storage.blob.models.BlobsAcquireLeaseHeaders; -import com.azure.storage.blob.models.BlobsBreakLeaseHeaders; -import com.azure.storage.blob.models.BlobsChangeLeaseHeaders; -import com.azure.storage.blob.models.BlobsCopyFromURLHeaders; -import com.azure.storage.blob.models.BlobsCreateSnapshotHeaders; -import com.azure.storage.blob.models.BlobsDeleteHeaders; -import com.azure.storage.blob.models.BlobsDeleteImmutabilityPolicyHeaders; -import com.azure.storage.blob.models.BlobsDownloadHeaders; -import com.azure.storage.blob.models.BlobsGetAccountInfoHeaders; -import com.azure.storage.blob.models.BlobsGetPropertiesHeaders; -import com.azure.storage.blob.models.BlobsGetTagsHeaders; -import com.azure.storage.blob.models.BlobsQueryHeaders; -import com.azure.storage.blob.models.BlobsReleaseLeaseHeaders; -import com.azure.storage.blob.models.BlobsRenewLeaseHeaders; -import com.azure.storage.blob.models.BlobsSetExpiryHeaders; -import com.azure.storage.blob.models.BlobsSetHttpHeadersHeaders; -import com.azure.storage.blob.models.BlobsSetImmutabilityPolicyHeaders; -import com.azure.storage.blob.models.BlobsSetLegalHoldHeaders; -import com.azure.storage.blob.models.BlobsSetMetadataHeaders; -import com.azure.storage.blob.models.BlobsSetTagsHeaders; -import com.azure.storage.blob.models.BlobsSetTierHeaders; -import com.azure.storage.blob.models.BlobsStartCopyFromURLHeaders; -import com.azure.storage.blob.models.BlobsUndeleteHeaders; -import com.azure.storage.blob.models.BlobTags; -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.EncryptionScope; -import com.azure.storage.blob.models.QueryRequest; -import com.azure.storage.blob.models.RehydratePriority; -import com.azure.storage.blob.models.StorageErrorException; +import com.azure.v2.storage.blob.models.AccessTier; +import com.azure.v2.storage.blob.models.BlobCopySourceTagsMode; +import com.azure.v2.storage.blob.models.BlobDeleteType; +import com.azure.v2.storage.blob.models.BlobExpiryOptions; +import com.azure.v2.storage.blob.models.BlobHttpHeaders; +import com.azure.v2.storage.blob.models.BlobImmutabilityPolicyMode; +import com.azure.v2.storage.blob.models.BlobsAbortCopyFromURLHeaders; +import com.azure.v2.storage.blob.models.BlobsAcquireLeaseHeaders; +import com.azure.v2.storage.blob.models.BlobsBreakLeaseHeaders; +import com.azure.v2.storage.blob.models.BlobsChangeLeaseHeaders; +import com.azure.v2.storage.blob.models.BlobsCopyFromURLHeaders; +import com.azure.v2.storage.blob.models.BlobsCreateSnapshotHeaders; +import com.azure.v2.storage.blob.models.BlobsDeleteHeaders; +import com.azure.v2.storage.blob.models.BlobsDeleteImmutabilityPolicyHeaders; +import com.azure.v2.storage.blob.models.BlobsDownloadHeaders; +import com.azure.v2.storage.blob.models.BlobsGetAccountInfoHeaders; +import com.azure.v2.storage.blob.models.BlobsGetPropertiesHeaders; +import com.azure.v2.storage.blob.models.BlobsGetTagsHeaders; +import com.azure.v2.storage.blob.models.BlobsQueryHeaders; +import com.azure.v2.storage.blob.models.BlobsReleaseLeaseHeaders; +import com.azure.v2.storage.blob.models.BlobsRenewLeaseHeaders; +import com.azure.v2.storage.blob.models.BlobsSetExpiryHeaders; +import com.azure.v2.storage.blob.models.BlobsSetHttpHeadersHeaders; +import com.azure.v2.storage.blob.models.BlobsSetImmutabilityPolicyHeaders; +import com.azure.v2.storage.blob.models.BlobsSetLegalHoldHeaders; +import com.azure.v2.storage.blob.models.BlobsSetMetadataHeaders; +import com.azure.v2.storage.blob.models.BlobsSetTagsHeaders; +import com.azure.v2.storage.blob.models.BlobsSetTierHeaders; +import com.azure.v2.storage.blob.models.BlobsStartCopyFromURLHeaders; +import com.azure.v2.storage.blob.models.BlobsUndeleteHeaders; +import com.azure.v2.storage.blob.models.BlobTags; +import com.azure.v2.storage.blob.models.CpkInfo; +import com.azure.v2.storage.blob.models.DeleteSnapshotsOptionType; +import com.azure.v2.storage.blob.models.EncryptionAlgorithmType; +import com.azure.v2.storage.blob.models.EncryptionScope; +import com.azure.v2.storage.blob.models.QueryRequest; +import com.azure.v2.storage.blob.models.RehydratePriority; +import com.azure.v2.storage.blob.models.StorageErrorException; import io.clientcore.core.annotation.ServiceInterface; import io.clientcore.core.http.RestProxy; import io.clientcore.core.http.annotation.BodyParam; @@ -79,7 +79,7 @@ public final class BlobsImpl { /** * Initializes an instance of BlobsImpl. - * + * * @param client the instance of the service client containing this operation class. */ BlobsImpl(AzureBlobStorageImpl client) { @@ -915,7 +915,7 @@ Response setTagsNoCustomHeadersSync(@HostParam("url") String url, /** * 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 @@ -986,7 +986,7 @@ public ResponseBase downloadWithResponse(Stri /** * 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 @@ -1034,7 +1034,7 @@ public InputStream download(String containerName, String blob, String snapshot, /** * 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 @@ -1105,7 +1105,7 @@ public Response downloadNoCustomHeadersWithResponse(String containe /** * 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 @@ -1168,7 +1168,7 @@ public ResponseBase getPropertiesWithResponse(S /** * 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 @@ -1206,7 +1206,7 @@ public void getProperties(String containerName, String blob, String snapshot, St /** * The Get Properties operation returns all user-defined metadata, standard HTTP properties, and system properties * for the blob. It does not return the content of the blob. - * + * * @param containerName The container name. * @param blob The blob name. * @param snapshot The snapshot parameter is an opaque DateTime value that, when present, specifies the blob @@ -1282,7 +1282,7 @@ public Response getPropertiesNoCustomHeadersWithResponse(String containerN * 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 @@ -1346,7 +1346,7 @@ public ResponseBase deleteWithResponse(String containe * automatic snapshot using snapshot timestamp or version id. You can restore the blob by calling Put or Copy Blob * API with automatic snapshot as source. Deleting automatic snapshot requires shared key or special SAS/RBAC * permissions. - * + * * @param containerName The container name. * @param blob The blob name. * @param snapshot The snapshot parameter is an opaque DateTime value that, when present, specifies the blob @@ -1402,7 +1402,7 @@ public void delete(String containerName, String blob, String snapshot, String ve * automatic snapshot using snapshot timestamp or version id. You can restore the blob by calling Put or Copy Blob * API with automatic snapshot as source. Deleting automatic snapshot requires shared key or special SAS/RBAC * permissions. - * + * * @param containerName The container name. * @param blob The blob name. * @param snapshot The snapshot parameter is an opaque DateTime value that, when present, specifies the blob @@ -1452,7 +1452,7 @@ public Response deleteNoCustomHeadersWithResponse(String containerName, St /** * 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 @@ -1477,7 +1477,7 @@ public ResponseBase undeleteWithResponse(String cont /** * Undelete a blob that was previously soft deleted. - * + * * @param containerName The container name. * @param blob The blob name. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a @@ -1496,7 +1496,7 @@ public void undelete(String containerName, String blob, Integer timeout, String /** * Undelete a blob that was previously soft deleted. - * + * * @param containerName The container name. * @param blob The blob name. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a @@ -1521,7 +1521,7 @@ public Response undeleteNoCustomHeadersWithResponse(String containerName, /** * 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. @@ -1548,7 +1548,7 @@ public ResponseBase setExpiryWithResponse(String co /** * 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. @@ -1570,7 +1570,7 @@ public void setExpiry(String containerName, String blob, BlobExpiryOptions expir /** * Sets the time a blob will expire and be deleted. - * + * * @param containerName The container name. * @param blob The blob name. * @param expiryOptions Required. Indicates mode of the expiry time. @@ -1597,7 +1597,7 @@ public Response setExpiryNoCustomHeadersWithResponse(String containerName, /** * 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 @@ -1670,7 +1670,7 @@ public ResponseBase setHttpHeadersWithResponse /** * 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 @@ -1701,7 +1701,7 @@ public void setHttpHeaders(String containerName, String blob, Integer timeout, S /** * The Set HTTP Headers operation sets system properties on the blob. - * + * * @param containerName The container name. * @param blob The blob name. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a @@ -1773,7 +1773,7 @@ public Response setHttpHeadersNoCustomHeadersWithResponse(String container /** * 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 @@ -1815,7 +1815,7 @@ public ResponseBase setImmutabilityPoli /** * 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 @@ -1847,7 +1847,7 @@ public void setImmutabilityPolicy(String containerName, String blob, Integer tim /** * The Set Immutability Policy operation sets the immutability policy on the blob. - * + * * @param containerName The container name. * @param blob The blob name. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a @@ -1888,7 +1888,7 @@ public Response setImmutabilityPolicyNoCustomHeadersWithResponse(String co /** * 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 @@ -1920,7 +1920,7 @@ public ResponseBase deleteImmutabili /** * 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 @@ -1947,7 +1947,7 @@ public void deleteImmutabilityPolicy(String containerName, String blob, Integer /** * The Delete Immutability Policy operation deletes the immutability policy on the blob. - * + * * @param containerName The container name. * @param blob The blob name. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a @@ -1978,7 +1978,7 @@ public Response deleteImmutabilityPolicyNoCustomHeadersWithResponse(String /** * The Set Legal Hold operation sets a legal hold on the blob. - * + * * @param containerName The container name. * @param blob The blob name. * @param legalHold Specified if a legal hold should be set on the blob. @@ -2010,7 +2010,7 @@ public ResponseBase setLegalHoldWithResponse(Str /** * 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. @@ -2038,7 +2038,7 @@ public void setLegalHold(String containerName, String blob, boolean legalHold, I /** * The Set Legal Hold operation sets a legal hold on the blob. - * + * * @param containerName The container name. * @param blob The blob name. * @param legalHold Specified if a legal hold should be set on the blob. @@ -2071,7 +2071,7 @@ public Response setLegalHoldNoCustomHeadersWithResponse(String containerNa /** * 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 @@ -2141,7 +2141,7 @@ public ResponseBase setMetadataWithResponse(Strin /** * 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 @@ -2180,7 +2180,7 @@ public void setMetadata(String containerName, String blob, Integer timeout, Map< /** * The Set Blob Metadata operation sets user-defined metadata for the specified blob as one or more name-value * pairs. - * + * * @param containerName The container name. * @param blob The blob name. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a @@ -2249,7 +2249,7 @@ public Response setMetadataNoCustomHeadersWithResponse(String containerNam /** * [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 @@ -2295,7 +2295,7 @@ public ResponseBase acquireLeaseWithResponse(Str /** * [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 @@ -2330,7 +2330,7 @@ public void acquireLease(String containerName, String blob, Integer timeout, Int /** * [Update] The Lease Blob operation establishes and manages a lock on a blob for write and delete operations. - * + * * @param containerName The container name. * @param blob The blob name. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a @@ -2375,7 +2375,7 @@ public Response acquireLeaseNoCustomHeadersWithResponse(String containerNa /** * [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. @@ -2415,7 +2415,7 @@ public ResponseBase releaseLeaseWithResponse(Str /** * [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. @@ -2445,7 +2445,7 @@ public void releaseLease(String containerName, String blob, String leaseId, Inte /** * [Update] The Lease Blob operation establishes and manages a lock on a blob for write and delete operations. - * + * * @param containerName The container name. * @param blob The blob name. * @param leaseId Specifies the current lease ID on the resource. @@ -2485,7 +2485,7 @@ public Response releaseLeaseNoCustomHeadersWithResponse(String containerNa /** * [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. @@ -2525,7 +2525,7 @@ public ResponseBase renewLeaseWithResponse(String /** * [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. @@ -2555,7 +2555,7 @@ public void renewLease(String containerName, String blob, String leaseId, Intege /** * [Update] The Lease Blob operation establishes and manages a lock on a blob for write and delete operations. - * + * * @param containerName The container name. * @param blob The blob name. * @param leaseId Specifies the current lease ID on the resource. @@ -2595,7 +2595,7 @@ public Response renewLeaseNoCustomHeadersWithResponse(String containerName /** * [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. @@ -2639,7 +2639,7 @@ public ResponseBase changeLeaseWithResponse(Strin /** * [Update] The Lease Blob operation establishes and manages a lock on a blob for write and delete operations. - * + * * @param containerName The container name. * @param blob The blob name. * @param leaseId Specifies the current lease ID on the resource. @@ -2672,7 +2672,7 @@ public void changeLease(String containerName, String blob, String leaseId, Strin /** * [Update] The Lease Blob operation establishes and manages a lock on a blob for write and delete operations. - * + * * @param containerName The container name. * @param blob The blob name. * @param leaseId Specifies the current lease ID on the resource. @@ -2715,7 +2715,7 @@ public Response changeLeaseNoCustomHeadersWithResponse(String containerNam /** * [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 @@ -2760,7 +2760,7 @@ public ResponseBase breakLeaseWithResponse(String /** * [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 @@ -2795,7 +2795,7 @@ public void breakLease(String containerName, String blob, Integer timeout, Integ /** * [Update] The Lease Blob operation establishes and manages a lock on a blob for write and delete operations. - * + * * @param containerName The container name. * @param blob The blob name. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a @@ -2840,7 +2840,7 @@ public Response breakLeaseNoCustomHeadersWithResponse(String containerName /** * 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 @@ -2909,7 +2909,7 @@ public ResponseBase createSnapshotWithResponse /** * 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 @@ -2947,7 +2947,7 @@ public void createSnapshot(String containerName, String blob, Integer timeout, M /** * The Create Snapshot operation creates a read-only snapshot of a blob. - * + * * @param containerName The container name. * @param blob The blob name. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a @@ -3016,7 +3016,7 @@ public Response createSnapshotNoCustomHeadersWithResponse(String container /** * 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 @@ -3090,7 +3090,7 @@ public ResponseBase startCopyFromURLWithResp /** * 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 @@ -3149,7 +3149,7 @@ public void startCopyFromURL(String containerName, String blob, String copySourc /** * The Start Copy From URL operation copies a blob or an internet resource to a new blob. - * + * * @param containerName The container name. * @param blob The blob name. * @param copySource Specifies the name of the source page blob snapshot. This value is a URL of up to 2 KB in @@ -3224,7 +3224,7 @@ public Response startCopyFromURLNoCustomHeadersWithResponse(String contain /** * 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 @@ -3310,7 +3310,7 @@ public ResponseBase copyFromURLWithResponse(Strin /** * 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 @@ -3374,7 +3374,7 @@ public void copyFromURL(String containerName, String blob, String copySource, In /** * The Copy From URL operation copies a blob or an internet resource to a new blob. It will not return a response * until the copy is complete. - * + * * @param containerName The container name. * @param blob The blob name. * @param copySource Specifies the name of the source page blob snapshot. This value is a URL of up to 2 KB in @@ -3460,7 +3460,7 @@ public Response copyFromURLNoCustomHeadersWithResponse(String containerNam /** * 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. @@ -3489,7 +3489,7 @@ public ResponseBase abortCopyFromURLWithResp /** * 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. @@ -3512,7 +3512,7 @@ public void abortCopyFromURL(String containerName, String blob, String copyId, I /** * The Abort Copy From URL operation aborts a pending Copy From URL operation, and leaves a destination blob with * zero length and full metadata. - * + * * @param containerName The container name. * @param blob The blob name. * @param copyId The copy identifier provided in the x-ms-copy-id header of the original Copy Blob operation. @@ -3543,7 +3543,7 @@ public Response abortCopyFromURLNoCustomHeadersWithResponse(String contain * 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. @@ -3582,7 +3582,7 @@ public ResponseBase setTierWithResponse(String contai * account and on a block blob in a blob storage account (locally redundant storage only). A premium page blob's * tier determines the allowed size, IOPS, and bandwidth of the blob. A block blob's tier determines * Hot/Cool/Archive storage type. This operation does not update the blob's ETag. - * + * * @param containerName The container name. * @param blob The blob name. * @param tier Indicates the tier to be set on the blob. @@ -3616,7 +3616,7 @@ public void setTier(String containerName, String blob, AccessTier tier, String s * account and on a block blob in a blob storage account (locally redundant storage only). A premium page blob's * tier determines the allowed size, IOPS, and bandwidth of the blob. A block blob's tier determines * Hot/Cool/Archive storage type. This operation does not update the blob's ETag. - * + * * @param containerName The container name. * @param blob The blob name. * @param tier Indicates the tier to be set on the blob. @@ -3652,7 +3652,7 @@ public Response setTierNoCustomHeadersWithResponse(String containerName, S /** * 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 @@ -3678,7 +3678,7 @@ public ResponseBase getAccountInfoWithResponse /** * 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 @@ -3697,7 +3697,7 @@ public void getAccountInfo(String containerName, String blob, Integer timeout, S /** * 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 @@ -3723,7 +3723,7 @@ public Response getAccountInfoNoCustomHeadersWithResponse(String container /** * 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 @@ -3785,7 +3785,7 @@ public ResponseBase queryWithResponse(String con /** * 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 @@ -3822,7 +3822,7 @@ public InputStream query(String containerName, String blob, String snapshot, Int /** * 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 @@ -3884,7 +3884,7 @@ public Response queryNoCustomHeadersWithResponse(String containerNa /** * 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 @@ -3918,7 +3918,7 @@ public ResponseBase getTagsWithResponse(String co /** * 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 @@ -3948,7 +3948,7 @@ public BlobTags getTags(String containerName, String blob, Integer timeout, Stri /** * 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 @@ -3981,7 +3981,7 @@ public Response getTagsNoCustomHeadersWithResponse(String containerNam /** * 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 @@ -4017,7 +4017,7 @@ public ResponseBase setTagsWithResponse(String contai /** * 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 @@ -4046,7 +4046,7 @@ public void setTags(String containerName, String blob, Integer timeout, String v /** * The Set Tags operation enables users to set tags on a blob. - * + * * @param containerName The container name. * @param blob The blob name. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/implementation/BlockBlobsImpl.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/implementation/BlockBlobsImpl.java similarity index 99% rename from sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/implementation/BlockBlobsImpl.java rename to sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/implementation/BlockBlobsImpl.java index dfe951a9d9da..b32abf82cd69 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/implementation/BlockBlobsImpl.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/implementation/BlockBlobsImpl.java @@ -2,30 +2,30 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.blob.implementation; +package com.azure.v2.storage.blob.implementation; import com.azure.core.v2.annotation.ReturnType; import com.azure.core.v2.annotation.ServiceMethod; import com.azure.core.v2.http.rest.ResponseBase; import io.clientcore.core.util.Base64Util; import io.clientcore.core.http.models.DateTimeRfc1123; -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.BlockBlobsCommitBlockListHeaders; -import com.azure.storage.blob.models.BlockBlobsGetBlockListHeaders; -import com.azure.storage.blob.models.BlockBlobsPutBlobFromUrlHeaders; -import com.azure.storage.blob.models.BlockBlobsStageBlockFromURLHeaders; -import com.azure.storage.blob.models.BlockBlobsStageBlockHeaders; -import com.azure.storage.blob.models.BlockBlobsUploadHeaders; -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.EncryptionScope; -import com.azure.storage.blob.models.StorageErrorException; +import com.azure.v2.storage.blob.models.AccessTier; +import com.azure.v2.storage.blob.models.BlobCopySourceTagsMode; +import com.azure.v2.storage.blob.models.BlobHttpHeaders; +import com.azure.v2.storage.blob.models.BlobImmutabilityPolicyMode; +import com.azure.v2.storage.blob.models.BlockBlobsCommitBlockListHeaders; +import com.azure.v2.storage.blob.models.BlockBlobsGetBlockListHeaders; +import com.azure.v2.storage.blob.models.BlockBlobsPutBlobFromUrlHeaders; +import com.azure.v2.storage.blob.models.BlockBlobsStageBlockFromURLHeaders; +import com.azure.v2.storage.blob.models.BlockBlobsStageBlockHeaders; +import com.azure.v2.storage.blob.models.BlockBlobsUploadHeaders; +import com.azure.v2.storage.blob.models.BlockList; +import com.azure.v2.storage.blob.models.BlockListType; +import com.azure.v2.storage.blob.models.BlockLookupList; +import com.azure.v2.storage.blob.models.CpkInfo; +import com.azure.v2.storage.blob.models.EncryptionAlgorithmType; +import com.azure.v2.storage.blob.models.EncryptionScope; +import com.azure.v2.storage.blob.models.StorageErrorException; import io.clientcore.core.annotation.ServiceInterface; import io.clientcore.core.http.RestProxy; import io.clientcore.core.http.annotation.BodyParam; @@ -58,7 +58,7 @@ public final class BlockBlobsImpl { /** * Initializes an instance of BlockBlobsImpl. - * + * * @param client the instance of the service client containing this operation class. */ BlockBlobsImpl(AzureBlobStorageImpl client) { @@ -409,7 +409,7 @@ Response getBlockListNoCustomHeadersSync(@HostParam("url") String url * 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. @@ -537,7 +537,7 @@ public ResponseBase uploadWithResponse(String con * overwrites any existing metadata on the blob. Partial updates are not supported with Put Blob; the content of the * existing blob is overwritten with the content of the new blob. To perform a partial update of the content of a * block blob, use the Put Block List operation. - * + * * @param containerName The container name. * @param blob The blob name. * @param contentLength The length of the request. @@ -598,7 +598,7 @@ public void upload(String containerName, String blob, long contentLength, Binary * overwrites any existing metadata on the blob. Partial updates are not supported with Put Blob; the content of the * existing blob is overwritten with the content of the new blob. To perform a partial update of the content of a * block blob, use the Put Block List operation. - * + * * @param containerName The container name. * @param blob The blob name. * @param contentLength The length of the request. @@ -726,7 +726,7 @@ public Response uploadNoCustomHeadersWithResponse(String containerName, St * 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. @@ -866,7 +866,7 @@ public ResponseBase putBlobFromUrlWithRes * from URL; the content of an existing blob is overwritten with the content of the new blob. To perform partial * updates to a block blob's contents using a source URL, use the Put Block from URL API in conjunction with Put * Block List. - * + * * @param containerName The container name. * @param blob The blob name. * @param contentLength The length of the request. @@ -938,7 +938,7 @@ public void putBlobFromUrl(String containerName, String blob, long contentLength * from URL; the content of an existing blob is overwritten with the content of the new blob. To perform partial * updates to a block blob's contents using a source URL, use the Put Block from URL API in conjunction with Put * Block List. - * + * * @param containerName The container name. * @param blob The blob name. * @param contentLength The length of the request. @@ -1074,7 +1074,7 @@ public Response putBlobFromUrlNoCustomHeadersWithResponse(String container /** * 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 @@ -1139,7 +1139,7 @@ public ResponseBase stageBlockWithResponse(St /** * 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 @@ -1177,7 +1177,7 @@ public void stageBlock(String containerName, String blob, String blockId, long c /** * The Stage Block operation creates a new block to be committed as part of a blob. - * + * * @param containerName The container name. * @param blob The blob name. * @param blockId A valid Base64 string value that identifies the block. Prior to encoding, the string must be less @@ -1243,7 +1243,7 @@ public Response stageBlockNoCustomHeadersWithResponse(String containerName /** * 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 @@ -1321,7 +1321,7 @@ public ResponseBase stageBlockFromURLW /** * 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 @@ -1368,7 +1368,7 @@ public void stageBlockFromURL(String containerName, String blob, String blockId, /** * The Stage Block operation creates a new block to be committed as part of a blob where the contents are read from * a URL. - * + * * @param containerName The container name. * @param blob The blob name. * @param blockId A valid Base64 string value that identifies the block. Prior to encoding, the string must be less @@ -1450,7 +1450,7 @@ public Response stageBlockFromURLNoCustomHeadersWithResponse(String contai * 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. @@ -1574,7 +1574,7 @@ public ResponseBase commitBlockListWithR * committing the new and existing blocks together. You can do this by specifying whether to commit a block from the * committed block list or from the uncommitted block list, or to commit the most recently uploaded version of the * block, whichever list it may belong to. - * + * * @param containerName The container name. * @param blob The blob name. * @param blocks Blob Blocks. @@ -1631,7 +1631,7 @@ public void commitBlockList(String containerName, String blob, BlockLookupList b * committing the new and existing blocks together. You can do this by specifying whether to commit a block from the * committed block list or from the uncommitted block list, or to commit the most recently uploaded version of the * block, whichever list it may belong to. - * + * * @param containerName The container name. * @param blob The blob name. * @param blocks Blob Blocks. @@ -1750,7 +1750,7 @@ public Response commitBlockListNoCustomHeadersWithResponse(String containe /** * 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 @@ -1784,7 +1784,7 @@ public ResponseBase getBlockListWithRe /** * 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 @@ -1814,7 +1814,7 @@ public BlockList getBlockList(String containerName, String blob, BlockListType l /** * 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 diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/implementation/ContainersImpl.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/implementation/ContainersImpl.java similarity index 98% rename from sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/implementation/ContainersImpl.java rename to sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/implementation/ContainersImpl.java index 4999808ae89a..582079fb2ba8 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/implementation/ContainersImpl.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/implementation/ContainersImpl.java @@ -2,40 +2,40 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.blob.implementation; +package com.azure.v2.storage.blob.implementation; import com.azure.core.v2.annotation.ReturnType; import com.azure.core.v2.annotation.ServiceMethod; import com.azure.core.v2.http.rest.ResponseBase; import io.clientcore.core.http.models.DateTimeRfc1123; -import com.azure.storage.blob.implementation.models.BlobSignedIdentifierWrapper; -import com.azure.storage.blob.models.BlobContainerEncryptionScope; -import com.azure.storage.blob.models.BlobSignedIdentifier; -import com.azure.storage.blob.models.ContainersAcquireLeaseHeaders; -import com.azure.storage.blob.models.ContainersBreakLeaseHeaders; -import com.azure.storage.blob.models.ContainersChangeLeaseHeaders; -import com.azure.storage.blob.models.ContainersCreateHeaders; -import com.azure.storage.blob.models.ContainersDeleteHeaders; -import com.azure.storage.blob.models.ContainersFilterBlobsHeaders; -import com.azure.storage.blob.models.ContainersGetAccessPolicyHeaders; -import com.azure.storage.blob.models.ContainersGetAccountInfoHeaders; -import com.azure.storage.blob.models.ContainersGetPropertiesHeaders; -import com.azure.storage.blob.models.ContainersListBlobFlatSegmentHeaders; -import com.azure.storage.blob.models.ContainersListBlobHierarchySegmentHeaders; -import com.azure.storage.blob.models.ContainersReleaseLeaseHeaders; -import com.azure.storage.blob.models.ContainersRenameHeaders; -import com.azure.storage.blob.models.ContainersRenewLeaseHeaders; -import com.azure.storage.blob.models.ContainersRestoreHeaders; -import com.azure.storage.blob.models.ContainersSetAccessPolicyHeaders; -import com.azure.storage.blob.models.ContainersSetMetadataHeaders; -import com.azure.storage.blob.models.ContainersSubmitBatchHeaders; -import com.azure.storage.blob.models.FilterBlobSegment; -import com.azure.storage.blob.models.FilterBlobsIncludeItem; -import com.azure.storage.blob.models.ListBlobsFlatSegmentResponse; -import com.azure.storage.blob.models.ListBlobsHierarchySegmentResponse; -import com.azure.storage.blob.models.ListBlobsIncludeItem; -import com.azure.storage.blob.models.PublicAccessType; -import com.azure.storage.blob.models.StorageErrorException; +import com.azure.v2.storage.blob.implementation.models.BlobSignedIdentifierWrapper; +import com.azure.v2.storage.blob.models.BlobContainerEncryptionScope; +import com.azure.v2.storage.blob.models.BlobSignedIdentifier; +import com.azure.v2.storage.blob.models.ContainersAcquireLeaseHeaders; +import com.azure.v2.storage.blob.models.ContainersBreakLeaseHeaders; +import com.azure.v2.storage.blob.models.ContainersChangeLeaseHeaders; +import com.azure.v2.storage.blob.models.ContainersCreateHeaders; +import com.azure.v2.storage.blob.models.ContainersDeleteHeaders; +import com.azure.v2.storage.blob.models.ContainersFilterBlobsHeaders; +import com.azure.v2.storage.blob.models.ContainersGetAccessPolicyHeaders; +import com.azure.v2.storage.blob.models.ContainersGetAccountInfoHeaders; +import com.azure.v2.storage.blob.models.ContainersGetPropertiesHeaders; +import com.azure.v2.storage.blob.models.ContainersListBlobFlatSegmentHeaders; +import com.azure.v2.storage.blob.models.ContainersListBlobHierarchySegmentHeaders; +import com.azure.v2.storage.blob.models.ContainersReleaseLeaseHeaders; +import com.azure.v2.storage.blob.models.ContainersRenameHeaders; +import com.azure.v2.storage.blob.models.ContainersRenewLeaseHeaders; +import com.azure.v2.storage.blob.models.ContainersRestoreHeaders; +import com.azure.v2.storage.blob.models.ContainersSetAccessPolicyHeaders; +import com.azure.v2.storage.blob.models.ContainersSetMetadataHeaders; +import com.azure.v2.storage.blob.models.ContainersSubmitBatchHeaders; +import com.azure.v2.storage.blob.models.FilterBlobSegment; +import com.azure.v2.storage.blob.models.FilterBlobsIncludeItem; +import com.azure.v2.storage.blob.models.ListBlobsFlatSegmentResponse; +import com.azure.v2.storage.blob.models.ListBlobsHierarchySegmentResponse; +import com.azure.v2.storage.blob.models.ListBlobsIncludeItem; +import com.azure.v2.storage.blob.models.PublicAccessType; +import com.azure.v2.storage.blob.models.StorageErrorException; import io.clientcore.core.annotation.ServiceInterface; import io.clientcore.core.http.RestProxy; import io.clientcore.core.http.annotation.BodyParam; @@ -72,7 +72,7 @@ public final class ContainersImpl { /** * Initializes an instance of ContainersImpl. - * + * * @param client the instance of the service client containing this operation class. */ ContainersImpl(AzureBlobStorageImpl client) { @@ -463,7 +463,7 @@ Response getAccountInfoNoCustomHeadersSync(@HostParam("url") String url, /** * creates a new container under the specified account. If the container with the same name already exists, the * operation fails. - * + * * @param containerName The container name. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting @@ -509,7 +509,7 @@ public ResponseBase createWithResponse(String con /** * creates a new container under the specified account. If the container with the same name already exists, the * operation fails. - * + * * @param containerName The container name. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting @@ -538,7 +538,7 @@ public void create(String containerName, Integer timeout, Map me /** * creates a new container under the specified account. If the container with the same name already exists, the * operation fails. - * + * * @param containerName The container name. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting @@ -584,7 +584,7 @@ public Response createNoCustomHeadersWithResponse(String containerName, In /** * returns all user-defined metadata and system properties for the specified container. The data returned does not * include the container's list of blobs. - * + * * @param containerName The container name. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting @@ -610,7 +610,7 @@ public ResponseBase getPropertiesWithRespo /** * returns all user-defined metadata and system properties for the specified container. The data returned does not * include the container's list of blobs. - * + * * @param containerName The container name. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting @@ -630,7 +630,7 @@ public void getProperties(String containerName, Integer timeout, String leaseId, /** * returns all user-defined metadata and system properties for the specified container. The data returned does not * include the container's list of blobs. - * + * * @param containerName The container name. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting @@ -656,7 +656,7 @@ public Response getPropertiesNoCustomHeadersWithResponse(String containerN /** * operation marks the specified container for deletion. The container and any blobs contained within it are later * deleted during garbage collection. - * + * * @param containerName The container name. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting @@ -691,7 +691,7 @@ public ResponseBase deleteWithResponse(String con /** * operation marks the specified container for deletion. The container and any blobs contained within it are later * deleted during garbage collection. - * + * * @param containerName The container name. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting @@ -717,7 +717,7 @@ public void delete(String containerName, Integer timeout, String leaseId, Offset /** * operation marks the specified container for deletion. The container and any blobs contained within it are later * deleted during garbage collection. - * + * * @param containerName The container name. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting @@ -750,7 +750,7 @@ public Response deleteNoCustomHeadersWithResponse(String containerName, In /** * operation sets one or more user-defined name-value pairs for the specified container. - * + * * @param containerName The container name. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting @@ -787,7 +787,7 @@ public ResponseBase setMetadataWithResponse( /** * operation sets one or more user-defined name-value pairs for the specified container. - * + * * @param containerName The container name. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting @@ -815,7 +815,7 @@ public void setMetadata(String containerName, Integer timeout, String leaseId, M /** * operation sets one or more user-defined name-value pairs for the specified container. - * + * * @param containerName The container name. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting @@ -852,7 +852,7 @@ public Response setMetadataNoCustomHeadersWithResponse(String containerNam /** * gets the permissions for the specified container. The permissions indicate whether container data may be accessed * publicly. - * + * * @param containerName The container name. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting @@ -879,7 +879,7 @@ public ResponseBase getAccessPolicyNoCustomHeadersWithR /** * sets the permissions for the specified container. The permissions indicate whether blobs in a container may be * accessed publicly. - * + * * @param containerName The container name. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting @@ -968,7 +968,7 @@ public ResponseBase setAccessPolicyWithR /** * sets the permissions for the specified container. The permissions indicate whether blobs in a container may be * accessed publicly. - * + * * @param containerName The container name. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting @@ -997,7 +997,7 @@ public void setAccessPolicy(String containerName, Integer timeout, String leaseI /** * sets the permissions for the specified container. The permissions indicate whether blobs in a container may be * accessed publicly. - * + * * @param containerName The container name. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting @@ -1036,7 +1036,7 @@ public Response setAccessPolicyNoCustomHeadersWithResponse(String containe /** * Restores a previously-deleted container. - * + * * @param containerName The container name. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting @@ -1065,7 +1065,7 @@ public ResponseBase restoreWithResponse(String c /** * Restores a previously-deleted container. - * + * * @param containerName The container name. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting @@ -1089,7 +1089,7 @@ public void restore(String containerName, Integer timeout, String requestId, Str /** * Restores a previously-deleted container. - * + * * @param containerName The container name. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting @@ -1118,7 +1118,7 @@ public Response restoreNoCustomHeadersWithResponse(String containerName, I /** * 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 @@ -1146,7 +1146,7 @@ public ResponseBase renameWithResponse(String con /** * 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 @@ -1168,7 +1168,7 @@ public void rename(String containerName, String sourceContainerName, Integer tim /** * Renames an existing container. - * + * * @param containerName The container name. * @param sourceContainerName Required. Specifies the name of the container to rename. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a @@ -1196,7 +1196,7 @@ public Response renameNoCustomHeadersWithResponse(String containerName, St /** * 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. @@ -1226,7 +1226,7 @@ public ResponseBase submitBatchWithRe /** * 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. @@ -1251,7 +1251,7 @@ public InputStream submitBatch(String containerName, long contentLength, String /** * 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. @@ -1281,7 +1281,7 @@ public Response submitBatchNoCustomHeadersWithResponse(String conta /** * The Filter Blobs operation enables callers to list blobs in a container whose tags match a given search * expression. Filter blobs searches within the given container. - * + * * @param containerName The container name. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting @@ -1325,7 +1325,7 @@ public ResponseBase filterBlobs /** * The Filter Blobs operation enables callers to list blobs in a container whose tags match a given search * expression. Filter blobs searches within the given container. - * + * * @param containerName The container name. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting @@ -1359,7 +1359,7 @@ public FilterBlobSegment filterBlobs(String containerName, Integer timeout, Stri /** * The Filter Blobs operation enables callers to list blobs in a container whose tags match a given search * expression. Filter blobs searches within the given container. - * + * * @param containerName The container name. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting @@ -1403,7 +1403,7 @@ public Response filterBlobsNoCustomHeadersWithResponse(String /** * [Update] establishes and manages a lock on a container for delete operations. The lock duration can be 15 to 60 * seconds, or can be infinite. - * + * * @param containerName The container name. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting @@ -1446,7 +1446,7 @@ public ResponseBase acquireLeaseWithRespons /** * [Update] establishes and manages a lock on a container for delete operations. The lock duration can be 15 to 60 * seconds, or can be infinite. - * + * * @param containerName The container name. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting @@ -1477,7 +1477,7 @@ public void acquireLease(String containerName, Integer timeout, Integer duration /** * [Update] establishes and manages a lock on a container for delete operations. The lock duration can be 15 to 60 * seconds, or can be infinite. - * + * * @param containerName The container name. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting @@ -1520,7 +1520,7 @@ public Response acquireLeaseNoCustomHeadersWithResponse(String containerNa /** * [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 @@ -1557,7 +1557,7 @@ public ResponseBase releaseLeaseWithRespons /** * [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 @@ -1583,7 +1583,7 @@ public void releaseLease(String containerName, String leaseId, Integer timeout, /** * [Update] establishes and manages a lock on a container for delete operations. The lock duration can be 15 to 60 * seconds, or can be infinite. - * + * * @param containerName The container name. * @param leaseId Specifies the current lease ID on the resource. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a @@ -1620,7 +1620,7 @@ public Response releaseLeaseNoCustomHeadersWithResponse(String containerNa /** * [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 @@ -1657,7 +1657,7 @@ public ResponseBase renewLeaseWithResponse(St /** * [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 @@ -1683,7 +1683,7 @@ public void renewLease(String containerName, String leaseId, Integer timeout, Of /** * [Update] establishes and manages a lock on a container for delete operations. The lock duration can be 15 to 60 * seconds, or can be infinite. - * + * * @param containerName The container name. * @param leaseId Specifies the current lease ID on the resource. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a @@ -1720,7 +1720,7 @@ public Response renewLeaseNoCustomHeadersWithResponse(String containerName /** * [Update] establishes and manages a lock on a container for delete operations. The lock duration can be 15 to 60 * seconds, or can be infinite. - * + * * @param containerName The container name. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting @@ -1762,7 +1762,7 @@ public ResponseBase breakLeaseWithResponse(St /** * [Update] establishes and manages a lock on a container for delete operations. The lock duration can be 15 to 60 * seconds, or can be infinite. - * + * * @param containerName The container name. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting @@ -1793,7 +1793,7 @@ public void breakLease(String containerName, Integer timeout, Integer breakPerio /** * [Update] establishes and manages a lock on a container for delete operations. The lock duration can be 15 to 60 * seconds, or can be infinite. - * + * * @param containerName The container name. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting @@ -1836,7 +1836,7 @@ public Response breakLeaseNoCustomHeadersWithResponse(String containerName /** * [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) @@ -1877,7 +1877,7 @@ public ResponseBase changeLeaseWithResponse( /** * [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) @@ -1906,7 +1906,7 @@ public void changeLease(String containerName, String leaseId, String proposedLea /** * [Update] establishes and manages a lock on a container for delete operations. The lock duration can be 15 to 60 * seconds, or can be infinite. - * + * * @param containerName The container name. * @param leaseId Specifies the current lease ID on the resource. * @param proposedLeaseId Proposed lease ID, in a GUID string format. The Blob service returns 400 (Invalid request) @@ -1946,7 +1946,7 @@ public Response changeLeaseNoCustomHeadersWithResponse(String containerNam /** * [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 @@ -1989,7 +1989,7 @@ public Response changeLeaseNoCustomHeadersWithResponse(String containerNam /** * [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 @@ -2022,7 +2022,7 @@ public ListBlobsFlatSegmentResponse listBlobFlatSegment(String containerName, St /** * [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 @@ -2066,7 +2066,7 @@ public Response listBlobFlatSegmentNoCustomHeaders /** * [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 @@ -2114,7 +2114,7 @@ public Response listBlobFlatSegmentNoCustomHeaders /** * [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 @@ -2152,7 +2152,7 @@ public ListBlobsHierarchySegmentResponse listBlobHierarchySegment(String contain /** * [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 @@ -2199,7 +2199,7 @@ public Response listBlobHierarchySegmentNoCus /** * Returns the sku name and account kind. - * + * * @param containerName The container name. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting @@ -2224,7 +2224,7 @@ public ResponseBase getAccountInfoWithRes /** * Returns the sku name and account kind. - * + * * @param containerName The container name. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting @@ -2242,7 +2242,7 @@ public void getAccountInfo(String containerName, Integer timeout, String request /** * Returns the sku name and account kind. - * + * * @param containerName The container name. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/implementation/PageBlobsImpl.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/implementation/PageBlobsImpl.java similarity index 99% rename from sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/implementation/PageBlobsImpl.java rename to sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/implementation/PageBlobsImpl.java index d329adae4e20..afc512b9c407 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/implementation/PageBlobsImpl.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/implementation/PageBlobsImpl.java @@ -2,31 +2,31 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.blob.implementation; +package com.azure.v2.storage.blob.implementation; import com.azure.core.v2.annotation.ReturnType; import com.azure.core.v2.annotation.ServiceMethod; import com.azure.core.v2.http.rest.ResponseBase; import io.clientcore.core.util.Base64Util; import io.clientcore.core.http.models.DateTimeRfc1123; -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.EncryptionScope; -import com.azure.storage.blob.models.PageBlobsClearPagesHeaders; -import com.azure.storage.blob.models.PageBlobsCopyIncrementalHeaders; -import com.azure.storage.blob.models.PageBlobsCreateHeaders; -import com.azure.storage.blob.models.PageBlobsGetPageRangesDiffHeaders; -import com.azure.storage.blob.models.PageBlobsGetPageRangesHeaders; -import com.azure.storage.blob.models.PageBlobsResizeHeaders; -import com.azure.storage.blob.models.PageBlobsUpdateSequenceNumberHeaders; -import com.azure.storage.blob.models.PageBlobsUploadPagesFromURLHeaders; -import com.azure.storage.blob.models.PageBlobsUploadPagesHeaders; -import com.azure.storage.blob.models.PageList; -import com.azure.storage.blob.models.PremiumPageBlobAccessTier; -import com.azure.storage.blob.models.SequenceNumberActionType; -import com.azure.storage.blob.models.StorageErrorException; +import com.azure.v2.storage.blob.models.BlobHttpHeaders; +import com.azure.v2.storage.blob.models.BlobImmutabilityPolicyMode; +import com.azure.v2.storage.blob.models.CpkInfo; +import com.azure.v2.storage.blob.models.EncryptionAlgorithmType; +import com.azure.v2.storage.blob.models.EncryptionScope; +import com.azure.v2.storage.blob.models.PageBlobsClearPagesHeaders; +import com.azure.v2.storage.blob.models.PageBlobsCopyIncrementalHeaders; +import com.azure.v2.storage.blob.models.PageBlobsCreateHeaders; +import com.azure.v2.storage.blob.models.PageBlobsGetPageRangesDiffHeaders; +import com.azure.v2.storage.blob.models.PageBlobsGetPageRangesHeaders; +import com.azure.v2.storage.blob.models.PageBlobsResizeHeaders; +import com.azure.v2.storage.blob.models.PageBlobsUpdateSequenceNumberHeaders; +import com.azure.v2.storage.blob.models.PageBlobsUploadPagesFromURLHeaders; +import com.azure.v2.storage.blob.models.PageBlobsUploadPagesHeaders; +import com.azure.v2.storage.blob.models.PageList; +import com.azure.v2.storage.blob.models.PremiumPageBlobAccessTier; +import com.azure.v2.storage.blob.models.SequenceNumberActionType; +import com.azure.v2.storage.blob.models.StorageErrorException; import io.clientcore.core.annotation.ServiceInterface; import io.clientcore.core.http.RestProxy; import io.clientcore.core.http.annotation.BodyParam; @@ -59,7 +59,7 @@ public final class PageBlobsImpl { /** * Initializes an instance of PageBlobsImpl. - * + * * @param client the instance of the service client containing this operation class. */ PageBlobsImpl(AzureBlobStorageImpl client) { @@ -483,7 +483,7 @@ Response copyIncrementalNoCustomHeadersSync(@HostParam("url") String url, /** * 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. @@ -601,7 +601,7 @@ public ResponseBase createWithResponse(String cont /** * 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. @@ -655,7 +655,7 @@ public void create(String containerName, String blob, long contentLength, long b /** * The Create operation creates a new page blob. - * + * * @param containerName The container name. * @param blob The blob name. * @param contentLength The length of the request. @@ -772,7 +772,7 @@ public Response createNoCustomHeadersWithResponse(String containerName, St /** * 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. @@ -858,7 +858,7 @@ public ResponseBase uploadPagesWithResponse(S /** * 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. @@ -911,7 +911,7 @@ public void uploadPages(String containerName, String blob, long contentLength, B /** * The Upload Pages operation writes a range of pages to a page blob. - * + * * @param containerName The container name. * @param blob The blob name. * @param contentLength The length of the request. @@ -996,7 +996,7 @@ public Response uploadPagesNoCustomHeadersWithResponse(String containerNam /** * 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. @@ -1070,7 +1070,7 @@ public ResponseBase clearPagesWithResponse(Str /** * 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. @@ -1112,7 +1112,7 @@ public void clearPages(String containerName, String blob, long contentLength, In /** * The Clear Pages operation clears a set of pages from a page blob. - * + * * @param containerName The container name. * @param blob The blob name. * @param contentLength The length of the request. @@ -1186,7 +1186,7 @@ public Response clearPagesNoCustomHeadersWithResponse(String containerName /** * 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. @@ -1286,7 +1286,7 @@ public ResponseBase uploadPagesFromURL /** * 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. @@ -1348,7 +1348,7 @@ public void uploadPagesFromURL(String containerName, String blob, String sourceU /** * The Upload Pages operation writes a range of pages to a page blob where the contents are read from a URL. - * + * * @param containerName The container name. * @param blob The blob name. * @param sourceUrl Specify a URL to the copy source. @@ -1449,7 +1449,7 @@ public Response uploadPagesFromURLNoCustomHeadersWithResponse(String conta /** * 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 @@ -1505,7 +1505,7 @@ public ResponseBase getPageRangesWithRe /** * 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 @@ -1552,7 +1552,7 @@ public PageList getPageRanges(String containerName, String blob, String snapshot /** * 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 @@ -1608,7 +1608,7 @@ public Response getPageRangesNoCustomHeadersWithResponse(String contai /** * [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 @@ -1672,7 +1672,7 @@ public ResponseBase getPageRangesDi /** * [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 @@ -1729,7 +1729,7 @@ public PageList getPageRangesDiff(String containerName, String blob, String snap /** * [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 @@ -1793,7 +1793,7 @@ public Response getPageRangesDiffNoCustomHeadersWithResponse(String co /** * 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 @@ -1858,7 +1858,7 @@ public ResponseBase resizeWithResponse(String cont /** * 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 @@ -1892,7 +1892,7 @@ public void resize(String containerName, String blob, long blobContentLength, In /** * Resize the Blob. - * + * * @param containerName The container name. * @param blob The blob name. * @param blobContentLength This header specifies the maximum size for the page blob, up to 1 TB. The page blob size @@ -1957,7 +1957,7 @@ public Response resizeNoCustomHeadersWithResponse(String containerName, St /** * 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 @@ -2002,7 +2002,7 @@ public ResponseBase updateSequenceNu /** * 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 @@ -2037,7 +2037,7 @@ public void updateSequenceNumber(String containerName, String blob, SequenceNumb /** * Update the sequence number of the blob. - * + * * @param containerName The container name. * @param blob The blob name. * @param sequenceNumberAction Required if the x-ms-blob-sequence-number header is set for the request. This @@ -2085,7 +2085,7 @@ public Response updateSequenceNumberNoCustomHeadersWithResponse(String con * 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 @@ -2130,7 +2130,7 @@ public ResponseBase copyIncrementalWithRe * is copied such that only the differential changes between the previously copied snapshot are transferred to the * destination. The copied snapshots are complete copies of the original snapshot and can be read or copied from as * usual. This API is supported since REST version 2016-05-31. - * + * * @param containerName The container name. * @param blob The blob name. * @param copySource Specifies the name of the source page blob snapshot. This value is a URL of up to 2 KB in @@ -2165,7 +2165,7 @@ public void copyIncremental(String containerName, String blob, String copySource * is copied such that only the differential changes between the previously copied snapshot are transferred to the * destination. The copied snapshots are complete copies of the original snapshot and can be read or copied from as * usual. This API is supported since REST version 2016-05-31. - * + * * @param containerName The container name. * @param blob The blob name. * @param copySource Specifies the name of the source page blob snapshot. This value is a URL of up to 2 KB in diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/implementation/ServicesImpl.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/implementation/ServicesImpl.java similarity index 97% rename from sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/implementation/ServicesImpl.java rename to sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/implementation/ServicesImpl.java index 2d21da9c603c..f66be756c08a 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/implementation/ServicesImpl.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/implementation/ServicesImpl.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.blob.implementation; +package com.azure.v2.storage.blob.implementation; import com.azure.core.v2.annotation.ReturnType; import com.azure.core.v2.annotation.ServiceMethod; @@ -10,25 +10,25 @@ import com.azure.core.v2.http.rest.PagedResponse; import com.azure.core.v2.http.rest.PagedResponseBase; import com.azure.core.v2.http.rest.ResponseBase; -import com.azure.storage.blob.models.BlobContainerItem; -import com.azure.storage.blob.models.BlobContainersSegment; -import com.azure.storage.blob.models.BlobServiceProperties; -import com.azure.storage.blob.models.BlobServiceStatistics; -import com.azure.storage.blob.models.FilterBlobSegment; -import com.azure.storage.blob.models.FilterBlobsIncludeItem; -import com.azure.storage.blob.models.KeyInfo; -import com.azure.storage.blob.models.ListBlobContainersIncludeType; -import com.azure.storage.blob.models.ServicesFilterBlobsHeaders; -import com.azure.storage.blob.models.ServicesGetAccountInfoHeaders; -import com.azure.storage.blob.models.ServicesGetPropertiesHeaders; -import com.azure.storage.blob.models.ServicesGetStatisticsHeaders; -import com.azure.storage.blob.models.ServicesGetUserDelegationKeyHeaders; -import com.azure.storage.blob.models.ServicesListBlobContainersSegmentHeaders; -import com.azure.storage.blob.models.ServicesListBlobContainersSegmentNextHeaders; -import com.azure.storage.blob.models.ServicesSetPropertiesHeaders; -import com.azure.storage.blob.models.ServicesSubmitBatchHeaders; -import com.azure.storage.blob.models.StorageErrorException; -import com.azure.storage.blob.models.UserDelegationKey; +import com.azure.v2.storage.blob.models.BlobContainerItem; +import com.azure.v2.storage.blob.models.BlobContainersSegment; +import com.azure.v2.storage.blob.models.BlobServiceProperties; +import com.azure.v2.storage.blob.models.BlobServiceStatistics; +import com.azure.v2.storage.blob.models.FilterBlobSegment; +import com.azure.v2.storage.blob.models.FilterBlobsIncludeItem; +import com.azure.v2.storage.blob.models.KeyInfo; +import com.azure.v2.storage.blob.models.ListBlobContainersIncludeType; +import com.azure.v2.storage.blob.models.ServicesFilterBlobsHeaders; +import com.azure.v2.storage.blob.models.ServicesGetAccountInfoHeaders; +import com.azure.v2.storage.blob.models.ServicesGetPropertiesHeaders; +import com.azure.v2.storage.blob.models.ServicesGetStatisticsHeaders; +import com.azure.v2.storage.blob.models.ServicesGetUserDelegationKeyHeaders; +import com.azure.v2.storage.blob.models.ServicesListBlobContainersSegmentHeaders; +import com.azure.v2.storage.blob.models.ServicesListBlobContainersSegmentNextHeaders; +import com.azure.v2.storage.blob.models.ServicesSetPropertiesHeaders; +import com.azure.v2.storage.blob.models.ServicesSubmitBatchHeaders; +import com.azure.v2.storage.blob.models.StorageErrorException; +import com.azure.v2.storage.blob.models.UserDelegationKey; import io.clientcore.core.annotation.ServiceInterface; import io.clientcore.core.http.RestProxy; import io.clientcore.core.http.annotation.BodyParam; @@ -63,7 +63,7 @@ public final class ServicesImpl { /** * Initializes an instance of ServicesImpl. - * + * * @param client the instance of the service client containing this operation class. */ ServicesImpl(AzureBlobStorageImpl client) { @@ -230,7 +230,7 @@ Response listBlobContainersSegmentNextNoCustomHeadersSync /** * Sets properties for a storage account's Blob service endpoint, including properties for Storage Analytics and * CORS (Cross-Origin Resource Sharing) rules. - * + * * @param blobServiceProperties The StorageService properties. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting @@ -256,7 +256,7 @@ public ResponseBase setPropertiesWithRespons /** * Sets properties for a storage account's Blob service endpoint, including properties for Storage Analytics and * CORS (Cross-Origin Resource Sharing) rules. - * + * * @param blobServiceProperties The StorageService properties. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting @@ -275,7 +275,7 @@ public void setProperties(BlobServiceProperties blobServiceProperties, Integer t /** * Sets properties for a storage account's Blob service endpoint, including properties for Storage Analytics and * CORS (Cross-Origin Resource Sharing) rules. - * + * * @param blobServiceProperties The StorageService properties. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting @@ -301,7 +301,7 @@ public Response setPropertiesNoCustomHeadersWithResponse(BlobServiceProper /** * gets the properties of a storage account's Blob service, including properties for Storage Analytics and CORS * (Cross-Origin Resource Sharing) rules. - * + * * @param timeout The timeout parameter is expressed in seconds. For more information, see <a * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting * Timeouts for Blob Service Operations.</a>. @@ -327,7 +327,7 @@ public ResponseBase getProp /** * gets the properties of a storage account's Blob service, including properties for Storage Analytics and CORS * (Cross-Origin Resource Sharing) rules. - * + * * @param timeout The timeout parameter is expressed in seconds. For more information, see <a * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting * Timeouts for Blob Service Operations.</a>. @@ -347,7 +347,7 @@ public BlobServiceProperties getProperties(Integer timeout, String requestId) { /** * gets the properties of a storage account's Blob service, including properties for Storage Analytics and CORS * (Cross-Origin Resource Sharing) rules. - * + * * @param timeout The timeout parameter is expressed in seconds. For more information, see <a * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting * Timeouts for Blob Service Operations.</a>. @@ -373,7 +373,7 @@ public Response getPropertiesNoCustomHeadersWithResponse( /** * 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>. @@ -398,7 +398,7 @@ public ResponseBase getStat /** * 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>. @@ -417,7 +417,7 @@ public BlobServiceStatistics getStatistics(Integer timeout, String requestId) { /** * 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>. @@ -441,7 +441,7 @@ public Response getStatisticsNoCustomHeadersWithResponse( /** * 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 @@ -486,7 +486,7 @@ public PagedResponse listBlobContainersSegmentSinglePage(Stri /** * 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 @@ -523,7 +523,7 @@ public PagedIterable listBlobContainersSegment(String prefix, /** * The List Containers Segment operation returns a list of the containers under the specified account. - * + * * @param prefix Filters the results to return only containers whose name begins with the specified prefix. * @param marker A string value that identifies the portion of the list of containers to be returned with the next * listing operation. The operation returns the NextMarker value within the response body if the listing operation @@ -568,7 +568,7 @@ public PagedResponse listBlobContainersSegmentNoCustomHeaders /** * The List Containers Segment operation returns a list of the containers under the specified account. - * + * * @param prefix Filters the results to return only containers whose name begins with the specified prefix. * @param marker A string value that identifies the portion of the list of containers to be returned with the next * listing operation. The operation returns the NextMarker value within the response body if the listing operation @@ -606,7 +606,7 @@ public PagedIterable listBlobContainersSegmentNoCustomHeaders /** * Retrieves a user delegation key for the Blob service. This is only a valid operation when using bearer token * authentication. - * + * * @param keyInfo Key information. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting @@ -632,7 +632,7 @@ public PagedIterable listBlobContainersSegmentNoCustomHeaders /** * Retrieves a user delegation key for the Blob service. This is only a valid operation when using bearer token * authentication. - * + * * @param keyInfo Key information. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting @@ -652,7 +652,7 @@ public UserDelegationKey getUserDelegationKey(KeyInfo keyInfo, Integer timeout, /** * Retrieves a user delegation key for the Blob service. This is only a valid operation when using bearer token * authentication. - * + * * @param keyInfo Key information. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting @@ -677,7 +677,7 @@ public Response getUserDelegationKeyNoCustomHeadersWithRespon /** * Returns the sku name and account kind. - * + * * @param timeout The timeout parameter is expressed in seconds. For more information, see <a * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting * Timeouts for Blob Service Operations.</a>. @@ -701,7 +701,7 @@ public ResponseBase getAccountInfoWithRespo /** * Returns the sku name and account kind. - * + * * @param timeout The timeout parameter is expressed in seconds. For more information, see <a * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting * Timeouts for Blob Service Operations.</a>. @@ -718,7 +718,7 @@ public void getAccountInfo(Integer timeout, String requestId) { /** * Returns the sku name and account kind. - * + * * @param timeout The timeout parameter is expressed in seconds. For more information, see <a * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting * Timeouts for Blob Service Operations.</a>. @@ -742,7 +742,7 @@ public Response getAccountInfoNoCustomHeadersWithResponse(Integer timeout, /** * 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>. @@ -769,7 +769,7 @@ public ResponseBase submitBatchWithResp /** * 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>. @@ -793,7 +793,7 @@ public InputStream submitBatch(long contentLength, String multipartContentType, /** * 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>. @@ -822,7 +822,7 @@ public Response submitBatchNoCustomHeadersWithResponse(long content * The Filter Blobs operation enables callers to list blobs across all containers whose tags match a given search * expression. Filter blobs searches across all containers within a storage account but can be scoped within the * expression to a single container. - * + * * @param timeout The timeout parameter is expressed in seconds. For more information, see <a * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting * Timeouts for Blob Service Operations.</a>. @@ -865,7 +865,7 @@ public ResponseBase filterBlobsWi * The Filter Blobs operation enables callers to list blobs across all containers whose tags match a given search * expression. Filter blobs searches across all containers within a storage account but can be scoped within the * expression to a single container. - * + * * @param timeout The timeout parameter is expressed in seconds. For more information, see <a * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting * Timeouts for Blob Service Operations.</a>. @@ -899,7 +899,7 @@ public FilterBlobSegment filterBlobs(Integer timeout, String requestId, String w * The Filter Blobs operation enables callers to list blobs across all containers whose tags match a given search * expression. Filter blobs searches across all containers within a storage account but can be scoped within the * expression to a single container. - * + * * @param timeout The timeout parameter is expressed in seconds. For more information, see <a * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting * Timeouts for Blob Service Operations.</a>. @@ -939,7 +939,7 @@ public Response filterBlobsNoCustomHeadersWithResponse(Intege /** * 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. @@ -962,7 +962,7 @@ public PagedResponse listBlobContainersSegmentNextSinglePage( /** * 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. diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/implementation/models/BlobSignedIdentifierWrapper.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/implementation/models/BlobSignedIdentifierWrapper.java similarity index 95% rename from sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/implementation/models/BlobSignedIdentifierWrapper.java rename to sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/implementation/models/BlobSignedIdentifierWrapper.java index 195a3487dabf..cf4184046bbc 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/implementation/models/BlobSignedIdentifierWrapper.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/implementation/models/BlobSignedIdentifierWrapper.java @@ -2,9 +2,9 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.blob.implementation.models; +package com.azure.v2.storage.blob.implementation.models; -import com.azure.storage.blob.models.BlobSignedIdentifier; +import com.azure.v2.storage.blob.models.BlobSignedIdentifier; import java.util.List; import com.azure.core.v2.util.CoreUtils; @@ -24,7 +24,7 @@ public final class BlobSignedIdentifierWrapper implements XmlSerializable signedIdentifiers) { @@ -33,7 +33,7 @@ public BlobSignedIdentifierWrapper(List signedIdentifiers) /** * Get the List<BlobSignedIdentifier> contained in this wrapper. - * + * * @return the List<BlobSignedIdentifier>. */ public List items() { diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/implementation/package-info.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/implementation/package-info.java similarity index 82% rename from sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/implementation/package-info.java rename to sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/implementation/package-info.java index 639d482c5fda..e73f1f7a9444 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/implementation/package-info.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/implementation/package-info.java @@ -6,4 +6,4 @@ * Package containing the implementations for AzureBlobStorage. * null. */ -package com.azure.storage.blob.implementation; +package com.azure.v2.storage.blob.implementation; diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/AccessTier.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/AccessTier.java similarity index 98% rename from sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/AccessTier.java rename to sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/AccessTier.java index 2dbb4c9bcb4d..9bf123a07aba 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/AccessTier.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/AccessTier.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.blob.models; +package com.azure.v2.storage.blob.models; import io.clientcore.core.util.ExpandableEnum; import java.util.Map; @@ -102,7 +102,7 @@ private AccessTier(String name) { /** * Creates or finds a AccessTier. - * + * * @param name a name to look for. * @return the corresponding AccessTier. */ @@ -119,7 +119,7 @@ public static AccessTier fromString(String name) { /** * Gets the value of the AccessTier instance. - * + * * @return the value of the AccessTier instance. */ @Override diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/AccountKind.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/AccountKind.java similarity index 96% rename from sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/AccountKind.java rename to sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/AccountKind.java index 4223a28e59a0..25b1df73989e 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/AccountKind.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/AccountKind.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.blob.models; +package com.azure.v2.storage.blob.models; /** * Defines values for AccountKind. @@ -44,7 +44,7 @@ public enum AccountKind { /** * Parses a serialized value to a AccountKind instance. - * + * * @param value the serialized value to parse. * @return the parsed AccountKind object, or null if unable to parse. */ diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/AppendBlobsAppendBlockFromUrlHeaders.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/AppendBlobsAppendBlockFromUrlHeaders.java similarity index 98% rename from sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/AppendBlobsAppendBlockFromUrlHeaders.java rename to sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/AppendBlobsAppendBlockFromUrlHeaders.java index cf68f538c991..d62ce9f334f8 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/AppendBlobsAppendBlockFromUrlHeaders.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/AppendBlobsAppendBlockFromUrlHeaders.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.blob.models; +package com.azure.v2.storage.blob.models; import com.azure.core.v2.annotation.Fluent; import com.azure.core.v2.util.CoreUtils; @@ -98,7 +98,7 @@ public final class AppendBlobsAppendBlockFromUrlHeaders { // HttpHeaders containing the raw property values. /** * Creates an instance of AppendBlobsAppendBlockFromUrlHeaders class. - * + * * @param rawHeaders The raw HttpHeaders that will be used to create the property values. */ public AppendBlobsAppendBlockFromUrlHeaders(HttpHeaders rawHeaders) { @@ -136,7 +136,7 @@ public AppendBlobsAppendBlockFromUrlHeaders(HttpHeaders rawHeaders) { /** * Get the xMsVersion property: The x-ms-version property. - * + * * @return the xMsVersion value. */ public String getXMsVersion() { @@ -145,7 +145,7 @@ public String getXMsVersion() { /** * Set the xMsVersion property: The x-ms-version property. - * + * * @param xMsVersion the xMsVersion value to set. * @return the AppendBlobsAppendBlockFromUrlHeaders object itself. */ @@ -156,7 +156,7 @@ public AppendBlobsAppendBlockFromUrlHeaders setXMsVersion(String xMsVersion) { /** * Get the eTag property: The ETag property. - * + * * @return the eTag value. */ public String getETag() { @@ -165,7 +165,7 @@ public String getETag() { /** * Set the eTag property: The ETag property. - * + * * @param eTag the eTag value to set. * @return the AppendBlobsAppendBlockFromUrlHeaders object itself. */ @@ -176,7 +176,7 @@ public AppendBlobsAppendBlockFromUrlHeaders setETag(String eTag) { /** * Get the xMsContentCrc64 property: The x-ms-content-crc64 property. - * + * * @return the xMsContentCrc64 value. */ public byte[] getXMsContentCrc64() { @@ -185,7 +185,7 @@ public byte[] getXMsContentCrc64() { /** * Set the xMsContentCrc64 property: The x-ms-content-crc64 property. - * + * * @param xMsContentCrc64 the xMsContentCrc64 value to set. * @return the AppendBlobsAppendBlockFromUrlHeaders object itself. */ @@ -196,7 +196,7 @@ public AppendBlobsAppendBlockFromUrlHeaders setXMsContentCrc64(byte[] xMsContent /** * Get the xMsBlobCommittedBlockCount property: The x-ms-blob-committed-block-count property. - * + * * @return the xMsBlobCommittedBlockCount value. */ public Integer getXMsBlobCommittedBlockCount() { @@ -205,7 +205,7 @@ public Integer getXMsBlobCommittedBlockCount() { /** * Set the xMsBlobCommittedBlockCount property: The x-ms-blob-committed-block-count property. - * + * * @param xMsBlobCommittedBlockCount the xMsBlobCommittedBlockCount value to set. * @return the AppendBlobsAppendBlockFromUrlHeaders object itself. */ @@ -216,7 +216,7 @@ public AppendBlobsAppendBlockFromUrlHeaders setXMsBlobCommittedBlockCount(Intege /** * Get the lastModified property: The Last-Modified property. - * + * * @return the lastModified value. */ public OffsetDateTime getLastModified() { @@ -228,7 +228,7 @@ public OffsetDateTime getLastModified() { /** * Set the lastModified property: The Last-Modified property. - * + * * @param lastModified the lastModified value to set. * @return the AppendBlobsAppendBlockFromUrlHeaders object itself. */ @@ -243,7 +243,7 @@ public AppendBlobsAppendBlockFromUrlHeaders setLastModified(OffsetDateTime lastM /** * Get the xMsEncryptionKeySha256 property: The x-ms-encryption-key-sha256 property. - * + * * @return the xMsEncryptionKeySha256 value. */ public String getXMsEncryptionKeySha256() { @@ -252,7 +252,7 @@ public String getXMsEncryptionKeySha256() { /** * Set the xMsEncryptionKeySha256 property: The x-ms-encryption-key-sha256 property. - * + * * @param xMsEncryptionKeySha256 the xMsEncryptionKeySha256 value to set. * @return the AppendBlobsAppendBlockFromUrlHeaders object itself. */ @@ -263,7 +263,7 @@ public AppendBlobsAppendBlockFromUrlHeaders setXMsEncryptionKeySha256(String xMs /** * Get the xMsRequestId property: The x-ms-request-id property. - * + * * @return the xMsRequestId value. */ public String getXMsRequestId() { @@ -272,7 +272,7 @@ public String getXMsRequestId() { /** * Set the xMsRequestId property: The x-ms-request-id property. - * + * * @param xMsRequestId the xMsRequestId value to set. * @return the AppendBlobsAppendBlockFromUrlHeaders object itself. */ @@ -283,7 +283,7 @@ public AppendBlobsAppendBlockFromUrlHeaders setXMsRequestId(String xMsRequestId) /** * Get the xMsRequestServerEncrypted property: The x-ms-request-server-encrypted property. - * + * * @return the xMsRequestServerEncrypted value. */ public Boolean isXMsRequestServerEncrypted() { @@ -292,7 +292,7 @@ public Boolean isXMsRequestServerEncrypted() { /** * Set the xMsRequestServerEncrypted property: The x-ms-request-server-encrypted property. - * + * * @param xMsRequestServerEncrypted the xMsRequestServerEncrypted value to set. * @return the AppendBlobsAppendBlockFromUrlHeaders object itself. */ @@ -303,7 +303,7 @@ public AppendBlobsAppendBlockFromUrlHeaders setXMsRequestServerEncrypted(Boolean /** * Get the date property: The Date property. - * + * * @return the date value. */ public OffsetDateTime getDate() { @@ -315,7 +315,7 @@ public OffsetDateTime getDate() { /** * Set the date property: The Date property. - * + * * @param date the date value to set. * @return the AppendBlobsAppendBlockFromUrlHeaders object itself. */ @@ -330,7 +330,7 @@ public AppendBlobsAppendBlockFromUrlHeaders setDate(OffsetDateTime date) { /** * Get the contentMD5 property: The Content-MD5 property. - * + * * @return the contentMD5 value. */ public byte[] getContentMD5() { @@ -339,7 +339,7 @@ public byte[] getContentMD5() { /** * Set the contentMD5 property: The Content-MD5 property. - * + * * @param contentMD5 the contentMD5 value to set. * @return the AppendBlobsAppendBlockFromUrlHeaders object itself. */ @@ -350,7 +350,7 @@ public AppendBlobsAppendBlockFromUrlHeaders setContentMD5(byte[] contentMD5) { /** * Get the xMsBlobAppendOffset property: The x-ms-blob-append-offset property. - * + * * @return the xMsBlobAppendOffset value. */ public String getXMsBlobAppendOffset() { @@ -359,7 +359,7 @@ public String getXMsBlobAppendOffset() { /** * Set the xMsBlobAppendOffset property: The x-ms-blob-append-offset property. - * + * * @param xMsBlobAppendOffset the xMsBlobAppendOffset value to set. * @return the AppendBlobsAppendBlockFromUrlHeaders object itself. */ @@ -370,7 +370,7 @@ public AppendBlobsAppendBlockFromUrlHeaders setXMsBlobAppendOffset(String xMsBlo /** * Get the xMsEncryptionScope property: The x-ms-encryption-scope property. - * + * * @return the xMsEncryptionScope value. */ public String getXMsEncryptionScope() { @@ -379,7 +379,7 @@ public String getXMsEncryptionScope() { /** * Set the xMsEncryptionScope property: The x-ms-encryption-scope property. - * + * * @param xMsEncryptionScope the xMsEncryptionScope value to set. * @return the AppendBlobsAppendBlockFromUrlHeaders object itself. */ diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/AppendBlobsAppendBlockHeaders.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/AppendBlobsAppendBlockHeaders.java similarity index 98% rename from sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/AppendBlobsAppendBlockHeaders.java rename to sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/AppendBlobsAppendBlockHeaders.java index 644f08a85d2d..8f2b78e386d5 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/AppendBlobsAppendBlockHeaders.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/AppendBlobsAppendBlockHeaders.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.blob.models; +package com.azure.v2.storage.blob.models; import com.azure.core.v2.annotation.Fluent; import com.azure.core.v2.util.CoreUtils; @@ -110,7 +110,7 @@ public final class AppendBlobsAppendBlockHeaders { // HttpHeaders containing the raw property values. /** * Creates an instance of AppendBlobsAppendBlockHeaders class. - * + * * @param rawHeaders The raw HttpHeaders that will be used to create the property values. */ public AppendBlobsAppendBlockHeaders(HttpHeaders rawHeaders) { @@ -150,7 +150,7 @@ public AppendBlobsAppendBlockHeaders(HttpHeaders rawHeaders) { /** * Get the xMsVersion property: The x-ms-version property. - * + * * @return the xMsVersion value. */ public String getXMsVersion() { @@ -159,7 +159,7 @@ public String getXMsVersion() { /** * Set the xMsVersion property: The x-ms-version property. - * + * * @param xMsVersion the xMsVersion value to set. * @return the AppendBlobsAppendBlockHeaders object itself. */ @@ -170,7 +170,7 @@ public AppendBlobsAppendBlockHeaders setXMsVersion(String xMsVersion) { /** * Get the xMsContentCrc64 property: The x-ms-content-crc64 property. - * + * * @return the xMsContentCrc64 value. */ public byte[] getXMsContentCrc64() { @@ -179,7 +179,7 @@ public byte[] getXMsContentCrc64() { /** * Set the xMsContentCrc64 property: The x-ms-content-crc64 property. - * + * * @param xMsContentCrc64 the xMsContentCrc64 value to set. * @return the AppendBlobsAppendBlockHeaders object itself. */ @@ -190,7 +190,7 @@ public AppendBlobsAppendBlockHeaders setXMsContentCrc64(byte[] xMsContentCrc64) /** * Get the xMsBlobCommittedBlockCount property: The x-ms-blob-committed-block-count property. - * + * * @return the xMsBlobCommittedBlockCount value. */ public Integer getXMsBlobCommittedBlockCount() { @@ -199,7 +199,7 @@ public Integer getXMsBlobCommittedBlockCount() { /** * Set the xMsBlobCommittedBlockCount property: The x-ms-blob-committed-block-count property. - * + * * @param xMsBlobCommittedBlockCount the xMsBlobCommittedBlockCount value to set. * @return the AppendBlobsAppendBlockHeaders object itself. */ @@ -210,7 +210,7 @@ public AppendBlobsAppendBlockHeaders setXMsBlobCommittedBlockCount(Integer xMsBl /** * Get the lastModified property: The Last-Modified property. - * + * * @return the lastModified value. */ public OffsetDateTime getLastModified() { @@ -222,7 +222,7 @@ public OffsetDateTime getLastModified() { /** * Set the lastModified property: The Last-Modified property. - * + * * @param lastModified the lastModified value to set. * @return the AppendBlobsAppendBlockHeaders object itself. */ @@ -237,7 +237,7 @@ public AppendBlobsAppendBlockHeaders setLastModified(OffsetDateTime lastModified /** * Get the xMsEncryptionKeySha256 property: The x-ms-encryption-key-sha256 property. - * + * * @return the xMsEncryptionKeySha256 value. */ public String getXMsEncryptionKeySha256() { @@ -246,7 +246,7 @@ public String getXMsEncryptionKeySha256() { /** * Set the xMsEncryptionKeySha256 property: The x-ms-encryption-key-sha256 property. - * + * * @param xMsEncryptionKeySha256 the xMsEncryptionKeySha256 value to set. * @return the AppendBlobsAppendBlockHeaders object itself. */ @@ -257,7 +257,7 @@ public AppendBlobsAppendBlockHeaders setXMsEncryptionKeySha256(String xMsEncrypt /** * Get the xMsStructuredBody property: The x-ms-structured-body property. - * + * * @return the xMsStructuredBody value. */ public String getXMsStructuredBody() { @@ -266,7 +266,7 @@ public String getXMsStructuredBody() { /** * Set the xMsStructuredBody property: The x-ms-structured-body property. - * + * * @param xMsStructuredBody the xMsStructuredBody value to set. * @return the AppendBlobsAppendBlockHeaders object itself. */ @@ -277,7 +277,7 @@ public AppendBlobsAppendBlockHeaders setXMsStructuredBody(String xMsStructuredBo /** * Get the xMsRequestServerEncrypted property: The x-ms-request-server-encrypted property. - * + * * @return the xMsRequestServerEncrypted value. */ public Boolean isXMsRequestServerEncrypted() { @@ -286,7 +286,7 @@ public Boolean isXMsRequestServerEncrypted() { /** * Set the xMsRequestServerEncrypted property: The x-ms-request-server-encrypted property. - * + * * @param xMsRequestServerEncrypted the xMsRequestServerEncrypted value to set. * @return the AppendBlobsAppendBlockHeaders object itself. */ @@ -297,7 +297,7 @@ public AppendBlobsAppendBlockHeaders setXMsRequestServerEncrypted(Boolean xMsReq /** * Get the date property: The Date property. - * + * * @return the date value. */ public OffsetDateTime getDate() { @@ -309,7 +309,7 @@ public OffsetDateTime getDate() { /** * Set the date property: The Date property. - * + * * @param date the date value to set. * @return the AppendBlobsAppendBlockHeaders object itself. */ @@ -324,7 +324,7 @@ public AppendBlobsAppendBlockHeaders setDate(OffsetDateTime date) { /** * Get the contentMD5 property: The Content-MD5 property. - * + * * @return the contentMD5 value. */ public byte[] getContentMD5() { @@ -333,7 +333,7 @@ public byte[] getContentMD5() { /** * Set the contentMD5 property: The Content-MD5 property. - * + * * @param contentMD5 the contentMD5 value to set. * @return the AppendBlobsAppendBlockHeaders object itself. */ @@ -344,7 +344,7 @@ public AppendBlobsAppendBlockHeaders setContentMD5(byte[] contentMD5) { /** * Get the eTag property: The ETag property. - * + * * @return the eTag value. */ public String getETag() { @@ -353,7 +353,7 @@ public String getETag() { /** * Set the eTag property: The ETag property. - * + * * @param eTag the eTag value to set. * @return the AppendBlobsAppendBlockHeaders object itself. */ @@ -364,7 +364,7 @@ public AppendBlobsAppendBlockHeaders setETag(String eTag) { /** * Get the xMsRequestId property: The x-ms-request-id property. - * + * * @return the xMsRequestId value. */ public String getXMsRequestId() { @@ -373,7 +373,7 @@ public String getXMsRequestId() { /** * Set the xMsRequestId property: The x-ms-request-id property. - * + * * @param xMsRequestId the xMsRequestId value to set. * @return the AppendBlobsAppendBlockHeaders object itself. */ @@ -384,7 +384,7 @@ public AppendBlobsAppendBlockHeaders setXMsRequestId(String xMsRequestId) { /** * Get the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @return the xMsClientRequestId value. */ public String getXMsClientRequestId() { @@ -393,7 +393,7 @@ public String getXMsClientRequestId() { /** * Set the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @param xMsClientRequestId the xMsClientRequestId value to set. * @return the AppendBlobsAppendBlockHeaders object itself. */ @@ -404,7 +404,7 @@ public AppendBlobsAppendBlockHeaders setXMsClientRequestId(String xMsClientReque /** * Get the xMsBlobAppendOffset property: The x-ms-blob-append-offset property. - * + * * @return the xMsBlobAppendOffset value. */ public String getXMsBlobAppendOffset() { @@ -413,7 +413,7 @@ public String getXMsBlobAppendOffset() { /** * Set the xMsBlobAppendOffset property: The x-ms-blob-append-offset property. - * + * * @param xMsBlobAppendOffset the xMsBlobAppendOffset value to set. * @return the AppendBlobsAppendBlockHeaders object itself. */ @@ -424,7 +424,7 @@ public AppendBlobsAppendBlockHeaders setXMsBlobAppendOffset(String xMsBlobAppend /** * Get the xMsEncryptionScope property: The x-ms-encryption-scope property. - * + * * @return the xMsEncryptionScope value. */ public String getXMsEncryptionScope() { @@ -433,7 +433,7 @@ public String getXMsEncryptionScope() { /** * Set the xMsEncryptionScope property: The x-ms-encryption-scope property. - * + * * @param xMsEncryptionScope the xMsEncryptionScope value to set. * @return the AppendBlobsAppendBlockHeaders object itself. */ diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/AppendBlobsCreateHeaders.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/AppendBlobsCreateHeaders.java similarity index 97% rename from sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/AppendBlobsCreateHeaders.java rename to sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/AppendBlobsCreateHeaders.java index d2aad9c6bb14..bfac5288436e 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/AppendBlobsCreateHeaders.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/AppendBlobsCreateHeaders.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.blob.models; +package com.azure.v2.storage.blob.models; import com.azure.core.v2.annotation.Fluent; import com.azure.core.v2.util.CoreUtils; @@ -88,7 +88,7 @@ public final class AppendBlobsCreateHeaders { // HttpHeaders containing the raw property values. /** * Creates an instance of AppendBlobsCreateHeaders class. - * + * * @param rawHeaders The raw HttpHeaders that will be used to create the property values. */ public AppendBlobsCreateHeaders(HttpHeaders rawHeaders) { @@ -119,7 +119,7 @@ public AppendBlobsCreateHeaders(HttpHeaders rawHeaders) { /** * Get the xMsVersion property: The x-ms-version property. - * + * * @return the xMsVersion value. */ public String getXMsVersion() { @@ -128,7 +128,7 @@ public String getXMsVersion() { /** * Set the xMsVersion property: The x-ms-version property. - * + * * @param xMsVersion the xMsVersion value to set. * @return the AppendBlobsCreateHeaders object itself. */ @@ -139,7 +139,7 @@ public AppendBlobsCreateHeaders setXMsVersion(String xMsVersion) { /** * Get the eTag property: The ETag property. - * + * * @return the eTag value. */ public String getETag() { @@ -148,7 +148,7 @@ public String getETag() { /** * Set the eTag property: The ETag property. - * + * * @param eTag the eTag value to set. * @return the AppendBlobsCreateHeaders object itself. */ @@ -159,7 +159,7 @@ public AppendBlobsCreateHeaders setETag(String eTag) { /** * Get the lastModified property: The Last-Modified property. - * + * * @return the lastModified value. */ public OffsetDateTime getLastModified() { @@ -171,7 +171,7 @@ public OffsetDateTime getLastModified() { /** * Set the lastModified property: The Last-Modified property. - * + * * @param lastModified the lastModified value to set. * @return the AppendBlobsCreateHeaders object itself. */ @@ -186,7 +186,7 @@ public AppendBlobsCreateHeaders setLastModified(OffsetDateTime lastModified) { /** * Get the xMsVersionId property: The x-ms-version-id property. - * + * * @return the xMsVersionId value. */ public String getXMsVersionId() { @@ -195,7 +195,7 @@ public String getXMsVersionId() { /** * Set the xMsVersionId property: The x-ms-version-id property. - * + * * @param xMsVersionId the xMsVersionId value to set. * @return the AppendBlobsCreateHeaders object itself. */ @@ -206,7 +206,7 @@ public AppendBlobsCreateHeaders setXMsVersionId(String xMsVersionId) { /** * Get the xMsEncryptionKeySha256 property: The x-ms-encryption-key-sha256 property. - * + * * @return the xMsEncryptionKeySha256 value. */ public String getXMsEncryptionKeySha256() { @@ -215,7 +215,7 @@ public String getXMsEncryptionKeySha256() { /** * Set the xMsEncryptionKeySha256 property: The x-ms-encryption-key-sha256 property. - * + * * @param xMsEncryptionKeySha256 the xMsEncryptionKeySha256 value to set. * @return the AppendBlobsCreateHeaders object itself. */ @@ -226,7 +226,7 @@ public AppendBlobsCreateHeaders setXMsEncryptionKeySha256(String xMsEncryptionKe /** * Get the xMsRequestId property: The x-ms-request-id property. - * + * * @return the xMsRequestId value. */ public String getXMsRequestId() { @@ -235,7 +235,7 @@ public String getXMsRequestId() { /** * Set the xMsRequestId property: The x-ms-request-id property. - * + * * @param xMsRequestId the xMsRequestId value to set. * @return the AppendBlobsCreateHeaders object itself. */ @@ -246,7 +246,7 @@ public AppendBlobsCreateHeaders setXMsRequestId(String xMsRequestId) { /** * Get the xMsRequestServerEncrypted property: The x-ms-request-server-encrypted property. - * + * * @return the xMsRequestServerEncrypted value. */ public Boolean isXMsRequestServerEncrypted() { @@ -255,7 +255,7 @@ public Boolean isXMsRequestServerEncrypted() { /** * Set the xMsRequestServerEncrypted property: The x-ms-request-server-encrypted property. - * + * * @param xMsRequestServerEncrypted the xMsRequestServerEncrypted value to set. * @return the AppendBlobsCreateHeaders object itself. */ @@ -266,7 +266,7 @@ public AppendBlobsCreateHeaders setXMsRequestServerEncrypted(Boolean xMsRequestS /** * Get the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @return the xMsClientRequestId value. */ public String getXMsClientRequestId() { @@ -275,7 +275,7 @@ public String getXMsClientRequestId() { /** * Set the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @param xMsClientRequestId the xMsClientRequestId value to set. * @return the AppendBlobsCreateHeaders object itself. */ @@ -286,7 +286,7 @@ public AppendBlobsCreateHeaders setXMsClientRequestId(String xMsClientRequestId) /** * Get the date property: The Date property. - * + * * @return the date value. */ public OffsetDateTime getDate() { @@ -298,7 +298,7 @@ public OffsetDateTime getDate() { /** * Set the date property: The Date property. - * + * * @param date the date value to set. * @return the AppendBlobsCreateHeaders object itself. */ @@ -313,7 +313,7 @@ public AppendBlobsCreateHeaders setDate(OffsetDateTime date) { /** * Get the contentMD5 property: The Content-MD5 property. - * + * * @return the contentMD5 value. */ public byte[] getContentMD5() { @@ -322,7 +322,7 @@ public byte[] getContentMD5() { /** * Set the contentMD5 property: The Content-MD5 property. - * + * * @param contentMD5 the contentMD5 value to set. * @return the AppendBlobsCreateHeaders object itself. */ @@ -333,7 +333,7 @@ public AppendBlobsCreateHeaders setContentMD5(byte[] contentMD5) { /** * Get the xMsEncryptionScope property: The x-ms-encryption-scope property. - * + * * @return the xMsEncryptionScope value. */ public String getXMsEncryptionScope() { @@ -342,7 +342,7 @@ public String getXMsEncryptionScope() { /** * Set the xMsEncryptionScope property: The x-ms-encryption-scope property. - * + * * @param xMsEncryptionScope the xMsEncryptionScope value to set. * @return the AppendBlobsCreateHeaders object itself. */ diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/AppendBlobsSealHeaders.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/AppendBlobsSealHeaders.java similarity index 97% rename from sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/AppendBlobsSealHeaders.java rename to sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/AppendBlobsSealHeaders.java index aa8f2ca4af2f..7ec4bec671e5 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/AppendBlobsSealHeaders.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/AppendBlobsSealHeaders.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.blob.models; +package com.azure.v2.storage.blob.models; import com.azure.core.v2.annotation.Fluent; import io.clientcore.core.http.models.DateTimeRfc1123; @@ -58,7 +58,7 @@ public final class AppendBlobsSealHeaders { // HttpHeaders containing the raw property values. /** * Creates an instance of AppendBlobsSealHeaders class. - * + * * @param rawHeaders The raw HttpHeaders that will be used to create the property values. */ public AppendBlobsSealHeaders(HttpHeaders rawHeaders) { @@ -82,7 +82,7 @@ public AppendBlobsSealHeaders(HttpHeaders rawHeaders) { /** * Get the xMsVersion property: The x-ms-version property. - * + * * @return the xMsVersion value. */ public String getXMsVersion() { @@ -91,7 +91,7 @@ public String getXMsVersion() { /** * Set the xMsVersion property: The x-ms-version property. - * + * * @param xMsVersion the xMsVersion value to set. * @return the AppendBlobsSealHeaders object itself. */ @@ -102,7 +102,7 @@ public AppendBlobsSealHeaders setXMsVersion(String xMsVersion) { /** * Get the eTag property: The ETag property. - * + * * @return the eTag value. */ public String getETag() { @@ -111,7 +111,7 @@ public String getETag() { /** * Set the eTag property: The ETag property. - * + * * @param eTag the eTag value to set. * @return the AppendBlobsSealHeaders object itself. */ @@ -122,7 +122,7 @@ public AppendBlobsSealHeaders setETag(String eTag) { /** * Get the xMsBlobSealed property: The x-ms-blob-sealed property. - * + * * @return the xMsBlobSealed value. */ public Boolean isXMsBlobSealed() { @@ -131,7 +131,7 @@ public Boolean isXMsBlobSealed() { /** * Set the xMsBlobSealed property: The x-ms-blob-sealed property. - * + * * @param xMsBlobSealed the xMsBlobSealed value to set. * @return the AppendBlobsSealHeaders object itself. */ @@ -142,7 +142,7 @@ public AppendBlobsSealHeaders setXMsBlobSealed(Boolean xMsBlobSealed) { /** * Get the lastModified property: The Last-Modified property. - * + * * @return the lastModified value. */ public OffsetDateTime getLastModified() { @@ -154,7 +154,7 @@ public OffsetDateTime getLastModified() { /** * Set the lastModified property: The Last-Modified property. - * + * * @param lastModified the lastModified value to set. * @return the AppendBlobsSealHeaders object itself. */ @@ -169,7 +169,7 @@ public AppendBlobsSealHeaders setLastModified(OffsetDateTime lastModified) { /** * Get the xMsRequestId property: The x-ms-request-id property. - * + * * @return the xMsRequestId value. */ public String getXMsRequestId() { @@ -178,7 +178,7 @@ public String getXMsRequestId() { /** * Set the xMsRequestId property: The x-ms-request-id property. - * + * * @param xMsRequestId the xMsRequestId value to set. * @return the AppendBlobsSealHeaders object itself. */ @@ -189,7 +189,7 @@ public AppendBlobsSealHeaders setXMsRequestId(String xMsRequestId) { /** * Get the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @return the xMsClientRequestId value. */ public String getXMsClientRequestId() { @@ -198,7 +198,7 @@ public String getXMsClientRequestId() { /** * Set the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @param xMsClientRequestId the xMsClientRequestId value to set. * @return the AppendBlobsSealHeaders object itself. */ @@ -209,7 +209,7 @@ public AppendBlobsSealHeaders setXMsClientRequestId(String xMsClientRequestId) { /** * Get the date property: The Date property. - * + * * @return the date value. */ public OffsetDateTime getDate() { @@ -221,7 +221,7 @@ public OffsetDateTime getDate() { /** * Set the date property: The Date property. - * + * * @param date the date value to set. * @return the AppendBlobsSealHeaders object itself. */ diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/ArchiveStatus.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ArchiveStatus.java similarity index 97% rename from sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/ArchiveStatus.java rename to sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ArchiveStatus.java index fb1bda118538..cb4ec1fb5922 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/ArchiveStatus.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ArchiveStatus.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.blob.models; +package com.azure.v2.storage.blob.models; import io.clientcore.core.util.ExpandableEnum; import java.util.Map; @@ -37,7 +37,7 @@ private ArchiveStatus(String name) { /** * Creates or finds a ArchiveStatus. - * + * * @param name a name to look for. * @return the corresponding ArchiveStatus. */ @@ -54,7 +54,7 @@ public static ArchiveStatus fromString(String name) { /** * Gets the value of the ArchiveStatus instance. - * + * * @return the value of the ArchiveStatus instance. */ @Override diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/ArrowConfiguration.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ArrowConfiguration.java similarity index 98% rename from sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/ArrowConfiguration.java rename to sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ArrowConfiguration.java index 78f6b9b03251..9ef90c9a5bc1 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/ArrowConfiguration.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ArrowConfiguration.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.blob.models; +package com.azure.v2.storage.blob.models; import com.azure.core.v2.annotation.Fluent; import com.azure.core.v2.util.CoreUtils; @@ -33,7 +33,7 @@ public ArrowConfiguration() { /** * Get the schema property: The Schema property. - * + * * @return the schema value. */ public List getSchema() { @@ -45,7 +45,7 @@ public List getSchema() { /** * Set the schema property: The Schema property. - * + * * @param schema the schema value to set. * @return the ArrowConfiguration object itself. */ @@ -75,7 +75,7 @@ public XmlWriter toXml(XmlWriter xmlWriter, String rootElementName) throws XMLSt /** * Reads an instance of ArrowConfiguration from the XmlReader. - * + * * @param xmlReader The XmlReader being read. * @return An instance of ArrowConfiguration if the XmlReader was pointing to an instance of it, or null if it was * pointing to XML null. @@ -87,7 +87,7 @@ public static ArrowConfiguration fromXml(XmlReader xmlReader) throws XMLStreamEx /** * Reads an instance of ArrowConfiguration from the XmlReader. - * + * * @param xmlReader The XmlReader being read. * @param rootElementName Optional root element name to override the default defined by the model. Used to support * cases where the model can deserialize from different root element names. diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/ArrowField.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ArrowField.java similarity index 97% rename from sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/ArrowField.java rename to sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ArrowField.java index bc32a734ae4e..42e4b51a55c3 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/ArrowField.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ArrowField.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.blob.models; +package com.azure.v2.storage.blob.models; import com.azure.core.v2.annotation.Fluent; import com.azure.core.v2.util.CoreUtils; @@ -46,7 +46,7 @@ public ArrowField() { /** * Get the type property: The Type property. - * + * * @return the type value. */ public String getType() { @@ -55,7 +55,7 @@ public String getType() { /** * Set the type property: The Type property. - * + * * @param type the type value to set. * @return the ArrowField object itself. */ @@ -66,7 +66,7 @@ public ArrowField setType(String type) { /** * Get the name property: The Name property. - * + * * @return the name value. */ public String getName() { @@ -75,7 +75,7 @@ public String getName() { /** * Set the name property: The Name property. - * + * * @param name the name value to set. * @return the ArrowField object itself. */ @@ -86,7 +86,7 @@ public ArrowField setName(String name) { /** * Get the precision property: The Precision property. - * + * * @return the precision value. */ public Integer getPrecision() { @@ -95,7 +95,7 @@ public Integer getPrecision() { /** * Set the precision property: The Precision property. - * + * * @param precision the precision value to set. * @return the ArrowField object itself. */ @@ -106,7 +106,7 @@ public ArrowField setPrecision(Integer precision) { /** * Get the scale property: The Scale property. - * + * * @return the scale value. */ public Integer getScale() { @@ -115,7 +115,7 @@ public Integer getScale() { /** * Set the scale property: The Scale property. - * + * * @param scale the scale value to set. * @return the ArrowField object itself. */ @@ -142,7 +142,7 @@ public XmlWriter toXml(XmlWriter xmlWriter, String rootElementName) throws XMLSt /** * Reads an instance of ArrowField from the XmlReader. - * + * * @param xmlReader The XmlReader being read. * @return An instance of ArrowField if the XmlReader was pointing to an instance of it, or null if it was pointing * to XML null. @@ -154,7 +154,7 @@ public static ArrowField fromXml(XmlReader xmlReader) throws XMLStreamException /** * Reads an instance of ArrowField from the XmlReader. - * + * * @param xmlReader The XmlReader being read. * @param rootElementName Optional root element name to override the default defined by the model. Used to support * cases where the model can deserialize from different root element names. diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlobAccessPolicy.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobAccessPolicy.java similarity index 98% rename from sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlobAccessPolicy.java rename to sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobAccessPolicy.java index d46921b48e9b..f3f69af6b8f2 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlobAccessPolicy.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobAccessPolicy.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.blob.models; +package com.azure.v2.storage.blob.models; import com.azure.core.v2.annotation.Fluent; import com.azure.core.v2.util.CoreUtils; @@ -43,7 +43,7 @@ public BlobAccessPolicy() { /** * Get the startsOn property: the date-time the policy is active. - * + * * @return the startsOn value. */ public OffsetDateTime getStartsOn() { @@ -52,7 +52,7 @@ public OffsetDateTime getStartsOn() { /** * Set the startsOn property: the date-time the policy is active. - * + * * @param startsOn the startsOn value to set. * @return the BlobAccessPolicy object itself. */ @@ -63,7 +63,7 @@ public BlobAccessPolicy setStartsOn(OffsetDateTime startsOn) { /** * Get the expiresOn property: the date-time the policy expires. - * + * * @return the expiresOn value. */ public OffsetDateTime getExpiresOn() { @@ -72,7 +72,7 @@ public OffsetDateTime getExpiresOn() { /** * Set the expiresOn property: the date-time the policy expires. - * + * * @param expiresOn the expiresOn value to set. * @return the BlobAccessPolicy object itself. */ @@ -83,7 +83,7 @@ public BlobAccessPolicy setExpiresOn(OffsetDateTime expiresOn) { /** * Get the permissions property: the permissions for the acl policy. - * + * * @return the permissions value. */ public String getPermissions() { @@ -92,7 +92,7 @@ public String getPermissions() { /** * Set the permissions property: the permissions for the acl policy. - * + * * @param permissions the permissions value to set. * @return the BlobAccessPolicy object itself. */ @@ -120,7 +120,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. @@ -132,7 +132,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. diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlobAnalyticsLogging.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobAnalyticsLogging.java similarity index 98% rename from sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlobAnalyticsLogging.java rename to sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobAnalyticsLogging.java index c93cfaf4687c..60fa0bc3e9f7 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlobAnalyticsLogging.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobAnalyticsLogging.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.blob.models; +package com.azure.v2.storage.blob.models; import com.azure.core.v2.annotation.Fluent; import com.azure.core.v2.util.CoreUtils; @@ -51,7 +51,7 @@ public BlobAnalyticsLogging() { /** * Get the version property: The version of Storage Analytics to configure. - * + * * @return the version value. */ public String getVersion() { @@ -60,7 +60,7 @@ public String getVersion() { /** * Set the version property: The version of Storage Analytics to configure. - * + * * @param version the version value to set. * @return the BlobAnalyticsLogging object itself. */ @@ -71,7 +71,7 @@ public BlobAnalyticsLogging setVersion(String version) { /** * Get the delete property: Indicates whether all delete requests should be logged. - * + * * @return the delete value. */ public boolean isDelete() { @@ -80,7 +80,7 @@ public boolean isDelete() { /** * Set the delete property: Indicates whether all delete requests should be logged. - * + * * @param delete the delete value to set. * @return the BlobAnalyticsLogging object itself. */ @@ -91,7 +91,7 @@ public BlobAnalyticsLogging setDelete(boolean delete) { /** * Get the read property: Indicates whether all read requests should be logged. - * + * * @return the read value. */ public boolean isRead() { @@ -100,7 +100,7 @@ public boolean isRead() { /** * Set the read property: Indicates whether all read requests should be logged. - * + * * @param read the read value to set. * @return the BlobAnalyticsLogging object itself. */ @@ -111,7 +111,7 @@ public BlobAnalyticsLogging setRead(boolean read) { /** * Get the write property: Indicates whether all write requests should be logged. - * + * * @return the write value. */ public boolean isWrite() { @@ -120,7 +120,7 @@ public boolean isWrite() { /** * Set the write property: Indicates whether all write requests should be logged. - * + * * @param write the write value to set. * @return the BlobAnalyticsLogging object itself. */ @@ -132,7 +132,7 @@ public BlobAnalyticsLogging setWrite(boolean write) { /** * Get the retentionPolicy property: the retention policy which determines how long the associated data should * persist. - * + * * @return the retentionPolicy value. */ public BlobRetentionPolicy getRetentionPolicy() { @@ -142,7 +142,7 @@ public BlobRetentionPolicy getRetentionPolicy() { /** * Set the retentionPolicy property: the retention policy which determines how long the associated data should * persist. - * + * * @param retentionPolicy the retentionPolicy value to set. * @return the BlobAnalyticsLogging object itself. */ @@ -170,7 +170,7 @@ 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. @@ -182,7 +182,7 @@ 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. diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlobContainerEncryptionScope.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobContainerEncryptionScope.java similarity index 97% rename from sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlobContainerEncryptionScope.java rename to sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobContainerEncryptionScope.java index 2dd644332be7..26121863c89c 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlobContainerEncryptionScope.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobContainerEncryptionScope.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.blob.models; +package com.azure.v2.storage.blob.models; import com.azure.core.v2.annotation.Fluent; @@ -32,7 +32,7 @@ public BlobContainerEncryptionScope() { /** * Get the defaultEncryptionScope property: Optional. Version 2019-07-07 and later. Specifies the default encryption * scope to set on the container and use for all future writes. - * + * * @return the defaultEncryptionScope value. */ public String getDefaultEncryptionScope() { @@ -42,7 +42,7 @@ public String getDefaultEncryptionScope() { /** * Set the defaultEncryptionScope property: Optional. Version 2019-07-07 and later. Specifies the default encryption * scope to set on the container and use for all future writes. - * + * * @param defaultEncryptionScope the defaultEncryptionScope value to set. * @return the BlobContainerEncryptionScope object itself. */ @@ -54,7 +54,7 @@ public BlobContainerEncryptionScope setDefaultEncryptionScope(String defaultEncr /** * Get the encryptionScopeOverridePrevented property: Optional. Version 2019-07-07 and newer. If true, prevents any * request from specifying a different encryption scope than the scope set on the container. - * + * * @return the encryptionScopeOverridePrevented value. */ public Boolean isEncryptionScopeOverridePrevented() { @@ -64,7 +64,7 @@ public Boolean isEncryptionScopeOverridePrevented() { /** * Set the encryptionScopeOverridePrevented property: Optional. Version 2019-07-07 and newer. If true, prevents any * request from specifying a different encryption scope than the scope set on the container. - * + * * @param encryptionScopeOverridePrevented the encryptionScopeOverridePrevented value to set. * @return the BlobContainerEncryptionScope object itself. */ diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlobContainerItem.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobContainerItem.java similarity index 98% rename from sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlobContainerItem.java rename to sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobContainerItem.java index 2f8534a824b9..50263a6e3a5d 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlobContainerItem.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobContainerItem.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.blob.models; +package com.azure.v2.storage.blob.models; import com.azure.core.v2.annotation.Fluent; import com.azure.core.v2.util.CoreUtils; @@ -53,7 +53,7 @@ public BlobContainerItem() { /** * Get the name property: The Name property. - * + * * @return the name value. */ public String getName() { @@ -62,7 +62,7 @@ public String getName() { /** * Set the name property: The Name property. - * + * * @param name the name value to set. * @return the BlobContainerItem object itself. */ @@ -73,7 +73,7 @@ public BlobContainerItem setName(String name) { /** * Get the deleted property: The Deleted property. - * + * * @return the deleted value. */ public Boolean isDeleted() { @@ -82,7 +82,7 @@ public Boolean isDeleted() { /** * Set the deleted property: The Deleted property. - * + * * @param deleted the deleted value to set. * @return the BlobContainerItem object itself. */ @@ -93,7 +93,7 @@ public BlobContainerItem setDeleted(Boolean deleted) { /** * Get the version property: The Version property. - * + * * @return the version value. */ public String getVersion() { @@ -102,7 +102,7 @@ public String getVersion() { /** * Set the version property: The Version property. - * + * * @param version the version value to set. * @return the BlobContainerItem object itself. */ @@ -113,7 +113,7 @@ public BlobContainerItem setVersion(String version) { /** * Get the properties property: Properties of a container. - * + * * @return the properties value. */ public BlobContainerItemProperties getProperties() { @@ -122,7 +122,7 @@ public BlobContainerItemProperties getProperties() { /** * Set the properties property: Properties of a container. - * + * * @param properties the properties value to set. * @return the BlobContainerItem object itself. */ @@ -133,7 +133,7 @@ public BlobContainerItem setProperties(BlobContainerItemProperties properties) { /** * Get the metadata property: Dictionary of <string>. - * + * * @return the metadata value. */ public Map getMetadata() { @@ -142,7 +142,7 @@ public Map getMetadata() { /** * Set the metadata property: Dictionary of <string>. - * + * * @param metadata the metadata value to set. * @return the BlobContainerItem object itself. */ @@ -176,7 +176,7 @@ 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. @@ -188,7 +188,7 @@ 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. diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlobContainerItemProperties.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobContainerItemProperties.java similarity index 98% rename from sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlobContainerItemProperties.java rename to sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobContainerItemProperties.java index b1a173f628a4..63df4af33ac4 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlobContainerItemProperties.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobContainerItemProperties.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.blob.models; +package com.azure.v2.storage.blob.models; import com.azure.core.v2.annotation.Fluent; import com.azure.core.v2.util.CoreUtils; @@ -94,7 +94,7 @@ public BlobContainerItemProperties() { /** * Get the lastModified property: The Last-Modified property. - * + * * @return the lastModified value. */ public OffsetDateTime getLastModified() { @@ -106,7 +106,7 @@ public OffsetDateTime getLastModified() { /** * Set the lastModified property: The Last-Modified property. - * + * * @param lastModified the lastModified value to set. * @return the BlobContainerItemProperties object itself. */ @@ -121,7 +121,7 @@ public BlobContainerItemProperties setLastModified(OffsetDateTime lastModified) /** * Get the eTag property: The Etag property. - * + * * @return the eTag value. */ public String getETag() { @@ -130,7 +130,7 @@ public String getETag() { /** * Set the eTag property: The Etag property. - * + * * @param eTag the eTag value to set. * @return the BlobContainerItemProperties object itself. */ @@ -141,7 +141,7 @@ public BlobContainerItemProperties setETag(String eTag) { /** * Get the leaseStatus property: The LeaseStatus property. - * + * * @return the leaseStatus value. */ public LeaseStatusType getLeaseStatus() { @@ -150,7 +150,7 @@ public LeaseStatusType getLeaseStatus() { /** * Set the leaseStatus property: The LeaseStatus property. - * + * * @param leaseStatus the leaseStatus value to set. * @return the BlobContainerItemProperties object itself. */ @@ -161,7 +161,7 @@ public BlobContainerItemProperties setLeaseStatus(LeaseStatusType leaseStatus) { /** * Get the leaseState property: The LeaseState property. - * + * * @return the leaseState value. */ public LeaseStateType getLeaseState() { @@ -170,7 +170,7 @@ public LeaseStateType getLeaseState() { /** * Set the leaseState property: The LeaseState property. - * + * * @param leaseState the leaseState value to set. * @return the BlobContainerItemProperties object itself. */ @@ -181,7 +181,7 @@ public BlobContainerItemProperties setLeaseState(LeaseStateType leaseState) { /** * Get the leaseDuration property: The LeaseDuration property. - * + * * @return the leaseDuration value. */ public LeaseDurationType getLeaseDuration() { @@ -190,7 +190,7 @@ public LeaseDurationType getLeaseDuration() { /** * Set the leaseDuration property: The LeaseDuration property. - * + * * @param leaseDuration the leaseDuration value to set. * @return the BlobContainerItemProperties object itself. */ @@ -201,7 +201,7 @@ public BlobContainerItemProperties setLeaseDuration(LeaseDurationType leaseDurat /** * Get the publicAccess property: The PublicAccess property. - * + * * @return the publicAccess value. */ public PublicAccessType getPublicAccess() { @@ -210,7 +210,7 @@ public PublicAccessType getPublicAccess() { /** * Set the publicAccess property: The PublicAccess property. - * + * * @param publicAccess the publicAccess value to set. * @return the BlobContainerItemProperties object itself. */ @@ -221,7 +221,7 @@ public BlobContainerItemProperties setPublicAccess(PublicAccessType publicAccess /** * Get the hasImmutabilityPolicy property: The HasImmutabilityPolicy property. - * + * * @return the hasImmutabilityPolicy value. */ public Boolean isHasImmutabilityPolicy() { @@ -230,7 +230,7 @@ public Boolean isHasImmutabilityPolicy() { /** * Set the hasImmutabilityPolicy property: The HasImmutabilityPolicy property. - * + * * @param hasImmutabilityPolicy the hasImmutabilityPolicy value to set. * @return the BlobContainerItemProperties object itself. */ @@ -241,7 +241,7 @@ public BlobContainerItemProperties setHasImmutabilityPolicy(Boolean hasImmutabil /** * Get the hasLegalHold property: The HasLegalHold property. - * + * * @return the hasLegalHold value. */ public Boolean isHasLegalHold() { @@ -250,7 +250,7 @@ public Boolean isHasLegalHold() { /** * Set the hasLegalHold property: The HasLegalHold property. - * + * * @param hasLegalHold the hasLegalHold value to set. * @return the BlobContainerItemProperties object itself. */ @@ -261,7 +261,7 @@ public BlobContainerItemProperties setHasLegalHold(Boolean hasLegalHold) { /** * Get the defaultEncryptionScope property: The DefaultEncryptionScope property. - * + * * @return the defaultEncryptionScope value. */ public String getDefaultEncryptionScope() { @@ -270,7 +270,7 @@ public String getDefaultEncryptionScope() { /** * Set the defaultEncryptionScope property: The DefaultEncryptionScope property. - * + * * @param defaultEncryptionScope the defaultEncryptionScope value to set. * @return the BlobContainerItemProperties object itself. */ @@ -281,7 +281,7 @@ public BlobContainerItemProperties setDefaultEncryptionScope(String defaultEncry /** * Get the encryptionScopeOverridePrevented property: The DenyEncryptionScopeOverride property. - * + * * @return the encryptionScopeOverridePrevented value. */ public Boolean isEncryptionScopeOverridePrevented() { @@ -290,7 +290,7 @@ public Boolean isEncryptionScopeOverridePrevented() { /** * Set the encryptionScopeOverridePrevented property: The DenyEncryptionScopeOverride property. - * + * * @param encryptionScopeOverridePrevented the encryptionScopeOverridePrevented value to set. * @return the BlobContainerItemProperties object itself. */ @@ -301,7 +301,7 @@ public BlobContainerItemProperties setEncryptionScopeOverridePrevented(Boolean e /** * Get the deletedTime property: The DeletedTime property. - * + * * @return the deletedTime value. */ public OffsetDateTime getDeletedTime() { @@ -313,7 +313,7 @@ public OffsetDateTime getDeletedTime() { /** * Set the deletedTime property: The DeletedTime property. - * + * * @param deletedTime the deletedTime value to set. * @return the BlobContainerItemProperties object itself. */ @@ -328,7 +328,7 @@ public BlobContainerItemProperties setDeletedTime(OffsetDateTime deletedTime) { /** * Get the remainingRetentionDays property: The RemainingRetentionDays property. - * + * * @return the remainingRetentionDays value. */ public Integer getRemainingRetentionDays() { @@ -337,7 +337,7 @@ public Integer getRemainingRetentionDays() { /** * Set the remainingRetentionDays property: The RemainingRetentionDays property. - * + * * @param remainingRetentionDays the remainingRetentionDays value to set. * @return the BlobContainerItemProperties object itself. */ @@ -349,7 +349,7 @@ public BlobContainerItemProperties setRemainingRetentionDays(Integer remainingRe /** * Get the isImmutableStorageWithVersioningEnabled property: Indicates if version level worm is enabled on this * container. - * + * * @return the isImmutableStorageWithVersioningEnabled value. */ public Boolean isImmutableStorageWithVersioningEnabled() { @@ -359,7 +359,7 @@ public Boolean isImmutableStorageWithVersioningEnabled() { /** * Set the isImmutableStorageWithVersioningEnabled property: Indicates if version level worm is enabled on this * container. - * + * * @param isImmutableStorageWithVersioningEnabled the isImmutableStorageWithVersioningEnabled value to set. * @return the BlobContainerItemProperties object itself. */ @@ -398,7 +398,7 @@ public XmlWriter toXml(XmlWriter xmlWriter, String rootElementName) throws XMLSt /** * Reads an instance of BlobContainerItemProperties from the XmlReader. - * + * * @param xmlReader The XmlReader being read. * @return An instance of BlobContainerItemProperties if the XmlReader was pointing to an instance of it, or null if * it was pointing to XML null. @@ -410,7 +410,7 @@ public static BlobContainerItemProperties fromXml(XmlReader xmlReader) throws XM /** * Reads an instance of BlobContainerItemProperties from the XmlReader. - * + * * @param xmlReader The XmlReader being read. * @param rootElementName Optional root element name to override the default defined by the model. Used to support * cases where the model can deserialize from different root element names. diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlobContainersSegment.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobContainersSegment.java similarity index 98% rename from sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlobContainersSegment.java rename to sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobContainersSegment.java index 3a1017cbf486..752f6fd74b39 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlobContainersSegment.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobContainersSegment.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.blob.models; +package com.azure.v2.storage.blob.models; import com.azure.core.v2.annotation.Fluent; import com.azure.core.v2.util.CoreUtils; @@ -58,7 +58,7 @@ public BlobContainersSegment() { /** * Get the serviceEndpoint property: The ServiceEndpoint property. - * + * * @return the serviceEndpoint value. */ public String getServiceEndpoint() { @@ -67,7 +67,7 @@ public String getServiceEndpoint() { /** * Set the serviceEndpoint property: The ServiceEndpoint property. - * + * * @param serviceEndpoint the serviceEndpoint value to set. * @return the BlobContainersSegment object itself. */ @@ -78,7 +78,7 @@ public BlobContainersSegment setServiceEndpoint(String serviceEndpoint) { /** * Get the prefix property: The Prefix property. - * + * * @return the prefix value. */ public String getPrefix() { @@ -87,7 +87,7 @@ public String getPrefix() { /** * Set the prefix property: The Prefix property. - * + * * @param prefix the prefix value to set. * @return the BlobContainersSegment object itself. */ @@ -98,7 +98,7 @@ public BlobContainersSegment setPrefix(String prefix) { /** * Get the marker property: The Marker property. - * + * * @return the marker value. */ public String getMarker() { @@ -107,7 +107,7 @@ public String getMarker() { /** * Set the marker property: The Marker property. - * + * * @param marker the marker value to set. * @return the BlobContainersSegment object itself. */ @@ -118,7 +118,7 @@ public BlobContainersSegment setMarker(String marker) { /** * Get the maxResults property: The MaxResults property. - * + * * @return the maxResults value. */ public Integer getMaxResults() { @@ -127,7 +127,7 @@ public Integer getMaxResults() { /** * Set the maxResults property: The MaxResults property. - * + * * @param maxResults the maxResults value to set. * @return the BlobContainersSegment object itself. */ @@ -138,7 +138,7 @@ public BlobContainersSegment setMaxResults(Integer maxResults) { /** * Get the nextMarker property: The NextMarker property. - * + * * @return the nextMarker value. */ public String getNextMarker() { @@ -147,7 +147,7 @@ public String getNextMarker() { /** * Set the nextMarker property: The NextMarker property. - * + * * @param nextMarker the nextMarker value to set. * @return the BlobContainersSegment object itself. */ @@ -158,7 +158,7 @@ public BlobContainersSegment setNextMarker(String nextMarker) { /** * Get the blobContainerItems property: The BlobContainerItems property. - * + * * @return the blobContainerItems value. */ public List getBlobContainerItems() { @@ -170,7 +170,7 @@ public List getBlobContainerItems() { /** * Set the blobContainerItems property: The BlobContainerItems property. - * + * * @param blobContainerItems the blobContainerItems value to set. * @return the BlobContainersSegment object itself. */ @@ -205,7 +205,7 @@ public XmlWriter toXml(XmlWriter xmlWriter, String rootElementName) throws XMLSt /** * Reads an instance of BlobContainersSegment from the XmlReader. - * + * * @param xmlReader The XmlReader being read. * @return An instance of BlobContainersSegment if the XmlReader was pointing to an instance of it, or null if it * was pointing to XML null. @@ -217,7 +217,7 @@ public static BlobContainersSegment fromXml(XmlReader xmlReader) throws XMLStrea /** * Reads an instance of BlobContainersSegment from the XmlReader. - * + * * @param xmlReader The XmlReader being read. * @param rootElementName Optional root element name to override the default defined by the model. Used to support * cases where the model can deserialize from different root element names. diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlobCopySourceTagsMode.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobCopySourceTagsMode.java similarity index 96% rename from sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlobCopySourceTagsMode.java rename to sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobCopySourceTagsMode.java index 79278a06b505..956adffe12f8 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlobCopySourceTagsMode.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobCopySourceTagsMode.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.blob.models; +package com.azure.v2.storage.blob.models; import io.clientcore.core.util.ExpandableEnum; import java.util.Map; @@ -32,7 +32,7 @@ private BlobCopySourceTagsMode(String name) { /** * Creates or finds a BlobCopySourceTagsMode. - * + * * @param name a name to look for. * @return the corresponding BlobCopySourceTagsMode. */ @@ -49,7 +49,7 @@ public static BlobCopySourceTagsMode fromString(String name) { /** * Gets the value of the BlobCopySourceTagsMode instance. - * + * * @return the value of the BlobCopySourceTagsMode instance. */ @Override diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlobCorsRule.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobCorsRule.java similarity index 98% rename from sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlobCorsRule.java rename to sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobCorsRule.java index d1571c086735..e75ae49990ce 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlobCorsRule.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobCorsRule.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.blob.models; +package com.azure.v2.storage.blob.models; import com.azure.core.v2.annotation.Fluent; import com.azure.core.v2.util.CoreUtils; @@ -61,7 +61,7 @@ public BlobCorsRule() { * service via CORS. The origin domain is the domain from which the request originates. Note that the origin must be * an exact case-sensitive match with the origin that the user age sends to the service. You can also use the * wildcard character '*' to allow all origin domains to make requests via CORS. - * + * * @return the allowedOrigins value. */ public String getAllowedOrigins() { @@ -73,7 +73,7 @@ public String getAllowedOrigins() { * service via CORS. The origin domain is the domain from which the request originates. Note that the origin must be * an exact case-sensitive match with the origin that the user age sends to the service. You can also use the * wildcard character '*' to allow all origin domains to make requests via CORS. - * + * * @param allowedOrigins the allowedOrigins value to set. * @return the BlobCorsRule object itself. */ @@ -85,7 +85,7 @@ public BlobCorsRule setAllowedOrigins(String allowedOrigins) { /** * Get the allowedMethods property: The methods (HTTP request verbs) that the origin domain may use for a CORS * request. (comma separated). - * + * * @return the allowedMethods value. */ public String getAllowedMethods() { @@ -95,7 +95,7 @@ public String getAllowedMethods() { /** * Set the allowedMethods property: The methods (HTTP request verbs) that the origin domain may use for a CORS * request. (comma separated). - * + * * @param allowedMethods the allowedMethods value to set. * @return the BlobCorsRule object itself. */ @@ -106,7 +106,7 @@ public BlobCorsRule setAllowedMethods(String allowedMethods) { /** * Get the allowedHeaders property: the request headers that the origin domain may specify on the CORS request. - * + * * @return the allowedHeaders value. */ public String getAllowedHeaders() { @@ -115,7 +115,7 @@ public String getAllowedHeaders() { /** * Set the allowedHeaders property: the request headers that the origin domain may specify on the CORS request. - * + * * @param allowedHeaders the allowedHeaders value to set. * @return the BlobCorsRule object itself. */ @@ -127,7 +127,7 @@ public BlobCorsRule setAllowedHeaders(String allowedHeaders) { /** * Get the exposedHeaders property: The response headers that may be sent in the response to the CORS request and * exposed by the browser to the request issuer. - * + * * @return the exposedHeaders value. */ public String getExposedHeaders() { @@ -137,7 +137,7 @@ public String getExposedHeaders() { /** * Set the exposedHeaders property: The response headers that may be sent in the response to the CORS request and * exposed by the browser to the request issuer. - * + * * @param exposedHeaders the exposedHeaders value to set. * @return the BlobCorsRule object itself. */ @@ -149,7 +149,7 @@ public BlobCorsRule setExposedHeaders(String exposedHeaders) { /** * Get the maxAgeInSeconds property: The maximum amount time that a browser should cache the preflight OPTIONS * request. - * + * * @return the maxAgeInSeconds value. */ public int getMaxAgeInSeconds() { @@ -159,7 +159,7 @@ public int getMaxAgeInSeconds() { /** * Set the maxAgeInSeconds property: The maximum amount time that a browser should cache the preflight OPTIONS * request. - * + * * @param maxAgeInSeconds the maxAgeInSeconds value to set. * @return the BlobCorsRule object itself. */ @@ -187,7 +187,7 @@ 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. @@ -199,7 +199,7 @@ 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. diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlobDeleteType.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobDeleteType.java similarity index 96% rename from sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlobDeleteType.java rename to sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobDeleteType.java index 258cbba8b12b..8b013eadf1f3 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlobDeleteType.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobDeleteType.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.blob.models; +package com.azure.v2.storage.blob.models; import io.clientcore.core.util.ExpandableEnum; import java.util.Map; @@ -27,7 +27,7 @@ private BlobDeleteType(String name) { /** * Creates or finds a BlobDeleteType. - * + * * @param name a name to look for. * @return the corresponding BlobDeleteType. */ @@ -44,7 +44,7 @@ public static BlobDeleteType fromString(String name) { /** * Gets the value of the BlobDeleteType instance. - * + * * @return the value of the BlobDeleteType instance. */ @Override diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlobErrorCode.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobErrorCode.java similarity index 99% rename from sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlobErrorCode.java rename to sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobErrorCode.java index 766cc9ec75e3..78ff93c818bd 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlobErrorCode.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobErrorCode.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.blob.models; +package com.azure.v2.storage.blob.models; import io.clientcore.core.util.ExpandableEnum; import java.util.Map; @@ -624,7 +624,7 @@ private BlobErrorCode(String name) { /** * Creates or finds a BlobErrorCode. - * + * * @param name a name to look for. * @return the corresponding BlobErrorCode. */ @@ -641,7 +641,7 @@ public static BlobErrorCode fromString(String name) { /** * Gets the value of the BlobErrorCode instance. - * + * * @return the value of the BlobErrorCode instance. */ @Override diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlobExpiryOptions.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobExpiryOptions.java similarity index 97% rename from sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlobExpiryOptions.java rename to sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobExpiryOptions.java index 080412d75e2c..c03e82694612 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlobExpiryOptions.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobExpiryOptions.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.blob.models; +package com.azure.v2.storage.blob.models; import io.clientcore.core.util.ExpandableEnum; import java.util.Map; @@ -42,7 +42,7 @@ private BlobExpiryOptions(String name) { /** * Creates or finds a BlobExpiryOptions. - * + * * @param name a name to look for. * @return the corresponding BlobExpiryOptions. */ @@ -59,7 +59,7 @@ public static BlobExpiryOptions fromString(String name) { /** * Gets the value of the BlobExpiryOptions instance. - * + * * @return the value of the BlobExpiryOptions instance. */ @Override diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlobFlatListSegment.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobFlatListSegment.java similarity index 98% rename from sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlobFlatListSegment.java rename to sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobFlatListSegment.java index 0873ed5d0987..aefe881164a9 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlobFlatListSegment.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobFlatListSegment.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.blob.models; +package com.azure.v2.storage.blob.models; import com.azure.core.v2.annotation.Fluent; import com.azure.core.v2.util.CoreUtils; @@ -33,7 +33,7 @@ public BlobFlatListSegment() { /** * Get the blobItems property: The BlobItems property. - * + * * @return the blobItems value. */ public List getBlobItems() { @@ -42,7 +42,7 @@ public List getBlobItems() { /** * Set the blobItems property: The BlobItems property. - * + * * @param blobItems the blobItems value to set. * @return the BlobFlatListSegment object itself. */ @@ -70,7 +70,7 @@ public XmlWriter toXml(XmlWriter xmlWriter, String rootElementName) throws XMLSt /** * 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. @@ -82,7 +82,7 @@ public static BlobFlatListSegment fromXml(XmlReader xmlReader) throws XMLStreamE /** * 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. diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlobHierarchyListSegment.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobHierarchyListSegment.java similarity index 98% rename from sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlobHierarchyListSegment.java rename to sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobHierarchyListSegment.java index f24505596eb5..e5eef3717714 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlobHierarchyListSegment.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobHierarchyListSegment.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.blob.models; +package com.azure.v2.storage.blob.models; import com.azure.core.v2.annotation.Fluent; import com.azure.core.v2.util.CoreUtils; @@ -38,7 +38,7 @@ public BlobHierarchyListSegment() { /** * Get the blobPrefixes property: The BlobPrefixes property. - * + * * @return the blobPrefixes value. */ public List getBlobPrefixes() { @@ -47,7 +47,7 @@ public List getBlobPrefixes() { /** * Set the blobPrefixes property: The BlobPrefixes property. - * + * * @param blobPrefixes the blobPrefixes value to set. * @return the BlobHierarchyListSegment object itself. */ @@ -58,7 +58,7 @@ public BlobHierarchyListSegment setBlobPrefixes(List blobPre /** * Get the blobItems property: The BlobItems property. - * + * * @return the blobItems value. */ public List getBlobItems() { @@ -67,7 +67,7 @@ public List getBlobItems() { /** * Set the blobItems property: The BlobItems property. - * + * * @param blobItems the blobItems value to set. * @return the BlobHierarchyListSegment object itself. */ @@ -100,7 +100,7 @@ public XmlWriter toXml(XmlWriter xmlWriter, String rootElementName) throws XMLSt /** * Reads an instance of BlobHierarchyListSegment from the XmlReader. - * + * * @param xmlReader The XmlReader being read. * @return An instance of BlobHierarchyListSegment if the XmlReader was pointing to an instance of it, or null if it * was pointing to XML null. @@ -112,7 +112,7 @@ public static BlobHierarchyListSegment fromXml(XmlReader xmlReader) throws XMLSt /** * Reads an instance of BlobHierarchyListSegment from the XmlReader. - * + * * @param xmlReader The XmlReader being read. * @param rootElementName Optional root element name to override the default defined by the model. Used to support * cases where the model can deserialize from different root element names. diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlobHttpHeaders.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobHttpHeaders.java similarity index 97% rename from sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlobHttpHeaders.java rename to sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobHttpHeaders.java index 4c76fd93dcc9..8e2fa808854c 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlobHttpHeaders.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobHttpHeaders.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.blob.models; +package com.azure.v2.storage.blob.models; import com.azure.core.v2.annotation.Fluent; import com.azure.core.v2.util.CoreUtils; @@ -57,7 +57,7 @@ public BlobHttpHeaders() { /** * Get the cacheControl property: Optional. Sets the blob's cache control. If specified, this property is stored * with the blob and returned with a read request. - * + * * @return the cacheControl value. */ public String getCacheControl() { @@ -67,7 +67,7 @@ public String getCacheControl() { /** * Set the cacheControl property: Optional. Sets the blob's cache control. If specified, this property is stored * with the blob and returned with a read request. - * + * * @param cacheControl the cacheControl value to set. * @return the BlobHttpHeaders object itself. */ @@ -79,7 +79,7 @@ public BlobHttpHeaders setCacheControl(String cacheControl) { /** * Get the contentType property: Optional. Sets the blob's content type. If specified, this property is stored with * the blob and returned with a read request. - * + * * @return the contentType value. */ public String getContentType() { @@ -89,7 +89,7 @@ public String getContentType() { /** * Set the contentType property: Optional. Sets the blob's content type. If specified, this property is stored with * the blob and returned with a read request. - * + * * @param contentType the contentType value to set. * @return the BlobHttpHeaders object itself. */ @@ -102,7 +102,7 @@ public BlobHttpHeaders setContentType(String contentType) { * Get the contentMd5 property: Optional. An MD5 hash of the blob content. Note that this hash is not validated, as * the hashes for the individual blocks were validated when each was uploaded. The value does not need to be base64 * encoded as the SDK will perform the encoding. - * + * * @return the contentMd5 value. */ public byte[] getContentMd5() { @@ -113,7 +113,7 @@ public byte[] getContentMd5() { * Set the contentMd5 property: Optional. An MD5 hash of the blob content. Note that this hash is not validated, as * the hashes for the individual blocks were validated when each was uploaded. The value does not need to be base64 * encoded as the SDK will perform the encoding. - * + * * @param contentMd5 the contentMd5 value to set. * @return the BlobHttpHeaders object itself. */ @@ -125,7 +125,7 @@ public BlobHttpHeaders setContentMd5(byte[] contentMd5) { /** * Get the contentEncoding property: Optional. Sets the blob's content encoding. If specified, this property is * stored with the blob and returned with a read request. - * + * * @return the contentEncoding value. */ public String getContentEncoding() { @@ -135,7 +135,7 @@ public String getContentEncoding() { /** * Set the contentEncoding property: Optional. Sets the blob's content encoding. If specified, this property is * stored with the blob and returned with a read request. - * + * * @param contentEncoding the contentEncoding value to set. * @return the BlobHttpHeaders object itself. */ @@ -147,7 +147,7 @@ public BlobHttpHeaders setContentEncoding(String contentEncoding) { /** * Get the contentLanguage property: Optional. Set the blob's content language. If specified, this property is * stored with the blob and returned with a read request. - * + * * @return the contentLanguage value. */ public String getContentLanguage() { @@ -157,7 +157,7 @@ public String getContentLanguage() { /** * Set the contentLanguage property: Optional. Set the blob's content language. If specified, this property is * stored with the blob and returned with a read request. - * + * * @param contentLanguage the contentLanguage value to set. * @return the BlobHttpHeaders object itself. */ @@ -168,7 +168,7 @@ public BlobHttpHeaders setContentLanguage(String contentLanguage) { /** * Get the contentDisposition property: Optional. Sets the blob's Content-Disposition header. - * + * * @return the contentDisposition value. */ public String getContentDisposition() { @@ -177,7 +177,7 @@ public String getContentDisposition() { /** * Set the contentDisposition property: Optional. Sets the blob's Content-Disposition header. - * + * * @param contentDisposition the contentDisposition value to set. * @return the BlobHttpHeaders object itself. */ diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlobImmutabilityPolicyMode.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobImmutabilityPolicyMode.java similarity index 96% rename from sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlobImmutabilityPolicyMode.java rename to sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobImmutabilityPolicyMode.java index cdbf65dad1d0..223500dacd8e 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlobImmutabilityPolicyMode.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobImmutabilityPolicyMode.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.blob.models; +package com.azure.v2.storage.blob.models; /** * Defines values for BlobImmutabilityPolicyMode. @@ -34,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-v2/src/main/java/com/azure/storage/blob/models/BlobItemInternal.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobItemInternal.java similarity index 98% rename from sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlobItemInternal.java rename to sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobItemInternal.java index 40ce02defc28..d37f51814532 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlobItemInternal.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobItemInternal.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.blob.models; +package com.azure.v2.storage.blob.models; import com.azure.core.v2.annotation.Fluent; import com.azure.core.v2.util.CoreUtils; @@ -83,7 +83,7 @@ public BlobItemInternal() { /** * Get the name property: The Name property. - * + * * @return the name value. */ public BlobName getName() { @@ -92,7 +92,7 @@ public BlobName getName() { /** * Set the name property: The Name property. - * + * * @param name the name value to set. * @return the BlobItemInternal object itself. */ @@ -103,7 +103,7 @@ public BlobItemInternal setName(BlobName name) { /** * Get the deleted property: The Deleted property. - * + * * @return the deleted value. */ public boolean isDeleted() { @@ -112,7 +112,7 @@ public boolean isDeleted() { /** * Set the deleted property: The Deleted property. - * + * * @param deleted the deleted value to set. * @return the BlobItemInternal object itself. */ @@ -123,7 +123,7 @@ public BlobItemInternal setDeleted(boolean deleted) { /** * Get the snapshot property: The Snapshot property. - * + * * @return the snapshot value. */ public String getSnapshot() { @@ -132,7 +132,7 @@ public String getSnapshot() { /** * Set the snapshot property: The Snapshot property. - * + * * @param snapshot the snapshot value to set. * @return the BlobItemInternal object itself. */ @@ -143,7 +143,7 @@ public BlobItemInternal setSnapshot(String snapshot) { /** * Get the versionId property: The VersionId property. - * + * * @return the versionId value. */ public String getVersionId() { @@ -152,7 +152,7 @@ public String getVersionId() { /** * Set the versionId property: The VersionId property. - * + * * @param versionId the versionId value to set. * @return the BlobItemInternal object itself. */ @@ -163,7 +163,7 @@ public BlobItemInternal setVersionId(String versionId) { /** * Get the isCurrentVersion property: The IsCurrentVersion property. - * + * * @return the isCurrentVersion value. */ public Boolean isCurrentVersion() { @@ -172,7 +172,7 @@ public Boolean isCurrentVersion() { /** * Set the isCurrentVersion property: The IsCurrentVersion property. - * + * * @param isCurrentVersion the isCurrentVersion value to set. * @return the BlobItemInternal object itself. */ @@ -183,7 +183,7 @@ public BlobItemInternal setIsCurrentVersion(Boolean isCurrentVersion) { /** * Get the properties property: Properties of a blob. - * + * * @return the properties value. */ public BlobItemPropertiesInternal getProperties() { @@ -192,7 +192,7 @@ public BlobItemPropertiesInternal getProperties() { /** * Set the properties property: Properties of a blob. - * + * * @param properties the properties value to set. * @return the BlobItemInternal object itself. */ @@ -203,7 +203,7 @@ public BlobItemInternal setProperties(BlobItemPropertiesInternal properties) { /** * Get the metadata property: Dictionary of <string>. - * + * * @return the metadata value. */ public Map getMetadata() { @@ -212,7 +212,7 @@ public Map getMetadata() { /** * Set the metadata property: Dictionary of <string>. - * + * * @param metadata the metadata value to set. * @return the BlobItemInternal object itself. */ @@ -223,7 +223,7 @@ public BlobItemInternal setMetadata(Map metadata) { /** * Get the blobTags property: Blob tags. - * + * * @return the blobTags value. */ public BlobTags getBlobTags() { @@ -232,7 +232,7 @@ public BlobTags getBlobTags() { /** * Set the blobTags property: Blob tags. - * + * * @param blobTags the blobTags value to set. * @return the BlobItemInternal object itself. */ @@ -243,7 +243,7 @@ public BlobItemInternal setBlobTags(BlobTags blobTags) { /** * Get the objectReplicationMetadata property: Dictionary of <string>. - * + * * @return the objectReplicationMetadata value. */ public Map getObjectReplicationMetadata() { @@ -252,7 +252,7 @@ public Map getObjectReplicationMetadata() { /** * Set the objectReplicationMetadata property: Dictionary of <string>. - * + * * @param objectReplicationMetadata the objectReplicationMetadata value to set. * @return the BlobItemInternal object itself. */ @@ -263,7 +263,7 @@ public BlobItemInternal setObjectReplicationMetadata(Map objectR /** * Get the hasVersionsOnly property: The HasVersionsOnly property. - * + * * @return the hasVersionsOnly value. */ public Boolean isHasVersionsOnly() { @@ -272,7 +272,7 @@ public Boolean isHasVersionsOnly() { /** * Set the hasVersionsOnly property: The HasVersionsOnly property. - * + * * @param hasVersionsOnly the hasVersionsOnly value to set. * @return the BlobItemInternal object itself. */ @@ -283,7 +283,7 @@ public BlobItemInternal setHasVersionsOnly(Boolean hasVersionsOnly) { /** * Get the isPrefix property: The IsPrefix property. - * + * * @return the isPrefix value. */ public Boolean isPrefix() { @@ -292,7 +292,7 @@ public Boolean isPrefix() { /** * Set the isPrefix property: The IsPrefix property. - * + * * @param isPrefix the isPrefix value to set. * @return the BlobItemInternal object itself. */ @@ -338,7 +338,7 @@ public XmlWriter toXml(XmlWriter xmlWriter, String rootElementName) throws XMLSt /** * 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. @@ -350,7 +350,7 @@ 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. diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlobItemPropertiesInternal.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobItemPropertiesInternal.java similarity index 98% rename from sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlobItemPropertiesInternal.java rename to sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobItemPropertiesInternal.java index c982597df4a6..9e2feb3765d8 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlobItemPropertiesInternal.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobItemPropertiesInternal.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.blob.models; +package com.azure.v2.storage.blob.models; import com.azure.core.v2.annotation.Fluent; import com.azure.core.v2.util.CoreUtils; @@ -230,7 +230,7 @@ public BlobItemPropertiesInternal() { /** * Get the creationTime property: The Creation-Time property. - * + * * @return the creationTime value. */ public OffsetDateTime getCreationTime() { @@ -242,7 +242,7 @@ public OffsetDateTime getCreationTime() { /** * Set the creationTime property: The Creation-Time property. - * + * * @param creationTime the creationTime value to set. * @return the BlobItemPropertiesInternal object itself. */ @@ -257,7 +257,7 @@ public BlobItemPropertiesInternal setCreationTime(OffsetDateTime creationTime) { /** * Get the lastModified property: The Last-Modified property. - * + * * @return the lastModified value. */ public OffsetDateTime getLastModified() { @@ -269,7 +269,7 @@ public OffsetDateTime getLastModified() { /** * Set the lastModified property: The Last-Modified property. - * + * * @param lastModified the lastModified value to set. * @return the BlobItemPropertiesInternal object itself. */ @@ -284,7 +284,7 @@ public BlobItemPropertiesInternal setLastModified(OffsetDateTime lastModified) { /** * Get the eTag property: The Etag property. - * + * * @return the eTag value. */ public String getETag() { @@ -293,7 +293,7 @@ public String getETag() { /** * Set the eTag property: The Etag property. - * + * * @param eTag the eTag value to set. * @return the BlobItemPropertiesInternal object itself. */ @@ -304,7 +304,7 @@ public BlobItemPropertiesInternal setETag(String eTag) { /** * Get the contentLength property: Size in bytes. - * + * * @return the contentLength value. */ public Long getContentLength() { @@ -313,7 +313,7 @@ public Long getContentLength() { /** * Set the contentLength property: Size in bytes. - * + * * @param contentLength the contentLength value to set. * @return the BlobItemPropertiesInternal object itself. */ @@ -324,7 +324,7 @@ public BlobItemPropertiesInternal setContentLength(Long contentLength) { /** * Get the contentType property: The Content-Type property. - * + * * @return the contentType value. */ public String getContentType() { @@ -333,7 +333,7 @@ public String getContentType() { /** * Set the contentType property: The Content-Type property. - * + * * @param contentType the contentType value to set. * @return the BlobItemPropertiesInternal object itself. */ @@ -344,7 +344,7 @@ public BlobItemPropertiesInternal setContentType(String contentType) { /** * Get the contentEncoding property: The Content-Encoding property. - * + * * @return the contentEncoding value. */ public String getContentEncoding() { @@ -353,7 +353,7 @@ public String getContentEncoding() { /** * Set the contentEncoding property: The Content-Encoding property. - * + * * @param contentEncoding the contentEncoding value to set. * @return the BlobItemPropertiesInternal object itself. */ @@ -364,7 +364,7 @@ public BlobItemPropertiesInternal setContentEncoding(String contentEncoding) { /** * Get the contentLanguage property: The Content-Language property. - * + * * @return the contentLanguage value. */ public String getContentLanguage() { @@ -373,7 +373,7 @@ public String getContentLanguage() { /** * Set the contentLanguage property: The Content-Language property. - * + * * @param contentLanguage the contentLanguage value to set. * @return the BlobItemPropertiesInternal object itself. */ @@ -384,7 +384,7 @@ public BlobItemPropertiesInternal setContentLanguage(String contentLanguage) { /** * Get the contentMd5 property: The Content-MD5 property. - * + * * @return the contentMd5 value. */ public byte[] getContentMd5() { @@ -393,7 +393,7 @@ public byte[] getContentMd5() { /** * Set the contentMd5 property: The Content-MD5 property. - * + * * @param contentMd5 the contentMd5 value to set. * @return the BlobItemPropertiesInternal object itself. */ @@ -404,7 +404,7 @@ public BlobItemPropertiesInternal setContentMd5(byte[] contentMd5) { /** * Get the contentDisposition property: The Content-Disposition property. - * + * * @return the contentDisposition value. */ public String getContentDisposition() { @@ -413,7 +413,7 @@ public String getContentDisposition() { /** * Set the contentDisposition property: The Content-Disposition property. - * + * * @param contentDisposition the contentDisposition value to set. * @return the BlobItemPropertiesInternal object itself. */ @@ -424,7 +424,7 @@ public BlobItemPropertiesInternal setContentDisposition(String contentDispositio /** * Get the cacheControl property: The Cache-Control property. - * + * * @return the cacheControl value. */ public String getCacheControl() { @@ -433,7 +433,7 @@ public String getCacheControl() { /** * Set the cacheControl property: The Cache-Control property. - * + * * @param cacheControl the cacheControl value to set. * @return the BlobItemPropertiesInternal object itself. */ @@ -444,7 +444,7 @@ public BlobItemPropertiesInternal setCacheControl(String cacheControl) { /** * Get the blobSequenceNumber property: The x-ms-blob-sequence-number property. - * + * * @return the blobSequenceNumber value. */ public Long getBlobSequenceNumber() { @@ -453,7 +453,7 @@ public Long getBlobSequenceNumber() { /** * Set the blobSequenceNumber property: The x-ms-blob-sequence-number property. - * + * * @param blobSequenceNumber the blobSequenceNumber value to set. * @return the BlobItemPropertiesInternal object itself. */ @@ -464,7 +464,7 @@ public BlobItemPropertiesInternal setBlobSequenceNumber(Long blobSequenceNumber) /** * Get the blobType property: The BlobType property. - * + * * @return the blobType value. */ public BlobType getBlobType() { @@ -473,7 +473,7 @@ public BlobType getBlobType() { /** * Set the blobType property: The BlobType property. - * + * * @param blobType the blobType value to set. * @return the BlobItemPropertiesInternal object itself. */ @@ -484,7 +484,7 @@ public BlobItemPropertiesInternal setBlobType(BlobType blobType) { /** * Get the leaseStatus property: The LeaseStatus property. - * + * * @return the leaseStatus value. */ public LeaseStatusType getLeaseStatus() { @@ -493,7 +493,7 @@ public LeaseStatusType getLeaseStatus() { /** * Set the leaseStatus property: The LeaseStatus property. - * + * * @param leaseStatus the leaseStatus value to set. * @return the BlobItemPropertiesInternal object itself. */ @@ -504,7 +504,7 @@ public BlobItemPropertiesInternal setLeaseStatus(LeaseStatusType leaseStatus) { /** * Get the leaseState property: The LeaseState property. - * + * * @return the leaseState value. */ public LeaseStateType getLeaseState() { @@ -513,7 +513,7 @@ public LeaseStateType getLeaseState() { /** * Set the leaseState property: The LeaseState property. - * + * * @param leaseState the leaseState value to set. * @return the BlobItemPropertiesInternal object itself. */ @@ -524,7 +524,7 @@ public BlobItemPropertiesInternal setLeaseState(LeaseStateType leaseState) { /** * Get the leaseDuration property: The LeaseDuration property. - * + * * @return the leaseDuration value. */ public LeaseDurationType getLeaseDuration() { @@ -533,7 +533,7 @@ public LeaseDurationType getLeaseDuration() { /** * Set the leaseDuration property: The LeaseDuration property. - * + * * @param leaseDuration the leaseDuration value to set. * @return the BlobItemPropertiesInternal object itself. */ @@ -544,7 +544,7 @@ public BlobItemPropertiesInternal setLeaseDuration(LeaseDurationType leaseDurati /** * Get the copyId property: The CopyId property. - * + * * @return the copyId value. */ public String getCopyId() { @@ -553,7 +553,7 @@ public String getCopyId() { /** * Set the copyId property: The CopyId property. - * + * * @param copyId the copyId value to set. * @return the BlobItemPropertiesInternal object itself. */ @@ -564,7 +564,7 @@ public BlobItemPropertiesInternal setCopyId(String copyId) { /** * Get the copyStatus property: The CopyStatus property. - * + * * @return the copyStatus value. */ public CopyStatusType getCopyStatus() { @@ -573,7 +573,7 @@ public CopyStatusType getCopyStatus() { /** * Set the copyStatus property: The CopyStatus property. - * + * * @param copyStatus the copyStatus value to set. * @return the BlobItemPropertiesInternal object itself. */ @@ -584,7 +584,7 @@ public BlobItemPropertiesInternal setCopyStatus(CopyStatusType copyStatus) { /** * Get the copySource property: The CopySource property. - * + * * @return the copySource value. */ public String getCopySource() { @@ -593,7 +593,7 @@ public String getCopySource() { /** * Set the copySource property: The CopySource property. - * + * * @param copySource the copySource value to set. * @return the BlobItemPropertiesInternal object itself. */ @@ -604,7 +604,7 @@ public BlobItemPropertiesInternal setCopySource(String copySource) { /** * Get the copyProgress property: The CopyProgress property. - * + * * @return the copyProgress value. */ public String getCopyProgress() { @@ -613,7 +613,7 @@ public String getCopyProgress() { /** * Set the copyProgress property: The CopyProgress property. - * + * * @param copyProgress the copyProgress value to set. * @return the BlobItemPropertiesInternal object itself. */ @@ -624,7 +624,7 @@ public BlobItemPropertiesInternal setCopyProgress(String copyProgress) { /** * Get the copyCompletionTime property: The CopyCompletionTime property. - * + * * @return the copyCompletionTime value. */ public OffsetDateTime getCopyCompletionTime() { @@ -636,7 +636,7 @@ public OffsetDateTime getCopyCompletionTime() { /** * Set the copyCompletionTime property: The CopyCompletionTime property. - * + * * @param copyCompletionTime the copyCompletionTime value to set. * @return the BlobItemPropertiesInternal object itself. */ @@ -651,7 +651,7 @@ public BlobItemPropertiesInternal setCopyCompletionTime(OffsetDateTime copyCompl /** * Get the copyStatusDescription property: The CopyStatusDescription property. - * + * * @return the copyStatusDescription value. */ public String getCopyStatusDescription() { @@ -660,7 +660,7 @@ public String getCopyStatusDescription() { /** * Set the copyStatusDescription property: The CopyStatusDescription property. - * + * * @param copyStatusDescription the copyStatusDescription value to set. * @return the BlobItemPropertiesInternal object itself. */ @@ -671,7 +671,7 @@ public BlobItemPropertiesInternal setCopyStatusDescription(String copyStatusDesc /** * Get the serverEncrypted property: The ServerEncrypted property. - * + * * @return the serverEncrypted value. */ public Boolean isServerEncrypted() { @@ -680,7 +680,7 @@ public Boolean isServerEncrypted() { /** * Set the serverEncrypted property: The ServerEncrypted property. - * + * * @param serverEncrypted the serverEncrypted value to set. * @return the BlobItemPropertiesInternal object itself. */ @@ -691,7 +691,7 @@ public BlobItemPropertiesInternal setServerEncrypted(Boolean serverEncrypted) { /** * Get the incrementalCopy property: The IncrementalCopy property. - * + * * @return the incrementalCopy value. */ public Boolean isIncrementalCopy() { @@ -700,7 +700,7 @@ public Boolean isIncrementalCopy() { /** * Set the incrementalCopy property: The IncrementalCopy property. - * + * * @param incrementalCopy the incrementalCopy value to set. * @return the BlobItemPropertiesInternal object itself. */ @@ -711,7 +711,7 @@ public BlobItemPropertiesInternal setIncrementalCopy(Boolean incrementalCopy) { /** * Get the destinationSnapshot property: The DestinationSnapshot property. - * + * * @return the destinationSnapshot value. */ public String getDestinationSnapshot() { @@ -720,7 +720,7 @@ public String getDestinationSnapshot() { /** * Set the destinationSnapshot property: The DestinationSnapshot property. - * + * * @param destinationSnapshot the destinationSnapshot value to set. * @return the BlobItemPropertiesInternal object itself. */ @@ -731,7 +731,7 @@ public BlobItemPropertiesInternal setDestinationSnapshot(String destinationSnaps /** * Get the deletedTime property: The DeletedTime property. - * + * * @return the deletedTime value. */ public OffsetDateTime getDeletedTime() { @@ -743,7 +743,7 @@ public OffsetDateTime getDeletedTime() { /** * Set the deletedTime property: The DeletedTime property. - * + * * @param deletedTime the deletedTime value to set. * @return the BlobItemPropertiesInternal object itself. */ @@ -758,7 +758,7 @@ public BlobItemPropertiesInternal setDeletedTime(OffsetDateTime deletedTime) { /** * Get the remainingRetentionDays property: The RemainingRetentionDays property. - * + * * @return the remainingRetentionDays value. */ public Integer getRemainingRetentionDays() { @@ -767,7 +767,7 @@ public Integer getRemainingRetentionDays() { /** * Set the remainingRetentionDays property: The RemainingRetentionDays property. - * + * * @param remainingRetentionDays the remainingRetentionDays value to set. * @return the BlobItemPropertiesInternal object itself. */ @@ -778,7 +778,7 @@ public BlobItemPropertiesInternal setRemainingRetentionDays(Integer remainingRet /** * Get the accessTier property: The AccessTier property. - * + * * @return the accessTier value. */ public AccessTier getAccessTier() { @@ -787,7 +787,7 @@ public AccessTier getAccessTier() { /** * Set the accessTier property: The AccessTier property. - * + * * @param accessTier the accessTier value to set. * @return the BlobItemPropertiesInternal object itself. */ @@ -798,7 +798,7 @@ public BlobItemPropertiesInternal setAccessTier(AccessTier accessTier) { /** * Get the accessTierInferred property: The AccessTierInferred property. - * + * * @return the accessTierInferred value. */ public Boolean isAccessTierInferred() { @@ -807,7 +807,7 @@ public Boolean isAccessTierInferred() { /** * Set the accessTierInferred property: The AccessTierInferred property. - * + * * @param accessTierInferred the accessTierInferred value to set. * @return the BlobItemPropertiesInternal object itself. */ @@ -818,7 +818,7 @@ public BlobItemPropertiesInternal setAccessTierInferred(Boolean accessTierInferr /** * Get the archiveStatus property: The ArchiveStatus property. - * + * * @return the archiveStatus value. */ public ArchiveStatus getArchiveStatus() { @@ -827,7 +827,7 @@ public ArchiveStatus getArchiveStatus() { /** * Set the archiveStatus property: The ArchiveStatus property. - * + * * @param archiveStatus the archiveStatus value to set. * @return the BlobItemPropertiesInternal object itself. */ @@ -838,7 +838,7 @@ public BlobItemPropertiesInternal setArchiveStatus(ArchiveStatus archiveStatus) /** * Get the customerProvidedKeySha256 property: The CustomerProvidedKeySha256 property. - * + * * @return the customerProvidedKeySha256 value. */ public String getCustomerProvidedKeySha256() { @@ -847,7 +847,7 @@ public String getCustomerProvidedKeySha256() { /** * Set the customerProvidedKeySha256 property: The CustomerProvidedKeySha256 property. - * + * * @param customerProvidedKeySha256 the customerProvidedKeySha256 value to set. * @return the BlobItemPropertiesInternal object itself. */ @@ -858,7 +858,7 @@ public BlobItemPropertiesInternal setCustomerProvidedKeySha256(String customerPr /** * Get the encryptionScope property: The name of the encryption scope under which the blob is encrypted. - * + * * @return the encryptionScope value. */ public String getEncryptionScope() { @@ -867,7 +867,7 @@ public String getEncryptionScope() { /** * Set the encryptionScope property: The name of the encryption scope under which the blob is encrypted. - * + * * @param encryptionScope the encryptionScope value to set. * @return the BlobItemPropertiesInternal object itself. */ @@ -878,7 +878,7 @@ public BlobItemPropertiesInternal setEncryptionScope(String encryptionScope) { /** * Get the accessTierChangeTime property: The AccessTierChangeTime property. - * + * * @return the accessTierChangeTime value. */ public OffsetDateTime getAccessTierChangeTime() { @@ -890,7 +890,7 @@ public OffsetDateTime getAccessTierChangeTime() { /** * Set the accessTierChangeTime property: The AccessTierChangeTime property. - * + * * @param accessTierChangeTime the accessTierChangeTime value to set. * @return the BlobItemPropertiesInternal object itself. */ @@ -905,7 +905,7 @@ public BlobItemPropertiesInternal setAccessTierChangeTime(OffsetDateTime accessT /** * Get the tagCount property: The TagCount property. - * + * * @return the tagCount value. */ public Integer getTagCount() { @@ -914,7 +914,7 @@ public Integer getTagCount() { /** * Set the tagCount property: The TagCount property. - * + * * @param tagCount the tagCount value to set. * @return the BlobItemPropertiesInternal object itself. */ @@ -925,7 +925,7 @@ public BlobItemPropertiesInternal setTagCount(Integer tagCount) { /** * Get the expiresOn property: The Expiry-Time property. - * + * * @return the expiresOn value. */ public OffsetDateTime getExpiresOn() { @@ -937,7 +937,7 @@ public OffsetDateTime getExpiresOn() { /** * Set the expiresOn property: The Expiry-Time property. - * + * * @param expiresOn the expiresOn value to set. * @return the BlobItemPropertiesInternal object itself. */ @@ -952,7 +952,7 @@ public BlobItemPropertiesInternal setExpiresOn(OffsetDateTime expiresOn) { /** * Get the isSealed property: The Sealed property. - * + * * @return the isSealed value. */ public Boolean isSealed() { @@ -961,7 +961,7 @@ public Boolean isSealed() { /** * Set the isSealed property: The Sealed property. - * + * * @param isSealed the isSealed value to set. * @return the BlobItemPropertiesInternal object itself. */ @@ -973,7 +973,7 @@ public BlobItemPropertiesInternal setIsSealed(Boolean isSealed) { /** * Get the rehydratePriority property: If an object is in rehydrate pending state then this header is returned with * priority of rehydrate. Valid values are High and Standard. - * + * * @return the rehydratePriority value. */ public RehydratePriority getRehydratePriority() { @@ -983,7 +983,7 @@ public RehydratePriority getRehydratePriority() { /** * Set the rehydratePriority property: If an object is in rehydrate pending state then this header is returned with * priority of rehydrate. Valid values are High and Standard. - * + * * @param rehydratePriority the rehydratePriority value to set. * @return the BlobItemPropertiesInternal object itself. */ @@ -994,7 +994,7 @@ public BlobItemPropertiesInternal setRehydratePriority(RehydratePriority rehydra /** * Get the lastAccessedOn property: The LastAccessTime property. - * + * * @return the lastAccessedOn value. */ public OffsetDateTime getLastAccessedOn() { @@ -1006,7 +1006,7 @@ public OffsetDateTime getLastAccessedOn() { /** * Set the lastAccessedOn property: The LastAccessTime property. - * + * * @param lastAccessedOn the lastAccessedOn value to set. * @return the BlobItemPropertiesInternal object itself. */ @@ -1021,7 +1021,7 @@ public BlobItemPropertiesInternal setLastAccessedOn(OffsetDateTime lastAccessedO /** * Get the immutabilityPolicyExpiresOn property: The ImmutabilityPolicyUntilDate property. - * + * * @return the immutabilityPolicyExpiresOn value. */ public OffsetDateTime getImmutabilityPolicyExpiresOn() { @@ -1033,7 +1033,7 @@ public OffsetDateTime getImmutabilityPolicyExpiresOn() { /** * Set the immutabilityPolicyExpiresOn property: The ImmutabilityPolicyUntilDate property. - * + * * @param immutabilityPolicyExpiresOn the immutabilityPolicyExpiresOn value to set. * @return the BlobItemPropertiesInternal object itself. */ @@ -1048,7 +1048,7 @@ public BlobItemPropertiesInternal setImmutabilityPolicyExpiresOn(OffsetDateTime /** * Get the immutabilityPolicyMode property: The ImmutabilityPolicyMode property. - * + * * @return the immutabilityPolicyMode value. */ public BlobImmutabilityPolicyMode getImmutabilityPolicyMode() { @@ -1057,7 +1057,7 @@ public BlobImmutabilityPolicyMode getImmutabilityPolicyMode() { /** * Set the immutabilityPolicyMode property: The ImmutabilityPolicyMode property. - * + * * @param immutabilityPolicyMode the immutabilityPolicyMode value to set. * @return the BlobItemPropertiesInternal object itself. */ @@ -1068,7 +1068,7 @@ public BlobItemPropertiesInternal setImmutabilityPolicyMode(BlobImmutabilityPoli /** * Get the legalHold property: The LegalHold property. - * + * * @return the legalHold value. */ public Boolean isLegalHold() { @@ -1077,7 +1077,7 @@ public Boolean isLegalHold() { /** * Set the legalHold property: The LegalHold property. - * + * * @param legalHold the legalHold value to set. * @return the BlobItemPropertiesInternal object itself. */ @@ -1145,7 +1145,7 @@ 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. @@ -1157,7 +1157,7 @@ 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. diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlobMetrics.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobMetrics.java similarity index 98% rename from sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlobMetrics.java rename to sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobMetrics.java index f2567916d54d..9a130c54fa6a 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlobMetrics.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobMetrics.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.blob.models; +package com.azure.v2.storage.blob.models; import com.azure.core.v2.annotation.Fluent; import com.azure.core.v2.util.CoreUtils; @@ -46,7 +46,7 @@ public BlobMetrics() { /** * Get the version property: The version of Storage Analytics to configure. - * + * * @return the version value. */ public String getVersion() { @@ -55,7 +55,7 @@ public String getVersion() { /** * Set the version property: The version of Storage Analytics to configure. - * + * * @param version the version value to set. * @return the BlobMetrics object itself. */ @@ -66,7 +66,7 @@ public BlobMetrics setVersion(String version) { /** * Get the enabled property: Indicates whether metrics are enabled for the Blob service. - * + * * @return the enabled value. */ public boolean isEnabled() { @@ -75,7 +75,7 @@ public boolean isEnabled() { /** * Set the enabled property: Indicates whether metrics are enabled for the Blob service. - * + * * @param enabled the enabled value to set. * @return the BlobMetrics object itself. */ @@ -87,7 +87,7 @@ public BlobMetrics setEnabled(boolean enabled) { /** * Get the includeApis property: Indicates whether metrics should generate summary statistics for called API * operations. - * + * * @return the includeApis value. */ public Boolean isIncludeApis() { @@ -97,7 +97,7 @@ public Boolean isIncludeApis() { /** * Set the includeApis property: Indicates whether metrics should generate summary statistics for called API * operations. - * + * * @param includeApis the includeApis value to set. * @return the BlobMetrics object itself. */ @@ -109,7 +109,7 @@ public BlobMetrics setIncludeApis(Boolean includeApis) { /** * Get the retentionPolicy property: the retention policy which determines how long the associated data should * persist. - * + * * @return the retentionPolicy value. */ public BlobRetentionPolicy getRetentionPolicy() { @@ -119,7 +119,7 @@ public BlobRetentionPolicy getRetentionPolicy() { /** * Set the retentionPolicy property: the retention policy which determines how long the associated data should * persist. - * + * * @param retentionPolicy the retentionPolicy value to set. * @return the BlobMetrics object itself. */ @@ -146,7 +146,7 @@ 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. @@ -158,7 +158,7 @@ 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. diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlobName.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobName.java similarity index 97% rename from sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlobName.java rename to sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobName.java index df9054ccb3c3..58f2910e96d7 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlobName.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobName.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.blob.models; +package com.azure.v2.storage.blob.models; import com.azure.core.v2.annotation.Fluent; import com.azure.core.v2.util.CoreUtils; @@ -34,7 +34,7 @@ public BlobName() { /** * Get the encoded property: Indicates if the blob name is encoded. - * + * * @return the encoded value. */ public Boolean isEncoded() { @@ -43,7 +43,7 @@ public Boolean isEncoded() { /** * Set the encoded property: Indicates if the blob name is encoded. - * + * * @param encoded the encoded value to set. * @return the BlobName object itself. */ @@ -54,7 +54,7 @@ public BlobName setEncoded(Boolean encoded) { /** * Get the content property: The name of the blob. - * + * * @return the content value. */ public String getContent() { @@ -63,7 +63,7 @@ public String getContent() { /** * Set the content property: The name of the blob. - * + * * @param content the content value to set. * @return the BlobName object itself. */ @@ -88,7 +88,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. @@ -100,7 +100,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. diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlobPrefixInternal.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobPrefixInternal.java similarity index 98% rename from sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlobPrefixInternal.java rename to sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobPrefixInternal.java index 22bee2dde06a..6ffc0f74d9a0 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlobPrefixInternal.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobPrefixInternal.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.blob.models; +package com.azure.v2.storage.blob.models; import com.azure.core.v2.annotation.Fluent; import com.azure.core.v2.util.CoreUtils; @@ -31,7 +31,7 @@ public BlobPrefixInternal() { /** * Get the name property: The Name property. - * + * * @return the name value. */ public BlobName getName() { @@ -40,7 +40,7 @@ public BlobName getName() { /** * Set the name property: The Name property. - * + * * @param name the name value to set. * @return the BlobPrefixInternal object itself. */ @@ -64,7 +64,7 @@ public XmlWriter toXml(XmlWriter xmlWriter, String rootElementName) throws XMLSt /** * Reads an instance of BlobPrefixInternal from the XmlReader. - * + * * @param xmlReader The XmlReader being read. * @return An instance of BlobPrefixInternal if the XmlReader was pointing to an instance of it, or null if it was * pointing to XML null. @@ -76,7 +76,7 @@ public static BlobPrefixInternal fromXml(XmlReader xmlReader) throws XMLStreamEx /** * Reads an instance of BlobPrefixInternal from the XmlReader. - * + * * @param xmlReader The XmlReader being read. * @param rootElementName Optional root element name to override the default defined by the model. Used to support * cases where the model can deserialize from different root element names. diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlobRetentionPolicy.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobRetentionPolicy.java similarity index 98% rename from sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlobRetentionPolicy.java rename to sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobRetentionPolicy.java index 96778372f763..b6ab6406fdf5 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlobRetentionPolicy.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobRetentionPolicy.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.blob.models; +package com.azure.v2.storage.blob.models; import com.azure.core.v2.annotation.Fluent; import com.azure.core.v2.util.CoreUtils; @@ -37,7 +37,7 @@ public BlobRetentionPolicy() { /** * Get the enabled property: Indicates whether a retention policy is enabled for the storage service. - * + * * @return the enabled value. */ public boolean isEnabled() { @@ -46,7 +46,7 @@ public boolean isEnabled() { /** * Set the enabled property: Indicates whether a retention policy is enabled for the storage service. - * + * * @param enabled the enabled value to set. * @return the BlobRetentionPolicy object itself. */ @@ -58,7 +58,7 @@ public BlobRetentionPolicy setEnabled(boolean enabled) { /** * Get the days property: Indicates the number of days that metrics or logging or soft-deleted data should be * retained. All data older than this value will be deleted. - * + * * @return the days value. */ public Integer getDays() { @@ -68,7 +68,7 @@ public Integer getDays() { /** * Set the days property: Indicates the number of days that metrics or logging or soft-deleted data should be * retained. All data older than this value will be deleted. - * + * * @param days the days value to set. * @return the BlobRetentionPolicy object itself. */ @@ -93,7 +93,7 @@ public XmlWriter toXml(XmlWriter xmlWriter, String rootElementName) throws XMLSt /** * 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. @@ -105,7 +105,7 @@ 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. diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlobServiceProperties.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobServiceProperties.java similarity index 98% rename from sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlobServiceProperties.java rename to sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobServiceProperties.java index c9c5fae10989..bfc9071fbae9 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlobServiceProperties.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobServiceProperties.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.blob.models; +package com.azure.v2.storage.blob.models; import com.azure.core.v2.annotation.Fluent; import com.azure.core.v2.util.CoreUtils; @@ -64,7 +64,7 @@ public BlobServiceProperties() { /** * Get the logging property: Azure Analytics Logging settings. - * + * * @return the logging value. */ public BlobAnalyticsLogging getLogging() { @@ -73,7 +73,7 @@ public BlobAnalyticsLogging getLogging() { /** * Set the logging property: Azure Analytics Logging settings. - * + * * @param logging the logging value to set. * @return the BlobServiceProperties object itself. */ @@ -85,7 +85,7 @@ public BlobServiceProperties setLogging(BlobAnalyticsLogging logging) { /** * Get the hourMetrics property: a summary of request statistics grouped by API in hour or minute aggregates for * blobs. - * + * * @return the hourMetrics value. */ public BlobMetrics getHourMetrics() { @@ -95,7 +95,7 @@ public BlobMetrics getHourMetrics() { /** * Set the hourMetrics property: a summary of request statistics grouped by API in hour or minute aggregates for * blobs. - * + * * @param hourMetrics the hourMetrics value to set. * @return the BlobServiceProperties object itself. */ @@ -107,7 +107,7 @@ public BlobServiceProperties setHourMetrics(BlobMetrics hourMetrics) { /** * Get the minuteMetrics property: a summary of request statistics grouped by API in hour or minute aggregates for * blobs. - * + * * @return the minuteMetrics value. */ public BlobMetrics getMinuteMetrics() { @@ -117,7 +117,7 @@ public BlobMetrics getMinuteMetrics() { /** * Set the minuteMetrics property: a summary of request statistics grouped by API in hour or minute aggregates for * blobs. - * + * * @param minuteMetrics the minuteMetrics value to set. * @return the BlobServiceProperties object itself. */ @@ -128,7 +128,7 @@ public BlobServiceProperties setMinuteMetrics(BlobMetrics minuteMetrics) { /** * Get the cors property: The set of CORS rules. - * + * * @return the cors value. */ public List getCors() { @@ -140,7 +140,7 @@ public List getCors() { /** * Set the cors property: The set of CORS rules. - * + * * @param cors the cors value to set. * @return the BlobServiceProperties object itself. */ @@ -153,7 +153,7 @@ public BlobServiceProperties setCors(List cors) { * Get the defaultServiceVersion property: The default version to use for requests to the Blob service if an * incoming request's version is not specified. Possible values include version 2008-10-27 and all more recent * versions. - * + * * @return the defaultServiceVersion value. */ public String getDefaultServiceVersion() { @@ -164,7 +164,7 @@ public String getDefaultServiceVersion() { * Set the defaultServiceVersion property: The default version to use for requests to the Blob service if an * incoming request's version is not specified. Possible values include version 2008-10-27 and all more recent * versions. - * + * * @param defaultServiceVersion the defaultServiceVersion value to set. * @return the BlobServiceProperties object itself. */ @@ -176,7 +176,7 @@ public BlobServiceProperties setDefaultServiceVersion(String defaultServiceVersi /** * Get the deleteRetentionPolicy property: the retention policy which determines how long the associated data should * persist. - * + * * @return the deleteRetentionPolicy value. */ public BlobRetentionPolicy getDeleteRetentionPolicy() { @@ -186,7 +186,7 @@ public BlobRetentionPolicy getDeleteRetentionPolicy() { /** * Set the deleteRetentionPolicy property: the retention policy which determines how long the associated data should * persist. - * + * * @param deleteRetentionPolicy the deleteRetentionPolicy value to set. * @return the BlobServiceProperties object itself. */ @@ -197,7 +197,7 @@ public BlobServiceProperties setDeleteRetentionPolicy(BlobRetentionPolicy delete /** * Get the staticWebsite property: The properties that enable an account to host a static website. - * + * * @return the staticWebsite value. */ public StaticWebsite getStaticWebsite() { @@ -206,7 +206,7 @@ public StaticWebsite getStaticWebsite() { /** * Set the staticWebsite property: The properties that enable an account to host a static website. - * + * * @param staticWebsite the staticWebsite value to set. * @return the BlobServiceProperties object itself. */ @@ -242,7 +242,7 @@ public XmlWriter toXml(XmlWriter xmlWriter, String rootElementName) throws XMLSt /** * Reads an instance of BlobServiceProperties from the XmlReader. - * + * * @param xmlReader The XmlReader being read. * @return An instance of BlobServiceProperties if the XmlReader was pointing to an instance of it, or null if it * was pointing to XML null. @@ -254,7 +254,7 @@ public static BlobServiceProperties fromXml(XmlReader xmlReader) throws XMLStrea /** * Reads an instance of BlobServiceProperties from the XmlReader. - * + * * @param xmlReader The XmlReader being read. * @param rootElementName Optional root element name to override the default defined by the model. Used to support * cases where the model can deserialize from different root element names. diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlobServiceStatistics.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobServiceStatistics.java similarity index 98% rename from sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlobServiceStatistics.java rename to sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobServiceStatistics.java index 7da1a02bd451..9f12b81b2e07 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlobServiceStatistics.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobServiceStatistics.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.blob.models; +package com.azure.v2.storage.blob.models; import com.azure.core.v2.annotation.Fluent; import com.azure.core.v2.util.CoreUtils; @@ -31,7 +31,7 @@ public BlobServiceStatistics() { /** * Get the geoReplication property: Geo-Replication information for the Secondary Storage Service. - * + * * @return the geoReplication value. */ public GeoReplication getGeoReplication() { @@ -40,7 +40,7 @@ public GeoReplication getGeoReplication() { /** * Set the geoReplication property: Geo-Replication information for the Secondary Storage Service. - * + * * @param geoReplication the geoReplication value to set. * @return the BlobServiceStatistics object itself. */ @@ -64,7 +64,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. @@ -76,7 +76,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. diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlobSignedIdentifier.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobSignedIdentifier.java similarity index 98% rename from sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlobSignedIdentifier.java rename to sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobSignedIdentifier.java index 4c857ab52a41..5230b4e27484 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlobSignedIdentifier.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobSignedIdentifier.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.blob.models; +package com.azure.v2.storage.blob.models; import com.azure.core.v2.annotation.Fluent; import com.azure.core.v2.util.CoreUtils; @@ -36,7 +36,7 @@ public BlobSignedIdentifier() { /** * Get the id property: a unique id. - * + * * @return the id value. */ public String getId() { @@ -45,7 +45,7 @@ public String getId() { /** * Set the id property: a unique id. - * + * * @param id the id value to set. * @return the BlobSignedIdentifier object itself. */ @@ -56,7 +56,7 @@ public BlobSignedIdentifier setId(String id) { /** * Get the accessPolicy property: An Access policy. - * + * * @return the accessPolicy value. */ public BlobAccessPolicy getAccessPolicy() { @@ -65,7 +65,7 @@ public BlobAccessPolicy getAccessPolicy() { /** * Set the accessPolicy property: An Access policy. - * + * * @param accessPolicy the accessPolicy value to set. * @return the BlobSignedIdentifier object itself. */ @@ -90,7 +90,7 @@ 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. @@ -102,7 +102,7 @@ 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. diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlobTag.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobTag.java similarity index 97% rename from sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlobTag.java rename to sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobTag.java index 57ffff5a3627..a67a9a3e62c0 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlobTag.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobTag.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.blob.models; +package com.azure.v2.storage.blob.models; import com.azure.core.v2.annotation.Fluent; import com.azure.core.v2.util.CoreUtils; @@ -36,7 +36,7 @@ public BlobTag() { /** * Get the key property: The Key property. - * + * * @return the key value. */ public String getKey() { @@ -45,7 +45,7 @@ public String getKey() { /** * Set the key property: The Key property. - * + * * @param key the key value to set. * @return the BlobTag object itself. */ @@ -56,7 +56,7 @@ public BlobTag setKey(String key) { /** * Get the value property: The Value property. - * + * * @return the value value. */ public String getValue() { @@ -65,7 +65,7 @@ public String getValue() { /** * Set the value property: The Value property. - * + * * @param value the value value to set. * @return the BlobTag object itself. */ @@ -90,7 +90,7 @@ public XmlWriter toXml(XmlWriter xmlWriter, String rootElementName) throws XMLSt /** * Reads an instance of BlobTag from the XmlReader. - * + * * @param xmlReader The XmlReader being read. * @return An instance of BlobTag if the XmlReader was pointing to an instance of it, or null if it was pointing to * XML null. @@ -102,7 +102,7 @@ public static BlobTag fromXml(XmlReader xmlReader) throws XMLStreamException { /** * Reads an instance of BlobTag from the XmlReader. - * + * * @param xmlReader The XmlReader being read. * @param rootElementName Optional root element name to override the default defined by the model. Used to support * cases where the model can deserialize from different root element names. diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlobTags.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobTags.java similarity index 98% rename from sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlobTags.java rename to sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobTags.java index 0f1041f4dab0..f8621ae6e145 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlobTags.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobTags.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.blob.models; +package com.azure.v2.storage.blob.models; import com.azure.core.v2.annotation.Fluent; import com.azure.core.v2.util.CoreUtils; @@ -33,7 +33,7 @@ public BlobTags() { /** * Get the blobTagSet property: The BlobTagSet property. - * + * * @return the blobTagSet value. */ public List getBlobTagSet() { @@ -45,7 +45,7 @@ public List getBlobTagSet() { /** * Set the blobTagSet property: The BlobTagSet property. - * + * * @param blobTagSet the blobTagSet value to set. * @return the BlobTags object itself. */ @@ -75,7 +75,7 @@ public XmlWriter toXml(XmlWriter xmlWriter, String rootElementName) throws XMLSt /** * Reads an instance of BlobTags from the XmlReader. - * + * * @param xmlReader The XmlReader being read. * @return An instance of BlobTags if the XmlReader was pointing to an instance of it, or null if it was pointing to * XML null. @@ -87,7 +87,7 @@ public static BlobTags fromXml(XmlReader xmlReader) throws XMLStreamException { /** * Reads an instance of BlobTags from the XmlReader. - * + * * @param xmlReader The XmlReader being read. * @param rootElementName Optional root element name to override the default defined by the model. Used to support * cases where the model can deserialize from different root element names. diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlobType.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobType.java similarity index 96% rename from sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlobType.java rename to sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobType.java index 8e4447a018fd..a8100ab8045f 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlobType.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobType.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.blob.models; +package com.azure.v2.storage.blob.models; /** * Defines values for BlobType. @@ -34,7 +34,7 @@ public enum BlobType { /** * Parses a serialized value to a BlobType instance. - * + * * @param value the serialized value to parse. * @return the parsed BlobType object, or null if unable to parse. */ diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlobsAbortCopyFromURLHeaders.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobsAbortCopyFromURLHeaders.java similarity index 97% rename from sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlobsAbortCopyFromURLHeaders.java rename to sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobsAbortCopyFromURLHeaders.java index 8ca669cbce40..d27c9f43e368 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlobsAbortCopyFromURLHeaders.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobsAbortCopyFromURLHeaders.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.blob.models; +package com.azure.v2.storage.blob.models; import com.azure.core.v2.annotation.Fluent; import io.clientcore.core.http.models.DateTimeRfc1123; @@ -41,7 +41,7 @@ public final class BlobsAbortCopyFromURLHeaders { // 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) { @@ -56,7 +56,7 @@ public BlobsAbortCopyFromURLHeaders(HttpHeaders rawHeaders) { /** * Get the xMsVersion property: The x-ms-version property. - * + * * @return the xMsVersion value. */ public String getXMsVersion() { @@ -65,7 +65,7 @@ public String getXMsVersion() { /** * Set the xMsVersion property: The x-ms-version property. - * + * * @param xMsVersion the xMsVersion value to set. * @return the BlobsAbortCopyFromURLHeaders object itself. */ @@ -76,7 +76,7 @@ public BlobsAbortCopyFromURLHeaders setXMsVersion(String xMsVersion) { /** * Get the xMsRequestId property: The x-ms-request-id property. - * + * * @return the xMsRequestId value. */ public String getXMsRequestId() { @@ -85,7 +85,7 @@ public String getXMsRequestId() { /** * Set the xMsRequestId property: The x-ms-request-id property. - * + * * @param xMsRequestId the xMsRequestId value to set. * @return the BlobsAbortCopyFromURLHeaders object itself. */ @@ -96,7 +96,7 @@ public BlobsAbortCopyFromURLHeaders setXMsRequestId(String xMsRequestId) { /** * Get the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @return the xMsClientRequestId value. */ public String getXMsClientRequestId() { @@ -105,7 +105,7 @@ public String getXMsClientRequestId() { /** * Set the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @param xMsClientRequestId the xMsClientRequestId value to set. * @return the BlobsAbortCopyFromURLHeaders object itself. */ @@ -116,7 +116,7 @@ public BlobsAbortCopyFromURLHeaders setXMsClientRequestId(String xMsClientReques /** * Get the date property: The Date property. - * + * * @return the date value. */ public OffsetDateTime getDate() { @@ -128,7 +128,7 @@ public OffsetDateTime getDate() { /** * Set the date property: The Date property. - * + * * @param date the date value to set. * @return the BlobsAbortCopyFromURLHeaders object itself. */ diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlobsAcquireLeaseHeaders.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobsAcquireLeaseHeaders.java similarity index 97% rename from sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlobsAcquireLeaseHeaders.java rename to sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobsAcquireLeaseHeaders.java index 206ec3154da4..104932a67549 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlobsAcquireLeaseHeaders.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobsAcquireLeaseHeaders.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.blob.models; +package com.azure.v2.storage.blob.models; import com.azure.core.v2.annotation.Fluent; import io.clientcore.core.http.models.DateTimeRfc1123; @@ -58,7 +58,7 @@ public final class BlobsAcquireLeaseHeaders { // HttpHeaders containing the raw property values. /** * Creates an instance of BlobsAcquireLeaseHeaders class. - * + * * @param rawHeaders The raw HttpHeaders that will be used to create the property values. */ public BlobsAcquireLeaseHeaders(HttpHeaders rawHeaders) { @@ -79,7 +79,7 @@ public BlobsAcquireLeaseHeaders(HttpHeaders rawHeaders) { /** * Get the xMsVersion property: The x-ms-version property. - * + * * @return the xMsVersion value. */ public String getXMsVersion() { @@ -88,7 +88,7 @@ public String getXMsVersion() { /** * Set the xMsVersion property: The x-ms-version property. - * + * * @param xMsVersion the xMsVersion value to set. * @return the BlobsAcquireLeaseHeaders object itself. */ @@ -99,7 +99,7 @@ public BlobsAcquireLeaseHeaders setXMsVersion(String xMsVersion) { /** * Get the eTag property: The ETag property. - * + * * @return the eTag value. */ public String getETag() { @@ -108,7 +108,7 @@ public String getETag() { /** * Set the eTag property: The ETag property. - * + * * @param eTag the eTag value to set. * @return the BlobsAcquireLeaseHeaders object itself. */ @@ -119,7 +119,7 @@ public BlobsAcquireLeaseHeaders setETag(String eTag) { /** * Get the xMsLeaseId property: The x-ms-lease-id property. - * + * * @return the xMsLeaseId value. */ public String getXMsLeaseId() { @@ -128,7 +128,7 @@ public String getXMsLeaseId() { /** * Set the xMsLeaseId property: The x-ms-lease-id property. - * + * * @param xMsLeaseId the xMsLeaseId value to set. * @return the BlobsAcquireLeaseHeaders object itself. */ @@ -139,7 +139,7 @@ public BlobsAcquireLeaseHeaders setXMsLeaseId(String xMsLeaseId) { /** * Get the lastModified property: The Last-Modified property. - * + * * @return the lastModified value. */ public OffsetDateTime getLastModified() { @@ -151,7 +151,7 @@ public OffsetDateTime getLastModified() { /** * Set the lastModified property: The Last-Modified property. - * + * * @param lastModified the lastModified value to set. * @return the BlobsAcquireLeaseHeaders object itself. */ @@ -166,7 +166,7 @@ public BlobsAcquireLeaseHeaders setLastModified(OffsetDateTime lastModified) { /** * Get the xMsRequestId property: The x-ms-request-id property. - * + * * @return the xMsRequestId value. */ public String getXMsRequestId() { @@ -175,7 +175,7 @@ public String getXMsRequestId() { /** * Set the xMsRequestId property: The x-ms-request-id property. - * + * * @param xMsRequestId the xMsRequestId value to set. * @return the BlobsAcquireLeaseHeaders object itself. */ @@ -186,7 +186,7 @@ public BlobsAcquireLeaseHeaders setXMsRequestId(String xMsRequestId) { /** * Get the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @return the xMsClientRequestId value. */ public String getXMsClientRequestId() { @@ -195,7 +195,7 @@ public String getXMsClientRequestId() { /** * Set the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @param xMsClientRequestId the xMsClientRequestId value to set. * @return the BlobsAcquireLeaseHeaders object itself. */ @@ -206,7 +206,7 @@ public BlobsAcquireLeaseHeaders setXMsClientRequestId(String xMsClientRequestId) /** * Get the date property: The Date property. - * + * * @return the date value. */ public OffsetDateTime getDate() { @@ -218,7 +218,7 @@ public OffsetDateTime getDate() { /** * Set the date property: The Date property. - * + * * @param date the date value to set. * @return the BlobsAcquireLeaseHeaders object itself. */ diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlobsBreakLeaseHeaders.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobsBreakLeaseHeaders.java similarity index 97% rename from sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlobsBreakLeaseHeaders.java rename to sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobsBreakLeaseHeaders.java index c23552c1bd03..0175a7f5e241 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlobsBreakLeaseHeaders.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobsBreakLeaseHeaders.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.blob.models; +package com.azure.v2.storage.blob.models; import com.azure.core.v2.annotation.Fluent; import io.clientcore.core.http.models.DateTimeRfc1123; @@ -58,7 +58,7 @@ public final class BlobsBreakLeaseHeaders { // HttpHeaders containing the raw property values. /** * Creates an instance of BlobsBreakLeaseHeaders class. - * + * * @param rawHeaders The raw HttpHeaders that will be used to create the property values. */ public BlobsBreakLeaseHeaders(HttpHeaders rawHeaders) { @@ -82,7 +82,7 @@ public BlobsBreakLeaseHeaders(HttpHeaders rawHeaders) { /** * Get the xMsVersion property: The x-ms-version property. - * + * * @return the xMsVersion value. */ public String getXMsVersion() { @@ -91,7 +91,7 @@ public String getXMsVersion() { /** * Set the xMsVersion property: The x-ms-version property. - * + * * @param xMsVersion the xMsVersion value to set. * @return the BlobsBreakLeaseHeaders object itself. */ @@ -102,7 +102,7 @@ public BlobsBreakLeaseHeaders setXMsVersion(String xMsVersion) { /** * Get the eTag property: The ETag property. - * + * * @return the eTag value. */ public String getETag() { @@ -111,7 +111,7 @@ public String getETag() { /** * Set the eTag property: The ETag property. - * + * * @param eTag the eTag value to set. * @return the BlobsBreakLeaseHeaders object itself. */ @@ -122,7 +122,7 @@ public BlobsBreakLeaseHeaders setETag(String eTag) { /** * Get the xMsLeaseTime property: The x-ms-lease-time property. - * + * * @return the xMsLeaseTime value. */ public Integer getXMsLeaseTime() { @@ -131,7 +131,7 @@ public Integer getXMsLeaseTime() { /** * Set the xMsLeaseTime property: The x-ms-lease-time property. - * + * * @param xMsLeaseTime the xMsLeaseTime value to set. * @return the BlobsBreakLeaseHeaders object itself. */ @@ -142,7 +142,7 @@ public BlobsBreakLeaseHeaders setXMsLeaseTime(Integer xMsLeaseTime) { /** * Get the lastModified property: The Last-Modified property. - * + * * @return the lastModified value. */ public OffsetDateTime getLastModified() { @@ -154,7 +154,7 @@ public OffsetDateTime getLastModified() { /** * Set the lastModified property: The Last-Modified property. - * + * * @param lastModified the lastModified value to set. * @return the BlobsBreakLeaseHeaders object itself. */ @@ -169,7 +169,7 @@ public BlobsBreakLeaseHeaders setLastModified(OffsetDateTime lastModified) { /** * Get the xMsRequestId property: The x-ms-request-id property. - * + * * @return the xMsRequestId value. */ public String getXMsRequestId() { @@ -178,7 +178,7 @@ public String getXMsRequestId() { /** * Set the xMsRequestId property: The x-ms-request-id property. - * + * * @param xMsRequestId the xMsRequestId value to set. * @return the BlobsBreakLeaseHeaders object itself. */ @@ -189,7 +189,7 @@ public BlobsBreakLeaseHeaders setXMsRequestId(String xMsRequestId) { /** * Get the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @return the xMsClientRequestId value. */ public String getXMsClientRequestId() { @@ -198,7 +198,7 @@ public String getXMsClientRequestId() { /** * Set the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @param xMsClientRequestId the xMsClientRequestId value to set. * @return the BlobsBreakLeaseHeaders object itself. */ @@ -209,7 +209,7 @@ public BlobsBreakLeaseHeaders setXMsClientRequestId(String xMsClientRequestId) { /** * Get the date property: The Date property. - * + * * @return the date value. */ public OffsetDateTime getDate() { @@ -221,7 +221,7 @@ public OffsetDateTime getDate() { /** * Set the date property: The Date property. - * + * * @param date the date value to set. * @return the BlobsBreakLeaseHeaders object itself. */ diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlobsChangeLeaseHeaders.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobsChangeLeaseHeaders.java similarity index 97% rename from sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlobsChangeLeaseHeaders.java rename to sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobsChangeLeaseHeaders.java index 98bced8d589e..0d026cf8d4e6 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlobsChangeLeaseHeaders.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobsChangeLeaseHeaders.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.blob.models; +package com.azure.v2.storage.blob.models; import com.azure.core.v2.annotation.Fluent; import io.clientcore.core.http.models.DateTimeRfc1123; @@ -58,7 +58,7 @@ public final class BlobsChangeLeaseHeaders { // HttpHeaders containing the raw property values. /** * Creates an instance of BlobsChangeLeaseHeaders class. - * + * * @param rawHeaders The raw HttpHeaders that will be used to create the property values. */ public BlobsChangeLeaseHeaders(HttpHeaders rawHeaders) { @@ -79,7 +79,7 @@ public BlobsChangeLeaseHeaders(HttpHeaders rawHeaders) { /** * Get the xMsVersion property: The x-ms-version property. - * + * * @return the xMsVersion value. */ public String getXMsVersion() { @@ -88,7 +88,7 @@ public String getXMsVersion() { /** * Set the xMsVersion property: The x-ms-version property. - * + * * @param xMsVersion the xMsVersion value to set. * @return the BlobsChangeLeaseHeaders object itself. */ @@ -99,7 +99,7 @@ public BlobsChangeLeaseHeaders setXMsVersion(String xMsVersion) { /** * Get the eTag property: The ETag property. - * + * * @return the eTag value. */ public String getETag() { @@ -108,7 +108,7 @@ public String getETag() { /** * Set the eTag property: The ETag property. - * + * * @param eTag the eTag value to set. * @return the BlobsChangeLeaseHeaders object itself. */ @@ -119,7 +119,7 @@ public BlobsChangeLeaseHeaders setETag(String eTag) { /** * Get the xMsLeaseId property: The x-ms-lease-id property. - * + * * @return the xMsLeaseId value. */ public String getXMsLeaseId() { @@ -128,7 +128,7 @@ public String getXMsLeaseId() { /** * Set the xMsLeaseId property: The x-ms-lease-id property. - * + * * @param xMsLeaseId the xMsLeaseId value to set. * @return the BlobsChangeLeaseHeaders object itself. */ @@ -139,7 +139,7 @@ public BlobsChangeLeaseHeaders setXMsLeaseId(String xMsLeaseId) { /** * Get the lastModified property: The Last-Modified property. - * + * * @return the lastModified value. */ public OffsetDateTime getLastModified() { @@ -151,7 +151,7 @@ public OffsetDateTime getLastModified() { /** * Set the lastModified property: The Last-Modified property. - * + * * @param lastModified the lastModified value to set. * @return the BlobsChangeLeaseHeaders object itself. */ @@ -166,7 +166,7 @@ public BlobsChangeLeaseHeaders setLastModified(OffsetDateTime lastModified) { /** * Get the xMsRequestId property: The x-ms-request-id property. - * + * * @return the xMsRequestId value. */ public String getXMsRequestId() { @@ -175,7 +175,7 @@ public String getXMsRequestId() { /** * Set the xMsRequestId property: The x-ms-request-id property. - * + * * @param xMsRequestId the xMsRequestId value to set. * @return the BlobsChangeLeaseHeaders object itself. */ @@ -186,7 +186,7 @@ public BlobsChangeLeaseHeaders setXMsRequestId(String xMsRequestId) { /** * Get the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @return the xMsClientRequestId value. */ public String getXMsClientRequestId() { @@ -195,7 +195,7 @@ public String getXMsClientRequestId() { /** * Set the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @param xMsClientRequestId the xMsClientRequestId value to set. * @return the BlobsChangeLeaseHeaders object itself. */ @@ -206,7 +206,7 @@ public BlobsChangeLeaseHeaders setXMsClientRequestId(String xMsClientRequestId) /** * Get the date property: The Date property. - * + * * @return the date value. */ public OffsetDateTime getDate() { @@ -218,7 +218,7 @@ public OffsetDateTime getDate() { /** * Set the date property: The Date property. - * + * * @param date the date value to set. * @return the BlobsChangeLeaseHeaders object itself. */ diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlobsCopyFromURLHeaders.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobsCopyFromURLHeaders.java similarity index 97% rename from sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlobsCopyFromURLHeaders.java rename to sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobsCopyFromURLHeaders.java index 0c376e17bf6c..f9565172de96 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlobsCopyFromURLHeaders.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobsCopyFromURLHeaders.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.blob.models; +package com.azure.v2.storage.blob.models; import com.azure.core.v2.annotation.Fluent; import com.azure.core.v2.util.CoreUtils; @@ -93,7 +93,7 @@ public final class BlobsCopyFromURLHeaders { // 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) { @@ -125,7 +125,7 @@ public BlobsCopyFromURLHeaders(HttpHeaders rawHeaders) { /** * Get the xMsVersion property: The x-ms-version property. - * + * * @return the xMsVersion value. */ public String getXMsVersion() { @@ -134,7 +134,7 @@ public String getXMsVersion() { /** * Set the xMsVersion property: The x-ms-version property. - * + * * @param xMsVersion the xMsVersion value to set. * @return the BlobsCopyFromURLHeaders object itself. */ @@ -145,7 +145,7 @@ public BlobsCopyFromURLHeaders setXMsVersion(String xMsVersion) { /** * Get the xMsCopyId property: The x-ms-copy-id property. - * + * * @return the xMsCopyId value. */ public String getXMsCopyId() { @@ -154,7 +154,7 @@ public String getXMsCopyId() { /** * Set the xMsCopyId property: The x-ms-copy-id property. - * + * * @param xMsCopyId the xMsCopyId value to set. * @return the BlobsCopyFromURLHeaders object itself. */ @@ -165,7 +165,7 @@ public BlobsCopyFromURLHeaders setXMsCopyId(String xMsCopyId) { /** * Get the eTag property: The ETag property. - * + * * @return the eTag value. */ public String getETag() { @@ -174,7 +174,7 @@ public String getETag() { /** * Set the eTag property: The ETag property. - * + * * @param eTag the eTag value to set. * @return the BlobsCopyFromURLHeaders object itself. */ @@ -185,7 +185,7 @@ public BlobsCopyFromURLHeaders setETag(String eTag) { /** * Get the xMsContentCrc64 property: The x-ms-content-crc64 property. - * + * * @return the xMsContentCrc64 value. */ public byte[] getXMsContentCrc64() { @@ -194,7 +194,7 @@ public byte[] getXMsContentCrc64() { /** * Set the xMsContentCrc64 property: The x-ms-content-crc64 property. - * + * * @param xMsContentCrc64 the xMsContentCrc64 value to set. * @return the BlobsCopyFromURLHeaders object itself. */ @@ -205,7 +205,7 @@ public BlobsCopyFromURLHeaders setXMsContentCrc64(byte[] xMsContentCrc64) { /** * Get the lastModified property: The Last-Modified property. - * + * * @return the lastModified value. */ public OffsetDateTime getLastModified() { @@ -217,7 +217,7 @@ public OffsetDateTime getLastModified() { /** * Set the lastModified property: The Last-Modified property. - * + * * @param lastModified the lastModified value to set. * @return the BlobsCopyFromURLHeaders object itself. */ @@ -232,7 +232,7 @@ public BlobsCopyFromURLHeaders setLastModified(OffsetDateTime lastModified) { /** * Get the xMsVersionId property: The x-ms-version-id property. - * + * * @return the xMsVersionId value. */ public String getXMsVersionId() { @@ -241,7 +241,7 @@ public String getXMsVersionId() { /** * Set the xMsVersionId property: The x-ms-version-id property. - * + * * @param xMsVersionId the xMsVersionId value to set. * @return the BlobsCopyFromURLHeaders object itself. */ @@ -252,7 +252,7 @@ public BlobsCopyFromURLHeaders setXMsVersionId(String xMsVersionId) { /** * Get the xMsCopyStatus property: The x-ms-copy-status property. - * + * * @return the xMsCopyStatus value. */ public String getXMsCopyStatus() { @@ -261,7 +261,7 @@ public String getXMsCopyStatus() { /** * Set the xMsCopyStatus property: The x-ms-copy-status property. - * + * * @param xMsCopyStatus the xMsCopyStatus value to set. * @return the BlobsCopyFromURLHeaders object itself. */ @@ -272,7 +272,7 @@ public BlobsCopyFromURLHeaders setXMsCopyStatus(String xMsCopyStatus) { /** * Get the xMsRequestId property: The x-ms-request-id property. - * + * * @return the xMsRequestId value. */ public String getXMsRequestId() { @@ -281,7 +281,7 @@ public String getXMsRequestId() { /** * Set the xMsRequestId property: The x-ms-request-id property. - * + * * @param xMsRequestId the xMsRequestId value to set. * @return the BlobsCopyFromURLHeaders object itself. */ @@ -292,7 +292,7 @@ public BlobsCopyFromURLHeaders setXMsRequestId(String xMsRequestId) { /** * Get the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @return the xMsClientRequestId value. */ public String getXMsClientRequestId() { @@ -301,7 +301,7 @@ public String getXMsClientRequestId() { /** * Set the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @param xMsClientRequestId the xMsClientRequestId value to set. * @return the BlobsCopyFromURLHeaders object itself. */ @@ -312,7 +312,7 @@ public BlobsCopyFromURLHeaders setXMsClientRequestId(String xMsClientRequestId) /** * Get the date property: The Date property. - * + * * @return the date value. */ public OffsetDateTime getDate() { @@ -324,7 +324,7 @@ public OffsetDateTime getDate() { /** * Set the date property: The Date property. - * + * * @param date the date value to set. * @return the BlobsCopyFromURLHeaders object itself. */ @@ -339,7 +339,7 @@ public BlobsCopyFromURLHeaders setDate(OffsetDateTime date) { /** * Get the contentMD5 property: The Content-MD5 property. - * + * * @return the contentMD5 value. */ public byte[] getContentMD5() { @@ -348,7 +348,7 @@ public byte[] getContentMD5() { /** * Set the contentMD5 property: The Content-MD5 property. - * + * * @param contentMD5 the contentMD5 value to set. * @return the BlobsCopyFromURLHeaders object itself. */ @@ -359,7 +359,7 @@ public BlobsCopyFromURLHeaders setContentMD5(byte[] contentMD5) { /** * Get the xMsEncryptionScope property: The x-ms-encryption-scope property. - * + * * @return the xMsEncryptionScope value. */ public String getXMsEncryptionScope() { @@ -368,7 +368,7 @@ public String getXMsEncryptionScope() { /** * Set the xMsEncryptionScope property: The x-ms-encryption-scope property. - * + * * @param xMsEncryptionScope the xMsEncryptionScope value to set. * @return the BlobsCopyFromURLHeaders object itself. */ diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlobsCreateSnapshotHeaders.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobsCreateSnapshotHeaders.java similarity index 97% rename from sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlobsCreateSnapshotHeaders.java rename to sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobsCreateSnapshotHeaders.java index 48f893da99b0..e7191c42f0c8 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlobsCreateSnapshotHeaders.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobsCreateSnapshotHeaders.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.blob.models; +package com.azure.v2.storage.blob.models; import com.azure.core.v2.annotation.Fluent; import io.clientcore.core.http.models.DateTimeRfc1123; @@ -73,7 +73,7 @@ public final class BlobsCreateSnapshotHeaders { // HttpHeaders containing the raw property values. /** * Creates an instance of BlobsCreateSnapshotHeaders class. - * + * * @param rawHeaders The raw HttpHeaders that will be used to create the property values. */ public BlobsCreateSnapshotHeaders(HttpHeaders rawHeaders) { @@ -99,7 +99,7 @@ public BlobsCreateSnapshotHeaders(HttpHeaders rawHeaders) { /** * Get the xMsSnapshot property: The x-ms-snapshot property. - * + * * @return the xMsSnapshot value. */ public String getXMsSnapshot() { @@ -108,7 +108,7 @@ public String getXMsSnapshot() { /** * Set the xMsSnapshot property: The x-ms-snapshot property. - * + * * @param xMsSnapshot the xMsSnapshot value to set. * @return the BlobsCreateSnapshotHeaders object itself. */ @@ -119,7 +119,7 @@ public BlobsCreateSnapshotHeaders setXMsSnapshot(String xMsSnapshot) { /** * Get the xMsVersion property: The x-ms-version property. - * + * * @return the xMsVersion value. */ public String getXMsVersion() { @@ -128,7 +128,7 @@ public String getXMsVersion() { /** * Set the xMsVersion property: The x-ms-version property. - * + * * @param xMsVersion the xMsVersion value to set. * @return the BlobsCreateSnapshotHeaders object itself. */ @@ -139,7 +139,7 @@ public BlobsCreateSnapshotHeaders setXMsVersion(String xMsVersion) { /** * Get the eTag property: The ETag property. - * + * * @return the eTag value. */ public String getETag() { @@ -148,7 +148,7 @@ public String getETag() { /** * Set the eTag property: The ETag property. - * + * * @param eTag the eTag value to set. * @return the BlobsCreateSnapshotHeaders object itself. */ @@ -159,7 +159,7 @@ public BlobsCreateSnapshotHeaders setETag(String eTag) { /** * Get the lastModified property: The Last-Modified property. - * + * * @return the lastModified value. */ public OffsetDateTime getLastModified() { @@ -171,7 +171,7 @@ public OffsetDateTime getLastModified() { /** * Set the lastModified property: The Last-Modified property. - * + * * @param lastModified the lastModified value to set. * @return the BlobsCreateSnapshotHeaders object itself. */ @@ -186,7 +186,7 @@ public BlobsCreateSnapshotHeaders setLastModified(OffsetDateTime lastModified) { /** * Get the xMsVersionId property: The x-ms-version-id property. - * + * * @return the xMsVersionId value. */ public String getXMsVersionId() { @@ -195,7 +195,7 @@ public String getXMsVersionId() { /** * Set the xMsVersionId property: The x-ms-version-id property. - * + * * @param xMsVersionId the xMsVersionId value to set. * @return the BlobsCreateSnapshotHeaders object itself. */ @@ -206,7 +206,7 @@ public BlobsCreateSnapshotHeaders setXMsVersionId(String xMsVersionId) { /** * Get the xMsRequestId property: The x-ms-request-id property. - * + * * @return the xMsRequestId value. */ public String getXMsRequestId() { @@ -215,7 +215,7 @@ public String getXMsRequestId() { /** * Set the xMsRequestId property: The x-ms-request-id property. - * + * * @param xMsRequestId the xMsRequestId value to set. * @return the BlobsCreateSnapshotHeaders object itself. */ @@ -226,7 +226,7 @@ public BlobsCreateSnapshotHeaders setXMsRequestId(String xMsRequestId) { /** * Get the xMsRequestServerEncrypted property: The x-ms-request-server-encrypted property. - * + * * @return the xMsRequestServerEncrypted value. */ public Boolean isXMsRequestServerEncrypted() { @@ -235,7 +235,7 @@ public Boolean isXMsRequestServerEncrypted() { /** * Set the xMsRequestServerEncrypted property: The x-ms-request-server-encrypted property. - * + * * @param xMsRequestServerEncrypted the xMsRequestServerEncrypted value to set. * @return the BlobsCreateSnapshotHeaders object itself. */ @@ -246,7 +246,7 @@ public BlobsCreateSnapshotHeaders setXMsRequestServerEncrypted(Boolean xMsReques /** * Get the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @return the xMsClientRequestId value. */ public String getXMsClientRequestId() { @@ -255,7 +255,7 @@ public String getXMsClientRequestId() { /** * Set the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @param xMsClientRequestId the xMsClientRequestId value to set. * @return the BlobsCreateSnapshotHeaders object itself. */ @@ -266,7 +266,7 @@ public BlobsCreateSnapshotHeaders setXMsClientRequestId(String xMsClientRequestI /** * Get the date property: The Date property. - * + * * @return the date value. */ public OffsetDateTime getDate() { @@ -278,7 +278,7 @@ public OffsetDateTime getDate() { /** * Set the date property: The Date property. - * + * * @param date the date value to set. * @return the BlobsCreateSnapshotHeaders object itself. */ diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlobsDeleteHeaders.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobsDeleteHeaders.java similarity index 97% rename from sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlobsDeleteHeaders.java rename to sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobsDeleteHeaders.java index 11fc601b775f..8faf7fee775b 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlobsDeleteHeaders.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobsDeleteHeaders.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.blob.models; +package com.azure.v2.storage.blob.models; import com.azure.core.v2.annotation.Fluent; import io.clientcore.core.http.models.DateTimeRfc1123; @@ -41,7 +41,7 @@ public final class BlobsDeleteHeaders { // HttpHeaders containing the raw property values. /** * Creates an instance of BlobsDeleteHeaders class. - * + * * @param rawHeaders The raw HttpHeaders that will be used to create the property values. */ public BlobsDeleteHeaders(HttpHeaders rawHeaders) { @@ -56,7 +56,7 @@ public BlobsDeleteHeaders(HttpHeaders rawHeaders) { /** * Get the xMsVersion property: The x-ms-version property. - * + * * @return the xMsVersion value. */ public String getXMsVersion() { @@ -65,7 +65,7 @@ public String getXMsVersion() { /** * Set the xMsVersion property: The x-ms-version property. - * + * * @param xMsVersion the xMsVersion value to set. * @return the BlobsDeleteHeaders object itself. */ @@ -76,7 +76,7 @@ public BlobsDeleteHeaders setXMsVersion(String xMsVersion) { /** * Get the xMsRequestId property: The x-ms-request-id property. - * + * * @return the xMsRequestId value. */ public String getXMsRequestId() { @@ -85,7 +85,7 @@ public String getXMsRequestId() { /** * Set the xMsRequestId property: The x-ms-request-id property. - * + * * @param xMsRequestId the xMsRequestId value to set. * @return the BlobsDeleteHeaders object itself. */ @@ -96,7 +96,7 @@ public BlobsDeleteHeaders setXMsRequestId(String xMsRequestId) { /** * Get the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @return the xMsClientRequestId value. */ public String getXMsClientRequestId() { @@ -105,7 +105,7 @@ public String getXMsClientRequestId() { /** * Set the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @param xMsClientRequestId the xMsClientRequestId value to set. * @return the BlobsDeleteHeaders object itself. */ @@ -116,7 +116,7 @@ public BlobsDeleteHeaders setXMsClientRequestId(String xMsClientRequestId) { /** * Get the date property: The Date property. - * + * * @return the date value. */ public OffsetDateTime getDate() { @@ -128,7 +128,7 @@ public OffsetDateTime getDate() { /** * Set the date property: The Date property. - * + * * @param date the date value to set. * @return the BlobsDeleteHeaders object itself. */ diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlobsDeleteImmutabilityPolicyHeaders.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobsDeleteImmutabilityPolicyHeaders.java similarity index 97% rename from sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlobsDeleteImmutabilityPolicyHeaders.java rename to sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobsDeleteImmutabilityPolicyHeaders.java index ceea285f5e99..0a4a3e407e71 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlobsDeleteImmutabilityPolicyHeaders.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobsDeleteImmutabilityPolicyHeaders.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.blob.models; +package com.azure.v2.storage.blob.models; import com.azure.core.v2.annotation.Fluent; import io.clientcore.core.http.models.DateTimeRfc1123; @@ -41,7 +41,7 @@ public final class BlobsDeleteImmutabilityPolicyHeaders { // HttpHeaders containing the raw property values. /** * Creates an instance of BlobsDeleteImmutabilityPolicyHeaders class. - * + * * @param rawHeaders The raw HttpHeaders that will be used to create the property values. */ public BlobsDeleteImmutabilityPolicyHeaders(HttpHeaders rawHeaders) { @@ -56,7 +56,7 @@ public BlobsDeleteImmutabilityPolicyHeaders(HttpHeaders rawHeaders) { /** * Get the xMsVersion property: The x-ms-version property. - * + * * @return the xMsVersion value. */ public String getXMsVersion() { @@ -65,7 +65,7 @@ public String getXMsVersion() { /** * Set the xMsVersion property: The x-ms-version property. - * + * * @param xMsVersion the xMsVersion value to set. * @return the BlobsDeleteImmutabilityPolicyHeaders object itself. */ @@ -76,7 +76,7 @@ public BlobsDeleteImmutabilityPolicyHeaders setXMsVersion(String xMsVersion) { /** * Get the xMsRequestId property: The x-ms-request-id property. - * + * * @return the xMsRequestId value. */ public String getXMsRequestId() { @@ -85,7 +85,7 @@ public String getXMsRequestId() { /** * Set the xMsRequestId property: The x-ms-request-id property. - * + * * @param xMsRequestId the xMsRequestId value to set. * @return the BlobsDeleteImmutabilityPolicyHeaders object itself. */ @@ -96,7 +96,7 @@ public BlobsDeleteImmutabilityPolicyHeaders setXMsRequestId(String xMsRequestId) /** * Get the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @return the xMsClientRequestId value. */ public String getXMsClientRequestId() { @@ -105,7 +105,7 @@ public String getXMsClientRequestId() { /** * Set the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @param xMsClientRequestId the xMsClientRequestId value to set. * @return the BlobsDeleteImmutabilityPolicyHeaders object itself. */ @@ -116,7 +116,7 @@ public BlobsDeleteImmutabilityPolicyHeaders setXMsClientRequestId(String xMsClie /** * Get the date property: The Date property. - * + * * @return the date value. */ public OffsetDateTime getDate() { @@ -128,7 +128,7 @@ public OffsetDateTime getDate() { /** * Set the date property: The Date property. - * + * * @param date the date value to set. * @return the BlobsDeleteImmutabilityPolicyHeaders object itself. */ diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlobsDownloadHeaders.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobsDownloadHeaders.java similarity index 98% rename from sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlobsDownloadHeaders.java rename to sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobsDownloadHeaders.java index 876d72763d69..e540327dc9e4 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlobsDownloadHeaders.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobsDownloadHeaders.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.blob.models; +package com.azure.v2.storage.blob.models; import com.azure.core.v2.annotation.Fluent; import io.clientcore.core.http.models.HttpHeader; @@ -322,7 +322,7 @@ public final class BlobsDownloadHeaders { // HttpHeaders containing the raw property values. /** * Creates an instance of BlobsDownloadHeaders class. - * + * * @param rawHeaders The raw HttpHeaders that will be used to create the property values. */ public BlobsDownloadHeaders(HttpHeaders rawHeaders) { @@ -459,7 +459,7 @@ public BlobsDownloadHeaders(HttpHeaders rawHeaders) { /** * Get the xMsIsCurrentVersion property: The x-ms-is-current-version property. - * + * * @return the xMsIsCurrentVersion value. */ public Boolean isXMsIsCurrentVersion() { @@ -468,7 +468,7 @@ public Boolean isXMsIsCurrentVersion() { /** * Set the xMsIsCurrentVersion property: The x-ms-is-current-version property. - * + * * @param xMsIsCurrentVersion the xMsIsCurrentVersion value to set. * @return the BlobsDownloadHeaders object itself. */ @@ -479,7 +479,7 @@ public BlobsDownloadHeaders setXMsIsCurrentVersion(Boolean xMsIsCurrentVersion) /** * Get the xMsLeaseStatus property: The x-ms-lease-status property. - * + * * @return the xMsLeaseStatus value. */ public LeaseStatusType getXMsLeaseStatus() { @@ -488,7 +488,7 @@ public LeaseStatusType getXMsLeaseStatus() { /** * Set the xMsLeaseStatus property: The x-ms-lease-status property. - * + * * @param xMsLeaseStatus the xMsLeaseStatus value to set. * @return the BlobsDownloadHeaders object itself. */ @@ -499,7 +499,7 @@ public BlobsDownloadHeaders setXMsLeaseStatus(LeaseStatusType xMsLeaseStatus) { /** * Get the xMsTagCount property: The x-ms-tag-count property. - * + * * @return the xMsTagCount value. */ public Long getXMsTagCount() { @@ -508,7 +508,7 @@ public Long getXMsTagCount() { /** * Set the xMsTagCount property: The x-ms-tag-count property. - * + * * @param xMsTagCount the xMsTagCount value to set. * @return the BlobsDownloadHeaders object itself. */ @@ -519,7 +519,7 @@ public BlobsDownloadHeaders setXMsTagCount(Long xMsTagCount) { /** * Get the contentRange property: The Content-Range property. - * + * * @return the contentRange value. */ public String getContentRange() { @@ -528,7 +528,7 @@ public String getContentRange() { /** * Set the contentRange property: The Content-Range property. - * + * * @param contentRange the contentRange value to set. * @return the BlobsDownloadHeaders object itself. */ @@ -539,7 +539,7 @@ public BlobsDownloadHeaders setContentRange(String contentRange) { /** * Get the xMsLeaseState property: The x-ms-lease-state property. - * + * * @return the xMsLeaseState value. */ public LeaseStateType getXMsLeaseState() { @@ -548,7 +548,7 @@ public LeaseStateType getXMsLeaseState() { /** * Set the xMsLeaseState property: The x-ms-lease-state property. - * + * * @param xMsLeaseState the xMsLeaseState value to set. * @return the BlobsDownloadHeaders object itself. */ @@ -559,7 +559,7 @@ public BlobsDownloadHeaders setXMsLeaseState(LeaseStateType xMsLeaseState) { /** * Get the xMsBlobSealed property: The x-ms-blob-sealed property. - * + * * @return the xMsBlobSealed value. */ public Boolean isXMsBlobSealed() { @@ -568,7 +568,7 @@ public Boolean isXMsBlobSealed() { /** * Set the xMsBlobSealed property: The x-ms-blob-sealed property. - * + * * @param xMsBlobSealed the xMsBlobSealed value to set. * @return the BlobsDownloadHeaders object itself. */ @@ -579,7 +579,7 @@ public BlobsDownloadHeaders setXMsBlobSealed(Boolean xMsBlobSealed) { /** * Get the lastModified property: The Last-Modified property. - * + * * @return the lastModified value. */ public OffsetDateTime getLastModified() { @@ -591,7 +591,7 @@ public OffsetDateTime getLastModified() { /** * Set the lastModified property: The Last-Modified property. - * + * * @param lastModified the lastModified value to set. * @return the BlobsDownloadHeaders object itself. */ @@ -606,7 +606,7 @@ public BlobsDownloadHeaders setLastModified(OffsetDateTime lastModified) { /** * Get the xMsVersionId property: The x-ms-version-id property. - * + * * @return the xMsVersionId value. */ public String getXMsVersionId() { @@ -615,7 +615,7 @@ public String getXMsVersionId() { /** * Set the xMsVersionId property: The x-ms-version-id property. - * + * * @param xMsVersionId the xMsVersionId value to set. * @return the BlobsDownloadHeaders object itself. */ @@ -626,7 +626,7 @@ public BlobsDownloadHeaders setXMsVersionId(String xMsVersionId) { /** * Get the xMsEncryptionKeySha256 property: The x-ms-encryption-key-sha256 property. - * + * * @return the xMsEncryptionKeySha256 value. */ public String getXMsEncryptionKeySha256() { @@ -635,7 +635,7 @@ public String getXMsEncryptionKeySha256() { /** * Set the xMsEncryptionKeySha256 property: The x-ms-encryption-key-sha256 property. - * + * * @param xMsEncryptionKeySha256 the xMsEncryptionKeySha256 value to set. * @return the BlobsDownloadHeaders object itself. */ @@ -646,7 +646,7 @@ public BlobsDownloadHeaders setXMsEncryptionKeySha256(String xMsEncryptionKeySha /** * Get the xMsStructuredBody property: The x-ms-structured-body property. - * + * * @return the xMsStructuredBody value. */ public String getXMsStructuredBody() { @@ -655,7 +655,7 @@ public String getXMsStructuredBody() { /** * Set the xMsStructuredBody property: The x-ms-structured-body property. - * + * * @param xMsStructuredBody the xMsStructuredBody value to set. * @return the BlobsDownloadHeaders object itself. */ @@ -666,7 +666,7 @@ public BlobsDownloadHeaders setXMsStructuredBody(String xMsStructuredBody) { /** * Get the xMsBlobType property: The x-ms-blob-type property. - * + * * @return the xMsBlobType value. */ public BlobType getXMsBlobType() { @@ -675,7 +675,7 @@ public BlobType getXMsBlobType() { /** * Set the xMsBlobType property: The x-ms-blob-type property. - * + * * @param xMsBlobType the xMsBlobType value to set. * @return the BlobsDownloadHeaders object itself. */ @@ -686,7 +686,7 @@ public BlobsDownloadHeaders setXMsBlobType(BlobType xMsBlobType) { /** * Get the xMsImmutabilityPolicyMode property: The x-ms-immutability-policy-mode property. - * + * * @return the xMsImmutabilityPolicyMode value. */ public String getXMsImmutabilityPolicyMode() { @@ -695,7 +695,7 @@ public String getXMsImmutabilityPolicyMode() { /** * Set the xMsImmutabilityPolicyMode property: The x-ms-immutability-policy-mode property. - * + * * @param xMsImmutabilityPolicyMode the xMsImmutabilityPolicyMode value to set. * @return the BlobsDownloadHeaders object itself. */ @@ -706,7 +706,7 @@ public BlobsDownloadHeaders setXMsImmutabilityPolicyMode(String xMsImmutabilityP /** * Get the xMsStructuredContentLength property: The x-ms-structured-content-length property. - * + * * @return the xMsStructuredContentLength value. */ public Long getXMsStructuredContentLength() { @@ -715,7 +715,7 @@ public Long getXMsStructuredContentLength() { /** * Set the xMsStructuredContentLength property: The x-ms-structured-content-length property. - * + * * @param xMsStructuredContentLength the xMsStructuredContentLength value to set. * @return the BlobsDownloadHeaders object itself. */ @@ -726,7 +726,7 @@ public BlobsDownloadHeaders setXMsStructuredContentLength(Long xMsStructuredCont /** * Get the contentEncoding property: The Content-Encoding property. - * + * * @return the contentEncoding value. */ public String getContentEncoding() { @@ -735,7 +735,7 @@ public String getContentEncoding() { /** * Set the contentEncoding property: The Content-Encoding property. - * + * * @param contentEncoding the contentEncoding value to set. * @return the BlobsDownloadHeaders object itself. */ @@ -746,7 +746,7 @@ public BlobsDownloadHeaders setContentEncoding(String contentEncoding) { /** * Get the xMsCopyStatusDescription property: The x-ms-copy-status-description property. - * + * * @return the xMsCopyStatusDescription value. */ public String getXMsCopyStatusDescription() { @@ -755,7 +755,7 @@ public String getXMsCopyStatusDescription() { /** * Set the xMsCopyStatusDescription property: The x-ms-copy-status-description property. - * + * * @param xMsCopyStatusDescription the xMsCopyStatusDescription value to set. * @return the BlobsDownloadHeaders object itself. */ @@ -766,7 +766,7 @@ public BlobsDownloadHeaders setXMsCopyStatusDescription(String xMsCopyStatusDesc /** * Get the xMsCreationTime property: The x-ms-creation-time property. - * + * * @return the xMsCreationTime value. */ public OffsetDateTime getXMsCreationTime() { @@ -778,7 +778,7 @@ public OffsetDateTime getXMsCreationTime() { /** * Set the xMsCreationTime property: The x-ms-creation-time property. - * + * * @param xMsCreationTime the xMsCreationTime value to set. * @return the BlobsDownloadHeaders object itself. */ @@ -793,7 +793,7 @@ public BlobsDownloadHeaders setXMsCreationTime(OffsetDateTime xMsCreationTime) { /** * Get the xMsLeaseDuration property: The x-ms-lease-duration property. - * + * * @return the xMsLeaseDuration value. */ public LeaseDurationType getXMsLeaseDuration() { @@ -802,7 +802,7 @@ public LeaseDurationType getXMsLeaseDuration() { /** * Set the xMsLeaseDuration property: The x-ms-lease-duration property. - * + * * @param xMsLeaseDuration the xMsLeaseDuration value to set. * @return the BlobsDownloadHeaders object itself. */ @@ -813,7 +813,7 @@ public BlobsDownloadHeaders setXMsLeaseDuration(LeaseDurationType xMsLeaseDurati /** * Get the contentLength property: The Content-Length property. - * + * * @return the contentLength value. */ public Long getContentLength() { @@ -822,7 +822,7 @@ public Long getContentLength() { /** * Set the contentLength property: The Content-Length property. - * + * * @param contentLength the contentLength value to set. * @return the BlobsDownloadHeaders object itself. */ @@ -833,7 +833,7 @@ public BlobsDownloadHeaders setContentLength(Long contentLength) { /** * Get the xMsRequestId property: The x-ms-request-id property. - * + * * @return the xMsRequestId value. */ public String getXMsRequestId() { @@ -842,7 +842,7 @@ public String getXMsRequestId() { /** * Set the xMsRequestId property: The x-ms-request-id property. - * + * * @param xMsRequestId the xMsRequestId value to set. * @return the BlobsDownloadHeaders object itself. */ @@ -853,7 +853,7 @@ public BlobsDownloadHeaders setXMsRequestId(String xMsRequestId) { /** * Get the contentType property: The Content-Type property. - * + * * @return the contentType value. */ public String getContentType() { @@ -862,7 +862,7 @@ public String getContentType() { /** * Set the contentType property: The Content-Type property. - * + * * @param contentType the contentType value to set. * @return the BlobsDownloadHeaders object itself. */ @@ -873,7 +873,7 @@ public BlobsDownloadHeaders setContentType(String contentType) { /** * Get the xMsLastAccessTime property: The x-ms-last-access-time property. - * + * * @return the xMsLastAccessTime value. */ public OffsetDateTime getXMsLastAccessTime() { @@ -885,7 +885,7 @@ public OffsetDateTime getXMsLastAccessTime() { /** * Set the xMsLastAccessTime property: The x-ms-last-access-time property. - * + * * @param xMsLastAccessTime the xMsLastAccessTime value to set. * @return the BlobsDownloadHeaders object itself. */ @@ -900,7 +900,7 @@ public BlobsDownloadHeaders setXMsLastAccessTime(OffsetDateTime xMsLastAccessTim /** * Get the xMsVersion property: The x-ms-version property. - * + * * @return the xMsVersion value. */ public String getXMsVersion() { @@ -909,7 +909,7 @@ public String getXMsVersion() { /** * Set the xMsVersion property: The x-ms-version property. - * + * * @param xMsVersion the xMsVersion value to set. * @return the BlobsDownloadHeaders object itself. */ @@ -920,7 +920,7 @@ public BlobsDownloadHeaders setXMsVersion(String xMsVersion) { /** * Get the xMsCopyId property: The x-ms-copy-id property. - * + * * @return the xMsCopyId value. */ public String getXMsCopyId() { @@ -929,7 +929,7 @@ public String getXMsCopyId() { /** * Set the xMsCopyId property: The x-ms-copy-id property. - * + * * @param xMsCopyId the xMsCopyId value to set. * @return the BlobsDownloadHeaders object itself. */ @@ -940,7 +940,7 @@ public BlobsDownloadHeaders setXMsCopyId(String xMsCopyId) { /** * Get the xMsCopySource property: The x-ms-copy-source property. - * + * * @return the xMsCopySource value. */ public String getXMsCopySource() { @@ -949,7 +949,7 @@ public String getXMsCopySource() { /** * Set the xMsCopySource property: The x-ms-copy-source property. - * + * * @param xMsCopySource the xMsCopySource value to set. * @return the BlobsDownloadHeaders object itself. */ @@ -960,7 +960,7 @@ public BlobsDownloadHeaders setXMsCopySource(String xMsCopySource) { /** * Get the xMsImmutabilityPolicyUntilDate property: The x-ms-immutability-policy-until-date property. - * + * * @return the xMsImmutabilityPolicyUntilDate value. */ public OffsetDateTime getXMsImmutabilityPolicyUntilDate() { @@ -972,7 +972,7 @@ public OffsetDateTime getXMsImmutabilityPolicyUntilDate() { /** * Set the xMsImmutabilityPolicyUntilDate property: The x-ms-immutability-policy-until-date property. - * + * * @param xMsImmutabilityPolicyUntilDate the xMsImmutabilityPolicyUntilDate value to set. * @return the BlobsDownloadHeaders object itself. */ @@ -987,7 +987,7 @@ public BlobsDownloadHeaders setXMsImmutabilityPolicyUntilDate(OffsetDateTime xMs /** * Get the xMsContentCrc64 property: The x-ms-content-crc64 property. - * + * * @return the xMsContentCrc64 value. */ public byte[] getXMsContentCrc64() { @@ -996,7 +996,7 @@ public byte[] getXMsContentCrc64() { /** * Set the xMsContentCrc64 property: The x-ms-content-crc64 property. - * + * * @param xMsContentCrc64 the xMsContentCrc64 value to set. * @return the BlobsDownloadHeaders object itself. */ @@ -1007,7 +1007,7 @@ public BlobsDownloadHeaders setXMsContentCrc64(byte[] xMsContentCrc64) { /** * Get the xMsBlobSequenceNumber property: The x-ms-blob-sequence-number property. - * + * * @return the xMsBlobSequenceNumber value. */ public Long getXMsBlobSequenceNumber() { @@ -1016,7 +1016,7 @@ public Long getXMsBlobSequenceNumber() { /** * Set the xMsBlobSequenceNumber property: The x-ms-blob-sequence-number property. - * + * * @param xMsBlobSequenceNumber the xMsBlobSequenceNumber value to set. * @return the BlobsDownloadHeaders object itself. */ @@ -1027,7 +1027,7 @@ public BlobsDownloadHeaders setXMsBlobSequenceNumber(Long xMsBlobSequenceNumber) /** * Get the xMsCopyProgress property: The x-ms-copy-progress property. - * + * * @return the xMsCopyProgress value. */ public String getXMsCopyProgress() { @@ -1036,7 +1036,7 @@ public String getXMsCopyProgress() { /** * Set the xMsCopyProgress property: The x-ms-copy-progress property. - * + * * @param xMsCopyProgress the xMsCopyProgress value to set. * @return the BlobsDownloadHeaders object itself. */ @@ -1047,7 +1047,7 @@ public BlobsDownloadHeaders setXMsCopyProgress(String xMsCopyProgress) { /** * Get the xMsBlobCommittedBlockCount property: The x-ms-blob-committed-block-count property. - * + * * @return the xMsBlobCommittedBlockCount value. */ public Integer getXMsBlobCommittedBlockCount() { @@ -1056,7 +1056,7 @@ public Integer getXMsBlobCommittedBlockCount() { /** * Set the xMsBlobCommittedBlockCount property: The x-ms-blob-committed-block-count property. - * + * * @param xMsBlobCommittedBlockCount the xMsBlobCommittedBlockCount value to set. * @return the BlobsDownloadHeaders object itself. */ @@ -1067,7 +1067,7 @@ public BlobsDownloadHeaders setXMsBlobCommittedBlockCount(Integer xMsBlobCommitt /** * Get the xMsBlobContentMd5 property: The x-ms-blob-content-md5 property. - * + * * @return the xMsBlobContentMd5 value. */ public byte[] getXMsBlobContentMd5() { @@ -1076,7 +1076,7 @@ public byte[] getXMsBlobContentMd5() { /** * Set the xMsBlobContentMd5 property: The x-ms-blob-content-md5 property. - * + * * @param xMsBlobContentMd5 the xMsBlobContentMd5 value to set. * @return the BlobsDownloadHeaders object itself. */ @@ -1087,7 +1087,7 @@ public BlobsDownloadHeaders setXMsBlobContentMd5(byte[] xMsBlobContentMd5) { /** * Get the xMsMeta property: The x-ms-meta- property. - * + * * @return the xMsMeta value. */ public Map getXMsMeta() { @@ -1096,7 +1096,7 @@ public Map getXMsMeta() { /** * Set the xMsMeta property: The x-ms-meta- property. - * + * * @param xMsMeta the xMsMeta value to set. * @return the BlobsDownloadHeaders object itself. */ @@ -1107,7 +1107,7 @@ public BlobsDownloadHeaders setXMsMeta(Map xMsMeta) { /** * Get the xMsLegalHold property: The x-ms-legal-hold property. - * + * * @return the xMsLegalHold value. */ public Boolean isXMsLegalHold() { @@ -1116,7 +1116,7 @@ public Boolean isXMsLegalHold() { /** * Set the xMsLegalHold property: The x-ms-legal-hold property. - * + * * @param xMsLegalHold the xMsLegalHold value to set. * @return the BlobsDownloadHeaders object itself. */ @@ -1127,7 +1127,7 @@ public BlobsDownloadHeaders setXMsLegalHold(Boolean xMsLegalHold) { /** * Get the date property: The Date property. - * + * * @return the date value. */ public OffsetDateTime getDate() { @@ -1139,7 +1139,7 @@ public OffsetDateTime getDate() { /** * Set the date property: The Date property. - * + * * @param date the date value to set. * @return the BlobsDownloadHeaders object itself. */ @@ -1154,7 +1154,7 @@ public BlobsDownloadHeaders setDate(OffsetDateTime date) { /** * Get the contentMD5 property: The Content-MD5 property. - * + * * @return the contentMD5 value. */ public byte[] getContentMD5() { @@ -1163,7 +1163,7 @@ public byte[] getContentMD5() { /** * Set the contentMD5 property: The Content-MD5 property. - * + * * @param contentMD5 the contentMD5 value to set. * @return the BlobsDownloadHeaders object itself. */ @@ -1174,7 +1174,7 @@ public BlobsDownloadHeaders setContentMD5(byte[] contentMD5) { /** * Get the xMsCopyCompletionTime property: The x-ms-copy-completion-time property. - * + * * @return the xMsCopyCompletionTime value. */ public OffsetDateTime getXMsCopyCompletionTime() { @@ -1186,7 +1186,7 @@ public OffsetDateTime getXMsCopyCompletionTime() { /** * Set the xMsCopyCompletionTime property: The x-ms-copy-completion-time property. - * + * * @param xMsCopyCompletionTime the xMsCopyCompletionTime value to set. * @return the BlobsDownloadHeaders object itself. */ @@ -1201,7 +1201,7 @@ public BlobsDownloadHeaders setXMsCopyCompletionTime(OffsetDateTime xMsCopyCompl /** * Get the acceptRanges property: The Accept-Ranges property. - * + * * @return the acceptRanges value. */ public String getAcceptRanges() { @@ -1210,7 +1210,7 @@ public String getAcceptRanges() { /** * Set the acceptRanges property: The Accept-Ranges property. - * + * * @param acceptRanges the acceptRanges value to set. * @return the BlobsDownloadHeaders object itself. */ @@ -1221,7 +1221,7 @@ public BlobsDownloadHeaders setAcceptRanges(String acceptRanges) { /** * Get the xMsServerEncrypted property: The x-ms-server-encrypted property. - * + * * @return the xMsServerEncrypted value. */ public Boolean isXMsServerEncrypted() { @@ -1230,7 +1230,7 @@ public Boolean isXMsServerEncrypted() { /** * Set the xMsServerEncrypted property: The x-ms-server-encrypted property. - * + * * @param xMsServerEncrypted the xMsServerEncrypted value to set. * @return the BlobsDownloadHeaders object itself. */ @@ -1241,7 +1241,7 @@ public BlobsDownloadHeaders setXMsServerEncrypted(Boolean xMsServerEncrypted) { /** * Get the xMsOrPolicyId property: The x-ms-or-policy-id property. - * + * * @return the xMsOrPolicyId value. */ public String getXMsOrPolicyId() { @@ -1250,7 +1250,7 @@ public String getXMsOrPolicyId() { /** * Set the xMsOrPolicyId property: The x-ms-or-policy-id property. - * + * * @param xMsOrPolicyId the xMsOrPolicyId value to set. * @return the BlobsDownloadHeaders object itself. */ @@ -1261,7 +1261,7 @@ public BlobsDownloadHeaders setXMsOrPolicyId(String xMsOrPolicyId) { /** * Get the cacheControl property: The Cache-Control property. - * + * * @return the cacheControl value. */ public String getCacheControl() { @@ -1270,7 +1270,7 @@ public String getCacheControl() { /** * Set the cacheControl property: The Cache-Control property. - * + * * @param cacheControl the cacheControl value to set. * @return the BlobsDownloadHeaders object itself. */ @@ -1281,7 +1281,7 @@ public BlobsDownloadHeaders setCacheControl(String cacheControl) { /** * Get the eTag property: The ETag property. - * + * * @return the eTag value. */ public String getETag() { @@ -1290,7 +1290,7 @@ public String getETag() { /** * Set the eTag property: The ETag property. - * + * * @param eTag the eTag value to set. * @return the BlobsDownloadHeaders object itself. */ @@ -1301,7 +1301,7 @@ public BlobsDownloadHeaders setETag(String eTag) { /** * Get the contentDisposition property: The Content-Disposition property. - * + * * @return the contentDisposition value. */ public String getContentDisposition() { @@ -1310,7 +1310,7 @@ public String getContentDisposition() { /** * Set the contentDisposition property: The Content-Disposition property. - * + * * @param contentDisposition the contentDisposition value to set. * @return the BlobsDownloadHeaders object itself. */ @@ -1321,7 +1321,7 @@ public BlobsDownloadHeaders setContentDisposition(String contentDisposition) { /** * Get the xMsCopyStatus property: The x-ms-copy-status property. - * + * * @return the xMsCopyStatus value. */ public CopyStatusType getXMsCopyStatus() { @@ -1330,7 +1330,7 @@ public CopyStatusType getXMsCopyStatus() { /** * Set the xMsCopyStatus property: The x-ms-copy-status property. - * + * * @param xMsCopyStatus the xMsCopyStatus value to set. * @return the BlobsDownloadHeaders object itself. */ @@ -1341,7 +1341,7 @@ public BlobsDownloadHeaders setXMsCopyStatus(CopyStatusType xMsCopyStatus) { /** * Get the contentLanguage property: The Content-Language property. - * + * * @return the contentLanguage value. */ public String getContentLanguage() { @@ -1350,7 +1350,7 @@ public String getContentLanguage() { /** * Set the contentLanguage property: The Content-Language property. - * + * * @param contentLanguage the contentLanguage value to set. * @return the BlobsDownloadHeaders object itself. */ @@ -1361,7 +1361,7 @@ public BlobsDownloadHeaders setContentLanguage(String contentLanguage) { /** * Get the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @return the xMsClientRequestId value. */ public String getXMsClientRequestId() { @@ -1370,7 +1370,7 @@ public String getXMsClientRequestId() { /** * Set the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @param xMsClientRequestId the xMsClientRequestId value to set. * @return the BlobsDownloadHeaders object itself. */ @@ -1381,7 +1381,7 @@ public BlobsDownloadHeaders setXMsClientRequestId(String xMsClientRequestId) { /** * Get the xMsOr property: The x-ms-or- property. - * + * * @return the xMsOr value. */ public Map getXMsOr() { @@ -1390,7 +1390,7 @@ public Map getXMsOr() { /** * Set the xMsOr property: The x-ms-or- property. - * + * * @param xMsOr the xMsOr value to set. * @return the BlobsDownloadHeaders object itself. */ @@ -1401,7 +1401,7 @@ public BlobsDownloadHeaders setXMsOr(Map xMsOr) { /** * Get the xMsEncryptionScope property: The x-ms-encryption-scope property. - * + * * @return the xMsEncryptionScope value. */ public String getXMsEncryptionScope() { @@ -1410,7 +1410,7 @@ public String getXMsEncryptionScope() { /** * Set the xMsEncryptionScope property: The x-ms-encryption-scope property. - * + * * @param xMsEncryptionScope the xMsEncryptionScope value to set. * @return the BlobsDownloadHeaders object itself. */ diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlobsGetAccountInfoHeaders.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobsGetAccountInfoHeaders.java similarity index 97% rename from sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlobsGetAccountInfoHeaders.java rename to sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobsGetAccountInfoHeaders.java index 8373bd23c664..8e748f909a52 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlobsGetAccountInfoHeaders.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobsGetAccountInfoHeaders.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.blob.models; +package com.azure.v2.storage.blob.models; import com.azure.core.v2.annotation.Fluent; import io.clientcore.core.http.models.DateTimeRfc1123; @@ -62,7 +62,7 @@ public final class BlobsGetAccountInfoHeaders { // HttpHeaders containing the raw property values. /** * Creates an instance of BlobsGetAccountInfoHeaders class. - * + * * @param rawHeaders The raw HttpHeaders that will be used to create the property values. */ public BlobsGetAccountInfoHeaders(HttpHeaders rawHeaders) { @@ -89,7 +89,7 @@ public BlobsGetAccountInfoHeaders(HttpHeaders rawHeaders) { /** * Get the xMsVersion property: The x-ms-version property. - * + * * @return the xMsVersion value. */ public String getXMsVersion() { @@ -98,7 +98,7 @@ public String getXMsVersion() { /** * Set the xMsVersion property: The x-ms-version property. - * + * * @param xMsVersion the xMsVersion value to set. * @return the BlobsGetAccountInfoHeaders object itself. */ @@ -109,7 +109,7 @@ public BlobsGetAccountInfoHeaders setXMsVersion(String xMsVersion) { /** * Get the xMsAccountKind property: The x-ms-account-kind property. - * + * * @return the xMsAccountKind value. */ public AccountKind getXMsAccountKind() { @@ -118,7 +118,7 @@ public AccountKind getXMsAccountKind() { /** * Set the xMsAccountKind property: The x-ms-account-kind property. - * + * * @param xMsAccountKind the xMsAccountKind value to set. * @return the BlobsGetAccountInfoHeaders object itself. */ @@ -129,7 +129,7 @@ public BlobsGetAccountInfoHeaders setXMsAccountKind(AccountKind xMsAccountKind) /** * Get the xMsIsHnsEnabled property: The x-ms-is-hns-enabled property. - * + * * @return the xMsIsHnsEnabled value. */ public Boolean isXMsIsHnsEnabled() { @@ -138,7 +138,7 @@ public Boolean isXMsIsHnsEnabled() { /** * Set the xMsIsHnsEnabled property: The x-ms-is-hns-enabled property. - * + * * @param xMsIsHnsEnabled the xMsIsHnsEnabled value to set. * @return the BlobsGetAccountInfoHeaders object itself. */ @@ -149,7 +149,7 @@ public BlobsGetAccountInfoHeaders setXMsIsHnsEnabled(Boolean xMsIsHnsEnabled) { /** * Get the xMsSkuName property: The x-ms-sku-name property. - * + * * @return the xMsSkuName value. */ public SkuName getXMsSkuName() { @@ -158,7 +158,7 @@ public SkuName getXMsSkuName() { /** * Set the xMsSkuName property: The x-ms-sku-name property. - * + * * @param xMsSkuName the xMsSkuName value to set. * @return the BlobsGetAccountInfoHeaders object itself. */ @@ -169,7 +169,7 @@ public BlobsGetAccountInfoHeaders setXMsSkuName(SkuName xMsSkuName) { /** * Get the xMsRequestId property: The x-ms-request-id property. - * + * * @return the xMsRequestId value. */ public String getXMsRequestId() { @@ -178,7 +178,7 @@ public String getXMsRequestId() { /** * Set the xMsRequestId property: The x-ms-request-id property. - * + * * @param xMsRequestId the xMsRequestId value to set. * @return the BlobsGetAccountInfoHeaders object itself. */ @@ -189,7 +189,7 @@ public BlobsGetAccountInfoHeaders setXMsRequestId(String xMsRequestId) { /** * Get the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @return the xMsClientRequestId value. */ public String getXMsClientRequestId() { @@ -198,7 +198,7 @@ public String getXMsClientRequestId() { /** * Set the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @param xMsClientRequestId the xMsClientRequestId value to set. * @return the BlobsGetAccountInfoHeaders object itself. */ @@ -209,7 +209,7 @@ public BlobsGetAccountInfoHeaders setXMsClientRequestId(String xMsClientRequestI /** * Get the date property: The Date property. - * + * * @return the date value. */ public OffsetDateTime getDate() { @@ -221,7 +221,7 @@ public OffsetDateTime getDate() { /** * Set the date property: The Date property. - * + * * @param date the date value to set. * @return the BlobsGetAccountInfoHeaders object itself. */ diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlobsGetPropertiesHeaders.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobsGetPropertiesHeaders.java similarity index 98% rename from sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlobsGetPropertiesHeaders.java rename to sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobsGetPropertiesHeaders.java index 14db68b3c116..9b477d7362ef 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlobsGetPropertiesHeaders.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobsGetPropertiesHeaders.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.blob.models; +package com.azure.v2.storage.blob.models; import com.azure.core.v2.annotation.Fluent; import io.clientcore.core.http.models.HttpHeader; @@ -347,7 +347,7 @@ public final class BlobsGetPropertiesHeaders { // HttpHeaders containing the raw property values. /** * Creates an instance of BlobsGetPropertiesHeaders class. - * + * * @param rawHeaders The raw HttpHeaders that will be used to create the property values. */ public BlobsGetPropertiesHeaders(HttpHeaders rawHeaders) { @@ -493,7 +493,7 @@ public BlobsGetPropertiesHeaders(HttpHeaders rawHeaders) { /** * Get the xMsIsCurrentVersion property: The x-ms-is-current-version property. - * + * * @return the xMsIsCurrentVersion value. */ public Boolean isXMsIsCurrentVersion() { @@ -502,7 +502,7 @@ public Boolean isXMsIsCurrentVersion() { /** * Set the xMsIsCurrentVersion property: The x-ms-is-current-version property. - * + * * @param xMsIsCurrentVersion the xMsIsCurrentVersion value to set. * @return the BlobsGetPropertiesHeaders object itself. */ @@ -513,7 +513,7 @@ public BlobsGetPropertiesHeaders setXMsIsCurrentVersion(Boolean xMsIsCurrentVers /** * Get the xMsLeaseStatus property: The x-ms-lease-status property. - * + * * @return the xMsLeaseStatus value. */ public LeaseStatusType getXMsLeaseStatus() { @@ -522,7 +522,7 @@ public LeaseStatusType getXMsLeaseStatus() { /** * Set the xMsLeaseStatus property: The x-ms-lease-status property. - * + * * @param xMsLeaseStatus the xMsLeaseStatus value to set. * @return the BlobsGetPropertiesHeaders object itself. */ @@ -533,7 +533,7 @@ public BlobsGetPropertiesHeaders setXMsLeaseStatus(LeaseStatusType xMsLeaseStatu /** * Get the xMsCopyDestinationSnapshot property: The x-ms-copy-destination-snapshot property. - * + * * @return the xMsCopyDestinationSnapshot value. */ public String getXMsCopyDestinationSnapshot() { @@ -542,7 +542,7 @@ public String getXMsCopyDestinationSnapshot() { /** * Set the xMsCopyDestinationSnapshot property: The x-ms-copy-destination-snapshot property. - * + * * @param xMsCopyDestinationSnapshot the xMsCopyDestinationSnapshot value to set. * @return the BlobsGetPropertiesHeaders object itself. */ @@ -553,7 +553,7 @@ public BlobsGetPropertiesHeaders setXMsCopyDestinationSnapshot(String xMsCopyDes /** * Get the xMsLeaseState property: The x-ms-lease-state property. - * + * * @return the xMsLeaseState value. */ public LeaseStateType getXMsLeaseState() { @@ -562,7 +562,7 @@ public LeaseStateType getXMsLeaseState() { /** * Set the xMsLeaseState property: The x-ms-lease-state property. - * + * * @param xMsLeaseState the xMsLeaseState value to set. * @return the BlobsGetPropertiesHeaders object itself. */ @@ -573,7 +573,7 @@ public BlobsGetPropertiesHeaders setXMsLeaseState(LeaseStateType xMsLeaseState) /** * Get the xMsBlobSealed property: The x-ms-blob-sealed property. - * + * * @return the xMsBlobSealed value. */ public Boolean isXMsBlobSealed() { @@ -582,7 +582,7 @@ public Boolean isXMsBlobSealed() { /** * Set the xMsBlobSealed property: The x-ms-blob-sealed property. - * + * * @param xMsBlobSealed the xMsBlobSealed value to set. * @return the BlobsGetPropertiesHeaders object itself. */ @@ -593,7 +593,7 @@ public BlobsGetPropertiesHeaders setXMsBlobSealed(Boolean xMsBlobSealed) { /** * Get the xMsVersionId property: The x-ms-version-id property. - * + * * @return the xMsVersionId value. */ public String getXMsVersionId() { @@ -602,7 +602,7 @@ public String getXMsVersionId() { /** * Set the xMsVersionId property: The x-ms-version-id property. - * + * * @param xMsVersionId the xMsVersionId value to set. * @return the BlobsGetPropertiesHeaders object itself. */ @@ -613,7 +613,7 @@ public BlobsGetPropertiesHeaders setXMsVersionId(String xMsVersionId) { /** * Get the xMsEncryptionKeySha256 property: The x-ms-encryption-key-sha256 property. - * + * * @return the xMsEncryptionKeySha256 value. */ public String getXMsEncryptionKeySha256() { @@ -622,7 +622,7 @@ public String getXMsEncryptionKeySha256() { /** * Set the xMsEncryptionKeySha256 property: The x-ms-encryption-key-sha256 property. - * + * * @param xMsEncryptionKeySha256 the xMsEncryptionKeySha256 value to set. * @return the BlobsGetPropertiesHeaders object itself. */ @@ -633,7 +633,7 @@ public BlobsGetPropertiesHeaders setXMsEncryptionKeySha256(String xMsEncryptionK /** * Get the xMsAccessTierChangeTime property: The x-ms-access-tier-change-time property. - * + * * @return the xMsAccessTierChangeTime value. */ public OffsetDateTime getXMsAccessTierChangeTime() { @@ -645,7 +645,7 @@ public OffsetDateTime getXMsAccessTierChangeTime() { /** * Set the xMsAccessTierChangeTime property: The x-ms-access-tier-change-time property. - * + * * @param xMsAccessTierChangeTime the xMsAccessTierChangeTime value to set. * @return the BlobsGetPropertiesHeaders object itself. */ @@ -660,7 +660,7 @@ public BlobsGetPropertiesHeaders setXMsAccessTierChangeTime(OffsetDateTime xMsAc /** * Get the xMsBlobType property: The x-ms-blob-type property. - * + * * @return the xMsBlobType value. */ public BlobType getXMsBlobType() { @@ -669,7 +669,7 @@ public BlobType getXMsBlobType() { /** * Set the xMsBlobType property: The x-ms-blob-type property. - * + * * @param xMsBlobType the xMsBlobType value to set. * @return the BlobsGetPropertiesHeaders object itself. */ @@ -680,7 +680,7 @@ public BlobsGetPropertiesHeaders setXMsBlobType(BlobType xMsBlobType) { /** * Get the contentEncoding property: The Content-Encoding property. - * + * * @return the contentEncoding value. */ public String getContentEncoding() { @@ -689,7 +689,7 @@ public String getContentEncoding() { /** * Set the contentEncoding property: The Content-Encoding property. - * + * * @param contentEncoding the contentEncoding value to set. * @return the BlobsGetPropertiesHeaders object itself. */ @@ -700,7 +700,7 @@ public BlobsGetPropertiesHeaders setContentEncoding(String contentEncoding) { /** * Get the xMsCreationTime property: The x-ms-creation-time property. - * + * * @return the xMsCreationTime value. */ public OffsetDateTime getXMsCreationTime() { @@ -712,7 +712,7 @@ public OffsetDateTime getXMsCreationTime() { /** * Set the xMsCreationTime property: The x-ms-creation-time property. - * + * * @param xMsCreationTime the xMsCreationTime value to set. * @return the BlobsGetPropertiesHeaders object itself. */ @@ -727,7 +727,7 @@ public BlobsGetPropertiesHeaders setXMsCreationTime(OffsetDateTime xMsCreationTi /** * Get the xMsIncrementalCopy property: The x-ms-incremental-copy property. - * + * * @return the xMsIncrementalCopy value. */ public Boolean isXMsIncrementalCopy() { @@ -736,7 +736,7 @@ public Boolean isXMsIncrementalCopy() { /** * Set the xMsIncrementalCopy property: The x-ms-incremental-copy property. - * + * * @param xMsIncrementalCopy the xMsIncrementalCopy value to set. * @return the BlobsGetPropertiesHeaders object itself. */ @@ -747,7 +747,7 @@ public BlobsGetPropertiesHeaders setXMsIncrementalCopy(Boolean xMsIncrementalCop /** * Get the xMsLeaseDuration property: The x-ms-lease-duration property. - * + * * @return the xMsLeaseDuration value. */ public LeaseDurationType getXMsLeaseDuration() { @@ -756,7 +756,7 @@ public LeaseDurationType getXMsLeaseDuration() { /** * Set the xMsLeaseDuration property: The x-ms-lease-duration property. - * + * * @param xMsLeaseDuration the xMsLeaseDuration value to set. * @return the BlobsGetPropertiesHeaders object itself. */ @@ -767,7 +767,7 @@ public BlobsGetPropertiesHeaders setXMsLeaseDuration(LeaseDurationType xMsLeaseD /** * Get the xMsVersion property: The x-ms-version property. - * + * * @return the xMsVersion value. */ public String getXMsVersion() { @@ -776,7 +776,7 @@ public String getXMsVersion() { /** * Set the xMsVersion property: The x-ms-version property. - * + * * @param xMsVersion the xMsVersion value to set. * @return the BlobsGetPropertiesHeaders object itself. */ @@ -787,7 +787,7 @@ public BlobsGetPropertiesHeaders setXMsVersion(String xMsVersion) { /** * Get the xMsCopyId property: The x-ms-copy-id property. - * + * * @return the xMsCopyId value. */ public String getXMsCopyId() { @@ -796,7 +796,7 @@ public String getXMsCopyId() { /** * Set the xMsCopyId property: The x-ms-copy-id property. - * + * * @param xMsCopyId the xMsCopyId value to set. * @return the BlobsGetPropertiesHeaders object itself. */ @@ -807,7 +807,7 @@ public BlobsGetPropertiesHeaders setXMsCopyId(String xMsCopyId) { /** * Get the xMsImmutabilityPolicyUntilDate property: The x-ms-immutability-policy-until-date property. - * + * * @return the xMsImmutabilityPolicyUntilDate value. */ public OffsetDateTime getXMsImmutabilityPolicyUntilDate() { @@ -819,7 +819,7 @@ public OffsetDateTime getXMsImmutabilityPolicyUntilDate() { /** * Set the xMsImmutabilityPolicyUntilDate property: The x-ms-immutability-policy-until-date property. - * + * * @param xMsImmutabilityPolicyUntilDate the xMsImmutabilityPolicyUntilDate value to set. * @return the BlobsGetPropertiesHeaders object itself. */ @@ -834,7 +834,7 @@ public BlobsGetPropertiesHeaders setXMsImmutabilityPolicyUntilDate(OffsetDateTim /** * Get the xMsBlobSequenceNumber property: The x-ms-blob-sequence-number property. - * + * * @return the xMsBlobSequenceNumber value. */ public Long getXMsBlobSequenceNumber() { @@ -843,7 +843,7 @@ public Long getXMsBlobSequenceNumber() { /** * Set the xMsBlobSequenceNumber property: The x-ms-blob-sequence-number property. - * + * * @param xMsBlobSequenceNumber the xMsBlobSequenceNumber value to set. * @return the BlobsGetPropertiesHeaders object itself. */ @@ -854,7 +854,7 @@ public BlobsGetPropertiesHeaders setXMsBlobSequenceNumber(Long xMsBlobSequenceNu /** * Get the xMsBlobCommittedBlockCount property: The x-ms-blob-committed-block-count property. - * + * * @return the xMsBlobCommittedBlockCount value. */ public Integer getXMsBlobCommittedBlockCount() { @@ -863,7 +863,7 @@ public Integer getXMsBlobCommittedBlockCount() { /** * Set the xMsBlobCommittedBlockCount property: The x-ms-blob-committed-block-count property. - * + * * @param xMsBlobCommittedBlockCount the xMsBlobCommittedBlockCount value to set. * @return the BlobsGetPropertiesHeaders object itself. */ @@ -874,7 +874,7 @@ public BlobsGetPropertiesHeaders setXMsBlobCommittedBlockCount(Integer xMsBlobCo /** * Get the xMsLegalHold property: The x-ms-legal-hold property. - * + * * @return the xMsLegalHold value. */ public Boolean isXMsLegalHold() { @@ -883,7 +883,7 @@ public Boolean isXMsLegalHold() { /** * Set the xMsLegalHold property: The x-ms-legal-hold property. - * + * * @param xMsLegalHold the xMsLegalHold value to set. * @return the BlobsGetPropertiesHeaders object itself. */ @@ -894,7 +894,7 @@ public BlobsGetPropertiesHeaders setXMsLegalHold(Boolean xMsLegalHold) { /** * Get the contentMD5 property: The Content-MD5 property. - * + * * @return the contentMD5 value. */ public byte[] getContentMD5() { @@ -903,7 +903,7 @@ public byte[] getContentMD5() { /** * Set the contentMD5 property: The Content-MD5 property. - * + * * @param contentMD5 the contentMD5 value to set. * @return the BlobsGetPropertiesHeaders object itself. */ @@ -914,7 +914,7 @@ public BlobsGetPropertiesHeaders setContentMD5(byte[] contentMD5) { /** * Get the xMsOrPolicyId property: The x-ms-or-policy-id property. - * + * * @return the xMsOrPolicyId value. */ public String getXMsOrPolicyId() { @@ -923,7 +923,7 @@ public String getXMsOrPolicyId() { /** * Set the xMsOrPolicyId property: The x-ms-or-policy-id property. - * + * * @param xMsOrPolicyId the xMsOrPolicyId value to set. * @return the BlobsGetPropertiesHeaders object itself. */ @@ -934,7 +934,7 @@ public BlobsGetPropertiesHeaders setXMsOrPolicyId(String xMsOrPolicyId) { /** * Get the cacheControl property: The Cache-Control property. - * + * * @return the cacheControl value. */ public String getCacheControl() { @@ -943,7 +943,7 @@ public String getCacheControl() { /** * Set the cacheControl property: The Cache-Control property. - * + * * @param cacheControl the cacheControl value to set. * @return the BlobsGetPropertiesHeaders object itself. */ @@ -954,7 +954,7 @@ public BlobsGetPropertiesHeaders setCacheControl(String cacheControl) { /** * Get the eTag property: The ETag property. - * + * * @return the eTag value. */ public String getETag() { @@ -963,7 +963,7 @@ public String getETag() { /** * Set the eTag property: The ETag property. - * + * * @param eTag the eTag value to set. * @return the BlobsGetPropertiesHeaders object itself. */ @@ -974,7 +974,7 @@ public BlobsGetPropertiesHeaders setETag(String eTag) { /** * Get the contentDisposition property: The Content-Disposition property. - * + * * @return the contentDisposition value. */ public String getContentDisposition() { @@ -983,7 +983,7 @@ public String getContentDisposition() { /** * Set the contentDisposition property: The Content-Disposition property. - * + * * @param contentDisposition the contentDisposition value to set. * @return the BlobsGetPropertiesHeaders object itself. */ @@ -994,7 +994,7 @@ public BlobsGetPropertiesHeaders setContentDisposition(String contentDisposition /** * Get the contentLanguage property: The Content-Language property. - * + * * @return the contentLanguage value. */ public String getContentLanguage() { @@ -1003,7 +1003,7 @@ public String getContentLanguage() { /** * Set the contentLanguage property: The Content-Language property. - * + * * @param contentLanguage the contentLanguage value to set. * @return the BlobsGetPropertiesHeaders object itself. */ @@ -1014,7 +1014,7 @@ public BlobsGetPropertiesHeaders setContentLanguage(String contentLanguage) { /** * Get the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @return the xMsClientRequestId value. */ public String getXMsClientRequestId() { @@ -1023,7 +1023,7 @@ public String getXMsClientRequestId() { /** * Set the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @param xMsClientRequestId the xMsClientRequestId value to set. * @return the BlobsGetPropertiesHeaders object itself. */ @@ -1034,7 +1034,7 @@ public BlobsGetPropertiesHeaders setXMsClientRequestId(String xMsClientRequestId /** * Get the xMsOr property: The x-ms-or- property. - * + * * @return the xMsOr value. */ public Map getXMsOr() { @@ -1043,7 +1043,7 @@ public Map getXMsOr() { /** * Set the xMsOr property: The x-ms-or- property. - * + * * @param xMsOr the xMsOr value to set. * @return the BlobsGetPropertiesHeaders object itself. */ @@ -1054,7 +1054,7 @@ public BlobsGetPropertiesHeaders setXMsOr(Map xMsOr) { /** * Get the xMsEncryptionScope property: The x-ms-encryption-scope property. - * + * * @return the xMsEncryptionScope value. */ public String getXMsEncryptionScope() { @@ -1063,7 +1063,7 @@ public String getXMsEncryptionScope() { /** * Set the xMsEncryptionScope property: The x-ms-encryption-scope property. - * + * * @param xMsEncryptionScope the xMsEncryptionScope value to set. * @return the BlobsGetPropertiesHeaders object itself. */ @@ -1074,7 +1074,7 @@ public BlobsGetPropertiesHeaders setXMsEncryptionScope(String xMsEncryptionScope /** * Get the xMsTagCount property: The x-ms-tag-count property. - * + * * @return the xMsTagCount value. */ public Long getXMsTagCount() { @@ -1083,7 +1083,7 @@ public Long getXMsTagCount() { /** * Set the xMsTagCount property: The x-ms-tag-count property. - * + * * @param xMsTagCount the xMsTagCount value to set. * @return the BlobsGetPropertiesHeaders object itself. */ @@ -1094,7 +1094,7 @@ public BlobsGetPropertiesHeaders setXMsTagCount(Long xMsTagCount) { /** * Get the lastModified property: The Last-Modified property. - * + * * @return the lastModified value. */ public OffsetDateTime getLastModified() { @@ -1106,7 +1106,7 @@ public OffsetDateTime getLastModified() { /** * Set the lastModified property: The Last-Modified property. - * + * * @param lastModified the lastModified value to set. * @return the BlobsGetPropertiesHeaders object itself. */ @@ -1121,7 +1121,7 @@ public BlobsGetPropertiesHeaders setLastModified(OffsetDateTime lastModified) { /** * Get the xMsAccessTierInferred property: The x-ms-access-tier-inferred property. - * + * * @return the xMsAccessTierInferred value. */ public Boolean isXMsAccessTierInferred() { @@ -1130,7 +1130,7 @@ public Boolean isXMsAccessTierInferred() { /** * Set the xMsAccessTierInferred property: The x-ms-access-tier-inferred property. - * + * * @param xMsAccessTierInferred the xMsAccessTierInferred value to set. * @return the BlobsGetPropertiesHeaders object itself. */ @@ -1141,7 +1141,7 @@ public BlobsGetPropertiesHeaders setXMsAccessTierInferred(Boolean xMsAccessTierI /** * Get the xMsImmutabilityPolicyMode property: The x-ms-immutability-policy-mode property. - * + * * @return the xMsImmutabilityPolicyMode value. */ public BlobImmutabilityPolicyMode getXMsImmutabilityPolicyMode() { @@ -1150,7 +1150,7 @@ public BlobImmutabilityPolicyMode getXMsImmutabilityPolicyMode() { /** * Set the xMsImmutabilityPolicyMode property: The x-ms-immutability-policy-mode property. - * + * * @param xMsImmutabilityPolicyMode the xMsImmutabilityPolicyMode value to set. * @return the BlobsGetPropertiesHeaders object itself. */ @@ -1162,7 +1162,7 @@ public BlobImmutabilityPolicyMode getXMsImmutabilityPolicyMode() { /** * Get the xMsAccessTier property: The x-ms-access-tier property. - * + * * @return the xMsAccessTier value. */ public String getXMsAccessTier() { @@ -1171,7 +1171,7 @@ public String getXMsAccessTier() { /** * Set the xMsAccessTier property: The x-ms-access-tier property. - * + * * @param xMsAccessTier the xMsAccessTier value to set. * @return the BlobsGetPropertiesHeaders object itself. */ @@ -1182,7 +1182,7 @@ public BlobsGetPropertiesHeaders setXMsAccessTier(String xMsAccessTier) { /** * Get the xMsCopyStatusDescription property: The x-ms-copy-status-description property. - * + * * @return the xMsCopyStatusDescription value. */ public String getXMsCopyStatusDescription() { @@ -1191,7 +1191,7 @@ public String getXMsCopyStatusDescription() { /** * Set the xMsCopyStatusDescription property: The x-ms-copy-status-description property. - * + * * @param xMsCopyStatusDescription the xMsCopyStatusDescription value to set. * @return the BlobsGetPropertiesHeaders object itself. */ @@ -1202,7 +1202,7 @@ public BlobsGetPropertiesHeaders setXMsCopyStatusDescription(String xMsCopyStatu /** * Get the contentLength property: The Content-Length property. - * + * * @return the contentLength value. */ public Long getContentLength() { @@ -1211,7 +1211,7 @@ public Long getContentLength() { /** * Set the contentLength property: The Content-Length property. - * + * * @param contentLength the contentLength value to set. * @return the BlobsGetPropertiesHeaders object itself. */ @@ -1222,7 +1222,7 @@ public BlobsGetPropertiesHeaders setContentLength(Long contentLength) { /** * Get the xMsRequestId property: The x-ms-request-id property. - * + * * @return the xMsRequestId value. */ public String getXMsRequestId() { @@ -1231,7 +1231,7 @@ public String getXMsRequestId() { /** * Set the xMsRequestId property: The x-ms-request-id property. - * + * * @param xMsRequestId the xMsRequestId value to set. * @return the BlobsGetPropertiesHeaders object itself. */ @@ -1242,7 +1242,7 @@ public BlobsGetPropertiesHeaders setXMsRequestId(String xMsRequestId) { /** * Get the contentType property: The Content-Type property. - * + * * @return the contentType value. */ public String getContentType() { @@ -1251,7 +1251,7 @@ public String getContentType() { /** * Set the contentType property: The Content-Type property. - * + * * @param contentType the contentType value to set. * @return the BlobsGetPropertiesHeaders object itself. */ @@ -1262,7 +1262,7 @@ public BlobsGetPropertiesHeaders setContentType(String contentType) { /** * Get the xMsLastAccessTime property: The x-ms-last-access-time property. - * + * * @return the xMsLastAccessTime value. */ public OffsetDateTime getXMsLastAccessTime() { @@ -1274,7 +1274,7 @@ public OffsetDateTime getXMsLastAccessTime() { /** * Set the xMsLastAccessTime property: The x-ms-last-access-time property. - * + * * @param xMsLastAccessTime the xMsLastAccessTime value to set. * @return the BlobsGetPropertiesHeaders object itself. */ @@ -1289,7 +1289,7 @@ public BlobsGetPropertiesHeaders setXMsLastAccessTime(OffsetDateTime xMsLastAcce /** * Get the xMsCopySource property: The x-ms-copy-source property. - * + * * @return the xMsCopySource value. */ public String getXMsCopySource() { @@ -1298,7 +1298,7 @@ public String getXMsCopySource() { /** * Set the xMsCopySource property: The x-ms-copy-source property. - * + * * @param xMsCopySource the xMsCopySource value to set. * @return the BlobsGetPropertiesHeaders object itself. */ @@ -1309,7 +1309,7 @@ public BlobsGetPropertiesHeaders setXMsCopySource(String xMsCopySource) { /** * Get the xMsCopyProgress property: The x-ms-copy-progress property. - * + * * @return the xMsCopyProgress value. */ public String getXMsCopyProgress() { @@ -1318,7 +1318,7 @@ public String getXMsCopyProgress() { /** * Set the xMsCopyProgress property: The x-ms-copy-progress property. - * + * * @param xMsCopyProgress the xMsCopyProgress value to set. * @return the BlobsGetPropertiesHeaders object itself. */ @@ -1329,7 +1329,7 @@ public BlobsGetPropertiesHeaders setXMsCopyProgress(String xMsCopyProgress) { /** * Get the xMsMeta property: The x-ms-meta- property. - * + * * @return the xMsMeta value. */ public Map getXMsMeta() { @@ -1338,7 +1338,7 @@ public Map getXMsMeta() { /** * Set the xMsMeta property: The x-ms-meta- property. - * + * * @param xMsMeta the xMsMeta value to set. * @return the BlobsGetPropertiesHeaders object itself. */ @@ -1349,7 +1349,7 @@ public BlobsGetPropertiesHeaders setXMsMeta(Map xMsMeta) { /** * Get the date property: The Date property. - * + * * @return the date value. */ public OffsetDateTime getDate() { @@ -1361,7 +1361,7 @@ public OffsetDateTime getDate() { /** * Set the date property: The Date property. - * + * * @param date the date value to set. * @return the BlobsGetPropertiesHeaders object itself. */ @@ -1376,7 +1376,7 @@ public BlobsGetPropertiesHeaders setDate(OffsetDateTime date) { /** * Get the xMsExpiryTime property: The x-ms-expiry-time property. - * + * * @return the xMsExpiryTime value. */ public OffsetDateTime getXMsExpiryTime() { @@ -1388,7 +1388,7 @@ public OffsetDateTime getXMsExpiryTime() { /** * Set the xMsExpiryTime property: The x-ms-expiry-time property. - * + * * @param xMsExpiryTime the xMsExpiryTime value to set. * @return the BlobsGetPropertiesHeaders object itself. */ @@ -1403,7 +1403,7 @@ public BlobsGetPropertiesHeaders setXMsExpiryTime(OffsetDateTime xMsExpiryTime) /** * Get the xMsCopyCompletionTime property: The x-ms-copy-completion-time property. - * + * * @return the xMsCopyCompletionTime value. */ public OffsetDateTime getXMsCopyCompletionTime() { @@ -1415,7 +1415,7 @@ public OffsetDateTime getXMsCopyCompletionTime() { /** * Set the xMsCopyCompletionTime property: The x-ms-copy-completion-time property. - * + * * @param xMsCopyCompletionTime the xMsCopyCompletionTime value to set. * @return the BlobsGetPropertiesHeaders object itself. */ @@ -1430,7 +1430,7 @@ public BlobsGetPropertiesHeaders setXMsCopyCompletionTime(OffsetDateTime xMsCopy /** * Get the acceptRanges property: The Accept-Ranges property. - * + * * @return the acceptRanges value. */ public String getAcceptRanges() { @@ -1439,7 +1439,7 @@ public String getAcceptRanges() { /** * Set the acceptRanges property: The Accept-Ranges property. - * + * * @param acceptRanges the acceptRanges value to set. * @return the BlobsGetPropertiesHeaders object itself. */ @@ -1450,7 +1450,7 @@ public BlobsGetPropertiesHeaders setAcceptRanges(String acceptRanges) { /** * Get the xMsServerEncrypted property: The x-ms-server-encrypted property. - * + * * @return the xMsServerEncrypted value. */ public Boolean isXMsServerEncrypted() { @@ -1459,7 +1459,7 @@ public Boolean isXMsServerEncrypted() { /** * Set the xMsServerEncrypted property: The x-ms-server-encrypted property. - * + * * @param xMsServerEncrypted the xMsServerEncrypted value to set. * @return the BlobsGetPropertiesHeaders object itself. */ @@ -1470,7 +1470,7 @@ public BlobsGetPropertiesHeaders setXMsServerEncrypted(Boolean xMsServerEncrypte /** * Get the xMsRehydratePriority property: The x-ms-rehydrate-priority property. - * + * * @return the xMsRehydratePriority value. */ public String getXMsRehydratePriority() { @@ -1479,7 +1479,7 @@ public String getXMsRehydratePriority() { /** * Set the xMsRehydratePriority property: The x-ms-rehydrate-priority property. - * + * * @param xMsRehydratePriority the xMsRehydratePriority value to set. * @return the BlobsGetPropertiesHeaders object itself. */ @@ -1490,7 +1490,7 @@ public BlobsGetPropertiesHeaders setXMsRehydratePriority(String xMsRehydratePrio /** * Get the xMsCopyStatus property: The x-ms-copy-status property. - * + * * @return the xMsCopyStatus value. */ public CopyStatusType getXMsCopyStatus() { @@ -1499,7 +1499,7 @@ public CopyStatusType getXMsCopyStatus() { /** * Set the xMsCopyStatus property: The x-ms-copy-status property. - * + * * @param xMsCopyStatus the xMsCopyStatus value to set. * @return the BlobsGetPropertiesHeaders object itself. */ @@ -1510,7 +1510,7 @@ public BlobsGetPropertiesHeaders setXMsCopyStatus(CopyStatusType xMsCopyStatus) /** * Get the xMsArchiveStatus property: The x-ms-archive-status property. - * + * * @return the xMsArchiveStatus value. */ public String getXMsArchiveStatus() { @@ -1519,7 +1519,7 @@ public String getXMsArchiveStatus() { /** * Set the xMsArchiveStatus property: The x-ms-archive-status property. - * + * * @param xMsArchiveStatus the xMsArchiveStatus value to set. * @return the BlobsGetPropertiesHeaders object itself. */ diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlobsGetTagsHeaders.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobsGetTagsHeaders.java similarity index 97% rename from sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlobsGetTagsHeaders.java rename to sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobsGetTagsHeaders.java index 9716237b6f8c..cf67268a6b35 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlobsGetTagsHeaders.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobsGetTagsHeaders.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.blob.models; +package com.azure.v2.storage.blob.models; import com.azure.core.v2.annotation.Fluent; import io.clientcore.core.http.models.DateTimeRfc1123; @@ -41,7 +41,7 @@ public final class BlobsGetTagsHeaders { // HttpHeaders containing the raw property values. /** * Creates an instance of BlobsGetTagsHeaders class. - * + * * @param rawHeaders The raw HttpHeaders that will be used to create the property values. */ public BlobsGetTagsHeaders(HttpHeaders rawHeaders) { @@ -56,7 +56,7 @@ public BlobsGetTagsHeaders(HttpHeaders rawHeaders) { /** * Get the xMsVersion property: The x-ms-version property. - * + * * @return the xMsVersion value. */ public String getXMsVersion() { @@ -65,7 +65,7 @@ public String getXMsVersion() { /** * Set the xMsVersion property: The x-ms-version property. - * + * * @param xMsVersion the xMsVersion value to set. * @return the BlobsGetTagsHeaders object itself. */ @@ -76,7 +76,7 @@ public BlobsGetTagsHeaders setXMsVersion(String xMsVersion) { /** * Get the xMsRequestId property: The x-ms-request-id property. - * + * * @return the xMsRequestId value. */ public String getXMsRequestId() { @@ -85,7 +85,7 @@ public String getXMsRequestId() { /** * Set the xMsRequestId property: The x-ms-request-id property. - * + * * @param xMsRequestId the xMsRequestId value to set. * @return the BlobsGetTagsHeaders object itself. */ @@ -96,7 +96,7 @@ public BlobsGetTagsHeaders setXMsRequestId(String xMsRequestId) { /** * Get the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @return the xMsClientRequestId value. */ public String getXMsClientRequestId() { @@ -105,7 +105,7 @@ public String getXMsClientRequestId() { /** * Set the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @param xMsClientRequestId the xMsClientRequestId value to set. * @return the BlobsGetTagsHeaders object itself. */ @@ -116,7 +116,7 @@ public BlobsGetTagsHeaders setXMsClientRequestId(String xMsClientRequestId) { /** * Get the date property: The Date property. - * + * * @return the date value. */ public OffsetDateTime getDate() { @@ -128,7 +128,7 @@ public OffsetDateTime getDate() { /** * Set the date property: The Date property. - * + * * @param date the date value to set. * @return the BlobsGetTagsHeaders object itself. */ diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlobsQueryHeaders.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobsQueryHeaders.java similarity index 98% rename from sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlobsQueryHeaders.java rename to sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobsQueryHeaders.java index 66c629964e1a..7dec2ecffe04 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlobsQueryHeaders.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobsQueryHeaders.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.blob.models; +package com.azure.v2.storage.blob.models; import com.azure.core.v2.annotation.Fluent; import io.clientcore.core.http.models.HttpHeader; @@ -230,7 +230,7 @@ public final class BlobsQueryHeaders { // HttpHeaders containing the raw property values. /** * Creates an instance of BlobsQueryHeaders class. - * + * * @param rawHeaders The raw HttpHeaders that will be used to create the property values. */ public BlobsQueryHeaders(HttpHeaders rawHeaders) { @@ -325,7 +325,7 @@ public BlobsQueryHeaders(HttpHeaders rawHeaders) { /** * Get the xMsLeaseStatus property: The x-ms-lease-status property. - * + * * @return the xMsLeaseStatus value. */ public LeaseStatusType getXMsLeaseStatus() { @@ -334,7 +334,7 @@ public LeaseStatusType getXMsLeaseStatus() { /** * Set the xMsLeaseStatus property: The x-ms-lease-status property. - * + * * @param xMsLeaseStatus the xMsLeaseStatus value to set. * @return the BlobsQueryHeaders object itself. */ @@ -345,7 +345,7 @@ public BlobsQueryHeaders setXMsLeaseStatus(LeaseStatusType xMsLeaseStatus) { /** * Get the contentRange property: The Content-Range property. - * + * * @return the contentRange value. */ public String getContentRange() { @@ -354,7 +354,7 @@ public String getContentRange() { /** * Set the contentRange property: The Content-Range property. - * + * * @param contentRange the contentRange value to set. * @return the BlobsQueryHeaders object itself. */ @@ -365,7 +365,7 @@ public BlobsQueryHeaders setContentRange(String contentRange) { /** * Get the xMsLeaseState property: The x-ms-lease-state property. - * + * * @return the xMsLeaseState value. */ public LeaseStateType getXMsLeaseState() { @@ -374,7 +374,7 @@ public LeaseStateType getXMsLeaseState() { /** * Set the xMsLeaseState property: The x-ms-lease-state property. - * + * * @param xMsLeaseState the xMsLeaseState value to set. * @return the BlobsQueryHeaders object itself. */ @@ -385,7 +385,7 @@ public BlobsQueryHeaders setXMsLeaseState(LeaseStateType xMsLeaseState) { /** * Get the lastModified property: The Last-Modified property. - * + * * @return the lastModified value. */ public OffsetDateTime getLastModified() { @@ -397,7 +397,7 @@ public OffsetDateTime getLastModified() { /** * Set the lastModified property: The Last-Modified property. - * + * * @param lastModified the lastModified value to set. * @return the BlobsQueryHeaders object itself. */ @@ -412,7 +412,7 @@ public BlobsQueryHeaders setLastModified(OffsetDateTime lastModified) { /** * Get the xMsEncryptionKeySha256 property: The x-ms-encryption-key-sha256 property. - * + * * @return the xMsEncryptionKeySha256 value. */ public String getXMsEncryptionKeySha256() { @@ -421,7 +421,7 @@ public String getXMsEncryptionKeySha256() { /** * Set the xMsEncryptionKeySha256 property: The x-ms-encryption-key-sha256 property. - * + * * @param xMsEncryptionKeySha256 the xMsEncryptionKeySha256 value to set. * @return the BlobsQueryHeaders object itself. */ @@ -432,7 +432,7 @@ public BlobsQueryHeaders setXMsEncryptionKeySha256(String xMsEncryptionKeySha256 /** * Get the xMsBlobType property: The x-ms-blob-type property. - * + * * @return the xMsBlobType value. */ public BlobType getXMsBlobType() { @@ -441,7 +441,7 @@ public BlobType getXMsBlobType() { /** * Set the xMsBlobType property: The x-ms-blob-type property. - * + * * @param xMsBlobType the xMsBlobType value to set. * @return the BlobsQueryHeaders object itself. */ @@ -452,7 +452,7 @@ public BlobsQueryHeaders setXMsBlobType(BlobType xMsBlobType) { /** * Get the contentEncoding property: The Content-Encoding property. - * + * * @return the contentEncoding value. */ public String getContentEncoding() { @@ -461,7 +461,7 @@ public String getContentEncoding() { /** * Set the contentEncoding property: The Content-Encoding property. - * + * * @param contentEncoding the contentEncoding value to set. * @return the BlobsQueryHeaders object itself. */ @@ -472,7 +472,7 @@ public BlobsQueryHeaders setContentEncoding(String contentEncoding) { /** * Get the xMsCopyStatusDescription property: The x-ms-copy-status-description property. - * + * * @return the xMsCopyStatusDescription value. */ public String getXMsCopyStatusDescription() { @@ -481,7 +481,7 @@ public String getXMsCopyStatusDescription() { /** * Set the xMsCopyStatusDescription property: The x-ms-copy-status-description property. - * + * * @param xMsCopyStatusDescription the xMsCopyStatusDescription value to set. * @return the BlobsQueryHeaders object itself. */ @@ -492,7 +492,7 @@ public BlobsQueryHeaders setXMsCopyStatusDescription(String xMsCopyStatusDescrip /** * Get the xMsLeaseDuration property: The x-ms-lease-duration property. - * + * * @return the xMsLeaseDuration value. */ public LeaseDurationType getXMsLeaseDuration() { @@ -501,7 +501,7 @@ public LeaseDurationType getXMsLeaseDuration() { /** * Set the xMsLeaseDuration property: The x-ms-lease-duration property. - * + * * @param xMsLeaseDuration the xMsLeaseDuration value to set. * @return the BlobsQueryHeaders object itself. */ @@ -512,7 +512,7 @@ public BlobsQueryHeaders setXMsLeaseDuration(LeaseDurationType xMsLeaseDuration) /** * Get the contentLength property: The Content-Length property. - * + * * @return the contentLength value. */ public Long getContentLength() { @@ -521,7 +521,7 @@ public Long getContentLength() { /** * Set the contentLength property: The Content-Length property. - * + * * @param contentLength the contentLength value to set. * @return the BlobsQueryHeaders object itself. */ @@ -532,7 +532,7 @@ public BlobsQueryHeaders setContentLength(Long contentLength) { /** * Get the xMsRequestId property: The x-ms-request-id property. - * + * * @return the xMsRequestId value. */ public String getXMsRequestId() { @@ -541,7 +541,7 @@ public String getXMsRequestId() { /** * Set the xMsRequestId property: The x-ms-request-id property. - * + * * @param xMsRequestId the xMsRequestId value to set. * @return the BlobsQueryHeaders object itself. */ @@ -552,7 +552,7 @@ public BlobsQueryHeaders setXMsRequestId(String xMsRequestId) { /** * Get the contentType property: The Content-Type property. - * + * * @return the contentType value. */ public String getContentType() { @@ -561,7 +561,7 @@ public String getContentType() { /** * Set the contentType property: The Content-Type property. - * + * * @param contentType the contentType value to set. * @return the BlobsQueryHeaders object itself. */ @@ -572,7 +572,7 @@ public BlobsQueryHeaders setContentType(String contentType) { /** * Get the xMsVersion property: The x-ms-version property. - * + * * @return the xMsVersion value. */ public String getXMsVersion() { @@ -581,7 +581,7 @@ public String getXMsVersion() { /** * Set the xMsVersion property: The x-ms-version property. - * + * * @param xMsVersion the xMsVersion value to set. * @return the BlobsQueryHeaders object itself. */ @@ -592,7 +592,7 @@ public BlobsQueryHeaders setXMsVersion(String xMsVersion) { /** * Get the xMsCopyId property: The x-ms-copy-id property. - * + * * @return the xMsCopyId value. */ public String getXMsCopyId() { @@ -601,7 +601,7 @@ public String getXMsCopyId() { /** * Set the xMsCopyId property: The x-ms-copy-id property. - * + * * @param xMsCopyId the xMsCopyId value to set. * @return the BlobsQueryHeaders object itself. */ @@ -612,7 +612,7 @@ public BlobsQueryHeaders setXMsCopyId(String xMsCopyId) { /** * Get the xMsCopySource property: The x-ms-copy-source property. - * + * * @return the xMsCopySource value. */ public String getXMsCopySource() { @@ -621,7 +621,7 @@ public String getXMsCopySource() { /** * Set the xMsCopySource property: The x-ms-copy-source property. - * + * * @param xMsCopySource the xMsCopySource value to set. * @return the BlobsQueryHeaders object itself. */ @@ -632,7 +632,7 @@ public BlobsQueryHeaders setXMsCopySource(String xMsCopySource) { /** * Get the xMsContentCrc64 property: The x-ms-content-crc64 property. - * + * * @return the xMsContentCrc64 value. */ public byte[] getXMsContentCrc64() { @@ -641,7 +641,7 @@ public byte[] getXMsContentCrc64() { /** * Set the xMsContentCrc64 property: The x-ms-content-crc64 property. - * + * * @param xMsContentCrc64 the xMsContentCrc64 value to set. * @return the BlobsQueryHeaders object itself. */ @@ -652,7 +652,7 @@ public BlobsQueryHeaders setXMsContentCrc64(byte[] xMsContentCrc64) { /** * Get the xMsBlobSequenceNumber property: The x-ms-blob-sequence-number property. - * + * * @return the xMsBlobSequenceNumber value. */ public Long getXMsBlobSequenceNumber() { @@ -661,7 +661,7 @@ public Long getXMsBlobSequenceNumber() { /** * Set the xMsBlobSequenceNumber property: The x-ms-blob-sequence-number property. - * + * * @param xMsBlobSequenceNumber the xMsBlobSequenceNumber value to set. * @return the BlobsQueryHeaders object itself. */ @@ -672,7 +672,7 @@ public BlobsQueryHeaders setXMsBlobSequenceNumber(Long xMsBlobSequenceNumber) { /** * Get the xMsCopyProgress property: The x-ms-copy-progress property. - * + * * @return the xMsCopyProgress value. */ public String getXMsCopyProgress() { @@ -681,7 +681,7 @@ public String getXMsCopyProgress() { /** * Set the xMsCopyProgress property: The x-ms-copy-progress property. - * + * * @param xMsCopyProgress the xMsCopyProgress value to set. * @return the BlobsQueryHeaders object itself. */ @@ -692,7 +692,7 @@ public BlobsQueryHeaders setXMsCopyProgress(String xMsCopyProgress) { /** * Get the xMsBlobCommittedBlockCount property: The x-ms-blob-committed-block-count property. - * + * * @return the xMsBlobCommittedBlockCount value. */ public Integer getXMsBlobCommittedBlockCount() { @@ -701,7 +701,7 @@ public Integer getXMsBlobCommittedBlockCount() { /** * Set the xMsBlobCommittedBlockCount property: The x-ms-blob-committed-block-count property. - * + * * @param xMsBlobCommittedBlockCount the xMsBlobCommittedBlockCount value to set. * @return the BlobsQueryHeaders object itself. */ @@ -712,7 +712,7 @@ public BlobsQueryHeaders setXMsBlobCommittedBlockCount(Integer xMsBlobCommittedB /** * Get the xMsBlobContentMd5 property: The x-ms-blob-content-md5 property. - * + * * @return the xMsBlobContentMd5 value. */ public byte[] getXMsBlobContentMd5() { @@ -721,7 +721,7 @@ public byte[] getXMsBlobContentMd5() { /** * Set the xMsBlobContentMd5 property: The x-ms-blob-content-md5 property. - * + * * @param xMsBlobContentMd5 the xMsBlobContentMd5 value to set. * @return the BlobsQueryHeaders object itself. */ @@ -732,7 +732,7 @@ public BlobsQueryHeaders setXMsBlobContentMd5(byte[] xMsBlobContentMd5) { /** * Get the xMsMeta property: The x-ms-meta- property. - * + * * @return the xMsMeta value. */ public Map getXMsMeta() { @@ -741,7 +741,7 @@ public Map getXMsMeta() { /** * Set the xMsMeta property: The x-ms-meta- property. - * + * * @param xMsMeta the xMsMeta value to set. * @return the BlobsQueryHeaders object itself. */ @@ -752,7 +752,7 @@ public BlobsQueryHeaders setXMsMeta(Map xMsMeta) { /** * Get the date property: The Date property. - * + * * @return the date value. */ public OffsetDateTime getDate() { @@ -764,7 +764,7 @@ public OffsetDateTime getDate() { /** * Set the date property: The Date property. - * + * * @param date the date value to set. * @return the BlobsQueryHeaders object itself. */ @@ -779,7 +779,7 @@ public BlobsQueryHeaders setDate(OffsetDateTime date) { /** * Get the contentMD5 property: The Content-MD5 property. - * + * * @return the contentMD5 value. */ public byte[] getContentMD5() { @@ -788,7 +788,7 @@ public byte[] getContentMD5() { /** * Set the contentMD5 property: The Content-MD5 property. - * + * * @param contentMD5 the contentMD5 value to set. * @return the BlobsQueryHeaders object itself. */ @@ -799,7 +799,7 @@ public BlobsQueryHeaders setContentMD5(byte[] contentMD5) { /** * Get the xMsCopyCompletionTime property: The x-ms-copy-completion-time property. - * + * * @return the xMsCopyCompletionTime value. */ public OffsetDateTime getXMsCopyCompletionTime() { @@ -811,7 +811,7 @@ public OffsetDateTime getXMsCopyCompletionTime() { /** * Set the xMsCopyCompletionTime property: The x-ms-copy-completion-time property. - * + * * @param xMsCopyCompletionTime the xMsCopyCompletionTime value to set. * @return the BlobsQueryHeaders object itself. */ @@ -826,7 +826,7 @@ public BlobsQueryHeaders setXMsCopyCompletionTime(OffsetDateTime xMsCopyCompleti /** * Get the acceptRanges property: The Accept-Ranges property. - * + * * @return the acceptRanges value. */ public String getAcceptRanges() { @@ -835,7 +835,7 @@ public String getAcceptRanges() { /** * Set the acceptRanges property: The Accept-Ranges property. - * + * * @param acceptRanges the acceptRanges value to set. * @return the BlobsQueryHeaders object itself. */ @@ -846,7 +846,7 @@ public BlobsQueryHeaders setAcceptRanges(String acceptRanges) { /** * Get the xMsServerEncrypted property: The x-ms-server-encrypted property. - * + * * @return the xMsServerEncrypted value. */ public Boolean isXMsServerEncrypted() { @@ -855,7 +855,7 @@ public Boolean isXMsServerEncrypted() { /** * Set the xMsServerEncrypted property: The x-ms-server-encrypted property. - * + * * @param xMsServerEncrypted the xMsServerEncrypted value to set. * @return the BlobsQueryHeaders object itself. */ @@ -866,7 +866,7 @@ public BlobsQueryHeaders setXMsServerEncrypted(Boolean xMsServerEncrypted) { /** * Get the cacheControl property: The Cache-Control property. - * + * * @return the cacheControl value. */ public String getCacheControl() { @@ -875,7 +875,7 @@ public String getCacheControl() { /** * Set the cacheControl property: The Cache-Control property. - * + * * @param cacheControl the cacheControl value to set. * @return the BlobsQueryHeaders object itself. */ @@ -886,7 +886,7 @@ public BlobsQueryHeaders setCacheControl(String cacheControl) { /** * Get the eTag property: The ETag property. - * + * * @return the eTag value. */ public String getETag() { @@ -895,7 +895,7 @@ public String getETag() { /** * Set the eTag property: The ETag property. - * + * * @param eTag the eTag value to set. * @return the BlobsQueryHeaders object itself. */ @@ -906,7 +906,7 @@ public BlobsQueryHeaders setETag(String eTag) { /** * Get the contentDisposition property: The Content-Disposition property. - * + * * @return the contentDisposition value. */ public String getContentDisposition() { @@ -915,7 +915,7 @@ public String getContentDisposition() { /** * Set the contentDisposition property: The Content-Disposition property. - * + * * @param contentDisposition the contentDisposition value to set. * @return the BlobsQueryHeaders object itself. */ @@ -926,7 +926,7 @@ public BlobsQueryHeaders setContentDisposition(String contentDisposition) { /** * Get the xMsCopyStatus property: The x-ms-copy-status property. - * + * * @return the xMsCopyStatus value. */ public CopyStatusType getXMsCopyStatus() { @@ -935,7 +935,7 @@ public CopyStatusType getXMsCopyStatus() { /** * Set the xMsCopyStatus property: The x-ms-copy-status property. - * + * * @param xMsCopyStatus the xMsCopyStatus value to set. * @return the BlobsQueryHeaders object itself. */ @@ -946,7 +946,7 @@ public BlobsQueryHeaders setXMsCopyStatus(CopyStatusType xMsCopyStatus) { /** * Get the contentLanguage property: The Content-Language property. - * + * * @return the contentLanguage value. */ public String getContentLanguage() { @@ -955,7 +955,7 @@ public String getContentLanguage() { /** * Set the contentLanguage property: The Content-Language property. - * + * * @param contentLanguage the contentLanguage value to set. * @return the BlobsQueryHeaders object itself. */ @@ -966,7 +966,7 @@ public BlobsQueryHeaders setContentLanguage(String contentLanguage) { /** * Get the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @return the xMsClientRequestId value. */ public String getXMsClientRequestId() { @@ -975,7 +975,7 @@ public String getXMsClientRequestId() { /** * Set the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @param xMsClientRequestId the xMsClientRequestId value to set. * @return the BlobsQueryHeaders object itself. */ @@ -986,7 +986,7 @@ public BlobsQueryHeaders setXMsClientRequestId(String xMsClientRequestId) { /** * Get the xMsEncryptionScope property: The x-ms-encryption-scope property. - * + * * @return the xMsEncryptionScope value. */ public String getXMsEncryptionScope() { @@ -995,7 +995,7 @@ public String getXMsEncryptionScope() { /** * Set the xMsEncryptionScope property: The x-ms-encryption-scope property. - * + * * @param xMsEncryptionScope the xMsEncryptionScope value to set. * @return the BlobsQueryHeaders object itself. */ diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlobsReleaseLeaseHeaders.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobsReleaseLeaseHeaders.java similarity index 97% rename from sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlobsReleaseLeaseHeaders.java rename to sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobsReleaseLeaseHeaders.java index 1a59228ff75f..9a4973f3c1b0 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlobsReleaseLeaseHeaders.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobsReleaseLeaseHeaders.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.blob.models; +package com.azure.v2.storage.blob.models; import com.azure.core.v2.annotation.Fluent; import io.clientcore.core.http.models.DateTimeRfc1123; @@ -51,7 +51,7 @@ public final class BlobsReleaseLeaseHeaders { // HttpHeaders containing the raw property values. /** * Creates an instance of BlobsReleaseLeaseHeaders class. - * + * * @param rawHeaders The raw HttpHeaders that will be used to create the property values. */ public BlobsReleaseLeaseHeaders(HttpHeaders rawHeaders) { @@ -71,7 +71,7 @@ public BlobsReleaseLeaseHeaders(HttpHeaders rawHeaders) { /** * Get the xMsVersion property: The x-ms-version property. - * + * * @return the xMsVersion value. */ public String getXMsVersion() { @@ -80,7 +80,7 @@ public String getXMsVersion() { /** * Set the xMsVersion property: The x-ms-version property. - * + * * @param xMsVersion the xMsVersion value to set. * @return the BlobsReleaseLeaseHeaders object itself. */ @@ -91,7 +91,7 @@ public BlobsReleaseLeaseHeaders setXMsVersion(String xMsVersion) { /** * Get the eTag property: The ETag property. - * + * * @return the eTag value. */ public String getETag() { @@ -100,7 +100,7 @@ public String getETag() { /** * Set the eTag property: The ETag property. - * + * * @param eTag the eTag value to set. * @return the BlobsReleaseLeaseHeaders object itself. */ @@ -111,7 +111,7 @@ public BlobsReleaseLeaseHeaders setETag(String eTag) { /** * Get the lastModified property: The Last-Modified property. - * + * * @return the lastModified value. */ public OffsetDateTime getLastModified() { @@ -123,7 +123,7 @@ public OffsetDateTime getLastModified() { /** * Set the lastModified property: The Last-Modified property. - * + * * @param lastModified the lastModified value to set. * @return the BlobsReleaseLeaseHeaders object itself. */ @@ -138,7 +138,7 @@ public BlobsReleaseLeaseHeaders setLastModified(OffsetDateTime lastModified) { /** * Get the xMsRequestId property: The x-ms-request-id property. - * + * * @return the xMsRequestId value. */ public String getXMsRequestId() { @@ -147,7 +147,7 @@ public String getXMsRequestId() { /** * Set the xMsRequestId property: The x-ms-request-id property. - * + * * @param xMsRequestId the xMsRequestId value to set. * @return the BlobsReleaseLeaseHeaders object itself. */ @@ -158,7 +158,7 @@ public BlobsReleaseLeaseHeaders setXMsRequestId(String xMsRequestId) { /** * Get the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @return the xMsClientRequestId value. */ public String getXMsClientRequestId() { @@ -167,7 +167,7 @@ public String getXMsClientRequestId() { /** * Set the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @param xMsClientRequestId the xMsClientRequestId value to set. * @return the BlobsReleaseLeaseHeaders object itself. */ @@ -178,7 +178,7 @@ public BlobsReleaseLeaseHeaders setXMsClientRequestId(String xMsClientRequestId) /** * Get the date property: The Date property. - * + * * @return the date value. */ public OffsetDateTime getDate() { @@ -190,7 +190,7 @@ public OffsetDateTime getDate() { /** * Set the date property: The Date property. - * + * * @param date the date value to set. * @return the BlobsReleaseLeaseHeaders object itself. */ diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlobsRenewLeaseHeaders.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobsRenewLeaseHeaders.java similarity index 97% rename from sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlobsRenewLeaseHeaders.java rename to sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobsRenewLeaseHeaders.java index 349e18f8fab5..825cac725cc7 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlobsRenewLeaseHeaders.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobsRenewLeaseHeaders.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.blob.models; +package com.azure.v2.storage.blob.models; import com.azure.core.v2.annotation.Fluent; import io.clientcore.core.http.models.DateTimeRfc1123; @@ -58,7 +58,7 @@ public final class BlobsRenewLeaseHeaders { // HttpHeaders containing the raw property values. /** * Creates an instance of BlobsRenewLeaseHeaders class. - * + * * @param rawHeaders The raw HttpHeaders that will be used to create the property values. */ public BlobsRenewLeaseHeaders(HttpHeaders rawHeaders) { @@ -79,7 +79,7 @@ public BlobsRenewLeaseHeaders(HttpHeaders rawHeaders) { /** * Get the xMsVersion property: The x-ms-version property. - * + * * @return the xMsVersion value. */ public String getXMsVersion() { @@ -88,7 +88,7 @@ public String getXMsVersion() { /** * Set the xMsVersion property: The x-ms-version property. - * + * * @param xMsVersion the xMsVersion value to set. * @return the BlobsRenewLeaseHeaders object itself. */ @@ -99,7 +99,7 @@ public BlobsRenewLeaseHeaders setXMsVersion(String xMsVersion) { /** * Get the eTag property: The ETag property. - * + * * @return the eTag value. */ public String getETag() { @@ -108,7 +108,7 @@ public String getETag() { /** * Set the eTag property: The ETag property. - * + * * @param eTag the eTag value to set. * @return the BlobsRenewLeaseHeaders object itself. */ @@ -119,7 +119,7 @@ public BlobsRenewLeaseHeaders setETag(String eTag) { /** * Get the xMsLeaseId property: The x-ms-lease-id property. - * + * * @return the xMsLeaseId value. */ public String getXMsLeaseId() { @@ -128,7 +128,7 @@ public String getXMsLeaseId() { /** * Set the xMsLeaseId property: The x-ms-lease-id property. - * + * * @param xMsLeaseId the xMsLeaseId value to set. * @return the BlobsRenewLeaseHeaders object itself. */ @@ -139,7 +139,7 @@ public BlobsRenewLeaseHeaders setXMsLeaseId(String xMsLeaseId) { /** * Get the lastModified property: The Last-Modified property. - * + * * @return the lastModified value. */ public OffsetDateTime getLastModified() { @@ -151,7 +151,7 @@ public OffsetDateTime getLastModified() { /** * Set the lastModified property: The Last-Modified property. - * + * * @param lastModified the lastModified value to set. * @return the BlobsRenewLeaseHeaders object itself. */ @@ -166,7 +166,7 @@ public BlobsRenewLeaseHeaders setLastModified(OffsetDateTime lastModified) { /** * Get the xMsRequestId property: The x-ms-request-id property. - * + * * @return the xMsRequestId value. */ public String getXMsRequestId() { @@ -175,7 +175,7 @@ public String getXMsRequestId() { /** * Set the xMsRequestId property: The x-ms-request-id property. - * + * * @param xMsRequestId the xMsRequestId value to set. * @return the BlobsRenewLeaseHeaders object itself. */ @@ -186,7 +186,7 @@ public BlobsRenewLeaseHeaders setXMsRequestId(String xMsRequestId) { /** * Get the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @return the xMsClientRequestId value. */ public String getXMsClientRequestId() { @@ -195,7 +195,7 @@ public String getXMsClientRequestId() { /** * Set the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @param xMsClientRequestId the xMsClientRequestId value to set. * @return the BlobsRenewLeaseHeaders object itself. */ @@ -206,7 +206,7 @@ public BlobsRenewLeaseHeaders setXMsClientRequestId(String xMsClientRequestId) { /** * Get the date property: The Date property. - * + * * @return the date value. */ public OffsetDateTime getDate() { @@ -218,7 +218,7 @@ public OffsetDateTime getDate() { /** * Set the date property: The Date property. - * + * * @param date the date value to set. * @return the BlobsRenewLeaseHeaders object itself. */ diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlobsSetExpiryHeaders.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobsSetExpiryHeaders.java similarity index 97% rename from sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlobsSetExpiryHeaders.java rename to sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobsSetExpiryHeaders.java index a47699c609c0..43dab20d1931 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlobsSetExpiryHeaders.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobsSetExpiryHeaders.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.blob.models; +package com.azure.v2.storage.blob.models; import com.azure.core.v2.annotation.Fluent; import io.clientcore.core.http.models.DateTimeRfc1123; @@ -51,7 +51,7 @@ public final class BlobsSetExpiryHeaders { // HttpHeaders containing the raw property values. /** * Creates an instance of BlobsSetExpiryHeaders class. - * + * * @param rawHeaders The raw HttpHeaders that will be used to create the property values. */ public BlobsSetExpiryHeaders(HttpHeaders rawHeaders) { @@ -71,7 +71,7 @@ public BlobsSetExpiryHeaders(HttpHeaders rawHeaders) { /** * Get the xMsVersion property: The x-ms-version property. - * + * * @return the xMsVersion value. */ public String getXMsVersion() { @@ -80,7 +80,7 @@ public String getXMsVersion() { /** * Set the xMsVersion property: The x-ms-version property. - * + * * @param xMsVersion the xMsVersion value to set. * @return the BlobsSetExpiryHeaders object itself. */ @@ -91,7 +91,7 @@ public BlobsSetExpiryHeaders setXMsVersion(String xMsVersion) { /** * Get the eTag property: The ETag property. - * + * * @return the eTag value. */ public String getETag() { @@ -100,7 +100,7 @@ public String getETag() { /** * Set the eTag property: The ETag property. - * + * * @param eTag the eTag value to set. * @return the BlobsSetExpiryHeaders object itself. */ @@ -111,7 +111,7 @@ public BlobsSetExpiryHeaders setETag(String eTag) { /** * Get the lastModified property: The Last-Modified property. - * + * * @return the lastModified value. */ public OffsetDateTime getLastModified() { @@ -123,7 +123,7 @@ public OffsetDateTime getLastModified() { /** * Set the lastModified property: The Last-Modified property. - * + * * @param lastModified the lastModified value to set. * @return the BlobsSetExpiryHeaders object itself. */ @@ -138,7 +138,7 @@ public BlobsSetExpiryHeaders setLastModified(OffsetDateTime lastModified) { /** * Get the xMsRequestId property: The x-ms-request-id property. - * + * * @return the xMsRequestId value. */ public String getXMsRequestId() { @@ -147,7 +147,7 @@ public String getXMsRequestId() { /** * Set the xMsRequestId property: The x-ms-request-id property. - * + * * @param xMsRequestId the xMsRequestId value to set. * @return the BlobsSetExpiryHeaders object itself. */ @@ -158,7 +158,7 @@ public BlobsSetExpiryHeaders setXMsRequestId(String xMsRequestId) { /** * Get the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @return the xMsClientRequestId value. */ public String getXMsClientRequestId() { @@ -167,7 +167,7 @@ public String getXMsClientRequestId() { /** * Set the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @param xMsClientRequestId the xMsClientRequestId value to set. * @return the BlobsSetExpiryHeaders object itself. */ @@ -178,7 +178,7 @@ public BlobsSetExpiryHeaders setXMsClientRequestId(String xMsClientRequestId) { /** * Get the date property: The Date property. - * + * * @return the date value. */ public OffsetDateTime getDate() { @@ -190,7 +190,7 @@ public OffsetDateTime getDate() { /** * Set the date property: The Date property. - * + * * @param date the date value to set. * @return the BlobsSetExpiryHeaders object itself. */ diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlobsSetHttpHeadersHeaders.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobsSetHttpHeadersHeaders.java similarity index 97% rename from sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlobsSetHttpHeadersHeaders.java rename to sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobsSetHttpHeadersHeaders.java index 365ad5640f95..b4db240f9b85 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlobsSetHttpHeadersHeaders.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobsSetHttpHeadersHeaders.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.blob.models; +package com.azure.v2.storage.blob.models; import com.azure.core.v2.annotation.Fluent; import io.clientcore.core.http.models.DateTimeRfc1123; @@ -59,7 +59,7 @@ public final class BlobsSetHttpHeadersHeaders { // HttpHeaders containing the raw property values. /** * Creates an instance of BlobsSetHttpHeadersHeaders class. - * + * * @param rawHeaders The raw HttpHeaders that will be used to create the property values. */ public BlobsSetHttpHeadersHeaders(HttpHeaders rawHeaders) { @@ -83,7 +83,7 @@ public BlobsSetHttpHeadersHeaders(HttpHeaders rawHeaders) { /** * Get the xMsVersion property: The x-ms-version property. - * + * * @return the xMsVersion value. */ public String getXMsVersion() { @@ -92,7 +92,7 @@ public String getXMsVersion() { /** * Set the xMsVersion property: The x-ms-version property. - * + * * @param xMsVersion the xMsVersion value to set. * @return the BlobsSetHttpHeadersHeaders object itself. */ @@ -103,7 +103,7 @@ public BlobsSetHttpHeadersHeaders setXMsVersion(String xMsVersion) { /** * Get the eTag property: The ETag property. - * + * * @return the eTag value. */ public String getETag() { @@ -112,7 +112,7 @@ public String getETag() { /** * Set the eTag property: The ETag property. - * + * * @param eTag the eTag value to set. * @return the BlobsSetHttpHeadersHeaders object itself. */ @@ -123,7 +123,7 @@ public BlobsSetHttpHeadersHeaders setETag(String eTag) { /** * Get the xMsBlobSequenceNumber property: The x-ms-blob-sequence-number property. - * + * * @return the xMsBlobSequenceNumber value. */ public Long getXMsBlobSequenceNumber() { @@ -132,7 +132,7 @@ public Long getXMsBlobSequenceNumber() { /** * Set the xMsBlobSequenceNumber property: The x-ms-blob-sequence-number property. - * + * * @param xMsBlobSequenceNumber the xMsBlobSequenceNumber value to set. * @return the BlobsSetHttpHeadersHeaders object itself. */ @@ -143,7 +143,7 @@ public BlobsSetHttpHeadersHeaders setXMsBlobSequenceNumber(Long xMsBlobSequenceN /** * Get the lastModified property: The Last-Modified property. - * + * * @return the lastModified value. */ public OffsetDateTime getLastModified() { @@ -155,7 +155,7 @@ public OffsetDateTime getLastModified() { /** * Set the lastModified property: The Last-Modified property. - * + * * @param lastModified the lastModified value to set. * @return the BlobsSetHttpHeadersHeaders object itself. */ @@ -170,7 +170,7 @@ public BlobsSetHttpHeadersHeaders setLastModified(OffsetDateTime lastModified) { /** * Get the xMsRequestId property: The x-ms-request-id property. - * + * * @return the xMsRequestId value. */ public String getXMsRequestId() { @@ -179,7 +179,7 @@ public String getXMsRequestId() { /** * Set the xMsRequestId property: The x-ms-request-id property. - * + * * @param xMsRequestId the xMsRequestId value to set. * @return the BlobsSetHttpHeadersHeaders object itself. */ @@ -190,7 +190,7 @@ public BlobsSetHttpHeadersHeaders setXMsRequestId(String xMsRequestId) { /** * Get the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @return the xMsClientRequestId value. */ public String getXMsClientRequestId() { @@ -199,7 +199,7 @@ public String getXMsClientRequestId() { /** * Set the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @param xMsClientRequestId the xMsClientRequestId value to set. * @return the BlobsSetHttpHeadersHeaders object itself. */ @@ -210,7 +210,7 @@ public BlobsSetHttpHeadersHeaders setXMsClientRequestId(String xMsClientRequestI /** * Get the date property: The Date property. - * + * * @return the date value. */ public OffsetDateTime getDate() { @@ -222,7 +222,7 @@ public OffsetDateTime getDate() { /** * Set the date property: The Date property. - * + * * @param date the date value to set. * @return the BlobsSetHttpHeadersHeaders object itself. */ diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlobsSetImmutabilityPolicyHeaders.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobsSetImmutabilityPolicyHeaders.java similarity index 98% rename from sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlobsSetImmutabilityPolicyHeaders.java rename to sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobsSetImmutabilityPolicyHeaders.java index c5688f50ded6..bada51290875 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlobsSetImmutabilityPolicyHeaders.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobsSetImmutabilityPolicyHeaders.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.blob.models; +package com.azure.v2.storage.blob.models; import com.azure.core.v2.annotation.Fluent; import io.clientcore.core.http.models.DateTimeRfc1123; @@ -57,7 +57,7 @@ public final class BlobsSetImmutabilityPolicyHeaders { // HttpHeaders containing the raw property values. /** * Creates an instance of BlobsSetImmutabilityPolicyHeaders class. - * + * * @param rawHeaders The raw HttpHeaders that will be used to create the property values. */ public BlobsSetImmutabilityPolicyHeaders(HttpHeaders rawHeaders) { @@ -80,7 +80,7 @@ public BlobsSetImmutabilityPolicyHeaders(HttpHeaders rawHeaders) { /** * Get the xMsImmutabilityPolicyMode property: The x-ms-immutability-policy-mode property. - * + * * @return the xMsImmutabilityPolicyMode value. */ public BlobImmutabilityPolicyMode getXMsImmutabilityPolicyMode() { @@ -89,7 +89,7 @@ public BlobImmutabilityPolicyMode getXMsImmutabilityPolicyMode() { /** * Set the xMsImmutabilityPolicyMode property: The x-ms-immutability-policy-mode property. - * + * * @param xMsImmutabilityPolicyMode the xMsImmutabilityPolicyMode value to set. * @return the BlobsSetImmutabilityPolicyHeaders object itself. */ @@ -101,7 +101,7 @@ public BlobImmutabilityPolicyMode getXMsImmutabilityPolicyMode() { /** * Get the xMsVersion property: The x-ms-version property. - * + * * @return the xMsVersion value. */ public String getXMsVersion() { @@ -110,7 +110,7 @@ public String getXMsVersion() { /** * Set the xMsVersion property: The x-ms-version property. - * + * * @param xMsVersion the xMsVersion value to set. * @return the BlobsSetImmutabilityPolicyHeaders object itself. */ @@ -121,7 +121,7 @@ public BlobsSetImmutabilityPolicyHeaders setXMsVersion(String xMsVersion) { /** * Get the xMsImmutabilityPolicyUntilDate property: The x-ms-immutability-policy-until-date property. - * + * * @return the xMsImmutabilityPolicyUntilDate value. */ public OffsetDateTime getXMsImmutabilityPolicyUntilDate() { @@ -133,7 +133,7 @@ public OffsetDateTime getXMsImmutabilityPolicyUntilDate() { /** * Set the xMsImmutabilityPolicyUntilDate property: The x-ms-immutability-policy-until-date property. - * + * * @param xMsImmutabilityPolicyUntilDate the xMsImmutabilityPolicyUntilDate value to set. * @return the BlobsSetImmutabilityPolicyHeaders object itself. */ @@ -149,7 +149,7 @@ public OffsetDateTime getXMsImmutabilityPolicyUntilDate() { /** * Get the xMsRequestId property: The x-ms-request-id property. - * + * * @return the xMsRequestId value. */ public String getXMsRequestId() { @@ -158,7 +158,7 @@ public String getXMsRequestId() { /** * Set the xMsRequestId property: The x-ms-request-id property. - * + * * @param xMsRequestId the xMsRequestId value to set. * @return the BlobsSetImmutabilityPolicyHeaders object itself. */ @@ -169,7 +169,7 @@ public BlobsSetImmutabilityPolicyHeaders setXMsRequestId(String xMsRequestId) { /** * Get the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @return the xMsClientRequestId value. */ public String getXMsClientRequestId() { @@ -178,7 +178,7 @@ public String getXMsClientRequestId() { /** * Set the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @param xMsClientRequestId the xMsClientRequestId value to set. * @return the BlobsSetImmutabilityPolicyHeaders object itself. */ @@ -189,7 +189,7 @@ public BlobsSetImmutabilityPolicyHeaders setXMsClientRequestId(String xMsClientR /** * Get the date property: The Date property. - * + * * @return the date value. */ public OffsetDateTime getDate() { @@ -201,7 +201,7 @@ public OffsetDateTime getDate() { /** * Set the date property: The Date property. - * + * * @param date the date value to set. * @return the BlobsSetImmutabilityPolicyHeaders object itself. */ diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlobsSetLegalHoldHeaders.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobsSetLegalHoldHeaders.java similarity index 97% rename from sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlobsSetLegalHoldHeaders.java rename to sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobsSetLegalHoldHeaders.java index 35a8bb67df9d..bf0c6e8604fc 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlobsSetLegalHoldHeaders.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobsSetLegalHoldHeaders.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.blob.models; +package com.azure.v2.storage.blob.models; import com.azure.core.v2.annotation.Fluent; import io.clientcore.core.http.models.DateTimeRfc1123; @@ -48,7 +48,7 @@ public final class BlobsSetLegalHoldHeaders { // HttpHeaders containing the raw property values. /** * Creates an instance of BlobsSetLegalHoldHeaders class. - * + * * @param rawHeaders The raw HttpHeaders that will be used to create the property values. */ public BlobsSetLegalHoldHeaders(HttpHeaders rawHeaders) { @@ -67,7 +67,7 @@ public BlobsSetLegalHoldHeaders(HttpHeaders rawHeaders) { /** * Get the xMsVersion property: The x-ms-version property. - * + * * @return the xMsVersion value. */ public String getXMsVersion() { @@ -76,7 +76,7 @@ public String getXMsVersion() { /** * Set the xMsVersion property: The x-ms-version property. - * + * * @param xMsVersion the xMsVersion value to set. * @return the BlobsSetLegalHoldHeaders object itself. */ @@ -87,7 +87,7 @@ public BlobsSetLegalHoldHeaders setXMsVersion(String xMsVersion) { /** * Get the xMsRequestId property: The x-ms-request-id property. - * + * * @return the xMsRequestId value. */ public String getXMsRequestId() { @@ -96,7 +96,7 @@ public String getXMsRequestId() { /** * Set the xMsRequestId property: The x-ms-request-id property. - * + * * @param xMsRequestId the xMsRequestId value to set. * @return the BlobsSetLegalHoldHeaders object itself. */ @@ -107,7 +107,7 @@ public BlobsSetLegalHoldHeaders setXMsRequestId(String xMsRequestId) { /** * Get the xMsLegalHold property: The x-ms-legal-hold property. - * + * * @return the xMsLegalHold value. */ public Boolean isXMsLegalHold() { @@ -116,7 +116,7 @@ public Boolean isXMsLegalHold() { /** * Set the xMsLegalHold property: The x-ms-legal-hold property. - * + * * @param xMsLegalHold the xMsLegalHold value to set. * @return the BlobsSetLegalHoldHeaders object itself. */ @@ -127,7 +127,7 @@ public BlobsSetLegalHoldHeaders setXMsLegalHold(Boolean xMsLegalHold) { /** * Get the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @return the xMsClientRequestId value. */ public String getXMsClientRequestId() { @@ -136,7 +136,7 @@ public String getXMsClientRequestId() { /** * Set the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @param xMsClientRequestId the xMsClientRequestId value to set. * @return the BlobsSetLegalHoldHeaders object itself. */ @@ -147,7 +147,7 @@ public BlobsSetLegalHoldHeaders setXMsClientRequestId(String xMsClientRequestId) /** * Get the date property: The Date property. - * + * * @return the date value. */ public OffsetDateTime getDate() { @@ -159,7 +159,7 @@ public OffsetDateTime getDate() { /** * Set the date property: The Date property. - * + * * @param date the date value to set. * @return the BlobsSetLegalHoldHeaders object itself. */ diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlobsSetMetadataHeaders.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobsSetMetadataHeaders.java similarity index 97% rename from sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlobsSetMetadataHeaders.java rename to sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobsSetMetadataHeaders.java index 11cfb6ada2f0..8718fb3e2251 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlobsSetMetadataHeaders.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobsSetMetadataHeaders.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.blob.models; +package com.azure.v2.storage.blob.models; import com.azure.core.v2.annotation.Fluent; import io.clientcore.core.http.models.DateTimeRfc1123; @@ -81,7 +81,7 @@ public final class BlobsSetMetadataHeaders { // HttpHeaders containing the raw property values. /** * Creates an instance of BlobsSetMetadataHeaders class. - * + * * @param rawHeaders The raw HttpHeaders that will be used to create the property values. */ public BlobsSetMetadataHeaders(HttpHeaders rawHeaders) { @@ -108,7 +108,7 @@ public BlobsSetMetadataHeaders(HttpHeaders rawHeaders) { /** * Get the xMsVersion property: The x-ms-version property. - * + * * @return the xMsVersion value. */ public String getXMsVersion() { @@ -117,7 +117,7 @@ public String getXMsVersion() { /** * Set the xMsVersion property: The x-ms-version property. - * + * * @param xMsVersion the xMsVersion value to set. * @return the BlobsSetMetadataHeaders object itself. */ @@ -128,7 +128,7 @@ public BlobsSetMetadataHeaders setXMsVersion(String xMsVersion) { /** * Get the eTag property: The ETag property. - * + * * @return the eTag value. */ public String getETag() { @@ -137,7 +137,7 @@ public String getETag() { /** * Set the eTag property: The ETag property. - * + * * @param eTag the eTag value to set. * @return the BlobsSetMetadataHeaders object itself. */ @@ -148,7 +148,7 @@ public BlobsSetMetadataHeaders setETag(String eTag) { /** * Get the lastModified property: The Last-Modified property. - * + * * @return the lastModified value. */ public OffsetDateTime getLastModified() { @@ -160,7 +160,7 @@ public OffsetDateTime getLastModified() { /** * Set the lastModified property: The Last-Modified property. - * + * * @param lastModified the lastModified value to set. * @return the BlobsSetMetadataHeaders object itself. */ @@ -175,7 +175,7 @@ public BlobsSetMetadataHeaders setLastModified(OffsetDateTime lastModified) { /** * Get the xMsVersionId property: The x-ms-version-id property. - * + * * @return the xMsVersionId value. */ public String getXMsVersionId() { @@ -184,7 +184,7 @@ public String getXMsVersionId() { /** * Set the xMsVersionId property: The x-ms-version-id property. - * + * * @param xMsVersionId the xMsVersionId value to set. * @return the BlobsSetMetadataHeaders object itself. */ @@ -195,7 +195,7 @@ public BlobsSetMetadataHeaders setXMsVersionId(String xMsVersionId) { /** * Get the xMsEncryptionKeySha256 property: The x-ms-encryption-key-sha256 property. - * + * * @return the xMsEncryptionKeySha256 value. */ public String getXMsEncryptionKeySha256() { @@ -204,7 +204,7 @@ public String getXMsEncryptionKeySha256() { /** * Set the xMsEncryptionKeySha256 property: The x-ms-encryption-key-sha256 property. - * + * * @param xMsEncryptionKeySha256 the xMsEncryptionKeySha256 value to set. * @return the BlobsSetMetadataHeaders object itself. */ @@ -215,7 +215,7 @@ public BlobsSetMetadataHeaders setXMsEncryptionKeySha256(String xMsEncryptionKey /** * Get the xMsRequestId property: The x-ms-request-id property. - * + * * @return the xMsRequestId value. */ public String getXMsRequestId() { @@ -224,7 +224,7 @@ public String getXMsRequestId() { /** * Set the xMsRequestId property: The x-ms-request-id property. - * + * * @param xMsRequestId the xMsRequestId value to set. * @return the BlobsSetMetadataHeaders object itself. */ @@ -235,7 +235,7 @@ public BlobsSetMetadataHeaders setXMsRequestId(String xMsRequestId) { /** * Get the xMsRequestServerEncrypted property: The x-ms-request-server-encrypted property. - * + * * @return the xMsRequestServerEncrypted value. */ public Boolean isXMsRequestServerEncrypted() { @@ -244,7 +244,7 @@ public Boolean isXMsRequestServerEncrypted() { /** * Set the xMsRequestServerEncrypted property: The x-ms-request-server-encrypted property. - * + * * @param xMsRequestServerEncrypted the xMsRequestServerEncrypted value to set. * @return the BlobsSetMetadataHeaders object itself. */ @@ -255,7 +255,7 @@ public BlobsSetMetadataHeaders setXMsRequestServerEncrypted(Boolean xMsRequestSe /** * Get the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @return the xMsClientRequestId value. */ public String getXMsClientRequestId() { @@ -264,7 +264,7 @@ public String getXMsClientRequestId() { /** * Set the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @param xMsClientRequestId the xMsClientRequestId value to set. * @return the BlobsSetMetadataHeaders object itself. */ @@ -275,7 +275,7 @@ public BlobsSetMetadataHeaders setXMsClientRequestId(String xMsClientRequestId) /** * Get the date property: The Date property. - * + * * @return the date value. */ public OffsetDateTime getDate() { @@ -287,7 +287,7 @@ public OffsetDateTime getDate() { /** * Set the date property: The Date property. - * + * * @param date the date value to set. * @return the BlobsSetMetadataHeaders object itself. */ @@ -302,7 +302,7 @@ public BlobsSetMetadataHeaders setDate(OffsetDateTime date) { /** * Get the xMsEncryptionScope property: The x-ms-encryption-scope property. - * + * * @return the xMsEncryptionScope value. */ public String getXMsEncryptionScope() { @@ -311,7 +311,7 @@ public String getXMsEncryptionScope() { /** * Set the xMsEncryptionScope property: The x-ms-encryption-scope property. - * + * * @param xMsEncryptionScope the xMsEncryptionScope value to set. * @return the BlobsSetMetadataHeaders object itself. */ diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlobsSetTagsHeaders.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobsSetTagsHeaders.java similarity index 97% rename from sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlobsSetTagsHeaders.java rename to sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobsSetTagsHeaders.java index 781446fbf7d4..ad734fc323e5 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlobsSetTagsHeaders.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobsSetTagsHeaders.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.blob.models; +package com.azure.v2.storage.blob.models; import com.azure.core.v2.annotation.Fluent; import io.clientcore.core.http.models.DateTimeRfc1123; @@ -41,7 +41,7 @@ public final class BlobsSetTagsHeaders { // HttpHeaders containing the raw property values. /** * Creates an instance of BlobsSetTagsHeaders class. - * + * * @param rawHeaders The raw HttpHeaders that will be used to create the property values. */ public BlobsSetTagsHeaders(HttpHeaders rawHeaders) { @@ -56,7 +56,7 @@ public BlobsSetTagsHeaders(HttpHeaders rawHeaders) { /** * Get the xMsVersion property: The x-ms-version property. - * + * * @return the xMsVersion value. */ public String getXMsVersion() { @@ -65,7 +65,7 @@ public String getXMsVersion() { /** * Set the xMsVersion property: The x-ms-version property. - * + * * @param xMsVersion the xMsVersion value to set. * @return the BlobsSetTagsHeaders object itself. */ @@ -76,7 +76,7 @@ public BlobsSetTagsHeaders setXMsVersion(String xMsVersion) { /** * Get the xMsRequestId property: The x-ms-request-id property. - * + * * @return the xMsRequestId value. */ public String getXMsRequestId() { @@ -85,7 +85,7 @@ public String getXMsRequestId() { /** * Set the xMsRequestId property: The x-ms-request-id property. - * + * * @param xMsRequestId the xMsRequestId value to set. * @return the BlobsSetTagsHeaders object itself. */ @@ -96,7 +96,7 @@ public BlobsSetTagsHeaders setXMsRequestId(String xMsRequestId) { /** * Get the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @return the xMsClientRequestId value. */ public String getXMsClientRequestId() { @@ -105,7 +105,7 @@ public String getXMsClientRequestId() { /** * Set the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @param xMsClientRequestId the xMsClientRequestId value to set. * @return the BlobsSetTagsHeaders object itself. */ @@ -116,7 +116,7 @@ public BlobsSetTagsHeaders setXMsClientRequestId(String xMsClientRequestId) { /** * Get the date property: The Date property. - * + * * @return the date value. */ public OffsetDateTime getDate() { @@ -128,7 +128,7 @@ public OffsetDateTime getDate() { /** * Set the date property: The Date property. - * + * * @param date the date value to set. * @return the BlobsSetTagsHeaders object itself. */ diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlobsSetTierHeaders.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobsSetTierHeaders.java similarity index 96% rename from sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlobsSetTierHeaders.java rename to sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobsSetTierHeaders.java index 9d7a12bc75f1..4ee1d2e25bf6 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlobsSetTierHeaders.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobsSetTierHeaders.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.blob.models; +package com.azure.v2.storage.blob.models; import com.azure.core.v2.annotation.Fluent; import io.clientcore.core.http.models.HttpHeaderName; @@ -33,7 +33,7 @@ public final class BlobsSetTierHeaders { // HttpHeaders containing the raw property values. /** * Creates an instance of BlobsSetTierHeaders class. - * + * * @param rawHeaders The raw HttpHeaders that will be used to create the property values. */ public BlobsSetTierHeaders(HttpHeaders rawHeaders) { @@ -44,7 +44,7 @@ public BlobsSetTierHeaders(HttpHeaders rawHeaders) { /** * Get the xMsVersion property: The x-ms-version property. - * + * * @return the xMsVersion value. */ public String getXMsVersion() { @@ -53,7 +53,7 @@ public String getXMsVersion() { /** * Set the xMsVersion property: The x-ms-version property. - * + * * @param xMsVersion the xMsVersion value to set. * @return the BlobsSetTierHeaders object itself. */ @@ -64,7 +64,7 @@ public BlobsSetTierHeaders setXMsVersion(String xMsVersion) { /** * Get the xMsRequestId property: The x-ms-request-id property. - * + * * @return the xMsRequestId value. */ public String getXMsRequestId() { @@ -73,7 +73,7 @@ public String getXMsRequestId() { /** * Set the xMsRequestId property: The x-ms-request-id property. - * + * * @param xMsRequestId the xMsRequestId value to set. * @return the BlobsSetTierHeaders object itself. */ @@ -84,7 +84,7 @@ public BlobsSetTierHeaders setXMsRequestId(String xMsRequestId) { /** * Get the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @return the xMsClientRequestId value. */ public String getXMsClientRequestId() { @@ -93,7 +93,7 @@ public String getXMsClientRequestId() { /** * Set the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @param xMsClientRequestId the xMsClientRequestId value to set. * @return the BlobsSetTierHeaders object itself. */ diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlobsStartCopyFromURLHeaders.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobsStartCopyFromURLHeaders.java similarity index 97% rename from sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlobsStartCopyFromURLHeaders.java rename to sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobsStartCopyFromURLHeaders.java index 983b58bda06e..b92f5927e563 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlobsStartCopyFromURLHeaders.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobsStartCopyFromURLHeaders.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.blob.models; +package com.azure.v2.storage.blob.models; import com.azure.core.v2.annotation.Fluent; import io.clientcore.core.http.models.DateTimeRfc1123; @@ -72,7 +72,7 @@ public final class BlobsStartCopyFromURLHeaders { // 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) { @@ -98,7 +98,7 @@ public BlobsStartCopyFromURLHeaders(HttpHeaders rawHeaders) { /** * Get the xMsVersion property: The x-ms-version property. - * + * * @return the xMsVersion value. */ public String getXMsVersion() { @@ -107,7 +107,7 @@ public String getXMsVersion() { /** * Set the xMsVersion property: The x-ms-version property. - * + * * @param xMsVersion the xMsVersion value to set. * @return the BlobsStartCopyFromURLHeaders object itself. */ @@ -118,7 +118,7 @@ public BlobsStartCopyFromURLHeaders setXMsVersion(String xMsVersion) { /** * Get the xMsCopyId property: The x-ms-copy-id property. - * + * * @return the xMsCopyId value. */ public String getXMsCopyId() { @@ -127,7 +127,7 @@ public String getXMsCopyId() { /** * Set the xMsCopyId property: The x-ms-copy-id property. - * + * * @param xMsCopyId the xMsCopyId value to set. * @return the BlobsStartCopyFromURLHeaders object itself. */ @@ -138,7 +138,7 @@ public BlobsStartCopyFromURLHeaders setXMsCopyId(String xMsCopyId) { /** * Get the eTag property: The ETag property. - * + * * @return the eTag value. */ public String getETag() { @@ -147,7 +147,7 @@ public String getETag() { /** * Set the eTag property: The ETag property. - * + * * @param eTag the eTag value to set. * @return the BlobsStartCopyFromURLHeaders object itself. */ @@ -158,7 +158,7 @@ public BlobsStartCopyFromURLHeaders setETag(String eTag) { /** * Get the lastModified property: The Last-Modified property. - * + * * @return the lastModified value. */ public OffsetDateTime getLastModified() { @@ -170,7 +170,7 @@ public OffsetDateTime getLastModified() { /** * Set the lastModified property: The Last-Modified property. - * + * * @param lastModified the lastModified value to set. * @return the BlobsStartCopyFromURLHeaders object itself. */ @@ -185,7 +185,7 @@ public BlobsStartCopyFromURLHeaders setLastModified(OffsetDateTime lastModified) /** * Get the xMsVersionId property: The x-ms-version-id property. - * + * * @return the xMsVersionId value. */ public String getXMsVersionId() { @@ -194,7 +194,7 @@ public String getXMsVersionId() { /** * Set the xMsVersionId property: The x-ms-version-id property. - * + * * @param xMsVersionId the xMsVersionId value to set. * @return the BlobsStartCopyFromURLHeaders object itself. */ @@ -205,7 +205,7 @@ public BlobsStartCopyFromURLHeaders setXMsVersionId(String xMsVersionId) { /** * Get the xMsCopyStatus property: The x-ms-copy-status property. - * + * * @return the xMsCopyStatus value. */ public CopyStatusType getXMsCopyStatus() { @@ -214,7 +214,7 @@ public CopyStatusType getXMsCopyStatus() { /** * Set the xMsCopyStatus property: The x-ms-copy-status property. - * + * * @param xMsCopyStatus the xMsCopyStatus value to set. * @return the BlobsStartCopyFromURLHeaders object itself. */ @@ -225,7 +225,7 @@ public BlobsStartCopyFromURLHeaders setXMsCopyStatus(CopyStatusType xMsCopyStatu /** * Get the xMsRequestId property: The x-ms-request-id property. - * + * * @return the xMsRequestId value. */ public String getXMsRequestId() { @@ -234,7 +234,7 @@ public String getXMsRequestId() { /** * Set the xMsRequestId property: The x-ms-request-id property. - * + * * @param xMsRequestId the xMsRequestId value to set. * @return the BlobsStartCopyFromURLHeaders object itself. */ @@ -245,7 +245,7 @@ public BlobsStartCopyFromURLHeaders setXMsRequestId(String xMsRequestId) { /** * Get the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @return the xMsClientRequestId value. */ public String getXMsClientRequestId() { @@ -254,7 +254,7 @@ public String getXMsClientRequestId() { /** * Set the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @param xMsClientRequestId the xMsClientRequestId value to set. * @return the BlobsStartCopyFromURLHeaders object itself. */ @@ -265,7 +265,7 @@ public BlobsStartCopyFromURLHeaders setXMsClientRequestId(String xMsClientReques /** * Get the date property: The Date property. - * + * * @return the date value. */ public OffsetDateTime getDate() { @@ -277,7 +277,7 @@ public OffsetDateTime getDate() { /** * Set the date property: The Date property. - * + * * @param date the date value to set. * @return the BlobsStartCopyFromURLHeaders object itself. */ diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlobsUndeleteHeaders.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobsUndeleteHeaders.java similarity index 97% rename from sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlobsUndeleteHeaders.java rename to sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobsUndeleteHeaders.java index 3a9604daa9a3..f6a8a6a9e401 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlobsUndeleteHeaders.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobsUndeleteHeaders.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.blob.models; +package com.azure.v2.storage.blob.models; import com.azure.core.v2.annotation.Fluent; import io.clientcore.core.http.models.DateTimeRfc1123; @@ -41,7 +41,7 @@ public final class BlobsUndeleteHeaders { // HttpHeaders containing the raw property values. /** * Creates an instance of BlobsUndeleteHeaders class. - * + * * @param rawHeaders The raw HttpHeaders that will be used to create the property values. */ public BlobsUndeleteHeaders(HttpHeaders rawHeaders) { @@ -56,7 +56,7 @@ public BlobsUndeleteHeaders(HttpHeaders rawHeaders) { /** * Get the xMsVersion property: The x-ms-version property. - * + * * @return the xMsVersion value. */ public String getXMsVersion() { @@ -65,7 +65,7 @@ public String getXMsVersion() { /** * Set the xMsVersion property: The x-ms-version property. - * + * * @param xMsVersion the xMsVersion value to set. * @return the BlobsUndeleteHeaders object itself. */ @@ -76,7 +76,7 @@ public BlobsUndeleteHeaders setXMsVersion(String xMsVersion) { /** * Get the xMsRequestId property: The x-ms-request-id property. - * + * * @return the xMsRequestId value. */ public String getXMsRequestId() { @@ -85,7 +85,7 @@ public String getXMsRequestId() { /** * Set the xMsRequestId property: The x-ms-request-id property. - * + * * @param xMsRequestId the xMsRequestId value to set. * @return the BlobsUndeleteHeaders object itself. */ @@ -96,7 +96,7 @@ public BlobsUndeleteHeaders setXMsRequestId(String xMsRequestId) { /** * Get the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @return the xMsClientRequestId value. */ public String getXMsClientRequestId() { @@ -105,7 +105,7 @@ public String getXMsClientRequestId() { /** * Set the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @param xMsClientRequestId the xMsClientRequestId value to set. * @return the BlobsUndeleteHeaders object itself. */ @@ -116,7 +116,7 @@ public BlobsUndeleteHeaders setXMsClientRequestId(String xMsClientRequestId) { /** * Get the date property: The Date property. - * + * * @return the date value. */ public OffsetDateTime getDate() { @@ -128,7 +128,7 @@ public OffsetDateTime getDate() { /** * Set the date property: The Date property. - * + * * @param date the date value to set. * @return the BlobsUndeleteHeaders object itself. */ diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/Block.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/Block.java similarity index 97% rename from sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/Block.java rename to sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/Block.java index 1d45496ec4ff..5989cc0c5e5f 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/Block.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/Block.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.blob.models; +package com.azure.v2.storage.blob.models; import com.azure.core.v2.annotation.Fluent; import com.azure.core.v2.util.CoreUtils; @@ -41,7 +41,7 @@ public Block() { /** * Get the name property: The base64 encoded block ID. - * + * * @return the name value. */ public String getName() { @@ -50,7 +50,7 @@ public String getName() { /** * Set the name property: The base64 encoded block ID. - * + * * @param name the name value to set. * @return the Block object itself. */ @@ -61,7 +61,7 @@ public Block setName(String name) { /** * Get the sizeLong property: The block size in bytes. - * + * * @return the sizeLong value. */ public long getSizeLong() { @@ -70,7 +70,7 @@ public long getSizeLong() { /** * Set the sizeLong property: The block size in bytes. - * + * * @param sizeLong the sizeLong value to set. * @return the Block object itself. */ @@ -81,7 +81,7 @@ public Block setSizeLong(long sizeLong) { /** * Get the sizeInt property: The SizeInt property. - * + * * @return the sizeInt value. */ public int getSizeInt() { @@ -90,7 +90,7 @@ public int getSizeInt() { /** * Set the sizeInt property: The SizeInt property. - * + * * @param sizeInt the sizeInt value to set. * @return the Block object itself. */ @@ -116,7 +116,7 @@ public XmlWriter toXml(XmlWriter xmlWriter, String rootElementName) throws XMLSt /** * Reads an instance of Block from the XmlReader. - * + * * @param xmlReader The XmlReader being read. * @return An instance of Block if the XmlReader was pointing to an instance of it, or null if it was pointing to * XML null. @@ -128,7 +128,7 @@ public static Block fromXml(XmlReader xmlReader) throws XMLStreamException { /** * Reads an instance of Block from the XmlReader. - * + * * @param xmlReader The XmlReader being read. * @param rootElementName Optional root element name to override the default defined by the model. Used to support * cases where the model can deserialize from different root element names. diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlockBlobsCommitBlockListHeaders.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlockBlobsCommitBlockListHeaders.java similarity index 98% rename from sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlockBlobsCommitBlockListHeaders.java rename to sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlockBlobsCommitBlockListHeaders.java index f7b73b643ac8..a14594599c02 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlockBlobsCommitBlockListHeaders.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlockBlobsCommitBlockListHeaders.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.blob.models; +package com.azure.v2.storage.blob.models; import com.azure.core.v2.annotation.Fluent; import com.azure.core.v2.util.CoreUtils; @@ -95,7 +95,7 @@ public final class BlockBlobsCommitBlockListHeaders { // HttpHeaders containing the raw property values. /** * Creates an instance of BlockBlobsCommitBlockListHeaders class. - * + * * @param rawHeaders The raw HttpHeaders that will be used to create the property values. */ public BlockBlobsCommitBlockListHeaders(HttpHeaders rawHeaders) { @@ -130,7 +130,7 @@ public BlockBlobsCommitBlockListHeaders(HttpHeaders rawHeaders) { /** * Get the xMsVersion property: The x-ms-version property. - * + * * @return the xMsVersion value. */ public String getXMsVersion() { @@ -139,7 +139,7 @@ public String getXMsVersion() { /** * Set the xMsVersion property: The x-ms-version property. - * + * * @param xMsVersion the xMsVersion value to set. * @return the BlockBlobsCommitBlockListHeaders object itself. */ @@ -150,7 +150,7 @@ public BlockBlobsCommitBlockListHeaders setXMsVersion(String xMsVersion) { /** * Get the eTag property: The ETag property. - * + * * @return the eTag value. */ public String getETag() { @@ -159,7 +159,7 @@ public String getETag() { /** * Set the eTag property: The ETag property. - * + * * @param eTag the eTag value to set. * @return the BlockBlobsCommitBlockListHeaders object itself. */ @@ -170,7 +170,7 @@ public BlockBlobsCommitBlockListHeaders setETag(String eTag) { /** * Get the xMsContentCrc64 property: The x-ms-content-crc64 property. - * + * * @return the xMsContentCrc64 value. */ public byte[] getXMsContentCrc64() { @@ -179,7 +179,7 @@ public byte[] getXMsContentCrc64() { /** * Set the xMsContentCrc64 property: The x-ms-content-crc64 property. - * + * * @param xMsContentCrc64 the xMsContentCrc64 value to set. * @return the BlockBlobsCommitBlockListHeaders object itself. */ @@ -190,7 +190,7 @@ public BlockBlobsCommitBlockListHeaders setXMsContentCrc64(byte[] xMsContentCrc6 /** * Get the lastModified property: The Last-Modified property. - * + * * @return the lastModified value. */ public OffsetDateTime getLastModified() { @@ -202,7 +202,7 @@ public OffsetDateTime getLastModified() { /** * Set the lastModified property: The Last-Modified property. - * + * * @param lastModified the lastModified value to set. * @return the BlockBlobsCommitBlockListHeaders object itself. */ @@ -217,7 +217,7 @@ public BlockBlobsCommitBlockListHeaders setLastModified(OffsetDateTime lastModif /** * Get the xMsVersionId property: The x-ms-version-id property. - * + * * @return the xMsVersionId value. */ public String getXMsVersionId() { @@ -226,7 +226,7 @@ public String getXMsVersionId() { /** * Set the xMsVersionId property: The x-ms-version-id property. - * + * * @param xMsVersionId the xMsVersionId value to set. * @return the BlockBlobsCommitBlockListHeaders object itself. */ @@ -237,7 +237,7 @@ public BlockBlobsCommitBlockListHeaders setXMsVersionId(String xMsVersionId) { /** * Get the xMsEncryptionKeySha256 property: The x-ms-encryption-key-sha256 property. - * + * * @return the xMsEncryptionKeySha256 value. */ public String getXMsEncryptionKeySha256() { @@ -246,7 +246,7 @@ public String getXMsEncryptionKeySha256() { /** * Set the xMsEncryptionKeySha256 property: The x-ms-encryption-key-sha256 property. - * + * * @param xMsEncryptionKeySha256 the xMsEncryptionKeySha256 value to set. * @return the BlockBlobsCommitBlockListHeaders object itself. */ @@ -257,7 +257,7 @@ public BlockBlobsCommitBlockListHeaders setXMsEncryptionKeySha256(String xMsEncr /** * Get the xMsRequestId property: The x-ms-request-id property. - * + * * @return the xMsRequestId value. */ public String getXMsRequestId() { @@ -266,7 +266,7 @@ public String getXMsRequestId() { /** * Set the xMsRequestId property: The x-ms-request-id property. - * + * * @param xMsRequestId the xMsRequestId value to set. * @return the BlockBlobsCommitBlockListHeaders object itself. */ @@ -277,7 +277,7 @@ public BlockBlobsCommitBlockListHeaders setXMsRequestId(String xMsRequestId) { /** * Get the xMsRequestServerEncrypted property: The x-ms-request-server-encrypted property. - * + * * @return the xMsRequestServerEncrypted value. */ public Boolean isXMsRequestServerEncrypted() { @@ -286,7 +286,7 @@ public Boolean isXMsRequestServerEncrypted() { /** * Set the xMsRequestServerEncrypted property: The x-ms-request-server-encrypted property. - * + * * @param xMsRequestServerEncrypted the xMsRequestServerEncrypted value to set. * @return the BlockBlobsCommitBlockListHeaders object itself. */ @@ -297,7 +297,7 @@ public BlockBlobsCommitBlockListHeaders setXMsRequestServerEncrypted(Boolean xMs /** * Get the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @return the xMsClientRequestId value. */ public String getXMsClientRequestId() { @@ -306,7 +306,7 @@ public String getXMsClientRequestId() { /** * Set the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @param xMsClientRequestId the xMsClientRequestId value to set. * @return the BlockBlobsCommitBlockListHeaders object itself. */ @@ -317,7 +317,7 @@ public BlockBlobsCommitBlockListHeaders setXMsClientRequestId(String xMsClientRe /** * Get the date property: The Date property. - * + * * @return the date value. */ public OffsetDateTime getDate() { @@ -329,7 +329,7 @@ public OffsetDateTime getDate() { /** * Set the date property: The Date property. - * + * * @param date the date value to set. * @return the BlockBlobsCommitBlockListHeaders object itself. */ @@ -344,7 +344,7 @@ public BlockBlobsCommitBlockListHeaders setDate(OffsetDateTime date) { /** * Get the contentMD5 property: The Content-MD5 property. - * + * * @return the contentMD5 value. */ public byte[] getContentMD5() { @@ -353,7 +353,7 @@ public byte[] getContentMD5() { /** * Set the contentMD5 property: The Content-MD5 property. - * + * * @param contentMD5 the contentMD5 value to set. * @return the BlockBlobsCommitBlockListHeaders object itself. */ @@ -364,7 +364,7 @@ public BlockBlobsCommitBlockListHeaders setContentMD5(byte[] contentMD5) { /** * Get the xMsEncryptionScope property: The x-ms-encryption-scope property. - * + * * @return the xMsEncryptionScope value. */ public String getXMsEncryptionScope() { @@ -373,7 +373,7 @@ public String getXMsEncryptionScope() { /** * Set the xMsEncryptionScope property: The x-ms-encryption-scope property. - * + * * @param xMsEncryptionScope the xMsEncryptionScope value to set. * @return the BlockBlobsCommitBlockListHeaders object itself. */ diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlockBlobsGetBlockListHeaders.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlockBlobsGetBlockListHeaders.java similarity index 97% rename from sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlockBlobsGetBlockListHeaders.java rename to sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlockBlobsGetBlockListHeaders.java index a8c7e8b841ee..73ea924877ae 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlockBlobsGetBlockListHeaders.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlockBlobsGetBlockListHeaders.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.blob.models; +package com.azure.v2.storage.blob.models; import com.azure.core.v2.annotation.Fluent; import io.clientcore.core.http.models.DateTimeRfc1123; @@ -64,7 +64,7 @@ public final class BlockBlobsGetBlockListHeaders { // HttpHeaders containing the raw property values. /** * Creates an instance of BlockBlobsGetBlockListHeaders class. - * + * * @param rawHeaders The raw HttpHeaders that will be used to create the property values. */ public BlockBlobsGetBlockListHeaders(HttpHeaders rawHeaders) { @@ -89,7 +89,7 @@ public BlockBlobsGetBlockListHeaders(HttpHeaders rawHeaders) { /** * Get the xMsVersion property: The x-ms-version property. - * + * * @return the xMsVersion value. */ public String getXMsVersion() { @@ -98,7 +98,7 @@ public String getXMsVersion() { /** * Set the xMsVersion property: The x-ms-version property. - * + * * @param xMsVersion the xMsVersion value to set. * @return the BlockBlobsGetBlockListHeaders object itself. */ @@ -109,7 +109,7 @@ public BlockBlobsGetBlockListHeaders setXMsVersion(String xMsVersion) { /** * Get the xMsBlobContentLength property: The x-ms-blob-content-length property. - * + * * @return the xMsBlobContentLength value. */ public Long getXMsBlobContentLength() { @@ -118,7 +118,7 @@ public Long getXMsBlobContentLength() { /** * Set the xMsBlobContentLength property: The x-ms-blob-content-length property. - * + * * @param xMsBlobContentLength the xMsBlobContentLength value to set. * @return the BlockBlobsGetBlockListHeaders object itself. */ @@ -129,7 +129,7 @@ public BlockBlobsGetBlockListHeaders setXMsBlobContentLength(Long xMsBlobContent /** * Get the eTag property: The ETag property. - * + * * @return the eTag value. */ public String getETag() { @@ -138,7 +138,7 @@ public String getETag() { /** * Set the eTag property: The ETag property. - * + * * @param eTag the eTag value to set. * @return the BlockBlobsGetBlockListHeaders object itself. */ @@ -149,7 +149,7 @@ public BlockBlobsGetBlockListHeaders setETag(String eTag) { /** * Get the lastModified property: The Last-Modified property. - * + * * @return the lastModified value. */ public OffsetDateTime getLastModified() { @@ -161,7 +161,7 @@ public OffsetDateTime getLastModified() { /** * Set the lastModified property: The Last-Modified property. - * + * * @param lastModified the lastModified value to set. * @return the BlockBlobsGetBlockListHeaders object itself. */ @@ -176,7 +176,7 @@ public BlockBlobsGetBlockListHeaders setLastModified(OffsetDateTime lastModified /** * Get the xMsRequestId property: The x-ms-request-id property. - * + * * @return the xMsRequestId value. */ public String getXMsRequestId() { @@ -185,7 +185,7 @@ public String getXMsRequestId() { /** * Set the xMsRequestId property: The x-ms-request-id property. - * + * * @param xMsRequestId the xMsRequestId value to set. * @return the BlockBlobsGetBlockListHeaders object itself. */ @@ -196,7 +196,7 @@ public BlockBlobsGetBlockListHeaders setXMsRequestId(String xMsRequestId) { /** * Get the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @return the xMsClientRequestId value. */ public String getXMsClientRequestId() { @@ -205,7 +205,7 @@ public String getXMsClientRequestId() { /** * Set the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @param xMsClientRequestId the xMsClientRequestId value to set. * @return the BlockBlobsGetBlockListHeaders object itself. */ @@ -216,7 +216,7 @@ public BlockBlobsGetBlockListHeaders setXMsClientRequestId(String xMsClientReque /** * Get the date property: The Date property. - * + * * @return the date value. */ public OffsetDateTime getDate() { @@ -228,7 +228,7 @@ public OffsetDateTime getDate() { /** * Set the date property: The Date property. - * + * * @param date the date value to set. * @return the BlockBlobsGetBlockListHeaders object itself. */ @@ -243,7 +243,7 @@ public BlockBlobsGetBlockListHeaders setDate(OffsetDateTime date) { /** * Get the contentType property: The Content-Type property. - * + * * @return the contentType value. */ public String getContentType() { @@ -252,7 +252,7 @@ public String getContentType() { /** * Set the contentType property: The Content-Type property. - * + * * @param contentType the contentType value to set. * @return the BlockBlobsGetBlockListHeaders object itself. */ diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlockBlobsPutBlobFromUrlHeaders.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlockBlobsPutBlobFromUrlHeaders.java similarity index 97% rename from sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlockBlobsPutBlobFromUrlHeaders.java rename to sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlockBlobsPutBlobFromUrlHeaders.java index 5e620aded57e..3e82c0fc6147 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlockBlobsPutBlobFromUrlHeaders.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlockBlobsPutBlobFromUrlHeaders.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.blob.models; +package com.azure.v2.storage.blob.models; import com.azure.core.v2.annotation.Fluent; import com.azure.core.v2.util.CoreUtils; @@ -88,7 +88,7 @@ public final class BlockBlobsPutBlobFromUrlHeaders { // 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) { @@ -119,7 +119,7 @@ public BlockBlobsPutBlobFromUrlHeaders(HttpHeaders rawHeaders) { /** * Get the xMsVersion property: The x-ms-version property. - * + * * @return the xMsVersion value. */ public String getXMsVersion() { @@ -128,7 +128,7 @@ public String getXMsVersion() { /** * Set the xMsVersion property: The x-ms-version property. - * + * * @param xMsVersion the xMsVersion value to set. * @return the BlockBlobsPutBlobFromUrlHeaders object itself. */ @@ -139,7 +139,7 @@ public BlockBlobsPutBlobFromUrlHeaders setXMsVersion(String xMsVersion) { /** * Get the eTag property: The ETag property. - * + * * @return the eTag value. */ public String getETag() { @@ -148,7 +148,7 @@ public String getETag() { /** * Set the eTag property: The ETag property. - * + * * @param eTag the eTag value to set. * @return the BlockBlobsPutBlobFromUrlHeaders object itself. */ @@ -159,7 +159,7 @@ public BlockBlobsPutBlobFromUrlHeaders setETag(String eTag) { /** * Get the lastModified property: The Last-Modified property. - * + * * @return the lastModified value. */ public OffsetDateTime getLastModified() { @@ -171,7 +171,7 @@ public OffsetDateTime getLastModified() { /** * Set the lastModified property: The Last-Modified property. - * + * * @param lastModified the lastModified value to set. * @return the BlockBlobsPutBlobFromUrlHeaders object itself. */ @@ -186,7 +186,7 @@ public BlockBlobsPutBlobFromUrlHeaders setLastModified(OffsetDateTime lastModifi /** * Get the xMsVersionId property: The x-ms-version-id property. - * + * * @return the xMsVersionId value. */ public String getXMsVersionId() { @@ -195,7 +195,7 @@ public String getXMsVersionId() { /** * Set the xMsVersionId property: The x-ms-version-id property. - * + * * @param xMsVersionId the xMsVersionId value to set. * @return the BlockBlobsPutBlobFromUrlHeaders object itself. */ @@ -206,7 +206,7 @@ public BlockBlobsPutBlobFromUrlHeaders setXMsVersionId(String xMsVersionId) { /** * Get the xMsEncryptionKeySha256 property: The x-ms-encryption-key-sha256 property. - * + * * @return the xMsEncryptionKeySha256 value. */ public String getXMsEncryptionKeySha256() { @@ -215,7 +215,7 @@ public String getXMsEncryptionKeySha256() { /** * Set the xMsEncryptionKeySha256 property: The x-ms-encryption-key-sha256 property. - * + * * @param xMsEncryptionKeySha256 the xMsEncryptionKeySha256 value to set. * @return the BlockBlobsPutBlobFromUrlHeaders object itself. */ @@ -226,7 +226,7 @@ public BlockBlobsPutBlobFromUrlHeaders setXMsEncryptionKeySha256(String xMsEncry /** * Get the xMsRequestId property: The x-ms-request-id property. - * + * * @return the xMsRequestId value. */ public String getXMsRequestId() { @@ -235,7 +235,7 @@ public String getXMsRequestId() { /** * Set the xMsRequestId property: The x-ms-request-id property. - * + * * @param xMsRequestId the xMsRequestId value to set. * @return the BlockBlobsPutBlobFromUrlHeaders object itself. */ @@ -246,7 +246,7 @@ public BlockBlobsPutBlobFromUrlHeaders setXMsRequestId(String xMsRequestId) { /** * Get the xMsRequestServerEncrypted property: The x-ms-request-server-encrypted property. - * + * * @return the xMsRequestServerEncrypted value. */ public Boolean isXMsRequestServerEncrypted() { @@ -255,7 +255,7 @@ public Boolean isXMsRequestServerEncrypted() { /** * Set the xMsRequestServerEncrypted property: The x-ms-request-server-encrypted property. - * + * * @param xMsRequestServerEncrypted the xMsRequestServerEncrypted value to set. * @return the BlockBlobsPutBlobFromUrlHeaders object itself. */ @@ -266,7 +266,7 @@ public BlockBlobsPutBlobFromUrlHeaders setXMsRequestServerEncrypted(Boolean xMsR /** * Get the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @return the xMsClientRequestId value. */ public String getXMsClientRequestId() { @@ -275,7 +275,7 @@ public String getXMsClientRequestId() { /** * Set the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @param xMsClientRequestId the xMsClientRequestId value to set. * @return the BlockBlobsPutBlobFromUrlHeaders object itself. */ @@ -286,7 +286,7 @@ public BlockBlobsPutBlobFromUrlHeaders setXMsClientRequestId(String xMsClientReq /** * Get the date property: The Date property. - * + * * @return the date value. */ public OffsetDateTime getDate() { @@ -298,7 +298,7 @@ public OffsetDateTime getDate() { /** * Set the date property: The Date property. - * + * * @param date the date value to set. * @return the BlockBlobsPutBlobFromUrlHeaders object itself. */ @@ -313,7 +313,7 @@ public BlockBlobsPutBlobFromUrlHeaders setDate(OffsetDateTime date) { /** * Get the contentMD5 property: The Content-MD5 property. - * + * * @return the contentMD5 value. */ public byte[] getContentMD5() { @@ -322,7 +322,7 @@ public byte[] getContentMD5() { /** * Set the contentMD5 property: The Content-MD5 property. - * + * * @param contentMD5 the contentMD5 value to set. * @return the BlockBlobsPutBlobFromUrlHeaders object itself. */ @@ -333,7 +333,7 @@ public BlockBlobsPutBlobFromUrlHeaders setContentMD5(byte[] contentMD5) { /** * Get the xMsEncryptionScope property: The x-ms-encryption-scope property. - * + * * @return the xMsEncryptionScope value. */ public String getXMsEncryptionScope() { @@ -342,7 +342,7 @@ public String getXMsEncryptionScope() { /** * Set the xMsEncryptionScope property: The x-ms-encryption-scope property. - * + * * @param xMsEncryptionScope the xMsEncryptionScope value to set. * @return the BlockBlobsPutBlobFromUrlHeaders object itself. */ diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlockBlobsStageBlockFromURLHeaders.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlockBlobsStageBlockFromURLHeaders.java similarity index 97% rename from sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlockBlobsStageBlockFromURLHeaders.java rename to sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlockBlobsStageBlockFromURLHeaders.java index ae0893873ee2..da5c726107b2 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlockBlobsStageBlockFromURLHeaders.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlockBlobsStageBlockFromURLHeaders.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.blob.models; +package com.azure.v2.storage.blob.models; import com.azure.core.v2.annotation.Fluent; import com.azure.core.v2.util.CoreUtils; @@ -78,7 +78,7 @@ public final class BlockBlobsStageBlockFromURLHeaders { // 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) { @@ -107,7 +107,7 @@ public BlockBlobsStageBlockFromURLHeaders(HttpHeaders rawHeaders) { /** * Get the xMsVersion property: The x-ms-version property. - * + * * @return the xMsVersion value. */ public String getXMsVersion() { @@ -116,7 +116,7 @@ public String getXMsVersion() { /** * Set the xMsVersion property: The x-ms-version property. - * + * * @param xMsVersion the xMsVersion value to set. * @return the BlockBlobsStageBlockFromURLHeaders object itself. */ @@ -127,7 +127,7 @@ public BlockBlobsStageBlockFromURLHeaders setXMsVersion(String xMsVersion) { /** * Get the xMsContentCrc64 property: The x-ms-content-crc64 property. - * + * * @return the xMsContentCrc64 value. */ public byte[] getXMsContentCrc64() { @@ -136,7 +136,7 @@ public byte[] getXMsContentCrc64() { /** * Set the xMsContentCrc64 property: The x-ms-content-crc64 property. - * + * * @param xMsContentCrc64 the xMsContentCrc64 value to set. * @return the BlockBlobsStageBlockFromURLHeaders object itself. */ @@ -147,7 +147,7 @@ public BlockBlobsStageBlockFromURLHeaders setXMsContentCrc64(byte[] xMsContentCr /** * Get the xMsEncryptionKeySha256 property: The x-ms-encryption-key-sha256 property. - * + * * @return the xMsEncryptionKeySha256 value. */ public String getXMsEncryptionKeySha256() { @@ -156,7 +156,7 @@ public String getXMsEncryptionKeySha256() { /** * Set the xMsEncryptionKeySha256 property: The x-ms-encryption-key-sha256 property. - * + * * @param xMsEncryptionKeySha256 the xMsEncryptionKeySha256 value to set. * @return the BlockBlobsStageBlockFromURLHeaders object itself. */ @@ -167,7 +167,7 @@ public BlockBlobsStageBlockFromURLHeaders setXMsEncryptionKeySha256(String xMsEn /** * Get the xMsRequestId property: The x-ms-request-id property. - * + * * @return the xMsRequestId value. */ public String getXMsRequestId() { @@ -176,7 +176,7 @@ public String getXMsRequestId() { /** * Set the xMsRequestId property: The x-ms-request-id property. - * + * * @param xMsRequestId the xMsRequestId value to set. * @return the BlockBlobsStageBlockFromURLHeaders object itself. */ @@ -187,7 +187,7 @@ public BlockBlobsStageBlockFromURLHeaders setXMsRequestId(String xMsRequestId) { /** * Get the xMsRequestServerEncrypted property: The x-ms-request-server-encrypted property. - * + * * @return the xMsRequestServerEncrypted value. */ public Boolean isXMsRequestServerEncrypted() { @@ -196,7 +196,7 @@ public Boolean isXMsRequestServerEncrypted() { /** * Set the xMsRequestServerEncrypted property: The x-ms-request-server-encrypted property. - * + * * @param xMsRequestServerEncrypted the xMsRequestServerEncrypted value to set. * @return the BlockBlobsStageBlockFromURLHeaders object itself. */ @@ -207,7 +207,7 @@ public BlockBlobsStageBlockFromURLHeaders setXMsRequestServerEncrypted(Boolean x /** * Get the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @return the xMsClientRequestId value. */ public String getXMsClientRequestId() { @@ -216,7 +216,7 @@ public String getXMsClientRequestId() { /** * Set the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @param xMsClientRequestId the xMsClientRequestId value to set. * @return the BlockBlobsStageBlockFromURLHeaders object itself. */ @@ -227,7 +227,7 @@ public BlockBlobsStageBlockFromURLHeaders setXMsClientRequestId(String xMsClient /** * Get the date property: The Date property. - * + * * @return the date value. */ public OffsetDateTime getDate() { @@ -239,7 +239,7 @@ public OffsetDateTime getDate() { /** * Set the date property: The Date property. - * + * * @param date the date value to set. * @return the BlockBlobsStageBlockFromURLHeaders object itself. */ @@ -254,7 +254,7 @@ public BlockBlobsStageBlockFromURLHeaders setDate(OffsetDateTime date) { /** * Get the contentMD5 property: The Content-MD5 property. - * + * * @return the contentMD5 value. */ public byte[] getContentMD5() { @@ -263,7 +263,7 @@ public byte[] getContentMD5() { /** * Set the contentMD5 property: The Content-MD5 property. - * + * * @param contentMD5 the contentMD5 value to set. * @return the BlockBlobsStageBlockFromURLHeaders object itself. */ @@ -274,7 +274,7 @@ public BlockBlobsStageBlockFromURLHeaders setContentMD5(byte[] contentMD5) { /** * Get the xMsEncryptionScope property: The x-ms-encryption-scope property. - * + * * @return the xMsEncryptionScope value. */ public String getXMsEncryptionScope() { @@ -283,7 +283,7 @@ public String getXMsEncryptionScope() { /** * Set the xMsEncryptionScope property: The x-ms-encryption-scope property. - * + * * @param xMsEncryptionScope the xMsEncryptionScope value to set. * @return the BlockBlobsStageBlockFromURLHeaders object itself. */ diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlockBlobsStageBlockHeaders.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlockBlobsStageBlockHeaders.java similarity index 97% rename from sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlockBlobsStageBlockHeaders.java rename to sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlockBlobsStageBlockHeaders.java index 0e9f89135f71..c5d6ae0db35d 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlockBlobsStageBlockHeaders.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlockBlobsStageBlockHeaders.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.blob.models; +package com.azure.v2.storage.blob.models; import com.azure.core.v2.annotation.Fluent; import com.azure.core.v2.util.CoreUtils; @@ -85,7 +85,7 @@ public final class BlockBlobsStageBlockHeaders { // HttpHeaders containing the raw property values. /** * Creates an instance of BlockBlobsStageBlockHeaders class. - * + * * @param rawHeaders The raw HttpHeaders that will be used to create the property values. */ public BlockBlobsStageBlockHeaders(HttpHeaders rawHeaders) { @@ -115,7 +115,7 @@ public BlockBlobsStageBlockHeaders(HttpHeaders rawHeaders) { /** * Get the xMsVersion property: The x-ms-version property. - * + * * @return the xMsVersion value. */ public String getXMsVersion() { @@ -124,7 +124,7 @@ public String getXMsVersion() { /** * Set the xMsVersion property: The x-ms-version property. - * + * * @param xMsVersion the xMsVersion value to set. * @return the BlockBlobsStageBlockHeaders object itself. */ @@ -135,7 +135,7 @@ public BlockBlobsStageBlockHeaders setXMsVersion(String xMsVersion) { /** * Get the xMsContentCrc64 property: The x-ms-content-crc64 property. - * + * * @return the xMsContentCrc64 value. */ public byte[] getXMsContentCrc64() { @@ -144,7 +144,7 @@ public byte[] getXMsContentCrc64() { /** * Set the xMsContentCrc64 property: The x-ms-content-crc64 property. - * + * * @param xMsContentCrc64 the xMsContentCrc64 value to set. * @return the BlockBlobsStageBlockHeaders object itself. */ @@ -155,7 +155,7 @@ public BlockBlobsStageBlockHeaders setXMsContentCrc64(byte[] xMsContentCrc64) { /** * Get the xMsEncryptionKeySha256 property: The x-ms-encryption-key-sha256 property. - * + * * @return the xMsEncryptionKeySha256 value. */ public String getXMsEncryptionKeySha256() { @@ -164,7 +164,7 @@ public String getXMsEncryptionKeySha256() { /** * Set the xMsEncryptionKeySha256 property: The x-ms-encryption-key-sha256 property. - * + * * @param xMsEncryptionKeySha256 the xMsEncryptionKeySha256 value to set. * @return the BlockBlobsStageBlockHeaders object itself. */ @@ -175,7 +175,7 @@ public BlockBlobsStageBlockHeaders setXMsEncryptionKeySha256(String xMsEncryptio /** * Get the xMsStructuredBody property: The x-ms-structured-body property. - * + * * @return the xMsStructuredBody value. */ public String getXMsStructuredBody() { @@ -184,7 +184,7 @@ public String getXMsStructuredBody() { /** * Set the xMsStructuredBody property: The x-ms-structured-body property. - * + * * @param xMsStructuredBody the xMsStructuredBody value to set. * @return the BlockBlobsStageBlockHeaders object itself. */ @@ -195,7 +195,7 @@ public BlockBlobsStageBlockHeaders setXMsStructuredBody(String xMsStructuredBody /** * Get the xMsRequestId property: The x-ms-request-id property. - * + * * @return the xMsRequestId value. */ public String getXMsRequestId() { @@ -204,7 +204,7 @@ public String getXMsRequestId() { /** * Set the xMsRequestId property: The x-ms-request-id property. - * + * * @param xMsRequestId the xMsRequestId value to set. * @return the BlockBlobsStageBlockHeaders object itself. */ @@ -215,7 +215,7 @@ public BlockBlobsStageBlockHeaders setXMsRequestId(String xMsRequestId) { /** * Get the xMsRequestServerEncrypted property: The x-ms-request-server-encrypted property. - * + * * @return the xMsRequestServerEncrypted value. */ public Boolean isXMsRequestServerEncrypted() { @@ -224,7 +224,7 @@ public Boolean isXMsRequestServerEncrypted() { /** * Set the xMsRequestServerEncrypted property: The x-ms-request-server-encrypted property. - * + * * @param xMsRequestServerEncrypted the xMsRequestServerEncrypted value to set. * @return the BlockBlobsStageBlockHeaders object itself. */ @@ -235,7 +235,7 @@ public BlockBlobsStageBlockHeaders setXMsRequestServerEncrypted(Boolean xMsReque /** * Get the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @return the xMsClientRequestId value. */ public String getXMsClientRequestId() { @@ -244,7 +244,7 @@ public String getXMsClientRequestId() { /** * Set the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @param xMsClientRequestId the xMsClientRequestId value to set. * @return the BlockBlobsStageBlockHeaders object itself. */ @@ -255,7 +255,7 @@ public BlockBlobsStageBlockHeaders setXMsClientRequestId(String xMsClientRequest /** * Get the date property: The Date property. - * + * * @return the date value. */ public OffsetDateTime getDate() { @@ -267,7 +267,7 @@ public OffsetDateTime getDate() { /** * Set the date property: The Date property. - * + * * @param date the date value to set. * @return the BlockBlobsStageBlockHeaders object itself. */ @@ -282,7 +282,7 @@ public BlockBlobsStageBlockHeaders setDate(OffsetDateTime date) { /** * Get the contentMD5 property: The Content-MD5 property. - * + * * @return the contentMD5 value. */ public byte[] getContentMD5() { @@ -291,7 +291,7 @@ public byte[] getContentMD5() { /** * Set the contentMD5 property: The Content-MD5 property. - * + * * @param contentMD5 the contentMD5 value to set. * @return the BlockBlobsStageBlockHeaders object itself. */ @@ -302,7 +302,7 @@ public BlockBlobsStageBlockHeaders setContentMD5(byte[] contentMD5) { /** * Get the xMsEncryptionScope property: The x-ms-encryption-scope property. - * + * * @return the xMsEncryptionScope value. */ public String getXMsEncryptionScope() { @@ -311,7 +311,7 @@ public String getXMsEncryptionScope() { /** * Set the xMsEncryptionScope property: The x-ms-encryption-scope property. - * + * * @param xMsEncryptionScope the xMsEncryptionScope value to set. * @return the BlockBlobsStageBlockHeaders object itself. */ diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlockBlobsUploadHeaders.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlockBlobsUploadHeaders.java similarity index 97% rename from sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlockBlobsUploadHeaders.java rename to sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlockBlobsUploadHeaders.java index 70f8bcb510a1..ef6937b2b21f 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlockBlobsUploadHeaders.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlockBlobsUploadHeaders.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.blob.models; +package com.azure.v2.storage.blob.models; import com.azure.core.v2.annotation.Fluent; import com.azure.core.v2.util.CoreUtils; @@ -95,7 +95,7 @@ public final class BlockBlobsUploadHeaders { // HttpHeaders containing the raw property values. /** * Creates an instance of BlockBlobsUploadHeaders class. - * + * * @param rawHeaders The raw HttpHeaders that will be used to create the property values. */ public BlockBlobsUploadHeaders(HttpHeaders rawHeaders) { @@ -127,7 +127,7 @@ public BlockBlobsUploadHeaders(HttpHeaders rawHeaders) { /** * Get the xMsVersion property: The x-ms-version property. - * + * * @return the xMsVersion value. */ public String getXMsVersion() { @@ -136,7 +136,7 @@ public String getXMsVersion() { /** * Set the xMsVersion property: The x-ms-version property. - * + * * @param xMsVersion the xMsVersion value to set. * @return the BlockBlobsUploadHeaders object itself. */ @@ -147,7 +147,7 @@ public BlockBlobsUploadHeaders setXMsVersion(String xMsVersion) { /** * Get the eTag property: The ETag property. - * + * * @return the eTag value. */ public String getETag() { @@ -156,7 +156,7 @@ public String getETag() { /** * Set the eTag property: The ETag property. - * + * * @param eTag the eTag value to set. * @return the BlockBlobsUploadHeaders object itself. */ @@ -167,7 +167,7 @@ public BlockBlobsUploadHeaders setETag(String eTag) { /** * Get the lastModified property: The Last-Modified property. - * + * * @return the lastModified value. */ public OffsetDateTime getLastModified() { @@ -179,7 +179,7 @@ public OffsetDateTime getLastModified() { /** * Set the lastModified property: The Last-Modified property. - * + * * @param lastModified the lastModified value to set. * @return the BlockBlobsUploadHeaders object itself. */ @@ -194,7 +194,7 @@ public BlockBlobsUploadHeaders setLastModified(OffsetDateTime lastModified) { /** * Get the xMsVersionId property: The x-ms-version-id property. - * + * * @return the xMsVersionId value. */ public String getXMsVersionId() { @@ -203,7 +203,7 @@ public String getXMsVersionId() { /** * Set the xMsVersionId property: The x-ms-version-id property. - * + * * @param xMsVersionId the xMsVersionId value to set. * @return the BlockBlobsUploadHeaders object itself. */ @@ -214,7 +214,7 @@ public BlockBlobsUploadHeaders setXMsVersionId(String xMsVersionId) { /** * Get the xMsEncryptionKeySha256 property: The x-ms-encryption-key-sha256 property. - * + * * @return the xMsEncryptionKeySha256 value. */ public String getXMsEncryptionKeySha256() { @@ -223,7 +223,7 @@ public String getXMsEncryptionKeySha256() { /** * Set the xMsEncryptionKeySha256 property: The x-ms-encryption-key-sha256 property. - * + * * @param xMsEncryptionKeySha256 the xMsEncryptionKeySha256 value to set. * @return the BlockBlobsUploadHeaders object itself. */ @@ -234,7 +234,7 @@ public BlockBlobsUploadHeaders setXMsEncryptionKeySha256(String xMsEncryptionKey /** * Get the xMsStructuredBody property: The x-ms-structured-body property. - * + * * @return the xMsStructuredBody value. */ public String getXMsStructuredBody() { @@ -243,7 +243,7 @@ public String getXMsStructuredBody() { /** * Set the xMsStructuredBody property: The x-ms-structured-body property. - * + * * @param xMsStructuredBody the xMsStructuredBody value to set. * @return the BlockBlobsUploadHeaders object itself. */ @@ -254,7 +254,7 @@ public BlockBlobsUploadHeaders setXMsStructuredBody(String xMsStructuredBody) { /** * Get the xMsRequestId property: The x-ms-request-id property. - * + * * @return the xMsRequestId value. */ public String getXMsRequestId() { @@ -263,7 +263,7 @@ public String getXMsRequestId() { /** * Set the xMsRequestId property: The x-ms-request-id property. - * + * * @param xMsRequestId the xMsRequestId value to set. * @return the BlockBlobsUploadHeaders object itself. */ @@ -274,7 +274,7 @@ public BlockBlobsUploadHeaders setXMsRequestId(String xMsRequestId) { /** * Get the xMsRequestServerEncrypted property: The x-ms-request-server-encrypted property. - * + * * @return the xMsRequestServerEncrypted value. */ public Boolean isXMsRequestServerEncrypted() { @@ -283,7 +283,7 @@ public Boolean isXMsRequestServerEncrypted() { /** * Set the xMsRequestServerEncrypted property: The x-ms-request-server-encrypted property. - * + * * @param xMsRequestServerEncrypted the xMsRequestServerEncrypted value to set. * @return the BlockBlobsUploadHeaders object itself. */ @@ -294,7 +294,7 @@ public BlockBlobsUploadHeaders setXMsRequestServerEncrypted(Boolean xMsRequestSe /** * Get the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @return the xMsClientRequestId value. */ public String getXMsClientRequestId() { @@ -303,7 +303,7 @@ public String getXMsClientRequestId() { /** * Set the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @param xMsClientRequestId the xMsClientRequestId value to set. * @return the BlockBlobsUploadHeaders object itself. */ @@ -314,7 +314,7 @@ public BlockBlobsUploadHeaders setXMsClientRequestId(String xMsClientRequestId) /** * Get the date property: The Date property. - * + * * @return the date value. */ public OffsetDateTime getDate() { @@ -326,7 +326,7 @@ public OffsetDateTime getDate() { /** * Set the date property: The Date property. - * + * * @param date the date value to set. * @return the BlockBlobsUploadHeaders object itself. */ @@ -341,7 +341,7 @@ public BlockBlobsUploadHeaders setDate(OffsetDateTime date) { /** * Get the contentMD5 property: The Content-MD5 property. - * + * * @return the contentMD5 value. */ public byte[] getContentMD5() { @@ -350,7 +350,7 @@ public byte[] getContentMD5() { /** * Set the contentMD5 property: The Content-MD5 property. - * + * * @param contentMD5 the contentMD5 value to set. * @return the BlockBlobsUploadHeaders object itself. */ @@ -361,7 +361,7 @@ public BlockBlobsUploadHeaders setContentMD5(byte[] contentMD5) { /** * Get the xMsEncryptionScope property: The x-ms-encryption-scope property. - * + * * @return the xMsEncryptionScope value. */ public String getXMsEncryptionScope() { @@ -370,7 +370,7 @@ public String getXMsEncryptionScope() { /** * Set the xMsEncryptionScope property: The x-ms-encryption-scope property. - * + * * @param xMsEncryptionScope the xMsEncryptionScope value to set. * @return the BlockBlobsUploadHeaders object itself. */ diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlockList.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlockList.java similarity index 98% rename from sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlockList.java rename to sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlockList.java index 15ffdc2dbdb2..1ae459379cbb 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlockList.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlockList.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.blob.models; +package com.azure.v2.storage.blob.models; import com.azure.core.v2.annotation.Fluent; import com.azure.core.v2.util.CoreUtils; @@ -38,7 +38,7 @@ public BlockList() { /** * Get the committedBlocks property: The CommittedBlocks property. - * + * * @return the committedBlocks value. */ public List getCommittedBlocks() { @@ -50,7 +50,7 @@ public List getCommittedBlocks() { /** * Set the committedBlocks property: The CommittedBlocks property. - * + * * @param committedBlocks the committedBlocks value to set. * @return the BlockList object itself. */ @@ -61,7 +61,7 @@ public BlockList setCommittedBlocks(List committedBlocks) { /** * Get the uncommittedBlocks property: The UncommittedBlocks property. - * + * * @return the uncommittedBlocks value. */ public List getUncommittedBlocks() { @@ -73,7 +73,7 @@ public List getUncommittedBlocks() { /** * Set the uncommittedBlocks property: The UncommittedBlocks property. - * + * * @param uncommittedBlocks the uncommittedBlocks value to set. * @return the BlockList object itself. */ @@ -110,7 +110,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. @@ -122,7 +122,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. diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlockListType.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlockListType.java similarity index 96% rename from sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlockListType.java rename to sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlockListType.java index 1169afc1805a..afe97c7e9940 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlockListType.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlockListType.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.blob.models; +package com.azure.v2.storage.blob.models; /** * Defines values for BlockListType. @@ -34,7 +34,7 @@ public enum BlockListType { /** * Parses a serialized value to a BlockListType instance. - * + * * @param value the serialized value to parse. * @return the parsed BlockListType object, or null if unable to parse. */ diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlockLookupList.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlockLookupList.java similarity index 98% rename from sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlockLookupList.java rename to sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlockLookupList.java index 105812f83c1e..90f0ba9306ba 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/BlockLookupList.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlockLookupList.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.blob.models; +package com.azure.v2.storage.blob.models; import com.azure.core.v2.annotation.Fluent; import com.azure.core.v2.util.CoreUtils; @@ -43,7 +43,7 @@ public BlockLookupList() { /** * Get the committed property: The Committed property. - * + * * @return the committed value. */ public List getCommitted() { @@ -52,7 +52,7 @@ public List getCommitted() { /** * Set the committed property: The Committed property. - * + * * @param committed the committed value to set. * @return the BlockLookupList object itself. */ @@ -63,7 +63,7 @@ public BlockLookupList setCommitted(List committed) { /** * Get the uncommitted property: The Uncommitted property. - * + * * @return the uncommitted value. */ public List getUncommitted() { @@ -72,7 +72,7 @@ public List getUncommitted() { /** * Set the uncommitted property: The Uncommitted property. - * + * * @param uncommitted the uncommitted value to set. * @return the BlockLookupList object itself. */ @@ -83,7 +83,7 @@ public BlockLookupList setUncommitted(List uncommitted) { /** * Get the latest property: The Latest property. - * + * * @return the latest value. */ public List getLatest() { @@ -92,7 +92,7 @@ public List getLatest() { /** * Set the latest property: The Latest property. - * + * * @param latest the latest value to set. * @return the BlockLookupList object itself. */ @@ -130,7 +130,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. @@ -142,7 +142,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. diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/ClearRange.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ClearRange.java similarity index 97% rename from sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/ClearRange.java rename to sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ClearRange.java index eac1acbe7cd4..006414d39727 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/ClearRange.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ClearRange.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.blob.models; +package com.azure.v2.storage.blob.models; import com.azure.core.v2.annotation.Fluent; import com.azure.core.v2.util.CoreUtils; @@ -36,7 +36,7 @@ public ClearRange() { /** * Get the start property: The Start property. - * + * * @return the start value. */ public long getStart() { @@ -45,7 +45,7 @@ public long getStart() { /** * Set the start property: The Start property. - * + * * @param start the start value to set. * @return the ClearRange object itself. */ @@ -56,7 +56,7 @@ public ClearRange setStart(long start) { /** * Get the end property: The End property. - * + * * @return the end value. */ public long getEnd() { @@ -65,7 +65,7 @@ public long getEnd() { /** * Set the end property: The End property. - * + * * @param end the end value to set. * @return the ClearRange object itself. */ @@ -90,7 +90,7 @@ 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. @@ -102,7 +102,7 @@ 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. diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/ContainersAcquireLeaseHeaders.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ContainersAcquireLeaseHeaders.java similarity index 97% rename from sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/ContainersAcquireLeaseHeaders.java rename to sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ContainersAcquireLeaseHeaders.java index e80dbc473ac1..692a691d1f90 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/ContainersAcquireLeaseHeaders.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ContainersAcquireLeaseHeaders.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.blob.models; +package com.azure.v2.storage.blob.models; import com.azure.core.v2.annotation.Fluent; import io.clientcore.core.http.models.DateTimeRfc1123; @@ -58,7 +58,7 @@ public final class ContainersAcquireLeaseHeaders { // HttpHeaders containing the raw property values. /** * Creates an instance of ContainersAcquireLeaseHeaders class. - * + * * @param rawHeaders The raw HttpHeaders that will be used to create the property values. */ public ContainersAcquireLeaseHeaders(HttpHeaders rawHeaders) { @@ -79,7 +79,7 @@ public ContainersAcquireLeaseHeaders(HttpHeaders rawHeaders) { /** * Get the xMsVersion property: The x-ms-version property. - * + * * @return the xMsVersion value. */ public String getXMsVersion() { @@ -88,7 +88,7 @@ public String getXMsVersion() { /** * Set the xMsVersion property: The x-ms-version property. - * + * * @param xMsVersion the xMsVersion value to set. * @return the ContainersAcquireLeaseHeaders object itself. */ @@ -99,7 +99,7 @@ public ContainersAcquireLeaseHeaders setXMsVersion(String xMsVersion) { /** * Get the eTag property: The ETag property. - * + * * @return the eTag value. */ public String getETag() { @@ -108,7 +108,7 @@ public String getETag() { /** * Set the eTag property: The ETag property. - * + * * @param eTag the eTag value to set. * @return the ContainersAcquireLeaseHeaders object itself. */ @@ -119,7 +119,7 @@ public ContainersAcquireLeaseHeaders setETag(String eTag) { /** * Get the xMsLeaseId property: The x-ms-lease-id property. - * + * * @return the xMsLeaseId value. */ public String getXMsLeaseId() { @@ -128,7 +128,7 @@ public String getXMsLeaseId() { /** * Set the xMsLeaseId property: The x-ms-lease-id property. - * + * * @param xMsLeaseId the xMsLeaseId value to set. * @return the ContainersAcquireLeaseHeaders object itself. */ @@ -139,7 +139,7 @@ public ContainersAcquireLeaseHeaders setXMsLeaseId(String xMsLeaseId) { /** * Get the lastModified property: The Last-Modified property. - * + * * @return the lastModified value. */ public OffsetDateTime getLastModified() { @@ -151,7 +151,7 @@ public OffsetDateTime getLastModified() { /** * Set the lastModified property: The Last-Modified property. - * + * * @param lastModified the lastModified value to set. * @return the ContainersAcquireLeaseHeaders object itself. */ @@ -166,7 +166,7 @@ public ContainersAcquireLeaseHeaders setLastModified(OffsetDateTime lastModified /** * Get the xMsRequestId property: The x-ms-request-id property. - * + * * @return the xMsRequestId value. */ public String getXMsRequestId() { @@ -175,7 +175,7 @@ public String getXMsRequestId() { /** * Set the xMsRequestId property: The x-ms-request-id property. - * + * * @param xMsRequestId the xMsRequestId value to set. * @return the ContainersAcquireLeaseHeaders object itself. */ @@ -186,7 +186,7 @@ public ContainersAcquireLeaseHeaders setXMsRequestId(String xMsRequestId) { /** * Get the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @return the xMsClientRequestId value. */ public String getXMsClientRequestId() { @@ -195,7 +195,7 @@ public String getXMsClientRequestId() { /** * Set the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @param xMsClientRequestId the xMsClientRequestId value to set. * @return the ContainersAcquireLeaseHeaders object itself. */ @@ -206,7 +206,7 @@ public ContainersAcquireLeaseHeaders setXMsClientRequestId(String xMsClientReque /** * Get the date property: The Date property. - * + * * @return the date value. */ public OffsetDateTime getDate() { @@ -218,7 +218,7 @@ public OffsetDateTime getDate() { /** * Set the date property: The Date property. - * + * * @param date the date value to set. * @return the ContainersAcquireLeaseHeaders object itself. */ diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/ContainersBreakLeaseHeaders.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ContainersBreakLeaseHeaders.java similarity index 97% rename from sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/ContainersBreakLeaseHeaders.java rename to sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ContainersBreakLeaseHeaders.java index e4a67b535eb4..b94d5c2c787a 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/ContainersBreakLeaseHeaders.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ContainersBreakLeaseHeaders.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.blob.models; +package com.azure.v2.storage.blob.models; import com.azure.core.v2.annotation.Fluent; import io.clientcore.core.http.models.DateTimeRfc1123; @@ -58,7 +58,7 @@ public final class ContainersBreakLeaseHeaders { // HttpHeaders containing the raw property values. /** * Creates an instance of ContainersBreakLeaseHeaders class. - * + * * @param rawHeaders The raw HttpHeaders that will be used to create the property values. */ public ContainersBreakLeaseHeaders(HttpHeaders rawHeaders) { @@ -82,7 +82,7 @@ public ContainersBreakLeaseHeaders(HttpHeaders rawHeaders) { /** * Get the xMsVersion property: The x-ms-version property. - * + * * @return the xMsVersion value. */ public String getXMsVersion() { @@ -91,7 +91,7 @@ public String getXMsVersion() { /** * Set the xMsVersion property: The x-ms-version property. - * + * * @param xMsVersion the xMsVersion value to set. * @return the ContainersBreakLeaseHeaders object itself. */ @@ -102,7 +102,7 @@ public ContainersBreakLeaseHeaders setXMsVersion(String xMsVersion) { /** * Get the eTag property: The ETag property. - * + * * @return the eTag value. */ public String getETag() { @@ -111,7 +111,7 @@ public String getETag() { /** * Set the eTag property: The ETag property. - * + * * @param eTag the eTag value to set. * @return the ContainersBreakLeaseHeaders object itself. */ @@ -122,7 +122,7 @@ public ContainersBreakLeaseHeaders setETag(String eTag) { /** * Get the xMsLeaseTime property: The x-ms-lease-time property. - * + * * @return the xMsLeaseTime value. */ public Integer getXMsLeaseTime() { @@ -131,7 +131,7 @@ public Integer getXMsLeaseTime() { /** * Set the xMsLeaseTime property: The x-ms-lease-time property. - * + * * @param xMsLeaseTime the xMsLeaseTime value to set. * @return the ContainersBreakLeaseHeaders object itself. */ @@ -142,7 +142,7 @@ public ContainersBreakLeaseHeaders setXMsLeaseTime(Integer xMsLeaseTime) { /** * Get the lastModified property: The Last-Modified property. - * + * * @return the lastModified value. */ public OffsetDateTime getLastModified() { @@ -154,7 +154,7 @@ public OffsetDateTime getLastModified() { /** * Set the lastModified property: The Last-Modified property. - * + * * @param lastModified the lastModified value to set. * @return the ContainersBreakLeaseHeaders object itself. */ @@ -169,7 +169,7 @@ public ContainersBreakLeaseHeaders setLastModified(OffsetDateTime lastModified) /** * Get the xMsRequestId property: The x-ms-request-id property. - * + * * @return the xMsRequestId value. */ public String getXMsRequestId() { @@ -178,7 +178,7 @@ public String getXMsRequestId() { /** * Set the xMsRequestId property: The x-ms-request-id property. - * + * * @param xMsRequestId the xMsRequestId value to set. * @return the ContainersBreakLeaseHeaders object itself. */ @@ -189,7 +189,7 @@ public ContainersBreakLeaseHeaders setXMsRequestId(String xMsRequestId) { /** * Get the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @return the xMsClientRequestId value. */ public String getXMsClientRequestId() { @@ -198,7 +198,7 @@ public String getXMsClientRequestId() { /** * Set the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @param xMsClientRequestId the xMsClientRequestId value to set. * @return the ContainersBreakLeaseHeaders object itself. */ @@ -209,7 +209,7 @@ public ContainersBreakLeaseHeaders setXMsClientRequestId(String xMsClientRequest /** * Get the date property: The Date property. - * + * * @return the date value. */ public OffsetDateTime getDate() { @@ -221,7 +221,7 @@ public OffsetDateTime getDate() { /** * Set the date property: The Date property. - * + * * @param date the date value to set. * @return the ContainersBreakLeaseHeaders object itself. */ diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/ContainersChangeLeaseHeaders.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ContainersChangeLeaseHeaders.java similarity index 97% rename from sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/ContainersChangeLeaseHeaders.java rename to sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ContainersChangeLeaseHeaders.java index c1c11bb1dc3c..f42755268e3b 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/ContainersChangeLeaseHeaders.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ContainersChangeLeaseHeaders.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.blob.models; +package com.azure.v2.storage.blob.models; import com.azure.core.v2.annotation.Fluent; import io.clientcore.core.http.models.DateTimeRfc1123; @@ -58,7 +58,7 @@ public final class ContainersChangeLeaseHeaders { // HttpHeaders containing the raw property values. /** * Creates an instance of ContainersChangeLeaseHeaders class. - * + * * @param rawHeaders The raw HttpHeaders that will be used to create the property values. */ public ContainersChangeLeaseHeaders(HttpHeaders rawHeaders) { @@ -79,7 +79,7 @@ public ContainersChangeLeaseHeaders(HttpHeaders rawHeaders) { /** * Get the xMsVersion property: The x-ms-version property. - * + * * @return the xMsVersion value. */ public String getXMsVersion() { @@ -88,7 +88,7 @@ public String getXMsVersion() { /** * Set the xMsVersion property: The x-ms-version property. - * + * * @param xMsVersion the xMsVersion value to set. * @return the ContainersChangeLeaseHeaders object itself. */ @@ -99,7 +99,7 @@ public ContainersChangeLeaseHeaders setXMsVersion(String xMsVersion) { /** * Get the eTag property: The ETag property. - * + * * @return the eTag value. */ public String getETag() { @@ -108,7 +108,7 @@ public String getETag() { /** * Set the eTag property: The ETag property. - * + * * @param eTag the eTag value to set. * @return the ContainersChangeLeaseHeaders object itself. */ @@ -119,7 +119,7 @@ public ContainersChangeLeaseHeaders setETag(String eTag) { /** * Get the xMsLeaseId property: The x-ms-lease-id property. - * + * * @return the xMsLeaseId value. */ public String getXMsLeaseId() { @@ -128,7 +128,7 @@ public String getXMsLeaseId() { /** * Set the xMsLeaseId property: The x-ms-lease-id property. - * + * * @param xMsLeaseId the xMsLeaseId value to set. * @return the ContainersChangeLeaseHeaders object itself. */ @@ -139,7 +139,7 @@ public ContainersChangeLeaseHeaders setXMsLeaseId(String xMsLeaseId) { /** * Get the lastModified property: The Last-Modified property. - * + * * @return the lastModified value. */ public OffsetDateTime getLastModified() { @@ -151,7 +151,7 @@ public OffsetDateTime getLastModified() { /** * Set the lastModified property: The Last-Modified property. - * + * * @param lastModified the lastModified value to set. * @return the ContainersChangeLeaseHeaders object itself. */ @@ -166,7 +166,7 @@ public ContainersChangeLeaseHeaders setLastModified(OffsetDateTime lastModified) /** * Get the xMsRequestId property: The x-ms-request-id property. - * + * * @return the xMsRequestId value. */ public String getXMsRequestId() { @@ -175,7 +175,7 @@ public String getXMsRequestId() { /** * Set the xMsRequestId property: The x-ms-request-id property. - * + * * @param xMsRequestId the xMsRequestId value to set. * @return the ContainersChangeLeaseHeaders object itself. */ @@ -186,7 +186,7 @@ public ContainersChangeLeaseHeaders setXMsRequestId(String xMsRequestId) { /** * Get the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @return the xMsClientRequestId value. */ public String getXMsClientRequestId() { @@ -195,7 +195,7 @@ public String getXMsClientRequestId() { /** * Set the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @param xMsClientRequestId the xMsClientRequestId value to set. * @return the ContainersChangeLeaseHeaders object itself. */ @@ -206,7 +206,7 @@ public ContainersChangeLeaseHeaders setXMsClientRequestId(String xMsClientReques /** * Get the date property: The Date property. - * + * * @return the date value. */ public OffsetDateTime getDate() { @@ -218,7 +218,7 @@ public OffsetDateTime getDate() { /** * Set the date property: The Date property. - * + * * @param date the date value to set. * @return the ContainersChangeLeaseHeaders object itself. */ diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/ContainersCreateHeaders.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ContainersCreateHeaders.java similarity index 97% rename from sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/ContainersCreateHeaders.java rename to sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ContainersCreateHeaders.java index e6a6944727b0..4b2dcac7daa2 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/ContainersCreateHeaders.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ContainersCreateHeaders.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.blob.models; +package com.azure.v2.storage.blob.models; import com.azure.core.v2.annotation.Fluent; import io.clientcore.core.http.models.DateTimeRfc1123; @@ -51,7 +51,7 @@ public final class ContainersCreateHeaders { // HttpHeaders containing the raw property values. /** * Creates an instance of ContainersCreateHeaders class. - * + * * @param rawHeaders The raw HttpHeaders that will be used to create the property values. */ public ContainersCreateHeaders(HttpHeaders rawHeaders) { @@ -71,7 +71,7 @@ public ContainersCreateHeaders(HttpHeaders rawHeaders) { /** * Get the xMsVersion property: The x-ms-version property. - * + * * @return the xMsVersion value. */ public String getXMsVersion() { @@ -80,7 +80,7 @@ public String getXMsVersion() { /** * Set the xMsVersion property: The x-ms-version property. - * + * * @param xMsVersion the xMsVersion value to set. * @return the ContainersCreateHeaders object itself. */ @@ -91,7 +91,7 @@ public ContainersCreateHeaders setXMsVersion(String xMsVersion) { /** * Get the eTag property: The ETag property. - * + * * @return the eTag value. */ public String getETag() { @@ -100,7 +100,7 @@ public String getETag() { /** * Set the eTag property: The ETag property. - * + * * @param eTag the eTag value to set. * @return the ContainersCreateHeaders object itself. */ @@ -111,7 +111,7 @@ public ContainersCreateHeaders setETag(String eTag) { /** * Get the lastModified property: The Last-Modified property. - * + * * @return the lastModified value. */ public OffsetDateTime getLastModified() { @@ -123,7 +123,7 @@ public OffsetDateTime getLastModified() { /** * Set the lastModified property: The Last-Modified property. - * + * * @param lastModified the lastModified value to set. * @return the ContainersCreateHeaders object itself. */ @@ -138,7 +138,7 @@ public ContainersCreateHeaders setLastModified(OffsetDateTime lastModified) { /** * Get the xMsRequestId property: The x-ms-request-id property. - * + * * @return the xMsRequestId value. */ public String getXMsRequestId() { @@ -147,7 +147,7 @@ public String getXMsRequestId() { /** * Set the xMsRequestId property: The x-ms-request-id property. - * + * * @param xMsRequestId the xMsRequestId value to set. * @return the ContainersCreateHeaders object itself. */ @@ -158,7 +158,7 @@ public ContainersCreateHeaders setXMsRequestId(String xMsRequestId) { /** * Get the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @return the xMsClientRequestId value. */ public String getXMsClientRequestId() { @@ -167,7 +167,7 @@ public String getXMsClientRequestId() { /** * Set the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @param xMsClientRequestId the xMsClientRequestId value to set. * @return the ContainersCreateHeaders object itself. */ @@ -178,7 +178,7 @@ public ContainersCreateHeaders setXMsClientRequestId(String xMsClientRequestId) /** * Get the date property: The Date property. - * + * * @return the date value. */ public OffsetDateTime getDate() { @@ -190,7 +190,7 @@ public OffsetDateTime getDate() { /** * Set the date property: The Date property. - * + * * @param date the date value to set. * @return the ContainersCreateHeaders object itself. */ diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/ContainersDeleteHeaders.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ContainersDeleteHeaders.java similarity index 97% rename from sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/ContainersDeleteHeaders.java rename to sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ContainersDeleteHeaders.java index 7e8912245a1e..993ae403195f 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/ContainersDeleteHeaders.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ContainersDeleteHeaders.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.blob.models; +package com.azure.v2.storage.blob.models; import com.azure.core.v2.annotation.Fluent; import io.clientcore.core.http.models.DateTimeRfc1123; @@ -41,7 +41,7 @@ public final class ContainersDeleteHeaders { // HttpHeaders containing the raw property values. /** * Creates an instance of ContainersDeleteHeaders class. - * + * * @param rawHeaders The raw HttpHeaders that will be used to create the property values. */ public ContainersDeleteHeaders(HttpHeaders rawHeaders) { @@ -56,7 +56,7 @@ public ContainersDeleteHeaders(HttpHeaders rawHeaders) { /** * Get the xMsVersion property: The x-ms-version property. - * + * * @return the xMsVersion value. */ public String getXMsVersion() { @@ -65,7 +65,7 @@ public String getXMsVersion() { /** * Set the xMsVersion property: The x-ms-version property. - * + * * @param xMsVersion the xMsVersion value to set. * @return the ContainersDeleteHeaders object itself. */ @@ -76,7 +76,7 @@ public ContainersDeleteHeaders setXMsVersion(String xMsVersion) { /** * Get the xMsRequestId property: The x-ms-request-id property. - * + * * @return the xMsRequestId value. */ public String getXMsRequestId() { @@ -85,7 +85,7 @@ public String getXMsRequestId() { /** * Set the xMsRequestId property: The x-ms-request-id property. - * + * * @param xMsRequestId the xMsRequestId value to set. * @return the ContainersDeleteHeaders object itself. */ @@ -96,7 +96,7 @@ public ContainersDeleteHeaders setXMsRequestId(String xMsRequestId) { /** * Get the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @return the xMsClientRequestId value. */ public String getXMsClientRequestId() { @@ -105,7 +105,7 @@ public String getXMsClientRequestId() { /** * Set the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @param xMsClientRequestId the xMsClientRequestId value to set. * @return the ContainersDeleteHeaders object itself. */ @@ -116,7 +116,7 @@ public ContainersDeleteHeaders setXMsClientRequestId(String xMsClientRequestId) /** * Get the date property: The Date property. - * + * * @return the date value. */ public OffsetDateTime getDate() { @@ -128,7 +128,7 @@ public OffsetDateTime getDate() { /** * Set the date property: The Date property. - * + * * @param date the date value to set. * @return the ContainersDeleteHeaders object itself. */ diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/ContainersFilterBlobsHeaders.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ContainersFilterBlobsHeaders.java similarity index 97% rename from sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/ContainersFilterBlobsHeaders.java rename to sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ContainersFilterBlobsHeaders.java index 2f6da352533c..29eaac0f338a 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/ContainersFilterBlobsHeaders.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ContainersFilterBlobsHeaders.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.blob.models; +package com.azure.v2.storage.blob.models; import com.azure.core.v2.annotation.Fluent; import io.clientcore.core.http.models.DateTimeRfc1123; @@ -41,7 +41,7 @@ public final class ContainersFilterBlobsHeaders { // HttpHeaders containing the raw property values. /** * Creates an instance of ContainersFilterBlobsHeaders class. - * + * * @param rawHeaders The raw HttpHeaders that will be used to create the property values. */ public ContainersFilterBlobsHeaders(HttpHeaders rawHeaders) { @@ -56,7 +56,7 @@ public ContainersFilterBlobsHeaders(HttpHeaders rawHeaders) { /** * Get the xMsVersion property: The x-ms-version property. - * + * * @return the xMsVersion value. */ public String getXMsVersion() { @@ -65,7 +65,7 @@ public String getXMsVersion() { /** * Set the xMsVersion property: The x-ms-version property. - * + * * @param xMsVersion the xMsVersion value to set. * @return the ContainersFilterBlobsHeaders object itself. */ @@ -76,7 +76,7 @@ public ContainersFilterBlobsHeaders setXMsVersion(String xMsVersion) { /** * Get the xMsRequestId property: The x-ms-request-id property. - * + * * @return the xMsRequestId value. */ public String getXMsRequestId() { @@ -85,7 +85,7 @@ public String getXMsRequestId() { /** * Set the xMsRequestId property: The x-ms-request-id property. - * + * * @param xMsRequestId the xMsRequestId value to set. * @return the ContainersFilterBlobsHeaders object itself. */ @@ -96,7 +96,7 @@ public ContainersFilterBlobsHeaders setXMsRequestId(String xMsRequestId) { /** * Get the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @return the xMsClientRequestId value. */ public String getXMsClientRequestId() { @@ -105,7 +105,7 @@ public String getXMsClientRequestId() { /** * Set the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @param xMsClientRequestId the xMsClientRequestId value to set. * @return the ContainersFilterBlobsHeaders object itself. */ @@ -116,7 +116,7 @@ public ContainersFilterBlobsHeaders setXMsClientRequestId(String xMsClientReques /** * Get the date property: The Date property. - * + * * @return the date value. */ public OffsetDateTime getDate() { @@ -128,7 +128,7 @@ public OffsetDateTime getDate() { /** * Set the date property: The Date property. - * + * * @param date the date value to set. * @return the ContainersFilterBlobsHeaders object itself. */ diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/ContainersGetAccessPolicyHeaders.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ContainersGetAccessPolicyHeaders.java similarity index 97% rename from sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/ContainersGetAccessPolicyHeaders.java rename to sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ContainersGetAccessPolicyHeaders.java index 65ed114a47f1..e923c081e12d 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/ContainersGetAccessPolicyHeaders.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ContainersGetAccessPolicyHeaders.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.blob.models; +package com.azure.v2.storage.blob.models; import com.azure.core.v2.annotation.Fluent; import io.clientcore.core.http.models.DateTimeRfc1123; @@ -58,7 +58,7 @@ public final class ContainersGetAccessPolicyHeaders { // HttpHeaders containing the raw property values. /** * Creates an instance of ContainersGetAccessPolicyHeaders class. - * + * * @param rawHeaders The raw HttpHeaders that will be used to create the property values. */ public ContainersGetAccessPolicyHeaders(HttpHeaders rawHeaders) { @@ -82,7 +82,7 @@ public ContainersGetAccessPolicyHeaders(HttpHeaders rawHeaders) { /** * Get the xMsVersion property: The x-ms-version property. - * + * * @return the xMsVersion value. */ public String getXMsVersion() { @@ -91,7 +91,7 @@ public String getXMsVersion() { /** * Set the xMsVersion property: The x-ms-version property. - * + * * @param xMsVersion the xMsVersion value to set. * @return the ContainersGetAccessPolicyHeaders object itself. */ @@ -102,7 +102,7 @@ public ContainersGetAccessPolicyHeaders setXMsVersion(String xMsVersion) { /** * Get the eTag property: The ETag property. - * + * * @return the eTag value. */ public String getETag() { @@ -111,7 +111,7 @@ public String getETag() { /** * Set the eTag property: The ETag property. - * + * * @param eTag the eTag value to set. * @return the ContainersGetAccessPolicyHeaders object itself. */ @@ -122,7 +122,7 @@ public ContainersGetAccessPolicyHeaders setETag(String eTag) { /** * Get the lastModified property: The Last-Modified property. - * + * * @return the lastModified value. */ public OffsetDateTime getLastModified() { @@ -134,7 +134,7 @@ public OffsetDateTime getLastModified() { /** * Set the lastModified property: The Last-Modified property. - * + * * @param lastModified the lastModified value to set. * @return the ContainersGetAccessPolicyHeaders object itself. */ @@ -149,7 +149,7 @@ public ContainersGetAccessPolicyHeaders setLastModified(OffsetDateTime lastModif /** * Get the xMsBlobPublicAccess property: The x-ms-blob-public-access property. - * + * * @return the xMsBlobPublicAccess value. */ public PublicAccessType getXMsBlobPublicAccess() { @@ -158,7 +158,7 @@ public PublicAccessType getXMsBlobPublicAccess() { /** * Set the xMsBlobPublicAccess property: The x-ms-blob-public-access property. - * + * * @param xMsBlobPublicAccess the xMsBlobPublicAccess value to set. * @return the ContainersGetAccessPolicyHeaders object itself. */ @@ -169,7 +169,7 @@ public ContainersGetAccessPolicyHeaders setXMsBlobPublicAccess(PublicAccessType /** * Get the xMsRequestId property: The x-ms-request-id property. - * + * * @return the xMsRequestId value. */ public String getXMsRequestId() { @@ -178,7 +178,7 @@ public String getXMsRequestId() { /** * Set the xMsRequestId property: The x-ms-request-id property. - * + * * @param xMsRequestId the xMsRequestId value to set. * @return the ContainersGetAccessPolicyHeaders object itself. */ @@ -189,7 +189,7 @@ public ContainersGetAccessPolicyHeaders setXMsRequestId(String xMsRequestId) { /** * Get the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @return the xMsClientRequestId value. */ public String getXMsClientRequestId() { @@ -198,7 +198,7 @@ public String getXMsClientRequestId() { /** * Set the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @param xMsClientRequestId the xMsClientRequestId value to set. * @return the ContainersGetAccessPolicyHeaders object itself. */ @@ -209,7 +209,7 @@ public ContainersGetAccessPolicyHeaders setXMsClientRequestId(String xMsClientRe /** * Get the date property: The Date property. - * + * * @return the date value. */ public OffsetDateTime getDate() { @@ -221,7 +221,7 @@ public OffsetDateTime getDate() { /** * Set the date property: The Date property. - * + * * @param date the date value to set. * @return the ContainersGetAccessPolicyHeaders object itself. */ diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/ContainersGetAccountInfoHeaders.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ContainersGetAccountInfoHeaders.java similarity index 97% rename from sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/ContainersGetAccountInfoHeaders.java rename to sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ContainersGetAccountInfoHeaders.java index 7b7e4cfe22c0..ce6007a85198 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/ContainersGetAccountInfoHeaders.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ContainersGetAccountInfoHeaders.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.blob.models; +package com.azure.v2.storage.blob.models; import com.azure.core.v2.annotation.Fluent; import io.clientcore.core.http.models.DateTimeRfc1123; @@ -62,7 +62,7 @@ public final class ContainersGetAccountInfoHeaders { // HttpHeaders containing the raw property values. /** * Creates an instance of ContainersGetAccountInfoHeaders class. - * + * * @param rawHeaders The raw HttpHeaders that will be used to create the property values. */ public ContainersGetAccountInfoHeaders(HttpHeaders rawHeaders) { @@ -89,7 +89,7 @@ public ContainersGetAccountInfoHeaders(HttpHeaders rawHeaders) { /** * Get the xMsVersion property: The x-ms-version property. - * + * * @return the xMsVersion value. */ public String getXMsVersion() { @@ -98,7 +98,7 @@ public String getXMsVersion() { /** * Set the xMsVersion property: The x-ms-version property. - * + * * @param xMsVersion the xMsVersion value to set. * @return the ContainersGetAccountInfoHeaders object itself. */ @@ -109,7 +109,7 @@ public ContainersGetAccountInfoHeaders setXMsVersion(String xMsVersion) { /** * Get the xMsAccountKind property: The x-ms-account-kind property. - * + * * @return the xMsAccountKind value. */ public AccountKind getXMsAccountKind() { @@ -118,7 +118,7 @@ public AccountKind getXMsAccountKind() { /** * Set the xMsAccountKind property: The x-ms-account-kind property. - * + * * @param xMsAccountKind the xMsAccountKind value to set. * @return the ContainersGetAccountInfoHeaders object itself. */ @@ -129,7 +129,7 @@ public ContainersGetAccountInfoHeaders setXMsAccountKind(AccountKind xMsAccountK /** * Get the xMsIsHnsEnabled property: The x-ms-is-hns-enabled property. - * + * * @return the xMsIsHnsEnabled value. */ public Boolean isXMsIsHnsEnabled() { @@ -138,7 +138,7 @@ public Boolean isXMsIsHnsEnabled() { /** * Set the xMsIsHnsEnabled property: The x-ms-is-hns-enabled property. - * + * * @param xMsIsHnsEnabled the xMsIsHnsEnabled value to set. * @return the ContainersGetAccountInfoHeaders object itself. */ @@ -149,7 +149,7 @@ public ContainersGetAccountInfoHeaders setXMsIsHnsEnabled(Boolean xMsIsHnsEnable /** * Get the xMsSkuName property: The x-ms-sku-name property. - * + * * @return the xMsSkuName value. */ public SkuName getXMsSkuName() { @@ -158,7 +158,7 @@ public SkuName getXMsSkuName() { /** * Set the xMsSkuName property: The x-ms-sku-name property. - * + * * @param xMsSkuName the xMsSkuName value to set. * @return the ContainersGetAccountInfoHeaders object itself. */ @@ -169,7 +169,7 @@ public ContainersGetAccountInfoHeaders setXMsSkuName(SkuName xMsSkuName) { /** * Get the xMsRequestId property: The x-ms-request-id property. - * + * * @return the xMsRequestId value. */ public String getXMsRequestId() { @@ -178,7 +178,7 @@ public String getXMsRequestId() { /** * Set the xMsRequestId property: The x-ms-request-id property. - * + * * @param xMsRequestId the xMsRequestId value to set. * @return the ContainersGetAccountInfoHeaders object itself. */ @@ -189,7 +189,7 @@ public ContainersGetAccountInfoHeaders setXMsRequestId(String xMsRequestId) { /** * Get the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @return the xMsClientRequestId value. */ public String getXMsClientRequestId() { @@ -198,7 +198,7 @@ public String getXMsClientRequestId() { /** * Set the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @param xMsClientRequestId the xMsClientRequestId value to set. * @return the ContainersGetAccountInfoHeaders object itself. */ @@ -209,7 +209,7 @@ public ContainersGetAccountInfoHeaders setXMsClientRequestId(String xMsClientReq /** * Get the date property: The Date property. - * + * * @return the date value. */ public OffsetDateTime getDate() { @@ -221,7 +221,7 @@ public OffsetDateTime getDate() { /** * Set the date property: The Date property. - * + * * @param date the date value to set. * @return the ContainersGetAccountInfoHeaders object itself. */ diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/ContainersGetPropertiesHeaders.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ContainersGetPropertiesHeaders.java similarity index 98% rename from sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/ContainersGetPropertiesHeaders.java rename to sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ContainersGetPropertiesHeaders.java index bb505e8826fa..b1f4240fe1c9 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/ContainersGetPropertiesHeaders.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ContainersGetPropertiesHeaders.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.blob.models; +package com.azure.v2.storage.blob.models; import com.azure.core.v2.annotation.Fluent; import io.clientcore.core.http.models.HttpHeader; @@ -126,7 +126,7 @@ public final class ContainersGetPropertiesHeaders { // HttpHeaders containing the raw property values. /** * Creates an instance of ContainersGetPropertiesHeaders class. - * + * * @param rawHeaders The raw HttpHeaders that will be used to create the property values. */ public ContainersGetPropertiesHeaders(HttpHeaders rawHeaders) { @@ -191,7 +191,7 @@ public ContainersGetPropertiesHeaders(HttpHeaders rawHeaders) { /** * Get the xMsLeaseStatus property: The x-ms-lease-status property. - * + * * @return the xMsLeaseStatus value. */ public LeaseStatusType getXMsLeaseStatus() { @@ -200,7 +200,7 @@ public LeaseStatusType getXMsLeaseStatus() { /** * Set the xMsLeaseStatus property: The x-ms-lease-status property. - * + * * @param xMsLeaseStatus the xMsLeaseStatus value to set. * @return the ContainersGetPropertiesHeaders object itself. */ @@ -211,7 +211,7 @@ public ContainersGetPropertiesHeaders setXMsLeaseStatus(LeaseStatusType xMsLease /** * Get the xMsVersion property: The x-ms-version property. - * + * * @return the xMsVersion value. */ public String getXMsVersion() { @@ -220,7 +220,7 @@ public String getXMsVersion() { /** * Set the xMsVersion property: The x-ms-version property. - * + * * @param xMsVersion the xMsVersion value to set. * @return the ContainersGetPropertiesHeaders object itself. */ @@ -232,7 +232,7 @@ public ContainersGetPropertiesHeaders setXMsVersion(String xMsVersion) { /** * Get the xMsImmutableStorageWithVersioningEnabled property: The x-ms-immutable-storage-with-versioning-enabled * property. - * + * * @return the xMsImmutableStorageWithVersioningEnabled value. */ public Boolean isXMsImmutableStorageWithVersioningEnabled() { @@ -242,7 +242,7 @@ public Boolean isXMsImmutableStorageWithVersioningEnabled() { /** * Set the xMsImmutableStorageWithVersioningEnabled property: The x-ms-immutable-storage-with-versioning-enabled * property. - * + * * @param xMsImmutableStorageWithVersioningEnabled the xMsImmutableStorageWithVersioningEnabled value to set. * @return the ContainersGetPropertiesHeaders object itself. */ @@ -254,7 +254,7 @@ public Boolean isXMsImmutableStorageWithVersioningEnabled() { /** * Get the xMsLeaseState property: The x-ms-lease-state property. - * + * * @return the xMsLeaseState value. */ public LeaseStateType getXMsLeaseState() { @@ -263,7 +263,7 @@ public LeaseStateType getXMsLeaseState() { /** * Set the xMsLeaseState property: The x-ms-lease-state property. - * + * * @param xMsLeaseState the xMsLeaseState value to set. * @return the ContainersGetPropertiesHeaders object itself. */ @@ -274,7 +274,7 @@ public ContainersGetPropertiesHeaders setXMsLeaseState(LeaseStateType xMsLeaseSt /** * Get the xMsDenyEncryptionScopeOverride property: The x-ms-deny-encryption-scope-override property. - * + * * @return the xMsDenyEncryptionScopeOverride value. */ public Boolean isXMsDenyEncryptionScopeOverride() { @@ -283,7 +283,7 @@ public Boolean isXMsDenyEncryptionScopeOverride() { /** * Set the xMsDenyEncryptionScopeOverride property: The x-ms-deny-encryption-scope-override property. - * + * * @param xMsDenyEncryptionScopeOverride the xMsDenyEncryptionScopeOverride value to set. * @return the ContainersGetPropertiesHeaders object itself. */ @@ -294,7 +294,7 @@ public ContainersGetPropertiesHeaders setXMsDenyEncryptionScopeOverride(Boolean /** * Get the lastModified property: The Last-Modified property. - * + * * @return the lastModified value. */ public OffsetDateTime getLastModified() { @@ -306,7 +306,7 @@ public OffsetDateTime getLastModified() { /** * Set the lastModified property: The Last-Modified property. - * + * * @param lastModified the lastModified value to set. * @return the ContainersGetPropertiesHeaders object itself. */ @@ -321,7 +321,7 @@ public ContainersGetPropertiesHeaders setLastModified(OffsetDateTime lastModifie /** * Get the xMsMeta property: The x-ms-meta- property. - * + * * @return the xMsMeta value. */ public Map getXMsMeta() { @@ -330,7 +330,7 @@ public Map getXMsMeta() { /** * Set the xMsMeta property: The x-ms-meta- property. - * + * * @param xMsMeta the xMsMeta value to set. * @return the ContainersGetPropertiesHeaders object itself. */ @@ -341,7 +341,7 @@ public ContainersGetPropertiesHeaders setXMsMeta(Map xMsMeta) { /** * Get the date property: The Date property. - * + * * @return the date value. */ public OffsetDateTime getDate() { @@ -353,7 +353,7 @@ public OffsetDateTime getDate() { /** * Set the date property: The Date property. - * + * * @param date the date value to set. * @return the ContainersGetPropertiesHeaders object itself. */ @@ -368,7 +368,7 @@ public ContainersGetPropertiesHeaders setDate(OffsetDateTime date) { /** * Get the xMsHasLegalHold property: The x-ms-has-legal-hold property. - * + * * @return the xMsHasLegalHold value. */ public Boolean isXMsHasLegalHold() { @@ -377,7 +377,7 @@ public Boolean isXMsHasLegalHold() { /** * Set the xMsHasLegalHold property: The x-ms-has-legal-hold property. - * + * * @param xMsHasLegalHold the xMsHasLegalHold value to set. * @return the ContainersGetPropertiesHeaders object itself. */ @@ -388,7 +388,7 @@ public ContainersGetPropertiesHeaders setXMsHasLegalHold(Boolean xMsHasLegalHold /** * Get the xMsDefaultEncryptionScope property: The x-ms-default-encryption-scope property. - * + * * @return the xMsDefaultEncryptionScope value. */ public String getXMsDefaultEncryptionScope() { @@ -397,7 +397,7 @@ public String getXMsDefaultEncryptionScope() { /** * Set the xMsDefaultEncryptionScope property: The x-ms-default-encryption-scope property. - * + * * @param xMsDefaultEncryptionScope the xMsDefaultEncryptionScope value to set. * @return the ContainersGetPropertiesHeaders object itself. */ @@ -408,7 +408,7 @@ public ContainersGetPropertiesHeaders setXMsDefaultEncryptionScope(String xMsDef /** * Get the eTag property: The ETag property. - * + * * @return the eTag value. */ public String getETag() { @@ -417,7 +417,7 @@ public String getETag() { /** * Set the eTag property: The ETag property. - * + * * @param eTag the eTag value to set. * @return the ContainersGetPropertiesHeaders object itself. */ @@ -428,7 +428,7 @@ public ContainersGetPropertiesHeaders setETag(String eTag) { /** * Get the xMsHasImmutabilityPolicy property: The x-ms-has-immutability-policy property. - * + * * @return the xMsHasImmutabilityPolicy value. */ public Boolean isXMsHasImmutabilityPolicy() { @@ -437,7 +437,7 @@ public Boolean isXMsHasImmutabilityPolicy() { /** * Set the xMsHasImmutabilityPolicy property: The x-ms-has-immutability-policy property. - * + * * @param xMsHasImmutabilityPolicy the xMsHasImmutabilityPolicy value to set. * @return the ContainersGetPropertiesHeaders object itself. */ @@ -448,7 +448,7 @@ public ContainersGetPropertiesHeaders setXMsHasImmutabilityPolicy(Boolean xMsHas /** * Get the xMsLeaseDuration property: The x-ms-lease-duration property. - * + * * @return the xMsLeaseDuration value. */ public LeaseDurationType getXMsLeaseDuration() { @@ -457,7 +457,7 @@ public LeaseDurationType getXMsLeaseDuration() { /** * Set the xMsLeaseDuration property: The x-ms-lease-duration property. - * + * * @param xMsLeaseDuration the xMsLeaseDuration value to set. * @return the ContainersGetPropertiesHeaders object itself. */ @@ -468,7 +468,7 @@ public ContainersGetPropertiesHeaders setXMsLeaseDuration(LeaseDurationType xMsL /** * Get the xMsBlobPublicAccess property: The x-ms-blob-public-access property. - * + * * @return the xMsBlobPublicAccess value. */ public PublicAccessType getXMsBlobPublicAccess() { @@ -477,7 +477,7 @@ public PublicAccessType getXMsBlobPublicAccess() { /** * Set the xMsBlobPublicAccess property: The x-ms-blob-public-access property. - * + * * @param xMsBlobPublicAccess the xMsBlobPublicAccess value to set. * @return the ContainersGetPropertiesHeaders object itself. */ @@ -488,7 +488,7 @@ public ContainersGetPropertiesHeaders setXMsBlobPublicAccess(PublicAccessType xM /** * Get the xMsRequestId property: The x-ms-request-id property. - * + * * @return the xMsRequestId value. */ public String getXMsRequestId() { @@ -497,7 +497,7 @@ public String getXMsRequestId() { /** * Set the xMsRequestId property: The x-ms-request-id property. - * + * * @param xMsRequestId the xMsRequestId value to set. * @return the ContainersGetPropertiesHeaders object itself. */ @@ -508,7 +508,7 @@ public ContainersGetPropertiesHeaders setXMsRequestId(String xMsRequestId) { /** * Get the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @return the xMsClientRequestId value. */ public String getXMsClientRequestId() { @@ -517,7 +517,7 @@ public String getXMsClientRequestId() { /** * Set the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @param xMsClientRequestId the xMsClientRequestId value to set. * @return the ContainersGetPropertiesHeaders object itself. */ diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/ContainersListBlobFlatSegmentHeaders.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ContainersListBlobFlatSegmentHeaders.java similarity index 97% rename from sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/ContainersListBlobFlatSegmentHeaders.java rename to sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ContainersListBlobFlatSegmentHeaders.java index d681b6cd95a1..f17242f04bde 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/ContainersListBlobFlatSegmentHeaders.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ContainersListBlobFlatSegmentHeaders.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.blob.models; +package com.azure.v2.storage.blob.models; import com.azure.core.v2.annotation.Fluent; import io.clientcore.core.http.models.DateTimeRfc1123; @@ -46,7 +46,7 @@ public final class ContainersListBlobFlatSegmentHeaders { // HttpHeaders containing the raw property values. /** * Creates an instance of ContainersListBlobFlatSegmentHeaders class. - * + * * @param rawHeaders The raw HttpHeaders that will be used to create the property values. */ public ContainersListBlobFlatSegmentHeaders(HttpHeaders rawHeaders) { @@ -62,7 +62,7 @@ public ContainersListBlobFlatSegmentHeaders(HttpHeaders rawHeaders) { /** * Get the xMsVersion property: The x-ms-version property. - * + * * @return the xMsVersion value. */ public String getXMsVersion() { @@ -71,7 +71,7 @@ public String getXMsVersion() { /** * Set the xMsVersion property: The x-ms-version property. - * + * * @param xMsVersion the xMsVersion value to set. * @return the ContainersListBlobFlatSegmentHeaders object itself. */ @@ -82,7 +82,7 @@ public ContainersListBlobFlatSegmentHeaders setXMsVersion(String xMsVersion) { /** * Get the xMsRequestId property: The x-ms-request-id property. - * + * * @return the xMsRequestId value. */ public String getXMsRequestId() { @@ -91,7 +91,7 @@ public String getXMsRequestId() { /** * Set the xMsRequestId property: The x-ms-request-id property. - * + * * @param xMsRequestId the xMsRequestId value to set. * @return the ContainersListBlobFlatSegmentHeaders object itself. */ @@ -102,7 +102,7 @@ public ContainersListBlobFlatSegmentHeaders setXMsRequestId(String xMsRequestId) /** * Get the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @return the xMsClientRequestId value. */ public String getXMsClientRequestId() { @@ -111,7 +111,7 @@ public String getXMsClientRequestId() { /** * Set the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @param xMsClientRequestId the xMsClientRequestId value to set. * @return the ContainersListBlobFlatSegmentHeaders object itself. */ @@ -122,7 +122,7 @@ public ContainersListBlobFlatSegmentHeaders setXMsClientRequestId(String xMsClie /** * Get the date property: The Date property. - * + * * @return the date value. */ public OffsetDateTime getDate() { @@ -134,7 +134,7 @@ public OffsetDateTime getDate() { /** * Set the date property: The Date property. - * + * * @param date the date value to set. * @return the ContainersListBlobFlatSegmentHeaders object itself. */ @@ -149,7 +149,7 @@ public ContainersListBlobFlatSegmentHeaders setDate(OffsetDateTime date) { /** * Get the contentType property: The Content-Type property. - * + * * @return the contentType value. */ public String getContentType() { @@ -158,7 +158,7 @@ public String getContentType() { /** * Set the contentType property: The Content-Type property. - * + * * @param contentType the contentType value to set. * @return the ContainersListBlobFlatSegmentHeaders object itself. */ diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/ContainersListBlobHierarchySegmentHeaders.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ContainersListBlobHierarchySegmentHeaders.java similarity index 97% rename from sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/ContainersListBlobHierarchySegmentHeaders.java rename to sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ContainersListBlobHierarchySegmentHeaders.java index d92a3c819d00..8fa996bdbffe 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/ContainersListBlobHierarchySegmentHeaders.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ContainersListBlobHierarchySegmentHeaders.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.blob.models; +package com.azure.v2.storage.blob.models; import com.azure.core.v2.annotation.Fluent; import io.clientcore.core.http.models.DateTimeRfc1123; @@ -46,7 +46,7 @@ public final class ContainersListBlobHierarchySegmentHeaders { // HttpHeaders containing the raw property values. /** * Creates an instance of ContainersListBlobHierarchySegmentHeaders class. - * + * * @param rawHeaders The raw HttpHeaders that will be used to create the property values. */ public ContainersListBlobHierarchySegmentHeaders(HttpHeaders rawHeaders) { @@ -62,7 +62,7 @@ public ContainersListBlobHierarchySegmentHeaders(HttpHeaders rawHeaders) { /** * Get the xMsVersion property: The x-ms-version property. - * + * * @return the xMsVersion value. */ public String getXMsVersion() { @@ -71,7 +71,7 @@ public String getXMsVersion() { /** * Set the xMsVersion property: The x-ms-version property. - * + * * @param xMsVersion the xMsVersion value to set. * @return the ContainersListBlobHierarchySegmentHeaders object itself. */ @@ -82,7 +82,7 @@ public ContainersListBlobHierarchySegmentHeaders setXMsVersion(String xMsVersion /** * Get the xMsRequestId property: The x-ms-request-id property. - * + * * @return the xMsRequestId value. */ public String getXMsRequestId() { @@ -91,7 +91,7 @@ public String getXMsRequestId() { /** * Set the xMsRequestId property: The x-ms-request-id property. - * + * * @param xMsRequestId the xMsRequestId value to set. * @return the ContainersListBlobHierarchySegmentHeaders object itself. */ @@ -102,7 +102,7 @@ public ContainersListBlobHierarchySegmentHeaders setXMsRequestId(String xMsReque /** * Get the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @return the xMsClientRequestId value. */ public String getXMsClientRequestId() { @@ -111,7 +111,7 @@ public String getXMsClientRequestId() { /** * Set the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @param xMsClientRequestId the xMsClientRequestId value to set. * @return the ContainersListBlobHierarchySegmentHeaders object itself. */ @@ -122,7 +122,7 @@ public ContainersListBlobHierarchySegmentHeaders setXMsClientRequestId(String xM /** * Get the date property: The Date property. - * + * * @return the date value. */ public OffsetDateTime getDate() { @@ -134,7 +134,7 @@ public OffsetDateTime getDate() { /** * Set the date property: The Date property. - * + * * @param date the date value to set. * @return the ContainersListBlobHierarchySegmentHeaders object itself. */ @@ -149,7 +149,7 @@ public ContainersListBlobHierarchySegmentHeaders setDate(OffsetDateTime date) { /** * Get the contentType property: The Content-Type property. - * + * * @return the contentType value. */ public String getContentType() { @@ -158,7 +158,7 @@ public String getContentType() { /** * Set the contentType property: The Content-Type property. - * + * * @param contentType the contentType value to set. * @return the ContainersListBlobHierarchySegmentHeaders object itself. */ diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/ContainersReleaseLeaseHeaders.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ContainersReleaseLeaseHeaders.java similarity index 97% rename from sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/ContainersReleaseLeaseHeaders.java rename to sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ContainersReleaseLeaseHeaders.java index eb29922d5c82..6ce4920f2f84 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/ContainersReleaseLeaseHeaders.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ContainersReleaseLeaseHeaders.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.blob.models; +package com.azure.v2.storage.blob.models; import com.azure.core.v2.annotation.Fluent; import io.clientcore.core.http.models.DateTimeRfc1123; @@ -51,7 +51,7 @@ public final class ContainersReleaseLeaseHeaders { // HttpHeaders containing the raw property values. /** * Creates an instance of ContainersReleaseLeaseHeaders class. - * + * * @param rawHeaders The raw HttpHeaders that will be used to create the property values. */ public ContainersReleaseLeaseHeaders(HttpHeaders rawHeaders) { @@ -71,7 +71,7 @@ public ContainersReleaseLeaseHeaders(HttpHeaders rawHeaders) { /** * Get the xMsVersion property: The x-ms-version property. - * + * * @return the xMsVersion value. */ public String getXMsVersion() { @@ -80,7 +80,7 @@ public String getXMsVersion() { /** * Set the xMsVersion property: The x-ms-version property. - * + * * @param xMsVersion the xMsVersion value to set. * @return the ContainersReleaseLeaseHeaders object itself. */ @@ -91,7 +91,7 @@ public ContainersReleaseLeaseHeaders setXMsVersion(String xMsVersion) { /** * Get the eTag property: The ETag property. - * + * * @return the eTag value. */ public String getETag() { @@ -100,7 +100,7 @@ public String getETag() { /** * Set the eTag property: The ETag property. - * + * * @param eTag the eTag value to set. * @return the ContainersReleaseLeaseHeaders object itself. */ @@ -111,7 +111,7 @@ public ContainersReleaseLeaseHeaders setETag(String eTag) { /** * Get the lastModified property: The Last-Modified property. - * + * * @return the lastModified value. */ public OffsetDateTime getLastModified() { @@ -123,7 +123,7 @@ public OffsetDateTime getLastModified() { /** * Set the lastModified property: The Last-Modified property. - * + * * @param lastModified the lastModified value to set. * @return the ContainersReleaseLeaseHeaders object itself. */ @@ -138,7 +138,7 @@ public ContainersReleaseLeaseHeaders setLastModified(OffsetDateTime lastModified /** * Get the xMsRequestId property: The x-ms-request-id property. - * + * * @return the xMsRequestId value. */ public String getXMsRequestId() { @@ -147,7 +147,7 @@ public String getXMsRequestId() { /** * Set the xMsRequestId property: The x-ms-request-id property. - * + * * @param xMsRequestId the xMsRequestId value to set. * @return the ContainersReleaseLeaseHeaders object itself. */ @@ -158,7 +158,7 @@ public ContainersReleaseLeaseHeaders setXMsRequestId(String xMsRequestId) { /** * Get the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @return the xMsClientRequestId value. */ public String getXMsClientRequestId() { @@ -167,7 +167,7 @@ public String getXMsClientRequestId() { /** * Set the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @param xMsClientRequestId the xMsClientRequestId value to set. * @return the ContainersReleaseLeaseHeaders object itself. */ @@ -178,7 +178,7 @@ public ContainersReleaseLeaseHeaders setXMsClientRequestId(String xMsClientReque /** * Get the date property: The Date property. - * + * * @return the date value. */ public OffsetDateTime getDate() { @@ -190,7 +190,7 @@ public OffsetDateTime getDate() { /** * Set the date property: The Date property. - * + * * @param date the date value to set. * @return the ContainersReleaseLeaseHeaders object itself. */ diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/ContainersRenameHeaders.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ContainersRenameHeaders.java similarity index 97% rename from sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/ContainersRenameHeaders.java rename to sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ContainersRenameHeaders.java index d6f995646153..8fe39b5a1fe9 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/ContainersRenameHeaders.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ContainersRenameHeaders.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.blob.models; +package com.azure.v2.storage.blob.models; import com.azure.core.v2.annotation.Fluent; import io.clientcore.core.http.models.DateTimeRfc1123; @@ -41,7 +41,7 @@ public final class ContainersRenameHeaders { // HttpHeaders containing the raw property values. /** * Creates an instance of ContainersRenameHeaders class. - * + * * @param rawHeaders The raw HttpHeaders that will be used to create the property values. */ public ContainersRenameHeaders(HttpHeaders rawHeaders) { @@ -56,7 +56,7 @@ public ContainersRenameHeaders(HttpHeaders rawHeaders) { /** * Get the xMsVersion property: The x-ms-version property. - * + * * @return the xMsVersion value. */ public String getXMsVersion() { @@ -65,7 +65,7 @@ public String getXMsVersion() { /** * Set the xMsVersion property: The x-ms-version property. - * + * * @param xMsVersion the xMsVersion value to set. * @return the ContainersRenameHeaders object itself. */ @@ -76,7 +76,7 @@ public ContainersRenameHeaders setXMsVersion(String xMsVersion) { /** * Get the xMsRequestId property: The x-ms-request-id property. - * + * * @return the xMsRequestId value. */ public String getXMsRequestId() { @@ -85,7 +85,7 @@ public String getXMsRequestId() { /** * Set the xMsRequestId property: The x-ms-request-id property. - * + * * @param xMsRequestId the xMsRequestId value to set. * @return the ContainersRenameHeaders object itself. */ @@ -96,7 +96,7 @@ public ContainersRenameHeaders setXMsRequestId(String xMsRequestId) { /** * Get the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @return the xMsClientRequestId value. */ public String getXMsClientRequestId() { @@ -105,7 +105,7 @@ public String getXMsClientRequestId() { /** * Set the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @param xMsClientRequestId the xMsClientRequestId value to set. * @return the ContainersRenameHeaders object itself. */ @@ -116,7 +116,7 @@ public ContainersRenameHeaders setXMsClientRequestId(String xMsClientRequestId) /** * Get the date property: The Date property. - * + * * @return the date value. */ public OffsetDateTime getDate() { @@ -128,7 +128,7 @@ public OffsetDateTime getDate() { /** * Set the date property: The Date property. - * + * * @param date the date value to set. * @return the ContainersRenameHeaders object itself. */ diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/ContainersRenewLeaseHeaders.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ContainersRenewLeaseHeaders.java similarity index 97% rename from sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/ContainersRenewLeaseHeaders.java rename to sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ContainersRenewLeaseHeaders.java index c2d38506b410..4c9f8cc1d155 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/ContainersRenewLeaseHeaders.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ContainersRenewLeaseHeaders.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.blob.models; +package com.azure.v2.storage.blob.models; import com.azure.core.v2.annotation.Fluent; import io.clientcore.core.http.models.DateTimeRfc1123; @@ -58,7 +58,7 @@ public final class ContainersRenewLeaseHeaders { // HttpHeaders containing the raw property values. /** * Creates an instance of ContainersRenewLeaseHeaders class. - * + * * @param rawHeaders The raw HttpHeaders that will be used to create the property values. */ public ContainersRenewLeaseHeaders(HttpHeaders rawHeaders) { @@ -79,7 +79,7 @@ public ContainersRenewLeaseHeaders(HttpHeaders rawHeaders) { /** * Get the xMsVersion property: The x-ms-version property. - * + * * @return the xMsVersion value. */ public String getXMsVersion() { @@ -88,7 +88,7 @@ public String getXMsVersion() { /** * Set the xMsVersion property: The x-ms-version property. - * + * * @param xMsVersion the xMsVersion value to set. * @return the ContainersRenewLeaseHeaders object itself. */ @@ -99,7 +99,7 @@ public ContainersRenewLeaseHeaders setXMsVersion(String xMsVersion) { /** * Get the eTag property: The ETag property. - * + * * @return the eTag value. */ public String getETag() { @@ -108,7 +108,7 @@ public String getETag() { /** * Set the eTag property: The ETag property. - * + * * @param eTag the eTag value to set. * @return the ContainersRenewLeaseHeaders object itself. */ @@ -119,7 +119,7 @@ public ContainersRenewLeaseHeaders setETag(String eTag) { /** * Get the xMsLeaseId property: The x-ms-lease-id property. - * + * * @return the xMsLeaseId value. */ public String getXMsLeaseId() { @@ -128,7 +128,7 @@ public String getXMsLeaseId() { /** * Set the xMsLeaseId property: The x-ms-lease-id property. - * + * * @param xMsLeaseId the xMsLeaseId value to set. * @return the ContainersRenewLeaseHeaders object itself. */ @@ -139,7 +139,7 @@ public ContainersRenewLeaseHeaders setXMsLeaseId(String xMsLeaseId) { /** * Get the lastModified property: The Last-Modified property. - * + * * @return the lastModified value. */ public OffsetDateTime getLastModified() { @@ -151,7 +151,7 @@ public OffsetDateTime getLastModified() { /** * Set the lastModified property: The Last-Modified property. - * + * * @param lastModified the lastModified value to set. * @return the ContainersRenewLeaseHeaders object itself. */ @@ -166,7 +166,7 @@ public ContainersRenewLeaseHeaders setLastModified(OffsetDateTime lastModified) /** * Get the xMsRequestId property: The x-ms-request-id property. - * + * * @return the xMsRequestId value. */ public String getXMsRequestId() { @@ -175,7 +175,7 @@ public String getXMsRequestId() { /** * Set the xMsRequestId property: The x-ms-request-id property. - * + * * @param xMsRequestId the xMsRequestId value to set. * @return the ContainersRenewLeaseHeaders object itself. */ @@ -186,7 +186,7 @@ public ContainersRenewLeaseHeaders setXMsRequestId(String xMsRequestId) { /** * Get the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @return the xMsClientRequestId value. */ public String getXMsClientRequestId() { @@ -195,7 +195,7 @@ public String getXMsClientRequestId() { /** * Set the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @param xMsClientRequestId the xMsClientRequestId value to set. * @return the ContainersRenewLeaseHeaders object itself. */ @@ -206,7 +206,7 @@ public ContainersRenewLeaseHeaders setXMsClientRequestId(String xMsClientRequest /** * Get the date property: The Date property. - * + * * @return the date value. */ public OffsetDateTime getDate() { @@ -218,7 +218,7 @@ public OffsetDateTime getDate() { /** * Set the date property: The Date property. - * + * * @param date the date value to set. * @return the ContainersRenewLeaseHeaders object itself. */ diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/ContainersRestoreHeaders.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ContainersRestoreHeaders.java similarity index 97% rename from sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/ContainersRestoreHeaders.java rename to sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ContainersRestoreHeaders.java index 5d09d4dfa5a1..771399ee4772 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/ContainersRestoreHeaders.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ContainersRestoreHeaders.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.blob.models; +package com.azure.v2.storage.blob.models; import com.azure.core.v2.annotation.Fluent; import io.clientcore.core.http.models.DateTimeRfc1123; @@ -41,7 +41,7 @@ public final class ContainersRestoreHeaders { // HttpHeaders containing the raw property values. /** * Creates an instance of ContainersRestoreHeaders class. - * + * * @param rawHeaders The raw HttpHeaders that will be used to create the property values. */ public ContainersRestoreHeaders(HttpHeaders rawHeaders) { @@ -56,7 +56,7 @@ public ContainersRestoreHeaders(HttpHeaders rawHeaders) { /** * Get the xMsVersion property: The x-ms-version property. - * + * * @return the xMsVersion value. */ public String getXMsVersion() { @@ -65,7 +65,7 @@ public String getXMsVersion() { /** * Set the xMsVersion property: The x-ms-version property. - * + * * @param xMsVersion the xMsVersion value to set. * @return the ContainersRestoreHeaders object itself. */ @@ -76,7 +76,7 @@ public ContainersRestoreHeaders setXMsVersion(String xMsVersion) { /** * Get the xMsRequestId property: The x-ms-request-id property. - * + * * @return the xMsRequestId value. */ public String getXMsRequestId() { @@ -85,7 +85,7 @@ public String getXMsRequestId() { /** * Set the xMsRequestId property: The x-ms-request-id property. - * + * * @param xMsRequestId the xMsRequestId value to set. * @return the ContainersRestoreHeaders object itself. */ @@ -96,7 +96,7 @@ public ContainersRestoreHeaders setXMsRequestId(String xMsRequestId) { /** * Get the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @return the xMsClientRequestId value. */ public String getXMsClientRequestId() { @@ -105,7 +105,7 @@ public String getXMsClientRequestId() { /** * Set the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @param xMsClientRequestId the xMsClientRequestId value to set. * @return the ContainersRestoreHeaders object itself. */ @@ -116,7 +116,7 @@ public ContainersRestoreHeaders setXMsClientRequestId(String xMsClientRequestId) /** * Get the date property: The Date property. - * + * * @return the date value. */ public OffsetDateTime getDate() { @@ -128,7 +128,7 @@ public OffsetDateTime getDate() { /** * Set the date property: The Date property. - * + * * @param date the date value to set. * @return the ContainersRestoreHeaders object itself. */ diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/ContainersSetAccessPolicyHeaders.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ContainersSetAccessPolicyHeaders.java similarity index 97% rename from sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/ContainersSetAccessPolicyHeaders.java rename to sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ContainersSetAccessPolicyHeaders.java index 929f6795598d..f59f9d5b3c96 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/ContainersSetAccessPolicyHeaders.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ContainersSetAccessPolicyHeaders.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.blob.models; +package com.azure.v2.storage.blob.models; import com.azure.core.v2.annotation.Fluent; import io.clientcore.core.http.models.DateTimeRfc1123; @@ -51,7 +51,7 @@ public final class ContainersSetAccessPolicyHeaders { // HttpHeaders containing the raw property values. /** * Creates an instance of ContainersSetAccessPolicyHeaders class. - * + * * @param rawHeaders The raw HttpHeaders that will be used to create the property values. */ public ContainersSetAccessPolicyHeaders(HttpHeaders rawHeaders) { @@ -71,7 +71,7 @@ public ContainersSetAccessPolicyHeaders(HttpHeaders rawHeaders) { /** * Get the xMsVersion property: The x-ms-version property. - * + * * @return the xMsVersion value. */ public String getXMsVersion() { @@ -80,7 +80,7 @@ public String getXMsVersion() { /** * Set the xMsVersion property: The x-ms-version property. - * + * * @param xMsVersion the xMsVersion value to set. * @return the ContainersSetAccessPolicyHeaders object itself. */ @@ -91,7 +91,7 @@ public ContainersSetAccessPolicyHeaders setXMsVersion(String xMsVersion) { /** * Get the eTag property: The ETag property. - * + * * @return the eTag value. */ public String getETag() { @@ -100,7 +100,7 @@ public String getETag() { /** * Set the eTag property: The ETag property. - * + * * @param eTag the eTag value to set. * @return the ContainersSetAccessPolicyHeaders object itself. */ @@ -111,7 +111,7 @@ public ContainersSetAccessPolicyHeaders setETag(String eTag) { /** * Get the lastModified property: The Last-Modified property. - * + * * @return the lastModified value. */ public OffsetDateTime getLastModified() { @@ -123,7 +123,7 @@ public OffsetDateTime getLastModified() { /** * Set the lastModified property: The Last-Modified property. - * + * * @param lastModified the lastModified value to set. * @return the ContainersSetAccessPolicyHeaders object itself. */ @@ -138,7 +138,7 @@ public ContainersSetAccessPolicyHeaders setLastModified(OffsetDateTime lastModif /** * Get the xMsRequestId property: The x-ms-request-id property. - * + * * @return the xMsRequestId value. */ public String getXMsRequestId() { @@ -147,7 +147,7 @@ public String getXMsRequestId() { /** * Set the xMsRequestId property: The x-ms-request-id property. - * + * * @param xMsRequestId the xMsRequestId value to set. * @return the ContainersSetAccessPolicyHeaders object itself. */ @@ -158,7 +158,7 @@ public ContainersSetAccessPolicyHeaders setXMsRequestId(String xMsRequestId) { /** * Get the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @return the xMsClientRequestId value. */ public String getXMsClientRequestId() { @@ -167,7 +167,7 @@ public String getXMsClientRequestId() { /** * Set the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @param xMsClientRequestId the xMsClientRequestId value to set. * @return the ContainersSetAccessPolicyHeaders object itself. */ @@ -178,7 +178,7 @@ public ContainersSetAccessPolicyHeaders setXMsClientRequestId(String xMsClientRe /** * Get the date property: The Date property. - * + * * @return the date value. */ public OffsetDateTime getDate() { @@ -190,7 +190,7 @@ public OffsetDateTime getDate() { /** * Set the date property: The Date property. - * + * * @param date the date value to set. * @return the ContainersSetAccessPolicyHeaders object itself. */ diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/ContainersSetMetadataHeaders.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ContainersSetMetadataHeaders.java similarity index 97% rename from sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/ContainersSetMetadataHeaders.java rename to sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ContainersSetMetadataHeaders.java index 6742ee4d522e..e5b56ccbe422 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/ContainersSetMetadataHeaders.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ContainersSetMetadataHeaders.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.blob.models; +package com.azure.v2.storage.blob.models; import com.azure.core.v2.annotation.Fluent; import io.clientcore.core.http.models.DateTimeRfc1123; @@ -51,7 +51,7 @@ public final class ContainersSetMetadataHeaders { // HttpHeaders containing the raw property values. /** * Creates an instance of ContainersSetMetadataHeaders class. - * + * * @param rawHeaders The raw HttpHeaders that will be used to create the property values. */ public ContainersSetMetadataHeaders(HttpHeaders rawHeaders) { @@ -71,7 +71,7 @@ public ContainersSetMetadataHeaders(HttpHeaders rawHeaders) { /** * Get the xMsVersion property: The x-ms-version property. - * + * * @return the xMsVersion value. */ public String getXMsVersion() { @@ -80,7 +80,7 @@ public String getXMsVersion() { /** * Set the xMsVersion property: The x-ms-version property. - * + * * @param xMsVersion the xMsVersion value to set. * @return the ContainersSetMetadataHeaders object itself. */ @@ -91,7 +91,7 @@ public ContainersSetMetadataHeaders setXMsVersion(String xMsVersion) { /** * Get the eTag property: The ETag property. - * + * * @return the eTag value. */ public String getETag() { @@ -100,7 +100,7 @@ public String getETag() { /** * Set the eTag property: The ETag property. - * + * * @param eTag the eTag value to set. * @return the ContainersSetMetadataHeaders object itself. */ @@ -111,7 +111,7 @@ public ContainersSetMetadataHeaders setETag(String eTag) { /** * Get the lastModified property: The Last-Modified property. - * + * * @return the lastModified value. */ public OffsetDateTime getLastModified() { @@ -123,7 +123,7 @@ public OffsetDateTime getLastModified() { /** * Set the lastModified property: The Last-Modified property. - * + * * @param lastModified the lastModified value to set. * @return the ContainersSetMetadataHeaders object itself. */ @@ -138,7 +138,7 @@ public ContainersSetMetadataHeaders setLastModified(OffsetDateTime lastModified) /** * Get the xMsRequestId property: The x-ms-request-id property. - * + * * @return the xMsRequestId value. */ public String getXMsRequestId() { @@ -147,7 +147,7 @@ public String getXMsRequestId() { /** * Set the xMsRequestId property: The x-ms-request-id property. - * + * * @param xMsRequestId the xMsRequestId value to set. * @return the ContainersSetMetadataHeaders object itself. */ @@ -158,7 +158,7 @@ public ContainersSetMetadataHeaders setXMsRequestId(String xMsRequestId) { /** * Get the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @return the xMsClientRequestId value. */ public String getXMsClientRequestId() { @@ -167,7 +167,7 @@ public String getXMsClientRequestId() { /** * Set the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @param xMsClientRequestId the xMsClientRequestId value to set. * @return the ContainersSetMetadataHeaders object itself. */ @@ -178,7 +178,7 @@ public ContainersSetMetadataHeaders setXMsClientRequestId(String xMsClientReques /** * Get the date property: The Date property. - * + * * @return the date value. */ public OffsetDateTime getDate() { @@ -190,7 +190,7 @@ public OffsetDateTime getDate() { /** * Set the date property: The Date property. - * + * * @param date the date value to set. * @return the ContainersSetMetadataHeaders object itself. */ diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/ContainersSubmitBatchHeaders.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ContainersSubmitBatchHeaders.java similarity index 96% rename from sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/ContainersSubmitBatchHeaders.java rename to sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ContainersSubmitBatchHeaders.java index 9c8941aebd27..8937162fc580 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/ContainersSubmitBatchHeaders.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ContainersSubmitBatchHeaders.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.blob.models; +package com.azure.v2.storage.blob.models; import com.azure.core.v2.annotation.Fluent; import io.clientcore.core.http.models.HttpHeaderName; @@ -33,7 +33,7 @@ public final class ContainersSubmitBatchHeaders { // 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) { @@ -44,7 +44,7 @@ public ContainersSubmitBatchHeaders(HttpHeaders rawHeaders) { /** * Get the xMsVersion property: The x-ms-version property. - * + * * @return the xMsVersion value. */ public String getXMsVersion() { @@ -53,7 +53,7 @@ public String getXMsVersion() { /** * Set the xMsVersion property: The x-ms-version property. - * + * * @param xMsVersion the xMsVersion value to set. * @return the ContainersSubmitBatchHeaders object itself. */ @@ -64,7 +64,7 @@ public ContainersSubmitBatchHeaders setXMsVersion(String xMsVersion) { /** * Get the xMsRequestId property: The x-ms-request-id property. - * + * * @return the xMsRequestId value. */ public String getXMsRequestId() { @@ -73,7 +73,7 @@ public String getXMsRequestId() { /** * Set the xMsRequestId property: The x-ms-request-id property. - * + * * @param xMsRequestId the xMsRequestId value to set. * @return the ContainersSubmitBatchHeaders object itself. */ @@ -84,7 +84,7 @@ public ContainersSubmitBatchHeaders setXMsRequestId(String xMsRequestId) { /** * Get the contentType property: The Content-Type property. - * + * * @return the contentType value. */ public String getContentType() { @@ -93,7 +93,7 @@ public String getContentType() { /** * Set the contentType property: The Content-Type property. - * + * * @param contentType the contentType value to set. * @return the ContainersSubmitBatchHeaders object itself. */ diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/CopyStatusType.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/CopyStatusType.java similarity index 96% rename from sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/CopyStatusType.java rename to sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/CopyStatusType.java index 7ff46019be09..969feea15694 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/CopyStatusType.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/CopyStatusType.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.blob.models; +package com.azure.v2.storage.blob.models; /** * Defines values for CopyStatusType. @@ -39,7 +39,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-v2/src/main/java/com/azure/storage/blob/models/CpkInfo.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/CpkInfo.java similarity index 97% rename from sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/CpkInfo.java rename to sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/CpkInfo.java index 6b7a622ef5c2..b556faf6e3f6 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/CpkInfo.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/CpkInfo.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.blob.models; +package com.azure.v2.storage.blob.models; import com.azure.core.v2.annotation.Fluent; @@ -39,7 +39,7 @@ public CpkInfo() { * Get the encryptionKey property: Optional. Specifies the encryption key to use to encrypt the data provided in the * request. If not specified, encryption is performed with the root account encryption key. For more information, * see Encryption at Rest for Azure Storage Services. - * + * * @return the encryptionKey value. */ public String getEncryptionKey() { @@ -50,7 +50,7 @@ public String getEncryptionKey() { * Set the encryptionKey property: Optional. Specifies the encryption key to use to encrypt the data provided in the * request. If not specified, encryption is performed with the root account encryption key. For more information, * see Encryption at Rest for Azure Storage Services. - * + * * @param encryptionKey the encryptionKey value to set. * @return the CpkInfo object itself. */ @@ -62,7 +62,7 @@ public CpkInfo setEncryptionKey(String encryptionKey) { /** * Get the encryptionKeySha256 property: The SHA-256 hash of the provided encryption key. Must be provided if the * x-ms-encryption-key header is provided. - * + * * @return the encryptionKeySha256 value. */ public String getEncryptionKeySha256() { @@ -72,7 +72,7 @@ public String getEncryptionKeySha256() { /** * Set the encryptionKeySha256 property: The SHA-256 hash of the provided encryption key. Must be provided if the * x-ms-encryption-key header is provided. - * + * * @param encryptionKeySha256 the encryptionKeySha256 value to set. * @return the CpkInfo object itself. */ @@ -84,7 +84,7 @@ public CpkInfo setEncryptionKeySha256(String encryptionKeySha256) { /** * Get the encryptionAlgorithm property: The algorithm used to produce the encryption key hash. Currently, the only * accepted value is "AES256". Must be provided if the x-ms-encryption-key header is provided. - * + * * @return the encryptionAlgorithm value. */ public EncryptionAlgorithmType getEncryptionAlgorithm() { @@ -94,7 +94,7 @@ public EncryptionAlgorithmType getEncryptionAlgorithm() { /** * Set the encryptionAlgorithm property: The algorithm used to produce the encryption key hash. Currently, the only * accepted value is "AES256". Must be provided if the x-ms-encryption-key header is provided. - * + * * @param encryptionAlgorithm the encryptionAlgorithm value to set. * @return the CpkInfo object itself. */ diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/DeleteSnapshotsOptionType.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/DeleteSnapshotsOptionType.java similarity index 96% rename from sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/DeleteSnapshotsOptionType.java rename to sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/DeleteSnapshotsOptionType.java index d0905a9f3e02..447b848f540f 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/DeleteSnapshotsOptionType.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/DeleteSnapshotsOptionType.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.blob.models; +package com.azure.v2.storage.blob.models; /** * Defines values for DeleteSnapshotsOptionType. @@ -29,7 +29,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-v2/src/main/java/com/azure/storage/blob/models/DelimitedTextConfiguration.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/DelimitedTextConfiguration.java similarity index 98% rename from sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/DelimitedTextConfiguration.java rename to sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/DelimitedTextConfiguration.java index 21c8e4121c10..ac86f197d8db 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/DelimitedTextConfiguration.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/DelimitedTextConfiguration.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.blob.models; +package com.azure.v2.storage.blob.models; import com.azure.core.v2.annotation.Fluent; import com.azure.core.v2.util.CoreUtils; @@ -51,7 +51,7 @@ public DelimitedTextConfiguration() { /** * Get the columnSeparator property: The string used to separate columns. - * + * * @return the columnSeparator value. */ public String getColumnSeparator() { @@ -60,7 +60,7 @@ public String getColumnSeparator() { /** * Set the columnSeparator property: The string used to separate columns. - * + * * @param columnSeparator the columnSeparator value to set. * @return the DelimitedTextConfiguration object itself. */ @@ -71,7 +71,7 @@ public DelimitedTextConfiguration setColumnSeparator(String columnSeparator) { /** * Get the fieldQuote property: The string used to quote a specific field. - * + * * @return the fieldQuote value. */ public String getFieldQuote() { @@ -80,7 +80,7 @@ public String getFieldQuote() { /** * Set the fieldQuote property: The string used to quote a specific field. - * + * * @param fieldQuote the fieldQuote value to set. * @return the DelimitedTextConfiguration object itself. */ @@ -91,7 +91,7 @@ public DelimitedTextConfiguration setFieldQuote(String fieldQuote) { /** * Get the recordSeparator property: The string used to separate records. - * + * * @return the recordSeparator value. */ public String getRecordSeparator() { @@ -100,7 +100,7 @@ public String getRecordSeparator() { /** * Set the recordSeparator property: The string used to separate records. - * + * * @param recordSeparator the recordSeparator value to set. * @return the DelimitedTextConfiguration object itself. */ @@ -111,7 +111,7 @@ public DelimitedTextConfiguration setRecordSeparator(String recordSeparator) { /** * Get the escapeChar property: The string used as an escape character. - * + * * @return the escapeChar value. */ public String getEscapeChar() { @@ -120,7 +120,7 @@ public String getEscapeChar() { /** * Set the escapeChar property: The string used as an escape character. - * + * * @param escapeChar the escapeChar value to set. * @return the DelimitedTextConfiguration object itself. */ @@ -131,7 +131,7 @@ public DelimitedTextConfiguration setEscapeChar(String escapeChar) { /** * Get the headersPresent property: Represents whether the data has headers. - * + * * @return the headersPresent value. */ public Boolean isHeadersPresent() { @@ -140,7 +140,7 @@ public Boolean isHeadersPresent() { /** * Set the headersPresent property: Represents whether the data has headers. - * + * * @param headersPresent the headersPresent value to set. * @return the DelimitedTextConfiguration object itself. */ @@ -168,7 +168,7 @@ public XmlWriter toXml(XmlWriter xmlWriter, String rootElementName) throws XMLSt /** * Reads an instance of DelimitedTextConfiguration from the XmlReader. - * + * * @param xmlReader The XmlReader being read. * @return An instance of DelimitedTextConfiguration if the XmlReader was pointing to an instance of it, or null if * it was pointing to XML null. @@ -180,7 +180,7 @@ public static DelimitedTextConfiguration fromXml(XmlReader xmlReader) throws XML /** * Reads an instance of DelimitedTextConfiguration from the XmlReader. - * + * * @param xmlReader The XmlReader being read. * @param rootElementName Optional root element name to override the default defined by the model. Used to support * cases where the model can deserialize from different root element names. diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/EncryptionAlgorithmType.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/EncryptionAlgorithmType.java similarity index 96% rename from sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/EncryptionAlgorithmType.java rename to sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/EncryptionAlgorithmType.java index 182cc57063a7..a518fc06259b 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/EncryptionAlgorithmType.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/EncryptionAlgorithmType.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.blob.models; +package com.azure.v2.storage.blob.models; /** * Defines values for EncryptionAlgorithmType. @@ -24,7 +24,7 @@ public enum EncryptionAlgorithmType { /** * Parses a serialized value to a EncryptionAlgorithmType instance. - * + * * @param value the serialized value to parse. * @return the parsed EncryptionAlgorithmType object, or null if unable to parse. */ diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/EncryptionScope.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/EncryptionScope.java similarity index 97% rename from sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/EncryptionScope.java rename to sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/EncryptionScope.java index 0ee0437ef3aa..3756f55dddc8 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/EncryptionScope.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/EncryptionScope.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.blob.models; +package com.azure.v2.storage.blob.models; import com.azure.core.v2.annotation.Fluent; @@ -28,7 +28,7 @@ public EncryptionScope() { * Get the encryptionScope property: Optional. Version 2019-07-07 and later. Specifies the name of the encryption * scope to use to encrypt the data provided in the request. If not specified, encryption is performed with the * default account encryption scope. For more information, see Encryption at Rest for Azure Storage Services. - * + * * @return the encryptionScope value. */ public String getEncryptionScope() { @@ -39,7 +39,7 @@ public String getEncryptionScope() { * Set the encryptionScope property: Optional. Version 2019-07-07 and later. Specifies the name of the encryption * scope to use to encrypt the data provided in the request. If not specified, encryption is performed with the * default account encryption scope. For more information, see Encryption at Rest for Azure Storage Services. - * + * * @param encryptionScope the encryptionScope value to set. * @return the EncryptionScope object itself. */ diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/FilterBlobItem.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/FilterBlobItem.java similarity index 98% rename from sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/FilterBlobItem.java rename to sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/FilterBlobItem.java index b622fece7698..924eb1ff0142 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/FilterBlobItem.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/FilterBlobItem.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.blob.models; +package com.azure.v2.storage.blob.models; import com.azure.core.v2.annotation.Fluent; import com.azure.core.v2.util.CoreUtils; @@ -51,7 +51,7 @@ public FilterBlobItem() { /** * Get the name property: The Name property. - * + * * @return the name value. */ public String getName() { @@ -60,7 +60,7 @@ public String getName() { /** * Set the name property: The Name property. - * + * * @param name the name value to set. * @return the FilterBlobItem object itself. */ @@ -71,7 +71,7 @@ public FilterBlobItem setName(String name) { /** * Get the containerName property: The ContainerName property. - * + * * @return the containerName value. */ public String getContainerName() { @@ -80,7 +80,7 @@ public String getContainerName() { /** * Set the containerName property: The ContainerName property. - * + * * @param containerName the containerName value to set. * @return the FilterBlobItem object itself. */ @@ -91,7 +91,7 @@ public FilterBlobItem setContainerName(String containerName) { /** * Get the tags property: Blob tags. - * + * * @return the tags value. */ public BlobTags getTags() { @@ -100,7 +100,7 @@ public BlobTags getTags() { /** * Set the tags property: Blob tags. - * + * * @param tags the tags value to set. * @return the FilterBlobItem object itself. */ @@ -111,7 +111,7 @@ public FilterBlobItem setTags(BlobTags tags) { /** * Get the versionId property: The VersionId property. - * + * * @return the versionId value. */ public String getVersionId() { @@ -120,7 +120,7 @@ public String getVersionId() { /** * Set the versionId property: The VersionId property. - * + * * @param versionId the versionId value to set. * @return the FilterBlobItem object itself. */ @@ -131,7 +131,7 @@ public FilterBlobItem setVersionId(String versionId) { /** * Get the isCurrentVersion property: The IsCurrentVersion property. - * + * * @return the isCurrentVersion value. */ public Boolean isCurrentVersion() { @@ -140,7 +140,7 @@ public Boolean isCurrentVersion() { /** * Set the isCurrentVersion property: The IsCurrentVersion property. - * + * * @param isCurrentVersion the isCurrentVersion value to set. * @return the FilterBlobItem object itself. */ @@ -168,7 +168,7 @@ public XmlWriter toXml(XmlWriter xmlWriter, String rootElementName) throws XMLSt /** * Reads an instance of FilterBlobItem from the XmlReader. - * + * * @param xmlReader The XmlReader being read. * @return An instance of FilterBlobItem if the XmlReader was pointing to an instance of it, or null if it was * pointing to XML null. @@ -180,7 +180,7 @@ public static FilterBlobItem fromXml(XmlReader xmlReader) throws XMLStreamExcept /** * Reads an instance of FilterBlobItem from the XmlReader. - * + * * @param xmlReader The XmlReader being read. * @param rootElementName Optional root element name to override the default defined by the model. Used to support * cases where the model can deserialize from different root element names. diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/FilterBlobSegment.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/FilterBlobSegment.java similarity index 98% rename from sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/FilterBlobSegment.java rename to sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/FilterBlobSegment.java index 2ddaebed7e28..385d04cf2b22 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/FilterBlobSegment.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/FilterBlobSegment.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.blob.models; +package com.azure.v2.storage.blob.models; import com.azure.core.v2.annotation.Fluent; import com.azure.core.v2.util.CoreUtils; @@ -48,7 +48,7 @@ public FilterBlobSegment() { /** * Get the serviceEndpoint property: The ServiceEndpoint property. - * + * * @return the serviceEndpoint value. */ public String getServiceEndpoint() { @@ -57,7 +57,7 @@ public String getServiceEndpoint() { /** * Set the serviceEndpoint property: The ServiceEndpoint property. - * + * * @param serviceEndpoint the serviceEndpoint value to set. * @return the FilterBlobSegment object itself. */ @@ -68,7 +68,7 @@ public FilterBlobSegment setServiceEndpoint(String serviceEndpoint) { /** * Get the where property: The Where property. - * + * * @return the where value. */ public String getWhere() { @@ -77,7 +77,7 @@ public String getWhere() { /** * Set the where property: The Where property. - * + * * @param where the where value to set. * @return the FilterBlobSegment object itself. */ @@ -88,7 +88,7 @@ public FilterBlobSegment setWhere(String where) { /** * Get the blobs property: The Blobs property. - * + * * @return the blobs value. */ public List getBlobs() { @@ -100,7 +100,7 @@ public List getBlobs() { /** * Set the blobs property: The Blobs property. - * + * * @param blobs the blobs value to set. * @return the FilterBlobSegment object itself. */ @@ -111,7 +111,7 @@ public FilterBlobSegment setBlobs(List blobs) { /** * Get the nextMarker property: The NextMarker property. - * + * * @return the nextMarker value. */ public String getNextMarker() { @@ -120,7 +120,7 @@ public String getNextMarker() { /** * Set the nextMarker property: The NextMarker property. - * + * * @param nextMarker the nextMarker value to set. * @return the FilterBlobSegment object itself. */ @@ -153,7 +153,7 @@ public XmlWriter toXml(XmlWriter xmlWriter, String rootElementName) throws XMLSt /** * Reads an instance of FilterBlobSegment from the XmlReader. - * + * * @param xmlReader The XmlReader being read. * @return An instance of FilterBlobSegment if the XmlReader was pointing to an instance of it, or null if it was * pointing to XML null. @@ -165,7 +165,7 @@ public static FilterBlobSegment fromXml(XmlReader xmlReader) throws XMLStreamExc /** * Reads an instance of FilterBlobSegment from the XmlReader. - * + * * @param xmlReader The XmlReader being read. * @param rootElementName Optional root element name to override the default defined by the model. Used to support * cases where the model can deserialize from different root element names. diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/FilterBlobsIncludeItem.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/FilterBlobsIncludeItem.java similarity index 96% rename from sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/FilterBlobsIncludeItem.java rename to sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/FilterBlobsIncludeItem.java index d6e2c6577e44..2fb76ac6d21c 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/FilterBlobsIncludeItem.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/FilterBlobsIncludeItem.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.blob.models; +package com.azure.v2.storage.blob.models; /** * Defines values for FilterBlobsIncludeItem. @@ -29,7 +29,7 @@ public enum FilterBlobsIncludeItem { /** * Parses a serialized value to a FilterBlobsIncludeItem instance. - * + * * @param value the serialized value to parse. * @return the parsed FilterBlobsIncludeItem object, or null if unable to parse. */ diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/GeoReplication.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/GeoReplication.java similarity index 98% rename from sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/GeoReplication.java rename to sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/GeoReplication.java index f10f5a8ec3a1..5a814b6ee518 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/GeoReplication.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/GeoReplication.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.blob.models; +package com.azure.v2.storage.blob.models; import com.azure.core.v2.annotation.Fluent; import com.azure.core.v2.util.CoreUtils; @@ -40,7 +40,7 @@ public GeoReplication() { /** * Get the status property: The status of the secondary location. - * + * * @return the status value. */ public GeoReplicationStatus getStatus() { @@ -49,7 +49,7 @@ public GeoReplicationStatus getStatus() { /** * Set the status property: The status of the secondary location. - * + * * @param status the status value to set. * @return the GeoReplication object itself. */ @@ -62,7 +62,7 @@ public GeoReplication setStatus(GeoReplicationStatus status) { * Get the lastSyncTime property: A GMT date/time value, to the second. All primary writes preceding this value are * guaranteed to be available for read operations at the secondary. Primary writes after this point in time may or * may not be available for reads. - * + * * @return the lastSyncTime value. */ public OffsetDateTime getLastSyncTime() { @@ -76,7 +76,7 @@ public OffsetDateTime getLastSyncTime() { * Set the lastSyncTime property: A GMT date/time value, to the second. All primary writes preceding this value are * guaranteed to be available for read operations at the secondary. Primary writes after this point in time may or * may not be available for reads. - * + * * @param lastSyncTime the lastSyncTime value to set. * @return the GeoReplication object itself. */ @@ -105,7 +105,7 @@ 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. @@ -117,7 +117,7 @@ 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. diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/GeoReplicationStatus.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/GeoReplicationStatus.java similarity index 97% rename from sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/GeoReplicationStatus.java rename to sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/GeoReplicationStatus.java index 033977e85874..0d492c0bb50c 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/GeoReplicationStatus.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/GeoReplicationStatus.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.blob.models; +package com.azure.v2.storage.blob.models; import io.clientcore.core.util.ExpandableEnum; import java.util.Map; @@ -37,7 +37,7 @@ private GeoReplicationStatus(String name) { /** * Creates or finds a GeoReplicationStatus. - * + * * @param name a name to look for. * @return the corresponding GeoReplicationStatus. */ @@ -54,7 +54,7 @@ public static GeoReplicationStatus fromString(String name) { /** * Gets the value of the GeoReplicationStatus instance. - * + * * @return the value of the GeoReplicationStatus instance. */ @Override diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/JsonTextConfiguration.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/JsonTextConfiguration.java similarity index 98% rename from sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/JsonTextConfiguration.java rename to sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/JsonTextConfiguration.java index 08b787d93286..29fa576b295a 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/JsonTextConfiguration.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/JsonTextConfiguration.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.blob.models; +package com.azure.v2.storage.blob.models; import com.azure.core.v2.annotation.Fluent; import com.azure.core.v2.util.CoreUtils; @@ -31,7 +31,7 @@ public JsonTextConfiguration() { /** * Get the recordSeparator property: The string used to separate records. - * + * * @return the recordSeparator value. */ public String getRecordSeparator() { @@ -40,7 +40,7 @@ public String getRecordSeparator() { /** * Set the recordSeparator property: The string used to separate records. - * + * * @param recordSeparator the recordSeparator value to set. * @return the JsonTextConfiguration object itself. */ @@ -64,7 +64,7 @@ public XmlWriter toXml(XmlWriter xmlWriter, String rootElementName) throws XMLSt /** * Reads an instance of JsonTextConfiguration from the XmlReader. - * + * * @param xmlReader The XmlReader being read. * @return An instance of JsonTextConfiguration if the XmlReader was pointing to an instance of it, or null if it * was pointing to XML null. @@ -76,7 +76,7 @@ public static JsonTextConfiguration fromXml(XmlReader xmlReader) throws XMLStrea /** * Reads an instance of JsonTextConfiguration from the XmlReader. - * + * * @param xmlReader The XmlReader being read. * @param rootElementName Optional root element name to override the default defined by the model. Used to support * cases where the model can deserialize from different root element names. diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/KeyInfo.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/KeyInfo.java similarity index 98% rename from sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/KeyInfo.java rename to sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/KeyInfo.java index b690b68eb8b6..43e109b30bf8 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/KeyInfo.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/KeyInfo.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.blob.models; +package com.azure.v2.storage.blob.models; import com.azure.core.v2.annotation.Fluent; import com.azure.core.v2.util.CoreUtils; @@ -36,7 +36,7 @@ public KeyInfo() { /** * Get the start property: The date-time the key is active in ISO 8601 UTC time. - * + * * @return the start value. */ public String getStart() { @@ -45,7 +45,7 @@ public String getStart() { /** * Set the start property: The date-time the key is active in ISO 8601 UTC time. - * + * * @param start the start value to set. * @return the KeyInfo object itself. */ @@ -56,7 +56,7 @@ public KeyInfo setStart(String start) { /** * Get the expiry property: The date-time the key expires in ISO 8601 UTC time. - * + * * @return the expiry value. */ public String getExpiry() { @@ -65,7 +65,7 @@ public String getExpiry() { /** * Set the expiry property: The date-time the key expires in ISO 8601 UTC time. - * + * * @param expiry the expiry value to set. * @return the KeyInfo object itself. */ @@ -90,7 +90,7 @@ 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. @@ -102,7 +102,7 @@ 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. diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/LeaseDurationType.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/LeaseDurationType.java similarity index 96% rename from sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/LeaseDurationType.java rename to sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/LeaseDurationType.java index ce5ac31938a7..cc7c30657565 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/LeaseDurationType.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/LeaseDurationType.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.blob.models; +package com.azure.v2.storage.blob.models; /** * Defines values for LeaseDurationType. @@ -29,7 +29,7 @@ public enum LeaseDurationType { /** * Parses a serialized value to a LeaseDurationType instance. - * + * * @param value the serialized value to parse. * @return the parsed LeaseDurationType object, or null if unable to parse. */ diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/LeaseStateType.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/LeaseStateType.java similarity index 96% rename from sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/LeaseStateType.java rename to sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/LeaseStateType.java index c76a09b519fb..134bbcdb59fc 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/LeaseStateType.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/LeaseStateType.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.blob.models; +package com.azure.v2.storage.blob.models; /** * Defines values for LeaseStateType. @@ -44,7 +44,7 @@ public enum LeaseStateType { /** * Parses a serialized value to a LeaseStateType instance. - * + * * @param value the serialized value to parse. * @return the parsed LeaseStateType object, or null if unable to parse. */ diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/LeaseStatusType.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/LeaseStatusType.java similarity index 96% rename from sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/LeaseStatusType.java rename to sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/LeaseStatusType.java index 2de9c2c87362..1653eff811ed 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/LeaseStatusType.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/LeaseStatusType.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.blob.models; +package com.azure.v2.storage.blob.models; /** * Defines values for LeaseStatusType. @@ -29,7 +29,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-v2/src/main/java/com/azure/storage/blob/models/ListBlobContainersIncludeType.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ListBlobContainersIncludeType.java similarity index 96% rename from sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/ListBlobContainersIncludeType.java rename to sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ListBlobContainersIncludeType.java index 9615a6ce401b..fcc4d5540305 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/ListBlobContainersIncludeType.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ListBlobContainersIncludeType.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.blob.models; +package com.azure.v2.storage.blob.models; /** * Defines values for ListBlobContainersIncludeType. @@ -34,7 +34,7 @@ public enum ListBlobContainersIncludeType { /** * Parses a serialized value to a ListBlobContainersIncludeType instance. - * + * * @param value the serialized value to parse. * @return the parsed ListBlobContainersIncludeType object, or null if unable to parse. */ diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/ListBlobsFlatSegmentResponse.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ListBlobsFlatSegmentResponse.java similarity index 98% rename from sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/ListBlobsFlatSegmentResponse.java rename to sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ListBlobsFlatSegmentResponse.java index 84a017fa1374..d8dca74bb255 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/ListBlobsFlatSegmentResponse.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ListBlobsFlatSegmentResponse.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.blob.models; +package com.azure.v2.storage.blob.models; import com.azure.core.v2.annotation.Fluent; import com.azure.core.v2.util.CoreUtils; @@ -61,7 +61,7 @@ public ListBlobsFlatSegmentResponse() { /** * Get the serviceEndpoint property: The ServiceEndpoint property. - * + * * @return the serviceEndpoint value. */ public String getServiceEndpoint() { @@ -70,7 +70,7 @@ public String getServiceEndpoint() { /** * Set the serviceEndpoint property: The ServiceEndpoint property. - * + * * @param serviceEndpoint the serviceEndpoint value to set. * @return the ListBlobsFlatSegmentResponse object itself. */ @@ -81,7 +81,7 @@ public ListBlobsFlatSegmentResponse setServiceEndpoint(String serviceEndpoint) { /** * Get the containerName property: The ContainerName property. - * + * * @return the containerName value. */ public String getContainerName() { @@ -90,7 +90,7 @@ public String getContainerName() { /** * Set the containerName property: The ContainerName property. - * + * * @param containerName the containerName value to set. * @return the ListBlobsFlatSegmentResponse object itself. */ @@ -101,7 +101,7 @@ public ListBlobsFlatSegmentResponse setContainerName(String containerName) { /** * Get the prefix property: The Prefix property. - * + * * @return the prefix value. */ public String getPrefix() { @@ -110,7 +110,7 @@ public String getPrefix() { /** * Set the prefix property: The Prefix property. - * + * * @param prefix the prefix value to set. * @return the ListBlobsFlatSegmentResponse object itself. */ @@ -121,7 +121,7 @@ public ListBlobsFlatSegmentResponse setPrefix(String prefix) { /** * Get the marker property: The Marker property. - * + * * @return the marker value. */ public String getMarker() { @@ -130,7 +130,7 @@ public String getMarker() { /** * Set the marker property: The Marker property. - * + * * @param marker the marker value to set. * @return the ListBlobsFlatSegmentResponse object itself. */ @@ -141,7 +141,7 @@ public ListBlobsFlatSegmentResponse setMarker(String marker) { /** * Get the maxResults property: The MaxResults property. - * + * * @return the maxResults value. */ public int getMaxResults() { @@ -150,7 +150,7 @@ public int getMaxResults() { /** * Set the maxResults property: The MaxResults property. - * + * * @param maxResults the maxResults value to set. * @return the ListBlobsFlatSegmentResponse object itself. */ @@ -161,7 +161,7 @@ public ListBlobsFlatSegmentResponse setMaxResults(int maxResults) { /** * Get the segment property: The Segment property. - * + * * @return the segment value. */ public BlobFlatListSegment getSegment() { @@ -170,7 +170,7 @@ public BlobFlatListSegment getSegment() { /** * Set the segment property: The Segment property. - * + * * @param segment the segment value to set. * @return the ListBlobsFlatSegmentResponse object itself. */ @@ -181,7 +181,7 @@ public ListBlobsFlatSegmentResponse setSegment(BlobFlatListSegment segment) { /** * Get the nextMarker property: The NextMarker property. - * + * * @return the nextMarker value. */ public String getNextMarker() { @@ -190,7 +190,7 @@ public String getNextMarker() { /** * Set the nextMarker property: The NextMarker property. - * + * * @param nextMarker the nextMarker value to set. * @return the ListBlobsFlatSegmentResponse object itself. */ @@ -220,7 +220,7 @@ public XmlWriter toXml(XmlWriter xmlWriter, String rootElementName) throws XMLSt /** * Reads an instance of ListBlobsFlatSegmentResponse from the XmlReader. - * + * * @param xmlReader The XmlReader being read. * @return An instance of ListBlobsFlatSegmentResponse if the XmlReader was pointing to an instance of it, or null * if it was pointing to XML null. @@ -232,7 +232,7 @@ public static ListBlobsFlatSegmentResponse fromXml(XmlReader xmlReader) throws X /** * Reads an instance of ListBlobsFlatSegmentResponse from the XmlReader. - * + * * @param xmlReader The XmlReader being read. * @param rootElementName Optional root element name to override the default defined by the model. Used to support * cases where the model can deserialize from different root element names. diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/ListBlobsHierarchySegmentResponse.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ListBlobsHierarchySegmentResponse.java similarity index 98% rename from sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/ListBlobsHierarchySegmentResponse.java rename to sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ListBlobsHierarchySegmentResponse.java index 670a011eac18..b55fb68613fa 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/ListBlobsHierarchySegmentResponse.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ListBlobsHierarchySegmentResponse.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.blob.models; +package com.azure.v2.storage.blob.models; import com.azure.core.v2.annotation.Fluent; import com.azure.core.v2.util.CoreUtils; @@ -66,7 +66,7 @@ public ListBlobsHierarchySegmentResponse() { /** * Get the serviceEndpoint property: The ServiceEndpoint property. - * + * * @return the serviceEndpoint value. */ public String getServiceEndpoint() { @@ -75,7 +75,7 @@ public String getServiceEndpoint() { /** * Set the serviceEndpoint property: The ServiceEndpoint property. - * + * * @param serviceEndpoint the serviceEndpoint value to set. * @return the ListBlobsHierarchySegmentResponse object itself. */ @@ -86,7 +86,7 @@ public ListBlobsHierarchySegmentResponse setServiceEndpoint(String serviceEndpoi /** * Get the containerName property: The ContainerName property. - * + * * @return the containerName value. */ public String getContainerName() { @@ -95,7 +95,7 @@ public String getContainerName() { /** * Set the containerName property: The ContainerName property. - * + * * @param containerName the containerName value to set. * @return the ListBlobsHierarchySegmentResponse object itself. */ @@ -106,7 +106,7 @@ public ListBlobsHierarchySegmentResponse setContainerName(String containerName) /** * Get the prefix property: The Prefix property. - * + * * @return the prefix value. */ public String getPrefix() { @@ -115,7 +115,7 @@ public String getPrefix() { /** * Set the prefix property: The Prefix property. - * + * * @param prefix the prefix value to set. * @return the ListBlobsHierarchySegmentResponse object itself. */ @@ -126,7 +126,7 @@ public ListBlobsHierarchySegmentResponse setPrefix(String prefix) { /** * Get the marker property: The Marker property. - * + * * @return the marker value. */ public String getMarker() { @@ -135,7 +135,7 @@ public String getMarker() { /** * Set the marker property: The Marker property. - * + * * @param marker the marker value to set. * @return the ListBlobsHierarchySegmentResponse object itself. */ @@ -146,7 +146,7 @@ public ListBlobsHierarchySegmentResponse setMarker(String marker) { /** * Get the maxResults property: The MaxResults property. - * + * * @return the maxResults value. */ public int getMaxResults() { @@ -155,7 +155,7 @@ public int getMaxResults() { /** * Set the maxResults property: The MaxResults property. - * + * * @param maxResults the maxResults value to set. * @return the ListBlobsHierarchySegmentResponse object itself. */ @@ -166,7 +166,7 @@ public ListBlobsHierarchySegmentResponse setMaxResults(int maxResults) { /** * Get the delimiter property: The Delimiter property. - * + * * @return the delimiter value. */ public String getDelimiter() { @@ -175,7 +175,7 @@ public String getDelimiter() { /** * Set the delimiter property: The Delimiter property. - * + * * @param delimiter the delimiter value to set. * @return the ListBlobsHierarchySegmentResponse object itself. */ @@ -186,7 +186,7 @@ public ListBlobsHierarchySegmentResponse setDelimiter(String delimiter) { /** * Get the segment property: The Segment property. - * + * * @return the segment value. */ public BlobHierarchyListSegment getSegment() { @@ -195,7 +195,7 @@ public BlobHierarchyListSegment getSegment() { /** * Set the segment property: The Segment property. - * + * * @param segment the segment value to set. * @return the ListBlobsHierarchySegmentResponse object itself. */ @@ -206,7 +206,7 @@ public ListBlobsHierarchySegmentResponse setSegment(BlobHierarchyListSegment seg /** * Get the nextMarker property: The NextMarker property. - * + * * @return the nextMarker value. */ public String getNextMarker() { @@ -215,7 +215,7 @@ public String getNextMarker() { /** * Set the nextMarker property: The NextMarker property. - * + * * @param nextMarker the nextMarker value to set. * @return the ListBlobsHierarchySegmentResponse object itself. */ @@ -246,7 +246,7 @@ public XmlWriter toXml(XmlWriter xmlWriter, String rootElementName) throws XMLSt /** * Reads an instance of ListBlobsHierarchySegmentResponse from the XmlReader. - * + * * @param xmlReader The XmlReader being read. * @return An instance of ListBlobsHierarchySegmentResponse if the XmlReader was pointing to an instance of it, or * null if it was pointing to XML null. @@ -258,7 +258,7 @@ public static ListBlobsHierarchySegmentResponse fromXml(XmlReader xmlReader) thr /** * Reads an instance of ListBlobsHierarchySegmentResponse from the XmlReader. - * + * * @param xmlReader The XmlReader being read. * @param rootElementName Optional root element name to override the default defined by the model. Used to support * cases where the model can deserialize from different root element names. diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/ListBlobsIncludeItem.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ListBlobsIncludeItem.java similarity index 97% rename from sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/ListBlobsIncludeItem.java rename to sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ListBlobsIncludeItem.java index 975ec377007b..06b2eb8b8e6b 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/ListBlobsIncludeItem.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ListBlobsIncludeItem.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.blob.models; +package com.azure.v2.storage.blob.models; /** * Defines values for ListBlobsIncludeItem. @@ -69,7 +69,7 @@ public enum ListBlobsIncludeItem { /** * Parses a serialized value to a ListBlobsIncludeItem instance. - * + * * @param value the serialized value to parse. * @return the parsed ListBlobsIncludeItem object, or null if unable to parse. */ diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/PageBlobsClearPagesHeaders.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/PageBlobsClearPagesHeaders.java similarity index 98% rename from sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/PageBlobsClearPagesHeaders.java rename to sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/PageBlobsClearPagesHeaders.java index b204712bf948..b070a347c3b0 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/PageBlobsClearPagesHeaders.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/PageBlobsClearPagesHeaders.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.blob.models; +package com.azure.v2.storage.blob.models; import com.azure.core.v2.annotation.Fluent; import com.azure.core.v2.util.CoreUtils; @@ -89,7 +89,7 @@ public final class PageBlobsClearPagesHeaders { // HttpHeaders containing the raw property values. /** * Creates an instance of PageBlobsClearPagesHeaders class. - * + * * @param rawHeaders The raw HttpHeaders that will be used to create the property values. */ public PageBlobsClearPagesHeaders(HttpHeaders rawHeaders) { @@ -126,7 +126,7 @@ public PageBlobsClearPagesHeaders(HttpHeaders rawHeaders) { /** * Get the xMsVersion property: The x-ms-version property. - * + * * @return the xMsVersion value. */ public String getXMsVersion() { @@ -135,7 +135,7 @@ public String getXMsVersion() { /** * Set the xMsVersion property: The x-ms-version property. - * + * * @param xMsVersion the xMsVersion value to set. * @return the PageBlobsClearPagesHeaders object itself. */ @@ -146,7 +146,7 @@ public PageBlobsClearPagesHeaders setXMsVersion(String xMsVersion) { /** * Get the eTag property: The ETag property. - * + * * @return the eTag value. */ public String getETag() { @@ -155,7 +155,7 @@ public String getETag() { /** * Set the eTag property: The ETag property. - * + * * @param eTag the eTag value to set. * @return the PageBlobsClearPagesHeaders object itself. */ @@ -166,7 +166,7 @@ public PageBlobsClearPagesHeaders setETag(String eTag) { /** * Get the xMsContentCrc64 property: The x-ms-content-crc64 property. - * + * * @return the xMsContentCrc64 value. */ public byte[] getXMsContentCrc64() { @@ -175,7 +175,7 @@ public byte[] getXMsContentCrc64() { /** * Set the xMsContentCrc64 property: The x-ms-content-crc64 property. - * + * * @param xMsContentCrc64 the xMsContentCrc64 value to set. * @return the PageBlobsClearPagesHeaders object itself. */ @@ -186,7 +186,7 @@ public PageBlobsClearPagesHeaders setXMsContentCrc64(byte[] xMsContentCrc64) { /** * Get the xMsBlobSequenceNumber property: The x-ms-blob-sequence-number property. - * + * * @return the xMsBlobSequenceNumber value. */ public Long getXMsBlobSequenceNumber() { @@ -195,7 +195,7 @@ public Long getXMsBlobSequenceNumber() { /** * Set the xMsBlobSequenceNumber property: The x-ms-blob-sequence-number property. - * + * * @param xMsBlobSequenceNumber the xMsBlobSequenceNumber value to set. * @return the PageBlobsClearPagesHeaders object itself. */ @@ -206,7 +206,7 @@ public PageBlobsClearPagesHeaders setXMsBlobSequenceNumber(Long xMsBlobSequenceN /** * Get the lastModified property: The Last-Modified property. - * + * * @return the lastModified value. */ public OffsetDateTime getLastModified() { @@ -218,7 +218,7 @@ public OffsetDateTime getLastModified() { /** * Set the lastModified property: The Last-Modified property. - * + * * @param lastModified the lastModified value to set. * @return the PageBlobsClearPagesHeaders object itself. */ @@ -233,7 +233,7 @@ public PageBlobsClearPagesHeaders setLastModified(OffsetDateTime lastModified) { /** * Get the xMsEncryptionKeySha256 property: The x-ms-encryption-key-sha256 property. - * + * * @return the xMsEncryptionKeySha256 value. */ public String getXMsEncryptionKeySha256() { @@ -242,7 +242,7 @@ public String getXMsEncryptionKeySha256() { /** * Set the xMsEncryptionKeySha256 property: The x-ms-encryption-key-sha256 property. - * + * * @param xMsEncryptionKeySha256 the xMsEncryptionKeySha256 value to set. * @return the PageBlobsClearPagesHeaders object itself. */ @@ -253,7 +253,7 @@ public PageBlobsClearPagesHeaders setXMsEncryptionKeySha256(String xMsEncryption /** * Get the xMsRequestId property: The x-ms-request-id property. - * + * * @return the xMsRequestId value. */ public String getXMsRequestId() { @@ -262,7 +262,7 @@ public String getXMsRequestId() { /** * Set the xMsRequestId property: The x-ms-request-id property. - * + * * @param xMsRequestId the xMsRequestId value to set. * @return the PageBlobsClearPagesHeaders object itself. */ @@ -273,7 +273,7 @@ public PageBlobsClearPagesHeaders setXMsRequestId(String xMsRequestId) { /** * Get the xMsRequestServerEncrypted property: The x-ms-request-server-encrypted property. - * + * * @return the xMsRequestServerEncrypted value. */ public Boolean isXMsRequestServerEncrypted() { @@ -282,7 +282,7 @@ public Boolean isXMsRequestServerEncrypted() { /** * Set the xMsRequestServerEncrypted property: The x-ms-request-server-encrypted property. - * + * * @param xMsRequestServerEncrypted the xMsRequestServerEncrypted value to set. * @return the PageBlobsClearPagesHeaders object itself. */ @@ -293,7 +293,7 @@ public PageBlobsClearPagesHeaders setXMsRequestServerEncrypted(Boolean xMsReques /** * Get the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @return the xMsClientRequestId value. */ public String getXMsClientRequestId() { @@ -302,7 +302,7 @@ public String getXMsClientRequestId() { /** * Set the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @param xMsClientRequestId the xMsClientRequestId value to set. * @return the PageBlobsClearPagesHeaders object itself. */ @@ -313,7 +313,7 @@ public PageBlobsClearPagesHeaders setXMsClientRequestId(String xMsClientRequestI /** * Get the date property: The Date property. - * + * * @return the date value. */ public OffsetDateTime getDate() { @@ -325,7 +325,7 @@ public OffsetDateTime getDate() { /** * Set the date property: The Date property. - * + * * @param date the date value to set. * @return the PageBlobsClearPagesHeaders object itself. */ @@ -340,7 +340,7 @@ public PageBlobsClearPagesHeaders setDate(OffsetDateTime date) { /** * Get the contentMD5 property: The Content-MD5 property. - * + * * @return the contentMD5 value. */ public byte[] getContentMD5() { @@ -349,7 +349,7 @@ public byte[] getContentMD5() { /** * Set the contentMD5 property: The Content-MD5 property. - * + * * @param contentMD5 the contentMD5 value to set. * @return the PageBlobsClearPagesHeaders object itself. */ diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/PageBlobsCopyIncrementalHeaders.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/PageBlobsCopyIncrementalHeaders.java similarity index 97% rename from sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/PageBlobsCopyIncrementalHeaders.java rename to sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/PageBlobsCopyIncrementalHeaders.java index f823aca53225..6ccfd7ab48de 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/PageBlobsCopyIncrementalHeaders.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/PageBlobsCopyIncrementalHeaders.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.blob.models; +package com.azure.v2.storage.blob.models; import com.azure.core.v2.annotation.Fluent; import io.clientcore.core.http.models.DateTimeRfc1123; @@ -65,7 +65,7 @@ public final class PageBlobsCopyIncrementalHeaders { // HttpHeaders containing the raw property values. /** * Creates an instance of PageBlobsCopyIncrementalHeaders class. - * + * * @param rawHeaders The raw HttpHeaders that will be used to create the property values. */ public PageBlobsCopyIncrementalHeaders(HttpHeaders rawHeaders) { @@ -90,7 +90,7 @@ public PageBlobsCopyIncrementalHeaders(HttpHeaders rawHeaders) { /** * Get the xMsVersion property: The x-ms-version property. - * + * * @return the xMsVersion value. */ public String getXMsVersion() { @@ -99,7 +99,7 @@ public String getXMsVersion() { /** * Set the xMsVersion property: The x-ms-version property. - * + * * @param xMsVersion the xMsVersion value to set. * @return the PageBlobsCopyIncrementalHeaders object itself. */ @@ -110,7 +110,7 @@ public PageBlobsCopyIncrementalHeaders setXMsVersion(String xMsVersion) { /** * Get the xMsCopyId property: The x-ms-copy-id property. - * + * * @return the xMsCopyId value. */ public String getXMsCopyId() { @@ -119,7 +119,7 @@ public String getXMsCopyId() { /** * Set the xMsCopyId property: The x-ms-copy-id property. - * + * * @param xMsCopyId the xMsCopyId value to set. * @return the PageBlobsCopyIncrementalHeaders object itself. */ @@ -130,7 +130,7 @@ public PageBlobsCopyIncrementalHeaders setXMsCopyId(String xMsCopyId) { /** * Get the eTag property: The ETag property. - * + * * @return the eTag value. */ public String getETag() { @@ -139,7 +139,7 @@ public String getETag() { /** * Set the eTag property: The ETag property. - * + * * @param eTag the eTag value to set. * @return the PageBlobsCopyIncrementalHeaders object itself. */ @@ -150,7 +150,7 @@ public PageBlobsCopyIncrementalHeaders setETag(String eTag) { /** * Get the lastModified property: The Last-Modified property. - * + * * @return the lastModified value. */ public OffsetDateTime getLastModified() { @@ -162,7 +162,7 @@ public OffsetDateTime getLastModified() { /** * Set the lastModified property: The Last-Modified property. - * + * * @param lastModified the lastModified value to set. * @return the PageBlobsCopyIncrementalHeaders object itself. */ @@ -177,7 +177,7 @@ public PageBlobsCopyIncrementalHeaders setLastModified(OffsetDateTime lastModifi /** * Get the xMsCopyStatus property: The x-ms-copy-status property. - * + * * @return the xMsCopyStatus value. */ public CopyStatusType getXMsCopyStatus() { @@ -186,7 +186,7 @@ public CopyStatusType getXMsCopyStatus() { /** * Set the xMsCopyStatus property: The x-ms-copy-status property. - * + * * @param xMsCopyStatus the xMsCopyStatus value to set. * @return the PageBlobsCopyIncrementalHeaders object itself. */ @@ -197,7 +197,7 @@ public PageBlobsCopyIncrementalHeaders setXMsCopyStatus(CopyStatusType xMsCopySt /** * Get the xMsRequestId property: The x-ms-request-id property. - * + * * @return the xMsRequestId value. */ public String getXMsRequestId() { @@ -206,7 +206,7 @@ public String getXMsRequestId() { /** * Set the xMsRequestId property: The x-ms-request-id property. - * + * * @param xMsRequestId the xMsRequestId value to set. * @return the PageBlobsCopyIncrementalHeaders object itself. */ @@ -217,7 +217,7 @@ public PageBlobsCopyIncrementalHeaders setXMsRequestId(String xMsRequestId) { /** * Get the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @return the xMsClientRequestId value. */ public String getXMsClientRequestId() { @@ -226,7 +226,7 @@ public String getXMsClientRequestId() { /** * Set the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @param xMsClientRequestId the xMsClientRequestId value to set. * @return the PageBlobsCopyIncrementalHeaders object itself. */ @@ -237,7 +237,7 @@ public PageBlobsCopyIncrementalHeaders setXMsClientRequestId(String xMsClientReq /** * Get the date property: The Date property. - * + * * @return the date value. */ public OffsetDateTime getDate() { @@ -249,7 +249,7 @@ public OffsetDateTime getDate() { /** * Set the date property: The Date property. - * + * * @param date the date value to set. * @return the PageBlobsCopyIncrementalHeaders object itself. */ diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/PageBlobsCreateHeaders.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/PageBlobsCreateHeaders.java similarity index 97% rename from sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/PageBlobsCreateHeaders.java rename to sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/PageBlobsCreateHeaders.java index e0cab22f658c..696f1cf42937 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/PageBlobsCreateHeaders.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/PageBlobsCreateHeaders.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.blob.models; +package com.azure.v2.storage.blob.models; import com.azure.core.v2.annotation.Fluent; import com.azure.core.v2.util.CoreUtils; @@ -88,7 +88,7 @@ public final class PageBlobsCreateHeaders { // HttpHeaders containing the raw property values. /** * Creates an instance of PageBlobsCreateHeaders class. - * + * * @param rawHeaders The raw HttpHeaders that will be used to create the property values. */ public PageBlobsCreateHeaders(HttpHeaders rawHeaders) { @@ -119,7 +119,7 @@ public PageBlobsCreateHeaders(HttpHeaders rawHeaders) { /** * Get the xMsVersion property: The x-ms-version property. - * + * * @return the xMsVersion value. */ public String getXMsVersion() { @@ -128,7 +128,7 @@ public String getXMsVersion() { /** * Set the xMsVersion property: The x-ms-version property. - * + * * @param xMsVersion the xMsVersion value to set. * @return the PageBlobsCreateHeaders object itself. */ @@ -139,7 +139,7 @@ public PageBlobsCreateHeaders setXMsVersion(String xMsVersion) { /** * Get the eTag property: The ETag property. - * + * * @return the eTag value. */ public String getETag() { @@ -148,7 +148,7 @@ public String getETag() { /** * Set the eTag property: The ETag property. - * + * * @param eTag the eTag value to set. * @return the PageBlobsCreateHeaders object itself. */ @@ -159,7 +159,7 @@ public PageBlobsCreateHeaders setETag(String eTag) { /** * Get the lastModified property: The Last-Modified property. - * + * * @return the lastModified value. */ public OffsetDateTime getLastModified() { @@ -171,7 +171,7 @@ public OffsetDateTime getLastModified() { /** * Set the lastModified property: The Last-Modified property. - * + * * @param lastModified the lastModified value to set. * @return the PageBlobsCreateHeaders object itself. */ @@ -186,7 +186,7 @@ public PageBlobsCreateHeaders setLastModified(OffsetDateTime lastModified) { /** * Get the xMsVersionId property: The x-ms-version-id property. - * + * * @return the xMsVersionId value. */ public String getXMsVersionId() { @@ -195,7 +195,7 @@ public String getXMsVersionId() { /** * Set the xMsVersionId property: The x-ms-version-id property. - * + * * @param xMsVersionId the xMsVersionId value to set. * @return the PageBlobsCreateHeaders object itself. */ @@ -206,7 +206,7 @@ public PageBlobsCreateHeaders setXMsVersionId(String xMsVersionId) { /** * Get the xMsEncryptionKeySha256 property: The x-ms-encryption-key-sha256 property. - * + * * @return the xMsEncryptionKeySha256 value. */ public String getXMsEncryptionKeySha256() { @@ -215,7 +215,7 @@ public String getXMsEncryptionKeySha256() { /** * Set the xMsEncryptionKeySha256 property: The x-ms-encryption-key-sha256 property. - * + * * @param xMsEncryptionKeySha256 the xMsEncryptionKeySha256 value to set. * @return the PageBlobsCreateHeaders object itself. */ @@ -226,7 +226,7 @@ public PageBlobsCreateHeaders setXMsEncryptionKeySha256(String xMsEncryptionKeyS /** * Get the xMsRequestId property: The x-ms-request-id property. - * + * * @return the xMsRequestId value. */ public String getXMsRequestId() { @@ -235,7 +235,7 @@ public String getXMsRequestId() { /** * Set the xMsRequestId property: The x-ms-request-id property. - * + * * @param xMsRequestId the xMsRequestId value to set. * @return the PageBlobsCreateHeaders object itself. */ @@ -246,7 +246,7 @@ public PageBlobsCreateHeaders setXMsRequestId(String xMsRequestId) { /** * Get the xMsRequestServerEncrypted property: The x-ms-request-server-encrypted property. - * + * * @return the xMsRequestServerEncrypted value. */ public Boolean isXMsRequestServerEncrypted() { @@ -255,7 +255,7 @@ public Boolean isXMsRequestServerEncrypted() { /** * Set the xMsRequestServerEncrypted property: The x-ms-request-server-encrypted property. - * + * * @param xMsRequestServerEncrypted the xMsRequestServerEncrypted value to set. * @return the PageBlobsCreateHeaders object itself. */ @@ -266,7 +266,7 @@ public PageBlobsCreateHeaders setXMsRequestServerEncrypted(Boolean xMsRequestSer /** * Get the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @return the xMsClientRequestId value. */ public String getXMsClientRequestId() { @@ -275,7 +275,7 @@ public String getXMsClientRequestId() { /** * Set the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @param xMsClientRequestId the xMsClientRequestId value to set. * @return the PageBlobsCreateHeaders object itself. */ @@ -286,7 +286,7 @@ public PageBlobsCreateHeaders setXMsClientRequestId(String xMsClientRequestId) { /** * Get the date property: The Date property. - * + * * @return the date value. */ public OffsetDateTime getDate() { @@ -298,7 +298,7 @@ public OffsetDateTime getDate() { /** * Set the date property: The Date property. - * + * * @param date the date value to set. * @return the PageBlobsCreateHeaders object itself. */ @@ -313,7 +313,7 @@ public PageBlobsCreateHeaders setDate(OffsetDateTime date) { /** * Get the contentMD5 property: The Content-MD5 property. - * + * * @return the contentMD5 value. */ public byte[] getContentMD5() { @@ -322,7 +322,7 @@ public byte[] getContentMD5() { /** * Set the contentMD5 property: The Content-MD5 property. - * + * * @param contentMD5 the contentMD5 value to set. * @return the PageBlobsCreateHeaders object itself. */ @@ -333,7 +333,7 @@ public PageBlobsCreateHeaders setContentMD5(byte[] contentMD5) { /** * Get the xMsEncryptionScope property: The x-ms-encryption-scope property. - * + * * @return the xMsEncryptionScope value. */ public String getXMsEncryptionScope() { @@ -342,7 +342,7 @@ public String getXMsEncryptionScope() { /** * Set the xMsEncryptionScope property: The x-ms-encryption-scope property. - * + * * @param xMsEncryptionScope the xMsEncryptionScope value to set. * @return the PageBlobsCreateHeaders object itself. */ diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/PageBlobsGetPageRangesDiffHeaders.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/PageBlobsGetPageRangesDiffHeaders.java similarity index 97% rename from sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/PageBlobsGetPageRangesDiffHeaders.java rename to sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/PageBlobsGetPageRangesDiffHeaders.java index 2bf196b93dc9..a5b1dd2a211f 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/PageBlobsGetPageRangesDiffHeaders.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/PageBlobsGetPageRangesDiffHeaders.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.blob.models; +package com.azure.v2.storage.blob.models; import com.azure.core.v2.annotation.Fluent; import io.clientcore.core.http.models.DateTimeRfc1123; @@ -59,7 +59,7 @@ public final class PageBlobsGetPageRangesDiffHeaders { // HttpHeaders containing the raw property values. /** * Creates an instance of PageBlobsGetPageRangesDiffHeaders class. - * + * * @param rawHeaders The raw HttpHeaders that will be used to create the property values. */ public PageBlobsGetPageRangesDiffHeaders(HttpHeaders rawHeaders) { @@ -83,7 +83,7 @@ public PageBlobsGetPageRangesDiffHeaders(HttpHeaders rawHeaders) { /** * Get the xMsVersion property: The x-ms-version property. - * + * * @return the xMsVersion value. */ public String getXMsVersion() { @@ -92,7 +92,7 @@ public String getXMsVersion() { /** * Set the xMsVersion property: The x-ms-version property. - * + * * @param xMsVersion the xMsVersion value to set. * @return the PageBlobsGetPageRangesDiffHeaders object itself. */ @@ -103,7 +103,7 @@ public PageBlobsGetPageRangesDiffHeaders setXMsVersion(String xMsVersion) { /** * Get the xMsBlobContentLength property: The x-ms-blob-content-length property. - * + * * @return the xMsBlobContentLength value. */ public Long getXMsBlobContentLength() { @@ -112,7 +112,7 @@ public Long getXMsBlobContentLength() { /** * Set the xMsBlobContentLength property: The x-ms-blob-content-length property. - * + * * @param xMsBlobContentLength the xMsBlobContentLength value to set. * @return the PageBlobsGetPageRangesDiffHeaders object itself. */ @@ -123,7 +123,7 @@ public PageBlobsGetPageRangesDiffHeaders setXMsBlobContentLength(Long xMsBlobCon /** * Get the eTag property: The ETag property. - * + * * @return the eTag value. */ public String getETag() { @@ -132,7 +132,7 @@ public String getETag() { /** * Set the eTag property: The ETag property. - * + * * @param eTag the eTag value to set. * @return the PageBlobsGetPageRangesDiffHeaders object itself. */ @@ -143,7 +143,7 @@ public PageBlobsGetPageRangesDiffHeaders setETag(String eTag) { /** * Get the lastModified property: The Last-Modified property. - * + * * @return the lastModified value. */ public OffsetDateTime getLastModified() { @@ -155,7 +155,7 @@ public OffsetDateTime getLastModified() { /** * Set the lastModified property: The Last-Modified property. - * + * * @param lastModified the lastModified value to set. * @return the PageBlobsGetPageRangesDiffHeaders object itself. */ @@ -170,7 +170,7 @@ public PageBlobsGetPageRangesDiffHeaders setLastModified(OffsetDateTime lastModi /** * Get the xMsRequestId property: The x-ms-request-id property. - * + * * @return the xMsRequestId value. */ public String getXMsRequestId() { @@ -179,7 +179,7 @@ public String getXMsRequestId() { /** * Set the xMsRequestId property: The x-ms-request-id property. - * + * * @param xMsRequestId the xMsRequestId value to set. * @return the PageBlobsGetPageRangesDiffHeaders object itself. */ @@ -190,7 +190,7 @@ public PageBlobsGetPageRangesDiffHeaders setXMsRequestId(String xMsRequestId) { /** * Get the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @return the xMsClientRequestId value. */ public String getXMsClientRequestId() { @@ -199,7 +199,7 @@ public String getXMsClientRequestId() { /** * Set the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @param xMsClientRequestId the xMsClientRequestId value to set. * @return the PageBlobsGetPageRangesDiffHeaders object itself. */ @@ -210,7 +210,7 @@ public PageBlobsGetPageRangesDiffHeaders setXMsClientRequestId(String xMsClientR /** * Get the date property: The Date property. - * + * * @return the date value. */ public OffsetDateTime getDate() { @@ -222,7 +222,7 @@ public OffsetDateTime getDate() { /** * Set the date property: The Date property. - * + * * @param date the date value to set. * @return the PageBlobsGetPageRangesDiffHeaders object itself. */ diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/PageBlobsGetPageRangesHeaders.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/PageBlobsGetPageRangesHeaders.java similarity index 97% rename from sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/PageBlobsGetPageRangesHeaders.java rename to sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/PageBlobsGetPageRangesHeaders.java index d10d3930d2f8..b3b14a81d3d8 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/PageBlobsGetPageRangesHeaders.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/PageBlobsGetPageRangesHeaders.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.blob.models; +package com.azure.v2.storage.blob.models; import com.azure.core.v2.annotation.Fluent; import io.clientcore.core.http.models.DateTimeRfc1123; @@ -59,7 +59,7 @@ public final class PageBlobsGetPageRangesHeaders { // HttpHeaders containing the raw property values. /** * Creates an instance of PageBlobsGetPageRangesHeaders class. - * + * * @param rawHeaders The raw HttpHeaders that will be used to create the property values. */ public PageBlobsGetPageRangesHeaders(HttpHeaders rawHeaders) { @@ -83,7 +83,7 @@ public PageBlobsGetPageRangesHeaders(HttpHeaders rawHeaders) { /** * Get the xMsVersion property: The x-ms-version property. - * + * * @return the xMsVersion value. */ public String getXMsVersion() { @@ -92,7 +92,7 @@ public String getXMsVersion() { /** * Set the xMsVersion property: The x-ms-version property. - * + * * @param xMsVersion the xMsVersion value to set. * @return the PageBlobsGetPageRangesHeaders object itself. */ @@ -103,7 +103,7 @@ public PageBlobsGetPageRangesHeaders setXMsVersion(String xMsVersion) { /** * Get the xMsBlobContentLength property: The x-ms-blob-content-length property. - * + * * @return the xMsBlobContentLength value. */ public Long getXMsBlobContentLength() { @@ -112,7 +112,7 @@ public Long getXMsBlobContentLength() { /** * Set the xMsBlobContentLength property: The x-ms-blob-content-length property. - * + * * @param xMsBlobContentLength the xMsBlobContentLength value to set. * @return the PageBlobsGetPageRangesHeaders object itself. */ @@ -123,7 +123,7 @@ public PageBlobsGetPageRangesHeaders setXMsBlobContentLength(Long xMsBlobContent /** * Get the eTag property: The ETag property. - * + * * @return the eTag value. */ public String getETag() { @@ -132,7 +132,7 @@ public String getETag() { /** * Set the eTag property: The ETag property. - * + * * @param eTag the eTag value to set. * @return the PageBlobsGetPageRangesHeaders object itself. */ @@ -143,7 +143,7 @@ public PageBlobsGetPageRangesHeaders setETag(String eTag) { /** * Get the lastModified property: The Last-Modified property. - * + * * @return the lastModified value. */ public OffsetDateTime getLastModified() { @@ -155,7 +155,7 @@ public OffsetDateTime getLastModified() { /** * Set the lastModified property: The Last-Modified property. - * + * * @param lastModified the lastModified value to set. * @return the PageBlobsGetPageRangesHeaders object itself. */ @@ -170,7 +170,7 @@ public PageBlobsGetPageRangesHeaders setLastModified(OffsetDateTime lastModified /** * Get the xMsRequestId property: The x-ms-request-id property. - * + * * @return the xMsRequestId value. */ public String getXMsRequestId() { @@ -179,7 +179,7 @@ public String getXMsRequestId() { /** * Set the xMsRequestId property: The x-ms-request-id property. - * + * * @param xMsRequestId the xMsRequestId value to set. * @return the PageBlobsGetPageRangesHeaders object itself. */ @@ -190,7 +190,7 @@ public PageBlobsGetPageRangesHeaders setXMsRequestId(String xMsRequestId) { /** * Get the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @return the xMsClientRequestId value. */ public String getXMsClientRequestId() { @@ -199,7 +199,7 @@ public String getXMsClientRequestId() { /** * Set the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @param xMsClientRequestId the xMsClientRequestId value to set. * @return the PageBlobsGetPageRangesHeaders object itself. */ @@ -210,7 +210,7 @@ public PageBlobsGetPageRangesHeaders setXMsClientRequestId(String xMsClientReque /** * Get the date property: The Date property. - * + * * @return the date value. */ public OffsetDateTime getDate() { @@ -222,7 +222,7 @@ public OffsetDateTime getDate() { /** * Set the date property: The Date property. - * + * * @param date the date value to set. * @return the PageBlobsGetPageRangesHeaders object itself. */ diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/PageBlobsResizeHeaders.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/PageBlobsResizeHeaders.java similarity index 97% rename from sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/PageBlobsResizeHeaders.java rename to sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/PageBlobsResizeHeaders.java index 575d8e80a4b7..ad7e37443b8c 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/PageBlobsResizeHeaders.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/PageBlobsResizeHeaders.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.blob.models; +package com.azure.v2.storage.blob.models; import com.azure.core.v2.annotation.Fluent; import io.clientcore.core.http.models.DateTimeRfc1123; @@ -59,7 +59,7 @@ public final class PageBlobsResizeHeaders { // HttpHeaders containing the raw property values. /** * Creates an instance of PageBlobsResizeHeaders class. - * + * * @param rawHeaders The raw HttpHeaders that will be used to create the property values. */ public PageBlobsResizeHeaders(HttpHeaders rawHeaders) { @@ -83,7 +83,7 @@ public PageBlobsResizeHeaders(HttpHeaders rawHeaders) { /** * Get the xMsVersion property: The x-ms-version property. - * + * * @return the xMsVersion value. */ public String getXMsVersion() { @@ -92,7 +92,7 @@ public String getXMsVersion() { /** * Set the xMsVersion property: The x-ms-version property. - * + * * @param xMsVersion the xMsVersion value to set. * @return the PageBlobsResizeHeaders object itself. */ @@ -103,7 +103,7 @@ public PageBlobsResizeHeaders setXMsVersion(String xMsVersion) { /** * Get the eTag property: The ETag property. - * + * * @return the eTag value. */ public String getETag() { @@ -112,7 +112,7 @@ public String getETag() { /** * Set the eTag property: The ETag property. - * + * * @param eTag the eTag value to set. * @return the PageBlobsResizeHeaders object itself. */ @@ -123,7 +123,7 @@ public PageBlobsResizeHeaders setETag(String eTag) { /** * Get the xMsBlobSequenceNumber property: The x-ms-blob-sequence-number property. - * + * * @return the xMsBlobSequenceNumber value. */ public Long getXMsBlobSequenceNumber() { @@ -132,7 +132,7 @@ public Long getXMsBlobSequenceNumber() { /** * Set the xMsBlobSequenceNumber property: The x-ms-blob-sequence-number property. - * + * * @param xMsBlobSequenceNumber the xMsBlobSequenceNumber value to set. * @return the PageBlobsResizeHeaders object itself. */ @@ -143,7 +143,7 @@ public PageBlobsResizeHeaders setXMsBlobSequenceNumber(Long xMsBlobSequenceNumbe /** * Get the lastModified property: The Last-Modified property. - * + * * @return the lastModified value. */ public OffsetDateTime getLastModified() { @@ -155,7 +155,7 @@ public OffsetDateTime getLastModified() { /** * Set the lastModified property: The Last-Modified property. - * + * * @param lastModified the lastModified value to set. * @return the PageBlobsResizeHeaders object itself. */ @@ -170,7 +170,7 @@ public PageBlobsResizeHeaders setLastModified(OffsetDateTime lastModified) { /** * Get the xMsRequestId property: The x-ms-request-id property. - * + * * @return the xMsRequestId value. */ public String getXMsRequestId() { @@ -179,7 +179,7 @@ public String getXMsRequestId() { /** * Set the xMsRequestId property: The x-ms-request-id property. - * + * * @param xMsRequestId the xMsRequestId value to set. * @return the PageBlobsResizeHeaders object itself. */ @@ -190,7 +190,7 @@ public PageBlobsResizeHeaders setXMsRequestId(String xMsRequestId) { /** * Get the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @return the xMsClientRequestId value. */ public String getXMsClientRequestId() { @@ -199,7 +199,7 @@ public String getXMsClientRequestId() { /** * Set the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @param xMsClientRequestId the xMsClientRequestId value to set. * @return the PageBlobsResizeHeaders object itself. */ @@ -210,7 +210,7 @@ public PageBlobsResizeHeaders setXMsClientRequestId(String xMsClientRequestId) { /** * Get the date property: The Date property. - * + * * @return the date value. */ public OffsetDateTime getDate() { @@ -222,7 +222,7 @@ public OffsetDateTime getDate() { /** * Set the date property: The Date property. - * + * * @param date the date value to set. * @return the PageBlobsResizeHeaders object itself. */ diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/PageBlobsUpdateSequenceNumberHeaders.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/PageBlobsUpdateSequenceNumberHeaders.java similarity index 97% rename from sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/PageBlobsUpdateSequenceNumberHeaders.java rename to sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/PageBlobsUpdateSequenceNumberHeaders.java index f17ee6a3a835..b5a3defe1757 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/PageBlobsUpdateSequenceNumberHeaders.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/PageBlobsUpdateSequenceNumberHeaders.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.blob.models; +package com.azure.v2.storage.blob.models; import com.azure.core.v2.annotation.Fluent; import io.clientcore.core.http.models.DateTimeRfc1123; @@ -59,7 +59,7 @@ public final class PageBlobsUpdateSequenceNumberHeaders { // 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) { @@ -83,7 +83,7 @@ public PageBlobsUpdateSequenceNumberHeaders(HttpHeaders rawHeaders) { /** * Get the xMsVersion property: The x-ms-version property. - * + * * @return the xMsVersion value. */ public String getXMsVersion() { @@ -92,7 +92,7 @@ public String getXMsVersion() { /** * Set the xMsVersion property: The x-ms-version property. - * + * * @param xMsVersion the xMsVersion value to set. * @return the PageBlobsUpdateSequenceNumberHeaders object itself. */ @@ -103,7 +103,7 @@ public PageBlobsUpdateSequenceNumberHeaders setXMsVersion(String xMsVersion) { /** * Get the eTag property: The ETag property. - * + * * @return the eTag value. */ public String getETag() { @@ -112,7 +112,7 @@ public String getETag() { /** * Set the eTag property: The ETag property. - * + * * @param eTag the eTag value to set. * @return the PageBlobsUpdateSequenceNumberHeaders object itself. */ @@ -123,7 +123,7 @@ public PageBlobsUpdateSequenceNumberHeaders setETag(String eTag) { /** * Get the xMsBlobSequenceNumber property: The x-ms-blob-sequence-number property. - * + * * @return the xMsBlobSequenceNumber value. */ public Long getXMsBlobSequenceNumber() { @@ -132,7 +132,7 @@ public Long getXMsBlobSequenceNumber() { /** * Set the xMsBlobSequenceNumber property: The x-ms-blob-sequence-number property. - * + * * @param xMsBlobSequenceNumber the xMsBlobSequenceNumber value to set. * @return the PageBlobsUpdateSequenceNumberHeaders object itself. */ @@ -143,7 +143,7 @@ public PageBlobsUpdateSequenceNumberHeaders setXMsBlobSequenceNumber(Long xMsBlo /** * Get the lastModified property: The Last-Modified property. - * + * * @return the lastModified value. */ public OffsetDateTime getLastModified() { @@ -155,7 +155,7 @@ public OffsetDateTime getLastModified() { /** * Set the lastModified property: The Last-Modified property. - * + * * @param lastModified the lastModified value to set. * @return the PageBlobsUpdateSequenceNumberHeaders object itself. */ @@ -170,7 +170,7 @@ public PageBlobsUpdateSequenceNumberHeaders setLastModified(OffsetDateTime lastM /** * Get the xMsRequestId property: The x-ms-request-id property. - * + * * @return the xMsRequestId value. */ public String getXMsRequestId() { @@ -179,7 +179,7 @@ public String getXMsRequestId() { /** * Set the xMsRequestId property: The x-ms-request-id property. - * + * * @param xMsRequestId the xMsRequestId value to set. * @return the PageBlobsUpdateSequenceNumberHeaders object itself. */ @@ -190,7 +190,7 @@ public PageBlobsUpdateSequenceNumberHeaders setXMsRequestId(String xMsRequestId) /** * Get the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @return the xMsClientRequestId value. */ public String getXMsClientRequestId() { @@ -199,7 +199,7 @@ public String getXMsClientRequestId() { /** * Set the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @param xMsClientRequestId the xMsClientRequestId value to set. * @return the PageBlobsUpdateSequenceNumberHeaders object itself. */ @@ -210,7 +210,7 @@ public PageBlobsUpdateSequenceNumberHeaders setXMsClientRequestId(String xMsClie /** * Get the date property: The Date property. - * + * * @return the date value. */ public OffsetDateTime getDate() { @@ -222,7 +222,7 @@ public OffsetDateTime getDate() { /** * Set the date property: The Date property. - * + * * @param date the date value to set. * @return the PageBlobsUpdateSequenceNumberHeaders object itself. */ diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/PageBlobsUploadPagesFromURLHeaders.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/PageBlobsUploadPagesFromURLHeaders.java similarity index 98% rename from sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/PageBlobsUploadPagesFromURLHeaders.java rename to sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/PageBlobsUploadPagesFromURLHeaders.java index 34c5dafc3691..d084c7396a4b 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/PageBlobsUploadPagesFromURLHeaders.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/PageBlobsUploadPagesFromURLHeaders.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.blob.models; +package com.azure.v2.storage.blob.models; import com.azure.core.v2.annotation.Fluent; import com.azure.core.v2.util.CoreUtils; @@ -91,7 +91,7 @@ public final class PageBlobsUploadPagesFromURLHeaders { // 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) { @@ -128,7 +128,7 @@ public PageBlobsUploadPagesFromURLHeaders(HttpHeaders rawHeaders) { /** * Get the xMsVersion property: The x-ms-version property. - * + * * @return the xMsVersion value. */ public String getXMsVersion() { @@ -137,7 +137,7 @@ public String getXMsVersion() { /** * Set the xMsVersion property: The x-ms-version property. - * + * * @param xMsVersion the xMsVersion value to set. * @return the PageBlobsUploadPagesFromURLHeaders object itself. */ @@ -148,7 +148,7 @@ public PageBlobsUploadPagesFromURLHeaders setXMsVersion(String xMsVersion) { /** * Get the eTag property: The ETag property. - * + * * @return the eTag value. */ public String getETag() { @@ -157,7 +157,7 @@ public String getETag() { /** * Set the eTag property: The ETag property. - * + * * @param eTag the eTag value to set. * @return the PageBlobsUploadPagesFromURLHeaders object itself. */ @@ -168,7 +168,7 @@ public PageBlobsUploadPagesFromURLHeaders setETag(String eTag) { /** * Get the xMsContentCrc64 property: The x-ms-content-crc64 property. - * + * * @return the xMsContentCrc64 value. */ public byte[] getXMsContentCrc64() { @@ -177,7 +177,7 @@ public byte[] getXMsContentCrc64() { /** * Set the xMsContentCrc64 property: The x-ms-content-crc64 property. - * + * * @param xMsContentCrc64 the xMsContentCrc64 value to set. * @return the PageBlobsUploadPagesFromURLHeaders object itself. */ @@ -188,7 +188,7 @@ public PageBlobsUploadPagesFromURLHeaders setXMsContentCrc64(byte[] xMsContentCr /** * Get the xMsBlobSequenceNumber property: The x-ms-blob-sequence-number property. - * + * * @return the xMsBlobSequenceNumber value. */ public Long getXMsBlobSequenceNumber() { @@ -197,7 +197,7 @@ public Long getXMsBlobSequenceNumber() { /** * Set the xMsBlobSequenceNumber property: The x-ms-blob-sequence-number property. - * + * * @param xMsBlobSequenceNumber the xMsBlobSequenceNumber value to set. * @return the PageBlobsUploadPagesFromURLHeaders object itself. */ @@ -208,7 +208,7 @@ public PageBlobsUploadPagesFromURLHeaders setXMsBlobSequenceNumber(Long xMsBlobS /** * Get the lastModified property: The Last-Modified property. - * + * * @return the lastModified value. */ public OffsetDateTime getLastModified() { @@ -220,7 +220,7 @@ public OffsetDateTime getLastModified() { /** * Set the lastModified property: The Last-Modified property. - * + * * @param lastModified the lastModified value to set. * @return the PageBlobsUploadPagesFromURLHeaders object itself. */ @@ -235,7 +235,7 @@ public PageBlobsUploadPagesFromURLHeaders setLastModified(OffsetDateTime lastMod /** * Get the xMsEncryptionKeySha256 property: The x-ms-encryption-key-sha256 property. - * + * * @return the xMsEncryptionKeySha256 value. */ public String getXMsEncryptionKeySha256() { @@ -244,7 +244,7 @@ public String getXMsEncryptionKeySha256() { /** * Set the xMsEncryptionKeySha256 property: The x-ms-encryption-key-sha256 property. - * + * * @param xMsEncryptionKeySha256 the xMsEncryptionKeySha256 value to set. * @return the PageBlobsUploadPagesFromURLHeaders object itself. */ @@ -255,7 +255,7 @@ public PageBlobsUploadPagesFromURLHeaders setXMsEncryptionKeySha256(String xMsEn /** * Get the xMsRequestId property: The x-ms-request-id property. - * + * * @return the xMsRequestId value. */ public String getXMsRequestId() { @@ -264,7 +264,7 @@ public String getXMsRequestId() { /** * Set the xMsRequestId property: The x-ms-request-id property. - * + * * @param xMsRequestId the xMsRequestId value to set. * @return the PageBlobsUploadPagesFromURLHeaders object itself. */ @@ -275,7 +275,7 @@ public PageBlobsUploadPagesFromURLHeaders setXMsRequestId(String xMsRequestId) { /** * Get the xMsRequestServerEncrypted property: The x-ms-request-server-encrypted property. - * + * * @return the xMsRequestServerEncrypted value. */ public Boolean isXMsRequestServerEncrypted() { @@ -284,7 +284,7 @@ public Boolean isXMsRequestServerEncrypted() { /** * Set the xMsRequestServerEncrypted property: The x-ms-request-server-encrypted property. - * + * * @param xMsRequestServerEncrypted the xMsRequestServerEncrypted value to set. * @return the PageBlobsUploadPagesFromURLHeaders object itself. */ @@ -295,7 +295,7 @@ public PageBlobsUploadPagesFromURLHeaders setXMsRequestServerEncrypted(Boolean x /** * Get the date property: The Date property. - * + * * @return the date value. */ public OffsetDateTime getDate() { @@ -307,7 +307,7 @@ public OffsetDateTime getDate() { /** * Set the date property: The Date property. - * + * * @param date the date value to set. * @return the PageBlobsUploadPagesFromURLHeaders object itself. */ @@ -322,7 +322,7 @@ public PageBlobsUploadPagesFromURLHeaders setDate(OffsetDateTime date) { /** * Get the contentMD5 property: The Content-MD5 property. - * + * * @return the contentMD5 value. */ public byte[] getContentMD5() { @@ -331,7 +331,7 @@ public byte[] getContentMD5() { /** * Set the contentMD5 property: The Content-MD5 property. - * + * * @param contentMD5 the contentMD5 value to set. * @return the PageBlobsUploadPagesFromURLHeaders object itself. */ @@ -342,7 +342,7 @@ public PageBlobsUploadPagesFromURLHeaders setContentMD5(byte[] contentMD5) { /** * Get the xMsEncryptionScope property: The x-ms-encryption-scope property. - * + * * @return the xMsEncryptionScope value. */ public String getXMsEncryptionScope() { @@ -351,7 +351,7 @@ public String getXMsEncryptionScope() { /** * Set the xMsEncryptionScope property: The x-ms-encryption-scope property. - * + * * @param xMsEncryptionScope the xMsEncryptionScope value to set. * @return the PageBlobsUploadPagesFromURLHeaders object itself. */ diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/PageBlobsUploadPagesHeaders.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/PageBlobsUploadPagesHeaders.java similarity index 98% rename from sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/PageBlobsUploadPagesHeaders.java rename to sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/PageBlobsUploadPagesHeaders.java index 7d95a15991ae..efb3a07b6475 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/PageBlobsUploadPagesHeaders.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/PageBlobsUploadPagesHeaders.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.blob.models; +package com.azure.v2.storage.blob.models; import com.azure.core.v2.annotation.Fluent; import com.azure.core.v2.util.CoreUtils; @@ -103,7 +103,7 @@ public final class PageBlobsUploadPagesHeaders { // HttpHeaders containing the raw property values. /** * Creates an instance of PageBlobsUploadPagesHeaders class. - * + * * @param rawHeaders The raw HttpHeaders that will be used to create the property values. */ public PageBlobsUploadPagesHeaders(HttpHeaders rawHeaders) { @@ -142,7 +142,7 @@ public PageBlobsUploadPagesHeaders(HttpHeaders rawHeaders) { /** * Get the xMsVersion property: The x-ms-version property. - * + * * @return the xMsVersion value. */ public String getXMsVersion() { @@ -151,7 +151,7 @@ public String getXMsVersion() { /** * Set the xMsVersion property: The x-ms-version property. - * + * * @param xMsVersion the xMsVersion value to set. * @return the PageBlobsUploadPagesHeaders object itself. */ @@ -162,7 +162,7 @@ public PageBlobsUploadPagesHeaders setXMsVersion(String xMsVersion) { /** * Get the xMsContentCrc64 property: The x-ms-content-crc64 property. - * + * * @return the xMsContentCrc64 value. */ public byte[] getXMsContentCrc64() { @@ -171,7 +171,7 @@ public byte[] getXMsContentCrc64() { /** * Set the xMsContentCrc64 property: The x-ms-content-crc64 property. - * + * * @param xMsContentCrc64 the xMsContentCrc64 value to set. * @return the PageBlobsUploadPagesHeaders object itself. */ @@ -182,7 +182,7 @@ public PageBlobsUploadPagesHeaders setXMsContentCrc64(byte[] xMsContentCrc64) { /** * Get the xMsBlobSequenceNumber property: The x-ms-blob-sequence-number property. - * + * * @return the xMsBlobSequenceNumber value. */ public Long getXMsBlobSequenceNumber() { @@ -191,7 +191,7 @@ public Long getXMsBlobSequenceNumber() { /** * Set the xMsBlobSequenceNumber property: The x-ms-blob-sequence-number property. - * + * * @param xMsBlobSequenceNumber the xMsBlobSequenceNumber value to set. * @return the PageBlobsUploadPagesHeaders object itself. */ @@ -202,7 +202,7 @@ public PageBlobsUploadPagesHeaders setXMsBlobSequenceNumber(Long xMsBlobSequence /** * Get the lastModified property: The Last-Modified property. - * + * * @return the lastModified value. */ public OffsetDateTime getLastModified() { @@ -214,7 +214,7 @@ public OffsetDateTime getLastModified() { /** * Set the lastModified property: The Last-Modified property. - * + * * @param lastModified the lastModified value to set. * @return the PageBlobsUploadPagesHeaders object itself. */ @@ -229,7 +229,7 @@ public PageBlobsUploadPagesHeaders setLastModified(OffsetDateTime lastModified) /** * Get the xMsEncryptionKeySha256 property: The x-ms-encryption-key-sha256 property. - * + * * @return the xMsEncryptionKeySha256 value. */ public String getXMsEncryptionKeySha256() { @@ -238,7 +238,7 @@ public String getXMsEncryptionKeySha256() { /** * Set the xMsEncryptionKeySha256 property: The x-ms-encryption-key-sha256 property. - * + * * @param xMsEncryptionKeySha256 the xMsEncryptionKeySha256 value to set. * @return the PageBlobsUploadPagesHeaders object itself. */ @@ -249,7 +249,7 @@ public PageBlobsUploadPagesHeaders setXMsEncryptionKeySha256(String xMsEncryptio /** * Get the xMsStructuredBody property: The x-ms-structured-body property. - * + * * @return the xMsStructuredBody value. */ public String getXMsStructuredBody() { @@ -258,7 +258,7 @@ public String getXMsStructuredBody() { /** * Set the xMsStructuredBody property: The x-ms-structured-body property. - * + * * @param xMsStructuredBody the xMsStructuredBody value to set. * @return the PageBlobsUploadPagesHeaders object itself. */ @@ -269,7 +269,7 @@ public PageBlobsUploadPagesHeaders setXMsStructuredBody(String xMsStructuredBody /** * Get the xMsRequestServerEncrypted property: The x-ms-request-server-encrypted property. - * + * * @return the xMsRequestServerEncrypted value. */ public Boolean isXMsRequestServerEncrypted() { @@ -278,7 +278,7 @@ public Boolean isXMsRequestServerEncrypted() { /** * Set the xMsRequestServerEncrypted property: The x-ms-request-server-encrypted property. - * + * * @param xMsRequestServerEncrypted the xMsRequestServerEncrypted value to set. * @return the PageBlobsUploadPagesHeaders object itself. */ @@ -289,7 +289,7 @@ public PageBlobsUploadPagesHeaders setXMsRequestServerEncrypted(Boolean xMsReque /** * Get the date property: The Date property. - * + * * @return the date value. */ public OffsetDateTime getDate() { @@ -301,7 +301,7 @@ public OffsetDateTime getDate() { /** * Set the date property: The Date property. - * + * * @param date the date value to set. * @return the PageBlobsUploadPagesHeaders object itself. */ @@ -316,7 +316,7 @@ public PageBlobsUploadPagesHeaders setDate(OffsetDateTime date) { /** * Get the contentMD5 property: The Content-MD5 property. - * + * * @return the contentMD5 value. */ public byte[] getContentMD5() { @@ -325,7 +325,7 @@ public byte[] getContentMD5() { /** * Set the contentMD5 property: The Content-MD5 property. - * + * * @param contentMD5 the contentMD5 value to set. * @return the PageBlobsUploadPagesHeaders object itself. */ @@ -336,7 +336,7 @@ public PageBlobsUploadPagesHeaders setContentMD5(byte[] contentMD5) { /** * Get the eTag property: The ETag property. - * + * * @return the eTag value. */ public String getETag() { @@ -345,7 +345,7 @@ public String getETag() { /** * Set the eTag property: The ETag property. - * + * * @param eTag the eTag value to set. * @return the PageBlobsUploadPagesHeaders object itself. */ @@ -356,7 +356,7 @@ public PageBlobsUploadPagesHeaders setETag(String eTag) { /** * Get the xMsRequestId property: The x-ms-request-id property. - * + * * @return the xMsRequestId value. */ public String getXMsRequestId() { @@ -365,7 +365,7 @@ public String getXMsRequestId() { /** * Set the xMsRequestId property: The x-ms-request-id property. - * + * * @param xMsRequestId the xMsRequestId value to set. * @return the PageBlobsUploadPagesHeaders object itself. */ @@ -376,7 +376,7 @@ public PageBlobsUploadPagesHeaders setXMsRequestId(String xMsRequestId) { /** * Get the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @return the xMsClientRequestId value. */ public String getXMsClientRequestId() { @@ -385,7 +385,7 @@ public String getXMsClientRequestId() { /** * Set the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @param xMsClientRequestId the xMsClientRequestId value to set. * @return the PageBlobsUploadPagesHeaders object itself. */ @@ -396,7 +396,7 @@ public PageBlobsUploadPagesHeaders setXMsClientRequestId(String xMsClientRequest /** * Get the xMsEncryptionScope property: The x-ms-encryption-scope property. - * + * * @return the xMsEncryptionScope value. */ public String getXMsEncryptionScope() { @@ -405,7 +405,7 @@ public String getXMsEncryptionScope() { /** * Set the xMsEncryptionScope property: The x-ms-encryption-scope property. - * + * * @param xMsEncryptionScope the xMsEncryptionScope value to set. * @return the PageBlobsUploadPagesHeaders object itself. */ diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/PageList.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/PageList.java similarity index 98% rename from sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/PageList.java rename to sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/PageList.java index ef7300b0eb2a..499a6c908ce6 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/PageList.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/PageList.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.blob.models; +package com.azure.v2.storage.blob.models; import com.azure.core.v2.annotation.Fluent; import com.azure.core.v2.util.CoreUtils; @@ -43,7 +43,7 @@ public PageList() { /** * Get the pageRange property: The PageRange property. - * + * * @return the pageRange value. */ public List getPageRange() { @@ -52,7 +52,7 @@ public List getPageRange() { /** * Set the pageRange property: The PageRange property. - * + * * @param pageRange the pageRange value to set. * @return the PageList object itself. */ @@ -63,7 +63,7 @@ public PageList setPageRange(List pageRange) { /** * Get the clearRange property: The ClearRange property. - * + * * @return the clearRange value. */ public List getClearRange() { @@ -72,7 +72,7 @@ public List getClearRange() { /** * Set the clearRange property: The ClearRange property. - * + * * @param clearRange the clearRange value to set. * @return the PageList object itself. */ @@ -83,7 +83,7 @@ public PageList setClearRange(List clearRange) { /** * Get the nextMarker property: The NextMarker property. - * + * * @return the nextMarker value. */ public String getNextMarker() { @@ -92,7 +92,7 @@ public String getNextMarker() { /** * Set the nextMarker property: The NextMarker property. - * + * * @param nextMarker the nextMarker value to set. * @return the PageList object itself. */ @@ -126,7 +126,7 @@ public XmlWriter toXml(XmlWriter xmlWriter, String rootElementName) throws XMLSt /** * Reads an instance of PageList from the XmlReader. - * + * * @param xmlReader The XmlReader being read. * @return An instance of PageList if the XmlReader was pointing to an instance of it, or null if it was pointing to * XML null. @@ -138,7 +138,7 @@ public static PageList fromXml(XmlReader xmlReader) throws XMLStreamException { /** * Reads an instance of PageList from the XmlReader. - * + * * @param xmlReader The XmlReader being read. * @param rootElementName Optional root element name to override the default defined by the model. Used to support * cases where the model can deserialize from different root element names. diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/PageRange.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/PageRange.java similarity index 97% rename from sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/PageRange.java rename to sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/PageRange.java index 43d01e8a5021..979f1f2c5099 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/PageRange.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/PageRange.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.blob.models; +package com.azure.v2.storage.blob.models; import com.azure.core.v2.annotation.Fluent; import com.azure.core.v2.util.CoreUtils; @@ -36,7 +36,7 @@ public PageRange() { /** * Get the start property: The Start property. - * + * * @return the start value. */ public long getStart() { @@ -45,7 +45,7 @@ public long getStart() { /** * Set the start property: The Start property. - * + * * @param start the start value to set. * @return the PageRange object itself. */ @@ -56,7 +56,7 @@ public PageRange setStart(long start) { /** * Get the end property: The End property. - * + * * @return the end value. */ public long getEnd() { @@ -65,7 +65,7 @@ public long getEnd() { /** * Set the end property: The End property. - * + * * @param end the end value to set. * @return the PageRange object itself. */ @@ -90,7 +90,7 @@ 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. @@ -102,7 +102,7 @@ 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. diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/PremiumPageBlobAccessTier.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/PremiumPageBlobAccessTier.java similarity index 98% rename from sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/PremiumPageBlobAccessTier.java rename to sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/PremiumPageBlobAccessTier.java index ff8f0800c5a0..02c44b45f0ae 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/PremiumPageBlobAccessTier.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/PremiumPageBlobAccessTier.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.blob.models; +package com.azure.v2.storage.blob.models; import io.clientcore.core.util.ExpandableEnum; import java.util.Map; @@ -77,7 +77,7 @@ private PremiumPageBlobAccessTier(String name) { /** * Creates or finds a PremiumPageBlobAccessTier. - * + * * @param name a name to look for. * @return the corresponding PremiumPageBlobAccessTier. */ @@ -94,7 +94,7 @@ public static PremiumPageBlobAccessTier fromString(String name) { /** * Gets the value of the PremiumPageBlobAccessTier instance. - * + * * @return the value of the PremiumPageBlobAccessTier instance. */ @Override diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/PublicAccessType.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/PublicAccessType.java similarity index 96% rename from sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/PublicAccessType.java rename to sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/PublicAccessType.java index 5ce91fdd7acf..594696d59943 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/PublicAccessType.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/PublicAccessType.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.blob.models; +package com.azure.v2.storage.blob.models; import io.clientcore.core.util.ExpandableEnum; import java.util.Map; @@ -32,7 +32,7 @@ private PublicAccessType(String name) { /** * Creates or finds a PublicAccessType. - * + * * @param name a name to look for. * @return the corresponding PublicAccessType. */ @@ -49,7 +49,7 @@ public static PublicAccessType fromString(String name) { /** * Gets the value of the PublicAccessType instance. - * + * * @return the value of the PublicAccessType instance. */ @Override diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/QueryFormat.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/QueryFormat.java similarity index 98% rename from sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/QueryFormat.java rename to sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/QueryFormat.java index 6ed803d9b45e..ce41c3b52620 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/QueryFormat.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/QueryFormat.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.blob.models; +package com.azure.v2.storage.blob.models; import com.azure.core.v2.annotation.Fluent; import com.azure.core.v2.util.CoreUtils; @@ -51,7 +51,7 @@ public QueryFormat() { /** * Get the type property: The quick query format type. - * + * * @return the type value. */ public QueryFormatType getType() { @@ -60,7 +60,7 @@ public QueryFormatType getType() { /** * Set the type property: The quick query format type. - * + * * @param type the type value to set. * @return the QueryFormat object itself. */ @@ -72,7 +72,7 @@ public QueryFormat setType(QueryFormatType type) { /** * Get the delimitedTextConfiguration property: Groups the settings used for interpreting the blob data if the blob * is delimited text formatted. - * + * * @return the delimitedTextConfiguration value. */ public DelimitedTextConfiguration getDelimitedTextConfiguration() { @@ -82,7 +82,7 @@ public DelimitedTextConfiguration getDelimitedTextConfiguration() { /** * Set the delimitedTextConfiguration property: Groups the settings used for interpreting the blob data if the blob * is delimited text formatted. - * + * * @param delimitedTextConfiguration the delimitedTextConfiguration value to set. * @return the QueryFormat object itself. */ @@ -93,7 +93,7 @@ public QueryFormat setDelimitedTextConfiguration(DelimitedTextConfiguration deli /** * Get the jsonTextConfiguration property: json text configuration. - * + * * @return the jsonTextConfiguration value. */ public JsonTextConfiguration getJsonTextConfiguration() { @@ -102,7 +102,7 @@ public JsonTextConfiguration getJsonTextConfiguration() { /** * Set the jsonTextConfiguration property: json text configuration. - * + * * @param jsonTextConfiguration the jsonTextConfiguration value to set. * @return the QueryFormat object itself. */ @@ -114,7 +114,7 @@ public QueryFormat setJsonTextConfiguration(JsonTextConfiguration jsonTextConfig /** * Get the arrowConfiguration property: Groups the settings used for formatting the response if the response should * be Arrow formatted. - * + * * @return the arrowConfiguration value. */ public ArrowConfiguration getArrowConfiguration() { @@ -124,7 +124,7 @@ public ArrowConfiguration getArrowConfiguration() { /** * Set the arrowConfiguration property: Groups the settings used for formatting the response if the response should * be Arrow formatted. - * + * * @param arrowConfiguration the arrowConfiguration value to set. * @return the QueryFormat object itself. */ @@ -135,7 +135,7 @@ public QueryFormat setArrowConfiguration(ArrowConfiguration arrowConfiguration) /** * Get the parquetTextConfiguration property: parquet configuration. - * + * * @return the parquetTextConfiguration value. */ public Object getParquetTextConfiguration() { @@ -144,7 +144,7 @@ public Object getParquetTextConfiguration() { /** * Set the parquetTextConfiguration property: parquet configuration. - * + * * @param parquetTextConfiguration the parquetTextConfiguration value to set. * @return the QueryFormat object itself. */ @@ -172,7 +172,7 @@ public XmlWriter toXml(XmlWriter xmlWriter, String rootElementName) throws XMLSt /** * Reads an instance of QueryFormat from the XmlReader. - * + * * @param xmlReader The XmlReader being read. * @return An instance of QueryFormat if the XmlReader was pointing to an instance of it, or null if it was pointing * to XML null. @@ -184,7 +184,7 @@ public static QueryFormat fromXml(XmlReader xmlReader) throws XMLStreamException /** * Reads an instance of QueryFormat from the XmlReader. - * + * * @param xmlReader The XmlReader being read. * @param rootElementName Optional root element name to override the default defined by the model. Used to support * cases where the model can deserialize from different root element names. diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/QueryFormatType.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/QueryFormatType.java similarity index 96% rename from sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/QueryFormatType.java rename to sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/QueryFormatType.java index 3f818deab4db..601bbc6f1de7 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/QueryFormatType.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/QueryFormatType.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.blob.models; +package com.azure.v2.storage.blob.models; /** * The quick query format type. @@ -39,7 +39,7 @@ public enum QueryFormatType { /** * Parses a serialized value to a QueryFormatType instance. - * + * * @param value the serialized value to parse. * @return the parsed QueryFormatType object, or null if unable to parse. */ diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/QueryRequest.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/QueryRequest.java similarity index 98% rename from sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/QueryRequest.java rename to sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/QueryRequest.java index 2c95a1a51aef..e6d171bd8fe4 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/QueryRequest.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/QueryRequest.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.blob.models; +package com.azure.v2.storage.blob.models; import com.azure.core.v2.annotation.Fluent; import com.azure.core.v2.util.CoreUtils; @@ -46,7 +46,7 @@ public QueryRequest() { /** * Get the queryType property: Required. The type of the provided query expression. - * + * * @return the queryType value. */ public String getQueryType() { @@ -55,7 +55,7 @@ public String getQueryType() { /** * Set the queryType property: Required. The type of the provided query expression. - * + * * @param queryType the queryType value to set. * @return the QueryRequest object itself. */ @@ -66,7 +66,7 @@ public QueryRequest setQueryType(String queryType) { /** * Get the expression property: The query expression in SQL. The maximum size of the query expression is 256KiB. - * + * * @return the expression value. */ public String getExpression() { @@ -75,7 +75,7 @@ public String getExpression() { /** * Set the expression property: The query expression in SQL. The maximum size of the query expression is 256KiB. - * + * * @param expression the expression value to set. * @return the QueryRequest object itself. */ @@ -86,7 +86,7 @@ public QueryRequest setExpression(String expression) { /** * Get the inputSerialization property: The InputSerialization property. - * + * * @return the inputSerialization value. */ public QuerySerialization getInputSerialization() { @@ -95,7 +95,7 @@ public QuerySerialization getInputSerialization() { /** * Set the inputSerialization property: The InputSerialization property. - * + * * @param inputSerialization the inputSerialization value to set. * @return the QueryRequest object itself. */ @@ -106,7 +106,7 @@ public QueryRequest setInputSerialization(QuerySerialization inputSerialization) /** * Get the outputSerialization property: The OutputSerialization property. - * + * * @return the outputSerialization value. */ public QuerySerialization getOutputSerialization() { @@ -115,7 +115,7 @@ public QuerySerialization getOutputSerialization() { /** * Set the outputSerialization property: The OutputSerialization property. - * + * * @param outputSerialization the outputSerialization value to set. * @return the QueryRequest object itself. */ @@ -142,7 +142,7 @@ 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. @@ -154,7 +154,7 @@ 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. diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/QuerySerialization.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/QuerySerialization.java similarity index 98% rename from sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/QuerySerialization.java rename to sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/QuerySerialization.java index d3da3960b1ee..6ae6a318997c 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/QuerySerialization.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/QuerySerialization.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.blob.models; +package com.azure.v2.storage.blob.models; import com.azure.core.v2.annotation.Fluent; import com.azure.core.v2.util.CoreUtils; @@ -31,7 +31,7 @@ public QuerySerialization() { /** * Get the format property: The Format property. - * + * * @return the format value. */ public QueryFormat getFormat() { @@ -40,7 +40,7 @@ public QueryFormat getFormat() { /** * Set the format property: The Format property. - * + * * @param format the format value to set. * @return the QuerySerialization object itself. */ @@ -64,7 +64,7 @@ public XmlWriter toXml(XmlWriter xmlWriter, String rootElementName) throws XMLSt /** * Reads an instance of QuerySerialization from the XmlReader. - * + * * @param xmlReader The XmlReader being read. * @return An instance of QuerySerialization if the XmlReader was pointing to an instance of it, or null if it was * pointing to XML null. @@ -76,7 +76,7 @@ public static QuerySerialization fromXml(XmlReader xmlReader) throws XMLStreamEx /** * Reads an instance of QuerySerialization from the XmlReader. - * + * * @param xmlReader The XmlReader being read. * @param rootElementName Optional root element name to override the default defined by the model. Used to support * cases where the model can deserialize from different root element names. diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/RehydratePriority.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/RehydratePriority.java similarity index 96% rename from sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/RehydratePriority.java rename to sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/RehydratePriority.java index 12c21fd7a7ea..29e9d7967b8d 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/RehydratePriority.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/RehydratePriority.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.blob.models; +package com.azure.v2.storage.blob.models; import io.clientcore.core.util.ExpandableEnum; import java.util.Map; @@ -33,7 +33,7 @@ private RehydratePriority(String name) { /** * Creates or finds a RehydratePriority. - * + * * @param name a name to look for. * @return the corresponding RehydratePriority. */ @@ -50,7 +50,7 @@ public static RehydratePriority fromString(String name) { /** * Gets the value of the RehydratePriority instance. - * + * * @return the value of the RehydratePriority instance. */ @Override diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/SequenceNumberActionType.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/SequenceNumberActionType.java similarity index 96% rename from sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/SequenceNumberActionType.java rename to sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/SequenceNumberActionType.java index b53fe1e30289..b965e4cad121 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/SequenceNumberActionType.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/SequenceNumberActionType.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.blob.models; +package com.azure.v2.storage.blob.models; /** * Defines values for SequenceNumberActionType. @@ -34,7 +34,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-v2/src/main/java/com/azure/storage/blob/models/ServicesFilterBlobsHeaders.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ServicesFilterBlobsHeaders.java similarity index 97% rename from sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/ServicesFilterBlobsHeaders.java rename to sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ServicesFilterBlobsHeaders.java index 36d48dc63a64..eae21db4022b 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/ServicesFilterBlobsHeaders.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ServicesFilterBlobsHeaders.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.blob.models; +package com.azure.v2.storage.blob.models; import com.azure.core.v2.annotation.Fluent; import io.clientcore.core.http.models.DateTimeRfc1123; @@ -41,7 +41,7 @@ public final class ServicesFilterBlobsHeaders { // HttpHeaders containing the raw property values. /** * Creates an instance of ServicesFilterBlobsHeaders class. - * + * * @param rawHeaders The raw HttpHeaders that will be used to create the property values. */ public ServicesFilterBlobsHeaders(HttpHeaders rawHeaders) { @@ -56,7 +56,7 @@ public ServicesFilterBlobsHeaders(HttpHeaders rawHeaders) { /** * Get the xMsVersion property: The x-ms-version property. - * + * * @return the xMsVersion value. */ public String getXMsVersion() { @@ -65,7 +65,7 @@ public String getXMsVersion() { /** * Set the xMsVersion property: The x-ms-version property. - * + * * @param xMsVersion the xMsVersion value to set. * @return the ServicesFilterBlobsHeaders object itself. */ @@ -76,7 +76,7 @@ public ServicesFilterBlobsHeaders setXMsVersion(String xMsVersion) { /** * Get the xMsRequestId property: The x-ms-request-id property. - * + * * @return the xMsRequestId value. */ public String getXMsRequestId() { @@ -85,7 +85,7 @@ public String getXMsRequestId() { /** * Set the xMsRequestId property: The x-ms-request-id property. - * + * * @param xMsRequestId the xMsRequestId value to set. * @return the ServicesFilterBlobsHeaders object itself. */ @@ -96,7 +96,7 @@ public ServicesFilterBlobsHeaders setXMsRequestId(String xMsRequestId) { /** * Get the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @return the xMsClientRequestId value. */ public String getXMsClientRequestId() { @@ -105,7 +105,7 @@ public String getXMsClientRequestId() { /** * Set the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @param xMsClientRequestId the xMsClientRequestId value to set. * @return the ServicesFilterBlobsHeaders object itself. */ @@ -116,7 +116,7 @@ public ServicesFilterBlobsHeaders setXMsClientRequestId(String xMsClientRequestI /** * Get the date property: The Date property. - * + * * @return the date value. */ public OffsetDateTime getDate() { @@ -128,7 +128,7 @@ public OffsetDateTime getDate() { /** * Set the date property: The Date property. - * + * * @param date the date value to set. * @return the ServicesFilterBlobsHeaders object itself. */ diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/ServicesGetAccountInfoHeaders.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ServicesGetAccountInfoHeaders.java similarity index 97% rename from sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/ServicesGetAccountInfoHeaders.java rename to sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ServicesGetAccountInfoHeaders.java index 02c822a54623..1d2d237084dc 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/ServicesGetAccountInfoHeaders.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ServicesGetAccountInfoHeaders.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.blob.models; +package com.azure.v2.storage.blob.models; import com.azure.core.v2.annotation.Fluent; import io.clientcore.core.http.models.DateTimeRfc1123; @@ -62,7 +62,7 @@ public final class ServicesGetAccountInfoHeaders { // HttpHeaders containing the raw property values. /** * Creates an instance of ServicesGetAccountInfoHeaders class. - * + * * @param rawHeaders The raw HttpHeaders that will be used to create the property values. */ public ServicesGetAccountInfoHeaders(HttpHeaders rawHeaders) { @@ -89,7 +89,7 @@ public ServicesGetAccountInfoHeaders(HttpHeaders rawHeaders) { /** * Get the xMsVersion property: The x-ms-version property. - * + * * @return the xMsVersion value. */ public String getXMsVersion() { @@ -98,7 +98,7 @@ public String getXMsVersion() { /** * Set the xMsVersion property: The x-ms-version property. - * + * * @param xMsVersion the xMsVersion value to set. * @return the ServicesGetAccountInfoHeaders object itself. */ @@ -109,7 +109,7 @@ public ServicesGetAccountInfoHeaders setXMsVersion(String xMsVersion) { /** * Get the xMsAccountKind property: The x-ms-account-kind property. - * + * * @return the xMsAccountKind value. */ public AccountKind getXMsAccountKind() { @@ -118,7 +118,7 @@ public AccountKind getXMsAccountKind() { /** * Set the xMsAccountKind property: The x-ms-account-kind property. - * + * * @param xMsAccountKind the xMsAccountKind value to set. * @return the ServicesGetAccountInfoHeaders object itself. */ @@ -129,7 +129,7 @@ public ServicesGetAccountInfoHeaders setXMsAccountKind(AccountKind xMsAccountKin /** * Get the xMsIsHnsEnabled property: The x-ms-is-hns-enabled property. - * + * * @return the xMsIsHnsEnabled value. */ public Boolean isXMsIsHnsEnabled() { @@ -138,7 +138,7 @@ public Boolean isXMsIsHnsEnabled() { /** * Set the xMsIsHnsEnabled property: The x-ms-is-hns-enabled property. - * + * * @param xMsIsHnsEnabled the xMsIsHnsEnabled value to set. * @return the ServicesGetAccountInfoHeaders object itself. */ @@ -149,7 +149,7 @@ public ServicesGetAccountInfoHeaders setXMsIsHnsEnabled(Boolean xMsIsHnsEnabled) /** * Get the xMsSkuName property: The x-ms-sku-name property. - * + * * @return the xMsSkuName value. */ public SkuName getXMsSkuName() { @@ -158,7 +158,7 @@ public SkuName getXMsSkuName() { /** * Set the xMsSkuName property: The x-ms-sku-name property. - * + * * @param xMsSkuName the xMsSkuName value to set. * @return the ServicesGetAccountInfoHeaders object itself. */ @@ -169,7 +169,7 @@ public ServicesGetAccountInfoHeaders setXMsSkuName(SkuName xMsSkuName) { /** * Get the xMsRequestId property: The x-ms-request-id property. - * + * * @return the xMsRequestId value. */ public String getXMsRequestId() { @@ -178,7 +178,7 @@ public String getXMsRequestId() { /** * Set the xMsRequestId property: The x-ms-request-id property. - * + * * @param xMsRequestId the xMsRequestId value to set. * @return the ServicesGetAccountInfoHeaders object itself. */ @@ -189,7 +189,7 @@ public ServicesGetAccountInfoHeaders setXMsRequestId(String xMsRequestId) { /** * Get the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @return the xMsClientRequestId value. */ public String getXMsClientRequestId() { @@ -198,7 +198,7 @@ public String getXMsClientRequestId() { /** * Set the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @param xMsClientRequestId the xMsClientRequestId value to set. * @return the ServicesGetAccountInfoHeaders object itself. */ @@ -209,7 +209,7 @@ public ServicesGetAccountInfoHeaders setXMsClientRequestId(String xMsClientReque /** * Get the date property: The Date property. - * + * * @return the date value. */ public OffsetDateTime getDate() { @@ -221,7 +221,7 @@ public OffsetDateTime getDate() { /** * Set the date property: The Date property. - * + * * @param date the date value to set. * @return the ServicesGetAccountInfoHeaders object itself. */ diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/ServicesGetPropertiesHeaders.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ServicesGetPropertiesHeaders.java similarity index 96% rename from sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/ServicesGetPropertiesHeaders.java rename to sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ServicesGetPropertiesHeaders.java index 9ce90723e2da..d8429a41b66b 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/ServicesGetPropertiesHeaders.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ServicesGetPropertiesHeaders.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.blob.models; +package com.azure.v2.storage.blob.models; import com.azure.core.v2.annotation.Fluent; import io.clientcore.core.http.models.HttpHeaderName; @@ -33,7 +33,7 @@ public final class ServicesGetPropertiesHeaders { // HttpHeaders containing the raw property values. /** * Creates an instance of ServicesGetPropertiesHeaders class. - * + * * @param rawHeaders The raw HttpHeaders that will be used to create the property values. */ public ServicesGetPropertiesHeaders(HttpHeaders rawHeaders) { @@ -44,7 +44,7 @@ public ServicesGetPropertiesHeaders(HttpHeaders rawHeaders) { /** * Get the xMsVersion property: The x-ms-version property. - * + * * @return the xMsVersion value. */ public String getXMsVersion() { @@ -53,7 +53,7 @@ public String getXMsVersion() { /** * Set the xMsVersion property: The x-ms-version property. - * + * * @param xMsVersion the xMsVersion value to set. * @return the ServicesGetPropertiesHeaders object itself. */ @@ -64,7 +64,7 @@ public ServicesGetPropertiesHeaders setXMsVersion(String xMsVersion) { /** * Get the xMsRequestId property: The x-ms-request-id property. - * + * * @return the xMsRequestId value. */ public String getXMsRequestId() { @@ -73,7 +73,7 @@ public String getXMsRequestId() { /** * Set the xMsRequestId property: The x-ms-request-id property. - * + * * @param xMsRequestId the xMsRequestId value to set. * @return the ServicesGetPropertiesHeaders object itself. */ @@ -84,7 +84,7 @@ public ServicesGetPropertiesHeaders setXMsRequestId(String xMsRequestId) { /** * Get the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @return the xMsClientRequestId value. */ public String getXMsClientRequestId() { @@ -93,7 +93,7 @@ public String getXMsClientRequestId() { /** * Set the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @param xMsClientRequestId the xMsClientRequestId value to set. * @return the ServicesGetPropertiesHeaders object itself. */ diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/ServicesGetStatisticsHeaders.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ServicesGetStatisticsHeaders.java similarity index 97% rename from sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/ServicesGetStatisticsHeaders.java rename to sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ServicesGetStatisticsHeaders.java index 47fd1a51dc00..31493c5dd313 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/ServicesGetStatisticsHeaders.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ServicesGetStatisticsHeaders.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.blob.models; +package com.azure.v2.storage.blob.models; import com.azure.core.v2.annotation.Fluent; import io.clientcore.core.http.models.DateTimeRfc1123; @@ -41,7 +41,7 @@ public final class ServicesGetStatisticsHeaders { // HttpHeaders containing the raw property values. /** * Creates an instance of ServicesGetStatisticsHeaders class. - * + * * @param rawHeaders The raw HttpHeaders that will be used to create the property values. */ public ServicesGetStatisticsHeaders(HttpHeaders rawHeaders) { @@ -56,7 +56,7 @@ public ServicesGetStatisticsHeaders(HttpHeaders rawHeaders) { /** * Get the xMsVersion property: The x-ms-version property. - * + * * @return the xMsVersion value. */ public String getXMsVersion() { @@ -65,7 +65,7 @@ public String getXMsVersion() { /** * Set the xMsVersion property: The x-ms-version property. - * + * * @param xMsVersion the xMsVersion value to set. * @return the ServicesGetStatisticsHeaders object itself. */ @@ -76,7 +76,7 @@ public ServicesGetStatisticsHeaders setXMsVersion(String xMsVersion) { /** * Get the xMsRequestId property: The x-ms-request-id property. - * + * * @return the xMsRequestId value. */ public String getXMsRequestId() { @@ -85,7 +85,7 @@ public String getXMsRequestId() { /** * Set the xMsRequestId property: The x-ms-request-id property. - * + * * @param xMsRequestId the xMsRequestId value to set. * @return the ServicesGetStatisticsHeaders object itself. */ @@ -96,7 +96,7 @@ public ServicesGetStatisticsHeaders setXMsRequestId(String xMsRequestId) { /** * Get the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @return the xMsClientRequestId value. */ public String getXMsClientRequestId() { @@ -105,7 +105,7 @@ public String getXMsClientRequestId() { /** * Set the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @param xMsClientRequestId the xMsClientRequestId value to set. * @return the ServicesGetStatisticsHeaders object itself. */ @@ -116,7 +116,7 @@ public ServicesGetStatisticsHeaders setXMsClientRequestId(String xMsClientReques /** * Get the date property: The Date property. - * + * * @return the date value. */ public OffsetDateTime getDate() { @@ -128,7 +128,7 @@ public OffsetDateTime getDate() { /** * Set the date property: The Date property. - * + * * @param date the date value to set. * @return the ServicesGetStatisticsHeaders object itself. */ diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/ServicesGetUserDelegationKeyHeaders.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ServicesGetUserDelegationKeyHeaders.java similarity index 97% rename from sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/ServicesGetUserDelegationKeyHeaders.java rename to sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ServicesGetUserDelegationKeyHeaders.java index a2a6674f7de5..ea2c52cd4436 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/ServicesGetUserDelegationKeyHeaders.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ServicesGetUserDelegationKeyHeaders.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.blob.models; +package com.azure.v2.storage.blob.models; import com.azure.core.v2.annotation.Fluent; import io.clientcore.core.http.models.DateTimeRfc1123; @@ -41,7 +41,7 @@ public final class ServicesGetUserDelegationKeyHeaders { // HttpHeaders containing the raw property values. /** * Creates an instance of ServicesGetUserDelegationKeyHeaders class. - * + * * @param rawHeaders The raw HttpHeaders that will be used to create the property values. */ public ServicesGetUserDelegationKeyHeaders(HttpHeaders rawHeaders) { @@ -56,7 +56,7 @@ public ServicesGetUserDelegationKeyHeaders(HttpHeaders rawHeaders) { /** * Get the xMsVersion property: The x-ms-version property. - * + * * @return the xMsVersion value. */ public String getXMsVersion() { @@ -65,7 +65,7 @@ public String getXMsVersion() { /** * Set the xMsVersion property: The x-ms-version property. - * + * * @param xMsVersion the xMsVersion value to set. * @return the ServicesGetUserDelegationKeyHeaders object itself. */ @@ -76,7 +76,7 @@ public ServicesGetUserDelegationKeyHeaders setXMsVersion(String xMsVersion) { /** * Get the xMsRequestId property: The x-ms-request-id property. - * + * * @return the xMsRequestId value. */ public String getXMsRequestId() { @@ -85,7 +85,7 @@ public String getXMsRequestId() { /** * Set the xMsRequestId property: The x-ms-request-id property. - * + * * @param xMsRequestId the xMsRequestId value to set. * @return the ServicesGetUserDelegationKeyHeaders object itself. */ @@ -96,7 +96,7 @@ public ServicesGetUserDelegationKeyHeaders setXMsRequestId(String xMsRequestId) /** * Get the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @return the xMsClientRequestId value. */ public String getXMsClientRequestId() { @@ -105,7 +105,7 @@ public String getXMsClientRequestId() { /** * Set the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @param xMsClientRequestId the xMsClientRequestId value to set. * @return the ServicesGetUserDelegationKeyHeaders object itself. */ @@ -116,7 +116,7 @@ public ServicesGetUserDelegationKeyHeaders setXMsClientRequestId(String xMsClien /** * Get the date property: The Date property. - * + * * @return the date value. */ public OffsetDateTime getDate() { @@ -128,7 +128,7 @@ public OffsetDateTime getDate() { /** * Set the date property: The Date property. - * + * * @param date the date value to set. * @return the ServicesGetUserDelegationKeyHeaders object itself. */ diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/ServicesListBlobContainersSegmentHeaders.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ServicesListBlobContainersSegmentHeaders.java similarity index 97% rename from sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/ServicesListBlobContainersSegmentHeaders.java rename to sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ServicesListBlobContainersSegmentHeaders.java index 81c019fc5cc1..d24ebdc6186b 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/ServicesListBlobContainersSegmentHeaders.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ServicesListBlobContainersSegmentHeaders.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.blob.models; +package com.azure.v2.storage.blob.models; import com.azure.core.v2.annotation.Fluent; import io.clientcore.core.http.models.HttpHeaderName; @@ -33,7 +33,7 @@ public final class ServicesListBlobContainersSegmentHeaders { // 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) { @@ -44,7 +44,7 @@ public ServicesListBlobContainersSegmentHeaders(HttpHeaders rawHeaders) { /** * Get the xMsVersion property: The x-ms-version property. - * + * * @return the xMsVersion value. */ public String getXMsVersion() { @@ -53,7 +53,7 @@ public String getXMsVersion() { /** * Set the xMsVersion property: The x-ms-version property. - * + * * @param xMsVersion the xMsVersion value to set. * @return the ServicesListBlobContainersSegmentHeaders object itself. */ @@ -64,7 +64,7 @@ public ServicesListBlobContainersSegmentHeaders setXMsVersion(String xMsVersion) /** * Get the xMsRequestId property: The x-ms-request-id property. - * + * * @return the xMsRequestId value. */ public String getXMsRequestId() { @@ -73,7 +73,7 @@ public String getXMsRequestId() { /** * Set the xMsRequestId property: The x-ms-request-id property. - * + * * @param xMsRequestId the xMsRequestId value to set. * @return the ServicesListBlobContainersSegmentHeaders object itself. */ @@ -84,7 +84,7 @@ public ServicesListBlobContainersSegmentHeaders setXMsRequestId(String xMsReques /** * Get the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @return the xMsClientRequestId value. */ public String getXMsClientRequestId() { @@ -93,7 +93,7 @@ public String getXMsClientRequestId() { /** * Set the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @param xMsClientRequestId the xMsClientRequestId value to set. * @return the ServicesListBlobContainersSegmentHeaders object itself. */ diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/ServicesListBlobContainersSegmentNextHeaders.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ServicesListBlobContainersSegmentNextHeaders.java similarity index 97% rename from sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/ServicesListBlobContainersSegmentNextHeaders.java rename to sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ServicesListBlobContainersSegmentNextHeaders.java index 8ed2d4a4ddd8..78cbca17164e 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/ServicesListBlobContainersSegmentNextHeaders.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ServicesListBlobContainersSegmentNextHeaders.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.blob.models; +package com.azure.v2.storage.blob.models; import com.azure.core.v2.annotation.Fluent; import io.clientcore.core.http.models.HttpHeaderName; @@ -33,7 +33,7 @@ public final class ServicesListBlobContainersSegmentNextHeaders { // 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) { @@ -44,7 +44,7 @@ public ServicesListBlobContainersSegmentNextHeaders(HttpHeaders rawHeaders) { /** * Get the xMsVersion property: The x-ms-version property. - * + * * @return the xMsVersion value. */ public String getXMsVersion() { @@ -53,7 +53,7 @@ public String getXMsVersion() { /** * Set the xMsVersion property: The x-ms-version property. - * + * * @param xMsVersion the xMsVersion value to set. * @return the ServicesListBlobContainersSegmentNextHeaders object itself. */ @@ -64,7 +64,7 @@ public ServicesListBlobContainersSegmentNextHeaders setXMsVersion(String xMsVers /** * Get the xMsRequestId property: The x-ms-request-id property. - * + * * @return the xMsRequestId value. */ public String getXMsRequestId() { @@ -73,7 +73,7 @@ public String getXMsRequestId() { /** * Set the xMsRequestId property: The x-ms-request-id property. - * + * * @param xMsRequestId the xMsRequestId value to set. * @return the ServicesListBlobContainersSegmentNextHeaders object itself. */ @@ -84,7 +84,7 @@ public ServicesListBlobContainersSegmentNextHeaders setXMsRequestId(String xMsRe /** * Get the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @return the xMsClientRequestId value. */ public String getXMsClientRequestId() { @@ -93,7 +93,7 @@ public String getXMsClientRequestId() { /** * Set the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @param xMsClientRequestId the xMsClientRequestId value to set. * @return the ServicesListBlobContainersSegmentNextHeaders object itself. */ diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/ServicesSetPropertiesHeaders.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ServicesSetPropertiesHeaders.java similarity index 96% rename from sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/ServicesSetPropertiesHeaders.java rename to sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ServicesSetPropertiesHeaders.java index 043f4f8ffe27..03fcb65b62e6 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/ServicesSetPropertiesHeaders.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ServicesSetPropertiesHeaders.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.blob.models; +package com.azure.v2.storage.blob.models; import com.azure.core.v2.annotation.Fluent; import io.clientcore.core.http.models.HttpHeaderName; @@ -33,7 +33,7 @@ public final class ServicesSetPropertiesHeaders { // HttpHeaders containing the raw property values. /** * Creates an instance of ServicesSetPropertiesHeaders class. - * + * * @param rawHeaders The raw HttpHeaders that will be used to create the property values. */ public ServicesSetPropertiesHeaders(HttpHeaders rawHeaders) { @@ -44,7 +44,7 @@ public ServicesSetPropertiesHeaders(HttpHeaders rawHeaders) { /** * Get the xMsVersion property: The x-ms-version property. - * + * * @return the xMsVersion value. */ public String getXMsVersion() { @@ -53,7 +53,7 @@ public String getXMsVersion() { /** * Set the xMsVersion property: The x-ms-version property. - * + * * @param xMsVersion the xMsVersion value to set. * @return the ServicesSetPropertiesHeaders object itself. */ @@ -64,7 +64,7 @@ public ServicesSetPropertiesHeaders setXMsVersion(String xMsVersion) { /** * Get the xMsRequestId property: The x-ms-request-id property. - * + * * @return the xMsRequestId value. */ public String getXMsRequestId() { @@ -73,7 +73,7 @@ public String getXMsRequestId() { /** * Set the xMsRequestId property: The x-ms-request-id property. - * + * * @param xMsRequestId the xMsRequestId value to set. * @return the ServicesSetPropertiesHeaders object itself. */ @@ -84,7 +84,7 @@ public ServicesSetPropertiesHeaders setXMsRequestId(String xMsRequestId) { /** * Get the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @return the xMsClientRequestId value. */ public String getXMsClientRequestId() { @@ -93,7 +93,7 @@ public String getXMsClientRequestId() { /** * Set the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @param xMsClientRequestId the xMsClientRequestId value to set. * @return the ServicesSetPropertiesHeaders object itself. */ diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/ServicesSubmitBatchHeaders.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ServicesSubmitBatchHeaders.java similarity index 96% rename from sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/ServicesSubmitBatchHeaders.java rename to sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ServicesSubmitBatchHeaders.java index 7fd6a1d03a7b..354be4cbfb03 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/ServicesSubmitBatchHeaders.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ServicesSubmitBatchHeaders.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.blob.models; +package com.azure.v2.storage.blob.models; import com.azure.core.v2.annotation.Fluent; import io.clientcore.core.http.models.HttpHeaderName; @@ -33,7 +33,7 @@ public final class ServicesSubmitBatchHeaders { // 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) { @@ -44,7 +44,7 @@ public ServicesSubmitBatchHeaders(HttpHeaders rawHeaders) { /** * Get the xMsVersion property: The x-ms-version property. - * + * * @return the xMsVersion value. */ public String getXMsVersion() { @@ -53,7 +53,7 @@ public String getXMsVersion() { /** * Set the xMsVersion property: The x-ms-version property. - * + * * @param xMsVersion the xMsVersion value to set. * @return the ServicesSubmitBatchHeaders object itself. */ @@ -64,7 +64,7 @@ public ServicesSubmitBatchHeaders setXMsVersion(String xMsVersion) { /** * Get the xMsRequestId property: The x-ms-request-id property. - * + * * @return the xMsRequestId value. */ public String getXMsRequestId() { @@ -73,7 +73,7 @@ public String getXMsRequestId() { /** * Set the xMsRequestId property: The x-ms-request-id property. - * + * * @param xMsRequestId the xMsRequestId value to set. * @return the ServicesSubmitBatchHeaders object itself. */ @@ -84,7 +84,7 @@ public ServicesSubmitBatchHeaders setXMsRequestId(String xMsRequestId) { /** * Get the contentType property: The Content-Type property. - * + * * @return the contentType value. */ public String getContentType() { @@ -93,7 +93,7 @@ public String getContentType() { /** * Set the contentType property: The Content-Type property. - * + * * @param contentType the contentType value to set. * @return the ServicesSubmitBatchHeaders object itself. */ diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/SkuName.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/SkuName.java similarity index 96% rename from sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/SkuName.java rename to sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/SkuName.java index bab2c5e601f7..13ce34eddbf0 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/SkuName.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/SkuName.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.blob.models; +package com.azure.v2.storage.blob.models; /** * Defines values for SkuName. @@ -44,7 +44,7 @@ public enum SkuName { /** * Parses a serialized value to a SkuName instance. - * + * * @param value the serialized value to parse. * @return the parsed SkuName object, or null if unable to parse. */ diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/StaticWebsite.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/StaticWebsite.java similarity index 98% rename from sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/StaticWebsite.java rename to sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/StaticWebsite.java index cf5a1d66f9bc..52cf6a8d428c 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/StaticWebsite.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/StaticWebsite.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.blob.models; +package com.azure.v2.storage.blob.models; import com.azure.core.v2.annotation.Fluent; import com.azure.core.v2.util.CoreUtils; @@ -46,7 +46,7 @@ public StaticWebsite() { /** * Get the enabled property: Indicates whether this account is hosting a static website. - * + * * @return the enabled value. */ public boolean isEnabled() { @@ -55,7 +55,7 @@ public boolean isEnabled() { /** * Set the enabled property: Indicates whether this account is hosting a static website. - * + * * @param enabled the enabled value to set. * @return the StaticWebsite object itself. */ @@ -66,7 +66,7 @@ public StaticWebsite setEnabled(boolean enabled) { /** * Get the indexDocument property: The default name of the index page under each directory. - * + * * @return the indexDocument value. */ public String getIndexDocument() { @@ -75,7 +75,7 @@ public String getIndexDocument() { /** * Set the indexDocument property: The default name of the index page under each directory. - * + * * @param indexDocument the indexDocument value to set. * @return the StaticWebsite object itself. */ @@ -86,7 +86,7 @@ public StaticWebsite setIndexDocument(String indexDocument) { /** * Get the errorDocument404Path property: The absolute path of the custom 404 page. - * + * * @return the errorDocument404Path value. */ public String getErrorDocument404Path() { @@ -95,7 +95,7 @@ public String getErrorDocument404Path() { /** * Set the errorDocument404Path property: The absolute path of the custom 404 page. - * + * * @param errorDocument404Path the errorDocument404Path value to set. * @return the StaticWebsite object itself. */ @@ -106,7 +106,7 @@ public StaticWebsite setErrorDocument404Path(String errorDocument404Path) { /** * Get the defaultIndexDocumentPath property: Absolute path of the default index page. - * + * * @return the defaultIndexDocumentPath value. */ public String getDefaultIndexDocumentPath() { @@ -115,7 +115,7 @@ public String getDefaultIndexDocumentPath() { /** * Set the defaultIndexDocumentPath property: Absolute path of the default index page. - * + * * @param defaultIndexDocumentPath the defaultIndexDocumentPath value to set. * @return the StaticWebsite object itself. */ @@ -142,7 +142,7 @@ 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. @@ -154,7 +154,7 @@ 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. diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/StorageError.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/StorageError.java similarity index 98% rename from sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/StorageError.java rename to sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/StorageError.java index f00076fe34c0..81adebb6a0b3 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/StorageError.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/StorageError.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.blob.models; +package com.azure.v2.storage.blob.models; import com.azure.core.v2.annotation.Fluent; import com.azure.core.v2.util.CoreUtils; @@ -31,7 +31,7 @@ public StorageError() { /** * Get the message property: The Message property. - * + * * @return the message value. */ public String getMessage() { @@ -40,7 +40,7 @@ public String getMessage() { /** * Set the message property: The Message property. - * + * * @param message the message value to set. * @return the StorageError object itself. */ @@ -64,7 +64,7 @@ public XmlWriter toXml(XmlWriter xmlWriter, String rootElementName) throws XMLSt /** * 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. @@ -76,7 +76,7 @@ public static StorageError fromXml(XmlReader xmlReader) throws XMLStreamExceptio /** * 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. diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/StorageErrorException.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/StorageErrorException.java similarity index 95% rename from sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/StorageErrorException.java rename to sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/StorageErrorException.java index 4547e5ee9d27..0edf2d55daaa 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/StorageErrorException.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/StorageErrorException.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.blob.models; +package com.azure.v2.storage.blob.models; import io.clientcore.core.http.exception.HttpResponseException; import io.clientcore.core.http.models.Response; @@ -13,7 +13,7 @@ public final class StorageErrorException extends HttpResponseException { /** * Initializes a new instance of the StorageErrorException class. - * + * * @param message the exception message or the response content if a message is not available. * @param response the HTTP response. */ @@ -23,7 +23,7 @@ public StorageErrorException(String message, Response response) { /** * Initializes a new instance of the StorageErrorException class. - * + * * @param message the exception message or the response content if a message is not available. * @param response the HTTP response. * @param value the deserialized response value. diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/UserDelegationKey.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/UserDelegationKey.java similarity index 98% rename from sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/UserDelegationKey.java rename to sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/UserDelegationKey.java index 896c7d541a33..93e663880efe 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/UserDelegationKey.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/UserDelegationKey.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.storage.blob.models; +package com.azure.v2.storage.blob.models; import com.azure.core.v2.annotation.Fluent; import com.azure.core.v2.util.CoreUtils; @@ -63,7 +63,7 @@ public UserDelegationKey() { /** * Get the signedObjectId property: The Azure Active Directory object ID in GUID format. - * + * * @return the signedObjectId value. */ public String getSignedObjectId() { @@ -72,7 +72,7 @@ public String getSignedObjectId() { /** * Set the signedObjectId property: The Azure Active Directory object ID in GUID format. - * + * * @param signedObjectId the signedObjectId value to set. * @return the UserDelegationKey object itself. */ @@ -83,7 +83,7 @@ public UserDelegationKey setSignedObjectId(String signedObjectId) { /** * Get the signedTenantId property: The Azure Active Directory tenant ID in GUID format. - * + * * @return the signedTenantId value. */ public String getSignedTenantId() { @@ -92,7 +92,7 @@ public String getSignedTenantId() { /** * Set the signedTenantId property: The Azure Active Directory tenant ID in GUID format. - * + * * @param signedTenantId the signedTenantId value to set. * @return the UserDelegationKey object itself. */ @@ -103,7 +103,7 @@ public UserDelegationKey setSignedTenantId(String signedTenantId) { /** * Get the signedStart property: The date-time the key is active. - * + * * @return the signedStart value. */ public OffsetDateTime getSignedStart() { @@ -112,7 +112,7 @@ public OffsetDateTime getSignedStart() { /** * Set the signedStart property: The date-time the key is active. - * + * * @param signedStart the signedStart value to set. * @return the UserDelegationKey object itself. */ @@ -123,7 +123,7 @@ public UserDelegationKey setSignedStart(OffsetDateTime signedStart) { /** * Get the signedExpiry property: The date-time the key expires. - * + * * @return the signedExpiry value. */ public OffsetDateTime getSignedExpiry() { @@ -132,7 +132,7 @@ public OffsetDateTime getSignedExpiry() { /** * Set the signedExpiry property: The date-time the key expires. - * + * * @param signedExpiry the signedExpiry value to set. * @return the UserDelegationKey object itself. */ @@ -143,7 +143,7 @@ public UserDelegationKey setSignedExpiry(OffsetDateTime signedExpiry) { /** * Get the signedService property: Abbreviation of the Azure Storage service that accepts the key. - * + * * @return the signedService value. */ public String getSignedService() { @@ -152,7 +152,7 @@ public String getSignedService() { /** * Set the signedService property: Abbreviation of the Azure Storage service that accepts the key. - * + * * @param signedService the signedService value to set. * @return the UserDelegationKey object itself. */ @@ -163,7 +163,7 @@ public UserDelegationKey setSignedService(String signedService) { /** * Get the signedVersion property: The service version that created the key. - * + * * @return the signedVersion value. */ public String getSignedVersion() { @@ -172,7 +172,7 @@ public String getSignedVersion() { /** * Set the signedVersion property: The service version that created the key. - * + * * @param signedVersion the signedVersion value to set. * @return the UserDelegationKey object itself. */ @@ -183,7 +183,7 @@ public UserDelegationKey setSignedVersion(String signedVersion) { /** * Get the value property: The key as a base64 string. - * + * * @return the value value. */ public String getValue() { @@ -192,7 +192,7 @@ public String getValue() { /** * Set the value property: The key as a base64 string. - * + * * @param value the value value to set. * @return the UserDelegationKey object itself. */ @@ -224,7 +224,7 @@ 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. @@ -236,7 +236,7 @@ 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. diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/package-info.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/package-info.java similarity index 84% rename from sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/package-info.java rename to sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/package-info.java index 0680e6d4bbc6..b26b0d5f392e 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/models/package-info.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/package-info.java @@ -6,4 +6,4 @@ * Package containing the data models for AzureBlobStorage. * null. */ -package com.azure.storage.blob.models; +package com.azure.v2.storage.blob.models; diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/package-info.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/package-info.java similarity index 86% rename from sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/package-info.java rename to sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/package-info.java index 5488ca6ecc7b..3bd945a879dc 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/storage/blob/package-info.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/package-info.java @@ -6,4 +6,4 @@ * Package containing the classes for AzureBlobStorage. * null. */ -package com.azure.storage.blob; +package com.azure.v2.storage.blob; diff --git a/sdk/storage/azure-storage-blob-v2/src/test/java/com/azure/storage/blob/BlobClientTest.java b/sdk/storage/azure-storage-blob-v2/src/test/java/com/azure/v2/storage/blob/BlobClientTest.java similarity index 95% rename from sdk/storage/azure-storage-blob-v2/src/test/java/com/azure/storage/blob/BlobClientTest.java rename to sdk/storage/azure-storage-blob-v2/src/test/java/com/azure/v2/storage/blob/BlobClientTest.java index a58d02752ad3..e24948d10960 100644 --- a/sdk/storage/azure-storage-blob-v2/src/test/java/com/azure/storage/blob/BlobClientTest.java +++ b/sdk/storage/azure-storage-blob-v2/src/test/java/com/azure/v2/storage/blob/BlobClientTest.java @@ -1,4 +1,4 @@ -package com.azure.storage.blob; +package com.azure.v2.storage.blob; import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; diff --git a/sdk/storage/azure-storage-blob-v2/src/test/java/com/azure/storage/blob/BlockBlobClientTest.java b/sdk/storage/azure-storage-blob-v2/src/test/java/com/azure/v2/storage/blob/BlockBlobClientTest.java similarity index 96% rename from sdk/storage/azure-storage-blob-v2/src/test/java/com/azure/storage/blob/BlockBlobClientTest.java rename to sdk/storage/azure-storage-blob-v2/src/test/java/com/azure/v2/storage/blob/BlockBlobClientTest.java index 5ac27e7cef0e..6d18f1ee8747 100644 --- a/sdk/storage/azure-storage-blob-v2/src/test/java/com/azure/storage/blob/BlockBlobClientTest.java +++ b/sdk/storage/azure-storage-blob-v2/src/test/java/com/azure/v2/storage/blob/BlockBlobClientTest.java @@ -1,4 +1,4 @@ -package com.azure.storage.blob; +package com.azure.v2.storage.blob; import io.clientcore.core.util.binarydata.BinaryData; import org.junit.jupiter.api.Disabled; diff --git a/sdk/storage/azure-storage-blob-v2/src/test/java/com/azure/storage/blob/ContainerClientTest.java b/sdk/storage/azure-storage-blob-v2/src/test/java/com/azure/v2/storage/blob/ContainerClientTest.java similarity index 84% rename from sdk/storage/azure-storage-blob-v2/src/test/java/com/azure/storage/blob/ContainerClientTest.java rename to sdk/storage/azure-storage-blob-v2/src/test/java/com/azure/v2/storage/blob/ContainerClientTest.java index 35fb8434e6c1..0f92907ef127 100644 --- a/sdk/storage/azure-storage-blob-v2/src/test/java/com/azure/storage/blob/ContainerClientTest.java +++ b/sdk/storage/azure-storage-blob-v2/src/test/java/com/azure/v2/storage/blob/ContainerClientTest.java @@ -1,7 +1,5 @@ -package com.azure.storage.blob; +package com.azure.v2.storage.blob; -import com.azure.storage.blob.models.ListBlobsHierarchySegmentResponse; -import io.clientcore.core.http.models.Response; import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; diff --git a/sdk/storage/azure-storage-blob-v2/swagger/autorest.md b/sdk/storage/azure-storage-blob-v2/swagger/autorest.md index 73e4956e336a..bde1e57b3552 100644 --- a/sdk/storage/azure-storage-blob-v2/swagger/autorest.md +++ b/sdk/storage/azure-storage-blob-v2/swagger/autorest.md @@ -5,7 +5,7 @@ use: '@autorest/java@4.1.39' input-file: https://raw.githubusercontent.com/Azure/azure-rest-api-specs/refs/heads/feature/storage/stg96base2/specification/storage/data-plane/Microsoft.BlobStorage/stable/2025-01-05/blob.json java: true output-folder: . -namespace: com.azure.storage.blob +namespace: com.azure.v2.storage.blob service-interface-as-public: true license-header: MICROSOFT_MIT_SMALL enable-sync-stack: true diff --git a/sdk/storage/azure-storage-blob-v2/swagger/src/main/java/StorageCustomization.java b/sdk/storage/azure-storage-blob-v2/swagger/src/main/java/StorageCustomization.java index 84cd8f78b321..7f64caa2a616 100644 --- a/sdk/storage/azure-storage-blob-v2/swagger/src/main/java/StorageCustomization.java +++ b/sdk/storage/azure-storage-blob-v2/swagger/src/main/java/StorageCustomization.java @@ -31,7 +31,7 @@ public class StorageCustomization extends Customization { public void customize(LibraryCustomization customization, Logger logger) { // Implementation models customizations - PackageCustomization implementationModels = customization.getPackage("com.azure.storage.blob.models"); + PackageCustomization implementationModels = customization.getPackage("com.azure.v2.storage.blob.models"); //QueryFormat customizeQueryFormat(implementationModels.getClass("QueryFormat")); 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 77ce3eab3a72..026fb0f15bc1 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 @@ -23,7 +23,11 @@ import com.azure.core.util.polling.LongRunningOperationStatus; import com.azure.core.util.polling.PollResponse; import com.azure.core.util.polling.PollerFlux; -import com.azure.storage.blob.*; +import com.azure.storage.blob.BlobClientBuilder; +import com.azure.storage.blob.BlobContainerAsyncClient; +import com.azure.storage.blob.BlobContainerClientBuilder; +import com.azure.storage.blob.BlobServiceAsyncClient; +import com.azure.storage.blob.BlobServiceVersion; import com.azure.storage.blob.implementation.AzureBlobStorageImpl; import com.azure.storage.blob.implementation.AzureBlobStorageImplBuilder; import com.azure.storage.blob.implementation.accesshelpers.BlobDownloadAsyncResponseConstructorProxy; 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 633cafdb6a2d..051fa74765db 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 @@ -21,7 +21,11 @@ import com.azure.core.util.polling.PollResponse; import com.azure.core.util.polling.PollingContext; import com.azure.core.util.polling.SyncPoller; -import com.azure.storage.blob.*; +import com.azure.storage.blob.BlobClientBuilder; +import com.azure.storage.blob.BlobContainerClient; +import com.azure.storage.blob.BlobContainerClientBuilder; +import com.azure.storage.blob.BlobServiceClient; +import com.azure.storage.blob.BlobServiceVersion; import com.azure.storage.blob.implementation.AzureBlobStorageImpl; import com.azure.storage.blob.implementation.AzureBlobStorageImplBuilder; import com.azure.storage.blob.implementation.accesshelpers.BlobPropertiesConstructorProxy; From 90fc5ca917c068febf6caa425d5aa038d0ae6da9 Mon Sep 17 00:00:00 2001 From: Srikanta Date: Wed, 5 Feb 2025 12:15:41 -0800 Subject: [PATCH 03/26] fix imports --- .../main/java/com/azure/v2/storage/blob/AppendBlobClient.java | 1 - 1 file changed, 1 deletion(-) diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/AppendBlobClient.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/AppendBlobClient.java index 0ab6d6e84e32..d71c77266fc3 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/AppendBlobClient.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/AppendBlobClient.java @@ -10,7 +10,6 @@ import com.azure.core.v2.annotation.ServiceMethod; import com.azure.core.v2.http.rest.ResponseBase; import com.azure.v2.storage.blob.implementation.AppendBlobsImpl; -import com.azure.storage.blob.models.*; import com.azure.v2.storage.blob.models.AppendBlobsAppendBlockFromUrlHeaders; import com.azure.v2.storage.blob.models.AppendBlobsAppendBlockHeaders; import com.azure.v2.storage.blob.models.AppendBlobsCreateHeaders; From 4be401360ebc8c0a0bcedcaf3de46bca2f392b8d Mon Sep 17 00:00:00 2001 From: vcolin7 Date: Tue, 11 Feb 2025 16:09:25 -0800 Subject: [PATCH 04/26] Fixed compilation errors. --- .../azure-storage-blob-v2/CHANGELOG.md | 11 ++++++ sdk/storage/azure-storage-blob-v2/README.md | 15 ++++++++ sdk/storage/azure-storage-blob-v2/pom.xml | 2 +- .../v2/storage/blob/AppendBlobClient.java | 10 ++--- .../storage/blob/AzureBlobStorageBuilder.java | 37 +++++++++++-------- .../com/azure/v2/storage/blob/BlobClient.java | 10 ++--- .../v2/storage/blob/BlockBlobClient.java | 10 ++--- .../v2/storage/blob/ContainerClient.java | 10 ++--- .../azure/v2/storage/blob/PageBlobClient.java | 10 ++--- .../v2/storage/blob/StorageServiceClient.java | 12 +++--- .../blob/implementation/AppendBlobsImpl.java | 11 +++--- .../blob/implementation/BlobsImpl.java | 13 ++++--- .../blob/implementation/BlockBlobsImpl.java | 11 +++--- .../blob/implementation/ContainersImpl.java | 9 +++-- .../blob/implementation/PageBlobsImpl.java | 11 +++--- .../blob/implementation/ServicesImpl.java | 13 ++++--- .../models/BlobSignedIdentifierWrapper.java | 8 ++-- .../v2/storage/blob/models/AccessTier.java | 1 + .../AppendBlobsAppendBlockFromUrlHeaders.java | 6 +-- .../models/AppendBlobsAppendBlockHeaders.java | 6 +-- .../blob/models/AppendBlobsCreateHeaders.java | 6 +-- .../blob/models/AppendBlobsSealHeaders.java | 4 +- .../v2/storage/blob/models/ArchiveStatus.java | 1 + .../blob/models/ArrowConfiguration.java | 9 +++-- .../v2/storage/blob/models/ArrowField.java | 5 ++- .../storage/blob/models/BlobAccessPolicy.java | 9 +++-- .../blob/models/BlobAnalyticsLogging.java | 5 ++- .../models/BlobContainerEncryptionScope.java | 2 +- .../blob/models/BlobContainerItem.java | 9 +++-- .../models/BlobContainerItemProperties.java | 11 +++--- .../blob/models/BlobContainersSegment.java | 9 +++-- .../blob/models/BlobCopySourceTagsMode.java | 1 + .../v2/storage/blob/models/BlobCorsRule.java | 5 ++- .../storage/blob/models/BlobDeleteType.java | 1 + .../v2/storage/blob/models/BlobErrorCode.java | 1 + .../blob/models/BlobExpiryOptions.java | 1 + .../blob/models/BlobFlatListSegment.java | 9 +++-- .../blob/models/BlobHierarchyListSegment.java | 9 +++-- .../storage/blob/models/BlobHttpHeaders.java | 4 +- .../storage/blob/models/BlobItemInternal.java | 9 +++-- .../models/BlobItemPropertiesInternal.java | 11 +++--- .../v2/storage/blob/models/BlobMetrics.java | 5 ++- .../v2/storage/blob/models/BlobName.java | 5 ++- .../blob/models/BlobPrefixInternal.java | 5 ++- .../blob/models/BlobRetentionPolicy.java | 5 ++- .../blob/models/BlobServiceProperties.java | 9 +++-- .../blob/models/BlobServiceStatistics.java | 5 ++- .../blob/models/BlobSignedIdentifier.java | 5 ++- .../azure/v2/storage/blob/models/BlobTag.java | 5 ++- .../v2/storage/blob/models/BlobTags.java | 9 +++-- .../models/BlobsAbortCopyFromURLHeaders.java | 4 +- .../blob/models/BlobsAcquireLeaseHeaders.java | 4 +- .../blob/models/BlobsBreakLeaseHeaders.java | 4 +- .../blob/models/BlobsChangeLeaseHeaders.java | 4 +- .../blob/models/BlobsCopyFromURLHeaders.java | 6 +-- .../models/BlobsCreateSnapshotHeaders.java | 4 +- .../blob/models/BlobsDeleteHeaders.java | 4 +- .../BlobsDeleteImmutabilityPolicyHeaders.java | 4 +- .../blob/models/BlobsDownloadHeaders.java | 6 +-- .../models/BlobsGetAccountInfoHeaders.java | 4 +- .../models/BlobsGetPropertiesHeaders.java | 6 +-- .../blob/models/BlobsGetTagsHeaders.java | 4 +- .../blob/models/BlobsQueryHeaders.java | 6 +-- .../blob/models/BlobsReleaseLeaseHeaders.java | 4 +- .../blob/models/BlobsRenewLeaseHeaders.java | 4 +- .../blob/models/BlobsSetExpiryHeaders.java | 4 +- .../models/BlobsSetHttpHeadersHeaders.java | 4 +- .../BlobsSetImmutabilityPolicyHeaders.java | 4 +- .../blob/models/BlobsSetLegalHoldHeaders.java | 4 +- .../blob/models/BlobsSetMetadataHeaders.java | 4 +- .../blob/models/BlobsSetTagsHeaders.java | 4 +- .../blob/models/BlobsSetTierHeaders.java | 2 +- .../models/BlobsStartCopyFromURLHeaders.java | 4 +- .../blob/models/BlobsUndeleteHeaders.java | 4 +- .../azure/v2/storage/blob/models/Block.java | 5 ++- .../BlockBlobsCommitBlockListHeaders.java | 6 +-- .../models/BlockBlobsGetBlockListHeaders.java | 4 +- .../BlockBlobsPutBlobFromUrlHeaders.java | 6 +-- .../BlockBlobsStageBlockFromURLHeaders.java | 6 +-- .../models/BlockBlobsStageBlockHeaders.java | 6 +-- .../blob/models/BlockBlobsUploadHeaders.java | 6 +-- .../v2/storage/blob/models/BlockList.java | 9 +++-- .../storage/blob/models/BlockLookupList.java | 9 +++-- .../v2/storage/blob/models/ClearRange.java | 5 ++- .../models/ContainersAcquireLeaseHeaders.java | 4 +- .../models/ContainersBreakLeaseHeaders.java | 4 +- .../models/ContainersChangeLeaseHeaders.java | 4 +- .../blob/models/ContainersCreateHeaders.java | 4 +- .../blob/models/ContainersDeleteHeaders.java | 4 +- .../models/ContainersFilterBlobsHeaders.java | 4 +- .../ContainersGetAccessPolicyHeaders.java | 4 +- .../ContainersGetAccountInfoHeaders.java | 4 +- .../ContainersGetPropertiesHeaders.java | 4 +- .../ContainersListBlobFlatSegmentHeaders.java | 4 +- ...ainersListBlobHierarchySegmentHeaders.java | 4 +- .../models/ContainersReleaseLeaseHeaders.java | 4 +- .../blob/models/ContainersRenameHeaders.java | 4 +- .../models/ContainersRenewLeaseHeaders.java | 4 +- .../blob/models/ContainersRestoreHeaders.java | 4 +- .../ContainersSetAccessPolicyHeaders.java | 4 +- .../models/ContainersSetMetadataHeaders.java | 4 +- .../models/ContainersSubmitBatchHeaders.java | 2 +- .../azure/v2/storage/blob/models/CpkInfo.java | 2 +- .../models/DelimitedTextConfiguration.java | 5 ++- .../storage/blob/models/EncryptionScope.java | 2 +- .../storage/blob/models/FilterBlobItem.java | 5 ++- .../blob/models/FilterBlobSegment.java | 9 +++-- .../storage/blob/models/GeoReplication.java | 11 +++--- .../blob/models/GeoReplicationStatus.java | 1 + .../blob/models/JsonTextConfiguration.java | 5 ++- .../azure/v2/storage/blob/models/KeyInfo.java | 5 ++- .../models/ListBlobsFlatSegmentResponse.java | 5 ++- .../ListBlobsHierarchySegmentResponse.java | 5 ++- .../models/PageBlobsClearPagesHeaders.java | 6 +-- .../PageBlobsCopyIncrementalHeaders.java | 4 +- .../blob/models/PageBlobsCreateHeaders.java | 6 +-- .../PageBlobsGetPageRangesDiffHeaders.java | 4 +- .../models/PageBlobsGetPageRangesHeaders.java | 4 +- .../blob/models/PageBlobsResizeHeaders.java | 4 +- .../PageBlobsUpdateSequenceNumberHeaders.java | 4 +- .../PageBlobsUploadPagesFromURLHeaders.java | 6 +-- .../models/PageBlobsUploadPagesHeaders.java | 6 +-- .../v2/storage/blob/models/PageList.java | 4 +- .../v2/storage/blob/models/PageRange.java | 4 +- .../v2/storage/blob/models/QueryFormat.java | 4 +- .../v2/storage/blob/models/QueryRequest.java | 4 +- .../blob/models/QuerySerialization.java | 4 +- .../models/ServicesFilterBlobsHeaders.java | 4 +- .../models/ServicesGetAccountInfoHeaders.java | 4 +- .../models/ServicesGetPropertiesHeaders.java | 2 +- .../models/ServicesGetStatisticsHeaders.java | 4 +- .../ServicesGetUserDelegationKeyHeaders.java | 4 +- ...vicesListBlobContainersSegmentHeaders.java | 2 +- ...sListBlobContainersSegmentNextHeaders.java | 2 +- .../models/ServicesSetPropertiesHeaders.java | 2 +- .../models/ServicesSubmitBatchHeaders.java | 2 +- .../v2/storage/blob/models/StaticWebsite.java | 4 +- .../v2/storage/blob/models/StorageError.java | 4 +- .../blob/models/StorageErrorException.java | 5 ++- .../blob/models/UserDelegationKey.java | 4 +- 140 files changed, 432 insertions(+), 354 deletions(-) create mode 100644 sdk/storage/azure-storage-blob-v2/CHANGELOG.md create mode 100644 sdk/storage/azure-storage-blob-v2/README.md diff --git a/sdk/storage/azure-storage-blob-v2/CHANGELOG.md b/sdk/storage/azure-storage-blob-v2/CHANGELOG.md new file mode 100644 index 000000000000..13dd08af78ab --- /dev/null +++ b/sdk/storage/azure-storage-blob-v2/CHANGELOG.md @@ -0,0 +1,11 @@ +# Release History + +## 1.0.0-beta.1 (Unreleased) + +### Features Added + +### Breaking Changes + +### Bugs Fixed + +### Other Changes diff --git a/sdk/storage/azure-storage-blob-v2/README.md b/sdk/storage/azure-storage-blob-v2/README.md new file mode 100644 index 000000000000..b116284e07a8 --- /dev/null +++ b/sdk/storage/azure-storage-blob-v2/README.md @@ -0,0 +1,15 @@ +# Azure Storage Blob client library for Java + +## Getting started + +## Key concepts + +## Examples + +## Troubleshooting + +## Next steps + +## Next steps Samples + +## Contributing diff --git a/sdk/storage/azure-storage-blob-v2/pom.xml b/sdk/storage/azure-storage-blob-v2/pom.xml index 675c5574b64f..0bd42fdd2553 100644 --- a/sdk/storage/azure-storage-blob-v2/pom.xml +++ b/sdk/storage/azure-storage-blob-v2/pom.xml @@ -5,7 +5,7 @@ com.azure azure-client-sdk-parent-v2 - 1.7.0 + 1.0.0-beta.1 ../../parents/azure-client-sdk-parent-v2 diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/AppendBlobClient.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/AppendBlobClient.java index d71c77266fc3..c5a2c14db633 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/AppendBlobClient.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/AppendBlobClient.java @@ -4,11 +4,11 @@ package com.azure.v2.storage.blob; -import com.azure.core.v2.annotation.Generated; -import com.azure.core.v2.annotation.ReturnType; -import com.azure.core.v2.annotation.ServiceClient; -import com.azure.core.v2.annotation.ServiceMethod; -import com.azure.core.v2.http.rest.ResponseBase; +import com.azure.v2.core.annotation.Generated; +import com.azure.v2.core.annotation.ReturnType; +import com.azure.v2.core.annotation.ServiceClient; +import com.azure.v2.core.annotation.ServiceMethod; +import com.azure.v2.core.http.rest.ResponseBase; import com.azure.v2.storage.blob.implementation.AppendBlobsImpl; import com.azure.v2.storage.blob.models.AppendBlobsAppendBlockFromUrlHeaders; import com.azure.v2.storage.blob.models.AppendBlobsAppendBlockHeaders; diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/AzureBlobStorageBuilder.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/AzureBlobStorageBuilder.java index 81ca35e23ff0..115439933a75 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/AzureBlobStorageBuilder.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/AzureBlobStorageBuilder.java @@ -4,17 +4,17 @@ package com.azure.v2.storage.blob; -import com.azure.core.v2.annotation.Generated; -import com.azure.core.v2.annotation.ServiceClientBuilder; -import com.azure.core.v2.http.policy.AddDatePolicy; -import com.azure.core.v2.http.policy.AddHeadersFromContextPolicy; -import com.azure.core.v2.http.policy.RequestIdPolicy; +import com.azure.v2.core.annotation.Generated; +import com.azure.v2.core.annotation.ServiceClientBuilder; +import com.azure.v2.core.http.policy.AddDatePolicy; +import com.azure.v2.core.http.policy.AddHeadersFromContextPolicy; +import com.azure.v2.core.http.policy.RequestIdPolicy; import com.azure.v2.storage.blob.implementation.AzureBlobStorageImpl; import io.clientcore.core.http.client.HttpClient; -import io.clientcore.core.http.models.HttpLogOptions; +import io.clientcore.core.http.models.HttpInstrumentationOptions; import io.clientcore.core.http.models.HttpRedirectOptions; import io.clientcore.core.http.models.HttpRetryOptions; -import io.clientcore.core.http.pipeline.HttpLoggingPolicy; +import io.clientcore.core.http.pipeline.HttpInstrumentationPolicy; import io.clientcore.core.http.pipeline.HttpPipeline; import io.clientcore.core.http.pipeline.HttpPipelineBuilder; import io.clientcore.core.http.pipeline.HttpPipelinePolicy; @@ -22,6 +22,7 @@ import io.clientcore.core.models.traits.ConfigurationTrait; import io.clientcore.core.models.traits.HttpTrait; import io.clientcore.core.util.configuration.Configuration; + import java.util.ArrayList; import java.util.HashMap; import java.util.List; @@ -97,15 +98,15 @@ public AzureBlobStorageBuilder httpClient(HttpClient httpClient) { * The logging configuration for HTTP requests and responses. */ @Generated - private HttpLogOptions httpLogOptions; + private HttpInstrumentationOptions instrumentationOptions; /** * {@inheritDoc}. */ @Generated @Override - public AzureBlobStorageBuilder httpLogOptions(HttpLogOptions httpLogOptions) { - this.httpLogOptions = httpLogOptions; + public AzureBlobStorageBuilder httpInstrumentationOptions(HttpInstrumentationOptions instrumentationOptions) { + this.instrumentationOptions = instrumentationOptions; return this; } @@ -229,7 +230,8 @@ private void validateClient() { private HttpPipeline createHttpPipeline() { Configuration buildConfiguration = (configuration == null) ? Configuration.getGlobalConfiguration() : configuration; - HttpLogOptions localHttpLogOptions = this.httpLogOptions == null ? new HttpLogOptions() : this.httpLogOptions; + HttpInstrumentationOptions localHttpInstrumentationOptions = this.instrumentationOptions == null + ? new HttpInstrumentationOptions() : this.instrumentationOptions; List policies = new ArrayList<>(); String clientName = PROPERTIES.getOrDefault(SDK_NAME, "UnknownName"); String clientVersion = PROPERTIES.getOrDefault(SDK_VERSION, "UnknownVersion"); @@ -239,11 +241,14 @@ private HttpPipeline createHttpPipeline() { policies.add(retryOptions == null ? new HttpRetryPolicy() : new HttpRetryPolicy(retryOptions)); policies.add(new AddDatePolicy()); this.pipelinePolicies.stream().forEach(p -> policies.add(p)); - policies.add(new HttpLoggingPolicy(localHttpLogOptions)); - HttpPipeline httpPipeline = new HttpPipelineBuilder().policies(policies.toArray(new HttpPipelinePolicy[0])) - .httpClient(httpClient) - .build(); - return httpPipeline; + policies.add(new HttpInstrumentationPolicy(localHttpInstrumentationOptions)); + HttpPipelineBuilder httpPipelineBuilder = new HttpPipelineBuilder().httpClient(httpClient); + + for (HttpPipelinePolicy policy : policies) { + httpPipelineBuilder.addPolicy(policy); + } + + return httpPipelineBuilder.build(); } /** diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/BlobClient.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/BlobClient.java index 39c1dd6ddb8e..c4ec7af2cbb7 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/BlobClient.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/BlobClient.java @@ -4,11 +4,11 @@ package com.azure.v2.storage.blob; -import com.azure.core.v2.annotation.Generated; -import com.azure.core.v2.annotation.ReturnType; -import com.azure.core.v2.annotation.ServiceClient; -import com.azure.core.v2.annotation.ServiceMethod; -import com.azure.core.v2.http.rest.ResponseBase; +import com.azure.v2.core.annotation.Generated; +import com.azure.v2.core.annotation.ReturnType; +import com.azure.v2.core.annotation.ServiceClient; +import com.azure.v2.core.annotation.ServiceMethod; +import com.azure.v2.core.http.rest.ResponseBase; import com.azure.v2.storage.blob.implementation.BlobsImpl; import com.azure.v2.storage.blob.models.AccessTier; import com.azure.v2.storage.blob.models.BlobCopySourceTagsMode; diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/BlockBlobClient.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/BlockBlobClient.java index ca15e26bfc88..01792dc584a9 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/BlockBlobClient.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/BlockBlobClient.java @@ -4,11 +4,11 @@ package com.azure.v2.storage.blob; -import com.azure.core.v2.annotation.Generated; -import com.azure.core.v2.annotation.ReturnType; -import com.azure.core.v2.annotation.ServiceClient; -import com.azure.core.v2.annotation.ServiceMethod; -import com.azure.core.v2.http.rest.ResponseBase; +import com.azure.v2.core.annotation.Generated; +import com.azure.v2.core.annotation.ReturnType; +import com.azure.v2.core.annotation.ServiceClient; +import com.azure.v2.core.annotation.ServiceMethod; +import com.azure.v2.core.http.rest.ResponseBase; import com.azure.v2.storage.blob.implementation.BlockBlobsImpl; import com.azure.v2.storage.blob.models.AccessTier; import com.azure.v2.storage.blob.models.BlobCopySourceTagsMode; diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/ContainerClient.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/ContainerClient.java index 1621b3a9f2ea..4b11e8171ee4 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/ContainerClient.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/ContainerClient.java @@ -4,11 +4,11 @@ package com.azure.v2.storage.blob; -import com.azure.core.v2.annotation.Generated; -import com.azure.core.v2.annotation.ReturnType; -import com.azure.core.v2.annotation.ServiceClient; -import com.azure.core.v2.annotation.ServiceMethod; -import com.azure.core.v2.http.rest.ResponseBase; +import com.azure.v2.core.annotation.Generated; +import com.azure.v2.core.annotation.ReturnType; +import com.azure.v2.core.annotation.ServiceClient; +import com.azure.v2.core.annotation.ServiceMethod; +import com.azure.v2.core.http.rest.ResponseBase; import com.azure.v2.storage.blob.implementation.ContainersImpl; import com.azure.v2.storage.blob.implementation.models.BlobSignedIdentifierWrapper; import com.azure.v2.storage.blob.models.BlobContainerEncryptionScope; diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/PageBlobClient.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/PageBlobClient.java index b1e8064d3438..c6513ad23284 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/PageBlobClient.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/PageBlobClient.java @@ -4,11 +4,11 @@ package com.azure.v2.storage.blob; -import com.azure.core.v2.annotation.Generated; -import com.azure.core.v2.annotation.ReturnType; -import com.azure.core.v2.annotation.ServiceClient; -import com.azure.core.v2.annotation.ServiceMethod; -import com.azure.core.v2.http.rest.ResponseBase; +import com.azure.v2.core.annotation.Generated; +import com.azure.v2.core.annotation.ReturnType; +import com.azure.v2.core.annotation.ServiceClient; +import com.azure.v2.core.annotation.ServiceMethod; +import com.azure.v2.core.http.rest.ResponseBase; import com.azure.v2.storage.blob.implementation.PageBlobsImpl; import com.azure.v2.storage.blob.models.BlobHttpHeaders; import com.azure.v2.storage.blob.models.BlobImmutabilityPolicyMode; diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/StorageServiceClient.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/StorageServiceClient.java index eb226790ea93..26cac3e8b5f5 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/StorageServiceClient.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/StorageServiceClient.java @@ -4,12 +4,12 @@ package com.azure.v2.storage.blob; -import com.azure.core.v2.annotation.Generated; -import com.azure.core.v2.annotation.ReturnType; -import com.azure.core.v2.annotation.ServiceClient; -import com.azure.core.v2.annotation.ServiceMethod; -import com.azure.core.v2.http.rest.PagedIterable; -import com.azure.core.v2.http.rest.ResponseBase; +import com.azure.v2.core.annotation.Generated; +import com.azure.v2.core.annotation.ReturnType; +import com.azure.v2.core.annotation.ServiceClient; +import com.azure.v2.core.annotation.ServiceMethod; +import com.azure.v2.core.http.rest.PagedIterable; +import com.azure.v2.core.http.rest.ResponseBase; import com.azure.v2.storage.blob.implementation.ServicesImpl; import com.azure.v2.storage.blob.models.BlobContainerItem; import com.azure.v2.storage.blob.models.BlobServiceProperties; diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/implementation/AppendBlobsImpl.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/implementation/AppendBlobsImpl.java index 2b1de492ca5d..1bbd54699c97 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/implementation/AppendBlobsImpl.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/implementation/AppendBlobsImpl.java @@ -4,11 +4,9 @@ package com.azure.v2.storage.blob.implementation; -import com.azure.core.v2.annotation.ReturnType; -import com.azure.core.v2.annotation.ServiceMethod; -import com.azure.core.v2.http.rest.ResponseBase; -import io.clientcore.core.util.Base64Util; -import io.clientcore.core.http.models.DateTimeRfc1123; +import com.azure.v2.core.annotation.ReturnType; +import com.azure.v2.core.annotation.ServiceMethod; +import com.azure.v2.core.http.rest.ResponseBase; import com.azure.v2.storage.blob.models.AppendBlobsAppendBlockFromUrlHeaders; import com.azure.v2.storage.blob.models.AppendBlobsAppendBlockHeaders; import com.azure.v2.storage.blob.models.AppendBlobsCreateHeaders; @@ -30,8 +28,11 @@ import io.clientcore.core.http.annotation.UnexpectedResponseExceptionDetail; import io.clientcore.core.http.models.HttpMethod; import io.clientcore.core.http.models.Response; +import io.clientcore.core.util.Base64Util; import io.clientcore.core.util.Context; +import io.clientcore.core.util.DateTimeRfc1123; import io.clientcore.core.util.binarydata.BinaryData; + import java.time.OffsetDateTime; import java.util.Map; diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/implementation/BlobsImpl.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/implementation/BlobsImpl.java index e2a2f3f0c114..6c40669a342c 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/implementation/BlobsImpl.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/implementation/BlobsImpl.java @@ -4,17 +4,16 @@ package com.azure.v2.storage.blob.implementation; -import com.azure.core.v2.annotation.ReturnType; -import com.azure.core.v2.annotation.ServiceMethod; -import com.azure.core.v2.http.rest.ResponseBase; -import io.clientcore.core.util.Base64Util; -import io.clientcore.core.http.models.DateTimeRfc1123; +import com.azure.v2.core.annotation.ReturnType; +import com.azure.v2.core.annotation.ServiceMethod; +import com.azure.v2.core.http.rest.ResponseBase; import com.azure.v2.storage.blob.models.AccessTier; import com.azure.v2.storage.blob.models.BlobCopySourceTagsMode; import com.azure.v2.storage.blob.models.BlobDeleteType; import com.azure.v2.storage.blob.models.BlobExpiryOptions; import com.azure.v2.storage.blob.models.BlobHttpHeaders; import com.azure.v2.storage.blob.models.BlobImmutabilityPolicyMode; +import com.azure.v2.storage.blob.models.BlobTags; import com.azure.v2.storage.blob.models.BlobsAbortCopyFromURLHeaders; import com.azure.v2.storage.blob.models.BlobsAcquireLeaseHeaders; import com.azure.v2.storage.blob.models.BlobsBreakLeaseHeaders; @@ -39,7 +38,6 @@ import com.azure.v2.storage.blob.models.BlobsSetTierHeaders; import com.azure.v2.storage.blob.models.BlobsStartCopyFromURLHeaders; import com.azure.v2.storage.blob.models.BlobsUndeleteHeaders; -import com.azure.v2.storage.blob.models.BlobTags; import com.azure.v2.storage.blob.models.CpkInfo; import com.azure.v2.storage.blob.models.DeleteSnapshotsOptionType; import com.azure.v2.storage.blob.models.EncryptionAlgorithmType; @@ -58,7 +56,10 @@ import io.clientcore.core.http.annotation.UnexpectedResponseExceptionDetail; import io.clientcore.core.http.models.HttpMethod; import io.clientcore.core.http.models.Response; +import io.clientcore.core.util.Base64Util; import io.clientcore.core.util.Context; +import io.clientcore.core.util.DateTimeRfc1123; + import java.io.InputStream; import java.time.OffsetDateTime; import java.util.Map; diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/implementation/BlockBlobsImpl.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/implementation/BlockBlobsImpl.java index b32abf82cd69..c3492a80955b 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/implementation/BlockBlobsImpl.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/implementation/BlockBlobsImpl.java @@ -4,11 +4,9 @@ package com.azure.v2.storage.blob.implementation; -import com.azure.core.v2.annotation.ReturnType; -import com.azure.core.v2.annotation.ServiceMethod; -import com.azure.core.v2.http.rest.ResponseBase; -import io.clientcore.core.util.Base64Util; -import io.clientcore.core.http.models.DateTimeRfc1123; +import com.azure.v2.core.annotation.ReturnType; +import com.azure.v2.core.annotation.ServiceMethod; +import com.azure.v2.core.http.rest.ResponseBase; import com.azure.v2.storage.blob.models.AccessTier; import com.azure.v2.storage.blob.models.BlobCopySourceTagsMode; import com.azure.v2.storage.blob.models.BlobHttpHeaders; @@ -37,8 +35,11 @@ import io.clientcore.core.http.annotation.UnexpectedResponseExceptionDetail; import io.clientcore.core.http.models.HttpMethod; import io.clientcore.core.http.models.Response; +import io.clientcore.core.util.Base64Util; import io.clientcore.core.util.Context; +import io.clientcore.core.util.DateTimeRfc1123; import io.clientcore.core.util.binarydata.BinaryData; + import java.time.OffsetDateTime; import java.util.Map; diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/implementation/ContainersImpl.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/implementation/ContainersImpl.java index 582079fb2ba8..d83bedde041f 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/implementation/ContainersImpl.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/implementation/ContainersImpl.java @@ -4,10 +4,9 @@ package com.azure.v2.storage.blob.implementation; -import com.azure.core.v2.annotation.ReturnType; -import com.azure.core.v2.annotation.ServiceMethod; -import com.azure.core.v2.http.rest.ResponseBase; -import io.clientcore.core.http.models.DateTimeRfc1123; +import com.azure.v2.core.annotation.ReturnType; +import com.azure.v2.core.annotation.ServiceMethod; +import com.azure.v2.core.http.rest.ResponseBase; import com.azure.v2.storage.blob.implementation.models.BlobSignedIdentifierWrapper; import com.azure.v2.storage.blob.models.BlobContainerEncryptionScope; import com.azure.v2.storage.blob.models.BlobSignedIdentifier; @@ -48,7 +47,9 @@ import io.clientcore.core.http.models.HttpMethod; import io.clientcore.core.http.models.Response; import io.clientcore.core.util.Context; +import io.clientcore.core.util.DateTimeRfc1123; import io.clientcore.core.util.binarydata.BinaryData; + import java.io.InputStream; import java.time.OffsetDateTime; import java.util.List; diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/implementation/PageBlobsImpl.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/implementation/PageBlobsImpl.java index afc512b9c407..d2664faca374 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/implementation/PageBlobsImpl.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/implementation/PageBlobsImpl.java @@ -4,11 +4,9 @@ package com.azure.v2.storage.blob.implementation; -import com.azure.core.v2.annotation.ReturnType; -import com.azure.core.v2.annotation.ServiceMethod; -import com.azure.core.v2.http.rest.ResponseBase; -import io.clientcore.core.util.Base64Util; -import io.clientcore.core.http.models.DateTimeRfc1123; +import com.azure.v2.core.annotation.ReturnType; +import com.azure.v2.core.annotation.ServiceMethod; +import com.azure.v2.core.http.rest.ResponseBase; import com.azure.v2.storage.blob.models.BlobHttpHeaders; import com.azure.v2.storage.blob.models.BlobImmutabilityPolicyMode; import com.azure.v2.storage.blob.models.CpkInfo; @@ -38,8 +36,11 @@ import io.clientcore.core.http.annotation.UnexpectedResponseExceptionDetail; import io.clientcore.core.http.models.HttpMethod; import io.clientcore.core.http.models.Response; +import io.clientcore.core.util.Base64Util; import io.clientcore.core.util.Context; +import io.clientcore.core.util.DateTimeRfc1123; import io.clientcore.core.util.binarydata.BinaryData; + import java.time.OffsetDateTime; import java.util.Map; diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/implementation/ServicesImpl.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/implementation/ServicesImpl.java index f66be756c08a..40cc3fc6b488 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/implementation/ServicesImpl.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/implementation/ServicesImpl.java @@ -4,12 +4,12 @@ package com.azure.v2.storage.blob.implementation; -import com.azure.core.v2.annotation.ReturnType; -import com.azure.core.v2.annotation.ServiceMethod; -import com.azure.core.v2.http.rest.PagedIterable; -import com.azure.core.v2.http.rest.PagedResponse; -import com.azure.core.v2.http.rest.PagedResponseBase; -import com.azure.core.v2.http.rest.ResponseBase; +import com.azure.v2.core.annotation.ReturnType; +import com.azure.v2.core.annotation.ServiceMethod; +import com.azure.v2.core.http.rest.PagedIterable; +import com.azure.v2.core.http.rest.PagedResponse; +import com.azure.v2.core.http.rest.PagedResponseBase; +import com.azure.v2.core.http.rest.ResponseBase; import com.azure.v2.storage.blob.models.BlobContainerItem; import com.azure.v2.storage.blob.models.BlobContainersSegment; import com.azure.v2.storage.blob.models.BlobServiceProperties; @@ -42,6 +42,7 @@ import io.clientcore.core.http.models.Response; import io.clientcore.core.util.Context; import io.clientcore.core.util.binarydata.BinaryData; + import java.io.InputStream; import java.util.List; import java.util.Objects; diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/implementation/models/BlobSignedIdentifierWrapper.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/implementation/models/BlobSignedIdentifierWrapper.java index cf4184046bbc..1ca7db2b66a8 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/implementation/models/BlobSignedIdentifierWrapper.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/implementation/models/BlobSignedIdentifierWrapper.java @@ -4,17 +4,17 @@ package com.azure.v2.storage.blob.implementation.models; +import com.azure.v2.core.util.CoreUtils; import com.azure.v2.storage.blob.models.BlobSignedIdentifier; -import java.util.List; - -import com.azure.core.v2.util.CoreUtils; import io.clientcore.core.serialization.xml.XmlReader; import io.clientcore.core.serialization.xml.XmlSerializable; import io.clientcore.core.serialization.xml.XmlToken; import io.clientcore.core.serialization.xml.XmlWriter; -import java.util.ArrayList; + import javax.xml.namespace.QName; import javax.xml.stream.XMLStreamException; +import java.util.ArrayList; +import java.util.List; /** * A wrapper around List<BlobSignedIdentifier> which provides top-level metadata for serialization. diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/AccessTier.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/AccessTier.java index 9bf123a07aba..ce7af26dd27e 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/AccessTier.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/AccessTier.java @@ -5,6 +5,7 @@ package com.azure.v2.storage.blob.models; import io.clientcore.core.util.ExpandableEnum; + import java.util.Map; import java.util.concurrent.ConcurrentHashMap; diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/AppendBlobsAppendBlockFromUrlHeaders.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/AppendBlobsAppendBlockFromUrlHeaders.java index d62ce9f334f8..264b4fdc4139 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/AppendBlobsAppendBlockFromUrlHeaders.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/AppendBlobsAppendBlockFromUrlHeaders.java @@ -4,11 +4,11 @@ package com.azure.v2.storage.blob.models; -import com.azure.core.v2.annotation.Fluent; -import com.azure.core.v2.util.CoreUtils; -import io.clientcore.core.http.models.DateTimeRfc1123; +import com.azure.v2.core.annotation.Fluent; +import com.azure.v2.core.util.CoreUtils; import io.clientcore.core.http.models.HttpHeaderName; import io.clientcore.core.http.models.HttpHeaders; +import io.clientcore.core.util.DateTimeRfc1123; import java.time.OffsetDateTime; import java.util.Base64; diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/AppendBlobsAppendBlockHeaders.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/AppendBlobsAppendBlockHeaders.java index 8f2b78e386d5..38540813e670 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/AppendBlobsAppendBlockHeaders.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/AppendBlobsAppendBlockHeaders.java @@ -4,11 +4,11 @@ package com.azure.v2.storage.blob.models; -import com.azure.core.v2.annotation.Fluent; -import com.azure.core.v2.util.CoreUtils; -import io.clientcore.core.http.models.DateTimeRfc1123; +import com.azure.v2.core.annotation.Fluent; +import com.azure.v2.core.util.CoreUtils; import io.clientcore.core.http.models.HttpHeaderName; import io.clientcore.core.http.models.HttpHeaders; +import io.clientcore.core.util.DateTimeRfc1123; import java.time.OffsetDateTime; import java.util.Base64; diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/AppendBlobsCreateHeaders.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/AppendBlobsCreateHeaders.java index bfac5288436e..e3012cd9e18d 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/AppendBlobsCreateHeaders.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/AppendBlobsCreateHeaders.java @@ -4,11 +4,11 @@ package com.azure.v2.storage.blob.models; -import com.azure.core.v2.annotation.Fluent; -import com.azure.core.v2.util.CoreUtils; -import io.clientcore.core.http.models.DateTimeRfc1123; +import com.azure.v2.core.annotation.Fluent; +import com.azure.v2.core.util.CoreUtils; import io.clientcore.core.http.models.HttpHeaderName; import io.clientcore.core.http.models.HttpHeaders; +import io.clientcore.core.util.DateTimeRfc1123; import java.time.OffsetDateTime; import java.util.Base64; diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/AppendBlobsSealHeaders.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/AppendBlobsSealHeaders.java index 7ec4bec671e5..b52db5294ccb 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/AppendBlobsSealHeaders.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/AppendBlobsSealHeaders.java @@ -4,10 +4,10 @@ package com.azure.v2.storage.blob.models; -import com.azure.core.v2.annotation.Fluent; -import io.clientcore.core.http.models.DateTimeRfc1123; +import com.azure.v2.core.annotation.Fluent; import io.clientcore.core.http.models.HttpHeaderName; import io.clientcore.core.http.models.HttpHeaders; +import io.clientcore.core.util.DateTimeRfc1123; import java.time.OffsetDateTime; diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ArchiveStatus.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ArchiveStatus.java index cb4ec1fb5922..7638d05edc05 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ArchiveStatus.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ArchiveStatus.java @@ -5,6 +5,7 @@ package com.azure.v2.storage.blob.models; import io.clientcore.core.util.ExpandableEnum; + import java.util.Map; import java.util.concurrent.ConcurrentHashMap; diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ArrowConfiguration.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ArrowConfiguration.java index 9ef90c9a5bc1..c7ae5003990b 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ArrowConfiguration.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ArrowConfiguration.java @@ -4,16 +4,17 @@ package com.azure.v2.storage.blob.models; -import com.azure.core.v2.annotation.Fluent; -import com.azure.core.v2.util.CoreUtils; +import com.azure.v2.core.annotation.Fluent; +import com.azure.v2.core.util.CoreUtils; import io.clientcore.core.serialization.xml.XmlReader; import io.clientcore.core.serialization.xml.XmlSerializable; import io.clientcore.core.serialization.xml.XmlToken; import io.clientcore.core.serialization.xml.XmlWriter; -import java.util.ArrayList; -import java.util.List; + import javax.xml.namespace.QName; import javax.xml.stream.XMLStreamException; +import java.util.ArrayList; +import java.util.List; /** * Groups the settings used for formatting the response if the response should be Arrow formatted. diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ArrowField.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ArrowField.java index 42e4b51a55c3..607ebd12ece2 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ArrowField.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ArrowField.java @@ -4,12 +4,13 @@ package com.azure.v2.storage.blob.models; -import com.azure.core.v2.annotation.Fluent; -import com.azure.core.v2.util.CoreUtils; +import com.azure.v2.core.annotation.Fluent; +import com.azure.v2.core.util.CoreUtils; import io.clientcore.core.serialization.xml.XmlReader; import io.clientcore.core.serialization.xml.XmlSerializable; import io.clientcore.core.serialization.xml.XmlToken; import io.clientcore.core.serialization.xml.XmlWriter; + import javax.xml.namespace.QName; import javax.xml.stream.XMLStreamException; diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobAccessPolicy.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobAccessPolicy.java index f3f69af6b8f2..c5bfb8326cbe 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobAccessPolicy.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobAccessPolicy.java @@ -4,16 +4,17 @@ package com.azure.v2.storage.blob.models; -import com.azure.core.v2.annotation.Fluent; -import com.azure.core.v2.util.CoreUtils; +import com.azure.v2.core.annotation.Fluent; +import com.azure.v2.core.util.CoreUtils; import io.clientcore.core.serialization.xml.XmlReader; import io.clientcore.core.serialization.xml.XmlSerializable; import io.clientcore.core.serialization.xml.XmlToken; import io.clientcore.core.serialization.xml.XmlWriter; -import java.time.OffsetDateTime; -import java.time.format.DateTimeFormatter; + import javax.xml.namespace.QName; import javax.xml.stream.XMLStreamException; +import java.time.OffsetDateTime; +import java.time.format.DateTimeFormatter; /** * An Access policy. diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobAnalyticsLogging.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobAnalyticsLogging.java index 60fa0bc3e9f7..a23b8d373c5e 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobAnalyticsLogging.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobAnalyticsLogging.java @@ -4,12 +4,13 @@ package com.azure.v2.storage.blob.models; -import com.azure.core.v2.annotation.Fluent; -import com.azure.core.v2.util.CoreUtils; +import com.azure.v2.core.annotation.Fluent; +import com.azure.v2.core.util.CoreUtils; import io.clientcore.core.serialization.xml.XmlReader; import io.clientcore.core.serialization.xml.XmlSerializable; import io.clientcore.core.serialization.xml.XmlToken; import io.clientcore.core.serialization.xml.XmlWriter; + import javax.xml.namespace.QName; import javax.xml.stream.XMLStreamException; diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobContainerEncryptionScope.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobContainerEncryptionScope.java index 26121863c89c..a1105ea610a7 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobContainerEncryptionScope.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobContainerEncryptionScope.java @@ -4,7 +4,7 @@ package com.azure.v2.storage.blob.models; -import com.azure.core.v2.annotation.Fluent; +import com.azure.v2.core.annotation.Fluent; /** * Parameter group. diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobContainerItem.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobContainerItem.java index 50263a6e3a5d..5357d909e531 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobContainerItem.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobContainerItem.java @@ -4,16 +4,17 @@ package com.azure.v2.storage.blob.models; -import com.azure.core.v2.annotation.Fluent; -import com.azure.core.v2.util.CoreUtils; +import com.azure.v2.core.annotation.Fluent; +import com.azure.v2.core.util.CoreUtils; import io.clientcore.core.serialization.xml.XmlReader; import io.clientcore.core.serialization.xml.XmlSerializable; import io.clientcore.core.serialization.xml.XmlToken; import io.clientcore.core.serialization.xml.XmlWriter; -import java.util.LinkedHashMap; -import java.util.Map; + import javax.xml.namespace.QName; import javax.xml.stream.XMLStreamException; +import java.util.LinkedHashMap; +import java.util.Map; /** * An Azure Storage container. diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobContainerItemProperties.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobContainerItemProperties.java index 63df4af33ac4..2ec5b7031794 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobContainerItemProperties.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobContainerItemProperties.java @@ -4,17 +4,18 @@ package com.azure.v2.storage.blob.models; -import com.azure.core.v2.annotation.Fluent; -import com.azure.core.v2.util.CoreUtils; -import io.clientcore.core.http.models.DateTimeRfc1123; +import com.azure.v2.core.annotation.Fluent; +import com.azure.v2.core.util.CoreUtils; import io.clientcore.core.serialization.xml.XmlReader; import io.clientcore.core.serialization.xml.XmlSerializable; import io.clientcore.core.serialization.xml.XmlToken; import io.clientcore.core.serialization.xml.XmlWriter; -import java.time.OffsetDateTime; -import java.util.Objects; +import io.clientcore.core.util.DateTimeRfc1123; + import javax.xml.namespace.QName; import javax.xml.stream.XMLStreamException; +import java.time.OffsetDateTime; +import java.util.Objects; /** * Properties of a container. diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobContainersSegment.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobContainersSegment.java index 752f6fd74b39..32b4b5922530 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobContainersSegment.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobContainersSegment.java @@ -4,16 +4,17 @@ package com.azure.v2.storage.blob.models; -import com.azure.core.v2.annotation.Fluent; -import com.azure.core.v2.util.CoreUtils; +import com.azure.v2.core.annotation.Fluent; +import com.azure.v2.core.util.CoreUtils; import io.clientcore.core.serialization.xml.XmlReader; import io.clientcore.core.serialization.xml.XmlSerializable; import io.clientcore.core.serialization.xml.XmlToken; import io.clientcore.core.serialization.xml.XmlWriter; -import java.util.ArrayList; -import java.util.List; + import javax.xml.namespace.QName; import javax.xml.stream.XMLStreamException; +import java.util.ArrayList; +import java.util.List; /** * An enumeration of containers. diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobCopySourceTagsMode.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobCopySourceTagsMode.java index 956adffe12f8..2e8bc8921fa0 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobCopySourceTagsMode.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobCopySourceTagsMode.java @@ -5,6 +5,7 @@ package com.azure.v2.storage.blob.models; import io.clientcore.core.util.ExpandableEnum; + import java.util.Map; import java.util.concurrent.ConcurrentHashMap; diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobCorsRule.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobCorsRule.java index e75ae49990ce..fb7d19040b7d 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobCorsRule.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobCorsRule.java @@ -4,12 +4,13 @@ package com.azure.v2.storage.blob.models; -import com.azure.core.v2.annotation.Fluent; -import com.azure.core.v2.util.CoreUtils; +import com.azure.v2.core.annotation.Fluent; +import com.azure.v2.core.util.CoreUtils; import io.clientcore.core.serialization.xml.XmlReader; import io.clientcore.core.serialization.xml.XmlSerializable; import io.clientcore.core.serialization.xml.XmlToken; import io.clientcore.core.serialization.xml.XmlWriter; + import javax.xml.namespace.QName; import javax.xml.stream.XMLStreamException; diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobDeleteType.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobDeleteType.java index 8b013eadf1f3..1f9f84a5f7c0 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobDeleteType.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobDeleteType.java @@ -5,6 +5,7 @@ package com.azure.v2.storage.blob.models; import io.clientcore.core.util.ExpandableEnum; + import java.util.Map; import java.util.concurrent.ConcurrentHashMap; diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobErrorCode.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobErrorCode.java index 78ff93c818bd..46e2c9053aeb 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobErrorCode.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobErrorCode.java @@ -5,6 +5,7 @@ package com.azure.v2.storage.blob.models; import io.clientcore.core.util.ExpandableEnum; + import java.util.Map; import java.util.concurrent.ConcurrentHashMap; diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobExpiryOptions.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobExpiryOptions.java index c03e82694612..e978388538a9 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobExpiryOptions.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobExpiryOptions.java @@ -5,6 +5,7 @@ package com.azure.v2.storage.blob.models; import io.clientcore.core.util.ExpandableEnum; + import java.util.Map; import java.util.concurrent.ConcurrentHashMap; diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobFlatListSegment.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobFlatListSegment.java index aefe881164a9..cc4a0221f433 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobFlatListSegment.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobFlatListSegment.java @@ -4,16 +4,17 @@ package com.azure.v2.storage.blob.models; -import com.azure.core.v2.annotation.Fluent; -import com.azure.core.v2.util.CoreUtils; +import com.azure.v2.core.annotation.Fluent; +import com.azure.v2.core.util.CoreUtils; import io.clientcore.core.serialization.xml.XmlReader; import io.clientcore.core.serialization.xml.XmlSerializable; import io.clientcore.core.serialization.xml.XmlToken; import io.clientcore.core.serialization.xml.XmlWriter; -import java.util.ArrayList; -import java.util.List; + import javax.xml.namespace.QName; import javax.xml.stream.XMLStreamException; +import java.util.ArrayList; +import java.util.List; /** * The BlobFlatListSegment model. diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobHierarchyListSegment.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobHierarchyListSegment.java index e5eef3717714..b50deec6a586 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobHierarchyListSegment.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobHierarchyListSegment.java @@ -4,16 +4,17 @@ package com.azure.v2.storage.blob.models; -import com.azure.core.v2.annotation.Fluent; -import com.azure.core.v2.util.CoreUtils; +import com.azure.v2.core.annotation.Fluent; +import com.azure.v2.core.util.CoreUtils; import io.clientcore.core.serialization.xml.XmlReader; import io.clientcore.core.serialization.xml.XmlSerializable; import io.clientcore.core.serialization.xml.XmlToken; import io.clientcore.core.serialization.xml.XmlWriter; -import java.util.ArrayList; -import java.util.List; + import javax.xml.namespace.QName; import javax.xml.stream.XMLStreamException; +import java.util.ArrayList; +import java.util.List; /** * The BlobHierarchyListSegment model. diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobHttpHeaders.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobHttpHeaders.java index 8e2fa808854c..f96a03651c8e 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobHttpHeaders.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobHttpHeaders.java @@ -4,8 +4,8 @@ package com.azure.v2.storage.blob.models; -import com.azure.core.v2.annotation.Fluent; -import com.azure.core.v2.util.CoreUtils; +import com.azure.v2.core.annotation.Fluent; +import com.azure.v2.core.util.CoreUtils; /** * Parameter group. diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobItemInternal.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobItemInternal.java index d37f51814532..5c7ddcaed43e 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobItemInternal.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobItemInternal.java @@ -4,16 +4,17 @@ package com.azure.v2.storage.blob.models; -import com.azure.core.v2.annotation.Fluent; -import com.azure.core.v2.util.CoreUtils; +import com.azure.v2.core.annotation.Fluent; +import com.azure.v2.core.util.CoreUtils; import io.clientcore.core.serialization.xml.XmlReader; import io.clientcore.core.serialization.xml.XmlSerializable; import io.clientcore.core.serialization.xml.XmlToken; import io.clientcore.core.serialization.xml.XmlWriter; -import java.util.LinkedHashMap; -import java.util.Map; + import javax.xml.namespace.QName; import javax.xml.stream.XMLStreamException; +import java.util.LinkedHashMap; +import java.util.Map; /** * An Azure Storage blob. diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobItemPropertiesInternal.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobItemPropertiesInternal.java index 9e2feb3765d8..4e77b9dd15d4 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobItemPropertiesInternal.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobItemPropertiesInternal.java @@ -4,17 +4,18 @@ package com.azure.v2.storage.blob.models; -import com.azure.core.v2.annotation.Fluent; -import com.azure.core.v2.util.CoreUtils; -import io.clientcore.core.http.models.DateTimeRfc1123; +import com.azure.v2.core.annotation.Fluent; +import com.azure.v2.core.util.CoreUtils; import io.clientcore.core.serialization.xml.XmlReader; import io.clientcore.core.serialization.xml.XmlSerializable; import io.clientcore.core.serialization.xml.XmlToken; import io.clientcore.core.serialization.xml.XmlWriter; -import java.time.OffsetDateTime; -import java.util.Objects; +import io.clientcore.core.util.DateTimeRfc1123; + import javax.xml.namespace.QName; import javax.xml.stream.XMLStreamException; +import java.time.OffsetDateTime; +import java.util.Objects; /** * Properties of a blob. diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobMetrics.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobMetrics.java index 9a130c54fa6a..f31ff7f676a2 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobMetrics.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobMetrics.java @@ -4,12 +4,13 @@ package com.azure.v2.storage.blob.models; -import com.azure.core.v2.annotation.Fluent; -import com.azure.core.v2.util.CoreUtils; +import com.azure.v2.core.annotation.Fluent; +import com.azure.v2.core.util.CoreUtils; import io.clientcore.core.serialization.xml.XmlReader; import io.clientcore.core.serialization.xml.XmlSerializable; import io.clientcore.core.serialization.xml.XmlToken; import io.clientcore.core.serialization.xml.XmlWriter; + import javax.xml.namespace.QName; import javax.xml.stream.XMLStreamException; diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobName.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobName.java index 58f2910e96d7..8debab5bdf91 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobName.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobName.java @@ -4,11 +4,12 @@ package com.azure.v2.storage.blob.models; -import com.azure.core.v2.annotation.Fluent; -import com.azure.core.v2.util.CoreUtils; +import com.azure.v2.core.annotation.Fluent; +import com.azure.v2.core.util.CoreUtils; import io.clientcore.core.serialization.xml.XmlReader; import io.clientcore.core.serialization.xml.XmlSerializable; import io.clientcore.core.serialization.xml.XmlWriter; + import javax.xml.stream.XMLStreamException; /** diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobPrefixInternal.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobPrefixInternal.java index 6ffc0f74d9a0..d3558d9f2494 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobPrefixInternal.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobPrefixInternal.java @@ -4,12 +4,13 @@ package com.azure.v2.storage.blob.models; -import com.azure.core.v2.annotation.Fluent; -import com.azure.core.v2.util.CoreUtils; +import com.azure.v2.core.annotation.Fluent; +import com.azure.v2.core.util.CoreUtils; import io.clientcore.core.serialization.xml.XmlReader; import io.clientcore.core.serialization.xml.XmlSerializable; import io.clientcore.core.serialization.xml.XmlToken; import io.clientcore.core.serialization.xml.XmlWriter; + import javax.xml.namespace.QName; import javax.xml.stream.XMLStreamException; diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobRetentionPolicy.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobRetentionPolicy.java index b6ab6406fdf5..ec8426e99a4d 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobRetentionPolicy.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobRetentionPolicy.java @@ -4,12 +4,13 @@ package com.azure.v2.storage.blob.models; -import com.azure.core.v2.annotation.Fluent; -import com.azure.core.v2.util.CoreUtils; +import com.azure.v2.core.annotation.Fluent; +import com.azure.v2.core.util.CoreUtils; import io.clientcore.core.serialization.xml.XmlReader; import io.clientcore.core.serialization.xml.XmlSerializable; import io.clientcore.core.serialization.xml.XmlToken; import io.clientcore.core.serialization.xml.XmlWriter; + import javax.xml.namespace.QName; import javax.xml.stream.XMLStreamException; diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobServiceProperties.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobServiceProperties.java index bfc9071fbae9..8529ae013fdd 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobServiceProperties.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobServiceProperties.java @@ -4,16 +4,17 @@ package com.azure.v2.storage.blob.models; -import com.azure.core.v2.annotation.Fluent; -import com.azure.core.v2.util.CoreUtils; +import com.azure.v2.core.annotation.Fluent; +import com.azure.v2.core.util.CoreUtils; import io.clientcore.core.serialization.xml.XmlReader; import io.clientcore.core.serialization.xml.XmlSerializable; import io.clientcore.core.serialization.xml.XmlToken; import io.clientcore.core.serialization.xml.XmlWriter; -import java.util.ArrayList; -import java.util.List; + import javax.xml.namespace.QName; import javax.xml.stream.XMLStreamException; +import java.util.ArrayList; +import java.util.List; /** * Storage Service Properties. diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobServiceStatistics.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobServiceStatistics.java index 9f12b81b2e07..2b6095569a00 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobServiceStatistics.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobServiceStatistics.java @@ -4,12 +4,13 @@ package com.azure.v2.storage.blob.models; -import com.azure.core.v2.annotation.Fluent; -import com.azure.core.v2.util.CoreUtils; +import com.azure.v2.core.annotation.Fluent; +import com.azure.v2.core.util.CoreUtils; import io.clientcore.core.serialization.xml.XmlReader; import io.clientcore.core.serialization.xml.XmlSerializable; import io.clientcore.core.serialization.xml.XmlToken; import io.clientcore.core.serialization.xml.XmlWriter; + import javax.xml.namespace.QName; import javax.xml.stream.XMLStreamException; diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobSignedIdentifier.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobSignedIdentifier.java index 5230b4e27484..c9920c1c9ddf 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobSignedIdentifier.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobSignedIdentifier.java @@ -4,12 +4,13 @@ package com.azure.v2.storage.blob.models; -import com.azure.core.v2.annotation.Fluent; -import com.azure.core.v2.util.CoreUtils; +import com.azure.v2.core.annotation.Fluent; +import com.azure.v2.core.util.CoreUtils; import io.clientcore.core.serialization.xml.XmlReader; import io.clientcore.core.serialization.xml.XmlSerializable; import io.clientcore.core.serialization.xml.XmlToken; import io.clientcore.core.serialization.xml.XmlWriter; + import javax.xml.namespace.QName; import javax.xml.stream.XMLStreamException; diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobTag.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobTag.java index a67a9a3e62c0..46b428772c48 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobTag.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobTag.java @@ -4,12 +4,13 @@ package com.azure.v2.storage.blob.models; -import com.azure.core.v2.annotation.Fluent; -import com.azure.core.v2.util.CoreUtils; +import com.azure.v2.core.annotation.Fluent; +import com.azure.v2.core.util.CoreUtils; import io.clientcore.core.serialization.xml.XmlReader; import io.clientcore.core.serialization.xml.XmlSerializable; import io.clientcore.core.serialization.xml.XmlToken; import io.clientcore.core.serialization.xml.XmlWriter; + import javax.xml.namespace.QName; import javax.xml.stream.XMLStreamException; diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobTags.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobTags.java index f8621ae6e145..ca87033ca39f 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobTags.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobTags.java @@ -4,16 +4,17 @@ package com.azure.v2.storage.blob.models; -import com.azure.core.v2.annotation.Fluent; -import com.azure.core.v2.util.CoreUtils; +import com.azure.v2.core.annotation.Fluent; +import com.azure.v2.core.util.CoreUtils; import io.clientcore.core.serialization.xml.XmlReader; import io.clientcore.core.serialization.xml.XmlSerializable; import io.clientcore.core.serialization.xml.XmlToken; import io.clientcore.core.serialization.xml.XmlWriter; -import java.util.ArrayList; -import java.util.List; + import javax.xml.namespace.QName; import javax.xml.stream.XMLStreamException; +import java.util.ArrayList; +import java.util.List; /** * Blob tags. diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobsAbortCopyFromURLHeaders.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobsAbortCopyFromURLHeaders.java index d27c9f43e368..a1af9d0942c5 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobsAbortCopyFromURLHeaders.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobsAbortCopyFromURLHeaders.java @@ -4,10 +4,10 @@ package com.azure.v2.storage.blob.models; -import com.azure.core.v2.annotation.Fluent; -import io.clientcore.core.http.models.DateTimeRfc1123; +import com.azure.v2.core.annotation.Fluent; import io.clientcore.core.http.models.HttpHeaderName; import io.clientcore.core.http.models.HttpHeaders; +import io.clientcore.core.util.DateTimeRfc1123; import java.time.OffsetDateTime; diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobsAcquireLeaseHeaders.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobsAcquireLeaseHeaders.java index 104932a67549..92f900f802e6 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobsAcquireLeaseHeaders.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobsAcquireLeaseHeaders.java @@ -4,10 +4,10 @@ package com.azure.v2.storage.blob.models; -import com.azure.core.v2.annotation.Fluent; -import io.clientcore.core.http.models.DateTimeRfc1123; +import com.azure.v2.core.annotation.Fluent; import io.clientcore.core.http.models.HttpHeaderName; import io.clientcore.core.http.models.HttpHeaders; +import io.clientcore.core.util.DateTimeRfc1123; import java.time.OffsetDateTime; diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobsBreakLeaseHeaders.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobsBreakLeaseHeaders.java index 0175a7f5e241..2cd9d72139e4 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobsBreakLeaseHeaders.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobsBreakLeaseHeaders.java @@ -4,10 +4,10 @@ package com.azure.v2.storage.blob.models; -import com.azure.core.v2.annotation.Fluent; -import io.clientcore.core.http.models.DateTimeRfc1123; +import com.azure.v2.core.annotation.Fluent; import io.clientcore.core.http.models.HttpHeaderName; import io.clientcore.core.http.models.HttpHeaders; +import io.clientcore.core.util.DateTimeRfc1123; import java.time.OffsetDateTime; diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobsChangeLeaseHeaders.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobsChangeLeaseHeaders.java index 0d026cf8d4e6..7d6c718e1aba 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobsChangeLeaseHeaders.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobsChangeLeaseHeaders.java @@ -4,10 +4,10 @@ package com.azure.v2.storage.blob.models; -import com.azure.core.v2.annotation.Fluent; -import io.clientcore.core.http.models.DateTimeRfc1123; +import com.azure.v2.core.annotation.Fluent; import io.clientcore.core.http.models.HttpHeaderName; import io.clientcore.core.http.models.HttpHeaders; +import io.clientcore.core.util.DateTimeRfc1123; import java.time.OffsetDateTime; diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobsCopyFromURLHeaders.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobsCopyFromURLHeaders.java index f9565172de96..ec4b2454d990 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobsCopyFromURLHeaders.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobsCopyFromURLHeaders.java @@ -4,11 +4,11 @@ package com.azure.v2.storage.blob.models; -import com.azure.core.v2.annotation.Fluent; -import com.azure.core.v2.util.CoreUtils; -import io.clientcore.core.http.models.DateTimeRfc1123; +import com.azure.v2.core.annotation.Fluent; +import com.azure.v2.core.util.CoreUtils; import io.clientcore.core.http.models.HttpHeaderName; import io.clientcore.core.http.models.HttpHeaders; +import io.clientcore.core.util.DateTimeRfc1123; import java.time.OffsetDateTime; import java.util.Base64; diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobsCreateSnapshotHeaders.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobsCreateSnapshotHeaders.java index e7191c42f0c8..777eef252aaa 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobsCreateSnapshotHeaders.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobsCreateSnapshotHeaders.java @@ -4,10 +4,10 @@ package com.azure.v2.storage.blob.models; -import com.azure.core.v2.annotation.Fluent; -import io.clientcore.core.http.models.DateTimeRfc1123; +import com.azure.v2.core.annotation.Fluent; import io.clientcore.core.http.models.HttpHeaderName; import io.clientcore.core.http.models.HttpHeaders; +import io.clientcore.core.util.DateTimeRfc1123; import java.time.OffsetDateTime; diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobsDeleteHeaders.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobsDeleteHeaders.java index 8faf7fee775b..a847a8f928bf 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobsDeleteHeaders.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobsDeleteHeaders.java @@ -4,10 +4,10 @@ package com.azure.v2.storage.blob.models; -import com.azure.core.v2.annotation.Fluent; -import io.clientcore.core.http.models.DateTimeRfc1123; +import com.azure.v2.core.annotation.Fluent; import io.clientcore.core.http.models.HttpHeaderName; import io.clientcore.core.http.models.HttpHeaders; +import io.clientcore.core.util.DateTimeRfc1123; import java.time.OffsetDateTime; diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobsDeleteImmutabilityPolicyHeaders.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobsDeleteImmutabilityPolicyHeaders.java index 0a4a3e407e71..d91861a03e98 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobsDeleteImmutabilityPolicyHeaders.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobsDeleteImmutabilityPolicyHeaders.java @@ -4,10 +4,10 @@ package com.azure.v2.storage.blob.models; -import com.azure.core.v2.annotation.Fluent; -import io.clientcore.core.http.models.DateTimeRfc1123; +import com.azure.v2.core.annotation.Fluent; import io.clientcore.core.http.models.HttpHeaderName; import io.clientcore.core.http.models.HttpHeaders; +import io.clientcore.core.util.DateTimeRfc1123; import java.time.OffsetDateTime; diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobsDownloadHeaders.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobsDownloadHeaders.java index e540327dc9e4..088924b94faf 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobsDownloadHeaders.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobsDownloadHeaders.java @@ -4,12 +4,12 @@ package com.azure.v2.storage.blob.models; -import com.azure.core.v2.annotation.Fluent; +import com.azure.v2.core.annotation.Fluent; +import com.azure.v2.core.util.CoreUtils; import io.clientcore.core.http.models.HttpHeader; -import com.azure.core.v2.util.CoreUtils; -import io.clientcore.core.http.models.DateTimeRfc1123; import io.clientcore.core.http.models.HttpHeaderName; import io.clientcore.core.http.models.HttpHeaders; +import io.clientcore.core.util.DateTimeRfc1123; import java.time.OffsetDateTime; import java.util.Base64; diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobsGetAccountInfoHeaders.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobsGetAccountInfoHeaders.java index 8e748f909a52..b5ff2c35d745 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobsGetAccountInfoHeaders.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobsGetAccountInfoHeaders.java @@ -4,10 +4,10 @@ package com.azure.v2.storage.blob.models; -import com.azure.core.v2.annotation.Fluent; -import io.clientcore.core.http.models.DateTimeRfc1123; +import com.azure.v2.core.annotation.Fluent; import io.clientcore.core.http.models.HttpHeaderName; import io.clientcore.core.http.models.HttpHeaders; +import io.clientcore.core.util.DateTimeRfc1123; import java.time.OffsetDateTime; diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobsGetPropertiesHeaders.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobsGetPropertiesHeaders.java index 9b477d7362ef..1c2ecc4ecbad 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobsGetPropertiesHeaders.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobsGetPropertiesHeaders.java @@ -4,12 +4,12 @@ package com.azure.v2.storage.blob.models; -import com.azure.core.v2.annotation.Fluent; +import com.azure.v2.core.annotation.Fluent; +import com.azure.v2.core.util.CoreUtils; import io.clientcore.core.http.models.HttpHeader; -import com.azure.core.v2.util.CoreUtils; -import io.clientcore.core.http.models.DateTimeRfc1123; import io.clientcore.core.http.models.HttpHeaderName; import io.clientcore.core.http.models.HttpHeaders; +import io.clientcore.core.util.DateTimeRfc1123; import java.time.OffsetDateTime; import java.util.Base64; diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobsGetTagsHeaders.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobsGetTagsHeaders.java index cf67268a6b35..c5e428b1d7b7 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobsGetTagsHeaders.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobsGetTagsHeaders.java @@ -4,10 +4,10 @@ package com.azure.v2.storage.blob.models; -import com.azure.core.v2.annotation.Fluent; -import io.clientcore.core.http.models.DateTimeRfc1123; +import com.azure.v2.core.annotation.Fluent; import io.clientcore.core.http.models.HttpHeaderName; import io.clientcore.core.http.models.HttpHeaders; +import io.clientcore.core.util.DateTimeRfc1123; import java.time.OffsetDateTime; diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobsQueryHeaders.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobsQueryHeaders.java index 7dec2ecffe04..85d6e80b0934 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobsQueryHeaders.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobsQueryHeaders.java @@ -4,12 +4,12 @@ package com.azure.v2.storage.blob.models; -import com.azure.core.v2.annotation.Fluent; +import com.azure.v2.core.annotation.Fluent; +import com.azure.v2.core.util.CoreUtils; import io.clientcore.core.http.models.HttpHeader; -import com.azure.core.v2.util.CoreUtils; -import io.clientcore.core.http.models.DateTimeRfc1123; import io.clientcore.core.http.models.HttpHeaderName; import io.clientcore.core.http.models.HttpHeaders; +import io.clientcore.core.util.DateTimeRfc1123; import java.time.OffsetDateTime; import java.util.Base64; diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobsReleaseLeaseHeaders.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobsReleaseLeaseHeaders.java index 9a4973f3c1b0..7911c72689b8 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobsReleaseLeaseHeaders.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobsReleaseLeaseHeaders.java @@ -4,10 +4,10 @@ package com.azure.v2.storage.blob.models; -import com.azure.core.v2.annotation.Fluent; -import io.clientcore.core.http.models.DateTimeRfc1123; +import com.azure.v2.core.annotation.Fluent; import io.clientcore.core.http.models.HttpHeaderName; import io.clientcore.core.http.models.HttpHeaders; +import io.clientcore.core.util.DateTimeRfc1123; import java.time.OffsetDateTime; diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobsRenewLeaseHeaders.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobsRenewLeaseHeaders.java index 825cac725cc7..004b3d6c2569 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobsRenewLeaseHeaders.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobsRenewLeaseHeaders.java @@ -4,10 +4,10 @@ package com.azure.v2.storage.blob.models; -import com.azure.core.v2.annotation.Fluent; -import io.clientcore.core.http.models.DateTimeRfc1123; +import com.azure.v2.core.annotation.Fluent; import io.clientcore.core.http.models.HttpHeaderName; import io.clientcore.core.http.models.HttpHeaders; +import io.clientcore.core.util.DateTimeRfc1123; import java.time.OffsetDateTime; diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobsSetExpiryHeaders.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobsSetExpiryHeaders.java index 43dab20d1931..772914e61b01 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobsSetExpiryHeaders.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobsSetExpiryHeaders.java @@ -4,10 +4,10 @@ package com.azure.v2.storage.blob.models; -import com.azure.core.v2.annotation.Fluent; -import io.clientcore.core.http.models.DateTimeRfc1123; +import com.azure.v2.core.annotation.Fluent; import io.clientcore.core.http.models.HttpHeaderName; import io.clientcore.core.http.models.HttpHeaders; +import io.clientcore.core.util.DateTimeRfc1123; import java.time.OffsetDateTime; diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobsSetHttpHeadersHeaders.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobsSetHttpHeadersHeaders.java index b4db240f9b85..68e933ef0254 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobsSetHttpHeadersHeaders.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobsSetHttpHeadersHeaders.java @@ -4,10 +4,10 @@ package com.azure.v2.storage.blob.models; -import com.azure.core.v2.annotation.Fluent; -import io.clientcore.core.http.models.DateTimeRfc1123; +import com.azure.v2.core.annotation.Fluent; import io.clientcore.core.http.models.HttpHeaderName; import io.clientcore.core.http.models.HttpHeaders; +import io.clientcore.core.util.DateTimeRfc1123; import java.time.OffsetDateTime; diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobsSetImmutabilityPolicyHeaders.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobsSetImmutabilityPolicyHeaders.java index bada51290875..03b105e3fac5 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobsSetImmutabilityPolicyHeaders.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobsSetImmutabilityPolicyHeaders.java @@ -4,10 +4,10 @@ package com.azure.v2.storage.blob.models; -import com.azure.core.v2.annotation.Fluent; -import io.clientcore.core.http.models.DateTimeRfc1123; +import com.azure.v2.core.annotation.Fluent; import io.clientcore.core.http.models.HttpHeaderName; import io.clientcore.core.http.models.HttpHeaders; +import io.clientcore.core.util.DateTimeRfc1123; import java.time.OffsetDateTime; diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobsSetLegalHoldHeaders.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobsSetLegalHoldHeaders.java index bf0c6e8604fc..92e41ea467b9 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobsSetLegalHoldHeaders.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobsSetLegalHoldHeaders.java @@ -4,10 +4,10 @@ package com.azure.v2.storage.blob.models; -import com.azure.core.v2.annotation.Fluent; -import io.clientcore.core.http.models.DateTimeRfc1123; +import com.azure.v2.core.annotation.Fluent; import io.clientcore.core.http.models.HttpHeaderName; import io.clientcore.core.http.models.HttpHeaders; +import io.clientcore.core.util.DateTimeRfc1123; import java.time.OffsetDateTime; diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobsSetMetadataHeaders.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobsSetMetadataHeaders.java index 8718fb3e2251..58cf990789ca 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobsSetMetadataHeaders.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobsSetMetadataHeaders.java @@ -4,10 +4,10 @@ package com.azure.v2.storage.blob.models; -import com.azure.core.v2.annotation.Fluent; -import io.clientcore.core.http.models.DateTimeRfc1123; +import com.azure.v2.core.annotation.Fluent; import io.clientcore.core.http.models.HttpHeaderName; import io.clientcore.core.http.models.HttpHeaders; +import io.clientcore.core.util.DateTimeRfc1123; import java.time.OffsetDateTime; diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobsSetTagsHeaders.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobsSetTagsHeaders.java index ad734fc323e5..62566c7dc3c4 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobsSetTagsHeaders.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobsSetTagsHeaders.java @@ -4,10 +4,10 @@ package com.azure.v2.storage.blob.models; -import com.azure.core.v2.annotation.Fluent; -import io.clientcore.core.http.models.DateTimeRfc1123; +import com.azure.v2.core.annotation.Fluent; import io.clientcore.core.http.models.HttpHeaderName; import io.clientcore.core.http.models.HttpHeaders; +import io.clientcore.core.util.DateTimeRfc1123; import java.time.OffsetDateTime; diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobsSetTierHeaders.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobsSetTierHeaders.java index 4ee1d2e25bf6..8dc5f41eee3e 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobsSetTierHeaders.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobsSetTierHeaders.java @@ -4,7 +4,7 @@ package com.azure.v2.storage.blob.models; -import com.azure.core.v2.annotation.Fluent; +import com.azure.v2.core.annotation.Fluent; import io.clientcore.core.http.models.HttpHeaderName; import io.clientcore.core.http.models.HttpHeaders; diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobsStartCopyFromURLHeaders.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobsStartCopyFromURLHeaders.java index b92f5927e563..f4455eafbf03 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobsStartCopyFromURLHeaders.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobsStartCopyFromURLHeaders.java @@ -4,10 +4,10 @@ package com.azure.v2.storage.blob.models; -import com.azure.core.v2.annotation.Fluent; -import io.clientcore.core.http.models.DateTimeRfc1123; +import com.azure.v2.core.annotation.Fluent; import io.clientcore.core.http.models.HttpHeaderName; import io.clientcore.core.http.models.HttpHeaders; +import io.clientcore.core.util.DateTimeRfc1123; import java.time.OffsetDateTime; diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobsUndeleteHeaders.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobsUndeleteHeaders.java index f6a8a6a9e401..5e12ee7d229d 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobsUndeleteHeaders.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobsUndeleteHeaders.java @@ -4,10 +4,10 @@ package com.azure.v2.storage.blob.models; -import com.azure.core.v2.annotation.Fluent; -import io.clientcore.core.http.models.DateTimeRfc1123; +import com.azure.v2.core.annotation.Fluent; import io.clientcore.core.http.models.HttpHeaderName; import io.clientcore.core.http.models.HttpHeaders; +import io.clientcore.core.util.DateTimeRfc1123; import java.time.OffsetDateTime; diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/Block.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/Block.java index 5989cc0c5e5f..331a7ab85e66 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/Block.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/Block.java @@ -4,12 +4,13 @@ package com.azure.v2.storage.blob.models; -import com.azure.core.v2.annotation.Fluent; -import com.azure.core.v2.util.CoreUtils; +import com.azure.v2.core.annotation.Fluent; +import com.azure.v2.core.util.CoreUtils; import io.clientcore.core.serialization.xml.XmlReader; import io.clientcore.core.serialization.xml.XmlSerializable; import io.clientcore.core.serialization.xml.XmlToken; import io.clientcore.core.serialization.xml.XmlWriter; + import javax.xml.namespace.QName; import javax.xml.stream.XMLStreamException; diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlockBlobsCommitBlockListHeaders.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlockBlobsCommitBlockListHeaders.java index a14594599c02..dfa3f56dea15 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlockBlobsCommitBlockListHeaders.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlockBlobsCommitBlockListHeaders.java @@ -4,11 +4,11 @@ package com.azure.v2.storage.blob.models; -import com.azure.core.v2.annotation.Fluent; -import com.azure.core.v2.util.CoreUtils; -import io.clientcore.core.http.models.DateTimeRfc1123; +import com.azure.v2.core.annotation.Fluent; +import com.azure.v2.core.util.CoreUtils; import io.clientcore.core.http.models.HttpHeaderName; import io.clientcore.core.http.models.HttpHeaders; +import io.clientcore.core.util.DateTimeRfc1123; import java.time.OffsetDateTime; import java.util.Base64; diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlockBlobsGetBlockListHeaders.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlockBlobsGetBlockListHeaders.java index 73ea924877ae..6f86a1371390 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlockBlobsGetBlockListHeaders.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlockBlobsGetBlockListHeaders.java @@ -4,10 +4,10 @@ package com.azure.v2.storage.blob.models; -import com.azure.core.v2.annotation.Fluent; -import io.clientcore.core.http.models.DateTimeRfc1123; +import com.azure.v2.core.annotation.Fluent; import io.clientcore.core.http.models.HttpHeaderName; import io.clientcore.core.http.models.HttpHeaders; +import io.clientcore.core.util.DateTimeRfc1123; import java.time.OffsetDateTime; diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlockBlobsPutBlobFromUrlHeaders.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlockBlobsPutBlobFromUrlHeaders.java index 3e82c0fc6147..e635422ce1e7 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlockBlobsPutBlobFromUrlHeaders.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlockBlobsPutBlobFromUrlHeaders.java @@ -4,11 +4,11 @@ package com.azure.v2.storage.blob.models; -import com.azure.core.v2.annotation.Fluent; -import com.azure.core.v2.util.CoreUtils; -import io.clientcore.core.http.models.DateTimeRfc1123; +import com.azure.v2.core.annotation.Fluent; +import com.azure.v2.core.util.CoreUtils; import io.clientcore.core.http.models.HttpHeaderName; import io.clientcore.core.http.models.HttpHeaders; +import io.clientcore.core.util.DateTimeRfc1123; import java.time.OffsetDateTime; import java.util.Base64; diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlockBlobsStageBlockFromURLHeaders.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlockBlobsStageBlockFromURLHeaders.java index da5c726107b2..2755e43c97e3 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlockBlobsStageBlockFromURLHeaders.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlockBlobsStageBlockFromURLHeaders.java @@ -4,11 +4,11 @@ package com.azure.v2.storage.blob.models; -import com.azure.core.v2.annotation.Fluent; -import com.azure.core.v2.util.CoreUtils; -import io.clientcore.core.http.models.DateTimeRfc1123; +import com.azure.v2.core.annotation.Fluent; +import com.azure.v2.core.util.CoreUtils; import io.clientcore.core.http.models.HttpHeaderName; import io.clientcore.core.http.models.HttpHeaders; +import io.clientcore.core.util.DateTimeRfc1123; import java.time.OffsetDateTime; import java.util.Base64; diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlockBlobsStageBlockHeaders.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlockBlobsStageBlockHeaders.java index c5d6ae0db35d..da88b413bcbb 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlockBlobsStageBlockHeaders.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlockBlobsStageBlockHeaders.java @@ -4,11 +4,11 @@ package com.azure.v2.storage.blob.models; -import com.azure.core.v2.annotation.Fluent; -import com.azure.core.v2.util.CoreUtils; -import io.clientcore.core.http.models.DateTimeRfc1123; +import com.azure.v2.core.annotation.Fluent; +import com.azure.v2.core.util.CoreUtils; import io.clientcore.core.http.models.HttpHeaderName; import io.clientcore.core.http.models.HttpHeaders; +import io.clientcore.core.util.DateTimeRfc1123; import java.time.OffsetDateTime; import java.util.Base64; diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlockBlobsUploadHeaders.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlockBlobsUploadHeaders.java index ef6937b2b21f..34f924e91714 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlockBlobsUploadHeaders.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlockBlobsUploadHeaders.java @@ -4,11 +4,11 @@ package com.azure.v2.storage.blob.models; -import com.azure.core.v2.annotation.Fluent; -import com.azure.core.v2.util.CoreUtils; -import io.clientcore.core.http.models.DateTimeRfc1123; +import com.azure.v2.core.annotation.Fluent; +import com.azure.v2.core.util.CoreUtils; import io.clientcore.core.http.models.HttpHeaderName; import io.clientcore.core.http.models.HttpHeaders; +import io.clientcore.core.util.DateTimeRfc1123; import java.time.OffsetDateTime; import java.util.Base64; diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlockList.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlockList.java index 1ae459379cbb..d074f14ed4c0 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlockList.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlockList.java @@ -4,16 +4,17 @@ package com.azure.v2.storage.blob.models; -import com.azure.core.v2.annotation.Fluent; -import com.azure.core.v2.util.CoreUtils; +import com.azure.v2.core.annotation.Fluent; +import com.azure.v2.core.util.CoreUtils; import io.clientcore.core.serialization.xml.XmlReader; import io.clientcore.core.serialization.xml.XmlSerializable; import io.clientcore.core.serialization.xml.XmlToken; import io.clientcore.core.serialization.xml.XmlWriter; -import java.util.ArrayList; -import java.util.List; + import javax.xml.namespace.QName; import javax.xml.stream.XMLStreamException; +import java.util.ArrayList; +import java.util.List; /** * The BlockList model. diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlockLookupList.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlockLookupList.java index 90f0ba9306ba..63868cfd0fc8 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlockLookupList.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlockLookupList.java @@ -4,16 +4,17 @@ package com.azure.v2.storage.blob.models; -import com.azure.core.v2.annotation.Fluent; -import com.azure.core.v2.util.CoreUtils; +import com.azure.v2.core.annotation.Fluent; +import com.azure.v2.core.util.CoreUtils; import io.clientcore.core.serialization.xml.XmlReader; import io.clientcore.core.serialization.xml.XmlSerializable; import io.clientcore.core.serialization.xml.XmlToken; import io.clientcore.core.serialization.xml.XmlWriter; -import java.util.ArrayList; -import java.util.List; + import javax.xml.namespace.QName; import javax.xml.stream.XMLStreamException; +import java.util.ArrayList; +import java.util.List; /** * The BlockLookupList model. diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ClearRange.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ClearRange.java index 006414d39727..829cbb0718f0 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ClearRange.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ClearRange.java @@ -4,12 +4,13 @@ package com.azure.v2.storage.blob.models; -import com.azure.core.v2.annotation.Fluent; -import com.azure.core.v2.util.CoreUtils; +import com.azure.v2.core.annotation.Fluent; +import com.azure.v2.core.util.CoreUtils; import io.clientcore.core.serialization.xml.XmlReader; import io.clientcore.core.serialization.xml.XmlSerializable; import io.clientcore.core.serialization.xml.XmlToken; import io.clientcore.core.serialization.xml.XmlWriter; + import javax.xml.namespace.QName; import javax.xml.stream.XMLStreamException; diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ContainersAcquireLeaseHeaders.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ContainersAcquireLeaseHeaders.java index 692a691d1f90..8648ac085917 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ContainersAcquireLeaseHeaders.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ContainersAcquireLeaseHeaders.java @@ -4,10 +4,10 @@ package com.azure.v2.storage.blob.models; -import com.azure.core.v2.annotation.Fluent; -import io.clientcore.core.http.models.DateTimeRfc1123; +import com.azure.v2.core.annotation.Fluent; import io.clientcore.core.http.models.HttpHeaderName; import io.clientcore.core.http.models.HttpHeaders; +import io.clientcore.core.util.DateTimeRfc1123; import java.time.OffsetDateTime; diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ContainersBreakLeaseHeaders.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ContainersBreakLeaseHeaders.java index b94d5c2c787a..933b45157e19 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ContainersBreakLeaseHeaders.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ContainersBreakLeaseHeaders.java @@ -4,10 +4,10 @@ package com.azure.v2.storage.blob.models; -import com.azure.core.v2.annotation.Fluent; -import io.clientcore.core.http.models.DateTimeRfc1123; +import com.azure.v2.core.annotation.Fluent; import io.clientcore.core.http.models.HttpHeaderName; import io.clientcore.core.http.models.HttpHeaders; +import io.clientcore.core.util.DateTimeRfc1123; import java.time.OffsetDateTime; diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ContainersChangeLeaseHeaders.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ContainersChangeLeaseHeaders.java index f42755268e3b..b020d22a5954 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ContainersChangeLeaseHeaders.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ContainersChangeLeaseHeaders.java @@ -4,10 +4,10 @@ package com.azure.v2.storage.blob.models; -import com.azure.core.v2.annotation.Fluent; -import io.clientcore.core.http.models.DateTimeRfc1123; +import com.azure.v2.core.annotation.Fluent; import io.clientcore.core.http.models.HttpHeaderName; import io.clientcore.core.http.models.HttpHeaders; +import io.clientcore.core.util.DateTimeRfc1123; import java.time.OffsetDateTime; diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ContainersCreateHeaders.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ContainersCreateHeaders.java index 4b2dcac7daa2..fa3bfb63eacc 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ContainersCreateHeaders.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ContainersCreateHeaders.java @@ -4,10 +4,10 @@ package com.azure.v2.storage.blob.models; -import com.azure.core.v2.annotation.Fluent; -import io.clientcore.core.http.models.DateTimeRfc1123; +import com.azure.v2.core.annotation.Fluent; import io.clientcore.core.http.models.HttpHeaderName; import io.clientcore.core.http.models.HttpHeaders; +import io.clientcore.core.util.DateTimeRfc1123; import java.time.OffsetDateTime; diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ContainersDeleteHeaders.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ContainersDeleteHeaders.java index 993ae403195f..7a705788d662 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ContainersDeleteHeaders.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ContainersDeleteHeaders.java @@ -4,10 +4,10 @@ package com.azure.v2.storage.blob.models; -import com.azure.core.v2.annotation.Fluent; -import io.clientcore.core.http.models.DateTimeRfc1123; +import com.azure.v2.core.annotation.Fluent; import io.clientcore.core.http.models.HttpHeaderName; import io.clientcore.core.http.models.HttpHeaders; +import io.clientcore.core.util.DateTimeRfc1123; import java.time.OffsetDateTime; diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ContainersFilterBlobsHeaders.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ContainersFilterBlobsHeaders.java index 29eaac0f338a..30c1b806d461 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ContainersFilterBlobsHeaders.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ContainersFilterBlobsHeaders.java @@ -4,10 +4,10 @@ package com.azure.v2.storage.blob.models; -import com.azure.core.v2.annotation.Fluent; -import io.clientcore.core.http.models.DateTimeRfc1123; +import com.azure.v2.core.annotation.Fluent; import io.clientcore.core.http.models.HttpHeaderName; import io.clientcore.core.http.models.HttpHeaders; +import io.clientcore.core.util.DateTimeRfc1123; import java.time.OffsetDateTime; diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ContainersGetAccessPolicyHeaders.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ContainersGetAccessPolicyHeaders.java index e923c081e12d..aaaf50e30090 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ContainersGetAccessPolicyHeaders.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ContainersGetAccessPolicyHeaders.java @@ -4,10 +4,10 @@ package com.azure.v2.storage.blob.models; -import com.azure.core.v2.annotation.Fluent; -import io.clientcore.core.http.models.DateTimeRfc1123; +import com.azure.v2.core.annotation.Fluent; import io.clientcore.core.http.models.HttpHeaderName; import io.clientcore.core.http.models.HttpHeaders; +import io.clientcore.core.util.DateTimeRfc1123; import java.time.OffsetDateTime; diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ContainersGetAccountInfoHeaders.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ContainersGetAccountInfoHeaders.java index ce6007a85198..942067965498 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ContainersGetAccountInfoHeaders.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ContainersGetAccountInfoHeaders.java @@ -4,10 +4,10 @@ package com.azure.v2.storage.blob.models; -import com.azure.core.v2.annotation.Fluent; -import io.clientcore.core.http.models.DateTimeRfc1123; +import com.azure.v2.core.annotation.Fluent; import io.clientcore.core.http.models.HttpHeaderName; import io.clientcore.core.http.models.HttpHeaders; +import io.clientcore.core.util.DateTimeRfc1123; import java.time.OffsetDateTime; diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ContainersGetPropertiesHeaders.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ContainersGetPropertiesHeaders.java index b1f4240fe1c9..53fdbac4af78 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ContainersGetPropertiesHeaders.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ContainersGetPropertiesHeaders.java @@ -4,11 +4,11 @@ package com.azure.v2.storage.blob.models; -import com.azure.core.v2.annotation.Fluent; +import com.azure.v2.core.annotation.Fluent; import io.clientcore.core.http.models.HttpHeader; -import io.clientcore.core.http.models.DateTimeRfc1123; import io.clientcore.core.http.models.HttpHeaderName; import io.clientcore.core.http.models.HttpHeaders; +import io.clientcore.core.util.DateTimeRfc1123; import java.time.OffsetDateTime; import java.util.HashMap; diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ContainersListBlobFlatSegmentHeaders.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ContainersListBlobFlatSegmentHeaders.java index f17242f04bde..b6dd39d86697 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ContainersListBlobFlatSegmentHeaders.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ContainersListBlobFlatSegmentHeaders.java @@ -4,10 +4,10 @@ package com.azure.v2.storage.blob.models; -import com.azure.core.v2.annotation.Fluent; -import io.clientcore.core.http.models.DateTimeRfc1123; +import com.azure.v2.core.annotation.Fluent; import io.clientcore.core.http.models.HttpHeaderName; import io.clientcore.core.http.models.HttpHeaders; +import io.clientcore.core.util.DateTimeRfc1123; import java.time.OffsetDateTime; diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ContainersListBlobHierarchySegmentHeaders.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ContainersListBlobHierarchySegmentHeaders.java index 8fa996bdbffe..257dfc4a5bb8 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ContainersListBlobHierarchySegmentHeaders.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ContainersListBlobHierarchySegmentHeaders.java @@ -4,10 +4,10 @@ package com.azure.v2.storage.blob.models; -import com.azure.core.v2.annotation.Fluent; -import io.clientcore.core.http.models.DateTimeRfc1123; +import com.azure.v2.core.annotation.Fluent; import io.clientcore.core.http.models.HttpHeaderName; import io.clientcore.core.http.models.HttpHeaders; +import io.clientcore.core.util.DateTimeRfc1123; import java.time.OffsetDateTime; diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ContainersReleaseLeaseHeaders.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ContainersReleaseLeaseHeaders.java index 6ce4920f2f84..9ef0d0ad99c8 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ContainersReleaseLeaseHeaders.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ContainersReleaseLeaseHeaders.java @@ -4,10 +4,10 @@ package com.azure.v2.storage.blob.models; -import com.azure.core.v2.annotation.Fluent; -import io.clientcore.core.http.models.DateTimeRfc1123; +import com.azure.v2.core.annotation.Fluent; import io.clientcore.core.http.models.HttpHeaderName; import io.clientcore.core.http.models.HttpHeaders; +import io.clientcore.core.util.DateTimeRfc1123; import java.time.OffsetDateTime; diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ContainersRenameHeaders.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ContainersRenameHeaders.java index 8fe39b5a1fe9..c49d424e4b15 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ContainersRenameHeaders.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ContainersRenameHeaders.java @@ -4,10 +4,10 @@ package com.azure.v2.storage.blob.models; -import com.azure.core.v2.annotation.Fluent; -import io.clientcore.core.http.models.DateTimeRfc1123; +import com.azure.v2.core.annotation.Fluent; import io.clientcore.core.http.models.HttpHeaderName; import io.clientcore.core.http.models.HttpHeaders; +import io.clientcore.core.util.DateTimeRfc1123; import java.time.OffsetDateTime; diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ContainersRenewLeaseHeaders.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ContainersRenewLeaseHeaders.java index 4c9f8cc1d155..b778c4b8ecea 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ContainersRenewLeaseHeaders.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ContainersRenewLeaseHeaders.java @@ -4,10 +4,10 @@ package com.azure.v2.storage.blob.models; -import com.azure.core.v2.annotation.Fluent; -import io.clientcore.core.http.models.DateTimeRfc1123; +import com.azure.v2.core.annotation.Fluent; import io.clientcore.core.http.models.HttpHeaderName; import io.clientcore.core.http.models.HttpHeaders; +import io.clientcore.core.util.DateTimeRfc1123; import java.time.OffsetDateTime; diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ContainersRestoreHeaders.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ContainersRestoreHeaders.java index 771399ee4772..30f94f582587 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ContainersRestoreHeaders.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ContainersRestoreHeaders.java @@ -4,10 +4,10 @@ package com.azure.v2.storage.blob.models; -import com.azure.core.v2.annotation.Fluent; -import io.clientcore.core.http.models.DateTimeRfc1123; +import com.azure.v2.core.annotation.Fluent; import io.clientcore.core.http.models.HttpHeaderName; import io.clientcore.core.http.models.HttpHeaders; +import io.clientcore.core.util.DateTimeRfc1123; import java.time.OffsetDateTime; diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ContainersSetAccessPolicyHeaders.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ContainersSetAccessPolicyHeaders.java index f59f9d5b3c96..8d26e5d0db07 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ContainersSetAccessPolicyHeaders.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ContainersSetAccessPolicyHeaders.java @@ -4,10 +4,10 @@ package com.azure.v2.storage.blob.models; -import com.azure.core.v2.annotation.Fluent; -import io.clientcore.core.http.models.DateTimeRfc1123; +import com.azure.v2.core.annotation.Fluent; import io.clientcore.core.http.models.HttpHeaderName; import io.clientcore.core.http.models.HttpHeaders; +import io.clientcore.core.util.DateTimeRfc1123; import java.time.OffsetDateTime; diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ContainersSetMetadataHeaders.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ContainersSetMetadataHeaders.java index e5b56ccbe422..6be936174bcc 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ContainersSetMetadataHeaders.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ContainersSetMetadataHeaders.java @@ -4,10 +4,10 @@ package com.azure.v2.storage.blob.models; -import com.azure.core.v2.annotation.Fluent; -import io.clientcore.core.http.models.DateTimeRfc1123; +import com.azure.v2.core.annotation.Fluent; import io.clientcore.core.http.models.HttpHeaderName; import io.clientcore.core.http.models.HttpHeaders; +import io.clientcore.core.util.DateTimeRfc1123; import java.time.OffsetDateTime; diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ContainersSubmitBatchHeaders.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ContainersSubmitBatchHeaders.java index 8937162fc580..577ce91c347a 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ContainersSubmitBatchHeaders.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ContainersSubmitBatchHeaders.java @@ -4,7 +4,7 @@ package com.azure.v2.storage.blob.models; -import com.azure.core.v2.annotation.Fluent; +import com.azure.v2.core.annotation.Fluent; import io.clientcore.core.http.models.HttpHeaderName; import io.clientcore.core.http.models.HttpHeaders; diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/CpkInfo.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/CpkInfo.java index b556faf6e3f6..cf26938fb595 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/CpkInfo.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/CpkInfo.java @@ -4,7 +4,7 @@ package com.azure.v2.storage.blob.models; -import com.azure.core.v2.annotation.Fluent; +import com.azure.v2.core.annotation.Fluent; /** * Parameter group. diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/DelimitedTextConfiguration.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/DelimitedTextConfiguration.java index ac86f197d8db..dd9aff1b1c6c 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/DelimitedTextConfiguration.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/DelimitedTextConfiguration.java @@ -4,12 +4,13 @@ package com.azure.v2.storage.blob.models; -import com.azure.core.v2.annotation.Fluent; -import com.azure.core.v2.util.CoreUtils; +import com.azure.v2.core.annotation.Fluent; +import com.azure.v2.core.util.CoreUtils; import io.clientcore.core.serialization.xml.XmlReader; import io.clientcore.core.serialization.xml.XmlSerializable; import io.clientcore.core.serialization.xml.XmlToken; import io.clientcore.core.serialization.xml.XmlWriter; + import javax.xml.namespace.QName; import javax.xml.stream.XMLStreamException; diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/EncryptionScope.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/EncryptionScope.java index 3756f55dddc8..1fa16ddea7d9 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/EncryptionScope.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/EncryptionScope.java @@ -4,7 +4,7 @@ package com.azure.v2.storage.blob.models; -import com.azure.core.v2.annotation.Fluent; +import com.azure.v2.core.annotation.Fluent; /** * Parameter group. diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/FilterBlobItem.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/FilterBlobItem.java index 924eb1ff0142..d6ec8b358548 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/FilterBlobItem.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/FilterBlobItem.java @@ -4,12 +4,13 @@ package com.azure.v2.storage.blob.models; -import com.azure.core.v2.annotation.Fluent; -import com.azure.core.v2.util.CoreUtils; +import com.azure.v2.core.annotation.Fluent; +import com.azure.v2.core.util.CoreUtils; import io.clientcore.core.serialization.xml.XmlReader; import io.clientcore.core.serialization.xml.XmlSerializable; import io.clientcore.core.serialization.xml.XmlToken; import io.clientcore.core.serialization.xml.XmlWriter; + import javax.xml.namespace.QName; import javax.xml.stream.XMLStreamException; diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/FilterBlobSegment.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/FilterBlobSegment.java index 385d04cf2b22..b6d629574de5 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/FilterBlobSegment.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/FilterBlobSegment.java @@ -4,16 +4,17 @@ package com.azure.v2.storage.blob.models; -import com.azure.core.v2.annotation.Fluent; -import com.azure.core.v2.util.CoreUtils; +import com.azure.v2.core.annotation.Fluent; +import com.azure.v2.core.util.CoreUtils; import io.clientcore.core.serialization.xml.XmlReader; import io.clientcore.core.serialization.xml.XmlSerializable; import io.clientcore.core.serialization.xml.XmlToken; import io.clientcore.core.serialization.xml.XmlWriter; -import java.util.ArrayList; -import java.util.List; + import javax.xml.namespace.QName; import javax.xml.stream.XMLStreamException; +import java.util.ArrayList; +import java.util.List; /** * The result of a Filter Blobs API call. diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/GeoReplication.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/GeoReplication.java index 5a814b6ee518..79d60eef9795 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/GeoReplication.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/GeoReplication.java @@ -4,17 +4,18 @@ package com.azure.v2.storage.blob.models; -import com.azure.core.v2.annotation.Fluent; -import com.azure.core.v2.util.CoreUtils; -import io.clientcore.core.http.models.DateTimeRfc1123; +import com.azure.v2.core.annotation.Fluent; +import com.azure.v2.core.util.CoreUtils; import io.clientcore.core.serialization.xml.XmlReader; import io.clientcore.core.serialization.xml.XmlSerializable; import io.clientcore.core.serialization.xml.XmlToken; import io.clientcore.core.serialization.xml.XmlWriter; -import java.time.OffsetDateTime; -import java.util.Objects; +import io.clientcore.core.util.DateTimeRfc1123; + import javax.xml.namespace.QName; import javax.xml.stream.XMLStreamException; +import java.time.OffsetDateTime; +import java.util.Objects; /** * Geo-Replication information for the Secondary Storage Service. diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/GeoReplicationStatus.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/GeoReplicationStatus.java index 0d492c0bb50c..501aebace9e1 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/GeoReplicationStatus.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/GeoReplicationStatus.java @@ -5,6 +5,7 @@ package com.azure.v2.storage.blob.models; import io.clientcore.core.util.ExpandableEnum; + import java.util.Map; import java.util.concurrent.ConcurrentHashMap; diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/JsonTextConfiguration.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/JsonTextConfiguration.java index 29fa576b295a..f90a703b5724 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/JsonTextConfiguration.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/JsonTextConfiguration.java @@ -4,12 +4,13 @@ package com.azure.v2.storage.blob.models; -import com.azure.core.v2.annotation.Fluent; -import com.azure.core.v2.util.CoreUtils; +import com.azure.v2.core.annotation.Fluent; +import com.azure.v2.core.util.CoreUtils; import io.clientcore.core.serialization.xml.XmlReader; import io.clientcore.core.serialization.xml.XmlSerializable; import io.clientcore.core.serialization.xml.XmlToken; import io.clientcore.core.serialization.xml.XmlWriter; + import javax.xml.namespace.QName; import javax.xml.stream.XMLStreamException; diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/KeyInfo.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/KeyInfo.java index 43e109b30bf8..8a911b533bfd 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/KeyInfo.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/KeyInfo.java @@ -4,12 +4,13 @@ package com.azure.v2.storage.blob.models; -import com.azure.core.v2.annotation.Fluent; -import com.azure.core.v2.util.CoreUtils; +import com.azure.v2.core.annotation.Fluent; +import com.azure.v2.core.util.CoreUtils; import io.clientcore.core.serialization.xml.XmlReader; import io.clientcore.core.serialization.xml.XmlSerializable; import io.clientcore.core.serialization.xml.XmlToken; import io.clientcore.core.serialization.xml.XmlWriter; + import javax.xml.namespace.QName; import javax.xml.stream.XMLStreamException; diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ListBlobsFlatSegmentResponse.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ListBlobsFlatSegmentResponse.java index d8dca74bb255..0bd9007da7ea 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ListBlobsFlatSegmentResponse.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ListBlobsFlatSegmentResponse.java @@ -4,12 +4,13 @@ package com.azure.v2.storage.blob.models; -import com.azure.core.v2.annotation.Fluent; -import com.azure.core.v2.util.CoreUtils; +import com.azure.v2.core.annotation.Fluent; +import com.azure.v2.core.util.CoreUtils; import io.clientcore.core.serialization.xml.XmlReader; import io.clientcore.core.serialization.xml.XmlSerializable; import io.clientcore.core.serialization.xml.XmlToken; import io.clientcore.core.serialization.xml.XmlWriter; + import javax.xml.namespace.QName; import javax.xml.stream.XMLStreamException; diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ListBlobsHierarchySegmentResponse.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ListBlobsHierarchySegmentResponse.java index b55fb68613fa..fc130e1db6cc 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ListBlobsHierarchySegmentResponse.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ListBlobsHierarchySegmentResponse.java @@ -4,12 +4,13 @@ package com.azure.v2.storage.blob.models; -import com.azure.core.v2.annotation.Fluent; -import com.azure.core.v2.util.CoreUtils; +import com.azure.v2.core.annotation.Fluent; +import com.azure.v2.core.util.CoreUtils; import io.clientcore.core.serialization.xml.XmlReader; import io.clientcore.core.serialization.xml.XmlSerializable; import io.clientcore.core.serialization.xml.XmlToken; import io.clientcore.core.serialization.xml.XmlWriter; + import javax.xml.namespace.QName; import javax.xml.stream.XMLStreamException; diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/PageBlobsClearPagesHeaders.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/PageBlobsClearPagesHeaders.java index b070a347c3b0..7714f3f37518 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/PageBlobsClearPagesHeaders.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/PageBlobsClearPagesHeaders.java @@ -4,11 +4,11 @@ package com.azure.v2.storage.blob.models; -import com.azure.core.v2.annotation.Fluent; -import com.azure.core.v2.util.CoreUtils; -import io.clientcore.core.http.models.DateTimeRfc1123; +import com.azure.v2.core.annotation.Fluent; +import com.azure.v2.core.util.CoreUtils; import io.clientcore.core.http.models.HttpHeaderName; import io.clientcore.core.http.models.HttpHeaders; +import io.clientcore.core.util.DateTimeRfc1123; import java.time.OffsetDateTime; import java.util.Base64; diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/PageBlobsCopyIncrementalHeaders.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/PageBlobsCopyIncrementalHeaders.java index 6ccfd7ab48de..e757704bc2d1 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/PageBlobsCopyIncrementalHeaders.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/PageBlobsCopyIncrementalHeaders.java @@ -4,10 +4,10 @@ package com.azure.v2.storage.blob.models; -import com.azure.core.v2.annotation.Fluent; -import io.clientcore.core.http.models.DateTimeRfc1123; +import com.azure.v2.core.annotation.Fluent; import io.clientcore.core.http.models.HttpHeaderName; import io.clientcore.core.http.models.HttpHeaders; +import io.clientcore.core.util.DateTimeRfc1123; import java.time.OffsetDateTime; diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/PageBlobsCreateHeaders.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/PageBlobsCreateHeaders.java index 696f1cf42937..a82e2ef16a70 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/PageBlobsCreateHeaders.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/PageBlobsCreateHeaders.java @@ -4,11 +4,11 @@ package com.azure.v2.storage.blob.models; -import com.azure.core.v2.annotation.Fluent; -import com.azure.core.v2.util.CoreUtils; -import io.clientcore.core.http.models.DateTimeRfc1123; +import com.azure.v2.core.annotation.Fluent; +import com.azure.v2.core.util.CoreUtils; import io.clientcore.core.http.models.HttpHeaderName; import io.clientcore.core.http.models.HttpHeaders; +import io.clientcore.core.util.DateTimeRfc1123; import java.time.OffsetDateTime; import java.util.Base64; diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/PageBlobsGetPageRangesDiffHeaders.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/PageBlobsGetPageRangesDiffHeaders.java index a5b1dd2a211f..9975f19a68e7 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/PageBlobsGetPageRangesDiffHeaders.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/PageBlobsGetPageRangesDiffHeaders.java @@ -4,10 +4,10 @@ package com.azure.v2.storage.blob.models; -import com.azure.core.v2.annotation.Fluent; -import io.clientcore.core.http.models.DateTimeRfc1123; +import com.azure.v2.core.annotation.Fluent; import io.clientcore.core.http.models.HttpHeaderName; import io.clientcore.core.http.models.HttpHeaders; +import io.clientcore.core.util.DateTimeRfc1123; import java.time.OffsetDateTime; diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/PageBlobsGetPageRangesHeaders.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/PageBlobsGetPageRangesHeaders.java index b3b14a81d3d8..636a8214538a 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/PageBlobsGetPageRangesHeaders.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/PageBlobsGetPageRangesHeaders.java @@ -4,8 +4,8 @@ package com.azure.v2.storage.blob.models; -import com.azure.core.v2.annotation.Fluent; -import io.clientcore.core.http.models.DateTimeRfc1123; +import com.azure.v2.core.annotation.Fluent; +import io.clientcore.core.util.DateTimeRfc1123; import io.clientcore.core.http.models.HttpHeaderName; import io.clientcore.core.http.models.HttpHeaders; diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/PageBlobsResizeHeaders.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/PageBlobsResizeHeaders.java index ad7e37443b8c..e60aab302ad0 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/PageBlobsResizeHeaders.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/PageBlobsResizeHeaders.java @@ -4,8 +4,8 @@ package com.azure.v2.storage.blob.models; -import com.azure.core.v2.annotation.Fluent; -import io.clientcore.core.http.models.DateTimeRfc1123; +import com.azure.v2.core.annotation.Fluent; +import io.clientcore.core.util.DateTimeRfc1123; import io.clientcore.core.http.models.HttpHeaderName; import io.clientcore.core.http.models.HttpHeaders; diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/PageBlobsUpdateSequenceNumberHeaders.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/PageBlobsUpdateSequenceNumberHeaders.java index b5a3defe1757..a1eeef5ea719 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/PageBlobsUpdateSequenceNumberHeaders.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/PageBlobsUpdateSequenceNumberHeaders.java @@ -4,8 +4,8 @@ package com.azure.v2.storage.blob.models; -import com.azure.core.v2.annotation.Fluent; -import io.clientcore.core.http.models.DateTimeRfc1123; +import com.azure.v2.core.annotation.Fluent; +import io.clientcore.core.util.DateTimeRfc1123; import io.clientcore.core.http.models.HttpHeaderName; import io.clientcore.core.http.models.HttpHeaders; diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/PageBlobsUploadPagesFromURLHeaders.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/PageBlobsUploadPagesFromURLHeaders.java index d084c7396a4b..f136b86b3644 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/PageBlobsUploadPagesFromURLHeaders.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/PageBlobsUploadPagesFromURLHeaders.java @@ -4,9 +4,9 @@ package com.azure.v2.storage.blob.models; -import com.azure.core.v2.annotation.Fluent; -import com.azure.core.v2.util.CoreUtils; -import io.clientcore.core.http.models.DateTimeRfc1123; +import com.azure.v2.core.annotation.Fluent; +import com.azure.v2.core.util.CoreUtils; +import io.clientcore.core.util.DateTimeRfc1123; import io.clientcore.core.http.models.HttpHeaderName; import io.clientcore.core.http.models.HttpHeaders; diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/PageBlobsUploadPagesHeaders.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/PageBlobsUploadPagesHeaders.java index efb3a07b6475..1cc291e4a7f7 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/PageBlobsUploadPagesHeaders.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/PageBlobsUploadPagesHeaders.java @@ -4,9 +4,9 @@ package com.azure.v2.storage.blob.models; -import com.azure.core.v2.annotation.Fluent; -import com.azure.core.v2.util.CoreUtils; -import io.clientcore.core.http.models.DateTimeRfc1123; +import com.azure.v2.core.annotation.Fluent; +import com.azure.v2.core.util.CoreUtils; +import io.clientcore.core.util.DateTimeRfc1123; import io.clientcore.core.http.models.HttpHeaderName; import io.clientcore.core.http.models.HttpHeaders; diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/PageList.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/PageList.java index 499a6c908ce6..f482409d4e96 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/PageList.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/PageList.java @@ -4,8 +4,8 @@ package com.azure.v2.storage.blob.models; -import com.azure.core.v2.annotation.Fluent; -import com.azure.core.v2.util.CoreUtils; +import com.azure.v2.core.annotation.Fluent; +import com.azure.v2.core.util.CoreUtils; import io.clientcore.core.serialization.xml.XmlReader; import io.clientcore.core.serialization.xml.XmlSerializable; import io.clientcore.core.serialization.xml.XmlToken; diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/PageRange.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/PageRange.java index 979f1f2c5099..3d55e6cfeaf3 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/PageRange.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/PageRange.java @@ -4,8 +4,8 @@ package com.azure.v2.storage.blob.models; -import com.azure.core.v2.annotation.Fluent; -import com.azure.core.v2.util.CoreUtils; +import com.azure.v2.core.annotation.Fluent; +import com.azure.v2.core.util.CoreUtils; import io.clientcore.core.serialization.xml.XmlReader; import io.clientcore.core.serialization.xml.XmlSerializable; import io.clientcore.core.serialization.xml.XmlToken; diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/QueryFormat.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/QueryFormat.java index ce41c3b52620..06fa332a9162 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/QueryFormat.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/QueryFormat.java @@ -4,8 +4,8 @@ package com.azure.v2.storage.blob.models; -import com.azure.core.v2.annotation.Fluent; -import com.azure.core.v2.util.CoreUtils; +import com.azure.v2.core.annotation.Fluent; +import com.azure.v2.core.util.CoreUtils; import io.clientcore.core.serialization.xml.XmlReader; import io.clientcore.core.serialization.xml.XmlSerializable; import io.clientcore.core.serialization.xml.XmlToken; diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/QueryRequest.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/QueryRequest.java index e6d171bd8fe4..ce29f48f6232 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/QueryRequest.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/QueryRequest.java @@ -4,8 +4,8 @@ package com.azure.v2.storage.blob.models; -import com.azure.core.v2.annotation.Fluent; -import com.azure.core.v2.util.CoreUtils; +import com.azure.v2.core.annotation.Fluent; +import com.azure.v2.core.util.CoreUtils; import io.clientcore.core.serialization.xml.XmlReader; import io.clientcore.core.serialization.xml.XmlSerializable; import io.clientcore.core.serialization.xml.XmlToken; diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/QuerySerialization.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/QuerySerialization.java index 6ae6a318997c..e22d78d6adf5 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/QuerySerialization.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/QuerySerialization.java @@ -4,8 +4,8 @@ package com.azure.v2.storage.blob.models; -import com.azure.core.v2.annotation.Fluent; -import com.azure.core.v2.util.CoreUtils; +import com.azure.v2.core.annotation.Fluent; +import com.azure.v2.core.util.CoreUtils; import io.clientcore.core.serialization.xml.XmlReader; import io.clientcore.core.serialization.xml.XmlSerializable; import io.clientcore.core.serialization.xml.XmlToken; diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ServicesFilterBlobsHeaders.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ServicesFilterBlobsHeaders.java index eae21db4022b..c8004e38d0bb 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ServicesFilterBlobsHeaders.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ServicesFilterBlobsHeaders.java @@ -4,8 +4,8 @@ package com.azure.v2.storage.blob.models; -import com.azure.core.v2.annotation.Fluent; -import io.clientcore.core.http.models.DateTimeRfc1123; +import com.azure.v2.core.annotation.Fluent; +import io.clientcore.core.util.DateTimeRfc1123; import io.clientcore.core.http.models.HttpHeaderName; import io.clientcore.core.http.models.HttpHeaders; diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ServicesGetAccountInfoHeaders.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ServicesGetAccountInfoHeaders.java index 1d2d237084dc..f86de2d04353 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ServicesGetAccountInfoHeaders.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ServicesGetAccountInfoHeaders.java @@ -4,8 +4,8 @@ package com.azure.v2.storage.blob.models; -import com.azure.core.v2.annotation.Fluent; -import io.clientcore.core.http.models.DateTimeRfc1123; +import com.azure.v2.core.annotation.Fluent; +import io.clientcore.core.util.DateTimeRfc1123; import io.clientcore.core.http.models.HttpHeaderName; import io.clientcore.core.http.models.HttpHeaders; diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ServicesGetPropertiesHeaders.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ServicesGetPropertiesHeaders.java index d8429a41b66b..067033ee40a7 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ServicesGetPropertiesHeaders.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ServicesGetPropertiesHeaders.java @@ -4,7 +4,7 @@ package com.azure.v2.storage.blob.models; -import com.azure.core.v2.annotation.Fluent; +import com.azure.v2.core.annotation.Fluent; import io.clientcore.core.http.models.HttpHeaderName; import io.clientcore.core.http.models.HttpHeaders; diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ServicesGetStatisticsHeaders.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ServicesGetStatisticsHeaders.java index 31493c5dd313..5f6fe015df55 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ServicesGetStatisticsHeaders.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ServicesGetStatisticsHeaders.java @@ -4,8 +4,8 @@ package com.azure.v2.storage.blob.models; -import com.azure.core.v2.annotation.Fluent; -import io.clientcore.core.http.models.DateTimeRfc1123; +import com.azure.v2.core.annotation.Fluent; +import io.clientcore.core.util.DateTimeRfc1123; import io.clientcore.core.http.models.HttpHeaderName; import io.clientcore.core.http.models.HttpHeaders; diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ServicesGetUserDelegationKeyHeaders.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ServicesGetUserDelegationKeyHeaders.java index ea2c52cd4436..578f8b508715 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ServicesGetUserDelegationKeyHeaders.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ServicesGetUserDelegationKeyHeaders.java @@ -4,8 +4,8 @@ package com.azure.v2.storage.blob.models; -import com.azure.core.v2.annotation.Fluent; -import io.clientcore.core.http.models.DateTimeRfc1123; +import com.azure.v2.core.annotation.Fluent; +import io.clientcore.core.util.DateTimeRfc1123; import io.clientcore.core.http.models.HttpHeaderName; import io.clientcore.core.http.models.HttpHeaders; diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ServicesListBlobContainersSegmentHeaders.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ServicesListBlobContainersSegmentHeaders.java index d24ebdc6186b..d02f28c3090e 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ServicesListBlobContainersSegmentHeaders.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ServicesListBlobContainersSegmentHeaders.java @@ -4,7 +4,7 @@ package com.azure.v2.storage.blob.models; -import com.azure.core.v2.annotation.Fluent; +import com.azure.v2.core.annotation.Fluent; import io.clientcore.core.http.models.HttpHeaderName; import io.clientcore.core.http.models.HttpHeaders; diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ServicesListBlobContainersSegmentNextHeaders.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ServicesListBlobContainersSegmentNextHeaders.java index 78cbca17164e..8983a50b2357 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ServicesListBlobContainersSegmentNextHeaders.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ServicesListBlobContainersSegmentNextHeaders.java @@ -4,7 +4,7 @@ package com.azure.v2.storage.blob.models; -import com.azure.core.v2.annotation.Fluent; +import com.azure.v2.core.annotation.Fluent; import io.clientcore.core.http.models.HttpHeaderName; import io.clientcore.core.http.models.HttpHeaders; diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ServicesSetPropertiesHeaders.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ServicesSetPropertiesHeaders.java index 03fcb65b62e6..8a503d03d45f 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ServicesSetPropertiesHeaders.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ServicesSetPropertiesHeaders.java @@ -4,7 +4,7 @@ package com.azure.v2.storage.blob.models; -import com.azure.core.v2.annotation.Fluent; +import com.azure.v2.core.annotation.Fluent; import io.clientcore.core.http.models.HttpHeaderName; import io.clientcore.core.http.models.HttpHeaders; diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ServicesSubmitBatchHeaders.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ServicesSubmitBatchHeaders.java index 354be4cbfb03..bf2782228145 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ServicesSubmitBatchHeaders.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ServicesSubmitBatchHeaders.java @@ -4,7 +4,7 @@ package com.azure.v2.storage.blob.models; -import com.azure.core.v2.annotation.Fluent; +import com.azure.v2.core.annotation.Fluent; import io.clientcore.core.http.models.HttpHeaderName; import io.clientcore.core.http.models.HttpHeaders; diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/StaticWebsite.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/StaticWebsite.java index 52cf6a8d428c..f5eeab543bdd 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/StaticWebsite.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/StaticWebsite.java @@ -4,8 +4,8 @@ package com.azure.v2.storage.blob.models; -import com.azure.core.v2.annotation.Fluent; -import com.azure.core.v2.util.CoreUtils; +import com.azure.v2.core.annotation.Fluent; +import com.azure.v2.core.util.CoreUtils; import io.clientcore.core.serialization.xml.XmlReader; import io.clientcore.core.serialization.xml.XmlSerializable; import io.clientcore.core.serialization.xml.XmlToken; diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/StorageError.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/StorageError.java index 81adebb6a0b3..29766cdbd0d3 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/StorageError.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/StorageError.java @@ -4,8 +4,8 @@ package com.azure.v2.storage.blob.models; -import com.azure.core.v2.annotation.Fluent; -import com.azure.core.v2.util.CoreUtils; +import com.azure.v2.core.annotation.Fluent; +import com.azure.v2.core.util.CoreUtils; import io.clientcore.core.serialization.xml.XmlReader; import io.clientcore.core.serialization.xml.XmlSerializable; import io.clientcore.core.serialization.xml.XmlToken; diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/StorageErrorException.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/StorageErrorException.java index 0edf2d55daaa..4a4eeb18bb3a 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/StorageErrorException.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/StorageErrorException.java @@ -4,6 +4,7 @@ package com.azure.v2.storage.blob.models; +import io.clientcore.core.http.exception.HttpExceptionType; import io.clientcore.core.http.exception.HttpResponseException; import io.clientcore.core.http.models.Response; @@ -18,7 +19,7 @@ public final class StorageErrorException extends HttpResponseException { * @param response the HTTP response. */ public StorageErrorException(String message, Response response) { - super(message, response); + super(message, response, HttpExceptionType.fromString(""), null); } /** @@ -29,7 +30,7 @@ public StorageErrorException(String message, Response response) { * @param value the deserialized response value. */ public StorageErrorException(String message, Response response, StorageError value) { - super(message, response, value); + super(message, response, HttpExceptionType.fromString(""), value); } /** diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/UserDelegationKey.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/UserDelegationKey.java index 93e663880efe..5f1ee21232c8 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/UserDelegationKey.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/UserDelegationKey.java @@ -4,8 +4,8 @@ package com.azure.v2.storage.blob.models; -import com.azure.core.v2.annotation.Fluent; -import com.azure.core.v2.util.CoreUtils; +import com.azure.v2.core.annotation.Fluent; +import com.azure.v2.core.util.CoreUtils; import io.clientcore.core.serialization.xml.XmlReader; import io.clientcore.core.serialization.xml.XmlSerializable; import io.clientcore.core.serialization.xml.XmlToken; From 1bf2ed3075c253aa65507faf184f9d93a975d5a9 Mon Sep 17 00:00:00 2001 From: vcolin7 Date: Tue, 11 Feb 2025 16:11:47 -0800 Subject: [PATCH 05/26] Ran spotless --- .../v2/storage/blob/AppendBlobClient.java | 36 +++++++++---------- .../storage/blob/AzureBlobStorageBuilder.java | 4 +-- .../blob/implementation/AppendBlobsImpl.java | 3 +- .../blob/implementation/BlockBlobsImpl.java | 3 +- .../blob/implementation/ContainersImpl.java | 6 ++-- .../blob/implementation/PageBlobsImpl.java | 3 +- .../azure/v2/storage/blob/BlobClientTest.java | 8 ++--- .../v2/storage/blob/BlockBlobClientTest.java | 12 +++---- .../v2/storage/blob/ContainerClientTest.java | 10 +++--- 9 files changed, 38 insertions(+), 47 deletions(-) diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/AppendBlobClient.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/AppendBlobClient.java index c5a2c14db633..38ce80b5b333 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/AppendBlobClient.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/AppendBlobClient.java @@ -84,11 +84,11 @@ public final class AppendBlobClient { @Generated @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) { + 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 this.serviceClient.createWithResponse(containerName, blob, contentLength, timeout, metadata, leaseId, ifModifiedSince, ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, requestId, blobTagsString, immutabilityPolicyExpiry, immutabilityPolicyMode, legalHold, blobHttpHeaders, cpkInfo, encryptionScopeParam, @@ -242,11 +242,11 @@ public Response createNoCustomHeadersWithResponse(String containerName, St @Generated @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) { + 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 this.serviceClient.appendBlockWithResponse(containerName, blob, contentLength, body, timeout, transactionalContentMD5, transactionalContentCrc64, leaseId, maxSize, appendPosition, ifModifiedSince, ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, requestId, structuredBodyType, structuredContentLength, @@ -419,12 +419,12 @@ public Response appendBlockNoCustomHeadersWithResponse(String containerNam @Generated @ServiceMethod(returns = ReturnType.SINGLE) public ResponseBase appendBlockFromUrlWithResponse(String containerName, - String blob, String sourceUrl, long contentLength, String sourceRange, byte[] sourceContentMD5, - byte[] sourceContentcrc64, Integer timeout, byte[] transactionalContentMD5, String leaseId, Long maxSize, - Long appendPosition, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, - String ifNoneMatch, String ifTags, OffsetDateTime sourceIfModifiedSince, OffsetDateTime sourceIfUnmodifiedSince, - String sourceIfMatch, String sourceIfNoneMatch, String requestId, String copySourceAuthorization, - CpkInfo cpkInfo, EncryptionScope encryptionScopeParam, Context context) { + String blob, String sourceUrl, long contentLength, String sourceRange, byte[] sourceContentMD5, + byte[] sourceContentcrc64, Integer timeout, byte[] transactionalContentMD5, String leaseId, Long maxSize, + Long appendPosition, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, + String ifNoneMatch, String ifTags, OffsetDateTime sourceIfModifiedSince, OffsetDateTime sourceIfUnmodifiedSince, + String sourceIfMatch, String sourceIfNoneMatch, String requestId, String copySourceAuthorization, + CpkInfo cpkInfo, EncryptionScope encryptionScopeParam, Context context) { return this.serviceClient.appendBlockFromUrlWithResponse(containerName, blob, sourceUrl, contentLength, sourceRange, sourceContentMD5, sourceContentcrc64, timeout, transactionalContentMD5, leaseId, maxSize, appendPosition, ifModifiedSince, ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, sourceIfModifiedSince, @@ -595,8 +595,8 @@ public Response appendBlockFromUrlNoCustomHeadersWithResponse(String conta @Generated @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) { + Integer timeout, String requestId, String leaseId, OffsetDateTime ifModifiedSince, + OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, Long appendPosition, Context context) { return this.serviceClient.sealWithResponse(containerName, blob, timeout, requestId, leaseId, ifModifiedSince, ifUnmodifiedSince, ifMatch, ifNoneMatch, appendPosition, context); } diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/AzureBlobStorageBuilder.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/AzureBlobStorageBuilder.java index 115439933a75..293932e04e36 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/AzureBlobStorageBuilder.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/AzureBlobStorageBuilder.java @@ -230,8 +230,8 @@ private void validateClient() { private HttpPipeline createHttpPipeline() { Configuration buildConfiguration = (configuration == null) ? Configuration.getGlobalConfiguration() : configuration; - HttpInstrumentationOptions localHttpInstrumentationOptions = this.instrumentationOptions == null - ? new HttpInstrumentationOptions() : this.instrumentationOptions; + HttpInstrumentationOptions localHttpInstrumentationOptions + = this.instrumentationOptions == null ? new HttpInstrumentationOptions() : this.instrumentationOptions; List policies = new ArrayList<>(); String clientName = PROPERTIES.getOrDefault(SDK_NAME, "UnknownName"); String clientVersion = PROPERTIES.getOrDefault(SDK_VERSION, "UnknownVersion"); diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/implementation/AppendBlobsImpl.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/implementation/AppendBlobsImpl.java index 1bbd54699c97..24b483f49d5d 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/implementation/AppendBlobsImpl.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/implementation/AppendBlobsImpl.java @@ -56,8 +56,7 @@ public final class AppendBlobsImpl { * @param client the instance of the service client containing this operation class. */ AppendBlobsImpl(AzureBlobStorageImpl client) { - this.service - = RestProxy.create(AppendBlobsService.class, client.getHttpPipeline()); + this.service = RestProxy.create(AppendBlobsService.class, client.getHttpPipeline()); this.client = client; } diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/implementation/BlockBlobsImpl.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/implementation/BlockBlobsImpl.java index c3492a80955b..e528e156bc7a 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/implementation/BlockBlobsImpl.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/implementation/BlockBlobsImpl.java @@ -63,8 +63,7 @@ public final class BlockBlobsImpl { * @param client the instance of the service client containing this operation class. */ BlockBlobsImpl(AzureBlobStorageImpl client) { - this.service - = RestProxy.create(BlockBlobsService.class, client.getHttpPipeline()); + this.service = RestProxy.create(BlockBlobsService.class, client.getHttpPipeline()); this.client = client; } diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/implementation/ContainersImpl.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/implementation/ContainersImpl.java index d83bedde041f..a0f27a53079d 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/implementation/ContainersImpl.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/implementation/ContainersImpl.java @@ -77,8 +77,7 @@ public final class ContainersImpl { * @param client the instance of the service client containing this operation class. */ ContainersImpl(AzureBlobStorageImpl client) { - this.service - = RestProxy.create(ContainersService.class, client.getHttpPipeline()); + this.service = RestProxy.create(ContainersService.class, client.getHttpPipeline()); this.client = client; } @@ -2146,7 +2145,8 @@ public Response listBlobFlatSegmentNoCustomHeaders public ListBlobsHierarchySegmentResponse listBlobHierarchySegment(String containerName, String delimiter, String prefix, String marker, Integer maxresults, List include, Integer timeout, String requestId) { - ResponseBase response = listBlobHierarchySegmentWithResponse(containerName, delimiter, prefix, marker, maxresults, include, + ResponseBase response + = listBlobHierarchySegmentWithResponse(containerName, delimiter, prefix, marker, maxresults, include, timeout, requestId, Context.none()); return response.getValue(); } diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/implementation/PageBlobsImpl.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/implementation/PageBlobsImpl.java index d2664faca374..bab166d852ea 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/implementation/PageBlobsImpl.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/implementation/PageBlobsImpl.java @@ -64,8 +64,7 @@ public final class PageBlobsImpl { * @param client the instance of the service client containing this operation class. */ PageBlobsImpl(AzureBlobStorageImpl client) { - this.service - = RestProxy.create(PageBlobsService.class, client.getHttpPipeline()); + this.service = RestProxy.create(PageBlobsService.class, client.getHttpPipeline()); this.client = client; } diff --git a/sdk/storage/azure-storage-blob-v2/src/test/java/com/azure/v2/storage/blob/BlobClientTest.java b/sdk/storage/azure-storage-blob-v2/src/test/java/com/azure/v2/storage/blob/BlobClientTest.java index e24948d10960..6efab7ce4d92 100644 --- a/sdk/storage/azure-storage-blob-v2/src/test/java/com/azure/v2/storage/blob/BlobClientTest.java +++ b/sdk/storage/azure-storage-blob-v2/src/test/java/com/azure/v2/storage/blob/BlobClientTest.java @@ -12,17 +12,15 @@ public class BlobClientTest { @Disabled public void testDownload() throws IOException { - BlobClient blobClient = new AzureBlobStorageBuilder() - .url("sas-url") - .buildBlobClient(); + BlobClient blobClient = new AzureBlobStorageBuilder().url("sas-url").buildBlobClient(); - InputStream sampleText = blobClient.download("testcontainer", "sample.txt", null, null, null, null, null, null, null, null, null, null, null, null, null, null, null); + InputStream sampleText = blobClient.download("testcontainer", "sample.txt", null, null, null, null, null, null, + null, null, null, null, null, null, null, null, null); byte[] bytes = new byte[2048]; sampleText.read(bytes); String text = new String(bytes); System.out.println(text); - } } diff --git a/sdk/storage/azure-storage-blob-v2/src/test/java/com/azure/v2/storage/blob/BlockBlobClientTest.java b/sdk/storage/azure-storage-blob-v2/src/test/java/com/azure/v2/storage/blob/BlockBlobClientTest.java index 6d18f1ee8747..9e1c9a7e2406 100644 --- a/sdk/storage/azure-storage-blob-v2/src/test/java/com/azure/v2/storage/blob/BlockBlobClientTest.java +++ b/sdk/storage/azure-storage-blob-v2/src/test/java/com/azure/v2/storage/blob/BlockBlobClientTest.java @@ -9,16 +9,14 @@ public class BlockBlobClientTest { @Test @Disabled public void testUpload() { - BlockBlobClient blockBlobClient = new AzureBlobStorageBuilder() - .url("https://srnagarstorage.blob.core.windows.net/?sv=2022-11-02&ss=bfqt&srt=sco&sp=rwdlacupiytfx&se=2024-12-23T03:55:26Z&st=2024-12-12T19:55:26Z&spr=https&sig=7Dj0MbP2z9bnXRQdoohMtCKsfzXYfUKrRTfboiRZ%2Bv8%3D") - .buildBlockBlobClient(); + BlockBlobClient blockBlobClient = new AzureBlobStorageBuilder().url( + "https://srnagarstorage.blob.core.windows.net/?sv=2022-11-02&ss=bfqt&srt=sco&sp=rwdlacupiytfx&se=2024-12-23T03:55:26Z&st=2024-12-12T19:55:26Z&spr=https&sig=7Dj0MbP2z9bnXRQdoohMtCKsfzXYfUKrRTfboiRZ%2Bv8%3D") + .buildBlockBlobClient(); String content = "Hello World!"; blockBlobClient.upload("testcontainer", "upload.txt", content.length(), BinaryData.fromString(content), null, - null, null, null, null, null, null, - null, null, null, null, null, null, - null, null, null, null, null, - null, null, null); + null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, + null, null); } } diff --git a/sdk/storage/azure-storage-blob-v2/src/test/java/com/azure/v2/storage/blob/ContainerClientTest.java b/sdk/storage/azure-storage-blob-v2/src/test/java/com/azure/v2/storage/blob/ContainerClientTest.java index 0f92907ef127..f206244791ce 100644 --- a/sdk/storage/azure-storage-blob-v2/src/test/java/com/azure/v2/storage/blob/ContainerClientTest.java +++ b/sdk/storage/azure-storage-blob-v2/src/test/java/com/azure/v2/storage/blob/ContainerClientTest.java @@ -9,15 +9,13 @@ public class ContainerClientTest { @Disabled public void testContainterClient() { - ContainerClient containerClient = new AzureBlobStorageBuilder() - .url("sas-url") - .buildContainerClient(); + ContainerClient containerClient = new AzureBlobStorageBuilder().url("sas-url").buildContainerClient(); containerClient.create("container", null, null, null, null, null); // This will not work yet as xml serialization is not supported in clientcore. -// Response testcontainer = containerClient.listBlobHierarchySegmentNoCustomHeadersWithResponse("testcontainer", null, null, null, null, null, null, null, null); -// System.out.println(testcontainer.getStatusCode()); -// System.out.println(testcontainer.getValue().getSegment().getBlobItems().get(0)); + // Response testcontainer = containerClient.listBlobHierarchySegmentNoCustomHeadersWithResponse("testcontainer", null, null, null, null, null, null, null, null); + // System.out.println(testcontainer.getStatusCode()); + // System.out.println(testcontainer.getValue().getSegment().getBlobItems().get(0)); } } From e2856f1f533cdc60d8ae3ed1a08622d85814ee94 Mon Sep 17 00:00:00 2001 From: vcolin7 Date: Tue, 11 Feb 2025 17:13:21 -0800 Subject: [PATCH 06/26] Fixed artifactId issues with core-v2 and added it to the banned dependencies exclusion list. --- sdk/core/azure-core-v2/README.md | 4 ++-- sdk/core/azure-core-v2/pom.xml | 4 ++-- sdk/parents/azure-client-sdk-parent-v2/pom.xml | 1 + sdk/storage/azure-storage-blob-v2/pom.xml | 4 ++-- 4 files changed, 7 insertions(+), 6 deletions(-) diff --git a/sdk/core/azure-core-v2/README.md b/sdk/core/azure-core-v2/README.md index ab22faedf5ed..e0cd67fb110b 100644 --- a/sdk/core/azure-core-v2/README.md +++ b/sdk/core/azure-core-v2/README.md @@ -17,10 +17,10 @@ Azure Core V2 provides shared primitives, abstractions, and helpers for modern J If you want to take dependency on a particular version of the library that is not present in the BOM, add the direct dependency to your project as follows. -[//]: # ({x-version-update-start;com.azure:azure-core-v2;current}) +[//]: # ({x-version-update-start;com.azure.v2:azure-core-v2;current}) ```xml - com.azure + com.azure.v2 azure-core-v2 1.0.0-beta.1 diff --git a/sdk/core/azure-core-v2/pom.xml b/sdk/core/azure-core-v2/pom.xml index 519e0c3796fa..6b994ca90726 100644 --- a/sdk/core/azure-core-v2/pom.xml +++ b/sdk/core/azure-core-v2/pom.xml @@ -12,10 +12,10 @@ ../../parents/azure-client-sdk-parent-v2 - com.azure + com.azure.v2 azure-core-v2 jar - 1.0.0-beta.1 + 1.0.0-beta.1 Microsoft Azure Java Core V2 Library This package contains core types for Azure Java V2 clients. diff --git a/sdk/parents/azure-client-sdk-parent-v2/pom.xml b/sdk/parents/azure-client-sdk-parent-v2/pom.xml index 62b58b64085b..5ca50497f4f9 100644 --- a/sdk/parents/azure-client-sdk-parent-v2/pom.xml +++ b/sdk/parents/azure-client-sdk-parent-v2/pom.xml @@ -611,6 +611,7 @@ com.azure:* + com.azure.v2:* com.azure.resourcemanager:* com.azure.spring:* io.clientcore:* diff --git a/sdk/storage/azure-storage-blob-v2/pom.xml b/sdk/storage/azure-storage-blob-v2/pom.xml index 0bd42fdd2553..9f14c7cbd9e4 100644 --- a/sdk/storage/azure-storage-blob-v2/pom.xml +++ b/sdk/storage/azure-storage-blob-v2/pom.xml @@ -29,9 +29,9 @@ - com.azure + com.azure.v2 azure-core-v2 - 1.0.0-beta.1 + 1.0.0-beta.1 org.junit.jupiter From e337f4a0a23db22657665bb02bc1c146cc1b2e0e Mon Sep 17 00:00:00 2001 From: Srikanta Date: Tue, 18 Feb 2025 10:21:10 -0800 Subject: [PATCH 07/26] Update storage v2 to latest clientcore version --- sdk/storage/azure-storage-blob-v2/pom.xml | 9 +- .../v2/storage/blob/AppendBlobClient.java | 341 +-- .../storage/blob/AzureBlobStorageBuilder.java | 156 +- .../com/azure/v2/storage/blob/BlobClient.java | 1583 ++-------- .../v2/storage/blob/BlockBlobClient.java | 509 +-- .../v2/storage/blob/ContainerClient.java | 971 ++---- .../azure/v2/storage/blob/PageBlobClient.java | 712 +---- .../v2/storage/blob/StorageServiceClient.java | 339 +- .../blob/implementation/AppendBlobsImpl.java | 675 +--- .../implementation/AzureBlobStorageImpl.java | 24 +- .../blob/implementation/BlobsImpl.java | 2727 +++++------------ .../blob/implementation/BlockBlobsImpl.java | 1064 ++----- .../blob/implementation/ContainersImpl.java | 1662 +++------- .../blob/implementation/PageBlobsImpl.java | 1462 +++------ .../blob/implementation/ServicesImpl.java | 768 ++--- .../models/BlobSignedIdentifierWrapper.java | 14 +- .../v2/storage/blob/models/AccessTier.java | 89 +- .../v2/storage/blob/models/AccountKind.java | 2 +- .../AppendBlobsAppendBlockFromUrlHeaders.java | 71 +- .../models/AppendBlobsAppendBlockHeaders.java | 83 +- .../blob/models/AppendBlobsCreateHeaders.java | 67 +- .../blob/models/AppendBlobsSealHeaders.java | 46 +- .../v2/storage/blob/models/ArchiveStatus.java | 63 +- .../blob/models/ArrowConfiguration.java | 24 +- .../v2/storage/blob/models/ArrowField.java | 31 +- .../storage/blob/models/BlobAccessPolicy.java | 36 +- .../blob/models/BlobAnalyticsLogging.java | 36 +- .../models/BlobContainerEncryptionScope.java | 13 +- .../blob/models/BlobContainerItem.java | 40 +- .../models/BlobContainerItemProperties.java | 78 +- .../blob/models/BlobContainersSegment.java | 44 +- .../blob/models/BlobCopySourceTagsMode.java | 61 +- .../v2/storage/blob/models/BlobCorsRule.java | 36 +- .../storage/blob/models/BlobDeleteType.java | 59 +- .../v2/storage/blob/models/BlobErrorCode.java | 289 +- .../blob/models/BlobExpiryOptions.java | 65 +- .../blob/models/BlobFlatListSegment.java | 23 +- .../blob/models/BlobHierarchyListSegment.java | 27 +- .../storage/blob/models/BlobHttpHeaders.java | 34 +- .../models/BlobImmutabilityPolicyMode.java | 2 +- .../storage/blob/models/BlobItemInternal.java | 63 +- .../models/BlobItemPropertiesInternal.java | 199 +- .../v2/storage/blob/models/BlobMetrics.java | 32 +- .../v2/storage/blob/models/BlobName.java | 24 +- .../blob/models/BlobPrefixInternal.java | 20 +- .../blob/models/BlobRetentionPolicy.java | 24 +- .../blob/models/BlobServiceProperties.java | 48 +- .../blob/models/BlobServiceStatistics.java | 20 +- .../blob/models/BlobSignedIdentifier.java | 24 +- .../azure/v2/storage/blob/models/BlobTag.java | 23 +- .../v2/storage/blob/models/BlobTags.java | 23 +- .../v2/storage/blob/models/BlobType.java | 2 +- .../models/BlobsAbortCopyFromURLHeaders.java | 34 +- .../blob/models/BlobsAcquireLeaseHeaders.java | 46 +- .../blob/models/BlobsBreakLeaseHeaders.java | 46 +- .../blob/models/BlobsChangeLeaseHeaders.java | 46 +- .../blob/models/BlobsCopyFromURLHeaders.java | 75 +- .../models/BlobsCreateSnapshotHeaders.java | 54 +- .../blob/models/BlobsDeleteHeaders.java | 34 +- .../BlobsDeleteImmutabilityPolicyHeaders.java | 34 +- .../blob/models/BlobsDownloadHeaders.java | 231 +- .../models/BlobsGetAccountInfoHeaders.java | 46 +- .../models/BlobsGetPropertiesHeaders.java | 235 +- .../blob/models/BlobsGetTagsHeaders.java | 34 +- .../blob/models/BlobsQueryHeaders.java | 175 +- .../blob/models/BlobsReleaseLeaseHeaders.java | 42 +- .../blob/models/BlobsRenewLeaseHeaders.java | 46 +- .../blob/models/BlobsSetExpiryHeaders.java | 42 +- .../models/BlobsSetHttpHeadersHeaders.java | 46 +- .../BlobsSetImmutabilityPolicyHeaders.java | 42 +- .../blob/models/BlobsSetLegalHoldHeaders.java | 38 +- .../blob/models/BlobsSetMetadataHeaders.java | 58 +- .../blob/models/BlobsSetTagsHeaders.java | 34 +- .../blob/models/BlobsSetTierHeaders.java | 27 +- .../models/BlobsStartCopyFromURLHeaders.java | 54 +- .../blob/models/BlobsUndeleteHeaders.java | 34 +- .../azure/v2/storage/blob/models/Block.java | 27 +- .../BlockBlobsCommitBlockListHeaders.java | 75 +- .../models/BlockBlobsGetBlockListHeaders.java | 50 +- .../BlockBlobsPutBlobFromUrlHeaders.java | 67 +- .../BlockBlobsStageBlockFromURLHeaders.java | 63 +- .../models/BlockBlobsStageBlockHeaders.java | 67 +- .../blob/models/BlockBlobsUploadHeaders.java | 71 +- .../v2/storage/blob/models/BlockList.java | 28 +- .../v2/storage/blob/models/BlockListType.java | 2 +- .../storage/blob/models/BlockLookupList.java | 32 +- .../v2/storage/blob/models/ClearRange.java | 24 +- .../models/ContainersAcquireLeaseHeaders.java | 46 +- .../models/ContainersBreakLeaseHeaders.java | 46 +- .../models/ContainersChangeLeaseHeaders.java | 46 +- .../blob/models/ContainersCreateHeaders.java | 42 +- .../blob/models/ContainersDeleteHeaders.java | 34 +- .../models/ContainersFilterBlobsHeaders.java | 34 +- .../ContainersGetAccessPolicyHeaders.java | 48 +- .../ContainersGetAccountInfoHeaders.java | 46 +- .../ContainersGetPropertiesHeaders.java | 96 +- .../ContainersListBlobFlatSegmentHeaders.java | 38 +- ...ainersListBlobHierarchySegmentHeaders.java | 38 +- .../models/ContainersReleaseLeaseHeaders.java | 42 +- .../blob/models/ContainersRenameHeaders.java | 34 +- .../models/ContainersRenewLeaseHeaders.java | 46 +- .../blob/models/ContainersRestoreHeaders.java | 34 +- .../ContainersSetAccessPolicyHeaders.java | 42 +- .../models/ContainersSetMetadataHeaders.java | 42 +- .../models/ContainersSubmitBatchHeaders.java | 23 +- .../storage/blob/models/CopyStatusType.java | 2 +- .../azure/v2/storage/blob/models/CpkInfo.java | 17 +- .../models/DeleteSnapshotsOptionType.java | 2 +- .../models/DelimitedTextConfiguration.java | 36 +- .../blob/models/EncryptionAlgorithmType.java | 2 +- .../storage/blob/models/EncryptionScope.java | 9 +- .../storage/blob/models/FilterBlobItem.java | 35 +- .../blob/models/FilterBlobSegment.java | 36 +- .../blob/models/FilterBlobsIncludeItem.java | 2 +- .../storage/blob/models/GeoReplication.java | 34 +- .../blob/models/GeoReplicationStatus.java | 63 +- .../blob/models/JsonTextConfiguration.java | 20 +- .../azure/v2/storage/blob/models/KeyInfo.java | 24 +- .../blob/models/LeaseDurationType.java | 2 +- .../storage/blob/models/LeaseStateType.java | 2 +- .../storage/blob/models/LeaseStatusType.java | 2 +- .../models/ListBlobContainersIncludeType.java | 2 +- .../models/ListBlobsFlatSegmentResponse.java | 44 +- .../ListBlobsHierarchySegmentResponse.java | 48 +- .../blob/models/ListBlobsIncludeItem.java | 2 +- .../models/PageBlobsClearPagesHeaders.java | 71 +- .../PageBlobsCopyIncrementalHeaders.java | 50 +- .../blob/models/PageBlobsCreateHeaders.java | 67 +- .../PageBlobsGetPageRangesDiffHeaders.java | 46 +- .../models/PageBlobsGetPageRangesHeaders.java | 46 +- .../blob/models/PageBlobsResizeHeaders.java | 46 +- .../PageBlobsUpdateSequenceNumberHeaders.java | 46 +- .../PageBlobsUploadPagesFromURLHeaders.java | 67 +- .../models/PageBlobsUploadPagesHeaders.java | 79 +- .../v2/storage/blob/models/PageList.java | 27 +- .../v2/storage/blob/models/PageRange.java | 23 +- .../models/PremiumPageBlobAccessTier.java | 78 +- .../storage/blob/models/PublicAccessType.java | 60 +- .../v2/storage/blob/models/QueryFormat.java | 35 +- .../storage/blob/models/QueryFormatType.java | 2 +- .../v2/storage/blob/models/QueryRequest.java | 46 +- .../blob/models/QuerySerialization.java | 19 +- .../blob/models/RehydratePriority.java | 60 +- .../blob/models/SequenceNumberActionType.java | 2 +- .../models/ServicesFilterBlobsHeaders.java | 34 +- .../models/ServicesGetAccountInfoHeaders.java | 46 +- .../models/ServicesGetPropertiesHeaders.java | 27 +- .../models/ServicesGetStatisticsHeaders.java | 34 +- .../ServicesGetUserDelegationKeyHeaders.java | 34 +- ...vicesListBlobContainersSegmentHeaders.java | 27 +- ...sListBlobContainersSegmentNextHeaders.java | 27 +- .../models/ServicesSetPropertiesHeaders.java | 27 +- .../models/ServicesSubmitBatchHeaders.java | 23 +- .../azure/v2/storage/blob/models/SkuName.java | 2 +- .../v2/storage/blob/models/StaticWebsite.java | 31 +- .../v2/storage/blob/models/StorageError.java | 19 +- .../blob/models/StorageErrorException.java | 11 +- .../blob/models/UserDelegationKey.java | 47 +- .../v2/storage/blob/BlockBlobClientTest.java | 6 +- .../azure-storage-blob-v2/swagger/autorest.md | 4 +- 160 files changed, 6408 insertions(+), 12918 deletions(-) diff --git a/sdk/storage/azure-storage-blob-v2/pom.xml b/sdk/storage/azure-storage-blob-v2/pom.xml index 9f14c7cbd9e4..febdbb3c2fcf 100644 --- a/sdk/storage/azure-storage-blob-v2/pom.xml +++ b/sdk/storage/azure-storage-blob-v2/pom.xml @@ -29,9 +29,14 @@ - com.azure.v2 + io.clientcore + core + 1.0.0-beta.5 + + + com.azure azure-core-v2 - 1.0.0-beta.1 + 1.0.0-beta.1 org.junit.jupiter diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/AppendBlobClient.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/AppendBlobClient.java index 38ce80b5b333..239be86b58ea 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/AppendBlobClient.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/AppendBlobClient.java @@ -4,24 +4,17 @@ package com.azure.v2.storage.blob; -import com.azure.v2.core.annotation.Generated; -import com.azure.v2.core.annotation.ReturnType; -import com.azure.v2.core.annotation.ServiceClient; -import com.azure.v2.core.annotation.ServiceMethod; -import com.azure.v2.core.http.rest.ResponseBase; import com.azure.v2.storage.blob.implementation.AppendBlobsImpl; -import com.azure.v2.storage.blob.models.AppendBlobsAppendBlockFromUrlHeaders; -import com.azure.v2.storage.blob.models.AppendBlobsAppendBlockHeaders; -import com.azure.v2.storage.blob.models.AppendBlobsCreateHeaders; -import com.azure.v2.storage.blob.models.AppendBlobsSealHeaders; import com.azure.v2.storage.blob.models.BlobHttpHeaders; import com.azure.v2.storage.blob.models.BlobImmutabilityPolicyMode; import com.azure.v2.storage.blob.models.CpkInfo; import com.azure.v2.storage.blob.models.EncryptionScope; import com.azure.v2.storage.blob.models.StorageErrorException; +import io.clientcore.core.annotations.Metadata; +import io.clientcore.core.annotations.ServiceClient; +import io.clientcore.core.http.models.RequestOptions; import io.clientcore.core.http.models.Response; -import io.clientcore.core.util.Context; -import io.clientcore.core.util.binarydata.BinaryData; +import io.clientcore.core.models.binarydata.BinaryData; import java.time.OffsetDateTime; import java.util.Map; @@ -30,22 +23,22 @@ */ @ServiceClient(builder = AzureBlobStorageBuilder.class) public final class AppendBlobClient { - @Generated + @Metadata(generated = true) private final AppendBlobsImpl serviceClient; /** * Initializes an instance of AppendBlobClient class. - * + * * @param serviceClient the service client implementation. */ - @Generated + @Metadata(generated = true) AppendBlobClient(AppendBlobsImpl serviceClient) { this.serviceClient = serviceClient; } /** * 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. @@ -75,29 +68,28 @@ public final class AppendBlobClient { * @param blobHttpHeaders Parameter group. * @param cpkInfo Parameter group. * @param encryptionScopeParam Parameter group. - * @param context The context to associate with this operation. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws StorageErrorException thrown if 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 the response. */ - @Generated - @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) { + @Metadata(generated = true) + public Response 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, + RequestOptions requestOptions) { return this.serviceClient.createWithResponse(containerName, blob, contentLength, timeout, metadata, leaseId, ifModifiedSince, ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, requestId, blobTagsString, immutabilityPolicyExpiry, immutabilityPolicyMode, legalHold, blobHttpHeaders, cpkInfo, encryptionScopeParam, - context); + requestOptions); } /** * 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. @@ -131,8 +123,7 @@ public ResponseBase createWithResponse(String co * @throws StorageErrorException 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) + @Metadata(generated = true) 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, @@ -143,63 +134,11 @@ public void create(String containerName, String blob, long contentLength, Intege immutabilityPolicyMode, legalHold, blobHttpHeaders, cpkInfo, encryptionScopeParam); } - /** - * The Create Append Blob operation creates a new append blob. - * - * @param containerName The container name. - * @param blob The blob name. - * @param contentLength The length of the request. - * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. - * @param metadata Optional. Specifies a user-defined name-value pair associated with the blob. If no name-value - * pairs are specified, the operation will copy the metadata from the source blob or file to the destination blob. - * If one or more name-value pairs are specified, the destination blob is created with the specified metadata, and - * metadata is not copied from the source blob or file. Note that beginning with version 2009-09-19, metadata names - * must adhere to the naming rules for C# identifiers. See Naming and Referencing Containers, Blobs, and Metadata - * for more information. - * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. - * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the - * specified date/time. - * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since - * the specified date/time. - * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. - * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. - * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. - * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. - * @param blobTagsString Optional. Used to set blob tags in various blob operations. - * @param immutabilityPolicyExpiry Specifies the date time when the blobs immutability policy is set to expire. - * @param immutabilityPolicyMode Specifies the immutability policy mode to set on the blob. - * @param legalHold Specified if a legal hold should be set on the blob. - * @param blobHttpHeaders Parameter group. - * @param cpkInfo Parameter group. - * @param encryptionScopeParam Parameter group. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws StorageErrorException 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 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) { - return this.serviceClient.createNoCustomHeadersWithResponse(containerName, blob, contentLength, timeout, - metadata, leaseId, ifModifiedSince, ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, requestId, - blobTagsString, immutabilityPolicyExpiry, immutabilityPolicyMode, legalHold, blobHttpHeaders, cpkInfo, - encryptionScopeParam, context); - } - /** * The Append Block operation commits a new block of data to the end of an existing append blob. The Append Block * operation is permitted only if the blob was created with x-ms-blob-type set to AppendBlob. Append Block is * supported only on version 2015-02-21 version or later. - * + * * @param containerName The container name. * @param blob The blob name. * @param contentLength The length of the request. @@ -233,31 +172,30 @@ public Response createNoCustomHeadersWithResponse(String containerName, St * 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. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws StorageErrorException thrown if 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 the response. */ - @Generated - @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) { + @Metadata(generated = true) + public Response 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, + RequestOptions requestOptions) { return this.serviceClient.appendBlockWithResponse(containerName, blob, contentLength, body, timeout, transactionalContentMD5, transactionalContentCrc64, leaseId, maxSize, appendPosition, ifModifiedSince, ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, requestId, structuredBodyType, structuredContentLength, - cpkInfo, encryptionScopeParam, context); + cpkInfo, encryptionScopeParam, requestOptions); } /** * 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. @@ -295,8 +233,7 @@ public ResponseBase appendBlockWithResponse * @throws StorageErrorException 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) + @Metadata(generated = true) 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, @@ -307,69 +244,11 @@ public void appendBlock(String containerName, String blob, long contentLength, B ifNoneMatch, ifTags, requestId, structuredBodyType, structuredContentLength, cpkInfo, encryptionScopeParam); } - /** - * The Append Block operation commits a new block of data to the end of an existing append blob. The Append Block - * operation is permitted only if the blob was created with x-ms-blob-type set to AppendBlob. Append Block is - * supported only on version 2015-02-21 version or later. - * - * @param containerName The container name. - * @param blob The blob name. - * @param contentLength The length of the request. - * @param body Initial data. - * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. - * @param transactionalContentMD5 Specify the transactional md5 for the body, to be validated by the service. - * @param transactionalContentCrc64 Specify the transactional crc64 for the body, to be validated by the service. - * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. - * @param maxSize Optional conditional header. The max length in bytes permitted for the append blob. If the Append - * Block operation would cause the blob to exceed that limit or if the blob size is already greater than the value - * specified in this header, the request will fail with MaxBlobSizeConditionNotMet error (HTTP status code 412 - - * Precondition Failed). - * @param appendPosition Optional conditional header, used only for the Append Block operation. A number indicating - * the byte offset to compare. Append Block will succeed only if the append position is equal to this number. If it - * is not, the request will fail with the AppendPositionConditionNotMet error (HTTP status code 412 - Precondition - * Failed). - * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the - * specified date/time. - * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since - * the specified date/time. - * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. - * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. - * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. - * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. - * @param 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 StorageErrorException 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 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) { - return this.serviceClient.appendBlockNoCustomHeadersWithResponse(containerName, blob, contentLength, body, - timeout, transactionalContentMD5, transactionalContentCrc64, leaseId, maxSize, appendPosition, - ifModifiedSince, ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, requestId, structuredBodyType, - structuredContentLength, cpkInfo, encryptionScopeParam, context); - } - /** * The Append Block operation commits a new block of data to the end of an existing append blob where the contents * are read from a source url. The Append Block operation is permitted only if the blob was created with * x-ms-blob-type set to AppendBlob. Append Block is supported only on version 2015-02-21 version or later. - * + * * @param containerName The container name. * @param blob The blob name. * @param sourceUrl Specify a URL to the copy source. @@ -410,33 +289,32 @@ public Response appendBlockNoCustomHeadersWithResponse(String containerNam * copy source. * @param cpkInfo Parameter group. * @param encryptionScopeParam Parameter group. - * @param context The context to associate with this operation. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws StorageErrorException thrown if 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 the response. */ - @Generated - @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, + @Metadata(generated = true) + public Response appendBlockFromUrlWithResponse(String containerName, String blob, String sourceUrl, + long contentLength, String sourceRange, byte[] sourceContentMD5, byte[] sourceContentcrc64, Integer timeout, + byte[] transactionalContentMD5, String leaseId, Long maxSize, Long appendPosition, + OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, + String ifTags, OffsetDateTime sourceIfModifiedSince, OffsetDateTime sourceIfUnmodifiedSince, String sourceIfMatch, String sourceIfNoneMatch, String requestId, String copySourceAuthorization, - CpkInfo cpkInfo, EncryptionScope encryptionScopeParam, Context context) { + CpkInfo cpkInfo, EncryptionScope encryptionScopeParam, RequestOptions requestOptions) { return this.serviceClient.appendBlockFromUrlWithResponse(containerName, blob, sourceUrl, contentLength, sourceRange, sourceContentMD5, sourceContentcrc64, timeout, transactionalContentMD5, leaseId, maxSize, appendPosition, ifModifiedSince, ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, sourceIfModifiedSince, sourceIfUnmodifiedSince, sourceIfMatch, sourceIfNoneMatch, requestId, copySourceAuthorization, cpkInfo, - encryptionScopeParam, context); + encryptionScopeParam, requestOptions); } /** * 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. @@ -481,8 +359,7 @@ public ResponseBase appendBlockFromU * @throws StorageErrorException 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) + @Metadata(generated = true) 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, @@ -497,77 +374,10 @@ public void appendBlockFromUrl(String containerName, String blob, String sourceU encryptionScopeParam); } - /** - * The Append Block operation commits a new block of data to the end of an existing append blob where the contents - * are read from a source url. The Append Block operation is permitted only if the blob was created with - * x-ms-blob-type set to AppendBlob. Append Block is supported only on version 2015-02-21 version or later. - * - * @param containerName The container name. - * @param blob The blob name. - * @param sourceUrl Specify a URL to the copy source. - * @param contentLength The length of the request. - * @param sourceRange Bytes of source data in the specified range. - * @param sourceContentMD5 Specify the md5 calculated for the range of bytes that must be read from the copy source. - * @param sourceContentcrc64 Specify the crc64 calculated for the range of bytes that must be read from the copy - * source. - * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. - * @param transactionalContentMD5 Specify the transactional md5 for the body, to be validated by the service. - * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. - * @param maxSize Optional conditional header. The max length in bytes permitted for the append blob. If the Append - * Block operation would cause the blob to exceed that limit or if the blob size is already greater than the value - * specified in this header, the request will fail with MaxBlobSizeConditionNotMet error (HTTP status code 412 - - * Precondition Failed). - * @param appendPosition Optional conditional header, used only for the Append Block operation. A number indicating - * the byte offset to compare. Append Block will succeed only if the append position is equal to this number. If it - * is not, the request will fail with the AppendPositionConditionNotMet error (HTTP status code 412 - Precondition - * Failed). - * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the - * specified date/time. - * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since - * the specified date/time. - * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. - * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. - * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. - * @param sourceIfModifiedSince Specify this header value to operate only on a blob if it has been modified since - * the specified date/time. - * @param sourceIfUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified - * since the specified date/time. - * @param sourceIfMatch Specify an ETag value to operate only on blobs with a matching value. - * @param sourceIfNoneMatch Specify an ETag value to operate only on blobs without a matching value. - * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. - * @param copySourceAuthorization Only Bearer type is supported. Credentials should be a valid OAuth access token to - * copy source. - * @param cpkInfo Parameter group. - * @param encryptionScopeParam Parameter group. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws StorageErrorException 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 Response appendBlockFromUrlNoCustomHeadersWithResponse(String containerName, String blob, - String sourceUrl, long contentLength, String sourceRange, byte[] sourceContentMD5, byte[] sourceContentcrc64, - Integer timeout, byte[] transactionalContentMD5, String leaseId, Long maxSize, Long appendPosition, - OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, - String ifTags, OffsetDateTime sourceIfModifiedSince, OffsetDateTime sourceIfUnmodifiedSince, - String sourceIfMatch, String sourceIfNoneMatch, String requestId, String copySourceAuthorization, - CpkInfo cpkInfo, EncryptionScope encryptionScopeParam, Context context) { - return this.serviceClient.appendBlockFromUrlNoCustomHeadersWithResponse(containerName, blob, sourceUrl, - contentLength, sourceRange, sourceContentMD5, sourceContentcrc64, timeout, transactionalContentMD5, leaseId, - maxSize, appendPosition, ifModifiedSince, ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, - sourceIfModifiedSince, sourceIfUnmodifiedSince, sourceIfMatch, sourceIfNoneMatch, requestId, - copySourceAuthorization, cpkInfo, encryptionScopeParam, context); - } - /** * 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 @@ -586,25 +396,24 @@ public Response appendBlockFromUrlNoCustomHeadersWithResponse(String conta * 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. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws StorageErrorException thrown if 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 the response. */ - @Generated - @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) { + @Metadata(generated = true) + public Response sealWithResponse(String containerName, String blob, Integer timeout, String requestId, + String leaseId, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, + String ifNoneMatch, Long appendPosition, RequestOptions requestOptions) { return this.serviceClient.sealWithResponse(containerName, blob, timeout, requestId, leaseId, ifModifiedSince, - ifUnmodifiedSince, ifMatch, ifNoneMatch, appendPosition, context); + ifUnmodifiedSince, ifMatch, ifNoneMatch, appendPosition, requestOptions); } /** * 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 @@ -627,49 +436,11 @@ public ResponseBase sealWithResponse(String contai * @throws StorageErrorException 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) + @Metadata(generated = true) public void seal(String containerName, String blob, Integer timeout, String requestId, String leaseId, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, Long appendPosition) { this.serviceClient.seal(containerName, blob, timeout, requestId, leaseId, ifModifiedSince, ifUnmodifiedSince, ifMatch, ifNoneMatch, appendPosition); } - - /** - * The Seal operation seals the Append Blob to make it read-only. Seal is supported only on version 2019-12-12 - * version or later. - * - * @param containerName The container name. - * @param blob The blob name. - * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. - * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. - * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. - * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the - * specified date/time. - * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since - * the specified date/time. - * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. - * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. - * @param appendPosition Optional conditional header, used only for the Append Block operation. A number indicating - * the byte offset to compare. Append Block will succeed only if the append position is equal to this number. If it - * is not, the request will fail with the AppendPositionConditionNotMet error (HTTP status code 412 - Precondition - * Failed). - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws StorageErrorException 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 Response sealNoCustomHeadersWithResponse(String containerName, String blob, Integer timeout, - String requestId, String leaseId, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, - String ifMatch, String ifNoneMatch, Long appendPosition, Context context) { - return this.serviceClient.sealNoCustomHeadersWithResponse(containerName, blob, timeout, requestId, leaseId, - ifModifiedSince, ifUnmodifiedSince, ifMatch, ifNoneMatch, appendPosition, context); - } } diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/AzureBlobStorageBuilder.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/AzureBlobStorageBuilder.java index 293932e04e36..99754af63990 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/AzureBlobStorageBuilder.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/AzureBlobStorageBuilder.java @@ -4,29 +4,26 @@ package com.azure.v2.storage.blob; -import com.azure.v2.core.annotation.Generated; -import com.azure.v2.core.annotation.ServiceClientBuilder; -import com.azure.v2.core.http.policy.AddDatePolicy; -import com.azure.v2.core.http.policy.AddHeadersFromContextPolicy; -import com.azure.v2.core.http.policy.RequestIdPolicy; import com.azure.v2.storage.blob.implementation.AzureBlobStorageImpl; +import io.clientcore.core.annotations.Metadata; +import io.clientcore.core.annotations.ServiceClientBuilder; import io.clientcore.core.http.client.HttpClient; -import io.clientcore.core.http.models.HttpInstrumentationOptions; -import io.clientcore.core.http.models.HttpRedirectOptions; -import io.clientcore.core.http.models.HttpRetryOptions; +import io.clientcore.core.http.models.ProxyOptions; +import io.clientcore.core.http.pipeline.HttpInstrumentationOptions; import io.clientcore.core.http.pipeline.HttpInstrumentationPolicy; import io.clientcore.core.http.pipeline.HttpPipeline; import io.clientcore.core.http.pipeline.HttpPipelineBuilder; import io.clientcore.core.http.pipeline.HttpPipelinePolicy; +import io.clientcore.core.http.pipeline.HttpRedirectOptions; +import io.clientcore.core.http.pipeline.HttpRedirectPolicy; +import io.clientcore.core.http.pipeline.HttpRetryOptions; import io.clientcore.core.http.pipeline.HttpRetryPolicy; -import io.clientcore.core.models.traits.ConfigurationTrait; -import io.clientcore.core.models.traits.HttpTrait; -import io.clientcore.core.util.configuration.Configuration; - +import io.clientcore.core.traits.ConfigurationTrait; +import io.clientcore.core.traits.HttpTrait; +import io.clientcore.core.traits.ProxyTrait; +import io.clientcore.core.utils.configuration.Configuration; import java.util.ArrayList; -import java.util.HashMap; import java.util.List; -import java.util.Map; import java.util.Objects; /** @@ -40,24 +37,21 @@ PageBlobClient.class, AppendBlobClient.class, BlockBlobClient.class }) -public final class AzureBlobStorageBuilder - implements HttpTrait, ConfigurationTrait { - @Generated +public final class AzureBlobStorageBuilder implements HttpTrait, + ProxyTrait, ConfigurationTrait { + @Metadata(generated = true) private static final String SDK_NAME = "name"; - @Generated + @Metadata(generated = true) private static final String SDK_VERSION = "version"; - @Generated - private static final Map PROPERTIES = new HashMap<>(); - - @Generated + @Metadata(generated = true) private final List pipelinePolicies; /** * Create an instance of the AzureBlobStorageBuilder. */ - @Generated + @Metadata(generated = true) public AzureBlobStorageBuilder() { this.pipelinePolicies = new ArrayList<>(); } @@ -65,13 +59,13 @@ public AzureBlobStorageBuilder() { /* * The HTTP pipeline to send requests through. */ - @Generated + @Metadata(generated = true) private HttpPipeline pipeline; /** * {@inheritDoc}. */ - @Generated + @Metadata(generated = true) @Override public AzureBlobStorageBuilder httpPipeline(HttpPipeline pipeline) { this.pipeline = pipeline; @@ -81,45 +75,29 @@ public AzureBlobStorageBuilder httpPipeline(HttpPipeline pipeline) { /* * The HTTP client used to send the request. */ - @Generated + @Metadata(generated = true) private HttpClient httpClient; /** * {@inheritDoc}. */ - @Generated + @Metadata(generated = true) @Override public AzureBlobStorageBuilder httpClient(HttpClient httpClient) { this.httpClient = httpClient; return this; } - /* - * The logging configuration for HTTP requests and responses. - */ - @Generated - private HttpInstrumentationOptions instrumentationOptions; - - /** - * {@inheritDoc}. - */ - @Generated - @Override - public AzureBlobStorageBuilder httpInstrumentationOptions(HttpInstrumentationOptions instrumentationOptions) { - this.instrumentationOptions = instrumentationOptions; - return this; - } - /* * The retry options to configure retry policy for failed requests. */ - @Generated + @Metadata(generated = true) private HttpRetryOptions retryOptions; /** * {@inheritDoc}. */ - @Generated + @Metadata(generated = true) @Override public AzureBlobStorageBuilder httpRetryOptions(HttpRetryOptions retryOptions) { this.retryOptions = retryOptions; @@ -129,7 +107,7 @@ public AzureBlobStorageBuilder httpRetryOptions(HttpRetryOptions retryOptions) { /** * {@inheritDoc}. */ - @Generated + @Metadata(generated = true) @Override public AzureBlobStorageBuilder addHttpPipelinePolicy(HttpPipelinePolicy customPolicy) { Objects.requireNonNull(customPolicy, "'customPolicy' cannot be null."); @@ -140,29 +118,61 @@ public AzureBlobStorageBuilder addHttpPipelinePolicy(HttpPipelinePolicy customPo /* * The redirect options to configure redirect policy */ - @Generated + @Metadata(generated = true) private HttpRedirectOptions redirectOptions; /** * {@inheritDoc}. */ - @Generated + @Metadata(generated = true) @Override public AzureBlobStorageBuilder httpRedirectOptions(HttpRedirectOptions redirectOptions) { this.redirectOptions = redirectOptions; return this; } + /* + * The instrumentation configuration for HTTP requests and responses. + */ + @Metadata(generated = true) + private HttpInstrumentationOptions httpInstrumentationOptions; + + /** + * {@inheritDoc}. + */ + @Metadata(generated = true) + @Override + public AzureBlobStorageBuilder httpInstrumentationOptions(HttpInstrumentationOptions httpInstrumentationOptions) { + this.httpInstrumentationOptions = httpInstrumentationOptions; + return this; + } + + /* + * The proxy options used during construction of the service client. + */ + @Metadata(generated = true) + private ProxyOptions proxyOptions; + + /** + * {@inheritDoc}. + */ + @Metadata(generated = true) + @Override + public AzureBlobStorageBuilder proxyOptions(ProxyOptions proxyOptions) { + this.proxyOptions = proxyOptions; + return this; + } + /* * The configuration store that is used during construction of the service client. */ - @Generated + @Metadata(generated = true) private Configuration configuration; /** * {@inheritDoc}. */ - @Generated + @Metadata(generated = true) @Override public AzureBlobStorageBuilder configuration(Configuration configuration) { this.configuration = configuration; @@ -172,7 +182,7 @@ public AzureBlobStorageBuilder configuration(Configuration configuration) { /* * The URL of the service account, container, or blob that is the target of the desired operation. */ - @Generated + @Metadata(generated = true) private String url; /** @@ -181,7 +191,7 @@ public AzureBlobStorageBuilder configuration(Configuration configuration) { * @param url the url value. * @return the AzureBlobStorageBuilder. */ - @Generated + @Metadata(generated = true) public AzureBlobStorageBuilder url(String url) { this.url = url; return this; @@ -190,7 +200,7 @@ public AzureBlobStorageBuilder url(String url) { /* * Specifies the version of the operation to use for this request. */ - @Generated + @Metadata(generated = true) private String version; /** @@ -199,7 +209,7 @@ public AzureBlobStorageBuilder url(String url) { * @param version the version value. * @return the AzureBlobStorageBuilder. */ - @Generated + @Metadata(generated = true) public AzureBlobStorageBuilder version(String version) { this.version = version; return this; @@ -210,7 +220,7 @@ public AzureBlobStorageBuilder version(String version) { * * @return an instance of AzureBlobStorageImpl. */ - @Generated + @Metadata(generated = true) private AzureBlobStorageImpl buildInnerClient() { this.validateClient(); HttpPipeline localPipeline = (pipeline != null) ? pipeline : createHttpPipeline(); @@ -219,35 +229,27 @@ private AzureBlobStorageImpl buildInnerClient() { return client; } - @Generated + @Metadata(generated = true) private void validateClient() { // This method is invoked from 'buildInnerClient'/'buildClient' method. // Developer can customize this method, to validate that the necessary conditions are met for the new client. Objects.requireNonNull(url, "'url' cannot be null."); } - @Generated + @Metadata(generated = true) private HttpPipeline createHttpPipeline() { Configuration buildConfiguration = (configuration == null) ? Configuration.getGlobalConfiguration() : configuration; - HttpInstrumentationOptions localHttpInstrumentationOptions - = this.instrumentationOptions == null ? new HttpInstrumentationOptions() : this.instrumentationOptions; + HttpInstrumentationOptions localHttpInstrumentationOptions = this.httpInstrumentationOptions == null + ? new HttpInstrumentationOptions() + : this.httpInstrumentationOptions; + HttpPipelineBuilder httpPipelineBuilder = new HttpPipelineBuilder(); List policies = new ArrayList<>(); - String clientName = PROPERTIES.getOrDefault(SDK_NAME, "UnknownName"); - String clientVersion = PROPERTIES.getOrDefault(SDK_VERSION, "UnknownVersion"); - policies.add(new RequestIdPolicy()); - policies.add(new AddHeadersFromContextPolicy()); - this.pipelinePolicies.stream().forEach(p -> policies.add(p)); + policies.add(redirectOptions == null ? new HttpRedirectPolicy() : new HttpRedirectPolicy(redirectOptions)); policies.add(retryOptions == null ? new HttpRetryPolicy() : new HttpRetryPolicy(retryOptions)); - policies.add(new AddDatePolicy()); this.pipelinePolicies.stream().forEach(p -> policies.add(p)); policies.add(new HttpInstrumentationPolicy(localHttpInstrumentationOptions)); - HttpPipelineBuilder httpPipelineBuilder = new HttpPipelineBuilder().httpClient(httpClient); - - for (HttpPipelinePolicy policy : policies) { - httpPipelineBuilder.addPolicy(policy); - } - + policies.forEach(httpPipelineBuilder::addPolicy); return httpPipelineBuilder.build(); } @@ -256,7 +258,7 @@ private HttpPipeline createHttpPipeline() { * * @return an instance of ServiceClient. */ - @Generated + @Metadata(generated = true) public StorageServiceClient buildServiceClient() { return new StorageServiceClient(buildInnerClient().getServices()); } @@ -266,7 +268,7 @@ public StorageServiceClient buildServiceClient() { * * @return an instance of ContainerClient. */ - @Generated + @Metadata(generated = true) public ContainerClient buildContainerClient() { return new ContainerClient(buildInnerClient().getContainers()); } @@ -276,7 +278,7 @@ public ContainerClient buildContainerClient() { * * @return an instance of BlobClient. */ - @Generated + @Metadata(generated = true) public BlobClient buildBlobClient() { return new BlobClient(buildInnerClient().getBlobs()); } @@ -286,7 +288,7 @@ public BlobClient buildBlobClient() { * * @return an instance of PageBlobClient. */ - @Generated + @Metadata(generated = true) public PageBlobClient buildPageBlobClient() { return new PageBlobClient(buildInnerClient().getPageBlobs()); } @@ -296,7 +298,7 @@ public PageBlobClient buildPageBlobClient() { * * @return an instance of AppendBlobClient. */ - @Generated + @Metadata(generated = true) public AppendBlobClient buildAppendBlobClient() { return new AppendBlobClient(buildInnerClient().getAppendBlobs()); } @@ -306,7 +308,7 @@ public AppendBlobClient buildAppendBlobClient() { * * @return an instance of BlockBlobClient. */ - @Generated + @Metadata(generated = true) public BlockBlobClient buildBlockBlobClient() { return new BlockBlobClient(buildInnerClient().getBlockBlobs()); } diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/BlobClient.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/BlobClient.java index c4ec7af2cbb7..c4f608ac631f 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/BlobClient.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/BlobClient.java @@ -4,11 +4,6 @@ package com.azure.v2.storage.blob; -import com.azure.v2.core.annotation.Generated; -import com.azure.v2.core.annotation.ReturnType; -import com.azure.v2.core.annotation.ServiceClient; -import com.azure.v2.core.annotation.ServiceMethod; -import com.azure.v2.core.http.rest.ResponseBase; import com.azure.v2.storage.blob.implementation.BlobsImpl; import com.azure.v2.storage.blob.models.AccessTier; import com.azure.v2.storage.blob.models.BlobCopySourceTagsMode; @@ -16,30 +11,6 @@ import com.azure.v2.storage.blob.models.BlobExpiryOptions; import com.azure.v2.storage.blob.models.BlobHttpHeaders; import com.azure.v2.storage.blob.models.BlobImmutabilityPolicyMode; -import com.azure.v2.storage.blob.models.BlobsAbortCopyFromURLHeaders; -import com.azure.v2.storage.blob.models.BlobsAcquireLeaseHeaders; -import com.azure.v2.storage.blob.models.BlobsBreakLeaseHeaders; -import com.azure.v2.storage.blob.models.BlobsChangeLeaseHeaders; -import com.azure.v2.storage.blob.models.BlobsCopyFromURLHeaders; -import com.azure.v2.storage.blob.models.BlobsCreateSnapshotHeaders; -import com.azure.v2.storage.blob.models.BlobsDeleteHeaders; -import com.azure.v2.storage.blob.models.BlobsDeleteImmutabilityPolicyHeaders; -import com.azure.v2.storage.blob.models.BlobsDownloadHeaders; -import com.azure.v2.storage.blob.models.BlobsGetAccountInfoHeaders; -import com.azure.v2.storage.blob.models.BlobsGetPropertiesHeaders; -import com.azure.v2.storage.blob.models.BlobsGetTagsHeaders; -import com.azure.v2.storage.blob.models.BlobsQueryHeaders; -import com.azure.v2.storage.blob.models.BlobsReleaseLeaseHeaders; -import com.azure.v2.storage.blob.models.BlobsRenewLeaseHeaders; -import com.azure.v2.storage.blob.models.BlobsSetExpiryHeaders; -import com.azure.v2.storage.blob.models.BlobsSetHttpHeadersHeaders; -import com.azure.v2.storage.blob.models.BlobsSetImmutabilityPolicyHeaders; -import com.azure.v2.storage.blob.models.BlobsSetLegalHoldHeaders; -import com.azure.v2.storage.blob.models.BlobsSetMetadataHeaders; -import com.azure.v2.storage.blob.models.BlobsSetTagsHeaders; -import com.azure.v2.storage.blob.models.BlobsSetTierHeaders; -import com.azure.v2.storage.blob.models.BlobsStartCopyFromURLHeaders; -import com.azure.v2.storage.blob.models.BlobsUndeleteHeaders; import com.azure.v2.storage.blob.models.BlobTags; import com.azure.v2.storage.blob.models.CpkInfo; import com.azure.v2.storage.blob.models.DeleteSnapshotsOptionType; @@ -47,8 +18,10 @@ import com.azure.v2.storage.blob.models.QueryRequest; import com.azure.v2.storage.blob.models.RehydratePriority; import com.azure.v2.storage.blob.models.StorageErrorException; +import io.clientcore.core.annotations.Metadata; +import io.clientcore.core.annotations.ServiceClient; +import io.clientcore.core.http.models.RequestOptions; import io.clientcore.core.http.models.Response; -import io.clientcore.core.util.Context; import java.io.InputStream; import java.time.OffsetDateTime; import java.util.Map; @@ -58,15 +31,15 @@ */ @ServiceClient(builder = AzureBlobStorageBuilder.class) public final class BlobClient { - @Generated + @Metadata(generated = true) private final BlobsImpl serviceClient; /** * Initializes an instance of BlobClient class. - * + * * @param serviceClient the service client implementation. */ - @Generated + @Metadata(generated = true) BlobClient(BlobsImpl serviceClient) { this.serviceClient = serviceClient; } @@ -74,7 +47,7 @@ public final class BlobClient { /** * 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 @@ -104,28 +77,27 @@ public final class BlobClient { * @param requestId Provides a 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. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws StorageErrorException 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}. + * @return the response. */ - @Generated - @ServiceMethod(returns = ReturnType.SINGLE) - public ResponseBase downloadWithResponse(String containerName, String blob, - String snapshot, String versionId, Integer timeout, String range, String leaseId, Boolean rangeGetContentMD5, + @Metadata(generated = true) + public Response 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) { + CpkInfo cpkInfo, RequestOptions requestOptions) { return this.serviceClient.downloadWithResponse(containerName, blob, snapshot, versionId, timeout, range, leaseId, rangeGetContentMD5, rangeGetContentCRC64, structuredBodyType, ifModifiedSince, ifUnmodifiedSince, - ifMatch, ifNoneMatch, ifTags, requestId, cpkInfo, context); + ifMatch, ifNoneMatch, ifTags, requestId, cpkInfo, requestOptions); } /** * 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 @@ -160,8 +132,7 @@ public ResponseBase downloadWithResponse(Stri * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the response. */ - @Generated - @ServiceMethod(returns = ReturnType.SINGLE) + @Metadata(generated = true) 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, @@ -171,61 +142,10 @@ public InputStream download(String containerName, String blob, String snapshot, ifNoneMatch, ifTags, requestId, cpkInfo); } - /** - * The Download operation reads or downloads a blob from the system, including its metadata and properties. You can - * also call Download to read a snapshot or version. - * - * @param containerName The container name. - * @param blob The blob name. - * @param snapshot The snapshot parameter is an opaque DateTime value that, when present, specifies the blob - * snapshot to retrieve. For more information on working with blob snapshots, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/creating-a-snapshot-of-a-blob">Creating - * a Snapshot of a Blob.</a>. - * @param versionId The version id parameter is an opaque DateTime value that, when present, specifies the version - * of the blob to operate on. It's for service version 2019-10-10 and newer. - * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. - * @param 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 StorageErrorException 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 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) { - return this.serviceClient.downloadNoCustomHeadersWithResponse(containerName, blob, snapshot, versionId, timeout, - range, leaseId, rangeGetContentMD5, rangeGetContentCRC64, structuredBodyType, ifModifiedSince, - ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, requestId, cpkInfo, 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 @@ -248,26 +168,25 @@ public Response downloadNoCustomHeadersWithResponse(String containe * @param requestId Provides a 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. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws StorageErrorException thrown if 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 the response. */ - @Generated - @ServiceMethod(returns = ReturnType.SINGLE) - public ResponseBase getPropertiesWithResponse(String containerName, String blob, - String snapshot, String versionId, Integer timeout, String leaseId, OffsetDateTime ifModifiedSince, + @Metadata(generated = true) + public Response 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) { + CpkInfo cpkInfo, RequestOptions requestOptions) { return this.serviceClient.getPropertiesWithResponse(containerName, blob, snapshot, versionId, timeout, leaseId, - ifModifiedSince, ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, requestId, cpkInfo, context); + ifModifiedSince, ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, requestId, cpkInfo, requestOptions); } /** * 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 @@ -294,8 +213,7 @@ public ResponseBase getPropertiesWithResponse(S * @throws StorageErrorException 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) + @Metadata(generated = true) 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) { @@ -303,49 +221,6 @@ public void getProperties(String containerName, String blob, String snapshot, St ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, requestId, cpkInfo); } - /** - * The Get Properties operation returns all user-defined metadata, standard HTTP properties, and system properties - * for the blob. It does not return the content of the blob. - * - * @param containerName The container name. - * @param blob The blob name. - * @param snapshot The snapshot parameter is an opaque DateTime value that, when present, specifies the blob - * snapshot to retrieve. For more information on working with blob snapshots, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/creating-a-snapshot-of-a-blob">Creating - * a Snapshot of a Blob.</a>. - * @param versionId The version id parameter is an opaque DateTime value that, when present, specifies the version - * of the blob to operate on. It's for service version 2019-10-10 and newer. - * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. - * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. - * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the - * specified date/time. - * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since - * the specified date/time. - * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. - * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. - * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. - * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. - * @param cpkInfo Parameter group. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws StorageErrorException 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 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) { - return this.serviceClient.getPropertiesNoCustomHeadersWithResponse(containerName, blob, snapshot, versionId, - timeout, leaseId, ifModifiedSince, ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, requestId, cpkInfo, - context); - } - /** * If the storage account's soft delete feature is disabled then, when a blob is deleted, it is permanently removed * from the storage account. If the storage account's soft delete feature is enabled, then, when a blob is deleted, @@ -362,7 +237,7 @@ public Response getPropertiesNoCustomHeadersWithResponse(String containerN * 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 @@ -389,21 +264,20 @@ public Response getPropertiesNoCustomHeadersWithResponse(String containerN * analytics logs when storage analytics logging is enabled. * @param blobDeleteType Optional. Only possible value is 'permanent', which specifies to permanently delete a blob * if blob soft delete is enabled. - * @param context The context to associate with this operation. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws StorageErrorException thrown if 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 the response. */ - @Generated - @ServiceMethod(returns = ReturnType.SINGLE) - public ResponseBase deleteWithResponse(String containerName, String blob, String snapshot, - String versionId, Integer timeout, String leaseId, DeleteSnapshotsOptionType deleteSnapshots, - OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, - String ifTags, String requestId, BlobDeleteType blobDeleteType, Context context) { + @Metadata(generated = true) + public Response 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, RequestOptions requestOptions) { return this.serviceClient.deleteWithResponse(containerName, blob, snapshot, versionId, timeout, leaseId, deleteSnapshots, ifModifiedSince, ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, requestId, - blobDeleteType, context); + blobDeleteType, requestOptions); } /** @@ -422,7 +296,7 @@ public ResponseBase deleteWithResponse(String containe * automatic snapshot using snapshot timestamp or version id. You can restore the blob by calling Put or Copy Blob * API with automatic snapshot as source. Deleting automatic snapshot requires shared key or special SAS/RBAC * permissions. - * + * * @param containerName The container name. * @param blob The blob name. * @param snapshot The snapshot parameter is an opaque DateTime value that, when present, specifies the blob @@ -453,8 +327,7 @@ public ResponseBase deleteWithResponse(String containe * @throws StorageErrorException 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) + @Metadata(generated = true) 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, @@ -463,69 +336,9 @@ public void delete(String containerName, String blob, String snapshot, String ve ifModifiedSince, ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, requestId, blobDeleteType); } - /** - * If the storage account's soft delete feature is disabled then, when a blob is deleted, it is permanently removed - * from the storage account. If the storage account's soft delete feature is enabled, then, when a blob is deleted, - * it is marked for deletion and becomes inaccessible immediately. However, the blob service retains the blob or - * snapshot for the number of days specified by the DeleteRetentionPolicy section of [Storage service properties] - * (Set-Blob-Service-Properties.md). After the specified number of days has passed, the blob's data is permanently - * removed from the storage account. Note that you continue to be charged for the soft-deleted blob's storage until - * it is permanently removed. Use the List Blobs API and specify the "include=deleted" query parameter to discover - * which blobs and snapshots have been soft deleted. You can then use the Undelete Blob API to restore a - * soft-deleted blob. All other operations on a soft-deleted blob or snapshot causes the service to return an HTTP - * status code of 404 (ResourceNotFound). If the storage account's automatic snapshot feature is enabled, then, when - * a blob is deleted, an automatic snapshot is created. The blob becomes inaccessible immediately. All other - * operations on the blob causes the service to return an HTTP status code of 404 (ResourceNotFound). You can access - * automatic snapshot using snapshot timestamp or version id. You can restore the blob by calling Put or Copy Blob - * API with automatic snapshot as source. Deleting automatic snapshot requires shared key or special SAS/RBAC - * permissions. - * - * @param containerName The container name. - * @param blob The blob name. - * @param snapshot The snapshot parameter is an opaque DateTime value that, when present, specifies the blob - * snapshot to retrieve. For more information on working with blob snapshots, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/creating-a-snapshot-of-a-blob">Creating - * a Snapshot of a Blob.</a>. - * @param versionId The version id parameter is an opaque DateTime value that, when present, specifies the version - * of the blob to operate on. It's for service version 2019-10-10 and newer. - * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. - * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. - * @param deleteSnapshots Required if the blob has associated snapshots. Specify one of the following two options: - * include: Delete the base blob and all of its snapshots. only: Delete only the blob's snapshots and not the blob - * itself. - * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the - * specified date/time. - * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since - * the specified date/time. - * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. - * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. - * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. - * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. - * @param blobDeleteType Optional. Only possible value is 'permanent', which specifies to permanently delete a blob - * if blob soft delete is enabled. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws StorageErrorException 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 Response deleteNoCustomHeadersWithResponse(String containerName, String blob, String snapshot, - String versionId, Integer timeout, String leaseId, DeleteSnapshotsOptionType deleteSnapshots, - OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, - String ifTags, String requestId, BlobDeleteType blobDeleteType, Context context) { - return this.serviceClient.deleteNoCustomHeadersWithResponse(containerName, blob, snapshot, versionId, timeout, - leaseId, deleteSnapshots, ifModifiedSince, ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, requestId, - blobDeleteType, context); - } - /** * Undelete a blob that was previously soft deleted. - * + * * @param containerName The container name. * @param blob The blob name. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a @@ -533,22 +346,21 @@ public Response deleteNoCustomHeadersWithResponse(String containerName, St * Timeouts for Blob Service Operations.</a>. * @param requestId Provides a 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. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws StorageErrorException thrown if 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 the response. */ - @Generated - @ServiceMethod(returns = ReturnType.SINGLE) - public ResponseBase undeleteWithResponse(String containerName, String blob, - Integer timeout, String requestId, Context context) { - return this.serviceClient.undeleteWithResponse(containerName, blob, timeout, requestId, context); + @Metadata(generated = true) + public Response undeleteWithResponse(String containerName, String blob, Integer timeout, String requestId, + RequestOptions requestOptions) { + return this.serviceClient.undeleteWithResponse(containerName, blob, timeout, requestId, requestOptions); } /** * 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 @@ -560,38 +372,14 @@ public ResponseBase undeleteWithResponse(String cont * @throws StorageErrorException 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) + @Metadata(generated = true) public void undelete(String containerName, String blob, Integer timeout, String requestId) { this.serviceClient.undelete(containerName, blob, timeout, requestId); } - /** - * Undelete a blob that was previously soft deleted. - * - * @param containerName The container name. - * @param blob The blob name. - * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. - * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws StorageErrorException 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 Response undeleteNoCustomHeadersWithResponse(String containerName, String blob, Integer timeout, - String requestId, Context context) { - return this.serviceClient.undeleteNoCustomHeadersWithResponse(containerName, blob, timeout, requestId, context); - } - /** * Sets the time a blob will expire and be deleted. - * + * * @param containerName The container name. * @param blob The blob name. * @param expiryOptions Required. Indicates mode of the expiry time. @@ -601,23 +389,22 @@ public Response undeleteNoCustomHeadersWithResponse(String containerName, * @param requestId Provides a 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. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws StorageErrorException thrown if 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 the response. */ - @Generated - @ServiceMethod(returns = ReturnType.SINGLE) - public ResponseBase setExpiryWithResponse(String containerName, String blob, - BlobExpiryOptions expiryOptions, Integer timeout, String requestId, String expiresOn, Context context) { + @Metadata(generated = true) + public Response setExpiryWithResponse(String containerName, String blob, BlobExpiryOptions expiryOptions, + Integer timeout, String requestId, String expiresOn, RequestOptions requestOptions) { return this.serviceClient.setExpiryWithResponse(containerName, blob, expiryOptions, timeout, requestId, - expiresOn, context); + expiresOn, requestOptions); } /** * 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. @@ -631,42 +418,15 @@ public ResponseBase setExpiryWithResponse(String co * @throws StorageErrorException 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) + @Metadata(generated = true) public void setExpiry(String containerName, String blob, BlobExpiryOptions expiryOptions, Integer timeout, String requestId, String expiresOn) { this.serviceClient.setExpiry(containerName, blob, expiryOptions, timeout, requestId, expiresOn); } - /** - * Sets the time a blob will expire and be deleted. - * - * @param containerName The container name. - * @param blob The blob name. - * @param expiryOptions Required. Indicates mode of the expiry time. - * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. - * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. - * @param expiresOn The time to set the blob to expiry. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws StorageErrorException 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 Response setExpiryNoCustomHeadersWithResponse(String containerName, String blob, - BlobExpiryOptions expiryOptions, Integer timeout, String requestId, String expiresOn, Context context) { - return this.serviceClient.setExpiryNoCustomHeadersWithResponse(containerName, blob, expiryOptions, timeout, - requestId, expiresOn, context); - } - /** * The Set HTTP Headers operation sets system properties on the blob. - * + * * @param containerName The container name. * @param blob The blob name. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a @@ -683,25 +443,23 @@ public Response setExpiryNoCustomHeadersWithResponse(String containerName, * @param requestId Provides a 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. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws StorageErrorException thrown if 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 the response. */ - @Generated - @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) { + @Metadata(generated = true) + public Response setHttpHeadersWithResponse(String containerName, String blob, Integer timeout, String leaseId, + OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, + String ifTags, String requestId, BlobHttpHeaders blobHttpHeaders, RequestOptions requestOptions) { return this.serviceClient.setHttpHeadersWithResponse(containerName, blob, timeout, leaseId, ifModifiedSince, - ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, requestId, blobHttpHeaders, context); + ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, requestId, blobHttpHeaders, requestOptions); } /** * 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 @@ -722,8 +480,7 @@ public ResponseBase setHttpHeadersWithResponse * @throws StorageErrorException 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) + @Metadata(generated = true) 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) { @@ -731,43 +488,9 @@ public void setHttpHeaders(String containerName, String blob, Integer timeout, S ifMatch, ifNoneMatch, ifTags, requestId, blobHttpHeaders); } - /** - * The Set HTTP Headers operation sets system properties on the blob. - * - * @param containerName The container name. - * @param blob The blob name. - * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. - * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. - * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the - * specified date/time. - * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since - * the specified date/time. - * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. - * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. - * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. - * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. - * @param blobHttpHeaders Parameter group. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws StorageErrorException 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 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) { - return this.serviceClient.setHttpHeadersNoCustomHeadersWithResponse(containerName, blob, timeout, leaseId, - ifModifiedSince, ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, requestId, blobHttpHeaders, context); - } - /** * The Set Immutability Policy operation sets the immutability policy on the blob. - * + * * @param containerName The container name. * @param blob The blob name. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a @@ -785,25 +508,24 @@ public Response setHttpHeadersNoCustomHeadersWithResponse(String container * 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. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws StorageErrorException thrown if 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 the response. */ - @Generated - @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) { + @Metadata(generated = true) + public Response setImmutabilityPolicyWithResponse(String containerName, String blob, Integer timeout, + String requestId, OffsetDateTime ifUnmodifiedSince, OffsetDateTime immutabilityPolicyExpiry, + BlobImmutabilityPolicyMode immutabilityPolicyMode, String snapshot, String versionId, + RequestOptions requestOptions) { return this.serviceClient.setImmutabilityPolicyWithResponse(containerName, blob, timeout, requestId, - ifUnmodifiedSince, immutabilityPolicyExpiry, immutabilityPolicyMode, snapshot, versionId, context); + ifUnmodifiedSince, immutabilityPolicyExpiry, immutabilityPolicyMode, snapshot, versionId, requestOptions); } /** * 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 @@ -825,8 +547,7 @@ public ResponseBase setImmutabilityPoli * @throws StorageErrorException 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) + @Metadata(generated = true) public void setImmutabilityPolicy(String containerName, String blob, Integer timeout, String requestId, OffsetDateTime ifUnmodifiedSince, OffsetDateTime immutabilityPolicyExpiry, BlobImmutabilityPolicyMode immutabilityPolicyMode, String snapshot, String versionId) { @@ -834,45 +555,9 @@ public void setImmutabilityPolicy(String containerName, String blob, Integer tim immutabilityPolicyExpiry, immutabilityPolicyMode, snapshot, versionId); } - /** - * The Set Immutability Policy operation sets the immutability policy on the blob. - * - * @param containerName The container name. - * @param blob The blob name. - * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. - * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. - * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since - * the specified date/time. - * @param immutabilityPolicyExpiry Specifies the date time when the blobs immutability policy is set to expire. - * @param immutabilityPolicyMode Specifies the immutability policy mode to set on the blob. - * @param snapshot The snapshot parameter is an opaque DateTime value that, when present, specifies the blob - * snapshot to retrieve. For more information on working with blob snapshots, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/creating-a-snapshot-of-a-blob">Creating - * a Snapshot of a Blob.</a>. - * @param versionId The version id parameter is an opaque DateTime value that, when present, specifies the version - * of the blob to operate on. It's for service version 2019-10-10 and newer. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws StorageErrorException 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 Response setImmutabilityPolicyNoCustomHeadersWithResponse(String containerName, String blob, - Integer timeout, String requestId, OffsetDateTime ifUnmodifiedSince, OffsetDateTime immutabilityPolicyExpiry, - BlobImmutabilityPolicyMode immutabilityPolicyMode, String snapshot, String versionId, Context context) { - return this.serviceClient.setImmutabilityPolicyNoCustomHeadersWithResponse(containerName, blob, timeout, - requestId, ifUnmodifiedSince, immutabilityPolicyExpiry, immutabilityPolicyMode, snapshot, versionId, - context); - } - /** * The Delete Immutability Policy operation deletes the immutability policy on the blob. - * + * * @param containerName The container name. * @param blob The blob name. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a @@ -886,24 +571,22 @@ public Response setImmutabilityPolicyNoCustomHeadersWithResponse(String co * 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. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws StorageErrorException thrown if 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 the response. */ - @Generated - @ServiceMethod(returns = ReturnType.SINGLE) - public ResponseBase deleteImmutabilityPolicyWithResponse( - String containerName, String blob, Integer timeout, String requestId, String snapshot, String versionId, - Context context) { + @Metadata(generated = true) + public Response deleteImmutabilityPolicyWithResponse(String containerName, String blob, Integer timeout, + String requestId, String snapshot, String versionId, RequestOptions requestOptions) { return this.serviceClient.deleteImmutabilityPolicyWithResponse(containerName, blob, timeout, requestId, - snapshot, versionId, context); + snapshot, versionId, requestOptions); } /** * 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 @@ -921,46 +604,15 @@ public ResponseBase deleteImmutabili * @throws StorageErrorException 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) + @Metadata(generated = true) public void deleteImmutabilityPolicy(String containerName, String blob, Integer timeout, String requestId, String snapshot, String versionId) { this.serviceClient.deleteImmutabilityPolicy(containerName, blob, timeout, requestId, snapshot, versionId); } - /** - * The Delete Immutability Policy operation deletes the immutability policy on the blob. - * - * @param containerName The container name. - * @param blob The blob name. - * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. - * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. - * @param snapshot The snapshot parameter is an opaque DateTime value that, when present, specifies the blob - * snapshot to retrieve. For more information on working with blob snapshots, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/creating-a-snapshot-of-a-blob">Creating - * a Snapshot of a Blob.</a>. - * @param versionId The version id parameter is an opaque DateTime value that, when present, specifies the version - * of the blob to operate on. It's for service version 2019-10-10 and newer. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws StorageErrorException 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 Response deleteImmutabilityPolicyNoCustomHeadersWithResponse(String containerName, String blob, - Integer timeout, String requestId, String snapshot, String versionId, Context context) { - return this.serviceClient.deleteImmutabilityPolicyNoCustomHeadersWithResponse(containerName, blob, timeout, - requestId, snapshot, versionId, context); - } - /** * The Set Legal Hold operation sets a legal hold on the blob. - * + * * @param containerName The container name. * @param blob The blob name. * @param legalHold Specified if a legal hold should be set on the blob. @@ -975,23 +627,22 @@ public Response deleteImmutabilityPolicyNoCustomHeadersWithResponse(String * 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. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws StorageErrorException thrown if 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 the response. */ - @Generated - @ServiceMethod(returns = ReturnType.SINGLE) - public ResponseBase setLegalHoldWithResponse(String containerName, String blob, - boolean legalHold, Integer timeout, String requestId, String snapshot, String versionId, Context context) { + @Metadata(generated = true) + public Response setLegalHoldWithResponse(String containerName, String blob, boolean legalHold, + Integer timeout, String requestId, String snapshot, String versionId, RequestOptions requestOptions) { return this.serviceClient.setLegalHoldWithResponse(containerName, blob, legalHold, timeout, requestId, snapshot, - versionId, context); + versionId, requestOptions); } /** * 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. @@ -1010,48 +661,16 @@ public ResponseBase setLegalHoldWithResponse(Str * @throws StorageErrorException 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) + @Metadata(generated = true) public void setLegalHold(String containerName, String blob, boolean legalHold, Integer timeout, String requestId, String snapshot, String versionId) { this.serviceClient.setLegalHold(containerName, blob, legalHold, timeout, requestId, snapshot, versionId); } /** - * The Set Legal Hold operation sets a legal hold on the blob. - * - * @param containerName The container name. - * @param blob The blob name. - * @param legalHold Specified if a legal hold should be set on the blob. - * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. - * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. - * @param snapshot The snapshot parameter is an opaque DateTime value that, when present, specifies the blob - * snapshot to retrieve. For more information on working with blob snapshots, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/creating-a-snapshot-of-a-blob">Creating - * a Snapshot of a Blob.</a>. - * @param versionId The version id parameter is an opaque DateTime value that, when present, specifies the version - * of the blob to operate on. It's for service version 2019-10-10 and newer. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws StorageErrorException 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 Response setLegalHoldNoCustomHeadersWithResponse(String containerName, String blob, boolean legalHold, - Integer timeout, String requestId, String snapshot, String versionId, Context context) { - return this.serviceClient.setLegalHoldNoCustomHeadersWithResponse(containerName, blob, legalHold, timeout, - requestId, snapshot, versionId, context); - } - - /** - * The Set Blob Metadata operation sets user-defined metadata for the specified blob as one or more name-value - * pairs. - * + * 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 @@ -1075,27 +694,26 @@ public Response setLegalHoldNoCustomHeadersWithResponse(String containerNa * 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. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws StorageErrorException thrown if 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 the response. */ - @Generated - @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) { + @Metadata(generated = true) + public Response 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, RequestOptions requestOptions) { return this.serviceClient.setMetadataWithResponse(containerName, blob, timeout, metadata, leaseId, ifModifiedSince, ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, requestId, cpkInfo, encryptionScopeParam, - context); + requestOptions); } /** * 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 @@ -1123,8 +741,7 @@ public ResponseBase setMetadataWithResponse(Strin * @throws StorageErrorException 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) + @Metadata(generated = true) 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) { @@ -1132,53 +749,9 @@ public void setMetadata(String containerName, String blob, Integer timeout, Map< ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, requestId, cpkInfo, encryptionScopeParam); } - /** - * The Set Blob Metadata operation sets user-defined metadata for the specified blob as one or more name-value - * pairs. - * - * @param containerName The container name. - * @param blob The blob name. - * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. - * @param metadata Optional. Specifies a user-defined name-value pair associated with the blob. If no name-value - * pairs are specified, the operation will copy the metadata from the source blob or file to the destination blob. - * If one or more name-value pairs are specified, the destination blob is created with the specified metadata, and - * metadata is not copied from the source blob or file. Note that beginning with version 2009-09-19, metadata names - * must adhere to the naming rules for C# identifiers. See Naming and Referencing Containers, Blobs, and Metadata - * for more information. - * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. - * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the - * specified date/time. - * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since - * the specified date/time. - * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. - * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. - * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. - * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. - * @param cpkInfo Parameter group. - * @param encryptionScopeParam Parameter group. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws StorageErrorException 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 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) { - return this.serviceClient.setMetadataNoCustomHeadersWithResponse(containerName, blob, timeout, metadata, - leaseId, ifModifiedSince, ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, requestId, cpkInfo, - encryptionScopeParam, context); - } - /** * [Update] The Lease Blob operation establishes and manages a lock on a blob for write and delete operations. - * + * * @param containerName The container name. * @param blob The blob name. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a @@ -1199,25 +772,23 @@ public Response setMetadataNoCustomHeadersWithResponse(String containerNam * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. * @param requestId Provides a 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. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws StorageErrorException thrown if 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 the response. */ - @Generated - @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) { + @Metadata(generated = true) + public Response acquireLeaseWithResponse(String containerName, String blob, Integer timeout, Integer duration, + String proposedLeaseId, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, + String ifNoneMatch, String ifTags, String requestId, RequestOptions requestOptions) { return this.serviceClient.acquireLeaseWithResponse(containerName, blob, timeout, duration, proposedLeaseId, - ifModifiedSince, ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, requestId, context); + ifModifiedSince, ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, requestId, requestOptions); } /** * [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 @@ -1242,8 +813,7 @@ public ResponseBase acquireLeaseWithResponse(Str * @throws StorageErrorException 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) + @Metadata(generated = true) 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) { @@ -1253,45 +823,7 @@ public void acquireLease(String containerName, String blob, Integer timeout, Int /** * [Update] The Lease Blob operation establishes and manages a lock on a blob for write and delete operations. - * - * @param containerName The container name. - * @param blob The blob name. - * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. - * @param duration Specifies the duration of the lease, in seconds, or negative one (-1) for a lease that never - * expires. A non-infinite lease can be between 15 and 60 seconds. A lease duration cannot be changed using renew or - * change. - * @param proposedLeaseId Proposed lease ID, in a GUID string format. The Blob service returns 400 (Invalid request) - * if the proposed lease ID is not in the correct format. See Guid Constructor (String) for a list of valid GUID - * string formats. - * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the - * specified date/time. - * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since - * the specified date/time. - * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. - * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. - * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. - * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws StorageErrorException 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 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) { - return this.serviceClient.acquireLeaseNoCustomHeadersWithResponse(containerName, blob, timeout, duration, - proposedLeaseId, ifModifiedSince, ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, requestId, context); - } - - /** - * [Update] The Lease Blob operation establishes and manages a lock on a blob for write and delete operations. - * + * * @param containerName The container name. * @param blob The blob name. * @param leaseId Specifies the current lease ID on the resource. @@ -1307,24 +839,23 @@ public Response acquireLeaseNoCustomHeadersWithResponse(String containerNa * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. * @param requestId Provides a 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. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws StorageErrorException thrown if 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 the response. */ - @Generated - @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) { + @Metadata(generated = true) + public Response releaseLeaseWithResponse(String containerName, String blob, String leaseId, Integer timeout, + OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, + String ifTags, String requestId, RequestOptions requestOptions) { return this.serviceClient.releaseLeaseWithResponse(containerName, blob, leaseId, timeout, ifModifiedSince, - ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, requestId, context); + ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, requestId, requestOptions); } /** * [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. @@ -1344,8 +875,7 @@ public ResponseBase releaseLeaseWithResponse(Str * @throws StorageErrorException 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) + @Metadata(generated = true) public void releaseLease(String containerName, String blob, String leaseId, Integer timeout, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, String ifTags, String requestId) { @@ -1355,7 +885,7 @@ public void releaseLease(String containerName, String blob, String leaseId, Inte /** * [Update] The Lease Blob operation establishes and manages a lock on a blob for write and delete operations. - * + * * @param containerName The container name. * @param blob The blob name. * @param leaseId Specifies the current lease ID on the resource. @@ -1371,57 +901,23 @@ public void releaseLease(String containerName, String blob, String leaseId, Inte * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. * @param requestId Provides a 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. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws StorageErrorException 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 Response releaseLeaseNoCustomHeadersWithResponse(String containerName, String blob, String leaseId, - Integer timeout, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, - String ifNoneMatch, String ifTags, String requestId, Context context) { - return this.serviceClient.releaseLeaseNoCustomHeadersWithResponse(containerName, blob, leaseId, timeout, - ifModifiedSince, ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, requestId, context); - } - - /** - * [Update] The Lease Blob operation establishes and manages a lock on a blob for write and delete operations. - * - * @param containerName The container name. - * @param blob The blob name. - * @param leaseId Specifies the current lease ID on the resource. - * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. - * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the - * specified date/time. - * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since - * the specified date/time. - * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. - * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. - * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. - * @param requestId Provides a 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 StorageErrorException thrown if 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 containerName, String blob, - String leaseId, Integer timeout, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, - String ifMatch, String ifNoneMatch, String ifTags, String requestId, Context context) { + @Metadata(generated = true) + public Response renewLeaseWithResponse(String containerName, String blob, String leaseId, Integer timeout, + OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, + String ifTags, String requestId, RequestOptions requestOptions) { return this.serviceClient.renewLeaseWithResponse(containerName, blob, leaseId, timeout, ifModifiedSince, - ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, requestId, context); + ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, requestId, requestOptions); } /** * [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. @@ -1441,8 +937,7 @@ public ResponseBase renewLeaseWithResponse(String * @throws StorageErrorException 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) + @Metadata(generated = true) public void renewLease(String containerName, String blob, String leaseId, Integer timeout, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, String ifTags, String requestId) { @@ -1452,40 +947,7 @@ public void renewLease(String containerName, String blob, String leaseId, Intege /** * [Update] The Lease Blob operation establishes and manages a lock on a blob for write and delete operations. - * - * @param containerName The container name. - * @param blob The blob name. - * @param leaseId Specifies the current lease ID on the resource. - * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. - * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the - * specified date/time. - * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since - * the specified date/time. - * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. - * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. - * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. - * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws StorageErrorException 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 Response renewLeaseNoCustomHeadersWithResponse(String containerName, String blob, String leaseId, - Integer timeout, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, - String ifNoneMatch, String ifTags, String requestId, Context context) { - return this.serviceClient.renewLeaseNoCustomHeadersWithResponse(containerName, blob, leaseId, timeout, - ifModifiedSince, ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, requestId, context); - } - - /** - * [Update] The Lease Blob operation establishes and manages a lock on a blob for write and delete operations. - * + * * @param containerName The container name. * @param blob The blob name. * @param leaseId Specifies the current lease ID on the resource. @@ -1504,25 +966,23 @@ public Response renewLeaseNoCustomHeadersWithResponse(String containerName * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. * @param requestId Provides a 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. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws StorageErrorException thrown if 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 the response. */ - @Generated - @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) { + @Metadata(generated = true) + public Response changeLeaseWithResponse(String containerName, String blob, String leaseId, + String proposedLeaseId, Integer timeout, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, + String ifMatch, String ifNoneMatch, String ifTags, String requestId, RequestOptions requestOptions) { return this.serviceClient.changeLeaseWithResponse(containerName, blob, leaseId, proposedLeaseId, timeout, - ifModifiedSince, ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, requestId, context); + ifModifiedSince, ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, requestId, requestOptions); } /** * [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. @@ -1545,8 +1005,7 @@ public ResponseBase changeLeaseWithResponse(Strin * @throws StorageErrorException 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) + @Metadata(generated = true) 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) { @@ -1556,43 +1015,7 @@ public void changeLease(String containerName, String blob, String leaseId, Strin /** * [Update] The Lease Blob operation establishes and manages a lock on a blob for write and delete operations. - * - * @param containerName The container name. - * @param blob The blob name. - * @param leaseId Specifies the current lease ID on the resource. - * @param proposedLeaseId Proposed lease ID, in a GUID string format. The Blob service returns 400 (Invalid request) - * if the proposed lease ID is not in the correct format. See Guid Constructor (String) for a list of valid GUID - * string formats. - * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. - * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the - * specified date/time. - * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since - * the specified date/time. - * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. - * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. - * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. - * @param requestId Provides a 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 StorageErrorException 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 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) { - return this.serviceClient.changeLeaseNoCustomHeadersWithResponse(containerName, blob, leaseId, proposedLeaseId, - timeout, ifModifiedSince, ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, requestId, context); - } - - /** - * [Update] The Lease Blob operation establishes and manages a lock on a blob for write and delete operations. - * + * * @param containerName The container name. * @param blob The blob name. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a @@ -1613,24 +1036,23 @@ public Response changeLeaseNoCustomHeadersWithResponse(String containerNam * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. * @param requestId Provides a 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. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws StorageErrorException thrown if 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 the response. */ - @Generated - @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) { + @Metadata(generated = true) + public Response breakLeaseWithResponse(String containerName, String blob, Integer timeout, + Integer breakPeriod, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, + String ifNoneMatch, String ifTags, String requestId, RequestOptions requestOptions) { return this.serviceClient.breakLeaseWithResponse(containerName, blob, timeout, breakPeriod, ifModifiedSince, - ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, requestId, context); + ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, requestId, requestOptions); } /** * [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 @@ -1655,8 +1077,7 @@ public ResponseBase breakLeaseWithResponse(String * @throws StorageErrorException 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) + @Metadata(generated = true) public void breakLease(String containerName, String blob, Integer timeout, Integer breakPeriod, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, String ifTags, String requestId) { @@ -1664,129 +1085,9 @@ public void breakLease(String containerName, String blob, Integer timeout, Integ ifMatch, ifNoneMatch, ifTags, requestId); } - /** - * [Update] The Lease Blob operation establishes and manages a lock on a blob for write and delete operations. - * - * @param containerName The container name. - * @param blob The blob name. - * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. - * @param 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 StorageErrorException 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 Response breakLeaseNoCustomHeadersWithResponse(String containerName, String blob, Integer timeout, - Integer breakPeriod, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, - String ifNoneMatch, String ifTags, String requestId, Context context) { - return this.serviceClient.breakLeaseNoCustomHeadersWithResponse(containerName, blob, timeout, breakPeriod, - ifModifiedSince, ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, requestId, context); - } - - /** - * The Create Snapshot operation creates a read-only snapshot of a blob. - * - * @param containerName The container name. - * @param blob The blob name. - * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. - * @param metadata Optional. Specifies a user-defined name-value pair associated with the blob. If no name-value - * pairs are specified, the operation will copy the metadata from the source blob or file to the destination blob. - * If one or more name-value pairs are specified, the destination blob is created with the specified metadata, and - * metadata is not copied from the source blob or file. Note that beginning with version 2009-09-19, metadata names - * must adhere to the naming rules for C# identifiers. See Naming and Referencing Containers, Blobs, and Metadata - * for more information. - * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the - * specified date/time. - * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since - * the specified date/time. - * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. - * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. - * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. - * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. - * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. - * @param cpkInfo Parameter group. - * @param encryptionScopeParam Parameter group. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws StorageErrorException thrown if 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(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 this.serviceClient.createSnapshotWithResponse(containerName, blob, timeout, metadata, ifModifiedSince, - ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, leaseId, requestId, cpkInfo, encryptionScopeParam, - context); - } - - /** - * The Create Snapshot operation creates a read-only snapshot of a blob. - * - * @param containerName The container name. - * @param blob The blob name. - * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. - * @param metadata Optional. Specifies a user-defined name-value pair associated with the blob. If no name-value - * pairs are specified, the operation will copy the metadata from the source blob or file to the destination blob. - * If one or more name-value pairs are specified, the destination blob is created with the specified metadata, and - * metadata is not copied from the source blob or file. Note that beginning with version 2009-09-19, metadata names - * must adhere to the naming rules for C# identifiers. See Naming and Referencing Containers, Blobs, and Metadata - * for more information. - * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the - * specified date/time. - * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since - * the specified date/time. - * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. - * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. - * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. - * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. - * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. - * @param cpkInfo Parameter group. - * @param encryptionScopeParam Parameter group. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws StorageErrorException 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(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) { - this.serviceClient.createSnapshot(containerName, blob, timeout, metadata, ifModifiedSince, ifUnmodifiedSince, - ifMatch, ifNoneMatch, ifTags, leaseId, requestId, cpkInfo, encryptionScopeParam); - } - /** * 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 @@ -1807,97 +1108,30 @@ public void createSnapshot(String containerName, String blob, Integer timeout, M * @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 StorageErrorException 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 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) { - return this.serviceClient.createSnapshotNoCustomHeadersWithResponse(containerName, blob, timeout, metadata, - ifModifiedSince, ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, leaseId, requestId, cpkInfo, - encryptionScopeParam, context); - } - - /** - * The Start Copy From URL operation copies a blob or an internet resource to a new blob. - * - * @param containerName The container name. - * @param blob The blob name. - * @param copySource Specifies the name of the source page blob snapshot. This value is a URL of up to 2 KB in - * length that specifies a page blob snapshot. The value should be URL-encoded as it would appear in a request URI. - * The source blob must either be public or must be authenticated via a shared access signature. - * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. - * @param metadata Optional. Specifies a user-defined name-value pair associated with the blob. If no name-value - * pairs are specified, the operation will copy the metadata from the source blob or file to the destination blob. - * If one or more name-value pairs are specified, the destination blob is created with the specified metadata, and - * metadata is not copied from the source blob or file. Note that beginning with version 2009-09-19, metadata names - * must adhere to the naming rules for C# identifiers. See Naming and Referencing Containers, Blobs, and Metadata - * for more information. - * @param tier Optional. Indicates the tier to be set on the blob. - * @param rehydratePriority Optional: Indicates the priority with which to rehydrate an archived blob. - * @param sourceIfModifiedSince Specify this header value to operate only on a blob if it has been modified since - * the specified date/time. - * @param sourceIfUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified - * since the specified date/time. - * @param sourceIfMatch Specify an ETag value to operate only on blobs with a matching value. - * @param sourceIfNoneMatch Specify an ETag value to operate only on blobs without a matching value. - * @param sourceIfTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. - * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the - * specified date/time. - * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since - * the specified date/time. - * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. - * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. - * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. - * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. - * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. - * @param blobTagsString Optional. Used to set blob tags in various blob operations. - * @param sealBlob Overrides the sealed state of the destination blob. Service version 2019-12-12 and newer. - * @param immutabilityPolicyExpiry Specifies the date time when the blobs immutability policy is set to expire. - * @param immutabilityPolicyMode Specifies the immutability policy mode to set on the blob. - * @param legalHold Specified if a legal hold should be set on the blob. - * @param context The context to associate with this operation. + * analytics logs when storage analytics logging is enabled. + * @param cpkInfo Parameter group. + * @param encryptionScopeParam Parameter group. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws StorageErrorException thrown if 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 the response. */ - @Generated - @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) { - return this.serviceClient.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); + @Metadata(generated = true) + public Response 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, RequestOptions requestOptions) { + return this.serviceClient.createSnapshotWithResponse(containerName, blob, timeout, metadata, ifModifiedSince, + ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, leaseId, requestId, cpkInfo, encryptionScopeParam, + requestOptions); } /** - * The Start Copy From URL operation copies a blob or an internet resource to a new blob. - * + * The Create Snapshot operation creates a read-only snapshot of a blob. + * * @param containerName The container name. * @param blob The blob name. - * @param copySource Specifies the name of the source page blob snapshot. This value is a URL of up to 2 KB in - * length that specifies a page blob snapshot. The value should be URL-encoded as it would appear in a request URI. - * The source blob must either be public or must be authenticated via a shared access signature. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting * Timeouts for Blob Service Operations.</a>. @@ -1907,15 +1141,6 @@ public ResponseBase startCopyFromURLWithResp * metadata is not copied from the source blob or file. Note that beginning with version 2009-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 @@ -1926,33 +1151,23 @@ public ResponseBase startCopyFromURLWithResp * @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 cpkInfo Parameter group. + * @param encryptionScopeParam Parameter group. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws StorageErrorException 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 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) { - this.serviceClient.startCopyFromURL(containerName, blob, copySource, timeout, metadata, tier, rehydratePriority, - sourceIfModifiedSince, sourceIfUnmodifiedSince, sourceIfMatch, sourceIfNoneMatch, sourceIfTags, - ifModifiedSince, ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, leaseId, requestId, blobTagsString, - sealBlob, immutabilityPolicyExpiry, immutabilityPolicyMode, legalHold); + @Metadata(generated = true) + 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) { + this.serviceClient.createSnapshot(containerName, blob, timeout, metadata, ifModifiedSince, ifUnmodifiedSince, + ifMatch, ifNoneMatch, ifTags, leaseId, requestId, cpkInfo, encryptionScopeParam); } /** * 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 @@ -1991,32 +1206,29 @@ public void startCopyFromURL(String containerName, String blob, String copySourc * @param immutabilityPolicyExpiry Specifies the date time when the blobs immutability policy is set to expire. * @param immutabilityPolicyMode Specifies the immutability policy mode to set on the blob. * @param legalHold Specified if a legal hold should be set on the blob. - * @param context The context to associate with this operation. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws StorageErrorException 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 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) { - return this.serviceClient.startCopyFromURLNoCustomHeadersWithResponse(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); + @Metadata(generated = true) + public Response 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, RequestOptions requestOptions) { + return this.serviceClient.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, requestOptions); } /** - * 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. - * + * 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 @@ -2032,12 +1244,14 @@ public Response startCopyFromURLNoCustomHeadersWithResponse(String contain * 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 @@ -2048,43 +1262,33 @@ public Response startCopyFromURLNoCustomHeadersWithResponse(String contain * @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 sealBlob Overrides the sealed state of the destination blob. Service version 2019-12-12 and newer. * @param immutabilityPolicyExpiry Specifies the date time when the blobs immutability policy is set to expire. * @param immutabilityPolicyMode Specifies the immutability policy mode to set on the blob. * @param legalHold Specified if a legal hold should be set on the blob. - * @param copySourceAuthorization Only Bearer type is supported. Credentials should be a valid OAuth access token to - * copy source. - * @param copySourceTags Optional, default 'replace'. Indicates if source tags should be copied or replaced with the - * tags specified by x-ms-tags. - * @param encryptionScopeParam Parameter group. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws StorageErrorException thrown if 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 containerName, String blob, - String copySource, Integer timeout, Map metadata, AccessTier tier, + @Metadata(generated = true) + 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, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, - String ifNoneMatch, String ifTags, String leaseId, String requestId, byte[] sourceContentMD5, - String blobTagsString, OffsetDateTime immutabilityPolicyExpiry, - BlobImmutabilityPolicyMode immutabilityPolicyMode, Boolean legalHold, String copySourceAuthorization, - BlobCopySourceTagsMode copySourceTags, EncryptionScope encryptionScopeParam, Context context) { - return this.serviceClient.copyFromURLWithResponse(containerName, blob, copySource, timeout, metadata, tier, - sourceIfModifiedSince, sourceIfUnmodifiedSince, sourceIfMatch, sourceIfNoneMatch, ifModifiedSince, - ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, leaseId, requestId, sourceContentMD5, blobTagsString, - immutabilityPolicyExpiry, immutabilityPolicyMode, legalHold, copySourceAuthorization, copySourceTags, - encryptionScopeParam, context); + 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) { + this.serviceClient.startCopyFromURL(containerName, blob, copySource, timeout, metadata, tier, rehydratePriority, + sourceIfModifiedSince, sourceIfUnmodifiedSince, sourceIfMatch, sourceIfNoneMatch, sourceIfTags, + ifModifiedSince, ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, leaseId, requestId, blobTagsString, + sealBlob, immutabilityPolicyExpiry, immutabilityPolicyMode, legalHold); } /** * 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 @@ -2126,29 +1330,32 @@ public ResponseBase copyFromURLWithResponse(Strin * @param copySourceTags Optional, default 'replace'. Indicates if source tags should be copied or replaced with the * tags specified by x-ms-tags. * @param encryptionScopeParam Parameter group. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws StorageErrorException 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 void copyFromURL(String containerName, String blob, String copySource, Integer timeout, + @Metadata(generated = true) + public Response copyFromURLWithResponse(String containerName, String blob, String copySource, Integer timeout, Map metadata, AccessTier tier, OffsetDateTime sourceIfModifiedSince, OffsetDateTime sourceIfUnmodifiedSince, String sourceIfMatch, String sourceIfNoneMatch, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, String ifTags, String leaseId, String requestId, byte[] sourceContentMD5, String blobTagsString, OffsetDateTime immutabilityPolicyExpiry, BlobImmutabilityPolicyMode immutabilityPolicyMode, Boolean legalHold, - String copySourceAuthorization, BlobCopySourceTagsMode copySourceTags, EncryptionScope encryptionScopeParam) { - this.serviceClient.copyFromURL(containerName, blob, copySource, timeout, metadata, tier, sourceIfModifiedSince, - sourceIfUnmodifiedSince, sourceIfMatch, sourceIfNoneMatch, ifModifiedSince, ifUnmodifiedSince, ifMatch, - ifNoneMatch, ifTags, leaseId, requestId, sourceContentMD5, blobTagsString, immutabilityPolicyExpiry, - immutabilityPolicyMode, legalHold, copySourceAuthorization, copySourceTags, encryptionScopeParam); + String copySourceAuthorization, BlobCopySourceTagsMode copySourceTags, EncryptionScope encryptionScopeParam, + RequestOptions requestOptions) { + return this.serviceClient.copyFromURLWithResponse(containerName, blob, copySource, timeout, metadata, tier, + sourceIfModifiedSince, sourceIfUnmodifiedSince, sourceIfMatch, sourceIfNoneMatch, ifModifiedSince, + ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, leaseId, requestId, sourceContentMD5, blobTagsString, + immutabilityPolicyExpiry, immutabilityPolicyMode, legalHold, copySourceAuthorization, copySourceTags, + encryptionScopeParam, requestOptions); } /** * 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 @@ -2190,33 +1397,28 @@ public void copyFromURL(String containerName, String blob, String copySource, In * @param copySourceTags Optional, default 'replace'. Indicates if source tags should be copied or replaced with the * tags specified by x-ms-tags. * @param encryptionScopeParam Parameter group. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws StorageErrorException 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 Response copyFromURLNoCustomHeadersWithResponse(String containerName, String blob, String copySource, - Integer timeout, Map metadata, AccessTier tier, OffsetDateTime sourceIfModifiedSince, + @Metadata(generated = true) + public void copyFromURL(String containerName, String blob, String copySource, Integer timeout, + Map metadata, AccessTier tier, OffsetDateTime sourceIfModifiedSince, OffsetDateTime sourceIfUnmodifiedSince, String sourceIfMatch, String sourceIfNoneMatch, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, String ifTags, String leaseId, String requestId, byte[] sourceContentMD5, String blobTagsString, OffsetDateTime immutabilityPolicyExpiry, BlobImmutabilityPolicyMode immutabilityPolicyMode, Boolean legalHold, - String copySourceAuthorization, BlobCopySourceTagsMode copySourceTags, EncryptionScope encryptionScopeParam, - Context context) { - return this.serviceClient.copyFromURLNoCustomHeadersWithResponse(containerName, blob, copySource, timeout, - metadata, tier, sourceIfModifiedSince, sourceIfUnmodifiedSince, sourceIfMatch, sourceIfNoneMatch, - ifModifiedSince, ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, leaseId, requestId, sourceContentMD5, - blobTagsString, immutabilityPolicyExpiry, immutabilityPolicyMode, legalHold, copySourceAuthorization, - copySourceTags, encryptionScopeParam, context); + String copySourceAuthorization, BlobCopySourceTagsMode copySourceTags, EncryptionScope encryptionScopeParam) { + this.serviceClient.copyFromURL(containerName, blob, copySource, timeout, metadata, tier, sourceIfModifiedSince, + sourceIfUnmodifiedSince, sourceIfMatch, sourceIfNoneMatch, ifModifiedSince, ifUnmodifiedSince, ifMatch, + ifNoneMatch, ifTags, leaseId, requestId, sourceContentMD5, blobTagsString, immutabilityPolicyExpiry, + immutabilityPolicyMode, legalHold, copySourceAuthorization, copySourceTags, encryptionScopeParam); } /** * 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. @@ -2226,24 +1428,23 @@ public Response copyFromURLNoCustomHeadersWithResponse(String containerNam * @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. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws StorageErrorException thrown if 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 the response. */ - @Generated - @ServiceMethod(returns = ReturnType.SINGLE) - public ResponseBase abortCopyFromURLWithResponse(String containerName, - String blob, String copyId, Integer timeout, String leaseId, String requestId, Context context) { + @Metadata(generated = true) + public Response abortCopyFromURLWithResponse(String containerName, String blob, String copyId, + Integer timeout, String leaseId, String requestId, RequestOptions requestOptions) { return this.serviceClient.abortCopyFromURLWithResponse(containerName, blob, copyId, timeout, leaseId, requestId, - context); + requestOptions); } /** * 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. @@ -2257,46 +1458,18 @@ public ResponseBase abortCopyFromURLWithResp * @throws StorageErrorException 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) + @Metadata(generated = true) public void abortCopyFromURL(String containerName, String blob, String copyId, Integer timeout, String leaseId, String requestId) { this.serviceClient.abortCopyFromURL(containerName, blob, copyId, timeout, leaseId, requestId); } - /** - * The Abort Copy From URL operation aborts a pending Copy From URL operation, and leaves a destination blob with - * zero length and full metadata. - * - * @param containerName The container name. - * @param blob The blob name. - * @param copyId The copy identifier provided in the x-ms-copy-id header of the original Copy Blob operation. - * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. - * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. - * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws StorageErrorException 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 Response abortCopyFromURLNoCustomHeadersWithResponse(String containerName, String blob, String copyId, - Integer timeout, String leaseId, String requestId, Context context) { - return this.serviceClient.abortCopyFromURLNoCustomHeadersWithResponse(containerName, blob, copyId, timeout, - leaseId, requestId, context); - } - /** * The Set Tier operation sets the tier on a blob. The operation is allowed on a page blob in a premium storage * account and on a block blob in a blob storage account (locally redundant storage only). A premium page blob's * tier determines the allowed size, IOPS, and bandwidth of the blob. A block blob's tier determines * Hot/Cool/Archive storage type. This operation does not update the blob's ETag. - * + * * @param containerName The container name. * @param blob The blob name. * @param tier Indicates the tier to be set on the blob. @@ -2314,19 +1487,18 @@ public Response abortCopyFromURLNoCustomHeadersWithResponse(String contain * 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. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws StorageErrorException thrown if 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 the response. */ - @Generated - @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) { + @Metadata(generated = true) + public Response setTierWithResponse(String containerName, String blob, AccessTier tier, String snapshot, + String versionId, Integer timeout, RehydratePriority rehydratePriority, String requestId, String leaseId, + String ifTags, RequestOptions requestOptions) { return this.serviceClient.setTierWithResponse(containerName, blob, tier, snapshot, versionId, timeout, - rehydratePriority, requestId, leaseId, ifTags, context); + rehydratePriority, requestId, leaseId, ifTags, requestOptions); } /** @@ -2334,7 +1506,7 @@ public ResponseBase setTierWithResponse(String contai * account and on a block blob in a blob storage account (locally redundant storage only). A premium page blob's * tier determines the allowed size, IOPS, and bandwidth of the blob. A block blob's tier determines * Hot/Cool/Archive storage type. This operation does not update the blob's ETag. - * + * * @param containerName The container name. * @param blob The blob name. * @param tier Indicates the tier to be set on the blob. @@ -2356,55 +1528,16 @@ public ResponseBase setTierWithResponse(String contai * @throws StorageErrorException 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) + @Metadata(generated = true) public void setTier(String containerName, String blob, AccessTier tier, String snapshot, String versionId, Integer timeout, RehydratePriority rehydratePriority, String requestId, String leaseId, String ifTags) { this.serviceClient.setTier(containerName, blob, tier, snapshot, versionId, timeout, rehydratePriority, requestId, leaseId, ifTags); } - /** - * The Set Tier operation sets the tier on a blob. The operation is allowed on a page blob in a premium storage - * account and on a block blob in a blob storage account (locally redundant storage only). A premium page blob's - * tier determines the allowed size, IOPS, and bandwidth of the blob. A block blob's tier determines - * Hot/Cool/Archive storage type. This operation does not update the blob's ETag. - * - * @param containerName The container name. - * @param blob The blob name. - * @param tier Indicates the tier to be set on the blob. - * @param snapshot The snapshot parameter is an opaque DateTime value that, when present, specifies the blob - * snapshot to retrieve. For more information on working with blob snapshots, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/creating-a-snapshot-of-a-blob">Creating - * a Snapshot of a Blob.</a>. - * @param versionId The version id parameter is an opaque DateTime value that, when present, specifies the version - * of the blob to operate on. It's for service version 2019-10-10 and newer. - * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. - * @param rehydratePriority Optional: Indicates the priority with which to rehydrate an archived blob. - * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. - * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. - * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws StorageErrorException 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 Response setTierNoCustomHeadersWithResponse(String containerName, String blob, AccessTier tier, - String snapshot, String versionId, Integer timeout, RehydratePriority rehydratePriority, String requestId, - String leaseId, String ifTags, Context context) { - return this.serviceClient.setTierNoCustomHeadersWithResponse(containerName, blob, tier, snapshot, versionId, - timeout, rehydratePriority, requestId, leaseId, ifTags, context); - } - /** * Returns the sku name and account kind. - * + * * @param containerName The container name. * @param blob The blob name. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a @@ -2412,22 +1545,21 @@ public Response setTierNoCustomHeadersWithResponse(String containerName, S * Timeouts for Blob Service Operations.</a>. * @param requestId Provides a 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. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws StorageErrorException thrown if 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 the response. */ - @Generated - @ServiceMethod(returns = ReturnType.SINGLE) - public ResponseBase getAccountInfoWithResponse(String containerName, String blob, - Integer timeout, String requestId, Context context) { - return this.serviceClient.getAccountInfoWithResponse(containerName, blob, timeout, requestId, context); + @Metadata(generated = true) + public Response getAccountInfoWithResponse(String containerName, String blob, Integer timeout, + String requestId, RequestOptions requestOptions) { + return this.serviceClient.getAccountInfoWithResponse(containerName, blob, timeout, requestId, requestOptions); } /** * 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 @@ -2439,39 +1571,14 @@ public ResponseBase getAccountInfoWithResponse * @throws StorageErrorException 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) + @Metadata(generated = true) public void getAccountInfo(String containerName, String blob, Integer timeout, String requestId) { this.serviceClient.getAccountInfo(containerName, blob, timeout, requestId); } - /** - * Returns the sku name and account kind. - * - * @param containerName The container name. - * @param blob The blob name. - * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. - * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws StorageErrorException 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 Response getAccountInfoNoCustomHeadersWithResponse(String containerName, String blob, Integer timeout, - String requestId, Context context) { - return this.serviceClient.getAccountInfoNoCustomHeadersWithResponse(containerName, blob, timeout, requestId, - context); - } - /** * The Query operation enables users to select/project on blob data by providing simple query expressions. - * + * * @param containerName The container name. * @param blob The blob name. * @param snapshot The snapshot parameter is an opaque DateTime value that, when present, specifies the blob @@ -2493,25 +1600,24 @@ public Response getAccountInfoNoCustomHeadersWithResponse(String container * 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. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws StorageErrorException 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}. + * @return the response. */ - @Generated - @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) { + @Metadata(generated = true) + public Response 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, + RequestOptions requestOptions) { return this.serviceClient.queryWithResponse(containerName, blob, snapshot, timeout, leaseId, ifModifiedSince, - ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, requestId, queryRequest, cpkInfo, context); + ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, requestId, queryRequest, cpkInfo, requestOptions); } /** * 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 @@ -2538,8 +1644,7 @@ public ResponseBase queryWithResponse(String con * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the response. */ - @Generated - @ServiceMethod(returns = ReturnType.SINGLE) + @Metadata(generated = true) 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) { @@ -2547,50 +1652,9 @@ public InputStream query(String containerName, String blob, String snapshot, Int ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, requestId, queryRequest, cpkInfo); } - /** - * The Query operation enables users to select/project on blob data by providing simple query expressions. - * - * @param containerName The container name. - * @param blob The blob name. - * @param snapshot The snapshot parameter is an opaque DateTime value that, when present, specifies the blob - * snapshot to retrieve. For more information on working with blob snapshots, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/creating-a-snapshot-of-a-blob">Creating - * a Snapshot of a Blob.</a>. - * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. - * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. - * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the - * specified date/time. - * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since - * the specified date/time. - * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. - * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. - * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. - * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. - * @param queryRequest the query request. - * @param cpkInfo Parameter group. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws StorageErrorException 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 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) { - return this.serviceClient.queryNoCustomHeadersWithResponse(containerName, blob, snapshot, timeout, leaseId, - ifModifiedSince, ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, requestId, queryRequest, cpkInfo, - context); - } - /** * The Get Tags operation enables users to get the tags associated with a blob. - * + * * @param containerName The container name. * @param blob The blob name. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a @@ -2606,24 +1670,22 @@ public Response queryNoCustomHeadersWithResponse(String containerNa * of the blob to operate on. It's for service version 2019-10-10 and newer. * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. - * @param context The context to associate with this operation. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws StorageErrorException 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}. + * @return blob tags. */ - @Generated - @ServiceMethod(returns = ReturnType.SINGLE) - public ResponseBase getTagsWithResponse(String containerName, String blob, - Integer timeout, String requestId, String snapshot, String versionId, String ifTags, String leaseId, - Context context) { + @Metadata(generated = true) + public Response getTagsWithResponse(String containerName, String blob, Integer timeout, String requestId, + String snapshot, String versionId, String ifTags, String leaseId, RequestOptions requestOptions) { return this.serviceClient.getTagsWithResponse(containerName, blob, timeout, requestId, snapshot, versionId, - ifTags, leaseId, context); + ifTags, leaseId, requestOptions); } /** * 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 @@ -2644,49 +1706,16 @@ public ResponseBase getTagsWithResponse(String co * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return blob tags. */ - @Generated - @ServiceMethod(returns = ReturnType.SINGLE) + @Metadata(generated = true) public BlobTags getTags(String containerName, String blob, Integer timeout, String requestId, String snapshot, String versionId, String ifTags, String leaseId) { return this.serviceClient.getTags(containerName, blob, timeout, requestId, snapshot, versionId, ifTags, leaseId); } - /** - * The Get Tags operation enables users to get the tags associated with a blob. - * - * @param containerName The container name. - * @param blob The blob name. - * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. - * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. - * @param snapshot The snapshot parameter is an opaque DateTime value that, when present, specifies the blob - * snapshot to retrieve. For more information on working with blob snapshots, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/creating-a-snapshot-of-a-blob">Creating - * a Snapshot of a Blob.</a>. - * @param versionId The version id parameter is an opaque DateTime value that, when present, specifies the version - * of the blob to operate on. It's for service version 2019-10-10 and newer. - * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. - * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws StorageErrorException 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. - */ - @Generated - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getTagsNoCustomHeadersWithResponse(String containerName, String blob, Integer timeout, - String requestId, String snapshot, String versionId, String ifTags, String leaseId, Context context) { - return this.serviceClient.getTagsNoCustomHeadersWithResponse(containerName, blob, timeout, requestId, snapshot, - versionId, ifTags, leaseId, context); - } - /** * The Set Tags operation enables users to set tags on a blob. - * + * * @param containerName The container name. * @param blob The blob name. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a @@ -2701,24 +1730,23 @@ public Response getTagsNoCustomHeadersWithResponse(String containerNam * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. * @param tags Blob tags. - * @param context The context to associate with this operation. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws StorageErrorException thrown if 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 the response. */ - @Generated - @ServiceMethod(returns = ReturnType.SINGLE) - public ResponseBase setTagsWithResponse(String containerName, String blob, - Integer timeout, String versionId, byte[] transactionalContentMD5, byte[] transactionalContentCrc64, - String requestId, String ifTags, String leaseId, BlobTags tags, Context context) { + @Metadata(generated = true) + public Response setTagsWithResponse(String containerName, String blob, Integer timeout, String versionId, + byte[] transactionalContentMD5, byte[] transactionalContentCrc64, String requestId, String ifTags, + String leaseId, BlobTags tags, RequestOptions requestOptions) { return this.serviceClient.setTagsWithResponse(containerName, blob, timeout, versionId, transactionalContentMD5, - transactionalContentCrc64, requestId, ifTags, leaseId, tags, context); + transactionalContentCrc64, requestId, ifTags, leaseId, tags, requestOptions); } /** * 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 @@ -2737,44 +1765,11 @@ public ResponseBase setTagsWithResponse(String contai * @throws StorageErrorException 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) + @Metadata(generated = true) public void setTags(String containerName, String blob, Integer timeout, String versionId, byte[] transactionalContentMD5, byte[] transactionalContentCrc64, String requestId, String ifTags, String leaseId, BlobTags tags) { this.serviceClient.setTags(containerName, blob, timeout, versionId, transactionalContentMD5, transactionalContentCrc64, requestId, ifTags, leaseId, tags); } - - /** - * The Set Tags operation enables users to set tags on a blob. - * - * @param containerName The container name. - * @param blob The blob name. - * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. - * @param versionId The version id parameter is an opaque DateTime value that, when present, specifies the version - * of the blob to operate on. It's for service version 2019-10-10 and newer. - * @param transactionalContentMD5 Specify the transactional md5 for the body, to be validated by the service. - * @param transactionalContentCrc64 Specify the transactional crc64 for the body, to be validated by the service. - * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. - * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. - * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. - * @param tags Blob tags. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws StorageErrorException 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 Response setTagsNoCustomHeadersWithResponse(String containerName, String blob, Integer timeout, - String versionId, byte[] transactionalContentMD5, byte[] transactionalContentCrc64, String requestId, - String ifTags, String leaseId, BlobTags tags, Context context) { - return this.serviceClient.setTagsNoCustomHeadersWithResponse(containerName, blob, timeout, versionId, - transactionalContentMD5, transactionalContentCrc64, requestId, ifTags, leaseId, tags, context); - } } diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/BlockBlobClient.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/BlockBlobClient.java index 01792dc584a9..8051ca20974a 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/BlockBlobClient.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/BlockBlobClient.java @@ -4,31 +4,22 @@ package com.azure.v2.storage.blob; -import com.azure.v2.core.annotation.Generated; -import com.azure.v2.core.annotation.ReturnType; -import com.azure.v2.core.annotation.ServiceClient; -import com.azure.v2.core.annotation.ServiceMethod; -import com.azure.v2.core.http.rest.ResponseBase; import com.azure.v2.storage.blob.implementation.BlockBlobsImpl; import com.azure.v2.storage.blob.models.AccessTier; import com.azure.v2.storage.blob.models.BlobCopySourceTagsMode; import com.azure.v2.storage.blob.models.BlobHttpHeaders; import com.azure.v2.storage.blob.models.BlobImmutabilityPolicyMode; -import com.azure.v2.storage.blob.models.BlockBlobsCommitBlockListHeaders; -import com.azure.v2.storage.blob.models.BlockBlobsGetBlockListHeaders; -import com.azure.v2.storage.blob.models.BlockBlobsPutBlobFromUrlHeaders; -import com.azure.v2.storage.blob.models.BlockBlobsStageBlockFromURLHeaders; -import com.azure.v2.storage.blob.models.BlockBlobsStageBlockHeaders; -import com.azure.v2.storage.blob.models.BlockBlobsUploadHeaders; import com.azure.v2.storage.blob.models.BlockList; import com.azure.v2.storage.blob.models.BlockListType; import com.azure.v2.storage.blob.models.BlockLookupList; import com.azure.v2.storage.blob.models.CpkInfo; import com.azure.v2.storage.blob.models.EncryptionScope; import com.azure.v2.storage.blob.models.StorageErrorException; +import io.clientcore.core.annotations.Metadata; +import io.clientcore.core.annotations.ServiceClient; +import io.clientcore.core.http.models.RequestOptions; import io.clientcore.core.http.models.Response; -import io.clientcore.core.util.Context; -import io.clientcore.core.util.binarydata.BinaryData; +import io.clientcore.core.models.binarydata.BinaryData; import java.time.OffsetDateTime; import java.util.Map; @@ -37,15 +28,15 @@ */ @ServiceClient(builder = AzureBlobStorageBuilder.class) public final class BlockBlobClient { - @Generated + @Metadata(generated = true) private final BlockBlobsImpl serviceClient; /** * Initializes an instance of BlockBlobClient class. - * + * * @param serviceClient the service client implementation. */ - @Generated + @Metadata(generated = true) BlockBlobClient(BlockBlobsImpl serviceClient) { this.serviceClient = serviceClient; } @@ -55,7 +46,7 @@ public final class BlockBlobClient { * 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. @@ -93,27 +84,25 @@ public final class BlockBlobClient { * @param blobHttpHeaders Parameter group. * @param cpkInfo Parameter group. * @param encryptionScopeParam Parameter group. - * @param context The context to associate with this operation. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws StorageErrorException thrown if 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 the response. */ - @Generated - @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, + @Metadata(generated = true) + public Response 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) { + EncryptionScope encryptionScopeParam, RequestOptions requestOptions) { return this.serviceClient.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); + encryptionScopeParam, requestOptions); } /** @@ -121,7 +110,7 @@ public ResponseBase uploadWithResponse(String con * overwrites any existing metadata on the blob. Partial updates are not supported with Put Blob; the content of the * existing blob is overwritten with the content of the new blob. To perform a partial update of the content of a * block blob, use the Put Block List operation. - * + * * @param containerName The container name. * @param blob The blob name. * @param contentLength The length of the request. @@ -163,8 +152,7 @@ public ResponseBase uploadWithResponse(String con * @throws StorageErrorException 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) + @Metadata(generated = true) 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, @@ -178,78 +166,13 @@ public void upload(String containerName, String blob, long contentLength, Binary structuredContentLength, blobHttpHeaders, cpkInfo, encryptionScopeParam); } - /** - * The Upload Block Blob operation updates the content of an existing block blob. Updating an existing block blob - * overwrites any existing metadata on the blob. Partial updates are not supported with Put Blob; the content of the - * existing blob is overwritten with the content of the new blob. To perform a partial update of the content of a - * block blob, use the Put Block List operation. - * - * @param containerName The container name. - * @param blob The blob name. - * @param contentLength The length of the request. - * @param body Initial data. - * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. - * @param transactionalContentMD5 Specify the transactional md5 for the body, to be validated by the service. - * @param metadata Optional. Specifies a user-defined name-value pair associated with the blob. If no name-value - * pairs are specified, the operation will copy the metadata from the source blob or file to the destination blob. - * If one or more name-value pairs are specified, the destination blob is created with the specified metadata, and - * metadata is not copied from the source blob or file. Note that beginning with version 2009-09-19, metadata names - * must adhere to the naming rules for C# identifiers. See Naming and Referencing Containers, Blobs, and Metadata - * for more information. - * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. - * @param tier Optional. Indicates the tier to be set on the blob. - * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the - * specified date/time. - * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since - * the specified date/time. - * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. - * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. - * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. - * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. - * @param blobTagsString Optional. Used to set blob tags in various blob operations. - * @param immutabilityPolicyExpiry Specifies the date time when the blobs immutability policy is set to expire. - * @param immutabilityPolicyMode Specifies the immutability policy mode to set on the blob. - * @param legalHold Specified if a legal hold should be set on the blob. - * @param transactionalContentCrc64 Specify the transactional crc64 for the body, to be validated by the service. - * @param 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 StorageErrorException 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 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) { - return this.serviceClient.uploadNoCustomHeadersWithResponse(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); - } - /** * 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. @@ -295,27 +218,26 @@ public Response uploadNoCustomHeadersWithResponse(String containerName, St * @param blobHttpHeaders Parameter group. * @param cpkInfo Parameter group. * @param encryptionScopeParam Parameter group. - * @param context The context to associate with this operation. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws StorageErrorException thrown if 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 the response. */ - @Generated - @ServiceMethod(returns = ReturnType.SINGLE) - public ResponseBase putBlobFromUrlWithResponse(String containerName, - String blob, long contentLength, String copySource, Integer timeout, byte[] transactionalContentMD5, - Map metadata, String leaseId, AccessTier tier, OffsetDateTime ifModifiedSince, - OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, String ifTags, - OffsetDateTime sourceIfModifiedSince, OffsetDateTime sourceIfUnmodifiedSince, String sourceIfMatch, - String sourceIfNoneMatch, String sourceIfTags, String requestId, byte[] sourceContentMD5, String blobTagsString, - Boolean copySourceBlobProperties, String copySourceAuthorization, BlobCopySourceTagsMode copySourceTags, - BlobHttpHeaders blobHttpHeaders, CpkInfo cpkInfo, EncryptionScope encryptionScopeParam, Context context) { + @Metadata(generated = true) + public Response putBlobFromUrlWithResponse(String containerName, String blob, long contentLength, + String copySource, Integer timeout, byte[] transactionalContentMD5, Map metadata, + String leaseId, AccessTier tier, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, + String ifMatch, String ifNoneMatch, String ifTags, OffsetDateTime sourceIfModifiedSince, + OffsetDateTime sourceIfUnmodifiedSince, String sourceIfMatch, String sourceIfNoneMatch, String sourceIfTags, + String requestId, byte[] sourceContentMD5, String blobTagsString, Boolean copySourceBlobProperties, + String copySourceAuthorization, BlobCopySourceTagsMode copySourceTags, BlobHttpHeaders blobHttpHeaders, + CpkInfo cpkInfo, EncryptionScope encryptionScopeParam, RequestOptions requestOptions) { return this.serviceClient.putBlobFromUrlWithResponse(containerName, blob, contentLength, copySource, timeout, transactionalContentMD5, metadata, leaseId, tier, ifModifiedSince, ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, sourceIfModifiedSince, sourceIfUnmodifiedSince, sourceIfMatch, sourceIfNoneMatch, sourceIfTags, requestId, sourceContentMD5, blobTagsString, copySourceBlobProperties, copySourceAuthorization, - copySourceTags, blobHttpHeaders, cpkInfo, encryptionScopeParam, context); + copySourceTags, blobHttpHeaders, cpkInfo, encryptionScopeParam, requestOptions); } /** @@ -324,7 +246,7 @@ public ResponseBase putBlobFromUrlWithRes * from URL; the content of an existing blob is overwritten with the content of the new blob. To perform partial * updates to a block blob's contents using a source URL, use the Put Block from URL API in conjunction with Put * Block List. - * + * * @param containerName The container name. * @param blob The blob name. * @param contentLength The length of the request. @@ -374,8 +296,7 @@ public ResponseBase putBlobFromUrlWithRes * @throws StorageErrorException 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) + @Metadata(generated = true) 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, @@ -391,84 +312,9 @@ public void putBlobFromUrl(String containerName, String blob, long contentLength copySourceTags, blobHttpHeaders, cpkInfo, encryptionScopeParam); } - /** - * The Put Blob from URL operation creates a new Block Blob where the contents of the blob are read from a given - * URL. This API is supported beginning with the 2020-04-08 version. Partial updates are not supported with Put Blob - * from URL; the content of an existing blob is overwritten with the content of the new blob. To perform partial - * updates to a block blob's contents using a source URL, use the Put Block from URL API in conjunction with Put - * Block List. - * - * @param containerName The container name. - * @param blob The blob name. - * @param contentLength The length of the request. - * @param copySource Specifies the name of the source page blob snapshot. This value is a URL of up to 2 KB in - * length that specifies a page blob snapshot. The value should be URL-encoded as it would appear in a request URI. - * The source blob must either be public or must be authenticated via a shared access signature. - * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. - * @param transactionalContentMD5 Specify the transactional md5 for the body, to be validated by the service. - * @param metadata Optional. Specifies a user-defined name-value pair associated with the blob. If no name-value - * pairs are specified, the operation will copy the metadata from the source blob or file to the destination blob. - * If one or more name-value pairs are specified, the destination blob is created with the specified metadata, and - * metadata is not copied from the source blob or file. Note that beginning with version 2009-09-19, metadata names - * must adhere to the naming rules for C# identifiers. See Naming and Referencing Containers, Blobs, and Metadata - * for more information. - * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. - * @param tier Optional. Indicates the tier to be set on the blob. - * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the - * specified date/time. - * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since - * the specified date/time. - * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. - * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. - * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. - * @param sourceIfModifiedSince Specify this header value to operate only on a blob if it has been modified since - * the specified date/time. - * @param sourceIfUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified - * since the specified date/time. - * @param sourceIfMatch Specify an ETag value to operate only on blobs with a matching value. - * @param sourceIfNoneMatch Specify an ETag value to operate only on blobs without a matching value. - * @param sourceIfTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. - * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. - * @param sourceContentMD5 Specify the md5 calculated for the range of bytes that must be read from the copy source. - * @param blobTagsString Optional. Used to set blob tags in various blob operations. - * @param copySourceBlobProperties Optional, default is true. Indicates if properties from the source blob should be - * copied. - * @param copySourceAuthorization Only Bearer type is supported. Credentials should be a valid OAuth access token to - * copy source. - * @param copySourceTags Optional, default 'replace'. Indicates if source tags should be copied or replaced with the - * tags specified by x-ms-tags. - * @param blobHttpHeaders Parameter group. - * @param cpkInfo Parameter group. - * @param encryptionScopeParam Parameter group. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws StorageErrorException 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 Response putBlobFromUrlNoCustomHeadersWithResponse(String containerName, String blob, - long contentLength, String copySource, Integer timeout, byte[] transactionalContentMD5, - Map metadata, String leaseId, AccessTier tier, OffsetDateTime ifModifiedSince, - OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, String ifTags, - OffsetDateTime sourceIfModifiedSince, OffsetDateTime sourceIfUnmodifiedSince, String sourceIfMatch, - String sourceIfNoneMatch, String sourceIfTags, String requestId, byte[] sourceContentMD5, String blobTagsString, - Boolean copySourceBlobProperties, String copySourceAuthorization, BlobCopySourceTagsMode copySourceTags, - BlobHttpHeaders blobHttpHeaders, CpkInfo cpkInfo, EncryptionScope encryptionScopeParam, Context context) { - return this.serviceClient.putBlobFromUrlNoCustomHeadersWithResponse(containerName, blob, contentLength, - copySource, timeout, transactionalContentMD5, metadata, leaseId, tier, ifModifiedSince, ifUnmodifiedSince, - ifMatch, ifNoneMatch, ifTags, sourceIfModifiedSince, sourceIfUnmodifiedSince, sourceIfMatch, - sourceIfNoneMatch, sourceIfTags, requestId, sourceContentMD5, blobTagsString, copySourceBlobProperties, - copySourceAuthorization, copySourceTags, blobHttpHeaders, cpkInfo, encryptionScopeParam, context); - } - /** * 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 @@ -490,26 +336,25 @@ public Response putBlobFromUrlNoCustomHeadersWithResponse(String container * 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. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws StorageErrorException thrown if 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 the response. */ - @Generated - @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) { + @Metadata(generated = true) + public Response 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, RequestOptions requestOptions) { return this.serviceClient.stageBlockWithResponse(containerName, blob, blockId, contentLength, body, transactionalContentMD5, transactionalContentCrc64, timeout, leaseId, requestId, structuredBodyType, - structuredContentLength, cpkInfo, encryptionScopeParam, context); + structuredContentLength, cpkInfo, encryptionScopeParam, requestOptions); } /** * 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 @@ -535,8 +380,7 @@ public ResponseBase stageBlockWithResponse(St * @throws StorageErrorException 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) + @Metadata(generated = true) 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, @@ -546,51 +390,10 @@ public void stageBlock(String containerName, String blob, String blockId, long c cpkInfo, encryptionScopeParam); } - /** - * The Stage Block operation creates a new block to be committed as part of a blob. - * - * @param containerName The container name. - * @param blob The blob name. - * @param blockId A valid Base64 string value that identifies the block. Prior to encoding, the string must be less - * than or equal to 64 bytes in size. For a given blob, the length of the value specified for the blockid parameter - * must be the same size for each block. - * @param contentLength The length of the request. - * @param body Initial data. - * @param transactionalContentMD5 Specify the transactional md5 for the body, to be validated by the service. - * @param transactionalContentCrc64 Specify the transactional crc64 for the body, to be validated by the service. - * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. - * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. - * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. - * @param 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 StorageErrorException 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 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) { - return this.serviceClient.stageBlockNoCustomHeadersWithResponse(containerName, blob, blockId, contentLength, - body, transactionalContentMD5, transactionalContentCrc64, timeout, leaseId, requestId, structuredBodyType, - structuredContentLength, cpkInfo, encryptionScopeParam, context); - } - /** * The Stage Block operation creates a new block to be committed as part of a blob where the contents are read from * a URL. - * + * * @param containerName The container name. * @param blob The blob name. * @param blockId A valid Base64 string value that identifies the block. Prior to encoding, the string must be less @@ -618,29 +421,28 @@ public Response stageBlockNoCustomHeadersWithResponse(String containerName * copy source. * @param cpkInfo Parameter group. * @param encryptionScopeParam Parameter group. - * @param context The context to associate with this operation. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws StorageErrorException thrown if 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 the response. */ - @Generated - @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, CpkInfo cpkInfo, EncryptionScope encryptionScopeParam, Context context) { + @Metadata(generated = true) + public Response stageBlockFromURLWithResponse(String containerName, String blob, String blockId, + long contentLength, String sourceUrl, String sourceRange, byte[] sourceContentMD5, byte[] sourceContentcrc64, + Integer timeout, String leaseId, OffsetDateTime sourceIfModifiedSince, OffsetDateTime sourceIfUnmodifiedSince, + String sourceIfMatch, String sourceIfNoneMatch, String requestId, String copySourceAuthorization, + CpkInfo cpkInfo, EncryptionScope encryptionScopeParam, RequestOptions requestOptions) { return this.serviceClient.stageBlockFromURLWithResponse(containerName, blob, blockId, contentLength, sourceUrl, sourceRange, sourceContentMD5, sourceContentcrc64, timeout, leaseId, sourceIfModifiedSince, sourceIfUnmodifiedSince, sourceIfMatch, sourceIfNoneMatch, requestId, copySourceAuthorization, cpkInfo, - encryptionScopeParam, context); + encryptionScopeParam, requestOptions); } /** * 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 @@ -672,8 +474,7 @@ public ResponseBase stageBlockFromURLW * @throws StorageErrorException 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) + @Metadata(generated = true) 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, @@ -684,56 +485,6 @@ public void stageBlockFromURL(String containerName, String blob, String blockId, sourceIfMatch, sourceIfNoneMatch, requestId, copySourceAuthorization, cpkInfo, encryptionScopeParam); } - /** - * The Stage Block operation creates a new block to be committed as part of a blob where the contents are read from - * a URL. - * - * @param containerName The container name. - * @param blob The blob name. - * @param blockId A valid Base64 string value that identifies the block. Prior to encoding, the string must be less - * than or equal to 64 bytes in size. For a given blob, the length of the value specified for the blockid parameter - * must be the same size for each block. - * @param contentLength The length of the request. - * @param sourceUrl Specify a URL to the copy source. - * @param sourceRange Bytes of source data in the specified range. - * @param sourceContentMD5 Specify the md5 calculated for the range of bytes that must be read from the copy source. - * @param sourceContentcrc64 Specify the crc64 calculated for the range of bytes that must be read from the copy - * source. - * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. - * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. - * @param sourceIfModifiedSince Specify this header value to operate only on a blob if it has been modified since - * the specified date/time. - * @param sourceIfUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified - * since the specified date/time. - * @param sourceIfMatch Specify an ETag value to operate only on blobs with a matching value. - * @param sourceIfNoneMatch Specify an ETag value to operate only on blobs without a matching value. - * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. - * @param copySourceAuthorization Only Bearer type is supported. Credentials should be a valid OAuth access token to - * copy source. - * @param cpkInfo Parameter group. - * @param encryptionScopeParam Parameter group. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws StorageErrorException 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 Response stageBlockFromURLNoCustomHeadersWithResponse(String containerName, String blob, - String blockId, long contentLength, String sourceUrl, String sourceRange, byte[] sourceContentMD5, - byte[] sourceContentcrc64, Integer timeout, String leaseId, OffsetDateTime sourceIfModifiedSince, - OffsetDateTime sourceIfUnmodifiedSince, String sourceIfMatch, String sourceIfNoneMatch, String requestId, - String copySourceAuthorization, CpkInfo cpkInfo, EncryptionScope encryptionScopeParam, Context context) { - return this.serviceClient.stageBlockFromURLNoCustomHeadersWithResponse(containerName, blob, blockId, - contentLength, sourceUrl, sourceRange, sourceContentMD5, sourceContentcrc64, timeout, leaseId, - sourceIfModifiedSince, sourceIfUnmodifiedSince, sourceIfMatch, sourceIfNoneMatch, requestId, - copySourceAuthorization, cpkInfo, encryptionScopeParam, context); - } - /** * The Commit Block List operation writes a blob by specifying the list of block IDs that make up the blob. In order * to be written as part of a blob, a block must have been successfully written to the server in a prior Put Block @@ -741,7 +492,7 @@ public Response stageBlockFromURLNoCustomHeadersWithResponse(String contai * 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. @@ -774,25 +525,24 @@ public Response stageBlockFromURLNoCustomHeadersWithResponse(String contai * @param blobHttpHeaders Parameter group. * @param cpkInfo Parameter group. * @param encryptionScopeParam Parameter group. - * @param context The context to associate with this operation. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws StorageErrorException thrown if 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 the response. */ - @Generated - @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) { + @Metadata(generated = true) + public Response 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, + RequestOptions requestOptions) { return this.serviceClient.commitBlockListWithResponse(containerName, blob, blocks, timeout, transactionalContentMD5, transactionalContentCrc64, metadata, leaseId, tier, ifModifiedSince, ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, requestId, blobTagsString, immutabilityPolicyExpiry, - immutabilityPolicyMode, legalHold, blobHttpHeaders, cpkInfo, encryptionScopeParam, context); + immutabilityPolicyMode, legalHold, blobHttpHeaders, cpkInfo, encryptionScopeParam, requestOptions); } /** @@ -802,7 +552,7 @@ public ResponseBase commitBlockListWithR * committing the new and existing blocks together. You can do this by specifying whether to commit a block from the * committed block list or from the uncommitted block list, or to commit the most recently uploaded version of the * block, whichever list it may belong to. - * + * * @param containerName The container name. * @param blob The blob name. * @param blocks Blob Blocks. @@ -839,8 +589,7 @@ public ResponseBase commitBlockListWithR * @throws StorageErrorException 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) + @Metadata(generated = true) 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, @@ -853,70 +602,9 @@ public void commitBlockList(String containerName, String blob, BlockLookupList b blobHttpHeaders, cpkInfo, encryptionScopeParam); } - /** - * The Commit Block List operation writes a blob by specifying the list of block IDs that make up the blob. In order - * to be written as part of a blob, a block must have been successfully written to the server in a prior Put Block - * operation. You can call Put Block List to update a blob by uploading only those blocks that have changed, then - * committing the new and existing blocks together. You can do this by specifying whether to commit a block from the - * committed block list or from the uncommitted block list, or to commit the most recently uploaded version of the - * block, whichever list it may belong to. - * - * @param containerName The container name. - * @param blob The blob name. - * @param blocks Blob Blocks. - * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. - * @param transactionalContentMD5 Specify the transactional md5 for the body, to be validated by the service. - * @param transactionalContentCrc64 Specify the transactional crc64 for the body, to be validated by the service. - * @param metadata Optional. Specifies a user-defined name-value pair associated with the blob. If no name-value - * pairs are specified, the operation will copy the metadata from the source blob or file to the destination blob. - * If one or more name-value pairs are specified, the destination blob is created with the specified metadata, and - * metadata is not copied from the source blob or file. Note that beginning with version 2009-09-19, metadata names - * must adhere to the naming rules for C# identifiers. See Naming and Referencing Containers, Blobs, and Metadata - * for more information. - * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. - * @param tier Optional. Indicates the tier to be set on the blob. - * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the - * specified date/time. - * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since - * the specified date/time. - * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. - * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. - * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. - * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. - * @param blobTagsString Optional. Used to set blob tags in various blob operations. - * @param immutabilityPolicyExpiry Specifies the date time when the blobs immutability policy is set to expire. - * @param immutabilityPolicyMode Specifies the immutability policy mode to set on the blob. - * @param legalHold Specified if a legal hold should be set on the blob. - * @param blobHttpHeaders Parameter group. - * @param cpkInfo Parameter group. - * @param encryptionScopeParam Parameter group. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws StorageErrorException 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 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) { - return this.serviceClient.commitBlockListNoCustomHeadersWithResponse(containerName, blob, blocks, timeout, - transactionalContentMD5, transactionalContentCrc64, metadata, leaseId, tier, ifModifiedSince, - ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, requestId, blobTagsString, immutabilityPolicyExpiry, - immutabilityPolicyMode, legalHold, blobHttpHeaders, cpkInfo, encryptionScopeParam, context); - } - /** * The Get Block List operation retrieves the list of blocks that have been uploaded as part of a block blob. - * + * * @param containerName The container name. * @param blob The blob name. * @param listType Specifies whether to return the list of committed blocks, the list of uncommitted blocks, or both @@ -932,24 +620,23 @@ public Response commitBlockListNoCustomHeadersWithResponse(String containe * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. * @param requestId Provides a 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. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws StorageErrorException 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}. + * @return the response. */ - @Generated - @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) { + @Metadata(generated = true) + public Response getBlockListWithResponse(String containerName, String blob, BlockListType listType, + String snapshot, Integer timeout, String leaseId, String ifTags, String requestId, + RequestOptions requestOptions) { return this.serviceClient.getBlockListWithResponse(containerName, blob, listType, snapshot, timeout, leaseId, - ifTags, requestId, context); + ifTags, requestId, requestOptions); } /** * 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 @@ -970,44 +657,10 @@ public ResponseBase getBlockListWithRe * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the response. */ - @Generated - @ServiceMethod(returns = ReturnType.SINGLE) + @Metadata(generated = true) public BlockList getBlockList(String containerName, String blob, BlockListType listType, String snapshot, Integer timeout, String leaseId, String ifTags, String requestId) { return this.serviceClient.getBlockList(containerName, blob, listType, snapshot, timeout, leaseId, ifTags, requestId); } - - /** - * The Get Block List operation retrieves the list of blocks that have been uploaded as part of a block blob. - * - * @param containerName The container name. - * @param blob The blob name. - * @param listType Specifies whether to return the list of committed blocks, the list of uncommitted blocks, or both - * lists together. - * @param snapshot The snapshot parameter is an opaque DateTime value that, when present, specifies the blob - * snapshot to retrieve. For more information on working with blob snapshots, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/creating-a-snapshot-of-a-blob">Creating - * a Snapshot of a Blob.</a>. - * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. - * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. - * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. - * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws StorageErrorException 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 Response getBlockListNoCustomHeadersWithResponse(String containerName, String blob, - BlockListType listType, String snapshot, Integer timeout, String leaseId, String ifTags, String requestId, - Context context) { - return this.serviceClient.getBlockListNoCustomHeadersWithResponse(containerName, blob, listType, snapshot, - timeout, leaseId, ifTags, requestId, context); - } } diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/ContainerClient.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/ContainerClient.java index 4b11e8171ee4..061a3f7ff18d 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/ContainerClient.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/ContainerClient.java @@ -4,33 +4,10 @@ package com.azure.v2.storage.blob; -import com.azure.v2.core.annotation.Generated; -import com.azure.v2.core.annotation.ReturnType; -import com.azure.v2.core.annotation.ServiceClient; -import com.azure.v2.core.annotation.ServiceMethod; -import com.azure.v2.core.http.rest.ResponseBase; import com.azure.v2.storage.blob.implementation.ContainersImpl; import com.azure.v2.storage.blob.implementation.models.BlobSignedIdentifierWrapper; import com.azure.v2.storage.blob.models.BlobContainerEncryptionScope; import com.azure.v2.storage.blob.models.BlobSignedIdentifier; -import com.azure.v2.storage.blob.models.ContainersAcquireLeaseHeaders; -import com.azure.v2.storage.blob.models.ContainersBreakLeaseHeaders; -import com.azure.v2.storage.blob.models.ContainersChangeLeaseHeaders; -import com.azure.v2.storage.blob.models.ContainersCreateHeaders; -import com.azure.v2.storage.blob.models.ContainersDeleteHeaders; -import com.azure.v2.storage.blob.models.ContainersFilterBlobsHeaders; -import com.azure.v2.storage.blob.models.ContainersGetAccessPolicyHeaders; -import com.azure.v2.storage.blob.models.ContainersGetAccountInfoHeaders; -import com.azure.v2.storage.blob.models.ContainersGetPropertiesHeaders; -import com.azure.v2.storage.blob.models.ContainersListBlobFlatSegmentHeaders; -import com.azure.v2.storage.blob.models.ContainersListBlobHierarchySegmentHeaders; -import com.azure.v2.storage.blob.models.ContainersReleaseLeaseHeaders; -import com.azure.v2.storage.blob.models.ContainersRenameHeaders; -import com.azure.v2.storage.blob.models.ContainersRenewLeaseHeaders; -import com.azure.v2.storage.blob.models.ContainersRestoreHeaders; -import com.azure.v2.storage.blob.models.ContainersSetAccessPolicyHeaders; -import com.azure.v2.storage.blob.models.ContainersSetMetadataHeaders; -import com.azure.v2.storage.blob.models.ContainersSubmitBatchHeaders; import com.azure.v2.storage.blob.models.FilterBlobSegment; import com.azure.v2.storage.blob.models.FilterBlobsIncludeItem; import com.azure.v2.storage.blob.models.ListBlobsFlatSegmentResponse; @@ -38,9 +15,11 @@ import com.azure.v2.storage.blob.models.ListBlobsIncludeItem; import com.azure.v2.storage.blob.models.PublicAccessType; import com.azure.v2.storage.blob.models.StorageErrorException; +import io.clientcore.core.annotations.Metadata; +import io.clientcore.core.annotations.ServiceClient; +import io.clientcore.core.http.models.RequestOptions; import io.clientcore.core.http.models.Response; -import io.clientcore.core.util.Context; -import io.clientcore.core.util.binarydata.BinaryData; +import io.clientcore.core.models.binarydata.BinaryData; import java.io.InputStream; import java.time.OffsetDateTime; import java.util.List; @@ -51,15 +30,15 @@ */ @ServiceClient(builder = AzureBlobStorageBuilder.class) public final class ContainerClient { - @Generated + @Metadata(generated = true) private final ContainersImpl serviceClient; /** * Initializes an instance of ContainerClient class. - * + * * @param serviceClient the service client implementation. */ - @Generated + @Metadata(generated = true) ContainerClient(ContainersImpl serviceClient) { this.serviceClient = serviceClient; } @@ -67,7 +46,7 @@ public final class ContainerClient { /** * creates a new container under the specified account. If the container with the same name already exists, the * operation fails. - * + * * @param containerName The container name. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting @@ -82,25 +61,24 @@ public final class ContainerClient { * @param requestId Provides a 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. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws StorageErrorException thrown if 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 the response. */ - @Generated - @ServiceMethod(returns = ReturnType.SINGLE) - public ResponseBase createWithResponse(String containerName, Integer timeout, - Map metadata, PublicAccessType access, String requestId, - BlobContainerEncryptionScope blobContainerEncryptionScope, Context context) { + @Metadata(generated = true) + public Response createWithResponse(String containerName, Integer timeout, Map metadata, + PublicAccessType access, String requestId, BlobContainerEncryptionScope blobContainerEncryptionScope, + RequestOptions requestOptions) { return this.serviceClient.createWithResponse(containerName, timeout, metadata, access, requestId, - blobContainerEncryptionScope, context); + blobContainerEncryptionScope, requestOptions); } /** * creates a new container under the specified account. If the container with the same name already exists, the * operation fails. - * + * * @param containerName The container name. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting @@ -119,50 +97,16 @@ public ResponseBase createWithResponse(String con * @throws StorageErrorException 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) + @Metadata(generated = true) public void create(String containerName, Integer timeout, Map metadata, PublicAccessType access, String requestId, BlobContainerEncryptionScope blobContainerEncryptionScope) { this.serviceClient.create(containerName, timeout, metadata, access, requestId, blobContainerEncryptionScope); } - /** - * creates a new container under the specified account. If the container with the same name already exists, the - * operation fails. - * - * @param containerName The container name. - * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. - * @param metadata Optional. Specifies a user-defined name-value pair associated with the blob. If no name-value - * pairs are specified, the operation will copy the metadata from the source blob or file to the destination blob. - * If one or more name-value pairs are specified, the destination blob is created with the specified metadata, and - * metadata is not copied from the source blob or file. Note that beginning with version 2009-09-19, metadata names - * must adhere to the naming rules for C# identifiers. See Naming and Referencing Containers, Blobs, and Metadata - * for more information. - * @param access Specifies whether data in the container may be accessed publicly and the level of access. - * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. - * @param blobContainerEncryptionScope Parameter group. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws StorageErrorException 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 Response createNoCustomHeadersWithResponse(String containerName, Integer timeout, - Map metadata, PublicAccessType access, String requestId, - BlobContainerEncryptionScope blobContainerEncryptionScope, Context context) { - return this.serviceClient.createNoCustomHeadersWithResponse(containerName, timeout, metadata, access, requestId, - blobContainerEncryptionScope, context); - } - /** * returns all user-defined metadata and system properties for the specified container. The data returned does not * include the container's list of blobs. - * + * * @param containerName The container name. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting @@ -170,23 +114,22 @@ public Response createNoCustomHeadersWithResponse(String containerName, In * @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. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws StorageErrorException thrown if 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 the response. */ - @Generated - @ServiceMethod(returns = ReturnType.SINGLE) - public ResponseBase getPropertiesWithResponse(String containerName, - Integer timeout, String leaseId, String requestId, Context context) { - return this.serviceClient.getPropertiesWithResponse(containerName, timeout, leaseId, requestId, context); + @Metadata(generated = true) + public Response getPropertiesWithResponse(String containerName, Integer timeout, String leaseId, + String requestId, RequestOptions requestOptions) { + return this.serviceClient.getPropertiesWithResponse(containerName, timeout, leaseId, requestId, 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. - * + * * @param containerName The container name. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting @@ -198,41 +141,15 @@ public ResponseBase getPropertiesWithRespo * @throws StorageErrorException 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) + @Metadata(generated = true) public void getProperties(String containerName, Integer timeout, String leaseId, String requestId) { this.serviceClient.getProperties(containerName, timeout, leaseId, requestId); } - /** - * returns all user-defined metadata and system properties for the specified container. The data returned does not - * include the container's list of blobs. - * - * @param containerName The container name. - * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. - * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. - * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws StorageErrorException 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 Response getPropertiesNoCustomHeadersWithResponse(String containerName, Integer timeout, - String leaseId, String requestId, Context context) { - return this.serviceClient.getPropertiesNoCustomHeadersWithResponse(containerName, timeout, leaseId, requestId, - context); - } - /** * operation marks the specified container for deletion. The container and any blobs contained within it are later * deleted during garbage collection. - * + * * @param containerName The container name. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting @@ -244,25 +161,24 @@ public Response getPropertiesNoCustomHeadersWithResponse(String containerN * 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. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws StorageErrorException thrown if 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 the response. */ - @Generated - @ServiceMethod(returns = ReturnType.SINGLE) - public ResponseBase deleteWithResponse(String containerName, Integer timeout, - String leaseId, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String requestId, - Context context) { + @Metadata(generated = true) + public Response deleteWithResponse(String containerName, Integer timeout, String leaseId, + OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String requestId, + RequestOptions requestOptions) { return this.serviceClient.deleteWithResponse(containerName, timeout, leaseId, ifModifiedSince, - ifUnmodifiedSince, requestId, context); + ifUnmodifiedSince, requestId, requestOptions); } /** * operation marks the specified container for deletion. The container and any blobs contained within it are later * deleted during garbage collection. - * + * * @param containerName The container name. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting @@ -278,45 +194,15 @@ public ResponseBase deleteWithResponse(String con * @throws StorageErrorException 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) + @Metadata(generated = true) public void delete(String containerName, Integer timeout, String leaseId, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String requestId) { this.serviceClient.delete(containerName, timeout, leaseId, ifModifiedSince, ifUnmodifiedSince, requestId); } - /** - * operation marks the specified container for deletion. The container and any blobs contained within it are later - * deleted during garbage collection. - * - * @param containerName The container name. - * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. - * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. - * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the - * specified date/time. - * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since - * the specified date/time. - * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws StorageErrorException 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 Response deleteNoCustomHeadersWithResponse(String containerName, Integer timeout, String leaseId, - OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String requestId, Context context) { - return this.serviceClient.deleteNoCustomHeadersWithResponse(containerName, timeout, leaseId, ifModifiedSince, - ifUnmodifiedSince, requestId, context); - } - /** * operation sets one or more user-defined name-value pairs for the specified container. - * + * * @param containerName The container name. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting @@ -332,24 +218,22 @@ public Response deleteNoCustomHeadersWithResponse(String containerName, In * 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. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws StorageErrorException thrown if 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 the response. */ - @Generated - @ServiceMethod(returns = ReturnType.SINGLE) - public ResponseBase setMetadataWithResponse(String containerName, - Integer timeout, String leaseId, Map metadata, OffsetDateTime ifModifiedSince, String requestId, - Context context) { + @Metadata(generated = true) + public Response setMetadataWithResponse(String containerName, Integer timeout, String leaseId, + Map metadata, OffsetDateTime ifModifiedSince, String requestId, RequestOptions requestOptions) { return this.serviceClient.setMetadataWithResponse(containerName, timeout, leaseId, metadata, ifModifiedSince, - requestId, context); + requestId, requestOptions); } /** * operation sets one or more user-defined name-value pairs for the specified container. - * + * * @param containerName The container name. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting @@ -369,49 +253,16 @@ public ResponseBase setMetadataWithResponse( * @throws StorageErrorException 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) + @Metadata(generated = true) public void setMetadata(String containerName, Integer timeout, String leaseId, Map metadata, OffsetDateTime ifModifiedSince, String requestId) { this.serviceClient.setMetadata(containerName, timeout, leaseId, metadata, ifModifiedSince, requestId); } - /** - * operation sets one or more user-defined name-value pairs for the specified container. - * - * @param containerName The container name. - * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. - * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. - * @param metadata Optional. Specifies a user-defined name-value pair associated with the blob. If no name-value - * pairs are specified, the operation will copy the metadata from the source blob or file to the destination blob. - * If one or more name-value pairs are specified, the destination blob is created with the specified metadata, and - * metadata is not copied from the source blob or file. Note that beginning with version 2009-09-19, metadata names - * must adhere to the naming rules for C# identifiers. See Naming and Referencing Containers, Blobs, and Metadata - * for more information. - * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the - * specified date/time. - * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws StorageErrorException 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 Response setMetadataNoCustomHeadersWithResponse(String containerName, Integer timeout, String leaseId, - Map metadata, OffsetDateTime ifModifiedSince, String requestId, Context context) { - return this.serviceClient.setMetadataNoCustomHeadersWithResponse(containerName, timeout, leaseId, metadata, - ifModifiedSince, requestId, context); - } - /** * gets the permissions for the specified container. The permissions indicate whether container data may be accessed * publicly. - * + * * @param containerName The container name. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting @@ -419,23 +270,23 @@ public Response setMetadataNoCustomHeadersWithResponse(String containerNam * @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. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws StorageErrorException 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}. + * @return the permissions for the specified container. */ - @Generated - @ServiceMethod(returns = ReturnType.SINGLE) - public ResponseBase getAccessPolicyWithResponse( - String containerName, Integer timeout, String leaseId, String requestId, Context context) { - return this.serviceClient.getAccessPolicyWithResponse(containerName, timeout, leaseId, requestId, context); + @Metadata(generated = true) + public Response getAccessPolicyWithResponse(String containerName, Integer timeout, + String leaseId, String requestId, RequestOptions requestOptions) { + return this.serviceClient.getAccessPolicyWithResponse(containerName, timeout, leaseId, requestId, + requestOptions); } /** * gets the permissions for the specified container. The permissions indicate whether container data may be accessed * publicly. - * + * * @param containerName The container name. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting @@ -448,42 +299,16 @@ public ResponseBase getAccessPolicyNoCustomHeadersWithResponse(String containerName, - Integer timeout, String leaseId, String requestId, Context context) { - return this.serviceClient.getAccessPolicyNoCustomHeadersWithResponse(containerName, timeout, leaseId, requestId, - context); - } - /** * sets the permissions for the specified container. The permissions indicate whether blobs in a container may be * accessed publicly. - * + * * @param containerName The container name. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting @@ -497,25 +322,24 @@ public Response getAccessPolicyNoCustomHeadersWithR * @param requestId Provides a 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. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws StorageErrorException thrown if 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 the response. */ - @Generated - @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) { + @Metadata(generated = true) + public Response setAccessPolicyWithResponse(String containerName, Integer timeout, String leaseId, + PublicAccessType access, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String requestId, + List containerAcl, RequestOptions requestOptions) { return this.serviceClient.setAccessPolicyWithResponse(containerName, timeout, leaseId, access, ifModifiedSince, - ifUnmodifiedSince, requestId, containerAcl, context); + ifUnmodifiedSince, requestId, containerAcl, requestOptions); } /** * sets the permissions for the specified container. The permissions indicate whether blobs in a container may be * accessed publicly. - * + * * @param containerName The container name. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting @@ -533,8 +357,7 @@ public ResponseBase setAccessPolicyWithR * @throws StorageErrorException 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) + @Metadata(generated = true) public void setAccessPolicy(String containerName, Integer timeout, String leaseId, PublicAccessType access, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String requestId, List containerAcl) { @@ -542,41 +365,9 @@ public void setAccessPolicy(String containerName, Integer timeout, String leaseI requestId, containerAcl); } - /** - * sets the permissions for the specified container. The permissions indicate whether blobs in a container may be - * accessed publicly. - * - * @param containerName The container name. - * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. - * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. - * @param access Specifies whether data in the container may be accessed publicly and the level of access. - * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the - * specified date/time. - * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since - * the specified date/time. - * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. - * @param containerAcl the acls for the container. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws StorageErrorException 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 Response setAccessPolicyNoCustomHeadersWithResponse(String containerName, Integer timeout, - String leaseId, PublicAccessType access, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, - String requestId, List containerAcl, Context context) { - return this.serviceClient.setAccessPolicyNoCustomHeadersWithResponse(containerName, timeout, leaseId, access, - ifModifiedSince, ifUnmodifiedSince, requestId, containerAcl, context); - } - /** * Restores a previously-deleted container. - * + * * @param containerName The container name. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting @@ -587,23 +378,22 @@ public Response setAccessPolicyNoCustomHeadersWithResponse(String containe * 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. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws StorageErrorException thrown if 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 the response. */ - @Generated - @ServiceMethod(returns = ReturnType.SINGLE) - public ResponseBase restoreWithResponse(String containerName, Integer timeout, - String requestId, String deletedContainerName, String deletedContainerVersion, Context context) { + @Metadata(generated = true) + public Response restoreWithResponse(String containerName, Integer timeout, String requestId, + String deletedContainerName, String deletedContainerVersion, RequestOptions requestOptions) { return this.serviceClient.restoreWithResponse(containerName, timeout, requestId, deletedContainerName, - deletedContainerVersion, context); + deletedContainerVersion, requestOptions); } /** * Restores a previously-deleted container. - * + * * @param containerName The container name. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting @@ -618,43 +408,15 @@ public ResponseBase restoreWithResponse(String c * @throws StorageErrorException 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) + @Metadata(generated = true) public void restore(String containerName, Integer timeout, String requestId, String deletedContainerName, String deletedContainerVersion) { this.serviceClient.restore(containerName, timeout, requestId, deletedContainerName, deletedContainerVersion); } - /** - * Restores a previously-deleted container. - * - * @param containerName The container name. - * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. - * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. - * @param deletedContainerName Optional. Version 2019-12-12 and later. Specifies the name of the deleted container - * to restore. - * @param deletedContainerVersion Optional. Version 2019-12-12 and later. Specifies the version of the deleted - * container to restore. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws StorageErrorException 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 Response restoreNoCustomHeadersWithResponse(String containerName, Integer timeout, String requestId, - String deletedContainerName, String deletedContainerVersion, Context context) { - return this.serviceClient.restoreNoCustomHeadersWithResponse(containerName, timeout, requestId, - deletedContainerName, deletedContainerVersion, context); - } - /** * Renames an existing container. - * + * * @param containerName The container name. * @param sourceContainerName Required. Specifies the name of the container to rename. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a @@ -664,23 +426,22 @@ public Response restoreNoCustomHeadersWithResponse(String containerName, I * 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. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws StorageErrorException thrown if 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 the response. */ - @Generated - @ServiceMethod(returns = ReturnType.SINGLE) - public ResponseBase renameWithResponse(String containerName, - String sourceContainerName, Integer timeout, String requestId, String sourceLeaseId, Context context) { + @Metadata(generated = true) + public Response renameWithResponse(String containerName, String sourceContainerName, Integer timeout, + String requestId, String sourceLeaseId, RequestOptions requestOptions) { return this.serviceClient.renameWithResponse(containerName, sourceContainerName, timeout, requestId, - sourceLeaseId, context); + sourceLeaseId, requestOptions); } /** * 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 @@ -694,42 +455,15 @@ public ResponseBase renameWithResponse(String con * @throws StorageErrorException 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) + @Metadata(generated = true) public void rename(String containerName, String sourceContainerName, Integer timeout, String requestId, String sourceLeaseId) { this.serviceClient.rename(containerName, sourceContainerName, timeout, requestId, sourceLeaseId); } - /** - * Renames an existing container. - * - * @param containerName The container name. - * @param sourceContainerName Required. Specifies the name of the container to rename. - * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. - * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. - * @param sourceLeaseId A lease ID for the source path. If specified, the source path must have an active lease and - * the lease ID must match. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws StorageErrorException 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 Response renameNoCustomHeadersWithResponse(String containerName, String sourceContainerName, - Integer timeout, String requestId, String sourceLeaseId, Context context) { - return this.serviceClient.renameNoCustomHeadersWithResponse(containerName, sourceContainerName, timeout, - requestId, sourceLeaseId, context); - } - /** * The Batch operation allows multiple API calls to be embedded into a single HTTP request. - * + * * @param containerName The container name. * @param contentLength The length of the request. * @param multipartContentType Required. The value of this header must be multipart/mixed with a batch boundary. @@ -740,24 +474,23 @@ public Response renameNoCustomHeadersWithResponse(String containerName, St * Timeouts for Blob Service Operations.</a>. * @param requestId Provides a 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. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws StorageErrorException 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}. + * @return the response. */ - @Generated - @ServiceMethod(returns = ReturnType.SINGLE) - public ResponseBase submitBatchWithResponse(String containerName, - long contentLength, String multipartContentType, BinaryData body, Integer timeout, String requestId, - Context context) { + @Metadata(generated = true) + public Response submitBatchWithResponse(String containerName, long contentLength, + String multipartContentType, BinaryData body, Integer timeout, String requestId, + RequestOptions requestOptions) { return this.serviceClient.submitBatchWithResponse(containerName, contentLength, multipartContentType, body, - timeout, requestId, context); + timeout, requestId, requestOptions); } /** * 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. @@ -773,45 +506,17 @@ public ResponseBase submitBatchWithRe * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the response. */ - @Generated - @ServiceMethod(returns = ReturnType.SINGLE) + @Metadata(generated = true) public InputStream submitBatch(String containerName, long contentLength, String multipartContentType, BinaryData body, Integer timeout, String requestId) { return this.serviceClient.submitBatch(containerName, contentLength, multipartContentType, body, timeout, requestId); } - /** - * The Batch operation allows multiple API calls to be embedded into a single HTTP request. - * - * @param containerName The container name. - * @param contentLength The length of the request. - * @param multipartContentType Required. The value of this header must be multipart/mixed with a batch boundary. - * Example header value: multipart/mixed; boundary=batch_<GUID>. - * @param body Initial data. - * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. - * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws StorageErrorException 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 Response submitBatchNoCustomHeadersWithResponse(String containerName, long contentLength, - String multipartContentType, BinaryData body, Integer timeout, String requestId, Context context) { - return this.serviceClient.submitBatchNoCustomHeadersWithResponse(containerName, contentLength, - multipartContentType, body, timeout, requestId, context); - } - /** * The Filter Blobs operation enables callers to list blobs in a container whose tags match a given search * expression. Filter blobs searches within the given container. - * + * * @param containerName The container name. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting @@ -830,25 +535,24 @@ public Response submitBatchNoCustomHeadersWithResponse(String conta * 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. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws StorageErrorException 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}. + * @return the result of a Filter Blobs API call. */ - @Generated - @ServiceMethod(returns = ReturnType.SINGLE) - public ResponseBase filterBlobsWithResponse(String containerName, - Integer timeout, String requestId, String where, String marker, Integer maxresults, - List include, Context context) { + @Metadata(generated = true) + public Response filterBlobsWithResponse(String containerName, Integer timeout, String requestId, + String where, String marker, Integer maxresults, List include, + RequestOptions requestOptions) { return this.serviceClient.filterBlobsWithResponse(containerName, timeout, requestId, where, marker, maxresults, - include, context); + include, requestOptions); } /** * The Filter Blobs operation enables callers to list blobs in a container whose tags match a given search * expression. Filter blobs searches within the given container. - * + * * @param containerName The container name. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting @@ -872,54 +576,16 @@ public ResponseBase filterBlobs * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the result of a Filter Blobs API call. */ - @Generated - @ServiceMethod(returns = ReturnType.SINGLE) + @Metadata(generated = true) public FilterBlobSegment filterBlobs(String containerName, Integer timeout, String requestId, String where, String marker, Integer maxresults, List include) { return this.serviceClient.filterBlobs(containerName, timeout, requestId, where, marker, maxresults, include); } - /** - * The Filter Blobs operation enables callers to list blobs in a container whose tags match a given search - * expression. Filter blobs searches within the given container. - * - * @param containerName The container name. - * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. - * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. - * @param where Filters the results to return only to return only blobs whose tags match the specified expression. - * @param marker A string value that identifies the portion of the list of containers to be returned with the next - * listing operation. The operation returns the NextMarker value within the response body if the listing operation - * did not return all containers remaining to be listed with the current page. The NextMarker value can be used as - * the value for the marker parameter in a subsequent call to request the next page of list items. The marker value - * is opaque to the client. - * @param maxresults Specifies the maximum number of containers to return. If the request does not specify - * maxresults, or specifies a value greater than 5000, the server will return up to 5000 items. Note that if the - * listing operation crosses a partition boundary, then the service will return a continuation token for retrieving - * the remainder of the results. For this reason, it is possible that the service will return fewer results than - * specified by maxresults, or than the default of 5000. - * @param include Include this parameter to specify one or more datasets to include in the response. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws StorageErrorException 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. - */ - @Generated - @ServiceMethod(returns = ReturnType.SINGLE) - public Response filterBlobsNoCustomHeadersWithResponse(String containerName, Integer timeout, - String requestId, String where, String marker, Integer maxresults, List include, - Context context) { - return this.serviceClient.filterBlobsNoCustomHeadersWithResponse(containerName, timeout, requestId, where, - marker, maxresults, include, context); - } - /** * [Update] establishes and manages a lock on a container for delete operations. The lock duration can be 15 to 60 * seconds, or can be infinite. - * + * * @param containerName The container name. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting @@ -936,25 +602,24 @@ public Response filterBlobsNoCustomHeadersWithResponse(String * 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. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws StorageErrorException thrown if 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 the response. */ - @Generated - @ServiceMethod(returns = ReturnType.SINGLE) - public ResponseBase acquireLeaseWithResponse(String containerName, - Integer timeout, Integer duration, String proposedLeaseId, OffsetDateTime ifModifiedSince, - OffsetDateTime ifUnmodifiedSince, String requestId, Context context) { + @Metadata(generated = true) + public Response acquireLeaseWithResponse(String containerName, Integer timeout, Integer duration, + String proposedLeaseId, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String requestId, + RequestOptions requestOptions) { return this.serviceClient.acquireLeaseWithResponse(containerName, timeout, duration, proposedLeaseId, - ifModifiedSince, ifUnmodifiedSince, requestId, context); + ifModifiedSince, ifUnmodifiedSince, requestId, requestOptions); } /** * [Update] establishes and manages a lock on a container for delete operations. The lock duration can be 15 to 60 * seconds, or can be infinite. - * + * * @param containerName The container name. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting @@ -975,8 +640,7 @@ public ResponseBase acquireLeaseWithRespons * @throws StorageErrorException 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) + @Metadata(generated = true) public void acquireLease(String containerName, Integer timeout, Integer duration, String proposedLeaseId, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String requestId) { this.serviceClient.acquireLease(containerName, timeout, duration, proposedLeaseId, ifModifiedSince, @@ -986,42 +650,7 @@ public void acquireLease(String containerName, Integer timeout, Integer duration /** * [Update] establishes and manages a lock on a container for delete operations. The lock duration can be 15 to 60 * seconds, or can be infinite. - * - * @param containerName The container name. - * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * 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 StorageErrorException 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 Response acquireLeaseNoCustomHeadersWithResponse(String containerName, Integer timeout, - Integer duration, String proposedLeaseId, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, - String requestId, Context context) { - return this.serviceClient.acquireLeaseNoCustomHeadersWithResponse(containerName, timeout, duration, - proposedLeaseId, ifModifiedSince, ifUnmodifiedSince, requestId, context); - } - - /** - * [Update] establishes and manages a lock on a container for delete operations. The lock duration can be 15 to 60 - * seconds, or can be infinite. - * + * * @param containerName The container name. * @param leaseId Specifies the current lease ID on the resource. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a @@ -1033,25 +662,24 @@ public Response acquireLeaseNoCustomHeadersWithResponse(String containerNa * 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. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws StorageErrorException thrown if 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 the response. */ - @Generated - @ServiceMethod(returns = ReturnType.SINGLE) - public ResponseBase releaseLeaseWithResponse(String containerName, - String leaseId, Integer timeout, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, - String requestId, Context context) { + @Metadata(generated = true) + public Response releaseLeaseWithResponse(String containerName, String leaseId, Integer timeout, + OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String requestId, + RequestOptions requestOptions) { return this.serviceClient.releaseLeaseWithResponse(containerName, leaseId, timeout, ifModifiedSince, - ifUnmodifiedSince, requestId, context); + ifUnmodifiedSince, requestId, requestOptions); } /** * [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 @@ -1067,8 +695,7 @@ public ResponseBase releaseLeaseWithRespons * @throws StorageErrorException 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) + @Metadata(generated = true) public void releaseLease(String containerName, String leaseId, Integer timeout, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String requestId) { this.serviceClient.releaseLease(containerName, leaseId, timeout, ifModifiedSince, ifUnmodifiedSince, requestId); @@ -1077,7 +704,7 @@ public void releaseLease(String containerName, String leaseId, Integer timeout, /** * [Update] establishes and manages a lock on a container for delete operations. The lock duration can be 15 to 60 * seconds, or can be infinite. - * + * * @param containerName The container name. * @param leaseId Specifies the current lease ID on the resource. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a @@ -1089,54 +716,24 @@ public void releaseLease(String containerName, String leaseId, Integer timeout, * 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. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws StorageErrorException 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 Response releaseLeaseNoCustomHeadersWithResponse(String containerName, String leaseId, Integer timeout, - OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String requestId, Context context) { - return this.serviceClient.releaseLeaseNoCustomHeadersWithResponse(containerName, leaseId, timeout, - ifModifiedSince, ifUnmodifiedSince, requestId, context); - } - - /** - * [Update] establishes and manages a lock on a container for delete operations. The lock duration can be 15 to 60 - * seconds, or can be infinite. - * - * @param containerName The container name. - * @param leaseId Specifies the current lease ID on the resource. - * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. - * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the - * specified date/time. - * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since - * the specified date/time. - * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws StorageErrorException thrown if 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 containerName, String leaseId, - Integer timeout, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String requestId, - Context context) { + @Metadata(generated = true) + public Response renewLeaseWithResponse(String containerName, String leaseId, Integer timeout, + OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String requestId, + RequestOptions requestOptions) { return this.serviceClient.renewLeaseWithResponse(containerName, leaseId, timeout, ifModifiedSince, - ifUnmodifiedSince, requestId, context); + ifUnmodifiedSince, requestId, requestOptions); } /** * [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 @@ -1152,8 +749,7 @@ public ResponseBase renewLeaseWithResponse(St * @throws StorageErrorException 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) + @Metadata(generated = true) public void renewLease(String containerName, String leaseId, Integer timeout, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String requestId) { this.serviceClient.renewLease(containerName, leaseId, timeout, ifModifiedSince, ifUnmodifiedSince, requestId); @@ -1162,36 +758,7 @@ public void renewLease(String containerName, String leaseId, Integer timeout, Of /** * [Update] establishes and manages a lock on a container for delete operations. The lock duration can be 15 to 60 * seconds, or can be infinite. - * - * @param containerName The container name. - * @param leaseId Specifies the current lease ID on the resource. - * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. - * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the - * specified date/time. - * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since - * the specified date/time. - * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws StorageErrorException 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 Response renewLeaseNoCustomHeadersWithResponse(String containerName, String leaseId, Integer timeout, - OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String requestId, Context context) { - return this.serviceClient.renewLeaseNoCustomHeadersWithResponse(containerName, leaseId, timeout, - ifModifiedSince, ifUnmodifiedSince, requestId, context); - } - - /** - * [Update] establishes and manages a lock on a container for delete operations. The lock duration can be 15 to 60 - * seconds, or can be infinite. - * + * * @param containerName The container name. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting @@ -1208,25 +775,24 @@ public Response renewLeaseNoCustomHeadersWithResponse(String containerName * 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. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws StorageErrorException thrown if 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 the response. */ - @Generated - @ServiceMethod(returns = ReturnType.SINGLE) - public ResponseBase breakLeaseWithResponse(String containerName, Integer timeout, - Integer breakPeriod, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String requestId, - Context context) { + @Metadata(generated = true) + public Response breakLeaseWithResponse(String containerName, Integer timeout, Integer breakPeriod, + OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String requestId, + RequestOptions requestOptions) { return this.serviceClient.breakLeaseWithResponse(containerName, timeout, breakPeriod, ifModifiedSince, - ifUnmodifiedSince, requestId, context); + ifUnmodifiedSince, requestId, requestOptions); } /** * [Update] establishes and manages a lock on a container for delete operations. The lock duration can be 15 to 60 * seconds, or can be infinite. - * + * * @param containerName The container name. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting @@ -1247,8 +813,7 @@ public ResponseBase breakLeaseWithResponse(St * @throws StorageErrorException 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) + @Metadata(generated = true) public void breakLease(String containerName, Integer timeout, Integer breakPeriod, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String requestId) { this.serviceClient.breakLease(containerName, timeout, breakPeriod, ifModifiedSince, ifUnmodifiedSince, @@ -1258,42 +823,7 @@ public void breakLease(String containerName, Integer timeout, Integer breakPerio /** * [Update] establishes and manages a lock on a container for delete operations. The lock duration can be 15 to 60 * seconds, or can be infinite. - * - * @param containerName The container name. - * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * 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 StorageErrorException 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 Response breakLeaseNoCustomHeadersWithResponse(String containerName, Integer timeout, - Integer breakPeriod, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String requestId, - Context context) { - return this.serviceClient.breakLeaseNoCustomHeadersWithResponse(containerName, timeout, breakPeriod, - ifModifiedSince, ifUnmodifiedSince, requestId, context); - } - - /** - * [Update] establishes and manages a lock on a container for delete operations. The lock duration can be 15 to 60 - * seconds, or can be infinite. - * + * * @param containerName The container name. * @param leaseId Specifies the current lease ID on the resource. * @param proposedLeaseId Proposed lease ID, in a GUID string format. The Blob service returns 400 (Invalid request) @@ -1308,25 +838,24 @@ public Response breakLeaseNoCustomHeadersWithResponse(String containerName * 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. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws StorageErrorException thrown if 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 the response. */ - @Generated - @ServiceMethod(returns = ReturnType.SINGLE) - public ResponseBase changeLeaseWithResponse(String containerName, - String leaseId, String proposedLeaseId, Integer timeout, OffsetDateTime ifModifiedSince, - OffsetDateTime ifUnmodifiedSince, String requestId, Context context) { + @Metadata(generated = true) + public Response changeLeaseWithResponse(String containerName, String leaseId, String proposedLeaseId, + Integer timeout, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String requestId, + RequestOptions requestOptions) { return this.serviceClient.changeLeaseWithResponse(containerName, leaseId, proposedLeaseId, timeout, - ifModifiedSince, ifUnmodifiedSince, requestId, context); + ifModifiedSince, ifUnmodifiedSince, requestId, requestOptions); } /** * [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) @@ -1345,50 +874,16 @@ public ResponseBase changeLeaseWithResponse( * @throws StorageErrorException 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) + @Metadata(generated = true) public void changeLease(String containerName, String leaseId, String proposedLeaseId, Integer timeout, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String requestId) { this.serviceClient.changeLease(containerName, leaseId, proposedLeaseId, timeout, ifModifiedSince, ifUnmodifiedSince, requestId); } - /** - * [Update] establishes and manages a lock on a container for delete operations. The lock duration can be 15 to 60 - * seconds, or can be infinite. - * - * @param containerName The container name. - * @param leaseId Specifies the current lease ID on the resource. - * @param proposedLeaseId Proposed lease ID, in a GUID string format. The Blob service returns 400 (Invalid request) - * if the proposed lease ID is not in the correct format. See Guid Constructor (String) for a list of valid GUID - * string formats. - * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. - * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the - * specified date/time. - * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since - * the specified date/time. - * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws StorageErrorException 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 Response changeLeaseNoCustomHeadersWithResponse(String containerName, String leaseId, - String proposedLeaseId, Integer timeout, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, - String requestId, Context context) { - return this.serviceClient.changeLeaseNoCustomHeadersWithResponse(containerName, leaseId, proposedLeaseId, - timeout, ifModifiedSince, ifUnmodifiedSince, requestId, context); - } - /** * [Update] The List Blobs operation returns a list of the blobs under the specified container. - * + * * @param containerName The container name. * @param prefix Filters the results to return only containers whose name begins with the specified prefix. * @param marker A string value that identifies the portion of the list of containers to be returned with the next @@ -1407,24 +902,23 @@ public Response changeLeaseNoCustomHeadersWithResponse(String containerNam * Timeouts for Blob Service Operations.</a>. * @param requestId Provides a 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. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws StorageErrorException 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}. + * @return an enumeration of blobs. */ - @Generated - @ServiceMethod(returns = ReturnType.SINGLE) - public ResponseBase - listBlobFlatSegmentWithResponse(String containerName, String prefix, String marker, Integer maxresults, - List include, Integer timeout, String requestId, Context context) { + @Metadata(generated = true) + public Response listBlobFlatSegmentWithResponse(String containerName, String prefix, + String marker, Integer maxresults, List include, Integer timeout, String requestId, + RequestOptions requestOptions) { return this.serviceClient.listBlobFlatSegmentWithResponse(containerName, prefix, marker, maxresults, include, - timeout, requestId, context); + timeout, requestId, requestOptions); } /** * [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 @@ -1448,8 +942,7 @@ public Response changeLeaseNoCustomHeadersWithResponse(String containerNam * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return an enumeration of blobs. */ - @Generated - @ServiceMethod(returns = ReturnType.SINGLE) + @Metadata(generated = true) public ListBlobsFlatSegmentResponse listBlobFlatSegment(String containerName, String prefix, String marker, Integer maxresults, List include, Integer timeout, String requestId) { return this.serviceClient.listBlobFlatSegment(containerName, prefix, marker, maxresults, include, timeout, @@ -1458,43 +951,7 @@ public ListBlobsFlatSegmentResponse listBlobFlatSegment(String containerName, St /** * [Update] The List Blobs operation returns a list of the blobs under the specified container. - * - * @param containerName The container name. - * @param prefix Filters the results to return only containers whose name begins with the specified prefix. - * @param marker A string value that identifies the portion of the list of containers to be returned with the next - * listing operation. The operation returns the NextMarker value within the response body if the listing operation - * did not return all containers remaining to be listed with the current page. The NextMarker value can be used as - * the value for the marker parameter in a subsequent call to request the next page of list items. The marker value - * is opaque to the client. - * @param maxresults Specifies the maximum number of containers to return. If the request does not specify - * maxresults, or specifies a value greater than 5000, the server will return up to 5000 items. Note that if the - * listing operation crosses a partition boundary, then the service will return a continuation token for retrieving - * the remainder of the results. For this reason, it is possible that the service will return fewer results than - * specified by maxresults, or than the default of 5000. - * @param include Include this parameter to specify one or more datasets to include in the response. - * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. - * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws StorageErrorException 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. - */ - @Generated - @ServiceMethod(returns = ReturnType.SINGLE) - public Response listBlobFlatSegmentNoCustomHeadersWithResponse(String containerName, - String prefix, String marker, Integer maxresults, List include, Integer timeout, - String requestId, Context context) { - return this.serviceClient.listBlobFlatSegmentNoCustomHeadersWithResponse(containerName, prefix, marker, - maxresults, include, timeout, requestId, context); - } - - /** - * [Update] The List Blobs operation returns a list of the blobs under the specified container. - * + * * @param containerName The container name. * @param delimiter When the request includes this parameter, the operation returns a BlobPrefix element in the * response body that acts as a placeholder for all blobs whose names begin with the same substring up to the @@ -1516,25 +973,23 @@ public Response listBlobFlatSegmentNoCustomHeaders * Timeouts for Blob Service Operations.</a>. * @param requestId Provides a 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. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws StorageErrorException 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}. + * @return an enumeration of blobs. */ - @Generated - @ServiceMethod(returns = ReturnType.SINGLE) - public ResponseBase - listBlobHierarchySegmentWithResponse(String containerName, String delimiter, String prefix, String marker, - Integer maxresults, List include, Integer timeout, String requestId, - Context context) { + @Metadata(generated = true) + public Response listBlobHierarchySegmentWithResponse(String containerName, + String delimiter, String prefix, String marker, Integer maxresults, List include, + Integer timeout, String requestId, RequestOptions requestOptions) { return this.serviceClient.listBlobHierarchySegmentWithResponse(containerName, delimiter, prefix, marker, - maxresults, include, timeout, requestId, context); + maxresults, include, timeout, requestId, requestOptions); } /** * [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 @@ -1561,8 +1016,7 @@ public Response listBlobFlatSegmentNoCustomHeaders * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return an enumeration of blobs. */ - @Generated - @ServiceMethod(returns = ReturnType.SINGLE) + @Metadata(generated = true) public ListBlobsHierarchySegmentResponse listBlobHierarchySegment(String containerName, String delimiter, String prefix, String marker, Integer maxresults, List include, Integer timeout, String requestId) { @@ -1570,70 +1024,30 @@ public ListBlobsHierarchySegmentResponse listBlobHierarchySegment(String contain include, timeout, requestId); } - /** - * [Update] The List Blobs operation returns a list of the blobs under the specified container. - * - * @param containerName The container name. - * @param delimiter When the request includes this parameter, the operation returns a BlobPrefix element in the - * response body that acts as a placeholder for all blobs whose names begin with the same substring up to the - * appearance of the delimiter character. The delimiter may be a single character or a string. - * @param prefix Filters the results to return only containers whose name begins with the specified prefix. - * @param marker A string value that identifies the portion of the list of containers to be returned with the next - * listing operation. The operation returns the NextMarker value within the response body if the listing operation - * did not return all containers remaining to be listed with the current page. The NextMarker value can be used as - * the value for the marker parameter in a subsequent call to request the next page of list items. The marker value - * is opaque to the client. - * @param maxresults Specifies the maximum number of containers to return. If the request does not specify - * maxresults, or specifies a value greater than 5000, the server will return up to 5000 items. Note that if the - * listing operation crosses a partition boundary, then the service will return a continuation token for retrieving - * the remainder of the results. For this reason, it is possible that the service will return fewer results than - * specified by maxresults, or than the default of 5000. - * @param include Include this parameter to specify one or more datasets to include in the response. - * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. - * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws StorageErrorException 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. - */ - @Generated - @ServiceMethod(returns = ReturnType.SINGLE) - public Response listBlobHierarchySegmentNoCustomHeadersWithResponse( - String containerName, String delimiter, String prefix, String marker, Integer maxresults, - List include, Integer timeout, String requestId, Context context) { - return this.serviceClient.listBlobHierarchySegmentNoCustomHeadersWithResponse(containerName, delimiter, prefix, - marker, maxresults, include, timeout, requestId, context); - } - /** * Returns the sku name and account kind. - * + * * @param containerName The container name. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting * Timeouts for Blob Service Operations.</a>. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the * analytics logs when storage analytics logging is enabled. - * @param context The context to associate with this operation. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws StorageErrorException thrown if 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 the response. */ - @Generated - @ServiceMethod(returns = ReturnType.SINGLE) - public ResponseBase getAccountInfoWithResponse(String containerName, - Integer timeout, String requestId, Context context) { - return this.serviceClient.getAccountInfoWithResponse(containerName, timeout, requestId, context); + @Metadata(generated = true) + public Response getAccountInfoWithResponse(String containerName, Integer timeout, String requestId, + RequestOptions requestOptions) { + return this.serviceClient.getAccountInfoWithResponse(containerName, timeout, requestId, requestOptions); } /** * Returns the sku name and account kind. - * + * * @param containerName The container name. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting @@ -1644,31 +1058,8 @@ public ResponseBase getAccountInfoWithRes * @throws StorageErrorException 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) + @Metadata(generated = true) public void getAccountInfo(String containerName, Integer timeout, String requestId) { this.serviceClient.getAccountInfo(containerName, timeout, requestId); } - - /** - * Returns the sku name and account kind. - * - * @param containerName The container name. - * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. - * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws StorageErrorException 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 Response getAccountInfoNoCustomHeadersWithResponse(String containerName, Integer timeout, - String requestId, Context context) { - return this.serviceClient.getAccountInfoNoCustomHeadersWithResponse(containerName, timeout, requestId, context); - } } diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/PageBlobClient.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/PageBlobClient.java index c6513ad23284..dfec65aa0401 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/PageBlobClient.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/PageBlobClient.java @@ -4,32 +4,20 @@ package com.azure.v2.storage.blob; -import com.azure.v2.core.annotation.Generated; -import com.azure.v2.core.annotation.ReturnType; -import com.azure.v2.core.annotation.ServiceClient; -import com.azure.v2.core.annotation.ServiceMethod; -import com.azure.v2.core.http.rest.ResponseBase; import com.azure.v2.storage.blob.implementation.PageBlobsImpl; import com.azure.v2.storage.blob.models.BlobHttpHeaders; import com.azure.v2.storage.blob.models.BlobImmutabilityPolicyMode; import com.azure.v2.storage.blob.models.CpkInfo; import com.azure.v2.storage.blob.models.EncryptionScope; -import com.azure.v2.storage.blob.models.PageBlobsClearPagesHeaders; -import com.azure.v2.storage.blob.models.PageBlobsCopyIncrementalHeaders; -import com.azure.v2.storage.blob.models.PageBlobsCreateHeaders; -import com.azure.v2.storage.blob.models.PageBlobsGetPageRangesDiffHeaders; -import com.azure.v2.storage.blob.models.PageBlobsGetPageRangesHeaders; -import com.azure.v2.storage.blob.models.PageBlobsResizeHeaders; -import com.azure.v2.storage.blob.models.PageBlobsUpdateSequenceNumberHeaders; -import com.azure.v2.storage.blob.models.PageBlobsUploadPagesFromURLHeaders; -import com.azure.v2.storage.blob.models.PageBlobsUploadPagesHeaders; import com.azure.v2.storage.blob.models.PageList; import com.azure.v2.storage.blob.models.PremiumPageBlobAccessTier; import com.azure.v2.storage.blob.models.SequenceNumberActionType; import com.azure.v2.storage.blob.models.StorageErrorException; +import io.clientcore.core.annotations.Metadata; +import io.clientcore.core.annotations.ServiceClient; +import io.clientcore.core.http.models.RequestOptions; import io.clientcore.core.http.models.Response; -import io.clientcore.core.util.Context; -import io.clientcore.core.util.binarydata.BinaryData; +import io.clientcore.core.models.binarydata.BinaryData; import java.time.OffsetDateTime; import java.util.Map; @@ -38,22 +26,22 @@ */ @ServiceClient(builder = AzureBlobStorageBuilder.class) public final class PageBlobClient { - @Generated + @Metadata(generated = true) private final PageBlobsImpl serviceClient; /** * Initializes an instance of PageBlobClient class. - * + * * @param serviceClient the service client implementation. */ - @Generated + @Metadata(generated = true) PageBlobClient(PageBlobsImpl serviceClient) { this.serviceClient = serviceClient; } /** * 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. @@ -88,30 +76,29 @@ public final class PageBlobClient { * @param blobHttpHeaders Parameter group. * @param cpkInfo Parameter group. * @param encryptionScopeParam Parameter group. - * @param context The context to associate with this operation. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws StorageErrorException thrown if 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 the response. */ - @Generated - @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) { + @Metadata(generated = true) + public Response 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, + RequestOptions requestOptions) { return this.serviceClient.createWithResponse(containerName, blob, contentLength, blobContentLength, timeout, tier, metadata, leaseId, ifModifiedSince, ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, blobSequenceNumber, requestId, blobTagsString, immutabilityPolicyExpiry, immutabilityPolicyMode, legalHold, - blobHttpHeaders, cpkInfo, encryptionScopeParam, context); + blobHttpHeaders, cpkInfo, encryptionScopeParam, requestOptions); } /** * 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. @@ -150,8 +137,7 @@ public ResponseBase createWithResponse(String cont * @throws StorageErrorException 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) + @Metadata(generated = true) 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, @@ -164,66 +150,9 @@ public void create(String containerName, String blob, long contentLength, long b encryptionScopeParam); } - /** - * The Create operation creates a new page blob. - * - * @param containerName The container name. - * @param blob The blob name. - * @param contentLength The length of the request. - * @param blobContentLength This header specifies the maximum size for the page blob, up to 1 TB. The page blob size - * must be aligned to a 512-byte boundary. - * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. - * @param tier Optional. Indicates the tier to be set on the page blob. - * @param metadata Optional. Specifies a user-defined name-value pair associated with the blob. If no name-value - * pairs are specified, the operation will copy the metadata from the source blob or file to the destination blob. - * If one or more name-value pairs are specified, the destination blob is created with the specified metadata, and - * metadata is not copied from the source blob or file. Note that beginning with version 2009-09-19, metadata names - * must adhere to the naming rules for C# identifiers. See Naming and Referencing Containers, Blobs, and Metadata - * for more information. - * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. - * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the - * specified date/time. - * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since - * the specified date/time. - * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. - * @param ifNoneMatch Specify an ETag value to operate only on blobs 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 StorageErrorException 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 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) { - return this.serviceClient.createNoCustomHeadersWithResponse(containerName, blob, contentLength, - blobContentLength, timeout, tier, metadata, leaseId, ifModifiedSince, ifUnmodifiedSince, ifMatch, - ifNoneMatch, ifTags, blobSequenceNumber, requestId, blobTagsString, immutabilityPolicyExpiry, - immutabilityPolicyMode, legalHold, blobHttpHeaders, cpkInfo, encryptionScopeParam, context); - } - /** * The Upload Pages operation writes a range of pages to a page blob. - * + * * @param containerName The container name. * @param blob The blob name. * @param contentLength The length of the request. @@ -256,31 +185,29 @@ public Response createNoCustomHeadersWithResponse(String containerName, St * 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. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws StorageErrorException thrown if 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 the response. */ - @Generated - @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) { + @Metadata(generated = true) + public Response 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, RequestOptions requestOptions) { return this.serviceClient.uploadPagesWithResponse(containerName, blob, contentLength, body, transactionalContentMD5, transactionalContentCrc64, timeout, range, leaseId, ifSequenceNumberLessThanOrEqualTo, ifSequenceNumberLessThan, ifSequenceNumberEqualTo, ifModifiedSince, ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, requestId, structuredBodyType, structuredContentLength, - cpkInfo, encryptionScopeParam, context); + cpkInfo, encryptionScopeParam, requestOptions); } /** * 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. @@ -317,8 +244,7 @@ public ResponseBase uploadPagesWithResponse(S * @throws StorageErrorException 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) + @Metadata(generated = true) 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, @@ -332,14 +258,11 @@ public void uploadPages(String containerName, String blob, long contentLength, B } /** - * The Upload Pages operation writes a range of pages to a page blob. - * + * 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 body Initial data. - * @param transactionalContentMD5 Specify the transactional md5 for the body, to be validated by the service. - * @param transactionalContentCrc64 Specify the transactional crc64 for the body, to be validated by the service. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting * Timeouts for Blob Service Operations.</a>. @@ -360,82 +283,28 @@ public void uploadPages(String containerName, String blob, long contentLength, B * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. * @param requestId Provides a 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. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws StorageErrorException 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 Response uploadPagesNoCustomHeadersWithResponse(String containerName, String blob, long contentLength, - BinaryData body, byte[] transactionalContentMD5, byte[] transactionalContentCrc64, Integer timeout, + @Metadata(generated = true) + public Response 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, String structuredBodyType, Long structuredContentLength, - CpkInfo cpkInfo, EncryptionScope encryptionScopeParam, Context context) { - return this.serviceClient.uploadPagesNoCustomHeadersWithResponse(containerName, blob, contentLength, body, - transactionalContentMD5, transactionalContentCrc64, timeout, range, leaseId, - ifSequenceNumberLessThanOrEqualTo, ifSequenceNumberLessThan, ifSequenceNumberEqualTo, ifModifiedSince, - ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, requestId, structuredBodyType, structuredContentLength, - cpkInfo, encryptionScopeParam, context); - } - - /** - * The Clear Pages operation clears a set of pages from a page blob. - * - * @param containerName The container name. - * @param blob The blob name. - * @param contentLength The length of the request. - * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. - * @param range Return only the bytes of the blob in the specified range. - * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. - * @param ifSequenceNumberLessThanOrEqualTo Specify this header value to operate only on a blob if it has a sequence - * number less than or equal to the specified. - * @param ifSequenceNumberLessThan Specify this header value to operate only on a blob if it has a sequence number - * less than the specified. - * @param ifSequenceNumberEqualTo Specify this header value to operate only on a blob if it has the specified - * sequence number. - * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the - * specified date/time. - * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since - * the specified date/time. - * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. - * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. - * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. - * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. - * @param cpkInfo Parameter group. - * @param encryptionScopeParam Parameter group. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws StorageErrorException thrown if 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 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) { + String ifNoneMatch, String ifTags, String requestId, CpkInfo cpkInfo, EncryptionScope encryptionScopeParam, + RequestOptions requestOptions) { return this.serviceClient.clearPagesWithResponse(containerName, blob, contentLength, timeout, range, leaseId, ifSequenceNumberLessThanOrEqualTo, ifSequenceNumberLessThan, ifSequenceNumberEqualTo, ifModifiedSince, - ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, requestId, cpkInfo, encryptionScopeParam, context); + ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, requestId, cpkInfo, encryptionScopeParam, requestOptions); } /** * 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. @@ -465,8 +334,7 @@ public ResponseBase clearPagesWithResponse(Str * @throws StorageErrorException 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) + @Metadata(generated = true) 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, @@ -476,56 +344,9 @@ public void clearPages(String containerName, String blob, long contentLength, In ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, requestId, cpkInfo, encryptionScopeParam); } - /** - * The Clear Pages operation clears a set of pages from a page blob. - * - * @param containerName The container name. - * @param blob The blob name. - * @param contentLength The length of the request. - * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. - * @param range Return only the bytes of the blob in the specified range. - * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. - * @param ifSequenceNumberLessThanOrEqualTo Specify this header value to operate only on a blob if it has a sequence - * number less than or equal to the specified. - * @param ifSequenceNumberLessThan Specify this header value to operate only on a blob if it has a sequence number - * less than the specified. - * @param ifSequenceNumberEqualTo Specify this header value to operate only on a blob if it has the specified - * sequence number. - * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the - * specified date/time. - * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since - * the specified date/time. - * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. - * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. - * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. - * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. - * @param cpkInfo Parameter group. - * @param encryptionScopeParam Parameter group. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws StorageErrorException 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 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) { - return this.serviceClient.clearPagesNoCustomHeadersWithResponse(containerName, blob, contentLength, timeout, - range, leaseId, ifSequenceNumberLessThanOrEqualTo, ifSequenceNumberLessThan, ifSequenceNumberEqualTo, - ifModifiedSince, ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, requestId, cpkInfo, encryptionScopeParam, - context); - } - /** * The Upload Pages operation writes a range of pages to a page blob where the contents are read from a URL. - * + * * @param containerName The container name. * @param blob The blob name. * @param sourceUrl Specify a URL to the copy source. @@ -566,33 +387,31 @@ public Response clearPagesNoCustomHeadersWithResponse(String containerName * copy source. * @param cpkInfo Parameter group. * @param encryptionScopeParam Parameter group. - * @param context The context to associate with this operation. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws StorageErrorException thrown if 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 the response. */ - @Generated - @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, CpkInfo cpkInfo, - EncryptionScope encryptionScopeParam, Context context) { + @Metadata(generated = true) + public Response uploadPagesFromURLWithResponse(String containerName, String blob, String sourceUrl, + String sourceRange, long contentLength, String range, byte[] sourceContentMD5, byte[] sourceContentcrc64, + Integer timeout, String leaseId, Long ifSequenceNumberLessThanOrEqualTo, Long ifSequenceNumberLessThan, + Long ifSequenceNumberEqualTo, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, + String ifNoneMatch, String ifTags, OffsetDateTime sourceIfModifiedSince, OffsetDateTime sourceIfUnmodifiedSince, + String sourceIfMatch, String sourceIfNoneMatch, String requestId, String copySourceAuthorization, + CpkInfo cpkInfo, EncryptionScope encryptionScopeParam, RequestOptions requestOptions) { return this.serviceClient.uploadPagesFromURLWithResponse(containerName, blob, sourceUrl, sourceRange, contentLength, range, sourceContentMD5, sourceContentcrc64, timeout, leaseId, ifSequenceNumberLessThanOrEqualTo, ifSequenceNumberLessThan, ifSequenceNumberEqualTo, ifModifiedSince, ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, sourceIfModifiedSince, sourceIfUnmodifiedSince, sourceIfMatch, sourceIfNoneMatch, requestId, copySourceAuthorization, cpkInfo, encryptionScopeParam, - context); + requestOptions); } /** * 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. @@ -637,8 +456,7 @@ public ResponseBase uploadPagesFromURL * @throws StorageErrorException 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) + @Metadata(generated = true) 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, @@ -653,77 +471,10 @@ public void uploadPagesFromURL(String containerName, String blob, String sourceU copySourceAuthorization, cpkInfo, encryptionScopeParam); } - /** - * 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://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. - * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. - * @param ifSequenceNumberLessThanOrEqualTo Specify this header value to operate only on a blob if it has a sequence - * number less than or equal to the specified. - * @param ifSequenceNumberLessThan Specify this header value to operate only on a blob if it has a sequence number - * less than the specified. - * @param ifSequenceNumberEqualTo Specify this header value to operate only on a blob if it has the specified - * sequence number. - * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the - * specified date/time. - * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since - * the specified date/time. - * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. - * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. - * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. - * @param sourceIfModifiedSince Specify this header value to operate only on a blob if it has been modified since - * the specified date/time. - * @param sourceIfUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified - * since the specified date/time. - * @param sourceIfMatch Specify an ETag value to operate only on blobs with a matching value. - * @param sourceIfNoneMatch Specify an ETag value to operate only on blobs without a matching value. - * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. - * @param copySourceAuthorization Only Bearer type is supported. Credentials should be a valid OAuth access token to - * copy source. - * @param cpkInfo Parameter group. - * @param encryptionScopeParam Parameter group. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws StorageErrorException 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 Response uploadPagesFromURLNoCustomHeadersWithResponse(String containerName, String blob, - String sourceUrl, String sourceRange, long contentLength, String range, byte[] sourceContentMD5, - byte[] sourceContentcrc64, Integer timeout, String leaseId, Long ifSequenceNumberLessThanOrEqualTo, - Long ifSequenceNumberLessThan, Long ifSequenceNumberEqualTo, OffsetDateTime ifModifiedSince, - OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, String ifTags, - OffsetDateTime sourceIfModifiedSince, OffsetDateTime sourceIfUnmodifiedSince, String sourceIfMatch, - String sourceIfNoneMatch, String requestId, String copySourceAuthorization, CpkInfo cpkInfo, - EncryptionScope encryptionScopeParam, Context context) { - return this.serviceClient.uploadPagesFromURLNoCustomHeadersWithResponse(containerName, blob, sourceUrl, - sourceRange, contentLength, range, sourceContentMD5, sourceContentcrc64, timeout, leaseId, - ifSequenceNumberLessThanOrEqualTo, ifSequenceNumberLessThan, ifSequenceNumberEqualTo, ifModifiedSince, - ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, sourceIfModifiedSince, sourceIfUnmodifiedSince, - sourceIfMatch, sourceIfNoneMatch, requestId, copySourceAuthorization, cpkInfo, encryptionScopeParam, - context); - } - /** * 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 @@ -754,26 +505,26 @@ public Response uploadPagesFromURLNoCustomHeadersWithResponse(String conta * 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. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws StorageErrorException 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}. + * @return the list of pages. */ - @Generated - @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) { + @Metadata(generated = true) + public Response 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, + RequestOptions requestOptions) { return this.serviceClient.getPageRangesWithResponse(containerName, blob, snapshot, timeout, range, leaseId, - ifModifiedSince, ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, requestId, marker, maxresults, context); + ifModifiedSince, ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, requestId, marker, maxresults, + requestOptions); } /** * 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 @@ -809,8 +560,7 @@ public ResponseBase getPageRangesWithRe * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the list of pages. */ - @Generated - @ServiceMethod(returns = ReturnType.SINGLE) + @Metadata(generated = true) 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) { @@ -818,61 +568,10 @@ public PageList getPageRanges(String containerName, String blob, String snapshot ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, requestId, marker, maxresults); } - /** - * The Get Page Ranges operation returns the list of valid page ranges for a page blob, version or snapshot of a - * page blob. - * - * @param containerName The container name. - * @param blob The blob name. - * @param snapshot The snapshot parameter is an opaque DateTime value that, when present, specifies the blob - * snapshot to retrieve. For more information on working with blob snapshots, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/creating-a-snapshot-of-a-blob">Creating - * a Snapshot of a Blob.</a>. - * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. - * @param range Return only the bytes of the blob in the specified range. - * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. - * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the - * specified date/time. - * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since - * the specified date/time. - * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. - * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. - * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. - * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. - * @param marker A string value that identifies the portion of the list of containers to be returned with the next - * listing operation. The operation returns the NextMarker value within the response body if the listing operation - * did not return all containers remaining to be listed with the current page. The NextMarker value can be used as - * the value for the marker parameter in a subsequent call to request the next page of list items. The marker value - * is opaque to the client. - * @param maxresults Specifies the maximum number of containers to return. If the request does not specify - * maxresults, or specifies a value greater than 5000, the server will return up to 5000 items. Note that if the - * listing operation crosses a partition boundary, then the service will return a continuation token for retrieving - * the remainder of the results. For this reason, it is possible that the service will return fewer results than - * specified by maxresults, or than the default of 5000. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws StorageErrorException 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. - */ - @Generated - @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) { - return this.serviceClient.getPageRangesNoCustomHeadersWithResponse(containerName, blob, snapshot, timeout, - range, leaseId, ifModifiedSince, ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, requestId, marker, - maxresults, context); - } - /** * [Update] The Get Page Ranges Diff operation returns the list of valid page ranges for a page blob that were * changed between target blob and previous snapshot or version. - * + * * @param containerName The container name. * @param blob The blob name. * @param snapshot The snapshot parameter is an opaque DateTime value that, when present, specifies the blob @@ -911,27 +610,26 @@ public Response getPageRangesNoCustomHeadersWithResponse(String contai * 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. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws StorageErrorException 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}. + * @return the list of pages. */ - @Generated - @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) { + @Metadata(generated = true) + public Response 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, RequestOptions requestOptions) { return this.serviceClient.getPageRangesDiffWithResponse(containerName, blob, snapshot, timeout, prevsnapshot, prevSnapshotUrl, range, leaseId, ifModifiedSince, ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, - requestId, marker, maxresults, context); + requestId, marker, maxresults, requestOptions); } /** * [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 @@ -975,8 +673,7 @@ public ResponseBase getPageRangesDi * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the list of pages. */ - @Generated - @ServiceMethod(returns = ReturnType.SINGLE) + @Metadata(generated = true) 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, @@ -986,68 +683,9 @@ public PageList getPageRangesDiff(String containerName, String blob, String snap requestId, marker, maxresults); } - /** - * [Update] The Get Page Ranges Diff operation returns the list of valid page ranges for a page blob that were - * changed between target blob and previous snapshot or version. - * - * @param containerName The container name. - * @param blob The blob name. - * @param snapshot The snapshot parameter is an opaque DateTime value that, when present, specifies the blob - * snapshot to retrieve. For more information on working with blob snapshots, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/creating-a-snapshot-of-a-blob">Creating - * a Snapshot of a Blob.</a>. - * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. - * @param prevsnapshot Optional in version 2015-07-08 and newer. The prevsnapshot parameter is a DateTime value that - * specifies that the response will contain only pages that were changed between target blob and previous snapshot. - * Changed pages include both updated and cleared pages. The target blob may be a snapshot, as long as the snapshot - * specified by prevsnapshot is the older of the two. Note that incremental snapshots are currently supported only - * for blobs created on or after January 1, 2016. - * @param prevSnapshotUrl Optional. This header is only supported in service versions 2019-04-19 and after and - * specifies the URL of a previous snapshot of the target blob. The response will only contain pages that were - * changed between the target blob and its previous snapshot. - * @param range Return only the bytes of the blob in the specified range. - * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. - * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the - * specified date/time. - * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since - * the specified date/time. - * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. - * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. - * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. - * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. - * @param marker A string value that identifies the portion of the list of containers to be returned with the next - * listing operation. The operation returns the NextMarker value within the response body if the listing operation - * did not return all containers remaining to be listed with the current page. The NextMarker value can be used as - * the value for the marker parameter in a subsequent call to request the next page of list items. The marker value - * is opaque to the client. - * @param maxresults Specifies the maximum number of containers to return. If the request does not specify - * maxresults, or specifies a value greater than 5000, the server will return up to 5000 items. Note that if the - * listing operation crosses a partition boundary, then the service will return a continuation token for retrieving - * the remainder of the results. For this reason, it is possible that the service will return fewer results than - * specified by maxresults, or than the default of 5000. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws StorageErrorException 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. - */ - @Generated - @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) { - return this.serviceClient.getPageRangesDiffNoCustomHeadersWithResponse(containerName, blob, snapshot, timeout, - prevsnapshot, prevSnapshotUrl, range, leaseId, ifModifiedSince, ifUnmodifiedSince, ifMatch, ifNoneMatch, - ifTags, requestId, marker, maxresults, context); - } - /** * Resize the Blob. - * + * * @param containerName The container name. * @param blob The blob name. * @param blobContentLength This header specifies the maximum size for the page blob, up to 1 TB. The page blob size @@ -1067,26 +705,25 @@ public Response getPageRangesDiffNoCustomHeadersWithResponse(String co * 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. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws StorageErrorException thrown if 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 the response. */ - @Generated - @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) { + @Metadata(generated = true) + public Response 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, + RequestOptions requestOptions) { return this.serviceClient.resizeWithResponse(containerName, blob, blobContentLength, timeout, leaseId, ifModifiedSince, ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, requestId, cpkInfo, encryptionScopeParam, - context); + requestOptions); } /** * 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 @@ -1110,8 +747,7 @@ public ResponseBase resizeWithResponse(String cont * @throws StorageErrorException 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) + @Metadata(generated = true) 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) { @@ -1119,48 +755,9 @@ public void resize(String containerName, String blob, long blobContentLength, In ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, requestId, cpkInfo, encryptionScopeParam); } - /** - * Resize the Blob. - * - * @param containerName The container name. - * @param blob The blob name. - * @param blobContentLength This header specifies the maximum size for the page blob, up to 1 TB. The page blob size - * must be aligned to a 512-byte boundary. - * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. - * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. - * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the - * specified date/time. - * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since - * the specified date/time. - * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. - * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. - * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. - * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. - * @param cpkInfo Parameter group. - * @param encryptionScopeParam Parameter group. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws StorageErrorException 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 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) { - return this.serviceClient.resizeNoCustomHeadersWithResponse(containerName, blob, blobContentLength, timeout, - leaseId, ifModifiedSince, ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, requestId, cpkInfo, - encryptionScopeParam, context); - } - /** * Update the sequence number of the blob. - * + * * @param containerName The container name. * @param blob The blob name. * @param sequenceNumberAction Required if the x-ms-blob-sequence-number header is set for the request. This @@ -1181,26 +778,25 @@ public Response resizeNoCustomHeadersWithResponse(String containerName, St * 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. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws StorageErrorException thrown if 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 the response. */ - @Generated - @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) { + @Metadata(generated = true) + public Response 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, RequestOptions requestOptions) { return this.serviceClient.updateSequenceNumberWithResponse(containerName, blob, sequenceNumberAction, timeout, leaseId, ifModifiedSince, ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, blobSequenceNumber, requestId, - context); + requestOptions); } /** * 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 @@ -1225,8 +821,7 @@ public ResponseBase updateSequenceNu * @throws StorageErrorException 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) + @Metadata(generated = true) 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) { @@ -1234,52 +829,12 @@ public void updateSequenceNumber(String containerName, String blob, SequenceNumb ifModifiedSince, ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, blobSequenceNumber, requestId); } - /** - * Update the sequence number of the blob. - * - * @param containerName The container name. - * @param blob The blob name. - * @param sequenceNumberAction Required if the x-ms-blob-sequence-number header is set for the request. This - * property applies to page blobs only. This property indicates how the service should modify the blob's sequence - * number. - * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. - * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. - * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the - * specified date/time. - * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since - * the specified date/time. - * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. - * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. - * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. - * @param blobSequenceNumber Set for page blobs only. The sequence number is a user-controlled value that you can - * use to track requests. The value of the sequence number must be between 0 and 2^63 - 1. - * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws StorageErrorException 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 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) { - return this.serviceClient.updateSequenceNumberNoCustomHeadersWithResponse(containerName, blob, - sequenceNumberAction, timeout, leaseId, ifModifiedSince, ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, - blobSequenceNumber, requestId, context); - } - /** * The Copy Incremental operation copies a snapshot of the source page blob to a destination page blob. The snapshot * is copied such that only the differential changes between the previously copied snapshot are transferred to the * destination. The copied snapshots are complete copies of the original snapshot and can be read or copied from as * usual. This API is supported since REST version 2016-05-31. - * + * * @param containerName The container name. * @param blob The blob name. * @param copySource Specifies the name of the source page blob snapshot. This value is a URL of up to 2 KB in @@ -1297,20 +852,18 @@ public Response updateSequenceNumberNoCustomHeadersWithResponse(String con * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. * @param requestId Provides a 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. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws StorageErrorException thrown if 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 the response. */ - @Generated - @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) { + @Metadata(generated = true) + public Response copyIncrementalWithResponse(String containerName, String blob, String copySource, + Integer timeout, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, + String ifNoneMatch, String ifTags, String requestId, RequestOptions requestOptions) { return this.serviceClient.copyIncrementalWithResponse(containerName, blob, copySource, timeout, ifModifiedSince, - ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, requestId, context); + ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, requestId, requestOptions); } /** @@ -1318,7 +871,7 @@ public ResponseBase copyIncrementalWithRe * is copied such that only the differential changes between the previously copied snapshot are transferred to the * destination. The copied snapshots are complete copies of the original snapshot and can be read or copied from as * usual. This API is supported since REST version 2016-05-31. - * + * * @param containerName The container name. * @param blob The blob name. * @param copySource Specifies the name of the source page blob snapshot. This value is a URL of up to 2 KB in @@ -1340,50 +893,11 @@ public ResponseBase copyIncrementalWithRe * @throws StorageErrorException 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) + @Metadata(generated = true) public void copyIncremental(String containerName, String blob, String copySource, Integer timeout, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, String ifTags, String requestId) { this.serviceClient.copyIncremental(containerName, blob, copySource, timeout, ifModifiedSince, ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, requestId); } - - /** - * The Copy Incremental operation copies a snapshot of the source page blob to a destination page blob. The snapshot - * is copied such that only the differential changes between the previously copied snapshot are transferred to the - * destination. The copied snapshots are complete copies of the original snapshot and can be read or copied from as - * usual. This API is supported since REST version 2016-05-31. - * - * @param containerName The container name. - * @param blob The blob name. - * @param copySource Specifies the name of the source page blob snapshot. This value is a URL of up to 2 KB in - * length that specifies a page blob snapshot. The value should be URL-encoded as it would appear in a request URI. - * The source blob must either be public or must be authenticated via a shared access signature. - * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. - * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the - * specified date/time. - * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since - * the specified date/time. - * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. - * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. - * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. - * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws StorageErrorException 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 Response copyIncrementalNoCustomHeadersWithResponse(String containerName, String blob, - String copySource, Integer timeout, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, - String ifMatch, String ifNoneMatch, String ifTags, String requestId, Context context) { - return this.serviceClient.copyIncrementalNoCustomHeadersWithResponse(containerName, blob, copySource, timeout, - ifModifiedSince, ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, requestId, context); - } } diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/StorageServiceClient.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/StorageServiceClient.java index 26cac3e8b5f5..06548c51c8e1 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/StorageServiceClient.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/StorageServiceClient.java @@ -4,12 +4,6 @@ package com.azure.v2.storage.blob; -import com.azure.v2.core.annotation.Generated; -import com.azure.v2.core.annotation.ReturnType; -import com.azure.v2.core.annotation.ServiceClient; -import com.azure.v2.core.annotation.ServiceMethod; -import com.azure.v2.core.http.rest.PagedIterable; -import com.azure.v2.core.http.rest.ResponseBase; import com.azure.v2.storage.blob.implementation.ServicesImpl; import com.azure.v2.storage.blob.models.BlobContainerItem; import com.azure.v2.storage.blob.models.BlobServiceProperties; @@ -18,18 +12,16 @@ import com.azure.v2.storage.blob.models.FilterBlobsIncludeItem; import com.azure.v2.storage.blob.models.KeyInfo; import com.azure.v2.storage.blob.models.ListBlobContainersIncludeType; -import com.azure.v2.storage.blob.models.ServicesFilterBlobsHeaders; -import com.azure.v2.storage.blob.models.ServicesGetAccountInfoHeaders; -import com.azure.v2.storage.blob.models.ServicesGetPropertiesHeaders; -import com.azure.v2.storage.blob.models.ServicesGetStatisticsHeaders; -import com.azure.v2.storage.blob.models.ServicesGetUserDelegationKeyHeaders; -import com.azure.v2.storage.blob.models.ServicesSetPropertiesHeaders; -import com.azure.v2.storage.blob.models.ServicesSubmitBatchHeaders; import com.azure.v2.storage.blob.models.StorageErrorException; import com.azure.v2.storage.blob.models.UserDelegationKey; +import io.clientcore.core.annotations.Metadata; +import io.clientcore.core.annotations.ReturnType; +import io.clientcore.core.annotations.ServiceClient; +import io.clientcore.core.annotations.ServiceMethod; +import io.clientcore.core.http.models.PagedIterable; +import io.clientcore.core.http.models.RequestOptions; import io.clientcore.core.http.models.Response; -import io.clientcore.core.util.Context; -import io.clientcore.core.util.binarydata.BinaryData; +import io.clientcore.core.models.binarydata.BinaryData; import java.io.InputStream; import java.util.List; @@ -38,7 +30,7 @@ */ @ServiceClient(builder = AzureBlobStorageBuilder.class) public final class StorageServiceClient { - @Generated + @Metadata(generated = true) private final ServicesImpl serviceClient; /** @@ -46,7 +38,7 @@ public final class StorageServiceClient { * * @param serviceClient the service client implementation. */ - @Generated + @Metadata(generated = true) StorageServiceClient(ServicesImpl serviceClient) { this.serviceClient = serviceClient; } @@ -61,17 +53,16 @@ public final class StorageServiceClient { * Timeouts for Blob Service Operations.</a>. * @param requestId Provides a 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. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws StorageErrorException thrown if 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 the response. */ - @Generated - @ServiceMethod(returns = ReturnType.SINGLE) - public ResponseBase setPropertiesWithResponse( - BlobServiceProperties blobServiceProperties, Integer timeout, String requestId, Context context) { - return this.serviceClient.setPropertiesWithResponse(blobServiceProperties, timeout, requestId, context); + @Metadata(generated = true) + public Response setPropertiesWithResponse(BlobServiceProperties blobServiceProperties, Integer timeout, + String requestId, RequestOptions requestOptions) { + return this.serviceClient.setPropertiesWithResponse(blobServiceProperties, timeout, requestId, requestOptions); } /** @@ -88,36 +79,11 @@ public ResponseBase setPropertiesWithRespons * @throws StorageErrorException 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) + @Metadata(generated = true) public void setProperties(BlobServiceProperties blobServiceProperties, Integer timeout, String requestId) { this.serviceClient.setProperties(blobServiceProperties, timeout, requestId); } - /** - * Sets properties for a storage account's Blob service endpoint, including properties for Storage Analytics and - * CORS (Cross-Origin Resource Sharing) rules. - * - * @param blobServiceProperties The StorageService properties. - * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. - * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws StorageErrorException 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 Response setPropertiesNoCustomHeadersWithResponse(BlobServiceProperties blobServiceProperties, - Integer timeout, String requestId, Context context) { - return this.serviceClient.setPropertiesNoCustomHeadersWithResponse(blobServiceProperties, timeout, requestId, - context); - } - /** * gets the properties of a storage account's Blob service, including properties for Storage Analytics and CORS * (Cross-Origin Resource Sharing) rules. @@ -127,18 +93,17 @@ public Response setPropertiesNoCustomHeadersWithResponse(BlobServiceProper * Timeouts for Blob Service Operations.</a>. * @param requestId Provides a 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. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws StorageErrorException 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}. + * (Cross-Origin Resource Sharing) rules. */ - @Generated - @ServiceMethod(returns = ReturnType.SINGLE) - public ResponseBase getPropertiesWithResponse(Integer timeout, - String requestId, Context context) { - return this.serviceClient.getPropertiesWithResponse(timeout, requestId, context); + @Metadata(generated = true) + public Response getPropertiesWithResponse(Integer timeout, String requestId, + RequestOptions requestOptions) { + return this.serviceClient.getPropertiesWithResponse(timeout, requestId, requestOptions); } /** @@ -156,35 +121,11 @@ public ResponseBase getProp * @return the properties of a storage account's Blob service, including properties for Storage Analytics and CORS * (Cross-Origin Resource Sharing) rules. */ - @Generated - @ServiceMethod(returns = ReturnType.SINGLE) + @Metadata(generated = true) public BlobServiceProperties getProperties(Integer timeout, String requestId) { return this.serviceClient.getProperties(timeout, requestId); } - /** - * gets the properties of a storage account's Blob service, including properties for Storage Analytics and CORS - * (Cross-Origin Resource Sharing) rules. - * - * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. - * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws StorageErrorException 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. - */ - @Generated - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getPropertiesNoCustomHeadersWithResponse(Integer timeout, String requestId, - Context context) { - return this.serviceClient.getPropertiesNoCustomHeadersWithResponse(timeout, requestId, context); - } - /** * Retrieves statistics related to replication for the Blob service. It is only available on the secondary location * endpoint when read-access geo-redundant replication is enabled for the storage account. @@ -194,17 +135,16 @@ public Response getPropertiesNoCustomHeadersWithResponse( * Timeouts for Blob Service Operations.</a>. * @param requestId Provides a 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. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws StorageErrorException 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}. + * @return stats for the storage service. */ - @Generated - @ServiceMethod(returns = ReturnType.SINGLE) - public ResponseBase getStatisticsWithResponse(Integer timeout, - String requestId, Context context) { - return this.serviceClient.getStatisticsWithResponse(timeout, requestId, context); + @Metadata(generated = true) + public Response getStatisticsWithResponse(Integer timeout, String requestId, + RequestOptions requestOptions) { + return this.serviceClient.getStatisticsWithResponse(timeout, requestId, requestOptions); } /** @@ -221,34 +161,11 @@ public ResponseBase getStat * @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) + @Metadata(generated = true) public BlobServiceStatistics getStatistics(Integer timeout, String requestId) { return this.serviceClient.getStatistics(timeout, requestId); } - /** - * Retrieves statistics related to replication for the Blob service. It is only available on the secondary location - * endpoint when read-access geo-redundant replication is enabled for the storage account. - * - * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. - * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws StorageErrorException 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 Response getStatisticsNoCustomHeadersWithResponse(Integer timeout, String requestId, - Context context) { - return this.serviceClient.getStatisticsNoCustomHeadersWithResponse(timeout, requestId, context); - } - /** * The List Containers Segment operation returns a list of the containers under the specified account. * @@ -270,19 +187,17 @@ public Response getStatisticsNoCustomHeadersWithResponse( * Timeouts for Blob Service Operations.</a>. * @param requestId Provides a 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 StorageErrorException 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}. + * @return an enumeration of containers. */ - @Generated + @Metadata(generated = true) @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listBlobContainersSegment(String prefix, String marker, Integer maxresults, - List listBlobContainersIncludeType, Integer timeout, String requestId, - Context context) { + List listBlobContainersIncludeType, Integer timeout, String requestId) { return this.serviceClient.listBlobContainersSegment(prefix, marker, maxresults, listBlobContainersIncludeType, - timeout, requestId, context); + timeout, requestId); } /** @@ -306,19 +221,19 @@ public PagedIterable listBlobContainersSegment(String prefix, * Timeouts for Blob Service Operations.</a>. * @param requestId Provides a 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. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws StorageErrorException 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}. + * @return an enumeration of containers. */ - @Generated + @Metadata(generated = true) @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listBlobContainersSegmentNoCustomHeaders(String prefix, String marker, - Integer maxresults, List listBlobContainersIncludeType, Integer timeout, - String requestId, Context context) { - return this.serviceClient.listBlobContainersSegmentNoCustomHeaders(prefix, marker, maxresults, - listBlobContainersIncludeType, timeout, requestId, context); + public PagedIterable listBlobContainersSegment(String prefix, String marker, Integer maxresults, + List listBlobContainersIncludeType, Integer timeout, String requestId, + RequestOptions requestOptions) { + return this.serviceClient.listBlobContainersSegment(prefix, marker, maxresults, listBlobContainersIncludeType, + timeout, requestId, requestOptions); } /** @@ -331,17 +246,16 @@ public PagedIterable listBlobContainersSegmentNoCustomHeaders * Timeouts for Blob Service Operations.</a>. * @param requestId Provides a 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. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws StorageErrorException 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}. + * @return a user delegation key. */ - @Generated - @ServiceMethod(returns = ReturnType.SINGLE) - public ResponseBase - getUserDelegationKeyWithResponse(KeyInfo keyInfo, Integer timeout, String requestId, Context context) { - return this.serviceClient.getUserDelegationKeyWithResponse(keyInfo, timeout, requestId, context); + @Metadata(generated = true) + public Response getUserDelegationKeyWithResponse(KeyInfo keyInfo, Integer timeout, + String requestId, RequestOptions requestOptions) { + return this.serviceClient.getUserDelegationKeyWithResponse(keyInfo, timeout, requestId, requestOptions); } /** @@ -359,35 +273,11 @@ public PagedIterable listBlobContainersSegmentNoCustomHeaders * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a user delegation key. */ - @Generated - @ServiceMethod(returns = ReturnType.SINGLE) + @Metadata(generated = true) public UserDelegationKey getUserDelegationKey(KeyInfo keyInfo, Integer timeout, String requestId) { return this.serviceClient.getUserDelegationKey(keyInfo, timeout, requestId); } - /** - * Retrieves a user delegation key for the Blob service. This is only a valid operation when using bearer token - * authentication. - * - * @param keyInfo Key information. - * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. - * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws StorageErrorException 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 Response getUserDelegationKeyNoCustomHeadersWithResponse(KeyInfo keyInfo, Integer timeout, - String requestId, Context context) { - return this.serviceClient.getUserDelegationKeyNoCustomHeadersWithResponse(keyInfo, timeout, requestId, context); - } - /** * Returns the sku name and account kind. * @@ -396,17 +286,15 @@ public Response getUserDelegationKeyNoCustomHeadersWithRespon * Timeouts for Blob Service Operations.</a>. * @param requestId Provides a 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. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws StorageErrorException thrown if 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 the response. */ - @Generated - @ServiceMethod(returns = ReturnType.SINGLE) - public ResponseBase getAccountInfoWithResponse(Integer timeout, - String requestId, Context context) { - return this.serviceClient.getAccountInfoWithResponse(timeout, requestId, context); + @Metadata(generated = true) + public Response getAccountInfoWithResponse(Integer timeout, String requestId, RequestOptions requestOptions) { + return this.serviceClient.getAccountInfoWithResponse(timeout, requestId, requestOptions); } /** @@ -421,33 +309,11 @@ public ResponseBase getAccountInfoWithRespo * @throws StorageErrorException 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) + @Metadata(generated = true) public void getAccountInfo(Integer timeout, String requestId) { this.serviceClient.getAccountInfo(timeout, requestId); } - /** - * Returns the sku name and account kind. - * - * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. - * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws StorageErrorException 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 Response getAccountInfoNoCustomHeadersWithResponse(Integer timeout, String requestId, - Context context) { - return this.serviceClient.getAccountInfoNoCustomHeadersWithResponse(timeout, requestId, context); - } - /** * The Batch operation allows multiple API calls to be embedded into a single HTTP request. * @@ -460,18 +326,17 @@ public Response getAccountInfoNoCustomHeadersWithResponse(Integer timeout, * Timeouts for Blob Service Operations.</a>. * @param requestId Provides a 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. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws StorageErrorException 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}. + * @return the response. */ - @Generated - @ServiceMethod(returns = ReturnType.SINGLE) - public ResponseBase submitBatchWithResponse(long contentLength, - String multipartContentType, BinaryData body, Integer timeout, String requestId, Context context) { + @Metadata(generated = true) + public Response submitBatchWithResponse(long contentLength, String multipartContentType, + BinaryData body, Integer timeout, String requestId, RequestOptions requestOptions) { return this.serviceClient.submitBatchWithResponse(contentLength, multipartContentType, body, timeout, requestId, - context); + requestOptions); } /** @@ -491,39 +356,12 @@ public ResponseBase submitBatchWithResp * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the response. */ - @Generated - @ServiceMethod(returns = ReturnType.SINGLE) + @Metadata(generated = true) public InputStream submitBatch(long contentLength, String multipartContentType, BinaryData body, Integer timeout, String requestId) { return this.serviceClient.submitBatch(contentLength, multipartContentType, body, timeout, requestId); } - /** - * The Batch operation allows multiple API calls to be embedded into a single HTTP request. - * - * @param contentLength The length of the request. - * @param multipartContentType Required. The value of this header must be multipart/mixed with a batch boundary. - * Example header value: multipart/mixed; boundary=batch_<GUID>. - * @param body Initial data. - * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. - * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws StorageErrorException 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 Response submitBatchNoCustomHeadersWithResponse(long contentLength, String multipartContentType, - BinaryData body, Integer timeout, String requestId, Context context) { - return this.serviceClient.submitBatchNoCustomHeadersWithResponse(contentLength, multipartContentType, body, - timeout, requestId, context); - } - /** * The Filter Blobs operation enables callers to list blobs across all containers whose tags match a given search * expression. Filter blobs searches across all containers within a storage account but can be scoped within the @@ -546,19 +384,17 @@ public Response submitBatchNoCustomHeadersWithResponse(long content * 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. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws StorageErrorException 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}. + * @return the result of a Filter Blobs API call. */ - @Generated - @ServiceMethod(returns = ReturnType.SINGLE) - public ResponseBase filterBlobsWithResponse(Integer timeout, - String requestId, String where, String marker, Integer maxresults, List include, - Context context) { + @Metadata(generated = true) + public Response filterBlobsWithResponse(Integer timeout, String requestId, String where, + String marker, Integer maxresults, List include, RequestOptions requestOptions) { return this.serviceClient.filterBlobsWithResponse(timeout, requestId, where, marker, maxresults, include, - context); + requestOptions); } /** @@ -588,46 +424,9 @@ public ResponseBase filterBlobsWi * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the result of a Filter Blobs API call. */ - @Generated - @ServiceMethod(returns = ReturnType.SINGLE) + @Metadata(generated = true) public FilterBlobSegment filterBlobs(Integer timeout, String requestId, String where, String marker, Integer maxresults, List include) { return this.serviceClient.filterBlobs(timeout, requestId, where, marker, maxresults, include); } - - /** - * The Filter Blobs operation enables callers to list blobs across all containers whose tags match a given search - * expression. Filter blobs searches across all containers within a storage account but can be scoped within the - * expression to a single container. - * - * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. - * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. - * @param where Filters the results to return only to return only blobs whose tags match the specified expression. - * @param marker A string value that identifies the portion of the list of containers to be returned with the next - * listing operation. The operation returns the NextMarker value within the response body if the listing operation - * did not return all containers remaining to be listed with the current page. The NextMarker value can be used as - * the value for the marker parameter in a subsequent call to request the next page of list items. The marker value - * is opaque to the client. - * @param maxresults Specifies the maximum number of containers to return. If the request does not specify - * maxresults, or specifies a value greater than 5000, the server will return up to 5000 items. Note that if the - * listing operation crosses a partition boundary, then the service will return a continuation token for retrieving - * the remainder of the results. For this reason, it is possible that the service will return fewer results than - * specified by maxresults, or than the default of 5000. - * @param include Include this parameter to specify one or more datasets to include in the response. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws StorageErrorException 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. - */ - @Generated - @ServiceMethod(returns = ReturnType.SINGLE) - public Response filterBlobsNoCustomHeadersWithResponse(Integer timeout, String requestId, - String where, String marker, Integer maxresults, List include, Context context) { - return this.serviceClient.filterBlobsNoCustomHeadersWithResponse(timeout, requestId, where, marker, maxresults, - include, context); - } } diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/implementation/AppendBlobsImpl.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/implementation/AppendBlobsImpl.java index 24b483f49d5d..51f96bc2020d 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/implementation/AppendBlobsImpl.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/implementation/AppendBlobsImpl.java @@ -4,35 +4,31 @@ package com.azure.v2.storage.blob.implementation; -import com.azure.v2.core.annotation.ReturnType; -import com.azure.v2.core.annotation.ServiceMethod; -import com.azure.v2.core.http.rest.ResponseBase; -import com.azure.v2.storage.blob.models.AppendBlobsAppendBlockFromUrlHeaders; -import com.azure.v2.storage.blob.models.AppendBlobsAppendBlockHeaders; -import com.azure.v2.storage.blob.models.AppendBlobsCreateHeaders; -import com.azure.v2.storage.blob.models.AppendBlobsSealHeaders; import com.azure.v2.storage.blob.models.BlobHttpHeaders; import com.azure.v2.storage.blob.models.BlobImmutabilityPolicyMode; import com.azure.v2.storage.blob.models.CpkInfo; import com.azure.v2.storage.blob.models.EncryptionAlgorithmType; import com.azure.v2.storage.blob.models.EncryptionScope; -import com.azure.v2.storage.blob.models.StorageErrorException; -import io.clientcore.core.annotation.ServiceInterface; +import com.azure.v2.storage.blob.models.StorageError; +import io.clientcore.core.annotations.ServiceInterface; import io.clientcore.core.http.RestProxy; -import io.clientcore.core.http.annotation.BodyParam; -import io.clientcore.core.http.annotation.HeaderParam; -import io.clientcore.core.http.annotation.HostParam; -import io.clientcore.core.http.annotation.HttpRequestInformation; -import io.clientcore.core.http.annotation.PathParam; -import io.clientcore.core.http.annotation.QueryParam; -import io.clientcore.core.http.annotation.UnexpectedResponseExceptionDetail; +import io.clientcore.core.http.annotations.BodyParam; +import io.clientcore.core.http.annotations.HeaderParam; +import io.clientcore.core.http.annotations.HostParam; +import io.clientcore.core.http.annotations.HttpRequestInformation; +import io.clientcore.core.http.annotations.PathParam; +import io.clientcore.core.http.annotations.QueryParam; +import io.clientcore.core.http.annotations.UnexpectedResponseExceptionDetail; +import io.clientcore.core.http.exceptions.HttpResponseException; import io.clientcore.core.http.models.HttpMethod; +import io.clientcore.core.http.models.RequestOptions; import io.clientcore.core.http.models.Response; -import io.clientcore.core.util.Base64Util; -import io.clientcore.core.util.Context; -import io.clientcore.core.util.DateTimeRfc1123; -import io.clientcore.core.util.binarydata.BinaryData; - +import io.clientcore.core.http.pipeline.HttpPipeline; +import io.clientcore.core.models.binarydata.BinaryData; +import io.clientcore.core.serialization.ObjectSerializer; +import io.clientcore.core.utils.Base64Util; +import io.clientcore.core.utils.DateTimeRfc1123; +import java.lang.reflect.InvocationTargetException; import java.time.OffsetDateTime; import java.util.Map; @@ -52,7 +48,7 @@ public final class AppendBlobsImpl { /** * Initializes an instance of AppendBlobsImpl. - * + * * @param client the instance of the service client containing this operation class. */ AppendBlobsImpl(AzureBlobStorageImpl client) { @@ -66,15 +62,27 @@ public final class AppendBlobsImpl { */ @ServiceInterface(name = "AzureBlobStorageAppe", host = "{url}") public interface AppendBlobsService { + static AppendBlobsService getNewInstance(HttpPipeline pipeline, ObjectSerializer serializer) { + try { + Class clazz = Class.forName("com.azure.v2.storage.blob.implementation.AppendBlobsServiceImpl"); + return (AppendBlobsService) clazz + .getMethod("getNewInstance", HttpPipeline.class, ObjectSerializer.class) + .invoke(null, pipeline, serializer); + } catch (ClassNotFoundException | NoSuchMethodException | IllegalAccessException + | InvocationTargetException e) { + throw new RuntimeException(e); + } + + } + @HttpRequestInformation( method = HttpMethod.PUT, path = "/{containerName}/{blob}", expectedStatusCodes = { 201 }) - @UnexpectedResponseExceptionDetail - 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, + @UnexpectedResponseExceptionDetail(exceptionBodyClass = StorageError.class) + Response 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, @@ -93,45 +101,30 @@ ResponseBase createSync(@HostParam("url") String @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); + @HeaderParam("x-ms-legal-hold") Boolean legalHold, @HeaderParam("Accept") String accept, + RequestOptions requestOptions); @HttpRequestInformation( method = HttpMethod.PUT, path = "/{containerName}/{blob}", expectedStatusCodes = { 201 }) - @UnexpectedResponseExceptionDetail - 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); + @UnexpectedResponseExceptionDetail(exceptionBodyClass = StorageError.class) + default void create(@HostParam("url") String url, @PathParam("containerName") String containerName, + @PathParam("blob") String blob, @HeaderParam("x-ms-blob-type") String blobType, + @HeaderParam("Content-Length") long contentLength, @HeaderParam("x-ms-version") String version, + @HeaderParam("Accept") String accept) { + create(url, containerName, blob, blobType, null, contentLength, null, null, null, null, null, null, null, + null, null, null, null, null, null, null, null, null, null, version, null, null, null, null, null, + accept, null); + } @HttpRequestInformation( method = HttpMethod.PUT, path = "/{containerName}/{blob}", expectedStatusCodes = { 201 }) - @UnexpectedResponseExceptionDetail - ResponseBase appendBlockSync(@HostParam("url") String url, - @PathParam("containerName") String containerName, @PathParam("blob") String blob, - @QueryParam("comp") String comp, @QueryParam("timeout") Integer timeout, + @UnexpectedResponseExceptionDetail(exceptionBodyClass = StorageError.class) + Response 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, @@ -149,41 +142,27 @@ ResponseBase appendBlockSync(@HostParam("ur @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); + RequestOptions requestOptions); @HttpRequestInformation( method = HttpMethod.PUT, path = "/{containerName}/{blob}", expectedStatusCodes = { 201 }) - @UnexpectedResponseExceptionDetail - 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); + @UnexpectedResponseExceptionDetail(exceptionBodyClass = StorageError.class) + default void appendBlock(@HostParam("url") String url, @PathParam("containerName") String containerName, + @PathParam("blob") String blob, @QueryParam("comp") String comp, + @HeaderParam("Content-Length") long contentLength, @HeaderParam("x-ms-version") String version, + @BodyParam("application/octet-stream") BinaryData body, @HeaderParam("Accept") String accept) { + appendBlock(url, containerName, blob, comp, null, contentLength, null, null, null, null, null, null, null, + null, null, null, null, null, null, null, version, null, null, null, body, accept, null); + } @HttpRequestInformation( method = HttpMethod.PUT, path = "/{containerName}/{blob}", expectedStatusCodes = { 201 }) - @UnexpectedResponseExceptionDetail - ResponseBase appendBlockFromUrlSync(@HostParam("url") String url, + @UnexpectedResponseExceptionDetail(exceptionBodyClass = StorageError.class) + Response 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, @@ -207,75 +186,52 @@ ResponseBase appendBlockFromUrlSync( @HeaderParam("x-ms-source-if-none-match") String sourceIfNoneMatch, @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, @HeaderParam("x-ms-copy-source-authorization") String copySourceAuthorization, - @HeaderParam("Accept") String accept, Context context); + @HeaderParam("Accept") String accept, RequestOptions requestOptions); @HttpRequestInformation( method = HttpMethod.PUT, path = "/{containerName}/{blob}", expectedStatusCodes = { 201 }) - @UnexpectedResponseExceptionDetail - Response appendBlockFromUrlNoCustomHeadersSync(@HostParam("url") String url, - @PathParam("containerName") String containerName, @PathParam("blob") String blob, - @QueryParam("comp") String comp, @HeaderParam("x-ms-copy-source") String sourceUrl, - @HeaderParam("x-ms-source-range") String sourceRange, - @HeaderParam("x-ms-source-content-md5") String sourceContentMD5, - @HeaderParam("x-ms-source-content-crc64") String sourceContentcrc64, @QueryParam("timeout") Integer timeout, - @HeaderParam("Content-Length") long contentLength, - @HeaderParam("Content-MD5") String transactionalContentMD5, - @HeaderParam("x-ms-encryption-key") String encryptionKey, - @HeaderParam("x-ms-encryption-key-sha256") String encryptionKeySha256, - @HeaderParam("x-ms-encryption-algorithm") EncryptionAlgorithmType encryptionAlgorithm, - @HeaderParam("x-ms-encryption-scope") String encryptionScope, @HeaderParam("x-ms-lease-id") String leaseId, - @HeaderParam("x-ms-blob-condition-maxsize") Long maxSize, - @HeaderParam("x-ms-blob-condition-appendpos") Long appendPosition, - @HeaderParam("If-Modified-Since") DateTimeRfc1123 ifModifiedSince, - @HeaderParam("If-Unmodified-Since") DateTimeRfc1123 ifUnmodifiedSince, - @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch, - @HeaderParam("x-ms-if-tags") String ifTags, - @HeaderParam("x-ms-source-if-modified-since") DateTimeRfc1123 sourceIfModifiedSince, - @HeaderParam("x-ms-source-if-unmodified-since") DateTimeRfc1123 sourceIfUnmodifiedSince, - @HeaderParam("x-ms-source-if-match") String sourceIfMatch, - @HeaderParam("x-ms-source-if-none-match") String sourceIfNoneMatch, - @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, - @HeaderParam("x-ms-copy-source-authorization") String copySourceAuthorization, - @HeaderParam("Accept") String accept, Context context); + @UnexpectedResponseExceptionDetail(exceptionBodyClass = StorageError.class) + default void 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("Content-Length") long contentLength, + @HeaderParam("x-ms-version") String version, @HeaderParam("Accept") String accept) { + appendBlockFromUrl(url, containerName, blob, comp, sourceUrl, null, null, null, null, contentLength, null, + null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, version, + null, null, accept, null); + } @HttpRequestInformation( method = HttpMethod.PUT, path = "/{containerName}/{blob}", expectedStatusCodes = { 200 }) - @UnexpectedResponseExceptionDetail - ResponseBase sealSync(@HostParam("url") String url, - @PathParam("containerName") String containerName, @PathParam("blob") String blob, - @QueryParam("comp") String comp, @QueryParam("timeout") Integer timeout, + @UnexpectedResponseExceptionDetail(exceptionBodyClass = StorageError.class) + Response 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); + RequestOptions requestOptions); @HttpRequestInformation( method = HttpMethod.PUT, path = "/{containerName}/{blob}", expectedStatusCodes = { 200 }) - @UnexpectedResponseExceptionDetail - 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); + @UnexpectedResponseExceptionDetail(exceptionBodyClass = StorageError.class) + default void seal(@HostParam("url") String url, @PathParam("containerName") String containerName, + @PathParam("blob") String blob, @QueryParam("comp") String comp, + @HeaderParam("x-ms-version") String version, @HeaderParam("Accept") String accept) { + seal(url, containerName, blob, comp, null, version, null, null, null, null, null, null, null, accept, null); + } } /** * 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. @@ -305,19 +261,18 @@ Response sealNoCustomHeadersSync(@HostParam("url") String url, * @param blobHttpHeaders Parameter group. * @param cpkInfo Parameter group. * @param encryptionScopeParam Parameter group. - * @param context The context to associate with this operation. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws StorageErrorException thrown if the request is rejected by server. + * @throws HttpResponseException thrown if the service returns an error. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link ResponseBase}. + * @return the response. */ - @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) { + public Response 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, + RequestOptions requestOptions) { final String blobType = "AppendBlob"; final String accept = "application/xml"; String contentTypeInternal = null; @@ -377,17 +332,17 @@ public ResponseBase createWithResponse(String co = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); DateTimeRfc1123 immutabilityPolicyExpiryConverted = immutabilityPolicyExpiry == null ? null : new DateTimeRfc1123(immutabilityPolicyExpiry); - return service.createSync(this.client.getUrl(), containerName, blob, blobType, timeout, contentLength, - contentType, contentEncoding, contentLanguage, contentMd5Converted, cacheControl, metadata, leaseId, - contentDisposition, encryptionKey, encryptionKeySha256, encryptionAlgorithm, encryptionScope, - ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, - this.client.getVersion(), requestId, blobTagsString, immutabilityPolicyExpiryConverted, - immutabilityPolicyMode, legalHold, accept, context); + 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, + requestOptions); } /** * 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. @@ -418,10 +373,9 @@ public ResponseBase createWithResponse(String co * @param cpkInfo Parameter group. * @param encryptionScopeParam Parameter group. * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws StorageErrorException thrown if the request is rejected by server. + * @throws HttpResponseException thrown if the service returns an error. * @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, @@ -429,126 +383,14 @@ public void create(String containerName, String blob, long contentLength, Intege BlobHttpHeaders blobHttpHeaders, CpkInfo cpkInfo, EncryptionScope encryptionScopeParam) { createWithResponse(containerName, blob, contentLength, timeout, metadata, leaseId, ifModifiedSince, ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, requestId, blobTagsString, immutabilityPolicyExpiry, - immutabilityPolicyMode, legalHold, blobHttpHeaders, cpkInfo, encryptionScopeParam, Context.none()); - } - - /** - * The Create Append Blob operation creates a new append blob. - * - * @param containerName The container name. - * @param blob The blob name. - * @param contentLength The length of the request. - * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. - * @param metadata Optional. Specifies a user-defined name-value pair associated with the blob. If no name-value - * pairs are specified, the operation will copy the metadata from the source blob or file to the destination blob. - * If one or more name-value pairs are specified, the destination blob is created with the specified metadata, and - * metadata is not copied from the source blob or file. Note that beginning with version 2009-09-19, metadata names - * must adhere to the naming rules for C# identifiers. See Naming and Referencing Containers, Blobs, and Metadata - * for more information. - * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. - * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the - * specified date/time. - * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since - * the specified date/time. - * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. - * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. - * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. - * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. - * @param blobTagsString Optional. Used to set blob tags in various blob operations. - * @param immutabilityPolicyExpiry Specifies the date time when the blobs immutability policy is set to expire. - * @param immutabilityPolicyMode Specifies the immutability policy mode to set on the blob. - * @param legalHold Specified if a legal hold should be set on the blob. - * @param blobHttpHeaders Parameter group. - * @param cpkInfo Parameter group. - * @param encryptionScopeParam Parameter group. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws StorageErrorException 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 Response createNoCustomHeadersWithResponse(String containerName, String blob, long contentLength, - Integer timeout, Map metadata, String leaseId, OffsetDateTime ifModifiedSince, - OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, String ifTags, String requestId, - String blobTagsString, OffsetDateTime immutabilityPolicyExpiry, - BlobImmutabilityPolicyMode immutabilityPolicyMode, Boolean legalHold, BlobHttpHeaders blobHttpHeaders, - CpkInfo cpkInfo, EncryptionScope encryptionScopeParam, Context context) { - final String blobType = "AppendBlob"; - final String accept = "application/xml"; - String contentTypeInternal = null; - 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); + immutabilityPolicyMode, legalHold, blobHttpHeaders, cpkInfo, encryptionScopeParam, RequestOptions.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. @@ -582,19 +424,18 @@ public Response createNoCustomHeadersWithResponse(String containerName, St * 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. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws StorageErrorException thrown if the request is rejected by server. + * @throws HttpResponseException thrown if the service returns an error. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link ResponseBase}. + * @return the response. */ - @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) { + public Response 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, + RequestOptions requestOptions) { final String comp = "appendblock"; final String accept = "application/xml"; String encryptionKeyInternal = null; @@ -623,18 +464,18 @@ public ResponseBase appendBlockWithResponse = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); DateTimeRfc1123 ifUnmodifiedSinceConverted = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - return service.appendBlockSync(this.client.getUrl(), containerName, blob, comp, timeout, contentLength, + 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); + structuredBodyType, structuredContentLength, body, accept, requestOptions); } /** * 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. @@ -669,10 +510,9 @@ public ResponseBase appendBlockWithResponse * @param cpkInfo Parameter group. * @param encryptionScopeParam Parameter group. * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws StorageErrorException thrown if the request is rejected by server. + * @throws HttpResponseException thrown if the service returns an error. * @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, @@ -681,100 +521,14 @@ public void appendBlock(String containerName, String blob, long contentLength, B 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://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. - * @param transactionalContentMD5 Specify the transactional md5 for the body, to be validated by the service. - * @param transactionalContentCrc64 Specify the transactional crc64 for the body, to be validated by the service. - * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. - * @param maxSize Optional conditional header. The max length in bytes permitted for the append blob. If the Append - * Block operation would cause the blob to exceed that limit or if the blob size is already greater than the value - * specified in this header, the request will fail with MaxBlobSizeConditionNotMet error (HTTP status code 412 - - * Precondition Failed). - * @param appendPosition Optional conditional header, used only for the Append Block operation. A number indicating - * the byte offset to compare. Append Block will succeed only if the append position is equal to this number. If it - * is not, the request will fail with the AppendPositionConditionNotMet error (HTTP status code 412 - Precondition - * Failed). - * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the - * specified date/time. - * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since - * the specified date/time. - * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. - * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. - * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. - * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. - * @param 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 StorageErrorException 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 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) { - 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); + RequestOptions.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. @@ -815,20 +569,19 @@ public Response appendBlockNoCustomHeadersWithResponse(String containerNam * copy source. * @param cpkInfo Parameter group. * @param encryptionScopeParam Parameter group. - * @param context The context to associate with this operation. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws StorageErrorException thrown if the request is rejected by server. + * @throws HttpResponseException thrown if the service returns an error. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link ResponseBase}. + * @return the response. */ - @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, + public Response appendBlockFromUrlWithResponse(String containerName, String blob, String sourceUrl, + long contentLength, String sourceRange, byte[] sourceContentMD5, byte[] sourceContentcrc64, Integer timeout, + byte[] transactionalContentMD5, String leaseId, Long maxSize, Long appendPosition, + OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, + String ifTags, OffsetDateTime sourceIfModifiedSince, OffsetDateTime sourceIfUnmodifiedSince, String sourceIfMatch, String sourceIfNoneMatch, String requestId, String copySourceAuthorization, - CpkInfo cpkInfo, EncryptionScope encryptionScopeParam, Context context) { + CpkInfo cpkInfo, EncryptionScope encryptionScopeParam, RequestOptions requestOptions) { final String comp = "appendblock"; final String accept = "application/xml"; String encryptionKeyInternal = null; @@ -862,19 +615,19 @@ public ResponseBase appendBlockFromU = sourceIfModifiedSince == null ? null : new DateTimeRfc1123(sourceIfModifiedSince); DateTimeRfc1123 sourceIfUnmodifiedSinceConverted = sourceIfUnmodifiedSince == null ? null : new DateTimeRfc1123(sourceIfUnmodifiedSince); - return service.appendBlockFromUrlSync(this.client.getUrl(), containerName, blob, comp, sourceUrl, sourceRange, + return service.appendBlockFromUrl(this.client.getUrl(), containerName, blob, comp, sourceUrl, sourceRange, sourceContentMD5Converted, sourceContentcrc64Converted, timeout, contentLength, transactionalContentMD5Converted, encryptionKey, encryptionKeySha256, encryptionAlgorithm, encryptionScope, leaseId, maxSize, appendPosition, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, sourceIfModifiedSinceConverted, sourceIfUnmodifiedSinceConverted, sourceIfMatch, - sourceIfNoneMatch, this.client.getVersion(), requestId, copySourceAuthorization, accept, context); + sourceIfNoneMatch, this.client.getVersion(), requestId, copySourceAuthorization, accept, requestOptions); } /** * 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. @@ -916,10 +669,9 @@ public ResponseBase appendBlockFromU * @param cpkInfo Parameter group. * @param encryptionScopeParam Parameter group. * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws StorageErrorException thrown if the request is rejected by server. + * @throws HttpResponseException thrown if the service returns an error. * @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, @@ -931,113 +683,13 @@ public void appendBlockFromUrl(String containerName, String blob, String sourceU sourceContentcrc64, timeout, transactionalContentMD5, leaseId, maxSize, appendPosition, ifModifiedSince, ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, sourceIfModifiedSince, sourceIfUnmodifiedSince, sourceIfMatch, sourceIfNoneMatch, requestId, copySourceAuthorization, cpkInfo, encryptionScopeParam, - Context.none()); - } - - /** - * The Append Block operation commits a new block of data to the end of an existing append blob where the contents - * are read from a source url. The Append Block operation is permitted only if the blob was created with - * x-ms-blob-type set to AppendBlob. Append Block is supported only on version 2015-02-21 version or later. - * - * @param containerName The container name. - * @param blob The blob name. - * @param sourceUrl Specify a URL to the copy source. - * @param contentLength The length of the request. - * @param sourceRange Bytes of source data in the specified range. - * @param sourceContentMD5 Specify the md5 calculated for the range of bytes that must be read from the copy source. - * @param sourceContentcrc64 Specify the crc64 calculated for the range of bytes that must be read from the copy - * source. - * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. - * @param transactionalContentMD5 Specify the transactional md5 for the body, to be validated by the service. - * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. - * @param maxSize Optional conditional header. The max length in bytes permitted for the append blob. If the Append - * Block operation would cause the blob to exceed that limit or if the blob size is already greater than the value - * specified in this header, the request will fail with MaxBlobSizeConditionNotMet error (HTTP status code 412 - - * Precondition Failed). - * @param appendPosition Optional conditional header, used only for the Append Block operation. A number indicating - * the byte offset to compare. Append Block will succeed only if the append position is equal to this number. If it - * is not, the request will fail with the AppendPositionConditionNotMet error (HTTP status code 412 - Precondition - * Failed). - * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the - * specified date/time. - * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since - * the specified date/time. - * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. - * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. - * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. - * @param sourceIfModifiedSince Specify this header value to operate only on a blob if it has been modified since - * the specified date/time. - * @param sourceIfUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified - * since the specified date/time. - * @param sourceIfMatch Specify an ETag value to operate only on blobs with a matching value. - * @param sourceIfNoneMatch Specify an ETag value to operate only on blobs without a matching value. - * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. - * @param copySourceAuthorization Only Bearer type is supported. Credentials should be a valid OAuth access token to - * copy source. - * @param cpkInfo Parameter group. - * @param encryptionScopeParam Parameter group. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws StorageErrorException 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 Response appendBlockFromUrlNoCustomHeadersWithResponse(String containerName, String blob, - String sourceUrl, long contentLength, String sourceRange, byte[] sourceContentMD5, byte[] sourceContentcrc64, - Integer timeout, byte[] transactionalContentMD5, String leaseId, Long maxSize, Long appendPosition, - OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, - String ifTags, OffsetDateTime sourceIfModifiedSince, OffsetDateTime sourceIfUnmodifiedSince, - String sourceIfMatch, String sourceIfNoneMatch, String requestId, String copySourceAuthorization, - CpkInfo cpkInfo, EncryptionScope encryptionScopeParam, Context context) { - final String comp = "appendblock"; - final String accept = "application/xml"; - String encryptionKeyInternal = null; - if (cpkInfo != null) { - encryptionKeyInternal = cpkInfo.getEncryptionKey(); - } - String encryptionKey = encryptionKeyInternal; - String encryptionKeySha256Internal = null; - if (cpkInfo != null) { - encryptionKeySha256Internal = cpkInfo.getEncryptionKeySha256(); - } - String encryptionKeySha256 = encryptionKeySha256Internal; - EncryptionAlgorithmType encryptionAlgorithmInternal = null; - if (cpkInfo != null) { - encryptionAlgorithmInternal = cpkInfo.getEncryptionAlgorithm(); - } - EncryptionAlgorithmType encryptionAlgorithm = encryptionAlgorithmInternal; - String encryptionScopeInternal = null; - if (encryptionScopeParam != null) { - encryptionScopeInternal = encryptionScopeParam.getEncryptionScope(); - } - String encryptionScope = encryptionScopeInternal; - String sourceContentMD5Converted = Base64Util.encodeToString(sourceContentMD5); - String sourceContentcrc64Converted = Base64Util.encodeToString(sourceContentcrc64); - String transactionalContentMD5Converted = Base64Util.encodeToString(transactionalContentMD5); - DateTimeRfc1123 ifModifiedSinceConverted - = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); - DateTimeRfc1123 ifUnmodifiedSinceConverted - = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - DateTimeRfc1123 sourceIfModifiedSinceConverted - = sourceIfModifiedSince == null ? null : new DateTimeRfc1123(sourceIfModifiedSince); - DateTimeRfc1123 sourceIfUnmodifiedSinceConverted - = sourceIfUnmodifiedSince == null ? null : new DateTimeRfc1123(sourceIfUnmodifiedSince); - return service.appendBlockFromUrlNoCustomHeadersSync(this.client.getUrl(), containerName, blob, comp, sourceUrl, - sourceRange, sourceContentMD5Converted, sourceContentcrc64Converted, timeout, contentLength, - transactionalContentMD5Converted, encryptionKey, encryptionKeySha256, encryptionAlgorithm, encryptionScope, - leaseId, maxSize, appendPosition, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, - ifNoneMatch, ifTags, sourceIfModifiedSinceConverted, sourceIfUnmodifiedSinceConverted, sourceIfMatch, - sourceIfNoneMatch, this.client.getVersion(), requestId, copySourceAuthorization, accept, context); + RequestOptions.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 @@ -1056,31 +708,30 @@ public Response appendBlockFromUrlNoCustomHeadersWithResponse(String conta * 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. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws StorageErrorException thrown if the request is rejected by server. + * @throws HttpResponseException thrown if the service returns an error. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link ResponseBase}. + * @return the response. */ - @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) { + public Response sealWithResponse(String containerName, String blob, Integer timeout, String requestId, + String leaseId, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, + String ifNoneMatch, Long appendPosition, RequestOptions requestOptions) { 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(), + return service.seal(this.client.getUrl(), containerName, blob, comp, timeout, this.client.getVersion(), requestId, leaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, - appendPosition, accept, context); + appendPosition, accept, requestOptions); } /** * 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 @@ -1100,57 +751,13 @@ public ResponseBase sealWithResponse(String contai * 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 StorageErrorException thrown if the request is rejected by server. + * @throws HttpResponseException thrown if the service returns an error. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ - @ServiceMethod(returns = ReturnType.SINGLE) public void seal(String containerName, String blob, Integer timeout, String requestId, String leaseId, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, Long appendPosition) { sealWithResponse(containerName, blob, timeout, requestId, leaseId, ifModifiedSince, ifUnmodifiedSince, ifMatch, - ifNoneMatch, appendPosition, Context.none()); - } - - /** - * The Seal operation seals the Append Blob to make it read-only. Seal is supported only on version 2019-12-12 - * version or later. - * - * @param containerName The container name. - * @param blob The blob name. - * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. - * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. - * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. - * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the - * specified date/time. - * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since - * the specified date/time. - * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. - * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. - * @param appendPosition Optional conditional header, used only for the Append Block operation. A number indicating - * the byte offset to compare. Append Block will succeed only if the append position is equal to this number. If it - * is not, the request will fail with the AppendPositionConditionNotMet error (HTTP status code 412 - Precondition - * Failed). - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws StorageErrorException 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 Response sealNoCustomHeadersWithResponse(String containerName, String blob, Integer timeout, - String requestId, String leaseId, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, - String ifMatch, String ifNoneMatch, Long appendPosition, Context context) { - final String comp = "seal"; - final String accept = "application/xml"; - DateTimeRfc1123 ifModifiedSinceConverted - = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); - DateTimeRfc1123 ifUnmodifiedSinceConverted - = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - return service.sealNoCustomHeadersSync(this.client.getUrl(), containerName, blob, comp, timeout, - this.client.getVersion(), requestId, leaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, - ifNoneMatch, appendPosition, accept, context); + ifNoneMatch, appendPosition, RequestOptions.none()); } } diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/implementation/AzureBlobStorageImpl.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/implementation/AzureBlobStorageImpl.java index 841274172f9e..a06758a247d5 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/implementation/AzureBlobStorageImpl.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/implementation/AzureBlobStorageImpl.java @@ -17,7 +17,7 @@ public final class AzureBlobStorageImpl { /** * Gets The URL of the service account, container, or blob that is the target of the desired operation. - * + * * @return the url value. */ public String getUrl() { @@ -31,7 +31,7 @@ public String getUrl() { /** * Gets Specifies the version of the operation to use for this request. - * + * * @return the version value. */ public String getVersion() { @@ -45,7 +45,7 @@ public String getVersion() { /** * Gets The HTTP pipeline to send requests through. - * + * * @return the httpPipeline value. */ public HttpPipeline getHttpPipeline() { @@ -59,7 +59,7 @@ public HttpPipeline getHttpPipeline() { /** * Gets the ServicesImpl object to access its operations. - * + * * @return the ServicesImpl object. */ public ServicesImpl getServices() { @@ -73,7 +73,7 @@ public ServicesImpl getServices() { /** * Gets the ContainersImpl object to access its operations. - * + * * @return the ContainersImpl object. */ public ContainersImpl getContainers() { @@ -87,7 +87,7 @@ public ContainersImpl getContainers() { /** * Gets the BlobsImpl object to access its operations. - * + * * @return the BlobsImpl object. */ public BlobsImpl getBlobs() { @@ -101,7 +101,7 @@ public BlobsImpl getBlobs() { /** * Gets the PageBlobsImpl object to access its operations. - * + * * @return the PageBlobsImpl object. */ public PageBlobsImpl getPageBlobs() { @@ -115,7 +115,7 @@ public PageBlobsImpl getPageBlobs() { /** * Gets the AppendBlobsImpl object to access its operations. - * + * * @return the AppendBlobsImpl object. */ public AppendBlobsImpl getAppendBlobs() { @@ -129,7 +129,7 @@ public AppendBlobsImpl getAppendBlobs() { /** * Gets the BlockBlobsImpl object to access its operations. - * + * * @return the BlockBlobsImpl object. */ public BlockBlobsImpl getBlockBlobs() { @@ -138,15 +138,15 @@ public BlockBlobsImpl getBlockBlobs() { /** * 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. */ public AzureBlobStorageImpl(HttpPipeline httpPipeline, String url, String version) { - this.url = url; - this.version = "2025-01-05"; this.httpPipeline = httpPipeline; + this.url = url; + this.version = version; this.services = new ServicesImpl(this); this.containers = new ContainersImpl(this); this.blobs = new BlobsImpl(this); diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/implementation/BlobsImpl.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/implementation/BlobsImpl.java index 6c40669a342c..83adb2f6b488 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/implementation/BlobsImpl.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/implementation/BlobsImpl.java @@ -4,9 +4,6 @@ package com.azure.v2.storage.blob.implementation; -import com.azure.v2.core.annotation.ReturnType; -import com.azure.v2.core.annotation.ServiceMethod; -import com.azure.v2.core.http.rest.ResponseBase; import com.azure.v2.storage.blob.models.AccessTier; import com.azure.v2.storage.blob.models.BlobCopySourceTagsMode; import com.azure.v2.storage.blob.models.BlobDeleteType; @@ -14,53 +11,32 @@ import com.azure.v2.storage.blob.models.BlobHttpHeaders; import com.azure.v2.storage.blob.models.BlobImmutabilityPolicyMode; import com.azure.v2.storage.blob.models.BlobTags; -import com.azure.v2.storage.blob.models.BlobsAbortCopyFromURLHeaders; -import com.azure.v2.storage.blob.models.BlobsAcquireLeaseHeaders; -import com.azure.v2.storage.blob.models.BlobsBreakLeaseHeaders; -import com.azure.v2.storage.blob.models.BlobsChangeLeaseHeaders; -import com.azure.v2.storage.blob.models.BlobsCopyFromURLHeaders; -import com.azure.v2.storage.blob.models.BlobsCreateSnapshotHeaders; -import com.azure.v2.storage.blob.models.BlobsDeleteHeaders; -import com.azure.v2.storage.blob.models.BlobsDeleteImmutabilityPolicyHeaders; -import com.azure.v2.storage.blob.models.BlobsDownloadHeaders; -import com.azure.v2.storage.blob.models.BlobsGetAccountInfoHeaders; -import com.azure.v2.storage.blob.models.BlobsGetPropertiesHeaders; -import com.azure.v2.storage.blob.models.BlobsGetTagsHeaders; -import com.azure.v2.storage.blob.models.BlobsQueryHeaders; -import com.azure.v2.storage.blob.models.BlobsReleaseLeaseHeaders; -import com.azure.v2.storage.blob.models.BlobsRenewLeaseHeaders; -import com.azure.v2.storage.blob.models.BlobsSetExpiryHeaders; -import com.azure.v2.storage.blob.models.BlobsSetHttpHeadersHeaders; -import com.azure.v2.storage.blob.models.BlobsSetImmutabilityPolicyHeaders; -import com.azure.v2.storage.blob.models.BlobsSetLegalHoldHeaders; -import com.azure.v2.storage.blob.models.BlobsSetMetadataHeaders; -import com.azure.v2.storage.blob.models.BlobsSetTagsHeaders; -import com.azure.v2.storage.blob.models.BlobsSetTierHeaders; -import com.azure.v2.storage.blob.models.BlobsStartCopyFromURLHeaders; -import com.azure.v2.storage.blob.models.BlobsUndeleteHeaders; import com.azure.v2.storage.blob.models.CpkInfo; import com.azure.v2.storage.blob.models.DeleteSnapshotsOptionType; import com.azure.v2.storage.blob.models.EncryptionAlgorithmType; import com.azure.v2.storage.blob.models.EncryptionScope; import com.azure.v2.storage.blob.models.QueryRequest; import com.azure.v2.storage.blob.models.RehydratePriority; -import com.azure.v2.storage.blob.models.StorageErrorException; -import io.clientcore.core.annotation.ServiceInterface; +import com.azure.v2.storage.blob.models.StorageError; +import io.clientcore.core.annotations.ServiceInterface; import io.clientcore.core.http.RestProxy; -import io.clientcore.core.http.annotation.BodyParam; -import io.clientcore.core.http.annotation.HeaderParam; -import io.clientcore.core.http.annotation.HostParam; -import io.clientcore.core.http.annotation.HttpRequestInformation; -import io.clientcore.core.http.annotation.PathParam; -import io.clientcore.core.http.annotation.QueryParam; -import io.clientcore.core.http.annotation.UnexpectedResponseExceptionDetail; +import io.clientcore.core.http.annotations.BodyParam; +import io.clientcore.core.http.annotations.HeaderParam; +import io.clientcore.core.http.annotations.HostParam; +import io.clientcore.core.http.annotations.HttpRequestInformation; +import io.clientcore.core.http.annotations.PathParam; +import io.clientcore.core.http.annotations.QueryParam; +import io.clientcore.core.http.annotations.UnexpectedResponseExceptionDetail; +import io.clientcore.core.http.exceptions.HttpResponseException; import io.clientcore.core.http.models.HttpMethod; +import io.clientcore.core.http.models.RequestOptions; import io.clientcore.core.http.models.Response; -import io.clientcore.core.util.Base64Util; -import io.clientcore.core.util.Context; -import io.clientcore.core.util.DateTimeRfc1123; - +import io.clientcore.core.http.pipeline.HttpPipeline; +import io.clientcore.core.serialization.ObjectSerializer; +import io.clientcore.core.utils.Base64Util; +import io.clientcore.core.utils.DateTimeRfc1123; import java.io.InputStream; +import java.lang.reflect.InvocationTargetException; import java.time.OffsetDateTime; import java.util.Map; @@ -80,7 +56,7 @@ public final class BlobsImpl { /** * Initializes an instance of BlobsImpl. - * + * * @param client the instance of the service client containing this operation class. */ BlobsImpl(AzureBlobStorageImpl client) { @@ -94,16 +70,27 @@ public final class BlobsImpl { */ @ServiceInterface(name = "AzureBlobStorageBlob", host = "{url}") public interface BlobsService { + static BlobsService getNewInstance(HttpPipeline pipeline, ObjectSerializer serializer) { + try { + Class clazz = Class.forName("com.azure.v2.storage.blob.implementation.BlobsServiceImpl"); + return (BlobsService) clazz.getMethod("getNewInstance", HttpPipeline.class, ObjectSerializer.class) + .invoke(null, pipeline, serializer); + } catch (ClassNotFoundException | NoSuchMethodException | IllegalAccessException + | InvocationTargetException e) { + throw new RuntimeException(e); + } + + } + @HttpRequestInformation( method = HttpMethod.GET, path = "/{containerName}/{blob}", expectedStatusCodes = { 200, 206 }) - @UnexpectedResponseExceptionDetail - 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, + @UnexpectedResponseExceptionDetail(exceptionBodyClass = StorageError.class) + Response 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, @@ -115,41 +102,29 @@ ResponseBase downloadSync(@HostParam("url") S @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); + RequestOptions requestOptions); @HttpRequestInformation( method = HttpMethod.GET, path = "/{containerName}/{blob}", expectedStatusCodes = { 200, 206 }) - @UnexpectedResponseExceptionDetail - 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); + @UnexpectedResponseExceptionDetail(exceptionBodyClass = StorageError.class) + default InputStream download(@HostParam("url") String url, @PathParam("containerName") String containerName, + @PathParam("blob") String blob, @HeaderParam("x-ms-version") String version, + @HeaderParam("Accept") String accept) { + return download(url, containerName, blob, null, null, null, null, null, null, null, null, null, null, null, + null, null, null, null, null, version, null, accept, null).getValue(); + } @HttpRequestInformation( method = HttpMethod.HEAD, path = "/{containerName}/{blob}", expectedStatusCodes = { 200 }) - @UnexpectedResponseExceptionDetail - 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, + @UnexpectedResponseExceptionDetail(exceptionBodyClass = StorageError.class) + Response 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, @@ -157,36 +132,29 @@ ResponseBase getPropertiesSync(@HostParam("url" @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); + RequestOptions requestOptions); @HttpRequestInformation( method = HttpMethod.HEAD, path = "/{containerName}/{blob}", expectedStatusCodes = { 200 }) - @UnexpectedResponseExceptionDetail - 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); + @UnexpectedResponseExceptionDetail(exceptionBodyClass = StorageError.class) + default void getProperties(@HostParam("url") String url, @PathParam("containerName") String containerName, + @PathParam("blob") String blob, @HeaderParam("x-ms-version") String version, + @HeaderParam("Accept") String accept) { + getProperties(url, containerName, blob, null, null, null, null, null, null, null, null, null, null, null, + null, version, null, accept, null); + } @HttpRequestInformation( method = HttpMethod.DELETE, path = "/{containerName}/{blob}", expectedStatusCodes = { 202 }) - @UnexpectedResponseExceptionDetail - 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, + @UnexpectedResponseExceptionDetail(exceptionBodyClass = StorageError.class) + Response 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, @@ -194,80 +162,72 @@ ResponseBase deleteSync(@HostParam("url") String url, @HeaderParam("x-ms-if-tags") String ifTags, @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, @QueryParam("deletetype") BlobDeleteType blobDeleteType, @HeaderParam("Accept") String accept, - Context context); + RequestOptions requestOptions); @HttpRequestInformation( method = HttpMethod.DELETE, path = "/{containerName}/{blob}", expectedStatusCodes = { 202 }) - @UnexpectedResponseExceptionDetail - Response deleteNoCustomHeadersSync(@HostParam("url") String url, - @PathParam("containerName") String containerName, @PathParam("blob") String blob, - @QueryParam("snapshot") String snapshot, @QueryParam("versionid") String versionId, - @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-lease-id") String leaseId, - @HeaderParam("x-ms-delete-snapshots") DeleteSnapshotsOptionType deleteSnapshots, - @HeaderParam("If-Modified-Since") DateTimeRfc1123 ifModifiedSince, - @HeaderParam("If-Unmodified-Since") DateTimeRfc1123 ifUnmodifiedSince, - @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch, - @HeaderParam("x-ms-if-tags") String ifTags, @HeaderParam("x-ms-version") String version, - @HeaderParam("x-ms-client-request-id") String requestId, - @QueryParam("deletetype") BlobDeleteType blobDeleteType, @HeaderParam("Accept") String accept, - Context context); + @UnexpectedResponseExceptionDetail(exceptionBodyClass = StorageError.class) + default void delete(@HostParam("url") String url, @PathParam("containerName") String containerName, + @PathParam("blob") String blob, @HeaderParam("x-ms-version") String version, + @HeaderParam("Accept") String accept) { + delete(url, containerName, blob, null, null, null, null, null, null, null, null, null, null, version, null, + null, accept, null); + } @HttpRequestInformation( method = HttpMethod.PUT, path = "/{containerName}/{blob}", expectedStatusCodes = { 200 }) - @UnexpectedResponseExceptionDetail - ResponseBase undeleteSync(@HostParam("url") String url, - @PathParam("containerName") String containerName, @PathParam("blob") String blob, - @QueryParam("comp") String comp, @QueryParam("timeout") Integer timeout, + @UnexpectedResponseExceptionDetail(exceptionBodyClass = StorageError.class) + Response 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); + @HeaderParam("Accept") String accept, RequestOptions requestOptions); @HttpRequestInformation( method = HttpMethod.PUT, path = "/{containerName}/{blob}", expectedStatusCodes = { 200 }) - @UnexpectedResponseExceptionDetail - 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); + @UnexpectedResponseExceptionDetail(exceptionBodyClass = StorageError.class) + default void undelete(@HostParam("url") String url, @PathParam("containerName") String containerName, + @PathParam("blob") String blob, @QueryParam("comp") String comp, + @HeaderParam("x-ms-version") String version, @HeaderParam("Accept") String accept) { + undelete(url, containerName, blob, comp, null, version, null, accept, null); + } @HttpRequestInformation( method = HttpMethod.PUT, path = "/{containerName}/{blob}", expectedStatusCodes = { 200 }) - @UnexpectedResponseExceptionDetail - ResponseBase setExpirySync(@HostParam("url") String url, - @PathParam("containerName") String containerName, @PathParam("blob") String blob, - @QueryParam("comp") String comp, @QueryParam("timeout") Integer timeout, + @UnexpectedResponseExceptionDetail(exceptionBodyClass = StorageError.class) + Response 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); + @HeaderParam("x-ms-expiry-time") String expiresOn, @HeaderParam("Accept") String accept, + RequestOptions requestOptions); @HttpRequestInformation( method = HttpMethod.PUT, path = "/{containerName}/{blob}", expectedStatusCodes = { 200 }) - @UnexpectedResponseExceptionDetail - 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); + @UnexpectedResponseExceptionDetail(exceptionBodyClass = StorageError.class) + default void setExpiry(@HostParam("url") String url, @PathParam("containerName") String containerName, + @PathParam("blob") String blob, @QueryParam("comp") String comp, + @HeaderParam("x-ms-version") String version, + @HeaderParam("x-ms-expiry-option") BlobExpiryOptions expiryOptions, @HeaderParam("Accept") String accept) { + setExpiry(url, containerName, blob, comp, null, version, null, expiryOptions, null, accept, null); + } @HttpRequestInformation( method = HttpMethod.PUT, path = "/{containerName}/{blob}", expectedStatusCodes = { 200 }) - @UnexpectedResponseExceptionDetail - ResponseBase setHttpHeadersSync(@HostParam("url") String url, - @PathParam("containerName") String containerName, @PathParam("blob") String blob, - @QueryParam("comp") String comp, @QueryParam("timeout") Integer timeout, + @UnexpectedResponseExceptionDetail(exceptionBodyClass = StorageError.class) + Response 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, @@ -280,36 +240,26 @@ ResponseBase setHttpHeadersSync(@HostParam("ur @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); + @HeaderParam("Accept") String accept, RequestOptions requestOptions); @HttpRequestInformation( method = HttpMethod.PUT, path = "/{containerName}/{blob}", expectedStatusCodes = { 200 }) - @UnexpectedResponseExceptionDetail - 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); + @UnexpectedResponseExceptionDetail(exceptionBodyClass = StorageError.class) + default void setHttpHeaders(@HostParam("url") String url, @PathParam("containerName") String containerName, + @PathParam("blob") String blob, @QueryParam("comp") String comp, + @HeaderParam("x-ms-version") String version, @HeaderParam("Accept") String accept) { + setHttpHeaders(url, containerName, blob, comp, null, null, null, null, null, null, null, null, null, null, + null, null, null, version, null, accept, null); + } @HttpRequestInformation( method = HttpMethod.PUT, path = "/{containerName}/{blob}", expectedStatusCodes = { 200 }) - @UnexpectedResponseExceptionDetail - ResponseBase setImmutabilityPolicySync(@HostParam("url") String url, + @UnexpectedResponseExceptionDetail(exceptionBodyClass = StorageError.class) + Response 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, @@ -317,79 +267,76 @@ ResponseBase setImmutabilityPolicySync( @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); + @HeaderParam("Accept") String accept, RequestOptions requestOptions); @HttpRequestInformation( method = HttpMethod.PUT, path = "/{containerName}/{blob}", expectedStatusCodes = { 200 }) - @UnexpectedResponseExceptionDetail - Response setImmutabilityPolicyNoCustomHeadersSync(@HostParam("url") String url, + @UnexpectedResponseExceptionDetail(exceptionBodyClass = StorageError.class) + default void 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); + @QueryParam("comp") String comp, @HeaderParam("x-ms-version") String version, + @HeaderParam("Accept") String accept) { + setImmutabilityPolicy(url, containerName, blob, comp, null, version, null, null, null, null, null, null, + accept, null); + } @HttpRequestInformation( method = HttpMethod.DELETE, path = "/{containerName}/{blob}", expectedStatusCodes = { 200 }) - @UnexpectedResponseExceptionDetail - ResponseBase deleteImmutabilityPolicySync( - @HostParam("url") String url, @PathParam("containerName") String containerName, - @PathParam("blob") String blob, @QueryParam("comp") String comp, @QueryParam("timeout") Integer timeout, + @UnexpectedResponseExceptionDetail(exceptionBodyClass = StorageError.class) + Response 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); + @HeaderParam("Accept") String accept, RequestOptions requestOptions); @HttpRequestInformation( method = HttpMethod.DELETE, path = "/{containerName}/{blob}", expectedStatusCodes = { 200 }) - @UnexpectedResponseExceptionDetail - Response deleteImmutabilityPolicyNoCustomHeadersSync(@HostParam("url") String url, + @UnexpectedResponseExceptionDetail(exceptionBodyClass = StorageError.class) + default void 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); + @QueryParam("comp") String comp, @HeaderParam("x-ms-version") String version, + @HeaderParam("Accept") String accept) { + deleteImmutabilityPolicy(url, containerName, blob, comp, null, version, null, null, null, accept, null); + } @HttpRequestInformation( method = HttpMethod.PUT, path = "/{containerName}/{blob}", expectedStatusCodes = { 200 }) - @UnexpectedResponseExceptionDetail - ResponseBase setLegalHoldSync(@HostParam("url") String url, - @PathParam("containerName") String containerName, @PathParam("blob") String blob, - @QueryParam("comp") String comp, @QueryParam("timeout") Integer timeout, + @UnexpectedResponseExceptionDetail(exceptionBodyClass = StorageError.class) + Response 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); + @QueryParam("versionid") String versionId, @HeaderParam("Accept") String accept, + RequestOptions requestOptions); @HttpRequestInformation( method = HttpMethod.PUT, path = "/{containerName}/{blob}", expectedStatusCodes = { 200 }) - @UnexpectedResponseExceptionDetail - 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); + @UnexpectedResponseExceptionDetail(exceptionBodyClass = StorageError.class) + default void setLegalHold(@HostParam("url") String url, @PathParam("containerName") String containerName, + @PathParam("blob") String blob, @QueryParam("comp") String comp, + @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-legal-hold") boolean legalHold, + @HeaderParam("Accept") String accept) { + setLegalHold(url, containerName, blob, comp, null, version, null, legalHold, null, null, accept, null); + } @HttpRequestInformation( method = HttpMethod.PUT, path = "/{containerName}/{blob}", expectedStatusCodes = { 200 }) - @UnexpectedResponseExceptionDetail - ResponseBase setMetadataSync(@HostParam("url") String url, - @PathParam("containerName") String containerName, @PathParam("blob") String blob, - @QueryParam("comp") String comp, @QueryParam("timeout") Integer timeout, + @UnexpectedResponseExceptionDetail(exceptionBodyClass = StorageError.class) + Response 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, @@ -400,200 +347,174 @@ ResponseBase setMetadataSync(@HostParam("url") St @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); + RequestOptions requestOptions); @HttpRequestInformation( method = HttpMethod.PUT, path = "/{containerName}/{blob}", expectedStatusCodes = { 200 }) - @UnexpectedResponseExceptionDetail - 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); + @UnexpectedResponseExceptionDetail(exceptionBodyClass = StorageError.class) + default void setMetadata(@HostParam("url") String url, @PathParam("containerName") String containerName, + @PathParam("blob") String blob, @QueryParam("comp") String comp, + @HeaderParam("x-ms-version") String version, @HeaderParam("Accept") String accept) { + setMetadata(url, containerName, blob, comp, null, null, null, null, null, null, null, null, null, null, + null, null, version, null, accept, null); + } @HttpRequestInformation( method = HttpMethod.PUT, path = "/{containerName}/{blob}", expectedStatusCodes = { 201 }) - @UnexpectedResponseExceptionDetail - 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, + @UnexpectedResponseExceptionDetail(exceptionBodyClass = StorageError.class) + Response 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); + RequestOptions requestOptions); @HttpRequestInformation( method = HttpMethod.PUT, path = "/{containerName}/{blob}", expectedStatusCodes = { 201 }) - @UnexpectedResponseExceptionDetail - 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); + @UnexpectedResponseExceptionDetail(exceptionBodyClass = StorageError.class) + default void acquireLease(@HostParam("url") String url, @PathParam("containerName") String containerName, + @PathParam("blob") String blob, @QueryParam("comp") String comp, + @HeaderParam("x-ms-lease-action") String action, @HeaderParam("x-ms-version") String version, + @HeaderParam("Accept") String accept) { + acquireLease(url, containerName, blob, comp, action, null, null, null, null, null, null, null, null, + version, null, accept, null); + } @HttpRequestInformation( method = HttpMethod.PUT, path = "/{containerName}/{blob}", expectedStatusCodes = { 200 }) - @UnexpectedResponseExceptionDetail - 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, + @UnexpectedResponseExceptionDetail(exceptionBodyClass = StorageError.class) + Response 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); + RequestOptions requestOptions); @HttpRequestInformation( method = HttpMethod.PUT, path = "/{containerName}/{blob}", expectedStatusCodes = { 200 }) - @UnexpectedResponseExceptionDetail - 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); + @UnexpectedResponseExceptionDetail(exceptionBodyClass = StorageError.class) + default void releaseLease(@HostParam("url") String url, @PathParam("containerName") String containerName, + @PathParam("blob") String blob, @QueryParam("comp") String comp, + @HeaderParam("x-ms-lease-action") String action, @HeaderParam("x-ms-lease-id") String leaseId, + @HeaderParam("x-ms-version") String version, @HeaderParam("Accept") String accept) { + releaseLease(url, containerName, blob, comp, action, null, leaseId, null, null, null, null, null, version, + null, accept, null); + } @HttpRequestInformation( method = HttpMethod.PUT, path = "/{containerName}/{blob}", expectedStatusCodes = { 200 }) - @UnexpectedResponseExceptionDetail - 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, + @UnexpectedResponseExceptionDetail(exceptionBodyClass = StorageError.class) + Response 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); + RequestOptions requestOptions); @HttpRequestInformation( method = HttpMethod.PUT, path = "/{containerName}/{blob}", expectedStatusCodes = { 200 }) - @UnexpectedResponseExceptionDetail - 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); + @UnexpectedResponseExceptionDetail(exceptionBodyClass = StorageError.class) + default void renewLease(@HostParam("url") String url, @PathParam("containerName") String containerName, + @PathParam("blob") String blob, @QueryParam("comp") String comp, + @HeaderParam("x-ms-lease-action") String action, @HeaderParam("x-ms-lease-id") String leaseId, + @HeaderParam("x-ms-version") String version, @HeaderParam("Accept") String accept) { + renewLease(url, containerName, blob, comp, action, null, leaseId, null, null, null, null, null, version, + null, accept, null); + } @HttpRequestInformation( method = HttpMethod.PUT, path = "/{containerName}/{blob}", expectedStatusCodes = { 200 }) - @UnexpectedResponseExceptionDetail - 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, + @UnexpectedResponseExceptionDetail(exceptionBodyClass = StorageError.class) + Response 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); + RequestOptions requestOptions); @HttpRequestInformation( method = HttpMethod.PUT, path = "/{containerName}/{blob}", expectedStatusCodes = { 200 }) - @UnexpectedResponseExceptionDetail - 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); + @UnexpectedResponseExceptionDetail(exceptionBodyClass = StorageError.class) + default void changeLease(@HostParam("url") String url, @PathParam("containerName") String containerName, + @PathParam("blob") String blob, @QueryParam("comp") String comp, + @HeaderParam("x-ms-lease-action") String action, @HeaderParam("x-ms-lease-id") String leaseId, + @HeaderParam("x-ms-proposed-lease-id") String proposedLeaseId, @HeaderParam("x-ms-version") String version, + @HeaderParam("Accept") String accept) { + changeLease(url, containerName, blob, comp, action, null, leaseId, proposedLeaseId, null, null, null, null, + null, version, null, accept, null); + } @HttpRequestInformation( method = HttpMethod.PUT, path = "/{containerName}/{blob}", expectedStatusCodes = { 202 }) - @UnexpectedResponseExceptionDetail - 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, + @UnexpectedResponseExceptionDetail(exceptionBodyClass = StorageError.class) + Response 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); + RequestOptions requestOptions); @HttpRequestInformation( method = HttpMethod.PUT, path = "/{containerName}/{blob}", expectedStatusCodes = { 202 }) - @UnexpectedResponseExceptionDetail - 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); + @UnexpectedResponseExceptionDetail(exceptionBodyClass = StorageError.class) + default void breakLease(@HostParam("url") String url, @PathParam("containerName") String containerName, + @PathParam("blob") String blob, @QueryParam("comp") String comp, + @HeaderParam("x-ms-lease-action") String action, @HeaderParam("x-ms-version") String version, + @HeaderParam("Accept") String accept) { + breakLease(url, containerName, blob, comp, action, null, null, null, null, null, null, null, version, null, + accept, null); + } @HttpRequestInformation( method = HttpMethod.PUT, path = "/{containerName}/{blob}", expectedStatusCodes = { 201 }) - @UnexpectedResponseExceptionDetail - ResponseBase createSnapshotSync(@HostParam("url") String url, - @PathParam("containerName") String containerName, @PathParam("blob") String blob, - @QueryParam("comp") String comp, @QueryParam("timeout") Integer timeout, + @UnexpectedResponseExceptionDetail(exceptionBodyClass = StorageError.class) + Response 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, @@ -604,37 +525,28 @@ ResponseBase createSnapshotSync(@HostParam("ur @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); + @HeaderParam("Accept") String accept, RequestOptions requestOptions); @HttpRequestInformation( method = HttpMethod.PUT, path = "/{containerName}/{blob}", expectedStatusCodes = { 201 }) - @UnexpectedResponseExceptionDetail - 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); + @UnexpectedResponseExceptionDetail(exceptionBodyClass = StorageError.class) + default void createSnapshot(@HostParam("url") String url, @PathParam("containerName") String containerName, + @PathParam("blob") String blob, @QueryParam("comp") String comp, + @HeaderParam("x-ms-version") String version, @HeaderParam("Accept") String accept) { + createSnapshot(url, containerName, blob, comp, null, null, null, null, null, null, null, null, null, null, + null, null, version, null, accept, null); + } @HttpRequestInformation( method = HttpMethod.PUT, path = "/{containerName}/{blob}", expectedStatusCodes = { 202 }) - @UnexpectedResponseExceptionDetail - 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, + @UnexpectedResponseExceptionDetail(exceptionBodyClass = StorageError.class) + Response 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, @@ -650,43 +562,30 @@ ResponseBase startCopyFromURLSync(@HostParam @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); + @HeaderParam("x-ms-legal-hold") Boolean legalHold, @HeaderParam("Accept") String accept, + RequestOptions requestOptions); @HttpRequestInformation( method = HttpMethod.PUT, path = "/{containerName}/{blob}", expectedStatusCodes = { 202 }) - @UnexpectedResponseExceptionDetail - 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); + @UnexpectedResponseExceptionDetail(exceptionBodyClass = StorageError.class) + default void startCopyFromURL(@HostParam("url") String url, @PathParam("containerName") String containerName, + @PathParam("blob") String blob, @HeaderParam("x-ms-copy-source") String copySource, + @HeaderParam("x-ms-version") String version, @HeaderParam("Accept") String accept) { + startCopyFromURL(url, containerName, blob, null, null, null, null, null, null, null, null, null, null, null, + null, null, null, copySource, null, version, null, null, null, null, null, null, accept, null); + } @HttpRequestInformation( method = HttpMethod.PUT, path = "/{containerName}/{blob}", expectedStatusCodes = { 202 }) - @UnexpectedResponseExceptionDetail - 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, + @UnexpectedResponseExceptionDetail(exceptionBodyClass = StorageError.class) + Response 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, @@ -705,125 +604,103 @@ ResponseBase copyFromURLSync(@HostParam("url") St @HeaderParam("x-ms-copy-source-authorization") String copySourceAuthorization, @HeaderParam("x-ms-encryption-scope") String encryptionScope, @HeaderParam("x-ms-copy-source-tag-option") BlobCopySourceTagsMode copySourceTags, - @HeaderParam("Accept") String accept, Context context); + @HeaderParam("Accept") String accept, RequestOptions requestOptions); @HttpRequestInformation( method = HttpMethod.PUT, path = "/{containerName}/{blob}", expectedStatusCodes = { 202 }) - @UnexpectedResponseExceptionDetail - Response copyFromURLNoCustomHeadersSync(@HostParam("url") String url, - @PathParam("containerName") String containerName, @PathParam("blob") String blob, - @HeaderParam("x-ms-requires-sync") String xMsRequiresSync, @QueryParam("timeout") Integer timeout, - @HeaderParam("x-ms-meta-") Map metadata, @HeaderParam("x-ms-access-tier") AccessTier tier, - @HeaderParam("x-ms-source-if-modified-since") DateTimeRfc1123 sourceIfModifiedSince, - @HeaderParam("x-ms-source-if-unmodified-since") DateTimeRfc1123 sourceIfUnmodifiedSince, - @HeaderParam("x-ms-source-if-match") String sourceIfMatch, - @HeaderParam("x-ms-source-if-none-match") String sourceIfNoneMatch, - @HeaderParam("If-Modified-Since") DateTimeRfc1123 ifModifiedSince, - @HeaderParam("If-Unmodified-Since") DateTimeRfc1123 ifUnmodifiedSince, - @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch, - @HeaderParam("x-ms-if-tags") String ifTags, @HeaderParam("x-ms-copy-source") String copySource, - @HeaderParam("x-ms-lease-id") String leaseId, @HeaderParam("x-ms-version") String version, - @HeaderParam("x-ms-client-request-id") String requestId, - @HeaderParam("x-ms-source-content-md5") String sourceContentMD5, - @HeaderParam("x-ms-tags") String blobTagsString, - @HeaderParam("x-ms-immutability-policy-until-date") DateTimeRfc1123 immutabilityPolicyExpiry, - @HeaderParam("x-ms-immutability-policy-mode") BlobImmutabilityPolicyMode immutabilityPolicyMode, - @HeaderParam("x-ms-legal-hold") Boolean legalHold, - @HeaderParam("x-ms-copy-source-authorization") String copySourceAuthorization, - @HeaderParam("x-ms-encryption-scope") String encryptionScope, - @HeaderParam("x-ms-copy-source-tag-option") BlobCopySourceTagsMode copySourceTags, - @HeaderParam("Accept") String accept, Context context); + @UnexpectedResponseExceptionDetail(exceptionBodyClass = StorageError.class) + default void copyFromURL(@HostParam("url") String url, @PathParam("containerName") String containerName, + @PathParam("blob") String blob, @HeaderParam("x-ms-requires-sync") String xMsRequiresSync, + @HeaderParam("x-ms-copy-source") String copySource, @HeaderParam("x-ms-version") String version, + @HeaderParam("Accept") String accept) { + copyFromURL(url, containerName, blob, xMsRequiresSync, null, null, null, null, null, null, null, null, null, + null, null, null, copySource, null, version, null, null, null, null, null, null, null, null, null, + accept, null); + } @HttpRequestInformation( method = HttpMethod.PUT, path = "/{containerName}/{blob}", expectedStatusCodes = { 204 }) - @UnexpectedResponseExceptionDetail - ResponseBase abortCopyFromURLSync(@HostParam("url") String url, - @PathParam("containerName") String containerName, @PathParam("blob") String blob, - @QueryParam("comp") String comp, @HeaderParam("x-ms-copy-action") String copyActionAbortConstant, - @QueryParam("copyid") String copyId, @QueryParam("timeout") Integer timeout, - @HeaderParam("x-ms-lease-id") String leaseId, @HeaderParam("x-ms-version") String version, - @HeaderParam("x-ms-client-request-id") String requestId, @HeaderParam("Accept") String accept, - Context context); + @UnexpectedResponseExceptionDetail(exceptionBodyClass = StorageError.class) + Response 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, RequestOptions requestOptions); @HttpRequestInformation( method = HttpMethod.PUT, path = "/{containerName}/{blob}", expectedStatusCodes = { 204 }) - @UnexpectedResponseExceptionDetail - Response abortCopyFromURLNoCustomHeadersSync(@HostParam("url") String url, - @PathParam("containerName") String containerName, @PathParam("blob") String blob, - @QueryParam("comp") String comp, @HeaderParam("x-ms-copy-action") String copyActionAbortConstant, - @QueryParam("copyid") String copyId, @QueryParam("timeout") Integer timeout, - @HeaderParam("x-ms-lease-id") String leaseId, @HeaderParam("x-ms-version") String version, - @HeaderParam("x-ms-client-request-id") String requestId, @HeaderParam("Accept") String accept, - Context context); + @UnexpectedResponseExceptionDetail(exceptionBodyClass = StorageError.class) + default void 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, + @HeaderParam("x-ms-version") String version, @HeaderParam("Accept") String accept) { + abortCopyFromURL(url, containerName, blob, comp, copyActionAbortConstant, copyId, null, null, version, null, + accept, null); + } @HttpRequestInformation( method = HttpMethod.PUT, path = "/{containerName}/{blob}", expectedStatusCodes = { 200, 202 }) - @UnexpectedResponseExceptionDetail - ResponseBase setTierSync(@HostParam("url") String url, - @PathParam("containerName") String containerName, @PathParam("blob") String blob, - @QueryParam("comp") String comp, @QueryParam("snapshot") String snapshot, + @UnexpectedResponseExceptionDetail(exceptionBodyClass = StorageError.class) + Response 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); + @HeaderParam("Accept") String accept, RequestOptions requestOptions); @HttpRequestInformation( method = HttpMethod.PUT, path = "/{containerName}/{blob}", expectedStatusCodes = { 200, 202 }) - @UnexpectedResponseExceptionDetail - 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); + @UnexpectedResponseExceptionDetail(exceptionBodyClass = StorageError.class) + default void setTier(@HostParam("url") String url, @PathParam("containerName") String containerName, + @PathParam("blob") String blob, @QueryParam("comp") String comp, + @HeaderParam("x-ms-access-tier") AccessTier tier, @HeaderParam("x-ms-version") String version, + @HeaderParam("Accept") String accept) { + setTier(url, containerName, blob, comp, null, null, null, tier, null, version, null, null, null, accept, + null); + } @HttpRequestInformation( method = HttpMethod.GET, path = "/{containerName}/{blob}", expectedStatusCodes = { 200 }) - @UnexpectedResponseExceptionDetail - ResponseBase getAccountInfoSync(@HostParam("url") String url, - @PathParam("containerName") String containerName, @PathParam("blob") String blob, - @QueryParam("restype") String restype, @QueryParam("comp") String comp, + @UnexpectedResponseExceptionDetail(exceptionBodyClass = StorageError.class) + Response 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); + RequestOptions requestOptions); @HttpRequestInformation( method = HttpMethod.GET, path = "/{containerName}/{blob}", expectedStatusCodes = { 200 }) - @UnexpectedResponseExceptionDetail - 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); + @UnexpectedResponseExceptionDetail(exceptionBodyClass = StorageError.class) + default void getAccountInfo(@HostParam("url") String url, @PathParam("containerName") String containerName, + @PathParam("blob") String blob, @QueryParam("restype") String restype, @QueryParam("comp") String comp, + @HeaderParam("x-ms-version") String version, @HeaderParam("Accept") String accept) { + getAccountInfo(url, containerName, blob, restype, comp, null, version, null, accept, null); + } @HttpRequestInformation( method = HttpMethod.POST, path = "/{containerName}/{blob}", expectedStatusCodes = { 200, 206 }) - @UnexpectedResponseExceptionDetail - ResponseBase querySync(@HostParam("url") String url, - @PathParam("containerName") String containerName, @PathParam("blob") String blob, - @QueryParam("comp") String comp, @QueryParam("snapshot") String snapshot, + @UnexpectedResponseExceptionDetail(exceptionBodyClass = StorageError.class) + Response 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, @@ -834,89 +711,75 @@ ResponseBase querySync(@HostParam("url") String @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); + RequestOptions requestOptions); @HttpRequestInformation( method = HttpMethod.POST, path = "/{containerName}/{blob}", expectedStatusCodes = { 200, 206 }) - @UnexpectedResponseExceptionDetail - 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); + @UnexpectedResponseExceptionDetail(exceptionBodyClass = StorageError.class) + default InputStream query(@HostParam("url") String url, @PathParam("containerName") String containerName, + @PathParam("blob") String blob, @QueryParam("comp") String comp, + @HeaderParam("x-ms-version") String version, @HeaderParam("Accept") String accept) { + return query(url, containerName, blob, comp, null, null, null, null, null, null, null, null, null, null, + null, version, null, null, accept, null).getValue(); + } @HttpRequestInformation( method = HttpMethod.GET, path = "/{containerName}/{blob}", expectedStatusCodes = { 200 }) - @UnexpectedResponseExceptionDetail - ResponseBase getTagsSync(@HostParam("url") String url, - @PathParam("containerName") String containerName, @PathParam("blob") String blob, - @QueryParam("comp") String comp, @QueryParam("timeout") Integer timeout, + @UnexpectedResponseExceptionDetail(exceptionBodyClass = StorageError.class) + Response getTags(@HostParam("url") String url, @PathParam("containerName") String containerName, + @PathParam("blob") String blob, @QueryParam("comp") String comp, @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, @QueryParam("snapshot") String snapshot, @QueryParam("versionid") String versionId, @HeaderParam("x-ms-if-tags") String ifTags, @HeaderParam("x-ms-lease-id") String leaseId, - @HeaderParam("Accept") String accept, Context context); + @HeaderParam("Accept") String accept, RequestOptions requestOptions); @HttpRequestInformation( method = HttpMethod.GET, path = "/{containerName}/{blob}", expectedStatusCodes = { 200 }) - @UnexpectedResponseExceptionDetail - Response getTagsNoCustomHeadersSync(@HostParam("url") String url, - @PathParam("containerName") String containerName, @PathParam("blob") String blob, - @QueryParam("comp") String comp, @QueryParam("timeout") Integer timeout, - @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, - @QueryParam("snapshot") String snapshot, @QueryParam("versionid") String versionId, - @HeaderParam("x-ms-if-tags") String ifTags, @HeaderParam("x-ms-lease-id") String leaseId, - @HeaderParam("Accept") String accept, Context context); + @UnexpectedResponseExceptionDetail(exceptionBodyClass = StorageError.class) + default BlobTags getTags(@HostParam("url") String url, @PathParam("containerName") String containerName, + @PathParam("blob") String blob, @QueryParam("comp") String comp, + @HeaderParam("x-ms-version") String version, @HeaderParam("Accept") String accept) { + return getTags(url, containerName, blob, comp, null, version, null, null, null, null, null, accept, null) + .getValue(); + } @HttpRequestInformation( method = HttpMethod.PUT, path = "/{containerName}/{blob}", expectedStatusCodes = { 204 }) - @UnexpectedResponseExceptionDetail - 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, + @UnexpectedResponseExceptionDetail(exceptionBodyClass = StorageError.class) + Response setTags(@HostParam("url") String url, @PathParam("containerName") String containerName, + @PathParam("blob") String blob, @QueryParam("comp") String comp, + @HeaderParam("x-ms-version") String version, @QueryParam("timeout") Integer timeout, + @QueryParam("versionid") String versionId, @HeaderParam("Content-MD5") String transactionalContentMD5, @HeaderParam("x-ms-content-crc64") String transactionalContentCrc64, @HeaderParam("x-ms-client-request-id") String requestId, @HeaderParam("x-ms-if-tags") String ifTags, @HeaderParam("x-ms-lease-id") String leaseId, @BodyParam("application/xml") BlobTags tags, - @HeaderParam("Accept") String accept, Context context); + @HeaderParam("Accept") String accept, RequestOptions requestOptions); @HttpRequestInformation( method = HttpMethod.PUT, path = "/{containerName}/{blob}", expectedStatusCodes = { 204 }) - @UnexpectedResponseExceptionDetail - Response setTagsNoCustomHeadersSync(@HostParam("url") String url, - @PathParam("containerName") String containerName, @PathParam("blob") String blob, - @QueryParam("comp") String comp, @HeaderParam("x-ms-version") String version, - @QueryParam("timeout") Integer timeout, @QueryParam("versionid") String versionId, - @HeaderParam("Content-MD5") String transactionalContentMD5, - @HeaderParam("x-ms-content-crc64") String transactionalContentCrc64, - @HeaderParam("x-ms-client-request-id") String requestId, @HeaderParam("x-ms-if-tags") String ifTags, - @HeaderParam("x-ms-lease-id") String leaseId, @BodyParam("application/xml") BlobTags tags, - @HeaderParam("Accept") String accept, Context context); + @UnexpectedResponseExceptionDetail(exceptionBodyClass = StorageError.class) + default void setTags(@HostParam("url") String url, @PathParam("containerName") String containerName, + @PathParam("blob") String blob, @QueryParam("comp") String comp, + @HeaderParam("x-ms-version") String version, @HeaderParam("Accept") String accept) { + setTags(url, containerName, blob, comp, version, null, null, null, null, null, null, null, null, accept, + null); + } } /** * 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 @@ -946,18 +809,17 @@ Response setTagsNoCustomHeadersSync(@HostParam("url") String url, * @param requestId Provides a 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. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws StorageErrorException thrown if the request is rejected by server. + * @throws HttpResponseException thrown if the service returns an error. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response body along with {@link ResponseBase}. + * @return the response. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ResponseBase downloadWithResponse(String containerName, String blob, - String snapshot, String versionId, Integer timeout, String range, String leaseId, Boolean rangeGetContentMD5, + public Response 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) { + CpkInfo cpkInfo, RequestOptions requestOptions) { final String accept = "application/xml"; String encryptionKeyInternal = null; if (cpkInfo != null) { @@ -978,16 +840,16 @@ public ResponseBase downloadWithResponse(Stri = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); DateTimeRfc1123 ifUnmodifiedSinceConverted = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - return service.downloadSync(this.client.getUrl(), containerName, blob, snapshot, versionId, timeout, range, - leaseId, rangeGetContentMD5, rangeGetContentCRC64, structuredBodyType, encryptionKey, encryptionKeySha256, + 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); + this.client.getVersion(), requestId, accept, requestOptions); } /** * 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 @@ -1018,95 +880,23 @@ public ResponseBase downloadWithResponse(Stri * analytics logs when storage analytics logging is enabled. * @param cpkInfo Parameter group. * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws StorageErrorException thrown if the request is rejected by server. + * @throws HttpResponseException thrown if the service returns an error. * @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) { return downloadWithResponse(containerName, blob, snapshot, versionId, timeout, range, leaseId, rangeGetContentMD5, rangeGetContentCRC64, structuredBodyType, ifModifiedSince, ifUnmodifiedSince, ifMatch, - ifNoneMatch, ifTags, requestId, cpkInfo, Context.none()).getValue(); - } - - /** - * The Download operation reads or downloads a blob from the system, including its metadata and properties. You can - * also call Download to read a snapshot or version. - * - * @param containerName The container name. - * @param blob The blob name. - * @param snapshot The snapshot parameter is an opaque DateTime value that, when present, specifies the blob - * snapshot to retrieve. For more information on working with blob snapshots, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/creating-a-snapshot-of-a-blob">Creating - * a Snapshot of a Blob.</a>. - * @param versionId The version id parameter is an opaque DateTime value that, when present, specifies the version - * of the blob to operate on. It's for service version 2019-10-10 and newer. - * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. - * @param 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 StorageErrorException 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 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) { - 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); + ifNoneMatch, ifTags, requestId, cpkInfo, RequestOptions.none()).getValue(); } /** * The Get Properties operation returns all user-defined metadata, standard HTTP properties, and system properties * for the blob. It does not return the content of the blob. - * + * * @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 @@ -1129,17 +919,16 @@ public Response downloadNoCustomHeadersWithResponse(String containe * @param requestId Provides a 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. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws StorageErrorException thrown if the request is rejected by server. + * @throws HttpResponseException thrown if the service returns an error. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link ResponseBase}. + * @return the response. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ResponseBase getPropertiesWithResponse(String containerName, String blob, - String snapshot, String versionId, Integer timeout, String leaseId, OffsetDateTime ifModifiedSince, + public Response 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) { + CpkInfo cpkInfo, RequestOptions requestOptions) { final String accept = "application/xml"; String encryptionKeyInternal = null; if (cpkInfo != null) { @@ -1160,16 +949,16 @@ public ResponseBase getPropertiesWithResponse(S = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); DateTimeRfc1123 ifUnmodifiedSinceConverted = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - return service.getPropertiesSync(this.client.getUrl(), containerName, blob, snapshot, versionId, timeout, - leaseId, encryptionKey, encryptionKeySha256, encryptionAlgorithm, ifModifiedSinceConverted, + 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); + requestOptions); } /** * 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 @@ -1193,78 +982,14 @@ public ResponseBase getPropertiesWithResponse(S * analytics logs when storage analytics logging is enabled. * @param cpkInfo Parameter group. * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws StorageErrorException thrown if the request is rejected by server. + * @throws HttpResponseException thrown if the service returns an error. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ - @ServiceMethod(returns = ReturnType.SINGLE) public void getProperties(String containerName, String blob, String snapshot, String versionId, Integer timeout, String leaseId, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, String ifTags, String requestId, CpkInfo cpkInfo) { getPropertiesWithResponse(containerName, blob, snapshot, versionId, timeout, leaseId, ifModifiedSince, - ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, requestId, cpkInfo, Context.none()); - } - - /** - * The Get Properties operation returns all user-defined metadata, standard HTTP properties, and system properties - * for the blob. It does not return the content of the blob. - * - * @param containerName The container name. - * @param blob The blob name. - * @param snapshot The snapshot parameter is an opaque DateTime value that, when present, specifies the blob - * snapshot to retrieve. For more information on working with blob snapshots, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/creating-a-snapshot-of-a-blob">Creating - * a Snapshot of a Blob.</a>. - * @param versionId The version id parameter is an opaque DateTime value that, when present, specifies the version - * of the blob to operate on. It's for service version 2019-10-10 and newer. - * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. - * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. - * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the - * specified date/time. - * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since - * the specified date/time. - * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. - * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. - * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. - * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. - * @param cpkInfo Parameter group. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws StorageErrorException 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 Response getPropertiesNoCustomHeadersWithResponse(String containerName, String blob, String snapshot, - String versionId, Integer timeout, String leaseId, OffsetDateTime ifModifiedSince, - OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, String ifTags, String requestId, - CpkInfo cpkInfo, Context context) { - final String accept = "application/xml"; - String encryptionKeyInternal = null; - if (cpkInfo != null) { - encryptionKeyInternal = cpkInfo.getEncryptionKey(); - } - String encryptionKey = encryptionKeyInternal; - String encryptionKeySha256Internal = null; - if (cpkInfo != null) { - encryptionKeySha256Internal = cpkInfo.getEncryptionKeySha256(); - } - String encryptionKeySha256 = encryptionKeySha256Internal; - EncryptionAlgorithmType encryptionAlgorithmInternal = null; - if (cpkInfo != null) { - encryptionAlgorithmInternal = cpkInfo.getEncryptionAlgorithm(); - } - EncryptionAlgorithmType encryptionAlgorithm = encryptionAlgorithmInternal; - DateTimeRfc1123 ifModifiedSinceConverted - = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); - DateTimeRfc1123 ifUnmodifiedSinceConverted - = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - return service.getPropertiesNoCustomHeadersSync(this.client.getUrl(), containerName, blob, snapshot, versionId, - timeout, leaseId, encryptionKey, encryptionKeySha256, encryptionAlgorithm, ifModifiedSinceConverted, - ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, this.client.getVersion(), requestId, accept, - context); + ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, requestId, cpkInfo, RequestOptions.none()); } /** @@ -1283,7 +1008,7 @@ public Response getPropertiesNoCustomHeadersWithResponse(String containerN * 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 @@ -1310,25 +1035,24 @@ public Response getPropertiesNoCustomHeadersWithResponse(String containerN * analytics logs when storage analytics logging is enabled. * @param blobDeleteType Optional. Only possible value is 'permanent', which specifies to permanently delete a blob * if blob soft delete is enabled. - * @param context The context to associate with this operation. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws StorageErrorException thrown if the request is rejected by server. + * @throws HttpResponseException thrown if the service returns an error. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link ResponseBase}. + * @return the response. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ResponseBase deleteWithResponse(String containerName, String blob, String snapshot, - String versionId, Integer timeout, String leaseId, DeleteSnapshotsOptionType deleteSnapshots, - OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, - String ifTags, String requestId, BlobDeleteType blobDeleteType, Context context) { + public Response 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, RequestOptions requestOptions) { final String accept = "application/xml"; DateTimeRfc1123 ifModifiedSinceConverted = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); DateTimeRfc1123 ifUnmodifiedSinceConverted = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - return service.deleteSync(this.client.getUrl(), containerName, blob, snapshot, versionId, timeout, leaseId, + return service.delete(this.client.getUrl(), containerName, blob, snapshot, versionId, timeout, leaseId, deleteSnapshots, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, - this.client.getVersion(), requestId, blobDeleteType, accept, context); + this.client.getVersion(), requestId, blobDeleteType, accept, requestOptions); } /** @@ -1347,7 +1071,7 @@ public ResponseBase deleteWithResponse(String containe * automatic snapshot using snapshot timestamp or version id. You can restore the blob by calling Put or Copy Blob * API with automatic snapshot as source. Deleting automatic snapshot requires shared key or special SAS/RBAC * permissions. - * + * * @param containerName The container name. * @param blob The blob name. * @param snapshot The snapshot parameter is an opaque DateTime value that, when present, specifies the blob @@ -1375,85 +1099,20 @@ public ResponseBase deleteWithResponse(String containe * @param blobDeleteType Optional. Only possible value is 'permanent', which specifies to permanently delete a blob * if blob soft delete is enabled. * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws StorageErrorException thrown if the request is rejected by server. + * @throws HttpResponseException thrown if the service returns an error. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ - @ServiceMethod(returns = ReturnType.SINGLE) public void delete(String containerName, String blob, String snapshot, String versionId, Integer timeout, String leaseId, DeleteSnapshotsOptionType deleteSnapshots, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, String ifTags, String requestId, BlobDeleteType blobDeleteType) { deleteWithResponse(containerName, blob, snapshot, versionId, timeout, leaseId, deleteSnapshots, ifModifiedSince, - ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, requestId, blobDeleteType, Context.none()); - } - - /** - * If the storage account's soft delete feature is disabled then, when a blob is deleted, it is permanently removed - * from the storage account. If the storage account's soft delete feature is enabled, then, when a blob is deleted, - * it is marked for deletion and becomes inaccessible immediately. However, the blob service retains the blob or - * snapshot for the number of days specified by the DeleteRetentionPolicy section of [Storage service properties] - * (Set-Blob-Service-Properties.md). After the specified number of days has passed, the blob's data is permanently - * removed from the storage account. Note that you continue to be charged for the soft-deleted blob's storage until - * it is permanently removed. Use the List Blobs API and specify the "include=deleted" query parameter to discover - * which blobs and snapshots have been soft deleted. You can then use the Undelete Blob API to restore a - * soft-deleted blob. All other operations on a soft-deleted blob or snapshot causes the service to return an HTTP - * status code of 404 (ResourceNotFound). If the storage account's automatic snapshot feature is enabled, then, when - * a blob is deleted, an automatic snapshot is created. The blob becomes inaccessible immediately. All other - * operations on the blob causes the service to return an HTTP status code of 404 (ResourceNotFound). You can access - * automatic snapshot using snapshot timestamp or version id. You can restore the blob by calling Put or Copy Blob - * API with automatic snapshot as source. Deleting automatic snapshot requires shared key or special SAS/RBAC - * permissions. - * - * @param containerName The container name. - * @param blob The blob name. - * @param snapshot The snapshot parameter is an opaque DateTime value that, when present, specifies the blob - * snapshot to retrieve. For more information on working with blob snapshots, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/creating-a-snapshot-of-a-blob">Creating - * a Snapshot of a Blob.</a>. - * @param versionId The version id parameter is an opaque DateTime value that, when present, specifies the version - * of the blob to operate on. It's for service version 2019-10-10 and newer. - * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. - * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. - * @param deleteSnapshots Required if the blob has associated snapshots. Specify one of the following two options: - * include: Delete the base blob and all of its snapshots. only: Delete only the blob's snapshots and not the blob - * itself. - * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the - * specified date/time. - * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since - * the specified date/time. - * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. - * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. - * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. - * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. - * @param blobDeleteType Optional. Only possible value is 'permanent', which specifies to permanently delete a blob - * if blob soft delete is enabled. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws StorageErrorException 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 Response deleteNoCustomHeadersWithResponse(String containerName, String blob, String snapshot, - String versionId, Integer timeout, String leaseId, DeleteSnapshotsOptionType deleteSnapshots, - OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, - String ifTags, String requestId, BlobDeleteType blobDeleteType, Context context) { - final String accept = "application/xml"; - DateTimeRfc1123 ifModifiedSinceConverted - = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); - DateTimeRfc1123 ifUnmodifiedSinceConverted - = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - return service.deleteNoCustomHeadersSync(this.client.getUrl(), containerName, blob, snapshot, versionId, - timeout, leaseId, deleteSnapshots, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, - ifNoneMatch, ifTags, this.client.getVersion(), requestId, blobDeleteType, accept, context); + ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, requestId, blobDeleteType, RequestOptions.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 @@ -1461,24 +1120,23 @@ public Response deleteNoCustomHeadersWithResponse(String containerName, St * Timeouts for Blob Service Operations.</a>. * @param requestId Provides a 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. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws StorageErrorException thrown if the request is rejected by server. + * @throws HttpResponseException thrown if the service returns an error. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link ResponseBase}. + * @return the response. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ResponseBase undeleteWithResponse(String containerName, String blob, - Integer timeout, String requestId, Context context) { + public Response undeleteWithResponse(String containerName, String blob, Integer timeout, String requestId, + RequestOptions requestOptions) { 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); + return service.undelete(this.client.getUrl(), containerName, blob, comp, timeout, this.client.getVersion(), + requestId, accept, requestOptions); } /** * 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 @@ -1487,42 +1145,16 @@ public ResponseBase undeleteWithResponse(String cont * @param requestId Provides 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 StorageErrorException thrown if the request is rejected by server. + * @throws HttpResponseException thrown if the service returns an error. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ - @ServiceMethod(returns = ReturnType.SINGLE) public void undelete(String containerName, String blob, Integer timeout, String requestId) { - undeleteWithResponse(containerName, blob, timeout, requestId, Context.none()); - } - - /** - * Undelete a blob that was previously soft deleted. - * - * @param containerName The container name. - * @param blob The blob name. - * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. - * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws StorageErrorException 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 Response undeleteNoCustomHeadersWithResponse(String containerName, String blob, Integer timeout, - String requestId, Context context) { - final String comp = "undelete"; - final String accept = "application/xml"; - return service.undeleteNoCustomHeadersSync(this.client.getUrl(), containerName, blob, comp, timeout, - this.client.getVersion(), requestId, accept, context); + undeleteWithResponse(containerName, blob, timeout, requestId, RequestOptions.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. @@ -1532,24 +1164,23 @@ public Response undeleteNoCustomHeadersWithResponse(String containerName, * @param requestId Provides a 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. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws StorageErrorException thrown if the request is rejected by server. + * @throws HttpResponseException thrown if the service returns an error. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link ResponseBase}. + * @return the response. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ResponseBase setExpiryWithResponse(String containerName, String blob, - BlobExpiryOptions expiryOptions, Integer timeout, String requestId, String expiresOn, Context context) { + public Response setExpiryWithResponse(String containerName, String blob, BlobExpiryOptions expiryOptions, + Integer timeout, String requestId, String expiresOn, RequestOptions requestOptions) { 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); + return service.setExpiry(this.client.getUrl(), containerName, blob, comp, timeout, this.client.getVersion(), + requestId, expiryOptions, expiresOn, accept, requestOptions); } /** * 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. @@ -1560,45 +1191,17 @@ public ResponseBase setExpiryWithResponse(String co * 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 StorageErrorException thrown if the request is rejected by server. + * @throws HttpResponseException thrown if the service returns an error. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ - @ServiceMethod(returns = ReturnType.SINGLE) public void setExpiry(String containerName, String blob, BlobExpiryOptions expiryOptions, Integer timeout, String requestId, String expiresOn) { - setExpiryWithResponse(containerName, blob, expiryOptions, timeout, requestId, expiresOn, Context.none()); - } - - /** - * Sets the time a blob will expire and be deleted. - * - * @param containerName The container name. - * @param blob The blob name. - * @param expiryOptions Required. Indicates mode of the expiry time. - * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. - * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. - * @param expiresOn The time to set the blob to expiry. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws StorageErrorException 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 Response setExpiryNoCustomHeadersWithResponse(String containerName, String blob, - BlobExpiryOptions expiryOptions, Integer timeout, String requestId, String expiresOn, Context context) { - final String comp = "expiry"; - final String accept = "application/xml"; - return service.setExpiryNoCustomHeadersSync(this.client.getUrl(), containerName, blob, comp, timeout, - this.client.getVersion(), requestId, expiryOptions, expiresOn, accept, context); + setExpiryWithResponse(containerName, blob, expiryOptions, timeout, requestId, expiresOn, RequestOptions.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 @@ -1615,17 +1218,15 @@ public Response setExpiryNoCustomHeadersWithResponse(String containerName, * @param requestId Provides a 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. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws StorageErrorException thrown if the request is rejected by server. + * @throws HttpResponseException thrown if the service returns an error. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link ResponseBase}. + * @return the response. */ - @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) { + public Response setHttpHeadersWithResponse(String containerName, String blob, Integer timeout, String leaseId, + OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, + String ifTags, String requestId, BlobHttpHeaders blobHttpHeaders, RequestOptions requestOptions) { final String comp = "properties"; final String accept = "application/xml"; String cacheControlInternal = null; @@ -1663,15 +1264,15 @@ public ResponseBase setHttpHeadersWithResponse = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); DateTimeRfc1123 ifUnmodifiedSinceConverted = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - return service.setHttpHeadersSync(this.client.getUrl(), containerName, blob, comp, timeout, cacheControl, + 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); + requestId, accept, requestOptions); } /** * 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 @@ -1689,92 +1290,19 @@ public ResponseBase setHttpHeadersWithResponse * analytics logs when storage analytics logging is enabled. * @param blobHttpHeaders Parameter group. * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws StorageErrorException thrown if the request is rejected by server. + * @throws HttpResponseException thrown if the service returns an error. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ - @ServiceMethod(returns = ReturnType.SINGLE) public void setHttpHeaders(String containerName, String blob, Integer timeout, String leaseId, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, String ifTags, String requestId, BlobHttpHeaders blobHttpHeaders) { setHttpHeadersWithResponse(containerName, blob, timeout, leaseId, ifModifiedSince, ifUnmodifiedSince, ifMatch, - ifNoneMatch, ifTags, requestId, blobHttpHeaders, Context.none()); - } - - /** - * The Set HTTP Headers operation sets system properties on the blob. - * - * @param containerName The container name. - * @param blob The blob name. - * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. - * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. - * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the - * specified date/time. - * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since - * the specified date/time. - * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. - * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. - * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. - * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. - * @param blobHttpHeaders Parameter group. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws StorageErrorException 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 Response setHttpHeadersNoCustomHeadersWithResponse(String containerName, String blob, Integer timeout, - String leaseId, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, - String ifNoneMatch, String ifTags, String requestId, BlobHttpHeaders blobHttpHeaders, Context context) { - final String comp = "properties"; - final String accept = "application/xml"; - String cacheControlInternal = null; - if (blobHttpHeaders != null) { - cacheControlInternal = blobHttpHeaders.getCacheControl(); - } - String cacheControl = cacheControlInternal; - String contentTypeInternal = null; - if (blobHttpHeaders != null) { - contentTypeInternal = blobHttpHeaders.getContentType(); - } - String contentType = contentTypeInternal; - byte[] contentMd5Internal = null; - if (blobHttpHeaders != null) { - contentMd5Internal = blobHttpHeaders.getContentMd5(); - } - byte[] contentMd5 = contentMd5Internal; - String contentEncodingInternal = null; - if (blobHttpHeaders != null) { - contentEncodingInternal = blobHttpHeaders.getContentEncoding(); - } - String contentEncoding = contentEncodingInternal; - String contentLanguageInternal = null; - if (blobHttpHeaders != null) { - contentLanguageInternal = blobHttpHeaders.getContentLanguage(); - } - String contentLanguage = contentLanguageInternal; - String contentDispositionInternal = null; - if (blobHttpHeaders != null) { - contentDispositionInternal = blobHttpHeaders.getContentDisposition(); - } - String contentDisposition = contentDispositionInternal; - String contentMd5Converted = Base64Util.encodeToString(contentMd5); - DateTimeRfc1123 ifModifiedSinceConverted - = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); - DateTimeRfc1123 ifUnmodifiedSinceConverted - = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - return service.setHttpHeadersNoCustomHeadersSync(this.client.getUrl(), containerName, blob, comp, timeout, - cacheControl, contentType, contentMd5Converted, contentEncoding, contentLanguage, leaseId, - ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, contentDisposition, - this.client.getVersion(), requestId, accept, context); + ifNoneMatch, ifTags, requestId, blobHttpHeaders, RequestOptions.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 @@ -1792,31 +1320,30 @@ public Response setHttpHeadersNoCustomHeadersWithResponse(String container * 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. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws StorageErrorException thrown if the request is rejected by server. + * @throws HttpResponseException thrown if the service returns an error. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link ResponseBase}. + * @return the response. */ - @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) { + public Response setImmutabilityPolicyWithResponse(String containerName, String blob, Integer timeout, + String requestId, OffsetDateTime ifUnmodifiedSince, OffsetDateTime immutabilityPolicyExpiry, + BlobImmutabilityPolicyMode immutabilityPolicyMode, String snapshot, String versionId, + RequestOptions requestOptions) { 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, + return service.setImmutabilityPolicy(this.client.getUrl(), containerName, blob, comp, timeout, this.client.getVersion(), requestId, ifUnmodifiedSinceConverted, immutabilityPolicyExpiryConverted, - immutabilityPolicyMode, snapshot, versionId, accept, context); + immutabilityPolicyMode, snapshot, versionId, accept, requestOptions); } /** * 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 @@ -1835,61 +1362,19 @@ public ResponseBase setImmutabilityPoli * @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 StorageErrorException thrown if the request is rejected by server. + * @throws HttpResponseException thrown if the service returns an error. * @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://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. - * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. - * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since - * the specified date/time. - * @param immutabilityPolicyExpiry Specifies the date time when the blobs immutability policy is set to expire. - * @param immutabilityPolicyMode Specifies the immutability policy mode to set on the blob. - * @param snapshot The snapshot parameter is an opaque DateTime value that, when present, specifies the blob - * snapshot to retrieve. For more information on working with blob snapshots, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/creating-a-snapshot-of-a-blob">Creating - * a Snapshot of a Blob.</a>. - * @param versionId The version id parameter is an opaque DateTime value that, when present, specifies the version - * of the blob to operate on. It's for service version 2019-10-10 and newer. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws StorageErrorException 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 Response setImmutabilityPolicyNoCustomHeadersWithResponse(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.setImmutabilityPolicyNoCustomHeadersSync(this.client.getUrl(), containerName, blob, comp, - timeout, this.client.getVersion(), requestId, ifUnmodifiedSinceConverted, immutabilityPolicyExpiryConverted, - immutabilityPolicyMode, snapshot, versionId, accept, context); + immutabilityPolicyExpiry, immutabilityPolicyMode, snapshot, versionId, RequestOptions.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 @@ -1903,25 +1388,23 @@ public Response setImmutabilityPolicyNoCustomHeadersWithResponse(String co * 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. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws StorageErrorException thrown if the request is rejected by server. + * @throws HttpResponseException thrown if the service returns an error. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link ResponseBase}. + * @return the response. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ResponseBase deleteImmutabilityPolicyWithResponse( - String containerName, String blob, Integer timeout, String requestId, String snapshot, String versionId, - Context context) { + public Response deleteImmutabilityPolicyWithResponse(String containerName, String blob, Integer timeout, + String requestId, String snapshot, String versionId, RequestOptions requestOptions) { 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); + return service.deleteImmutabilityPolicy(this.client.getUrl(), containerName, blob, comp, timeout, + this.client.getVersion(), requestId, snapshot, versionId, accept, requestOptions); } /** * 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 @@ -1936,50 +1419,18 @@ public ResponseBase deleteImmutabili * @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 StorageErrorException thrown if the request is rejected by server. + * @throws HttpResponseException thrown if the service returns an error. * @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://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. - * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. - * @param snapshot The snapshot parameter is an opaque DateTime value that, when present, specifies the blob - * snapshot to retrieve. For more information on working with blob snapshots, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/creating-a-snapshot-of-a-blob">Creating - * a Snapshot of a Blob.</a>. - * @param versionId The version id parameter is an opaque DateTime value that, when present, specifies the version - * of the blob to operate on. It's for service version 2019-10-10 and newer. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws StorageErrorException 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 Response deleteImmutabilityPolicyNoCustomHeadersWithResponse(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.deleteImmutabilityPolicyNoCustomHeadersSync(this.client.getUrl(), containerName, blob, comp, - timeout, this.client.getVersion(), requestId, snapshot, versionId, accept, context); + RequestOptions.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. @@ -1994,24 +1445,23 @@ public Response deleteImmutabilityPolicyNoCustomHeadersWithResponse(String * 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. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws StorageErrorException thrown if the request is rejected by server. + * @throws HttpResponseException thrown if the service returns an error. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link ResponseBase}. + * @return the response. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ResponseBase setLegalHoldWithResponse(String containerName, String blob, - boolean legalHold, Integer timeout, String requestId, String snapshot, String versionId, Context context) { + public Response setLegalHoldWithResponse(String containerName, String blob, boolean legalHold, + Integer timeout, String requestId, String snapshot, String versionId, RequestOptions requestOptions) { 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); + return service.setLegalHold(this.client.getUrl(), containerName, blob, comp, timeout, this.client.getVersion(), + requestId, legalHold, snapshot, versionId, accept, requestOptions); } /** * 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. @@ -2027,52 +1477,19 @@ public ResponseBase setLegalHoldWithResponse(Str * @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 StorageErrorException thrown if the request is rejected by server. + * @throws HttpResponseException thrown if the service returns an error. * @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://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. - * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. - * @param snapshot The snapshot parameter is an opaque DateTime value that, when present, specifies the blob - * snapshot to retrieve. For more information on working with blob snapshots, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/creating-a-snapshot-of-a-blob">Creating - * a Snapshot of a Blob.</a>. - * @param versionId The version id parameter is an opaque DateTime value that, when present, specifies the version - * of the blob to operate on. It's for service version 2019-10-10 and newer. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws StorageErrorException 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 Response setLegalHoldNoCustomHeadersWithResponse(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.setLegalHoldNoCustomHeadersSync(this.client.getUrl(), containerName, blob, comp, timeout, - this.client.getVersion(), requestId, legalHold, snapshot, versionId, accept, context); + RequestOptions.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 @@ -2096,17 +1513,16 @@ public Response setLegalHoldNoCustomHeadersWithResponse(String containerNa * 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. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws StorageErrorException thrown if the request is rejected by server. + * @throws HttpResponseException thrown if the service returns an error. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link ResponseBase}. + * @return the response. */ - @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) { + public Response 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, RequestOptions requestOptions) { final String comp = "metadata"; final String accept = "application/xml"; String encryptionKeyInternal = null; @@ -2133,16 +1549,16 @@ public ResponseBase setMetadataWithResponse(Strin = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); DateTimeRfc1123 ifUnmodifiedSinceConverted = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - return service.setMetadataSync(this.client.getUrl(), containerName, blob, comp, timeout, metadata, leaseId, + 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); + requestOptions); } /** * 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 @@ -2167,90 +1583,19 @@ public ResponseBase setMetadataWithResponse(Strin * @param cpkInfo Parameter group. * @param encryptionScopeParam Parameter group. * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws StorageErrorException thrown if the request is rejected by server. + * @throws HttpResponseException thrown if the service returns an error. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ - @ServiceMethod(returns = ReturnType.SINGLE) public void setMetadata(String containerName, String blob, Integer timeout, Map metadata, String leaseId, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, String ifTags, String requestId, CpkInfo cpkInfo, EncryptionScope encryptionScopeParam) { setMetadataWithResponse(containerName, blob, timeout, metadata, leaseId, ifModifiedSince, ifUnmodifiedSince, - ifMatch, ifNoneMatch, ifTags, requestId, cpkInfo, encryptionScopeParam, Context.none()); - } - - /** - * The Set Blob Metadata operation sets user-defined metadata for the specified blob as one or more name-value - * pairs. - * - * @param containerName The container name. - * @param blob The blob name. - * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. - * @param metadata Optional. Specifies a user-defined name-value pair associated with the blob. If no name-value - * pairs are specified, the operation will copy the metadata from the source blob or file to the destination blob. - * If one or more name-value pairs are specified, the destination blob is created with the specified metadata, and - * metadata is not copied from the source blob or file. Note that beginning with version 2009-09-19, metadata names - * must adhere to the naming rules for C# identifiers. See Naming and Referencing Containers, Blobs, and Metadata - * for more information. - * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. - * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the - * specified date/time. - * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since - * the specified date/time. - * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. - * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. - * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. - * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. - * @param cpkInfo Parameter group. - * @param encryptionScopeParam Parameter group. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws StorageErrorException 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 Response setMetadataNoCustomHeadersWithResponse(String containerName, String blob, Integer timeout, - Map metadata, String leaseId, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, - String ifMatch, String ifNoneMatch, String ifTags, String requestId, CpkInfo cpkInfo, - EncryptionScope encryptionScopeParam, Context context) { - final String comp = "metadata"; - final String accept = "application/xml"; - String encryptionKeyInternal = null; - if (cpkInfo != null) { - encryptionKeyInternal = cpkInfo.getEncryptionKey(); - } - String encryptionKey = encryptionKeyInternal; - String encryptionKeySha256Internal = null; - if (cpkInfo != null) { - encryptionKeySha256Internal = cpkInfo.getEncryptionKeySha256(); - } - String encryptionKeySha256 = encryptionKeySha256Internal; - EncryptionAlgorithmType encryptionAlgorithmInternal = null; - if (cpkInfo != null) { - encryptionAlgorithmInternal = cpkInfo.getEncryptionAlgorithm(); - } - EncryptionAlgorithmType encryptionAlgorithm = encryptionAlgorithmInternal; - String encryptionScopeInternal = null; - if (encryptionScopeParam != null) { - encryptionScopeInternal = encryptionScopeParam.getEncryptionScope(); - } - String encryptionScope = encryptionScopeInternal; - DateTimeRfc1123 ifModifiedSinceConverted - = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); - DateTimeRfc1123 ifUnmodifiedSinceConverted - = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - return service.setMetadataNoCustomHeadersSync(this.client.getUrl(), containerName, blob, comp, timeout, - metadata, leaseId, encryptionKey, encryptionKeySha256, encryptionAlgorithm, encryptionScope, - ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, - this.client.getVersion(), requestId, accept, context); + ifMatch, ifNoneMatch, ifTags, requestId, cpkInfo, encryptionScopeParam, RequestOptions.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 @@ -2271,17 +1616,15 @@ public Response setMetadataNoCustomHeadersWithResponse(String containerNam * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. * @param requestId Provides a 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. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws StorageErrorException thrown if the request is rejected by server. + * @throws HttpResponseException thrown if the service returns an error. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link ResponseBase}. + * @return the response. */ - @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) { + public Response acquireLeaseWithResponse(String containerName, String blob, Integer timeout, Integer duration, + String proposedLeaseId, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, + String ifNoneMatch, String ifTags, String requestId, RequestOptions requestOptions) { final String comp = "lease"; final String action = "acquire"; final String accept = "application/xml"; @@ -2289,14 +1632,14 @@ public ResponseBase acquireLeaseWithResponse(Str = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); DateTimeRfc1123 ifUnmodifiedSinceConverted = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - return service.acquireLeaseSync(this.client.getUrl(), containerName, blob, comp, action, timeout, duration, + return service.acquireLease(this.client.getUrl(), containerName, blob, comp, action, timeout, duration, proposedLeaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, - this.client.getVersion(), requestId, accept, context); + this.client.getVersion(), requestId, accept, requestOptions); } /** * [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 @@ -2318,65 +1661,19 @@ public ResponseBase acquireLeaseWithResponse(Str * @param requestId Provides 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 StorageErrorException thrown if the request is rejected by server. + * @throws HttpResponseException thrown if the service returns an error. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ - @ServiceMethod(returns = ReturnType.SINGLE) public void acquireLease(String containerName, String blob, Integer timeout, Integer duration, String proposedLeaseId, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, String ifTags, String requestId) { acquireLeaseWithResponse(containerName, blob, timeout, duration, proposedLeaseId, ifModifiedSince, - ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, requestId, Context.none()); - } - - /** - * [Update] The Lease Blob operation establishes and manages a lock on a blob for write and delete operations. - * - * @param containerName The container name. - * @param blob The blob name. - * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. - * @param duration Specifies the duration of the lease, in seconds, or negative one (-1) for a lease that never - * expires. A non-infinite lease can be between 15 and 60 seconds. A lease duration cannot be changed using renew or - * change. - * @param proposedLeaseId Proposed lease ID, in a GUID string format. The Blob service returns 400 (Invalid request) - * if the proposed lease ID is not in the correct format. See Guid Constructor (String) for a list of valid GUID - * string formats. - * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the - * specified date/time. - * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since - * the specified date/time. - * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. - * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. - * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. - * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws StorageErrorException 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 Response acquireLeaseNoCustomHeadersWithResponse(String containerName, String blob, Integer timeout, - Integer duration, String proposedLeaseId, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, - String ifMatch, String ifNoneMatch, String ifTags, String requestId, Context context) { - final String comp = "lease"; - final String action = "acquire"; - final String accept = "application/xml"; - 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); + ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, requestId, RequestOptions.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. @@ -2392,16 +1689,15 @@ public Response acquireLeaseNoCustomHeadersWithResponse(String containerNa * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. * @param requestId Provides a 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. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws StorageErrorException thrown if the request is rejected by server. + * @throws HttpResponseException thrown if the service returns an error. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link ResponseBase}. + * @return the response. */ - @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) { + public Response releaseLeaseWithResponse(String containerName, String blob, String leaseId, Integer timeout, + OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, + String ifTags, String requestId, RequestOptions requestOptions) { final String comp = "lease"; final String action = "release"; final String accept = "application/xml"; @@ -2409,14 +1705,14 @@ public ResponseBase releaseLeaseWithResponse(Str = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); DateTimeRfc1123 ifUnmodifiedSinceConverted = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - return service.releaseLeaseSync(this.client.getUrl(), containerName, blob, comp, action, timeout, leaseId, + return service.releaseLease(this.client.getUrl(), containerName, blob, comp, action, timeout, leaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, - this.client.getVersion(), requestId, accept, context); + this.client.getVersion(), requestId, accept, requestOptions); } /** * [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. @@ -2433,20 +1729,19 @@ public ResponseBase releaseLeaseWithResponse(Str * @param requestId Provides 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 StorageErrorException thrown if the request is rejected by server. + * @throws HttpResponseException thrown if the service returns an error. * @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()); + ifNoneMatch, ifTags, requestId, RequestOptions.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. @@ -2462,31 +1757,30 @@ public void releaseLease(String containerName, String blob, String leaseId, Inte * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. * @param requestId Provides a 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. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws StorageErrorException thrown if the request is rejected by server. + * @throws HttpResponseException thrown if the service returns an error. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the 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) { + public Response renewLeaseWithResponse(String containerName, String blob, String leaseId, Integer timeout, + OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, + String ifTags, String requestId, RequestOptions requestOptions) { final String comp = "lease"; - final String action = "release"; + 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.releaseLeaseNoCustomHeadersSync(this.client.getUrl(), containerName, blob, comp, action, timeout, - leaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, - this.client.getVersion(), requestId, accept, context); + return service.renewLease(this.client.getUrl(), containerName, blob, comp, action, timeout, leaseId, + ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, + this.client.getVersion(), requestId, accept, requestOptions); } /** * [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. @@ -2502,101 +1796,20 @@ public Response releaseLeaseNoCustomHeadersWithResponse(String containerNa * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. * @param requestId Provides a 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 StorageErrorException thrown if the request is rejected by server. + * @throws HttpResponseException thrown if the service returns an error. * @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) { - final String comp = "lease"; - final String action = "renew"; - final String accept = "application/xml"; - DateTimeRfc1123 ifModifiedSinceConverted - = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); - DateTimeRfc1123 ifUnmodifiedSinceConverted - = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - return service.renewLeaseSync(this.client.getUrl(), containerName, blob, comp, action, timeout, leaseId, - ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, - this.client.getVersion(), requestId, accept, context); - } - - /** - * [Update] The Lease Blob operation establishes and manages a lock on a blob for write and delete operations. - * - * @param containerName The container name. - * @param blob The blob name. - * @param leaseId Specifies the current lease ID on the resource. - * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. - * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the - * specified date/time. - * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since - * the specified date/time. - * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. - * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. - * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. - * @param requestId Provides 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 StorageErrorException 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()); + ifNoneMatch, ifTags, requestId, RequestOptions.none()); } /** * [Update] The Lease Blob operation establishes and manages a lock on a blob for write and delete operations. - * - * @param containerName The container name. - * @param blob The blob name. - * @param leaseId Specifies the current lease ID on the resource. - * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. - * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the - * specified date/time. - * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since - * the specified date/time. - * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. - * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. - * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. - * @param requestId Provides a 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 StorageErrorException 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 Response renewLeaseNoCustomHeadersWithResponse(String containerName, String blob, String leaseId, - Integer timeout, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, - String ifNoneMatch, String ifTags, String requestId, Context context) { - final String comp = "lease"; - final String action = "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); - } - - /** - * [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. @@ -2615,17 +1828,15 @@ public Response renewLeaseNoCustomHeadersWithResponse(String containerName * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. * @param requestId Provides a 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. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws StorageErrorException thrown if the request is rejected by server. + * @throws HttpResponseException thrown if the service returns an error. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link ResponseBase}. + * @return the response. */ - @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) { + public Response changeLeaseWithResponse(String containerName, String blob, String leaseId, + String proposedLeaseId, Integer timeout, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, + String ifMatch, String ifNoneMatch, String ifTags, String requestId, RequestOptions requestOptions) { final String comp = "lease"; final String action = "change"; final String accept = "application/xml"; @@ -2633,14 +1844,14 @@ public ResponseBase changeLeaseWithResponse(Strin = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); DateTimeRfc1123 ifUnmodifiedSinceConverted = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - return service.changeLeaseSync(this.client.getUrl(), containerName, blob, comp, action, timeout, leaseId, + return service.changeLease(this.client.getUrl(), containerName, blob, comp, action, timeout, leaseId, proposedLeaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, - this.client.getVersion(), requestId, accept, context); + this.client.getVersion(), requestId, accept, requestOptions); } /** * [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. @@ -2660,63 +1871,19 @@ public ResponseBase changeLeaseWithResponse(Strin * @param requestId Provides 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 StorageErrorException thrown if the request is rejected by server. + * @throws HttpResponseException thrown if the service returns an error. * @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://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. - * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the - * specified date/time. - * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since - * the specified date/time. - * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. - * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. - * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. - * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws StorageErrorException 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 Response changeLeaseNoCustomHeadersWithResponse(String containerName, String blob, String leaseId, - String proposedLeaseId, Integer timeout, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, - String ifMatch, String ifNoneMatch, String ifTags, String requestId, Context context) { - final String comp = "lease"; - final String action = "change"; - final String accept = "application/xml"; - DateTimeRfc1123 ifModifiedSinceConverted - = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); - DateTimeRfc1123 ifUnmodifiedSinceConverted - = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - return service.changeLeaseNoCustomHeadersSync(this.client.getUrl(), containerName, blob, comp, action, timeout, - leaseId, proposedLeaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, - ifTags, this.client.getVersion(), requestId, accept, context); + ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, requestId, RequestOptions.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 @@ -2737,16 +1904,15 @@ public Response changeLeaseNoCustomHeadersWithResponse(String containerNam * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. * @param requestId Provides a 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. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws StorageErrorException thrown if the request is rejected by server. + * @throws HttpResponseException thrown if the service returns an error. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link ResponseBase}. + * @return the response. */ - @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) { + public Response breakLeaseWithResponse(String containerName, String blob, Integer timeout, + Integer breakPeriod, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, + String ifNoneMatch, String ifTags, String requestId, RequestOptions requestOptions) { final String comp = "lease"; final String action = "break"; final String accept = "application/xml"; @@ -2754,14 +1920,14 @@ public ResponseBase breakLeaseWithResponse(String = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); DateTimeRfc1123 ifUnmodifiedSinceConverted = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - return service.breakLeaseSync(this.client.getUrl(), containerName, blob, comp, action, timeout, breakPeriod, + return service.breakLease(this.client.getUrl(), containerName, blob, comp, action, timeout, breakPeriod, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, - this.client.getVersion(), requestId, accept, context); + this.client.getVersion(), requestId, accept, requestOptions); } /** * [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 @@ -2783,65 +1949,19 @@ public ResponseBase breakLeaseWithResponse(String * @param requestId Provides 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 StorageErrorException thrown if the request is rejected by server. + * @throws HttpResponseException thrown if the service returns an error. * @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://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. - * @param breakPeriod For a break operation, proposed duration the lease should continue before it is broken, in - * seconds, between 0 and 60. This break period is only used if it is shorter than the time remaining on the lease. - * If longer, the time remaining on the lease is used. A new lease will not be available before the break period has - * expired, but the lease may be held for longer than the break period. If this header does not appear with a break - * operation, a fixed-duration lease breaks after the remaining lease period elapses, and an infinite lease breaks - * immediately. - * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the - * specified date/time. - * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since - * the specified date/time. - * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. - * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. - * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. - * @param requestId Provides a 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 StorageErrorException 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 Response breakLeaseNoCustomHeadersWithResponse(String containerName, String blob, Integer timeout, - Integer breakPeriod, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, - String ifNoneMatch, String ifTags, String requestId, Context context) { - final String comp = "lease"; - final String action = "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); + ifNoneMatch, ifTags, requestId, RequestOptions.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 @@ -2865,17 +1985,16 @@ public Response breakLeaseNoCustomHeadersWithResponse(String containerName * 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. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws StorageErrorException thrown if the request is rejected by server. + * @throws HttpResponseException thrown if the service returns an error. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link ResponseBase}. + * @return the response. */ - @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) { + public Response 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, RequestOptions requestOptions) { final String comp = "snapshot"; final String accept = "application/xml"; String encryptionKeyInternal = null; @@ -2902,15 +2021,15 @@ public ResponseBase createSnapshotWithResponse = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); DateTimeRfc1123 ifUnmodifiedSinceConverted = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - return service.createSnapshotSync(this.client.getUrl(), containerName, blob, comp, timeout, metadata, - encryptionKey, encryptionKeySha256, encryptionAlgorithm, encryptionScope, ifModifiedSinceConverted, + 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); + accept, requestOptions); } /** * 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 @@ -2935,89 +2054,19 @@ public ResponseBase createSnapshotWithResponse * @param cpkInfo Parameter group. * @param encryptionScopeParam Parameter group. * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws StorageErrorException thrown if the request is rejected by server. + * @throws HttpResponseException thrown if the service returns an error. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ - @ServiceMethod(returns = ReturnType.SINGLE) public void createSnapshot(String containerName, String blob, Integer timeout, Map metadata, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, String ifTags, String leaseId, String requestId, CpkInfo cpkInfo, EncryptionScope encryptionScopeParam) { createSnapshotWithResponse(containerName, blob, timeout, metadata, ifModifiedSince, ifUnmodifiedSince, ifMatch, - ifNoneMatch, ifTags, leaseId, requestId, cpkInfo, encryptionScopeParam, Context.none()); - } - - /** - * The Create Snapshot operation creates a read-only snapshot of a blob. - * - * @param containerName The container name. - * @param blob The blob name. - * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. - * @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 StorageErrorException 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 Response createSnapshotNoCustomHeadersWithResponse(String containerName, String blob, Integer timeout, - Map metadata, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, - String ifNoneMatch, String ifTags, String leaseId, String requestId, CpkInfo cpkInfo, - EncryptionScope encryptionScopeParam, Context context) { - final String comp = "snapshot"; - final String accept = "application/xml"; - String encryptionKeyInternal = null; - 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); + ifNoneMatch, ifTags, leaseId, requestId, cpkInfo, encryptionScopeParam, RequestOptions.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 @@ -3056,154 +2105,19 @@ public Response createSnapshotNoCustomHeadersWithResponse(String container * @param immutabilityPolicyExpiry Specifies the date time when the blobs immutability policy is set to expire. * @param immutabilityPolicyMode Specifies the immutability policy mode to set on the blob. * @param legalHold Specified if a legal hold should be set on the blob. - * @param context The context to associate with this operation. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws StorageErrorException thrown if 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) { - final String accept = "application/xml"; - DateTimeRfc1123 sourceIfModifiedSinceConverted - = sourceIfModifiedSince == null ? null : new DateTimeRfc1123(sourceIfModifiedSince); - DateTimeRfc1123 sourceIfUnmodifiedSinceConverted - = sourceIfUnmodifiedSince == null ? null : new DateTimeRfc1123(sourceIfUnmodifiedSince); - DateTimeRfc1123 ifModifiedSinceConverted - = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); - DateTimeRfc1123 ifUnmodifiedSinceConverted - = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - DateTimeRfc1123 immutabilityPolicyExpiryConverted - = immutabilityPolicyExpiry == null ? null : new DateTimeRfc1123(immutabilityPolicyExpiry); - return service.startCopyFromURLSync(this.client.getUrl(), containerName, blob, timeout, metadata, tier, - rehydratePriority, sourceIfModifiedSinceConverted, sourceIfUnmodifiedSinceConverted, sourceIfMatch, - sourceIfNoneMatch, sourceIfTags, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, - ifTags, copySource, leaseId, this.client.getVersion(), requestId, blobTagsString, sealBlob, - immutabilityPolicyExpiryConverted, immutabilityPolicyMode, legalHold, accept, context); - } - - /** - * The Start Copy From URL operation copies a blob or an internet resource to a new blob. - * - * @param containerName The container name. - * @param blob The blob name. - * @param copySource Specifies the name of the source page blob snapshot. This value is a URL of up to 2 KB in - * length that specifies a page blob snapshot. The value should be URL-encoded as it would appear in a request URI. - * The source blob must either be public or must be authenticated via a shared access signature. - * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. - * @param metadata Optional. Specifies a user-defined name-value pair associated with the blob. If no name-value - * pairs are specified, the operation will copy the metadata from the source blob or file to the destination blob. - * If one or more name-value pairs are specified, the destination blob is created with the specified metadata, and - * metadata is not copied from the source blob or file. Note that beginning with version 2009-09-19, metadata names - * must adhere to the naming rules for C# identifiers. See Naming and Referencing Containers, Blobs, and Metadata - * for more information. - * @param tier Optional. Indicates the tier to be set on the blob. - * @param rehydratePriority Optional: Indicates the priority with which to rehydrate an archived blob. - * @param sourceIfModifiedSince Specify this header value to operate only on a blob if it has been modified since - * the specified date/time. - * @param sourceIfUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified - * since the specified date/time. - * @param sourceIfMatch Specify an ETag value to operate only on blobs with a matching value. - * @param sourceIfNoneMatch Specify an ETag value to operate only on blobs without a matching value. - * @param sourceIfTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. - * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the - * specified date/time. - * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since - * the specified date/time. - * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. - * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. - * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. - * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. - * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. - * @param blobTagsString Optional. Used to set blob tags in various blob operations. - * @param sealBlob Overrides the sealed state of the destination blob. Service version 2019-12-12 and newer. - * @param immutabilityPolicyExpiry Specifies the date time when the blobs immutability policy is set to expire. - * @param immutabilityPolicyMode Specifies the immutability policy mode to set on the blob. - * @param legalHold Specified if a legal hold should be set on the blob. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws StorageErrorException thrown if the request is rejected by server. + * @throws HttpResponseException thrown if the service returns an error. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void startCopyFromURL(String containerName, String blob, String copySource, Integer timeout, - Map metadata, AccessTier tier, RehydratePriority rehydratePriority, + public Response 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) { - 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://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. - * @param metadata Optional. Specifies a user-defined name-value pair associated with the blob. If no name-value - * pairs are specified, the operation will copy the metadata from the source blob or file to the destination blob. - * If one or more name-value pairs are specified, the destination blob is created with the specified metadata, and - * metadata is not copied from the source blob or file. Note that beginning with version 2009-09-19, metadata names - * must adhere to the naming rules for C# identifiers. See Naming and Referencing Containers, Blobs, and Metadata - * for more information. - * @param tier Optional. Indicates the tier to be set on the blob. - * @param rehydratePriority Optional: Indicates the priority with which to rehydrate an archived blob. - * @param sourceIfModifiedSince Specify this header value to operate only on a blob if it has been modified since - * the specified date/time. - * @param sourceIfUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified - * since the specified date/time. - * @param sourceIfMatch Specify an ETag value to operate only on blobs with a matching value. - * @param sourceIfNoneMatch Specify an ETag value to operate only on blobs without a matching value. - * @param sourceIfTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. - * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the - * specified date/time. - * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since - * the specified date/time. - * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. - * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. - * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. - * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. - * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. - * @param blobTagsString Optional. Used to set blob tags in various blob operations. - * @param sealBlob Overrides the sealed state of the destination blob. Service version 2019-12-12 and newer. - * @param immutabilityPolicyExpiry Specifies the date time when the blobs immutability policy is set to expire. - * @param immutabilityPolicyMode Specifies the immutability policy mode to set on the blob. - * @param legalHold Specified if a legal hold should be set on the blob. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws StorageErrorException 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 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) { + Boolean legalHold, RequestOptions requestOptions) { final String accept = "application/xml"; DateTimeRfc1123 sourceIfModifiedSinceConverted = sourceIfModifiedSince == null ? null : new DateTimeRfc1123(sourceIfModifiedSince); @@ -3215,103 +2129,16 @@ public Response startCopyFromURLNoCustomHeadersWithResponse(String contain = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); DateTimeRfc1123 immutabilityPolicyExpiryConverted = immutabilityPolicyExpiry == null ? null : new DateTimeRfc1123(immutabilityPolicyExpiry); - return service.startCopyFromURLNoCustomHeadersSync(this.client.getUrl(), containerName, blob, timeout, metadata, - tier, rehydratePriority, sourceIfModifiedSinceConverted, sourceIfUnmodifiedSinceConverted, sourceIfMatch, + return service.startCopyFromURL(this.client.getUrl(), containerName, blob, timeout, metadata, tier, + rehydratePriority, sourceIfModifiedSinceConverted, sourceIfUnmodifiedSinceConverted, sourceIfMatch, sourceIfNoneMatch, sourceIfTags, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, copySource, leaseId, this.client.getVersion(), requestId, blobTagsString, sealBlob, - immutabilityPolicyExpiryConverted, immutabilityPolicyMode, legalHold, accept, context); - } - - /** - * The Copy From URL operation copies a blob or an internet resource to a new blob. It will not return a response - * until the copy is complete. - * - * @param containerName The container name. - * @param blob The blob name. - * @param copySource Specifies the name of the source page blob snapshot. This value is a URL of up to 2 KB in - * length that specifies a page blob snapshot. The value should be URL-encoded as it would appear in a request URI. - * The source blob must either be public or must be authenticated via a shared access signature. - * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. - * @param metadata Optional. Specifies a user-defined name-value pair associated with the blob. If no name-value - * pairs are specified, the operation will copy the metadata from the source blob or file to the destination blob. - * If one or more name-value pairs are specified, the destination blob is created with the specified metadata, and - * metadata is not copied from the source blob or file. Note that beginning with version 2009-09-19, metadata names - * must adhere to the naming rules for C# identifiers. See Naming and Referencing Containers, Blobs, and Metadata - * for more information. - * @param tier Optional. Indicates the tier to be set on the blob. - * @param sourceIfModifiedSince Specify this header value to operate only on a blob if it has been modified since - * the specified date/time. - * @param sourceIfUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified - * since the specified date/time. - * @param sourceIfMatch Specify an ETag value to operate only on blobs with a matching value. - * @param sourceIfNoneMatch Specify an ETag value to operate only on blobs without a matching value. - * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the - * specified date/time. - * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since - * the specified date/time. - * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. - * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. - * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. - * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. - * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. - * @param sourceContentMD5 Specify the md5 calculated for the range of bytes that must be read from the copy source. - * @param blobTagsString Optional. Used to set blob tags in various blob operations. - * @param immutabilityPolicyExpiry Specifies the date time when the blobs immutability policy is set to expire. - * @param immutabilityPolicyMode Specifies the immutability policy mode to set on the blob. - * @param legalHold Specified if a legal hold should be set on the blob. - * @param copySourceAuthorization Only Bearer type is supported. Credentials should be a valid OAuth access token to - * copy source. - * @param copySourceTags Optional, default 'replace'. Indicates if source tags should be copied or replaced with the - * tags specified by x-ms-tags. - * @param encryptionScopeParam Parameter group. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws StorageErrorException thrown if 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, EncryptionScope encryptionScopeParam, Context context) { - final String xMsRequiresSync = "true"; - final String accept = "application/xml"; - String encryptionScopeInternal = null; - if (encryptionScopeParam != null) { - encryptionScopeInternal = encryptionScopeParam.getEncryptionScope(); - } - String encryptionScope = encryptionScopeInternal; - DateTimeRfc1123 sourceIfModifiedSinceConverted - = sourceIfModifiedSince == null ? null : new DateTimeRfc1123(sourceIfModifiedSince); - DateTimeRfc1123 sourceIfUnmodifiedSinceConverted - = sourceIfUnmodifiedSince == null ? null : new DateTimeRfc1123(sourceIfUnmodifiedSince); - DateTimeRfc1123 ifModifiedSinceConverted - = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); - DateTimeRfc1123 ifUnmodifiedSinceConverted - = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - String sourceContentMD5Converted = Base64Util.encodeToString(sourceContentMD5); - DateTimeRfc1123 immutabilityPolicyExpiryConverted - = immutabilityPolicyExpiry == null ? null : new DateTimeRfc1123(immutabilityPolicyExpiry); - return service.copyFromURLSync(this.client.getUrl(), containerName, blob, xMsRequiresSync, timeout, metadata, - tier, sourceIfModifiedSinceConverted, sourceIfUnmodifiedSinceConverted, sourceIfMatch, sourceIfNoneMatch, - ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, copySource, leaseId, - this.client.getVersion(), requestId, sourceContentMD5Converted, blobTagsString, - immutabilityPolicyExpiryConverted, immutabilityPolicyMode, legalHold, copySourceAuthorization, - encryptionScope, copySourceTags, accept, context); + immutabilityPolicyExpiryConverted, immutabilityPolicyMode, legalHold, accept, requestOptions); } /** - * 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. - * + * 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 @@ -3327,12 +2154,14 @@ public ResponseBase copyFromURLWithResponse(Strin * 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 @@ -3343,39 +2172,32 @@ public ResponseBase copyFromURLWithResponse(Strin * @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 sealBlob Overrides the sealed state of the destination blob. Service version 2019-12-12 and newer. * @param immutabilityPolicyExpiry Specifies the date time when the blobs immutability policy is set to expire. * @param immutabilityPolicyMode Specifies the immutability policy mode to set on the blob. * @param legalHold Specified if a legal hold should be set on the blob. - * @param copySourceAuthorization Only Bearer type is supported. Credentials should be a valid OAuth access token to - * copy source. - * @param copySourceTags Optional, default 'replace'. Indicates if source tags should be copied or replaced with the - * tags specified by x-ms-tags. - * @param encryptionScopeParam Parameter group. * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws StorageErrorException thrown if the request is rejected by server. + * @throws HttpResponseException thrown if the service returns an error. * @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, EncryptionScope encryptionScopeParam) { - copyFromURLWithResponse(containerName, blob, copySource, timeout, metadata, tier, sourceIfModifiedSince, - sourceIfUnmodifiedSince, sourceIfMatch, sourceIfNoneMatch, ifModifiedSince, ifUnmodifiedSince, ifMatch, - ifNoneMatch, ifTags, leaseId, requestId, sourceContentMD5, blobTagsString, immutabilityPolicyExpiry, - immutabilityPolicyMode, legalHold, copySourceAuthorization, copySourceTags, encryptionScopeParam, - Context.none()); + 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, RequestOptions.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 @@ -3417,21 +2239,20 @@ public void copyFromURL(String containerName, String blob, String copySource, In * @param copySourceTags Optional, default 'replace'. Indicates if source tags should be copied or replaced with the * tags specified by x-ms-tags. * @param encryptionScopeParam Parameter group. - * @param context The context to associate with this operation. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws StorageErrorException thrown if the request is rejected by server. + * @throws HttpResponseException thrown if the service returns an error. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the response. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response copyFromURLNoCustomHeadersWithResponse(String containerName, String blob, String copySource, - Integer timeout, Map metadata, AccessTier tier, OffsetDateTime sourceIfModifiedSince, + public Response copyFromURLWithResponse(String containerName, String blob, String copySource, Integer timeout, + Map metadata, AccessTier tier, OffsetDateTime sourceIfModifiedSince, OffsetDateTime sourceIfUnmodifiedSince, String sourceIfMatch, String sourceIfNoneMatch, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, String ifTags, String leaseId, String requestId, byte[] sourceContentMD5, String blobTagsString, OffsetDateTime immutabilityPolicyExpiry, BlobImmutabilityPolicyMode immutabilityPolicyMode, Boolean legalHold, String copySourceAuthorization, BlobCopySourceTagsMode copySourceTags, EncryptionScope encryptionScopeParam, - Context context) { + RequestOptions requestOptions) { final String xMsRequiresSync = "true"; final String accept = "application/xml"; String encryptionScopeInternal = null; @@ -3450,47 +2271,81 @@ public Response copyFromURLNoCustomHeadersWithResponse(String containerNam String sourceContentMD5Converted = Base64Util.encodeToString(sourceContentMD5); DateTimeRfc1123 immutabilityPolicyExpiryConverted = immutabilityPolicyExpiry == null ? null : new DateTimeRfc1123(immutabilityPolicyExpiry); - return service.copyFromURLNoCustomHeadersSync(this.client.getUrl(), containerName, blob, xMsRequiresSync, - timeout, metadata, tier, sourceIfModifiedSinceConverted, sourceIfUnmodifiedSinceConverted, sourceIfMatch, - sourceIfNoneMatch, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, - copySource, leaseId, this.client.getVersion(), requestId, sourceContentMD5Converted, blobTagsString, + return service.copyFromURL(this.client.getUrl(), containerName, blob, xMsRequiresSync, timeout, metadata, tier, + sourceIfModifiedSinceConverted, sourceIfUnmodifiedSinceConverted, sourceIfMatch, sourceIfNoneMatch, + ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, copySource, leaseId, + this.client.getVersion(), requestId, sourceContentMD5Converted, blobTagsString, immutabilityPolicyExpiryConverted, immutabilityPolicyMode, legalHold, copySourceAuthorization, - encryptionScope, copySourceTags, accept, context); + encryptionScope, copySourceTags, accept, requestOptions); } /** - * The Abort Copy From URL operation aborts a pending Copy From URL operation, and leaves a destination blob with - * zero length and full metadata. - * + * 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 copyId The copy identifier provided in the x-ms-copy-id header of the original Copy Blob operation. + * @param copySource Specifies the name of the source page blob snapshot. This value is a URL of up to 2 KB in + * length that specifies a page blob snapshot. The value should be URL-encoded as it would appear in a request URI. + * The source blob must either be public or must be authenticated via a shared access signature. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting * Timeouts for Blob Service Operations.</a>. + * @param metadata Optional. Specifies a user-defined name-value pair associated with the blob. If no name-value + * pairs are specified, the operation will copy the metadata from the source blob or file to the destination blob. + * If one or more name-value pairs are specified, the destination blob is created with the specified metadata, and + * metadata is not copied from the source blob or file. Note that beginning with version 2009-09-19, metadata names + * must adhere to the naming rules for C# identifiers. See Naming and Referencing Containers, Blobs, and Metadata + * for more information. + * @param tier Optional. Indicates the tier to be set on the blob. + * @param sourceIfModifiedSince Specify this header value to operate only on a blob if it has been modified since + * the specified date/time. + * @param sourceIfUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified + * since the specified date/time. + * @param sourceIfMatch Specify an ETag value to operate only on blobs with a matching value. + * @param sourceIfNoneMatch Specify an ETag value to operate only on blobs without a matching value. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the + * specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since + * the specified date/time. + * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. + * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. + * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the * analytics logs when storage analytics logging is enabled. - * @param context The context to associate with this operation. + * @param sourceContentMD5 Specify the md5 calculated for the range of bytes that must be read from the copy source. + * @param blobTagsString Optional. Used to set blob tags in various blob operations. + * @param immutabilityPolicyExpiry Specifies the date time when the blobs immutability policy is set to expire. + * @param immutabilityPolicyMode Specifies the immutability policy mode to set on the blob. + * @param legalHold Specified if a legal hold should be set on the blob. + * @param copySourceAuthorization Only Bearer type is supported. Credentials should be a valid OAuth access token to + * copy source. + * @param copySourceTags Optional, default 'replace'. Indicates if source tags should be copied or replaced with the + * tags specified by x-ms-tags. + * @param encryptionScopeParam Parameter group. * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws StorageErrorException thrown if the request is rejected by server. + * @throws HttpResponseException thrown if the service returns an error. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link ResponseBase}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ResponseBase abortCopyFromURLWithResponse(String containerName, - String blob, String copyId, Integer timeout, String leaseId, String requestId, Context context) { - final String comp = "copy"; - final String copyActionAbortConstant = "abort"; - final String accept = "application/xml"; - return service.abortCopyFromURLSync(this.client.getUrl(), containerName, blob, comp, copyActionAbortConstant, - copyId, timeout, leaseId, this.client.getVersion(), requestId, accept, context); + public void copyFromURL(String containerName, String blob, String copySource, Integer timeout, + Map metadata, AccessTier tier, OffsetDateTime sourceIfModifiedSince, + OffsetDateTime sourceIfUnmodifiedSince, String sourceIfMatch, String sourceIfNoneMatch, + OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, + String ifTags, String leaseId, String requestId, byte[] sourceContentMD5, String blobTagsString, + OffsetDateTime immutabilityPolicyExpiry, BlobImmutabilityPolicyMode immutabilityPolicyMode, Boolean legalHold, + String copySourceAuthorization, BlobCopySourceTagsMode copySourceTags, EncryptionScope encryptionScopeParam) { + copyFromURLWithResponse(containerName, blob, copySource, timeout, metadata, tier, sourceIfModifiedSince, + sourceIfUnmodifiedSince, sourceIfMatch, sourceIfNoneMatch, ifModifiedSince, ifUnmodifiedSince, ifMatch, + ifNoneMatch, ifTags, leaseId, requestId, sourceContentMD5, blobTagsString, immutabilityPolicyExpiry, + immutabilityPolicyMode, legalHold, copySourceAuthorization, copySourceTags, encryptionScopeParam, + RequestOptions.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. @@ -3500,20 +2355,25 @@ public ResponseBase abortCopyFromURLWithResp * @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 requestOptions The options to configure the HTTP request before HTTP client sends it. * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws StorageErrorException thrown if the request is rejected by server. + * @throws HttpResponseException thrown if the service returns an error. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. */ - @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()); + public Response abortCopyFromURLWithResponse(String containerName, String blob, String copyId, + Integer timeout, String leaseId, String requestId, RequestOptions requestOptions) { + 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, requestOptions); } /** * 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. @@ -3523,20 +2383,13 @@ public void abortCopyFromURL(String containerName, String blob, String copyId, I * @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 StorageErrorException thrown if the request is rejected by server. + * @throws HttpResponseException thrown if the service returns an error. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response abortCopyFromURLNoCustomHeadersWithResponse(String containerName, String blob, String copyId, - Integer timeout, String leaseId, String requestId, Context context) { - final String comp = "copy"; - final String copyActionAbortConstant = "abort"; - final String accept = "application/xml"; - return service.abortCopyFromURLNoCustomHeadersSync(this.client.getUrl(), containerName, blob, comp, - copyActionAbortConstant, copyId, timeout, leaseId, this.client.getVersion(), requestId, accept, context); + public void abortCopyFromURL(String containerName, String blob, String copyId, Integer timeout, String leaseId, + String requestId) { + abortCopyFromURLWithResponse(containerName, blob, copyId, timeout, leaseId, requestId, RequestOptions.none()); } /** @@ -3544,7 +2397,7 @@ public Response abortCopyFromURLNoCustomHeadersWithResponse(String contain * 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. @@ -3562,20 +2415,19 @@ public Response abortCopyFromURLNoCustomHeadersWithResponse(String contain * 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. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws StorageErrorException thrown if the request is rejected by server. + * @throws HttpResponseException thrown if the service returns an error. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link ResponseBase}. + * @return the 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 setTierWithResponse(String containerName, String blob, AccessTier tier, String snapshot, + String versionId, Integer timeout, RehydratePriority rehydratePriority, String requestId, String leaseId, + String ifTags, RequestOptions requestOptions) { 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); + return service.setTier(this.client.getUrl(), containerName, blob, comp, snapshot, versionId, timeout, tier, + rehydratePriority, this.client.getVersion(), requestId, leaseId, ifTags, accept, requestOptions); } /** @@ -3583,7 +2435,7 @@ public ResponseBase setTierWithResponse(String contai * account and on a block blob in a blob storage account (locally redundant storage only). A premium page blob's * tier determines the allowed size, IOPS, and bandwidth of the blob. A block blob's tier determines * Hot/Cool/Archive storage type. This operation does not update the blob's ETag. - * + * * @param containerName The container name. * @param blob The blob name. * @param tier Indicates the tier to be set on the blob. @@ -3602,58 +2454,18 @@ public ResponseBase setTierWithResponse(String contai * @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 StorageErrorException thrown if the request is rejected by server. + * @throws HttpResponseException thrown if the service returns an error. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ - @ServiceMethod(returns = ReturnType.SINGLE) public void setTier(String containerName, String blob, AccessTier tier, String snapshot, String versionId, Integer timeout, RehydratePriority rehydratePriority, String requestId, String leaseId, String ifTags) { setTierWithResponse(containerName, blob, tier, snapshot, versionId, timeout, rehydratePriority, requestId, - leaseId, ifTags, Context.none()); - } - - /** - * The Set Tier operation sets the tier on a blob. The operation is allowed on a page blob in a premium storage - * account and on a block blob in a blob storage account (locally redundant storage only). A premium page blob's - * tier determines the allowed size, IOPS, and bandwidth of the blob. A block blob's tier determines - * Hot/Cool/Archive storage type. This operation does not update the blob's ETag. - * - * @param containerName The container name. - * @param blob The blob name. - * @param tier Indicates the tier to be set on the blob. - * @param snapshot The snapshot parameter is an opaque DateTime value that, when present, specifies the blob - * snapshot to retrieve. For more information on working with blob snapshots, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/creating-a-snapshot-of-a-blob">Creating - * a Snapshot of a Blob.</a>. - * @param versionId The version id parameter is an opaque DateTime value that, when present, specifies the version - * of the blob to operate on. It's for service version 2019-10-10 and newer. - * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. - * @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 StorageErrorException 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 Response setTierNoCustomHeadersWithResponse(String containerName, String blob, AccessTier tier, - String snapshot, String versionId, Integer timeout, RehydratePriority rehydratePriority, String requestId, - String leaseId, String ifTags, Context context) { - final String comp = "tier"; - final String accept = "application/xml"; - return service.setTierNoCustomHeadersSync(this.client.getUrl(), containerName, blob, comp, snapshot, versionId, - timeout, tier, rehydratePriority, this.client.getVersion(), requestId, leaseId, ifTags, accept, context); + leaseId, ifTags, RequestOptions.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 @@ -3661,25 +2473,24 @@ public Response setTierNoCustomHeadersWithResponse(String containerName, S * Timeouts for Blob Service Operations.</a>. * @param requestId Provides a 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. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws StorageErrorException thrown if the request is rejected by server. + * @throws HttpResponseException thrown if the service returns an error. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link ResponseBase}. + * @return the response. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ResponseBase getAccountInfoWithResponse(String containerName, String blob, - Integer timeout, String requestId, Context context) { + public Response getAccountInfoWithResponse(String containerName, String blob, Integer timeout, + String requestId, RequestOptions requestOptions) { 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); + return service.getAccountInfo(this.client.getUrl(), containerName, blob, restype, comp, timeout, + this.client.getVersion(), requestId, accept, requestOptions); } /** * 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 @@ -3688,43 +2499,16 @@ public ResponseBase getAccountInfoWithResponse * @param requestId Provides 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 StorageErrorException thrown if the request is rejected by server. + * @throws HttpResponseException thrown if the service returns an error. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ - @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://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. - * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws StorageErrorException 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 Response getAccountInfoNoCustomHeadersWithResponse(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.getAccountInfoNoCustomHeadersSync(this.client.getUrl(), containerName, blob, restype, comp, - timeout, this.client.getVersion(), requestId, accept, context); + getAccountInfoWithResponse(containerName, blob, timeout, requestId, RequestOptions.none()); } /** * 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 @@ -3746,17 +2530,16 @@ public Response getAccountInfoNoCustomHeadersWithResponse(String container * 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. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws StorageErrorException thrown if the request is rejected by server. + * @throws HttpResponseException thrown if the service returns an error. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response body along with {@link ResponseBase}. + * @return the 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 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, + RequestOptions requestOptions) { final String comp = "query"; final String accept = "application/xml"; String encryptionKeyInternal = null; @@ -3778,15 +2561,14 @@ public ResponseBase queryWithResponse(String con = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); DateTimeRfc1123 ifUnmodifiedSinceConverted = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - return service.querySync(this.client.getUrl(), containerName, blob, comp, snapshot, timeout, leaseId, - encryptionKey, encryptionKeySha256, encryptionAlgorithm, ifModifiedSinceConverted, - ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, this.client.getVersion(), requestId, queryRequest, - accept, context); + 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, requestOptions); } /** * 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 @@ -3809,83 +2591,20 @@ public ResponseBase queryWithResponse(String con * @param queryRequest the query request. * @param cpkInfo Parameter group. * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws StorageErrorException thrown if the request is rejected by server. + * @throws HttpResponseException thrown if the service returns an error. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the response. */ - @ServiceMethod(returns = ReturnType.SINGLE) public InputStream query(String containerName, String blob, String snapshot, Integer timeout, String leaseId, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, String ifTags, String requestId, QueryRequest queryRequest, CpkInfo cpkInfo) { return queryWithResponse(containerName, blob, snapshot, timeout, leaseId, ifModifiedSince, ifUnmodifiedSince, - ifMatch, ifNoneMatch, ifTags, requestId, queryRequest, cpkInfo, Context.none()).getValue(); - } - - /** - * The Query operation enables users to select/project on blob data by providing simple query expressions. - * - * @param containerName The container name. - * @param blob The blob name. - * @param snapshot The snapshot parameter is an opaque DateTime value that, when present, specifies the blob - * snapshot to retrieve. For more information on working with blob snapshots, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/creating-a-snapshot-of-a-blob">Creating - * a Snapshot of a Blob.</a>. - * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. - * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. - * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the - * specified date/time. - * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since - * the specified date/time. - * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. - * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. - * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. - * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. - * @param queryRequest the query request. - * @param cpkInfo Parameter group. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws StorageErrorException 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 Response queryNoCustomHeadersWithResponse(String containerName, String blob, String snapshot, - Integer timeout, String leaseId, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, - String ifMatch, String ifNoneMatch, String ifTags, String requestId, QueryRequest queryRequest, CpkInfo cpkInfo, - Context context) { - final String comp = "query"; - final String accept = "application/xml"; - String encryptionKeyInternal = null; - 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); + ifMatch, ifNoneMatch, ifTags, requestId, queryRequest, cpkInfo, RequestOptions.none()).getValue(); } /** * The Get Tags operation enables users to get the tags associated with a blob. - * + * * @param containerName The container name. * @param blob The blob name. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a @@ -3901,25 +2620,23 @@ public Response queryNoCustomHeadersWithResponse(String containerNa * of the blob to operate on. It's for service version 2019-10-10 and newer. * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. - * @param context The context to associate with this operation. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws StorageErrorException thrown if the request is rejected by server. + * @throws HttpResponseException thrown if the service returns an error. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return blob tags along with {@link ResponseBase}. + * @return blob tags. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ResponseBase getTagsWithResponse(String containerName, String blob, - Integer timeout, String requestId, String snapshot, String versionId, String ifTags, String leaseId, - Context context) { + public Response getTagsWithResponse(String containerName, String blob, Integer timeout, String requestId, + String snapshot, String versionId, String ifTags, String leaseId, RequestOptions requestOptions) { final String comp = "tags"; final String accept = "application/xml"; - return service.getTagsSync(this.client.getUrl(), containerName, blob, comp, timeout, this.client.getVersion(), - requestId, snapshot, versionId, ifTags, leaseId, accept, context); + return service.getTags(this.client.getUrl(), containerName, blob, comp, timeout, this.client.getVersion(), + requestId, snapshot, versionId, ifTags, leaseId, accept, requestOptions); } /** * 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 @@ -3936,53 +2653,19 @@ public ResponseBase getTagsWithResponse(String co * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws StorageErrorException thrown if the request is rejected by server. + * @throws HttpResponseException thrown if the service returns an error. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return blob tags. */ - @ServiceMethod(returns = ReturnType.SINGLE) public BlobTags getTags(String containerName, String blob, Integer timeout, String requestId, String snapshot, String versionId, String ifTags, String leaseId) { return getTagsWithResponse(containerName, blob, timeout, requestId, snapshot, versionId, ifTags, leaseId, - Context.none()).getValue(); - } - - /** - * The Get Tags operation enables users to get the tags associated with a blob. - * - * @param containerName The container name. - * @param blob The blob name. - * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. - * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. - * @param snapshot The snapshot parameter is an opaque DateTime value that, when present, specifies the blob - * snapshot to retrieve. For more information on working with blob snapshots, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/creating-a-snapshot-of-a-blob">Creating - * a Snapshot of a Blob.</a>. - * @param versionId The version id parameter is an opaque DateTime value that, when present, specifies the version - * of the blob to operate on. It's for service version 2019-10-10 and newer. - * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. - * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws StorageErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return blob tags. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getTagsNoCustomHeadersWithResponse(String containerName, String blob, Integer timeout, - String requestId, String snapshot, String versionId, String ifTags, String leaseId, Context context) { - final String comp = "tags"; - final String accept = "application/xml"; - return service.getTagsNoCustomHeadersSync(this.client.getUrl(), containerName, blob, comp, timeout, - this.client.getVersion(), requestId, snapshot, versionId, ifTags, leaseId, accept, context); + RequestOptions.none()).getValue(); } /** * 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 @@ -3997,28 +2680,27 @@ public Response getTagsNoCustomHeadersWithResponse(String containerNam * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. * @param tags Blob tags. - * @param context The context to associate with this operation. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws StorageErrorException thrown if the request is rejected by server. + * @throws HttpResponseException thrown if the service returns an error. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link ResponseBase}. + * @return the response. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ResponseBase setTagsWithResponse(String containerName, String blob, - Integer timeout, String versionId, byte[] transactionalContentMD5, byte[] transactionalContentCrc64, - String requestId, String ifTags, String leaseId, BlobTags tags, Context context) { + public Response setTagsWithResponse(String containerName, String blob, Integer timeout, String versionId, + byte[] transactionalContentMD5, byte[] transactionalContentCrc64, String requestId, String ifTags, + String leaseId, BlobTags tags, RequestOptions requestOptions) { final String comp = "tags"; final String accept = "application/xml"; String transactionalContentMD5Converted = Base64Util.encodeToString(transactionalContentMD5); String transactionalContentCrc64Converted = Base64Util.encodeToString(transactionalContentCrc64); - return service.setTagsSync(this.client.getUrl(), containerName, blob, comp, this.client.getVersion(), timeout, + return service.setTags(this.client.getUrl(), containerName, blob, comp, this.client.getVersion(), timeout, versionId, transactionalContentMD5Converted, transactionalContentCrc64Converted, requestId, ifTags, leaseId, - tags, accept, context); + tags, accept, requestOptions); } /** * 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 @@ -4034,50 +2716,13 @@ public ResponseBase setTagsWithResponse(String contai * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. * @param tags Blob tags. * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws StorageErrorException thrown if the request is rejected by server. + * @throws HttpResponseException thrown if the service returns an error. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ - @ServiceMethod(returns = ReturnType.SINGLE) public void setTags(String containerName, String blob, Integer timeout, String versionId, byte[] transactionalContentMD5, byte[] transactionalContentCrc64, String requestId, String ifTags, String leaseId, BlobTags tags) { setTagsWithResponse(containerName, blob, timeout, versionId, transactionalContentMD5, transactionalContentCrc64, - requestId, ifTags, leaseId, tags, Context.none()); - } - - /** - * The Set Tags operation enables users to set tags on a blob. - * - * @param containerName The container name. - * @param blob The blob name. - * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. - * @param versionId The version id parameter is an opaque DateTime value that, when present, specifies the version - * of the blob to operate on. It's for service version 2019-10-10 and newer. - * @param transactionalContentMD5 Specify the transactional md5 for the body, to be validated by the service. - * @param transactionalContentCrc64 Specify the transactional crc64 for the body, to be validated by the service. - * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. - * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. - * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. - * @param tags Blob tags. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws StorageErrorException 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 Response setTagsNoCustomHeadersWithResponse(String containerName, String blob, Integer timeout, - String versionId, byte[] transactionalContentMD5, byte[] transactionalContentCrc64, String requestId, - String ifTags, String leaseId, BlobTags tags, Context context) { - final String comp = "tags"; - final String accept = "application/xml"; - String transactionalContentMD5Converted = Base64Util.encodeToString(transactionalContentMD5); - String transactionalContentCrc64Converted = Base64Util.encodeToString(transactionalContentCrc64); - return service.setTagsNoCustomHeadersSync(this.client.getUrl(), containerName, blob, comp, - this.client.getVersion(), timeout, versionId, transactionalContentMD5Converted, - transactionalContentCrc64Converted, requestId, ifTags, leaseId, tags, accept, context); + requestId, ifTags, leaseId, tags, RequestOptions.none()); } } diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/implementation/BlockBlobsImpl.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/implementation/BlockBlobsImpl.java index e528e156bc7a..092cd907a0fc 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/implementation/BlockBlobsImpl.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/implementation/BlockBlobsImpl.java @@ -4,42 +4,36 @@ package com.azure.v2.storage.blob.implementation; -import com.azure.v2.core.annotation.ReturnType; -import com.azure.v2.core.annotation.ServiceMethod; -import com.azure.v2.core.http.rest.ResponseBase; import com.azure.v2.storage.blob.models.AccessTier; import com.azure.v2.storage.blob.models.BlobCopySourceTagsMode; import com.azure.v2.storage.blob.models.BlobHttpHeaders; import com.azure.v2.storage.blob.models.BlobImmutabilityPolicyMode; -import com.azure.v2.storage.blob.models.BlockBlobsCommitBlockListHeaders; -import com.azure.v2.storage.blob.models.BlockBlobsGetBlockListHeaders; -import com.azure.v2.storage.blob.models.BlockBlobsPutBlobFromUrlHeaders; -import com.azure.v2.storage.blob.models.BlockBlobsStageBlockFromURLHeaders; -import com.azure.v2.storage.blob.models.BlockBlobsStageBlockHeaders; -import com.azure.v2.storage.blob.models.BlockBlobsUploadHeaders; import com.azure.v2.storage.blob.models.BlockList; import com.azure.v2.storage.blob.models.BlockListType; import com.azure.v2.storage.blob.models.BlockLookupList; import com.azure.v2.storage.blob.models.CpkInfo; import com.azure.v2.storage.blob.models.EncryptionAlgorithmType; import com.azure.v2.storage.blob.models.EncryptionScope; -import com.azure.v2.storage.blob.models.StorageErrorException; -import io.clientcore.core.annotation.ServiceInterface; +import com.azure.v2.storage.blob.models.StorageError; +import io.clientcore.core.annotations.ServiceInterface; import io.clientcore.core.http.RestProxy; -import io.clientcore.core.http.annotation.BodyParam; -import io.clientcore.core.http.annotation.HeaderParam; -import io.clientcore.core.http.annotation.HostParam; -import io.clientcore.core.http.annotation.HttpRequestInformation; -import io.clientcore.core.http.annotation.PathParam; -import io.clientcore.core.http.annotation.QueryParam; -import io.clientcore.core.http.annotation.UnexpectedResponseExceptionDetail; +import io.clientcore.core.http.annotations.BodyParam; +import io.clientcore.core.http.annotations.HeaderParam; +import io.clientcore.core.http.annotations.HostParam; +import io.clientcore.core.http.annotations.HttpRequestInformation; +import io.clientcore.core.http.annotations.PathParam; +import io.clientcore.core.http.annotations.QueryParam; +import io.clientcore.core.http.annotations.UnexpectedResponseExceptionDetail; +import io.clientcore.core.http.exceptions.HttpResponseException; import io.clientcore.core.http.models.HttpMethod; +import io.clientcore.core.http.models.RequestOptions; import io.clientcore.core.http.models.Response; -import io.clientcore.core.util.Base64Util; -import io.clientcore.core.util.Context; -import io.clientcore.core.util.DateTimeRfc1123; -import io.clientcore.core.util.binarydata.BinaryData; - +import io.clientcore.core.http.pipeline.HttpPipeline; +import io.clientcore.core.models.binarydata.BinaryData; +import io.clientcore.core.serialization.ObjectSerializer; +import io.clientcore.core.utils.Base64Util; +import io.clientcore.core.utils.DateTimeRfc1123; +import java.lang.reflect.InvocationTargetException; import java.time.OffsetDateTime; import java.util.Map; @@ -59,7 +53,7 @@ public final class BlockBlobsImpl { /** * Initializes an instance of BlockBlobsImpl. - * + * * @param client the instance of the service client containing this operation class. */ BlockBlobsImpl(AzureBlobStorageImpl client) { @@ -73,15 +67,26 @@ public final class BlockBlobsImpl { */ @ServiceInterface(name = "AzureBlobStorageBloc", host = "{url}") public interface BlockBlobsService { + static BlockBlobsService getNewInstance(HttpPipeline pipeline, ObjectSerializer serializer) { + try { + Class clazz = Class.forName("com.azure.v2.storage.blob.implementation.BlockBlobsServiceImpl"); + return (BlockBlobsService) clazz.getMethod("getNewInstance", HttpPipeline.class, ObjectSerializer.class) + .invoke(null, pipeline, serializer); + } catch (ClassNotFoundException | NoSuchMethodException | IllegalAccessException + | InvocationTargetException e) { + throw new RuntimeException(e); + } + + } + @HttpRequestInformation( method = HttpMethod.PUT, path = "/{containerName}/{blob}", expectedStatusCodes = { 201 }) - @UnexpectedResponseExceptionDetail - 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, + @UnexpectedResponseExceptionDetail(exceptionBodyClass = StorageError.class) + Response 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, @@ -107,53 +112,30 @@ ResponseBase uploadSync(@HostParam("url") String @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); + RequestOptions requestOptions); @HttpRequestInformation( method = HttpMethod.PUT, path = "/{containerName}/{blob}", expectedStatusCodes = { 201 }) - @UnexpectedResponseExceptionDetail - 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); + @UnexpectedResponseExceptionDetail(exceptionBodyClass = StorageError.class) + default void upload(@HostParam("url") String url, @PathParam("containerName") String containerName, + @PathParam("blob") String blob, @HeaderParam("x-ms-blob-type") String blobType, + @HeaderParam("Content-Length") long contentLength, @HeaderParam("x-ms-version") String version, + @BodyParam("application/octet-stream") BinaryData body, @HeaderParam("Accept") String accept) { + upload(url, containerName, blob, blobType, null, null, contentLength, null, null, null, null, null, null, + null, null, null, null, null, null, null, null, null, null, null, null, version, null, null, null, null, + null, null, null, null, body, accept, null); + } @HttpRequestInformation( method = HttpMethod.PUT, path = "/{containerName}/{blob}", expectedStatusCodes = { 201 }) - @UnexpectedResponseExceptionDetail - 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, + @UnexpectedResponseExceptionDetail(exceptionBodyClass = StorageError.class) + Response 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, @@ -182,55 +164,29 @@ ResponseBase putBlobFromUrlSync(@HostPara @HeaderParam("x-ms-copy-source-blob-properties") Boolean copySourceBlobProperties, @HeaderParam("x-ms-copy-source-authorization") String copySourceAuthorization, @HeaderParam("x-ms-copy-source-tag-option") BlobCopySourceTagsMode copySourceTags, - @HeaderParam("Accept") String accept, Context context); + @HeaderParam("Accept") String accept, RequestOptions requestOptions); @HttpRequestInformation( method = HttpMethod.PUT, path = "/{containerName}/{blob}", expectedStatusCodes = { 201 }) - @UnexpectedResponseExceptionDetail - Response putBlobFromUrlNoCustomHeadersSync(@HostParam("url") String url, - @PathParam("containerName") String containerName, @PathParam("blob") String blob, - @HeaderParam("x-ms-blob-type") String blobType, @QueryParam("timeout") Integer timeout, - @HeaderParam("Content-MD5") String transactionalContentMD5, - @HeaderParam("Content-Length") long contentLength, - @HeaderParam("x-ms-blob-content-type") String contentType, - @HeaderParam("x-ms-blob-content-encoding") String contentEncoding, - @HeaderParam("x-ms-blob-content-language") String contentLanguage, - @HeaderParam("x-ms-blob-content-md5") String contentMd5, - @HeaderParam("x-ms-blob-cache-control") String cacheControl, - @HeaderParam("x-ms-meta-") Map metadata, @HeaderParam("x-ms-lease-id") String leaseId, - @HeaderParam("x-ms-blob-content-disposition") String contentDisposition, - @HeaderParam("x-ms-encryption-key") String encryptionKey, - @HeaderParam("x-ms-encryption-key-sha256") String encryptionKeySha256, - @HeaderParam("x-ms-encryption-algorithm") EncryptionAlgorithmType encryptionAlgorithm, - @HeaderParam("x-ms-encryption-scope") String encryptionScope, - @HeaderParam("x-ms-access-tier") AccessTier tier, - @HeaderParam("If-Modified-Since") DateTimeRfc1123 ifModifiedSince, - @HeaderParam("If-Unmodified-Since") DateTimeRfc1123 ifUnmodifiedSince, - @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch, - @HeaderParam("x-ms-if-tags") String ifTags, - @HeaderParam("x-ms-source-if-modified-since") DateTimeRfc1123 sourceIfModifiedSince, - @HeaderParam("x-ms-source-if-unmodified-since") DateTimeRfc1123 sourceIfUnmodifiedSince, - @HeaderParam("x-ms-source-if-match") String sourceIfMatch, - @HeaderParam("x-ms-source-if-none-match") String sourceIfNoneMatch, - @HeaderParam("x-ms-source-if-tags") String sourceIfTags, @HeaderParam("x-ms-version") String version, - @HeaderParam("x-ms-client-request-id") String requestId, - @HeaderParam("x-ms-source-content-md5") String sourceContentMD5, - @HeaderParam("x-ms-tags") String blobTagsString, @HeaderParam("x-ms-copy-source") String copySource, - @HeaderParam("x-ms-copy-source-blob-properties") Boolean copySourceBlobProperties, - @HeaderParam("x-ms-copy-source-authorization") String copySourceAuthorization, - @HeaderParam("x-ms-copy-source-tag-option") BlobCopySourceTagsMode copySourceTags, - @HeaderParam("Accept") String accept, Context context); + @UnexpectedResponseExceptionDetail(exceptionBodyClass = StorageError.class) + default void putBlobFromUrl(@HostParam("url") String url, @PathParam("containerName") String containerName, + @PathParam("blob") String blob, @HeaderParam("x-ms-blob-type") String blobType, + @HeaderParam("Content-Length") long contentLength, @HeaderParam("x-ms-version") String version, + @HeaderParam("x-ms-copy-source") String copySource, @HeaderParam("Accept") String accept) { + putBlobFromUrl(url, containerName, blob, blobType, null, null, contentLength, null, null, null, null, null, + null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, + null, version, null, null, null, copySource, null, null, null, accept, null); + } @HttpRequestInformation( method = HttpMethod.PUT, path = "/{containerName}/{blob}", expectedStatusCodes = { 201 }) - @UnexpectedResponseExceptionDetail - ResponseBase stageBlockSync(@HostParam("url") String url, - @PathParam("containerName") String containerName, @PathParam("blob") String blob, - @QueryParam("comp") String comp, @QueryParam("blockid") String blockId, + @UnexpectedResponseExceptionDetail(exceptionBodyClass = StorageError.class) + Response 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, @@ -242,37 +198,28 @@ ResponseBase stageBlockSync(@HostParam("url") @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); + RequestOptions requestOptions); @HttpRequestInformation( method = HttpMethod.PUT, path = "/{containerName}/{blob}", expectedStatusCodes = { 201 }) - @UnexpectedResponseExceptionDetail - 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); + @UnexpectedResponseExceptionDetail(exceptionBodyClass = StorageError.class) + default void 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("x-ms-version") String version, + @BodyParam("application/octet-stream") BinaryData body, @HeaderParam("Accept") String accept) { + stageBlock(url, containerName, blob, comp, blockId, contentLength, null, null, null, null, null, null, null, + null, version, null, null, null, body, accept, null); + } @HttpRequestInformation( method = HttpMethod.PUT, path = "/{containerName}/{blob}", expectedStatusCodes = { 201 }) - @UnexpectedResponseExceptionDetail - ResponseBase stageBlockFromURLSync(@HostParam("url") String url, - @PathParam("containerName") String containerName, @PathParam("blob") String blob, - @QueryParam("comp") String comp, @QueryParam("blockid") String blockId, + @UnexpectedResponseExceptionDetail(exceptionBodyClass = StorageError.class) + Response 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, @@ -287,40 +234,28 @@ ResponseBase stageBlockFromURLSync(@Ho @HeaderParam("x-ms-source-if-none-match") String sourceIfNoneMatch, @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, @HeaderParam("x-ms-copy-source-authorization") String copySourceAuthorization, - @HeaderParam("Accept") String accept, Context context); + @HeaderParam("Accept") String accept, RequestOptions requestOptions); @HttpRequestInformation( method = HttpMethod.PUT, path = "/{containerName}/{blob}", expectedStatusCodes = { 201 }) - @UnexpectedResponseExceptionDetail - Response stageBlockFromURLNoCustomHeadersSync(@HostParam("url") String url, - @PathParam("containerName") String containerName, @PathParam("blob") String blob, - @QueryParam("comp") String comp, @QueryParam("blockid") String blockId, + @UnexpectedResponseExceptionDetail(exceptionBodyClass = StorageError.class) + default void stageBlockFromURL(@HostParam("url") String url, @PathParam("containerName") String containerName, + @PathParam("blob") String blob, @QueryParam("comp") String comp, @QueryParam("blockid") String blockId, @HeaderParam("Content-Length") long contentLength, @HeaderParam("x-ms-copy-source") String sourceUrl, - @HeaderParam("x-ms-source-range") String sourceRange, - @HeaderParam("x-ms-source-content-md5") String sourceContentMD5, - @HeaderParam("x-ms-source-content-crc64") String sourceContentcrc64, @QueryParam("timeout") Integer timeout, - @HeaderParam("x-ms-encryption-key") String encryptionKey, - @HeaderParam("x-ms-encryption-key-sha256") String encryptionKeySha256, - @HeaderParam("x-ms-encryption-algorithm") EncryptionAlgorithmType encryptionAlgorithm, - @HeaderParam("x-ms-encryption-scope") String encryptionScope, @HeaderParam("x-ms-lease-id") String leaseId, - @HeaderParam("x-ms-source-if-modified-since") DateTimeRfc1123 sourceIfModifiedSince, - @HeaderParam("x-ms-source-if-unmodified-since") DateTimeRfc1123 sourceIfUnmodifiedSince, - @HeaderParam("x-ms-source-if-match") String sourceIfMatch, - @HeaderParam("x-ms-source-if-none-match") String sourceIfNoneMatch, - @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, - @HeaderParam("x-ms-copy-source-authorization") String copySourceAuthorization, - @HeaderParam("Accept") String accept, Context context); + @HeaderParam("x-ms-version") String version, @HeaderParam("Accept") String accept) { + stageBlockFromURL(url, containerName, blob, comp, blockId, contentLength, sourceUrl, null, null, null, null, + null, null, null, null, null, null, null, null, null, version, null, null, accept, null); + } @HttpRequestInformation( method = HttpMethod.PUT, path = "/{containerName}/{blob}", expectedStatusCodes = { 201 }) - @UnexpectedResponseExceptionDetail - ResponseBase commitBlockListSync(@HostParam("url") String url, - @PathParam("containerName") String containerName, @PathParam("blob") String blob, - @QueryParam("comp") String comp, @QueryParam("timeout") Integer timeout, + @UnexpectedResponseExceptionDetail(exceptionBodyClass = StorageError.class) + Response 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, @@ -343,65 +278,46 @@ ResponseBase commitBlockListSync(@HostPa @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); + @HeaderParam("Accept") String accept, RequestOptions requestOptions); @HttpRequestInformation( method = HttpMethod.PUT, path = "/{containerName}/{blob}", expectedStatusCodes = { 201 }) - @UnexpectedResponseExceptionDetail - 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); + @UnexpectedResponseExceptionDetail(exceptionBodyClass = StorageError.class) + default void commitBlockList(@HostParam("url") String url, @PathParam("containerName") String containerName, + @PathParam("blob") String blob, @QueryParam("comp") String comp, + @HeaderParam("x-ms-version") String version, @BodyParam("application/xml") BlockLookupList blocks, + @HeaderParam("Accept") String accept) { + commitBlockList(url, containerName, blob, comp, null, null, null, null, null, null, null, null, null, null, + null, null, null, null, null, null, null, null, null, null, null, version, null, null, null, null, null, + blocks, accept, null); + } @HttpRequestInformation( method = HttpMethod.GET, path = "/{containerName}/{blob}", expectedStatusCodes = { 200 }) - @UnexpectedResponseExceptionDetail - ResponseBase getBlockListSync(@HostParam("url") String url, - @PathParam("containerName") String containerName, @PathParam("blob") String blob, - @QueryParam("comp") String comp, @QueryParam("snapshot") String snapshot, + @UnexpectedResponseExceptionDetail(exceptionBodyClass = StorageError.class) + Response 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); + @HeaderParam("Accept") String accept, RequestOptions requestOptions); @HttpRequestInformation( method = HttpMethod.GET, path = "/{containerName}/{blob}", expectedStatusCodes = { 200 }) - @UnexpectedResponseExceptionDetail - 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); + @UnexpectedResponseExceptionDetail(exceptionBodyClass = StorageError.class) + default BlockList getBlockList(@HostParam("url") String url, @PathParam("containerName") String containerName, + @PathParam("blob") String blob, @QueryParam("comp") String comp, + @QueryParam("blocklisttype") BlockListType listType, @HeaderParam("x-ms-version") String version, + @HeaderParam("Accept") String accept) { + return getBlockList(url, containerName, blob, comp, null, listType, null, null, null, version, null, accept, + null).getValue(); + } } /** @@ -409,7 +325,7 @@ Response getBlockListNoCustomHeadersSync(@HostParam("url") String url * 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. @@ -447,21 +363,19 @@ Response getBlockListNoCustomHeadersSync(@HostParam("url") String url * @param blobHttpHeaders Parameter group. * @param cpkInfo Parameter group. * @param encryptionScopeParam Parameter group. - * @param context The context to associate with this operation. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws StorageErrorException thrown if the request is rejected by server. + * @throws HttpResponseException thrown if the service returns an error. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link ResponseBase}. + * @return the 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, + public Response 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) { + EncryptionScope encryptionScopeParam, RequestOptions requestOptions) { final String blobType = "BlockBlob"; final String accept = "application/xml"; String contentTypeInternal = null; @@ -523,13 +437,14 @@ public ResponseBase uploadWithResponse(String con DateTimeRfc1123 immutabilityPolicyExpiryConverted = immutabilityPolicyExpiry == null ? null : new DateTimeRfc1123(immutabilityPolicyExpiry); String transactionalContentCrc64Converted = Base64Util.encodeToString(transactionalContentCrc64); - return service.uploadSync(this.client.getUrl(), containerName, blob, blobType, timeout, + 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); + transactionalContentCrc64Converted, structuredBodyType, structuredContentLength, body, accept, + requestOptions); } /** @@ -537,7 +452,7 @@ public ResponseBase uploadWithResponse(String con * overwrites any existing metadata on the blob. Partial updates are not supported with Put Blob; the content of the * existing blob is overwritten with the content of the new blob. To perform a partial update of the content of a * block blob, use the Put Block List operation. - * + * * @param containerName The container name. * @param blob The blob name. * @param contentLength The length of the request. @@ -576,10 +491,9 @@ public ResponseBase uploadWithResponse(String con * @param cpkInfo Parameter group. * @param encryptionScopeParam Parameter group. * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws StorageErrorException thrown if the request is rejected by server. + * @throws HttpResponseException thrown if the service returns an error. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ - @ServiceMethod(returns = ReturnType.SINGLE) public void upload(String containerName, String blob, long contentLength, BinaryData body, Integer timeout, byte[] transactionalContentMD5, Map metadata, String leaseId, AccessTier tier, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, @@ -590,134 +504,7 @@ public void upload(String containerName, String blob, long contentLength, Binary 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. - * @param contentLength The length of the request. - * @param body Initial data. - * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. - * @param transactionalContentMD5 Specify the transactional md5 for the body, to be validated by the service. - * @param metadata Optional. Specifies a user-defined name-value pair associated with the blob. If no name-value - * pairs are specified, the operation will copy the metadata from the source blob or file to the destination blob. - * If one or more name-value pairs are specified, the destination blob is created with the specified metadata, and - * metadata is not copied from the source blob or file. Note that beginning with version 2009-09-19, metadata names - * must adhere to the naming rules for C# identifiers. See Naming and Referencing Containers, Blobs, and Metadata - * for more information. - * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. - * @param tier Optional. Indicates the tier to be set on the blob. - * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the - * specified date/time. - * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since - * the specified date/time. - * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. - * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. - * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. - * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. - * @param blobTagsString Optional. Used to set blob tags in various blob operations. - * @param immutabilityPolicyExpiry Specifies the date time when the blobs immutability policy is set to expire. - * @param immutabilityPolicyMode Specifies the immutability policy mode to set on the blob. - * @param legalHold Specified if a legal hold should be set on the blob. - * @param transactionalContentCrc64 Specify the transactional crc64 for the body, to be validated by the service. - * @param 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 StorageErrorException 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 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) { - 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); + structuredContentLength, blobHttpHeaders, cpkInfo, encryptionScopeParam, RequestOptions.none()); } /** @@ -726,7 +513,7 @@ public Response uploadNoCustomHeadersWithResponse(String containerName, St * 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. @@ -772,21 +559,20 @@ public Response uploadNoCustomHeadersWithResponse(String containerName, St * @param blobHttpHeaders Parameter group. * @param cpkInfo Parameter group. * @param encryptionScopeParam Parameter group. - * @param context The context to associate with this operation. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws StorageErrorException thrown if the request is rejected by server. + * @throws HttpResponseException thrown if the service returns an error. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link ResponseBase}. + * @return the 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, - BlobHttpHeaders blobHttpHeaders, CpkInfo cpkInfo, EncryptionScope encryptionScopeParam, Context context) { + public Response putBlobFromUrlWithResponse(String containerName, String blob, long contentLength, + String copySource, Integer timeout, byte[] transactionalContentMD5, Map metadata, + String leaseId, AccessTier tier, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, + String ifMatch, String ifNoneMatch, String ifTags, OffsetDateTime sourceIfModifiedSince, + OffsetDateTime sourceIfUnmodifiedSince, String sourceIfMatch, String sourceIfNoneMatch, String sourceIfTags, + String requestId, byte[] sourceContentMD5, String blobTagsString, Boolean copySourceBlobProperties, + String copySourceAuthorization, BlobCopySourceTagsMode copySourceTags, BlobHttpHeaders blobHttpHeaders, + CpkInfo cpkInfo, EncryptionScope encryptionScopeParam, RequestOptions requestOptions) { final String blobType = "BlockBlob"; final String accept = "application/xml"; String contentTypeInternal = null; @@ -850,14 +636,14 @@ public ResponseBase putBlobFromUrlWithRes DateTimeRfc1123 sourceIfUnmodifiedSinceConverted = sourceIfUnmodifiedSince == null ? null : new DateTimeRfc1123(sourceIfUnmodifiedSince); String sourceContentMD5Converted = Base64Util.encodeToString(sourceContentMD5); - return service.putBlobFromUrlSync(this.client.getUrl(), containerName, blob, blobType, timeout, + return service.putBlobFromUrl(this.client.getUrl(), containerName, blob, blobType, timeout, transactionalContentMD5Converted, contentLength, contentType, contentEncoding, contentLanguage, contentMd5Converted, cacheControl, metadata, leaseId, contentDisposition, encryptionKey, encryptionKeySha256, encryptionAlgorithm, encryptionScope, tier, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, sourceIfModifiedSinceConverted, sourceIfUnmodifiedSinceConverted, sourceIfMatch, sourceIfNoneMatch, sourceIfTags, this.client.getVersion(), requestId, sourceContentMD5Converted, blobTagsString, copySource, copySourceBlobProperties, - copySourceAuthorization, copySourceTags, accept, context); + copySourceAuthorization, copySourceTags, accept, requestOptions); } /** @@ -866,7 +652,7 @@ public ResponseBase putBlobFromUrlWithRes * from URL; the content of an existing blob is overwritten with the content of the new blob. To perform partial * updates to a block blob's contents using a source URL, use the Put Block from URL API in conjunction with Put * Block List. - * + * * @param containerName The container name. * @param blob The blob name. * @param contentLength The length of the request. @@ -913,10 +699,9 @@ public ResponseBase putBlobFromUrlWithRes * @param cpkInfo Parameter group. * @param encryptionScopeParam Parameter group. * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws StorageErrorException thrown if the request is rejected by server. + * @throws HttpResponseException thrown if the service returns an error. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ - @ServiceMethod(returns = ReturnType.SINGLE) public void putBlobFromUrl(String containerName, String blob, long contentLength, String copySource, Integer timeout, byte[] transactionalContentMD5, Map metadata, String leaseId, AccessTier tier, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, @@ -929,161 +714,21 @@ public void putBlobFromUrl(String containerName, String blob, long contentLength metadata, leaseId, tier, ifModifiedSince, ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, sourceIfModifiedSince, sourceIfUnmodifiedSince, sourceIfMatch, sourceIfNoneMatch, sourceIfTags, requestId, sourceContentMD5, blobTagsString, copySourceBlobProperties, copySourceAuthorization, copySourceTags, - blobHttpHeaders, cpkInfo, encryptionScopeParam, Context.none()); + blobHttpHeaders, cpkInfo, encryptionScopeParam, RequestOptions.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. - * + * 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 copySource Specifies the name of the source page blob snapshot. This value is a URL of up to 2 KB in - * length that specifies a page blob snapshot. The value should be URL-encoded as it would appear in a request URI. - * The source blob must either be public or must be authenticated via a shared access signature. - * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. - * @param transactionalContentMD5 Specify the transactional md5 for the body, to be validated by the service. - * @param metadata Optional. Specifies a user-defined name-value pair associated with the blob. If no name-value - * pairs are specified, the operation will copy the metadata from the source blob or file to the destination blob. - * If one or more name-value pairs are specified, the destination blob is created with the specified metadata, and - * metadata is not copied from the source blob or file. Note that beginning with version 2009-09-19, metadata names - * must adhere to the naming rules for C# identifiers. See Naming and Referencing Containers, Blobs, and Metadata - * for more information. - * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. - * @param tier Optional. Indicates the tier to be set on the blob. - * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the - * specified date/time. - * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since - * the specified date/time. - * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. - * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. - * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. - * @param sourceIfModifiedSince Specify this header value to operate only on a blob if it has been modified since - * the specified date/time. - * @param sourceIfUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified - * since the specified date/time. - * @param sourceIfMatch Specify an ETag value to operate only on blobs with a matching value. - * @param sourceIfNoneMatch Specify an ETag value to operate only on blobs without a matching value. - * @param sourceIfTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. - * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. - * @param sourceContentMD5 Specify the md5 calculated for the range of bytes that must be read from the copy source. - * @param blobTagsString Optional. Used to set blob tags in various blob operations. - * @param copySourceBlobProperties Optional, default is true. Indicates if properties from the source blob should be - * copied. - * @param copySourceAuthorization Only Bearer type is supported. Credentials should be a valid OAuth access token to - * copy source. - * @param copySourceTags Optional, default 'replace'. Indicates if source tags should be copied or replaced with the - * tags specified by x-ms-tags. - * @param blobHttpHeaders Parameter group. - * @param cpkInfo Parameter group. - * @param encryptionScopeParam Parameter group. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws StorageErrorException 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 Response putBlobFromUrlNoCustomHeadersWithResponse(String containerName, String blob, - long contentLength, String copySource, Integer timeout, byte[] transactionalContentMD5, - Map metadata, String leaseId, AccessTier tier, OffsetDateTime ifModifiedSince, - OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, String ifTags, - OffsetDateTime sourceIfModifiedSince, OffsetDateTime sourceIfUnmodifiedSince, String sourceIfMatch, - String sourceIfNoneMatch, String sourceIfTags, String requestId, byte[] sourceContentMD5, String blobTagsString, - Boolean copySourceBlobProperties, String copySourceAuthorization, BlobCopySourceTagsMode copySourceTags, - BlobHttpHeaders blobHttpHeaders, CpkInfo cpkInfo, EncryptionScope encryptionScopeParam, Context context) { - final String blobType = "BlockBlob"; - final String accept = "application/xml"; - String contentTypeInternal = null; - if (blobHttpHeaders != null) { - contentTypeInternal = blobHttpHeaders.getContentType(); - } - String contentType = contentTypeInternal; - String contentEncodingInternal = null; - if (blobHttpHeaders != null) { - contentEncodingInternal = blobHttpHeaders.getContentEncoding(); - } - String contentEncoding = contentEncodingInternal; - String contentLanguageInternal = null; - if (blobHttpHeaders != null) { - contentLanguageInternal = blobHttpHeaders.getContentLanguage(); - } - String contentLanguage = contentLanguageInternal; - byte[] contentMd5Internal = null; - if (blobHttpHeaders != null) { - contentMd5Internal = blobHttpHeaders.getContentMd5(); - } - byte[] contentMd5 = contentMd5Internal; - String cacheControlInternal = null; - if (blobHttpHeaders != null) { - cacheControlInternal = blobHttpHeaders.getCacheControl(); - } - String cacheControl = cacheControlInternal; - String contentDispositionInternal = null; - if (blobHttpHeaders != null) { - contentDispositionInternal = blobHttpHeaders.getContentDisposition(); - } - String contentDisposition = contentDispositionInternal; - String encryptionKeyInternal = null; - if (cpkInfo != null) { - encryptionKeyInternal = cpkInfo.getEncryptionKey(); - } - String encryptionKey = encryptionKeyInternal; - String encryptionKeySha256Internal = null; - if (cpkInfo != null) { - encryptionKeySha256Internal = cpkInfo.getEncryptionKeySha256(); - } - String encryptionKeySha256 = encryptionKeySha256Internal; - EncryptionAlgorithmType encryptionAlgorithmInternal = null; - if (cpkInfo != null) { - encryptionAlgorithmInternal = cpkInfo.getEncryptionAlgorithm(); - } - EncryptionAlgorithmType encryptionAlgorithm = encryptionAlgorithmInternal; - String encryptionScopeInternal = null; - if (encryptionScopeParam != null) { - encryptionScopeInternal = encryptionScopeParam.getEncryptionScope(); - } - String encryptionScope = encryptionScopeInternal; - String transactionalContentMD5Converted = Base64Util.encodeToString(transactionalContentMD5); - String contentMd5Converted = Base64Util.encodeToString(contentMd5); - DateTimeRfc1123 ifModifiedSinceConverted - = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); - DateTimeRfc1123 ifUnmodifiedSinceConverted - = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - DateTimeRfc1123 sourceIfModifiedSinceConverted - = sourceIfModifiedSince == null ? null : new DateTimeRfc1123(sourceIfModifiedSince); - DateTimeRfc1123 sourceIfUnmodifiedSinceConverted - = sourceIfUnmodifiedSince == null ? null : new DateTimeRfc1123(sourceIfUnmodifiedSince); - String sourceContentMD5Converted = Base64Util.encodeToString(sourceContentMD5); - return service.putBlobFromUrlNoCustomHeadersSync(this.client.getUrl(), containerName, blob, blobType, timeout, - transactionalContentMD5Converted, contentLength, contentType, contentEncoding, contentLanguage, - contentMd5Converted, cacheControl, metadata, leaseId, contentDisposition, encryptionKey, - encryptionKeySha256, encryptionAlgorithm, encryptionScope, tier, ifModifiedSinceConverted, - ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, sourceIfModifiedSinceConverted, - sourceIfUnmodifiedSinceConverted, sourceIfMatch, sourceIfNoneMatch, sourceIfTags, this.client.getVersion(), - requestId, sourceContentMD5Converted, blobTagsString, copySource, copySourceBlobProperties, - copySourceAuthorization, copySourceTags, accept, context); - } - - /** - * The Stage Block operation creates a new block to be committed as part of a blob. - * - * @param containerName The container name. - * @param blob The blob name. - * @param blockId A valid Base64 string value that identifies the block. Prior to encoding, the string must be less - * than or equal to 64 bytes in size. For a given blob, the length of the value specified for the blockid parameter - * must be the same size for each block. - * @param contentLength The length of the request. - * @param body Initial data. - * @param transactionalContentMD5 Specify the transactional md5 for the body, to be validated by the service. - * @param transactionalContentCrc64 Specify the transactional crc64 for the body, to be validated by the service. + * @param body Initial data. + * @param transactionalContentMD5 Specify the transactional md5 for the body, to be validated by the service. + * @param transactionalContentCrc64 Specify the transactional crc64 for the body, to be validated by the service. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting * Timeouts for Blob Service Operations.</a>. @@ -1096,17 +741,16 @@ public Response putBlobFromUrlNoCustomHeadersWithResponse(String container * 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. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws StorageErrorException thrown if the request is rejected by server. + * @throws HttpResponseException thrown if the service returns an error. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link ResponseBase}. + * @return the response. */ - @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) { + public Response 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, RequestOptions requestOptions) { final String comp = "block"; final String accept = "application/xml"; String encryptionKeyInternal = null; @@ -1131,15 +775,15 @@ public ResponseBase stageBlockWithResponse(St String encryptionScope = encryptionScopeInternal; String transactionalContentMD5Converted = Base64Util.encodeToString(transactionalContentMD5); String transactionalContentCrc64Converted = Base64Util.encodeToString(transactionalContentCrc64); - return service.stageBlockSync(this.client.getUrl(), containerName, blob, comp, blockId, contentLength, + 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); + structuredBodyType, structuredContentLength, body, accept, requestOptions); } /** * 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 @@ -1162,88 +806,22 @@ public ResponseBase stageBlockWithResponse(St * @param cpkInfo Parameter group. * @param encryptionScopeParam Parameter group. * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws StorageErrorException thrown if the request is rejected by server. + * @throws HttpResponseException thrown if the service returns an error. * @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://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. - * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. - * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. - * @param 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 StorageErrorException 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 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) { - 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); + cpkInfo, encryptionScopeParam, RequestOptions.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 @@ -1271,18 +849,17 @@ public Response stageBlockNoCustomHeadersWithResponse(String containerName * copy source. * @param cpkInfo Parameter group. * @param encryptionScopeParam Parameter group. - * @param context The context to associate with this operation. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws StorageErrorException thrown if the request is rejected by server. + * @throws HttpResponseException thrown if the service returns an error. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link ResponseBase}. + * @return the response. */ - @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, CpkInfo cpkInfo, EncryptionScope encryptionScopeParam, Context context) { + public Response stageBlockFromURLWithResponse(String containerName, String blob, String blockId, + long contentLength, String sourceUrl, String sourceRange, byte[] sourceContentMD5, byte[] sourceContentcrc64, + Integer timeout, String leaseId, OffsetDateTime sourceIfModifiedSince, OffsetDateTime sourceIfUnmodifiedSince, + String sourceIfMatch, String sourceIfNoneMatch, String requestId, String copySourceAuthorization, + CpkInfo cpkInfo, EncryptionScope encryptionScopeParam, RequestOptions requestOptions) { final String comp = "block"; final String accept = "application/xml"; String encryptionKeyInternal = null; @@ -1311,17 +888,17 @@ public ResponseBase stageBlockFromURLW = sourceIfModifiedSince == null ? null : new DateTimeRfc1123(sourceIfModifiedSince); DateTimeRfc1123 sourceIfUnmodifiedSinceConverted = sourceIfUnmodifiedSince == null ? null : new DateTimeRfc1123(sourceIfUnmodifiedSince); - return service.stageBlockFromURLSync(this.client.getUrl(), containerName, blob, comp, blockId, contentLength, + return service.stageBlockFromURL(this.client.getUrl(), containerName, blob, comp, blockId, contentLength, sourceUrl, sourceRange, sourceContentMD5Converted, sourceContentcrc64Converted, timeout, encryptionKey, encryptionKeySha256, encryptionAlgorithm, encryptionScope, leaseId, sourceIfModifiedSinceConverted, sourceIfUnmodifiedSinceConverted, sourceIfMatch, sourceIfNoneMatch, this.client.getVersion(), requestId, - copySourceAuthorization, accept, context); + copySourceAuthorization, accept, requestOptions); } /** * 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 @@ -1350,10 +927,9 @@ public ResponseBase stageBlockFromURLW * @param cpkInfo Parameter group. * @param encryptionScopeParam Parameter group. * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws StorageErrorException thrown if the request is rejected by server. + * @throws HttpResponseException thrown if the service returns an error. * @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, @@ -1362,85 +938,7 @@ public void stageBlockFromURL(String containerName, String blob, String blockId, stageBlockFromURLWithResponse(containerName, blob, blockId, contentLength, sourceUrl, sourceRange, sourceContentMD5, sourceContentcrc64, timeout, leaseId, sourceIfModifiedSince, sourceIfUnmodifiedSince, sourceIfMatch, sourceIfNoneMatch, requestId, copySourceAuthorization, cpkInfo, encryptionScopeParam, - Context.none()); - } - - /** - * The Stage Block operation creates a new block to be committed as part of a blob where the contents are read from - * a URL. - * - * @param containerName The container name. - * @param blob The blob name. - * @param blockId A valid Base64 string value that identifies the block. Prior to encoding, the string must be less - * than or equal to 64 bytes in size. For a given blob, the length of the value specified for the blockid parameter - * must be the same size for each block. - * @param contentLength The length of the request. - * @param sourceUrl Specify a URL to the copy source. - * @param sourceRange Bytes of source data in the specified range. - * @param sourceContentMD5 Specify the md5 calculated for the range of bytes that must be read from the copy source. - * @param sourceContentcrc64 Specify the crc64 calculated for the range of bytes that must be read from the copy - * source. - * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. - * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. - * @param sourceIfModifiedSince Specify this header value to operate only on a blob if it has been modified since - * the specified date/time. - * @param sourceIfUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified - * since the specified date/time. - * @param sourceIfMatch Specify an ETag value to operate only on blobs with a matching value. - * @param sourceIfNoneMatch Specify an ETag value to operate only on blobs without a matching value. - * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. - * @param copySourceAuthorization Only Bearer type is supported. Credentials should be a valid OAuth access token to - * copy source. - * @param cpkInfo Parameter group. - * @param encryptionScopeParam Parameter group. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws StorageErrorException 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 Response stageBlockFromURLNoCustomHeadersWithResponse(String containerName, String blob, - String blockId, long contentLength, String sourceUrl, String sourceRange, byte[] sourceContentMD5, - byte[] sourceContentcrc64, Integer timeout, String leaseId, OffsetDateTime sourceIfModifiedSince, - OffsetDateTime sourceIfUnmodifiedSince, String sourceIfMatch, String sourceIfNoneMatch, String requestId, - String copySourceAuthorization, CpkInfo cpkInfo, EncryptionScope encryptionScopeParam, Context context) { - final String comp = "block"; - final String accept = "application/xml"; - String encryptionKeyInternal = null; - if (cpkInfo != null) { - encryptionKeyInternal = cpkInfo.getEncryptionKey(); - } - String encryptionKey = encryptionKeyInternal; - String encryptionKeySha256Internal = null; - if (cpkInfo != null) { - encryptionKeySha256Internal = cpkInfo.getEncryptionKeySha256(); - } - String encryptionKeySha256 = encryptionKeySha256Internal; - EncryptionAlgorithmType encryptionAlgorithmInternal = null; - if (cpkInfo != null) { - encryptionAlgorithmInternal = cpkInfo.getEncryptionAlgorithm(); - } - EncryptionAlgorithmType encryptionAlgorithm = encryptionAlgorithmInternal; - String encryptionScopeInternal = null; - if (encryptionScopeParam != null) { - encryptionScopeInternal = encryptionScopeParam.getEncryptionScope(); - } - String encryptionScope = encryptionScopeInternal; - String sourceContentMD5Converted = Base64Util.encodeToString(sourceContentMD5); - String sourceContentcrc64Converted = Base64Util.encodeToString(sourceContentcrc64); - DateTimeRfc1123 sourceIfModifiedSinceConverted - = sourceIfModifiedSince == null ? null : new DateTimeRfc1123(sourceIfModifiedSince); - DateTimeRfc1123 sourceIfUnmodifiedSinceConverted - = sourceIfUnmodifiedSince == null ? null : new DateTimeRfc1123(sourceIfUnmodifiedSince); - return service.stageBlockFromURLNoCustomHeadersSync(this.client.getUrl(), containerName, blob, comp, blockId, - contentLength, sourceUrl, sourceRange, sourceContentMD5Converted, sourceContentcrc64Converted, timeout, - encryptionKey, encryptionKeySha256, encryptionAlgorithm, encryptionScope, leaseId, - sourceIfModifiedSinceConverted, sourceIfUnmodifiedSinceConverted, sourceIfMatch, sourceIfNoneMatch, - this.client.getVersion(), requestId, copySourceAuthorization, accept, context); + RequestOptions.none()); } /** @@ -1450,7 +948,7 @@ public Response stageBlockFromURLNoCustomHeadersWithResponse(String contai * 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. @@ -1483,20 +981,19 @@ public Response stageBlockFromURLNoCustomHeadersWithResponse(String contai * @param blobHttpHeaders Parameter group. * @param cpkInfo Parameter group. * @param encryptionScopeParam Parameter group. - * @param context The context to associate with this operation. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws StorageErrorException thrown if the request is rejected by server. + * @throws HttpResponseException thrown if the service returns an error. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link ResponseBase}. + * @return the response. */ - @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) { + public Response 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, + RequestOptions requestOptions) { final String comp = "blocklist"; final String accept = "application/xml"; String cacheControlInternal = null; @@ -1558,13 +1055,13 @@ public ResponseBase commitBlockListWithR = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); DateTimeRfc1123 immutabilityPolicyExpiryConverted = immutabilityPolicyExpiry == null ? null : new DateTimeRfc1123(immutabilityPolicyExpiry); - return service.commitBlockListSync(this.client.getUrl(), containerName, blob, comp, timeout, cacheControl, + 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); + requestOptions); } /** @@ -1574,7 +1071,7 @@ public ResponseBase commitBlockListWithR * committing the new and existing blocks together. You can do this by specifying whether to commit a block from the * committed block list or from the uncommitted block list, or to commit the most recently uploaded version of the * block, whichever list it may belong to. - * + * * @param containerName The container name. * @param blob The blob name. * @param blocks Blob Blocks. @@ -1608,10 +1105,9 @@ public ResponseBase commitBlockListWithR * @param cpkInfo Parameter group. * @param encryptionScopeParam Parameter group. * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws StorageErrorException thrown if the request is rejected by server. + * @throws HttpResponseException thrown if the service returns an error. * @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, @@ -1621,136 +1117,12 @@ public void commitBlockList(String containerName, String blob, BlockLookupList b 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://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. - * @param transactionalContentMD5 Specify the transactional md5 for the body, to be validated by the service. - * @param transactionalContentCrc64 Specify the transactional crc64 for the body, to be validated by the service. - * @param metadata Optional. Specifies a user-defined name-value pair associated with the blob. If no name-value - * pairs are specified, the operation will copy the metadata from the source blob or file to the destination blob. - * If one or more name-value pairs are specified, the destination blob is created with the specified metadata, and - * metadata is not copied from the source blob or file. Note that beginning with version 2009-09-19, metadata names - * must adhere to the naming rules for C# identifiers. See Naming and Referencing Containers, Blobs, and Metadata - * for more information. - * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. - * @param tier Optional. Indicates the tier to be set on the blob. - * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the - * specified date/time. - * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since - * the specified date/time. - * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. - * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. - * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. - * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. - * @param blobTagsString Optional. Used to set blob tags in various blob operations. - * @param immutabilityPolicyExpiry Specifies the date time when the blobs immutability policy is set to expire. - * @param immutabilityPolicyMode Specifies the immutability policy mode to set on the blob. - * @param legalHold Specified if a legal hold should be set on the blob. - * @param blobHttpHeaders Parameter group. - * @param cpkInfo Parameter group. - * @param encryptionScopeParam Parameter group. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws StorageErrorException 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 Response commitBlockListNoCustomHeadersWithResponse(String containerName, String blob, - BlockLookupList blocks, Integer timeout, byte[] transactionalContentMD5, byte[] transactionalContentCrc64, - Map metadata, String leaseId, AccessTier tier, OffsetDateTime ifModifiedSince, - OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, String ifTags, String requestId, - String blobTagsString, OffsetDateTime immutabilityPolicyExpiry, - BlobImmutabilityPolicyMode immutabilityPolicyMode, Boolean legalHold, BlobHttpHeaders blobHttpHeaders, - CpkInfo cpkInfo, EncryptionScope encryptionScopeParam, Context context) { - final String comp = "blocklist"; - final String accept = "application/xml"; - String cacheControlInternal = null; - 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); + blobHttpHeaders, cpkInfo, encryptionScopeParam, RequestOptions.none()); } /** * 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 @@ -1766,25 +1138,24 @@ public Response commitBlockListNoCustomHeadersWithResponse(String containe * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. * @param requestId Provides a 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. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws StorageErrorException thrown if the request is rejected by server. + * @throws HttpResponseException thrown if the service returns an error. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response body along with {@link ResponseBase}. + * @return the response. */ - @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) { + public Response getBlockListWithResponse(String containerName, String blob, BlockListType listType, + String snapshot, Integer timeout, String leaseId, String ifTags, String requestId, + RequestOptions requestOptions) { 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); + return service.getBlockList(this.client.getUrl(), containerName, blob, comp, snapshot, listType, timeout, + leaseId, ifTags, this.client.getVersion(), requestId, accept, requestOptions); } /** * 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 @@ -1801,48 +1172,13 @@ public ResponseBase getBlockListWithRe * @param requestId Provides 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 StorageErrorException thrown if the request is rejected by server. + * @throws HttpResponseException thrown if the service returns an error. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the response. */ - @ServiceMethod(returns = ReturnType.SINGLE) public BlockList getBlockList(String containerName, String blob, BlockListType listType, String snapshot, Integer timeout, String leaseId, String ifTags, String requestId) { return getBlockListWithResponse(containerName, blob, listType, snapshot, timeout, leaseId, ifTags, requestId, - Context.none()).getValue(); - } - - /** - * The Get Block List operation retrieves the list of blocks that have been uploaded as part of a block blob. - * - * @param containerName The container name. - * @param blob The blob name. - * @param listType Specifies whether to return the list of committed blocks, the list of uncommitted blocks, or both - * lists together. - * @param snapshot The snapshot parameter is an opaque DateTime value that, when present, specifies the blob - * snapshot to retrieve. For more information on working with blob snapshots, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/creating-a-snapshot-of-a-blob">Creating - * a Snapshot of a Blob.</a>. - * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. - * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. - * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. - * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws StorageErrorException 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 Response getBlockListNoCustomHeadersWithResponse(String containerName, String blob, - BlockListType listType, String snapshot, Integer timeout, String leaseId, String ifTags, String requestId, - Context context) { - final String comp = "blocklist"; - final String accept = "application/xml"; - return service.getBlockListNoCustomHeadersSync(this.client.getUrl(), containerName, blob, comp, snapshot, - listType, timeout, leaseId, ifTags, this.client.getVersion(), requestId, accept, context); + RequestOptions.none()).getValue(); } } diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/implementation/ContainersImpl.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/implementation/ContainersImpl.java index a0f27a53079d..9c85188924d5 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/implementation/ContainersImpl.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/implementation/ContainersImpl.java @@ -4,53 +4,35 @@ package com.azure.v2.storage.blob.implementation; -import com.azure.v2.core.annotation.ReturnType; -import com.azure.v2.core.annotation.ServiceMethod; -import com.azure.v2.core.http.rest.ResponseBase; import com.azure.v2.storage.blob.implementation.models.BlobSignedIdentifierWrapper; import com.azure.v2.storage.blob.models.BlobContainerEncryptionScope; import com.azure.v2.storage.blob.models.BlobSignedIdentifier; -import com.azure.v2.storage.blob.models.ContainersAcquireLeaseHeaders; -import com.azure.v2.storage.blob.models.ContainersBreakLeaseHeaders; -import com.azure.v2.storage.blob.models.ContainersChangeLeaseHeaders; -import com.azure.v2.storage.blob.models.ContainersCreateHeaders; -import com.azure.v2.storage.blob.models.ContainersDeleteHeaders; -import com.azure.v2.storage.blob.models.ContainersFilterBlobsHeaders; -import com.azure.v2.storage.blob.models.ContainersGetAccessPolicyHeaders; -import com.azure.v2.storage.blob.models.ContainersGetAccountInfoHeaders; -import com.azure.v2.storage.blob.models.ContainersGetPropertiesHeaders; -import com.azure.v2.storage.blob.models.ContainersListBlobFlatSegmentHeaders; -import com.azure.v2.storage.blob.models.ContainersListBlobHierarchySegmentHeaders; -import com.azure.v2.storage.blob.models.ContainersReleaseLeaseHeaders; -import com.azure.v2.storage.blob.models.ContainersRenameHeaders; -import com.azure.v2.storage.blob.models.ContainersRenewLeaseHeaders; -import com.azure.v2.storage.blob.models.ContainersRestoreHeaders; -import com.azure.v2.storage.blob.models.ContainersSetAccessPolicyHeaders; -import com.azure.v2.storage.blob.models.ContainersSetMetadataHeaders; -import com.azure.v2.storage.blob.models.ContainersSubmitBatchHeaders; import com.azure.v2.storage.blob.models.FilterBlobSegment; import com.azure.v2.storage.blob.models.FilterBlobsIncludeItem; import com.azure.v2.storage.blob.models.ListBlobsFlatSegmentResponse; import com.azure.v2.storage.blob.models.ListBlobsHierarchySegmentResponse; import com.azure.v2.storage.blob.models.ListBlobsIncludeItem; import com.azure.v2.storage.blob.models.PublicAccessType; -import com.azure.v2.storage.blob.models.StorageErrorException; -import io.clientcore.core.annotation.ServiceInterface; +import com.azure.v2.storage.blob.models.StorageError; +import io.clientcore.core.annotations.ServiceInterface; import io.clientcore.core.http.RestProxy; -import io.clientcore.core.http.annotation.BodyParam; -import io.clientcore.core.http.annotation.HeaderParam; -import io.clientcore.core.http.annotation.HostParam; -import io.clientcore.core.http.annotation.HttpRequestInformation; -import io.clientcore.core.http.annotation.PathParam; -import io.clientcore.core.http.annotation.QueryParam; -import io.clientcore.core.http.annotation.UnexpectedResponseExceptionDetail; +import io.clientcore.core.http.annotations.BodyParam; +import io.clientcore.core.http.annotations.HeaderParam; +import io.clientcore.core.http.annotations.HostParam; +import io.clientcore.core.http.annotations.HttpRequestInformation; +import io.clientcore.core.http.annotations.PathParam; +import io.clientcore.core.http.annotations.QueryParam; +import io.clientcore.core.http.annotations.UnexpectedResponseExceptionDetail; +import io.clientcore.core.http.exceptions.HttpResponseException; import io.clientcore.core.http.models.HttpMethod; +import io.clientcore.core.http.models.RequestOptions; import io.clientcore.core.http.models.Response; -import io.clientcore.core.util.Context; -import io.clientcore.core.util.DateTimeRfc1123; -import io.clientcore.core.util.binarydata.BinaryData; - +import io.clientcore.core.http.pipeline.HttpPipeline; +import io.clientcore.core.models.binarydata.BinaryData; +import io.clientcore.core.serialization.ObjectSerializer; +import io.clientcore.core.utils.DateTimeRfc1123; import java.io.InputStream; +import java.lang.reflect.InvocationTargetException; import java.time.OffsetDateTime; import java.util.List; import java.util.Map; @@ -73,7 +55,7 @@ public final class ContainersImpl { /** * Initializes an instance of ContainersImpl. - * + * * @param client the instance of the service client containing this operation class. */ ContainersImpl(AzureBlobStorageImpl client) { @@ -87,383 +69,376 @@ public final class ContainersImpl { */ @ServiceInterface(name = "AzureBlobStorageCont", host = "{url}") public interface ContainersService { + static ContainersService getNewInstance(HttpPipeline pipeline, ObjectSerializer serializer) { + try { + Class clazz = Class.forName("com.azure.v2.storage.blob.implementation.ContainersServiceImpl"); + return (ContainersService) clazz.getMethod("getNewInstance", HttpPipeline.class, ObjectSerializer.class) + .invoke(null, pipeline, serializer); + } catch (ClassNotFoundException | NoSuchMethodException | IllegalAccessException + | InvocationTargetException e) { + throw new RuntimeException(e); + } + + } + @HttpRequestInformation(method = HttpMethod.PUT, path = "/{containerName}", expectedStatusCodes = { 201 }) - @UnexpectedResponseExceptionDetail - ResponseBase createSync(@HostParam("url") String url, - @PathParam("containerName") String containerName, @QueryParam("restype") String restype, - @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-meta-") Map metadata, + @UnexpectedResponseExceptionDetail(exceptionBodyClass = StorageError.class) + Response 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); + @HeaderParam("Accept") String accept, RequestOptions requestOptions); @HttpRequestInformation(method = HttpMethod.PUT, path = "/{containerName}", expectedStatusCodes = { 201 }) - @UnexpectedResponseExceptionDetail - 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); + @UnexpectedResponseExceptionDetail(exceptionBodyClass = StorageError.class) + default void create(@HostParam("url") String url, @PathParam("containerName") String containerName, + @QueryParam("restype") String restype, @HeaderParam("x-ms-version") String version, + @HeaderParam("Accept") String accept) { + create(url, containerName, restype, null, null, null, version, null, null, null, accept, null); + } @HttpRequestInformation(method = HttpMethod.GET, path = "/{containerName}", expectedStatusCodes = { 200 }) - @UnexpectedResponseExceptionDetail - 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); + @UnexpectedResponseExceptionDetail(exceptionBodyClass = StorageError.class) + Response 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, + RequestOptions requestOptions); @HttpRequestInformation(method = HttpMethod.GET, path = "/{containerName}", expectedStatusCodes = { 200 }) - @UnexpectedResponseExceptionDetail - 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); + @UnexpectedResponseExceptionDetail(exceptionBodyClass = StorageError.class) + default void getProperties(@HostParam("url") String url, @PathParam("containerName") String containerName, + @QueryParam("restype") String restype, @HeaderParam("x-ms-version") String version, + @HeaderParam("Accept") String accept) { + getProperties(url, containerName, restype, null, null, version, null, accept, null); + } @HttpRequestInformation(method = HttpMethod.DELETE, path = "/{containerName}", expectedStatusCodes = { 202 }) - @UnexpectedResponseExceptionDetail - 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, + @UnexpectedResponseExceptionDetail(exceptionBodyClass = StorageError.class) + Response 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); + @HeaderParam("Accept") String accept, RequestOptions requestOptions); @HttpRequestInformation(method = HttpMethod.DELETE, path = "/{containerName}", expectedStatusCodes = { 202 }) - @UnexpectedResponseExceptionDetail - 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); + @UnexpectedResponseExceptionDetail(exceptionBodyClass = StorageError.class) + default void delete(@HostParam("url") String url, @PathParam("containerName") String containerName, + @QueryParam("restype") String restype, @HeaderParam("x-ms-version") String version, + @HeaderParam("Accept") String accept) { + delete(url, containerName, restype, null, null, null, null, version, null, accept, null); + } @HttpRequestInformation(method = HttpMethod.PUT, path = "/{containerName}", expectedStatusCodes = { 200 }) - @UnexpectedResponseExceptionDetail - 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, + @UnexpectedResponseExceptionDetail(exceptionBodyClass = StorageError.class) + Response 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); + @HeaderParam("Accept") String accept, RequestOptions requestOptions); @HttpRequestInformation(method = HttpMethod.PUT, path = "/{containerName}", expectedStatusCodes = { 200 }) - @UnexpectedResponseExceptionDetail - 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); - - @HttpRequestInformation(method = HttpMethod.GET, path = "/{containerName}", expectedStatusCodes = { 200 }) - @UnexpectedResponseExceptionDetail - ResponseBase getAccessPolicySync( - @HostParam("url") String url, @PathParam("containerName") String containerName, + @UnexpectedResponseExceptionDetail(exceptionBodyClass = StorageError.class) + default void 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-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, - @HeaderParam("Accept") String accept, Context context); + @HeaderParam("x-ms-version") String version, @HeaderParam("Accept") String accept) { + setMetadata(url, containerName, restype, comp, null, null, null, null, version, null, accept, null); + } @HttpRequestInformation(method = HttpMethod.GET, path = "/{containerName}", expectedStatusCodes = { 200 }) - @UnexpectedResponseExceptionDetail - Response getAccessPolicyNoCustomHeadersSync(@HostParam("url") String url, + @UnexpectedResponseExceptionDetail(exceptionBodyClass = StorageError.class) + Response 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); + RequestOptions requestOptions); - @HttpRequestInformation(method = HttpMethod.PUT, path = "/{containerName}", expectedStatusCodes = { 200 }) - @UnexpectedResponseExceptionDetail - ResponseBase setAccessPolicySync(@HostParam("url") String url, + @HttpRequestInformation(method = HttpMethod.GET, path = "/{containerName}", expectedStatusCodes = { 200 }) + @UnexpectedResponseExceptionDetail(exceptionBodyClass = StorageError.class) + default BlobSignedIdentifierWrapper 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-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); + @QueryParam("comp") String comp, @HeaderParam("x-ms-version") String version, + @HeaderParam("Accept") String accept) { + return getAccessPolicy(url, containerName, restype, comp, null, null, version, null, accept, null) + .getValue(); + } @HttpRequestInformation(method = HttpMethod.PUT, path = "/{containerName}", expectedStatusCodes = { 200 }) - @UnexpectedResponseExceptionDetail - 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, + @UnexpectedResponseExceptionDetail(exceptionBodyClass = StorageError.class) + Response 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); + @HeaderParam("Accept") String accept, RequestOptions requestOptions); + + @HttpRequestInformation(method = HttpMethod.PUT, path = "/{containerName}", expectedStatusCodes = { 200 }) + @UnexpectedResponseExceptionDetail(exceptionBodyClass = StorageError.class) + default void setAccessPolicy(@HostParam("url") String url, @PathParam("containerName") String containerName, + @QueryParam("restype") String restype, @QueryParam("comp") String comp, + @HeaderParam("x-ms-version") String version, @HeaderParam("Accept") String accept) { + setAccessPolicy(url, containerName, restype, comp, null, null, null, null, null, version, null, null, + accept, null); + } @HttpRequestInformation(method = HttpMethod.PUT, path = "/{containerName}", expectedStatusCodes = { 201 }) - @UnexpectedResponseExceptionDetail - 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, + @UnexpectedResponseExceptionDetail(exceptionBodyClass = StorageError.class) + Response 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); + @HeaderParam("Accept") String accept, RequestOptions requestOptions); @HttpRequestInformation(method = HttpMethod.PUT, path = "/{containerName}", expectedStatusCodes = { 201 }) - @UnexpectedResponseExceptionDetail - 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); + @UnexpectedResponseExceptionDetail(exceptionBodyClass = StorageError.class) + default void restore(@HostParam("url") String url, @PathParam("containerName") String containerName, + @QueryParam("restype") String restype, @QueryParam("comp") String comp, + @HeaderParam("x-ms-version") String version, @HeaderParam("Accept") String accept) { + restore(url, containerName, restype, comp, null, version, null, null, null, accept, null); + } @HttpRequestInformation(method = HttpMethod.PUT, path = "/{containerName}", expectedStatusCodes = { 200 }) - @UnexpectedResponseExceptionDetail - 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, + @UnexpectedResponseExceptionDetail(exceptionBodyClass = StorageError.class) + Response 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); + RequestOptions requestOptions); @HttpRequestInformation(method = HttpMethod.PUT, path = "/{containerName}", expectedStatusCodes = { 200 }) - @UnexpectedResponseExceptionDetail - 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, + @UnexpectedResponseExceptionDetail(exceptionBodyClass = StorageError.class) + default void rename(@HostParam("url") String url, @PathParam("containerName") String containerName, + @QueryParam("restype") String restype, @QueryParam("comp") String comp, + @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-source-container-name") String sourceContainerName, - @HeaderParam("x-ms-source-lease-id") String sourceLeaseId, @HeaderParam("Accept") String accept, - Context context); + @HeaderParam("Accept") String accept) { + rename(url, containerName, restype, comp, null, version, null, sourceContainerName, null, accept, null); + } @HttpRequestInformation(method = HttpMethod.POST, path = "/{containerName}", expectedStatusCodes = { 202 }) - @UnexpectedResponseExceptionDetail - ResponseBase submitBatchSync(@HostParam("url") String url, + @UnexpectedResponseExceptionDetail(exceptionBodyClass = StorageError.class) + Response 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); + @BodyParam("application/xml") BinaryData body, @HeaderParam("Accept") String accept, + RequestOptions requestOptions); @HttpRequestInformation(method = HttpMethod.POST, path = "/{containerName}", expectedStatusCodes = { 202 }) - @UnexpectedResponseExceptionDetail - 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); + @UnexpectedResponseExceptionDetail(exceptionBodyClass = StorageError.class) + default InputStream 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, + @HeaderParam("x-ms-version") String version, @BodyParam("application/xml") BinaryData body, + @HeaderParam("Accept") String accept) { + return submitBatch(url, containerName, restype, comp, contentLength, multipartContentType, null, version, + null, body, accept, null).getValue(); + } @HttpRequestInformation(method = HttpMethod.GET, path = "/{containerName}", expectedStatusCodes = { 200 }) - @UnexpectedResponseExceptionDetail - ResponseBase filterBlobsSync(@HostParam("url") String url, + @UnexpectedResponseExceptionDetail(exceptionBodyClass = StorageError.class) + Response 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); + @HeaderParam("Accept") String accept, RequestOptions requestOptions); @HttpRequestInformation(method = HttpMethod.GET, path = "/{containerName}", expectedStatusCodes = { 200 }) - @UnexpectedResponseExceptionDetail - Response filterBlobsNoCustomHeadersSync(@HostParam("url") String url, + @UnexpectedResponseExceptionDetail(exceptionBodyClass = StorageError.class) + default FilterBlobSegment 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); + @QueryParam("comp") String comp, @HeaderParam("x-ms-version") String version, + @HeaderParam("Accept") String accept) { + return filterBlobs(url, containerName, restype, comp, null, version, null, null, null, null, null, accept, + null).getValue(); + } @HttpRequestInformation(method = HttpMethod.PUT, path = "/{containerName}", expectedStatusCodes = { 201 }) - @UnexpectedResponseExceptionDetail - 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, + @UnexpectedResponseExceptionDetail(exceptionBodyClass = StorageError.class) + Response 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); + @HeaderParam("Accept") String accept, RequestOptions requestOptions); @HttpRequestInformation(method = HttpMethod.PUT, path = "/{containerName}", expectedStatusCodes = { 201 }) - @UnexpectedResponseExceptionDetail - 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); + @UnexpectedResponseExceptionDetail(exceptionBodyClass = StorageError.class) + default void acquireLease(@HostParam("url") String url, @PathParam("containerName") String containerName, + @QueryParam("comp") String comp, @QueryParam("restype") String restype, + @HeaderParam("x-ms-lease-action") String action, @HeaderParam("x-ms-version") String version, + @HeaderParam("Accept") String accept) { + acquireLease(url, containerName, comp, restype, action, null, null, null, null, null, version, null, accept, + null); + } @HttpRequestInformation(method = HttpMethod.PUT, path = "/{containerName}", expectedStatusCodes = { 200 }) - @UnexpectedResponseExceptionDetail - 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, + @UnexpectedResponseExceptionDetail(exceptionBodyClass = StorageError.class) + Response 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); + @HeaderParam("Accept") String accept, RequestOptions requestOptions); @HttpRequestInformation(method = HttpMethod.PUT, path = "/{containerName}", expectedStatusCodes = { 200 }) - @UnexpectedResponseExceptionDetail - 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); + @UnexpectedResponseExceptionDetail(exceptionBodyClass = StorageError.class) + default void releaseLease(@HostParam("url") String url, @PathParam("containerName") String containerName, + @QueryParam("comp") String comp, @QueryParam("restype") String restype, + @HeaderParam("x-ms-lease-action") String action, @HeaderParam("x-ms-lease-id") String leaseId, + @HeaderParam("x-ms-version") String version, @HeaderParam("Accept") String accept) { + releaseLease(url, containerName, comp, restype, action, null, leaseId, null, null, version, null, accept, + null); + } @HttpRequestInformation(method = HttpMethod.PUT, path = "/{containerName}", expectedStatusCodes = { 200 }) - @UnexpectedResponseExceptionDetail - 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, + @UnexpectedResponseExceptionDetail(exceptionBodyClass = StorageError.class) + Response 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); + @HeaderParam("Accept") String accept, RequestOptions requestOptions); @HttpRequestInformation(method = HttpMethod.PUT, path = "/{containerName}", expectedStatusCodes = { 200 }) - @UnexpectedResponseExceptionDetail - 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); + @UnexpectedResponseExceptionDetail(exceptionBodyClass = StorageError.class) + default void renewLease(@HostParam("url") String url, @PathParam("containerName") String containerName, + @QueryParam("comp") String comp, @QueryParam("restype") String restype, + @HeaderParam("x-ms-lease-action") String action, @HeaderParam("x-ms-lease-id") String leaseId, + @HeaderParam("x-ms-version") String version, @HeaderParam("Accept") String accept) { + renewLease(url, containerName, comp, restype, action, null, leaseId, null, null, version, null, accept, + null); + } @HttpRequestInformation(method = HttpMethod.PUT, path = "/{containerName}", expectedStatusCodes = { 202 }) - @UnexpectedResponseExceptionDetail - 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, + @UnexpectedResponseExceptionDetail(exceptionBodyClass = StorageError.class) + Response 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); + @HeaderParam("Accept") String accept, RequestOptions requestOptions); @HttpRequestInformation(method = HttpMethod.PUT, path = "/{containerName}", expectedStatusCodes = { 202 }) - @UnexpectedResponseExceptionDetail - 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); + @UnexpectedResponseExceptionDetail(exceptionBodyClass = StorageError.class) + default void breakLease(@HostParam("url") String url, @PathParam("containerName") String containerName, + @QueryParam("comp") String comp, @QueryParam("restype") String restype, + @HeaderParam("x-ms-lease-action") String action, @HeaderParam("x-ms-version") String version, + @HeaderParam("Accept") String accept) { + breakLease(url, containerName, comp, restype, action, null, null, null, null, version, null, accept, null); + } @HttpRequestInformation(method = HttpMethod.PUT, path = "/{containerName}", expectedStatusCodes = { 200 }) - @UnexpectedResponseExceptionDetail - 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, + @UnexpectedResponseExceptionDetail(exceptionBodyClass = StorageError.class) + Response 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); + @HeaderParam("Accept") String accept, RequestOptions requestOptions); @HttpRequestInformation(method = HttpMethod.PUT, path = "/{containerName}", expectedStatusCodes = { 200 }) - @UnexpectedResponseExceptionDetail - 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); - - @HttpRequestInformation(method = HttpMethod.GET, path = "/{containerName}", expectedStatusCodes = { 200 }) - @UnexpectedResponseExceptionDetail - ResponseBase listBlobFlatSegmentSync( - @HostParam("url") String url, @PathParam("containerName") String containerName, - @QueryParam("restype") String restype, @QueryParam("comp") String comp, @QueryParam("prefix") String prefix, - @QueryParam("marker") String marker, @QueryParam("maxresults") Integer maxresults, - @QueryParam("include") String include, @QueryParam("timeout") Integer timeout, - @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, - @HeaderParam("Accept") String accept, Context context); + @UnexpectedResponseExceptionDetail(exceptionBodyClass = StorageError.class) + default void changeLease(@HostParam("url") String url, @PathParam("containerName") String containerName, + @QueryParam("comp") String comp, @QueryParam("restype") String restype, + @HeaderParam("x-ms-lease-action") String action, @HeaderParam("x-ms-lease-id") String leaseId, + @HeaderParam("x-ms-proposed-lease-id") String proposedLeaseId, @HeaderParam("x-ms-version") String version, + @HeaderParam("Accept") String accept) { + changeLease(url, containerName, comp, restype, action, null, leaseId, proposedLeaseId, null, null, version, + null, accept, null); + } @HttpRequestInformation(method = HttpMethod.GET, path = "/{containerName}", expectedStatusCodes = { 200 }) - @UnexpectedResponseExceptionDetail - Response listBlobFlatSegmentNoCustomHeadersSync(@HostParam("url") String url, + @UnexpectedResponseExceptionDetail(exceptionBodyClass = StorageError.class) + Response listBlobFlatSegment(@HostParam("url") String url, @PathParam("containerName") String containerName, @QueryParam("restype") String restype, @QueryParam("comp") String comp, @QueryParam("prefix") String prefix, @QueryParam("marker") String marker, @QueryParam("maxresults") Integer maxresults, @QueryParam("include") String include, @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, @HeaderParam("Accept") String accept, - Context context); + RequestOptions requestOptions); @HttpRequestInformation(method = HttpMethod.GET, path = "/{containerName}", expectedStatusCodes = { 200 }) - @UnexpectedResponseExceptionDetail - ResponseBase - listBlobHierarchySegmentSync(@HostParam("url") String url, @PathParam("containerName") String containerName, - @QueryParam("restype") String restype, @QueryParam("comp") String comp, - @QueryParam("prefix") String prefix, @QueryParam("delimiter") String delimiter, - @QueryParam("marker") String marker, @QueryParam("maxresults") Integer maxresults, - @QueryParam("include") String include, @QueryParam("timeout") Integer timeout, - @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, - @HeaderParam("Accept") String accept, Context context); + @UnexpectedResponseExceptionDetail(exceptionBodyClass = StorageError.class) + default ListBlobsFlatSegmentResponse listBlobFlatSegment(@HostParam("url") String url, + @PathParam("containerName") String containerName, @QueryParam("restype") String restype, + @QueryParam("comp") String comp, @HeaderParam("x-ms-version") String version, + @HeaderParam("Accept") String accept) { + return listBlobFlatSegment(url, containerName, restype, comp, null, null, null, null, null, version, null, + accept, null).getValue(); + } @HttpRequestInformation(method = HttpMethod.GET, path = "/{containerName}", expectedStatusCodes = { 200 }) - @UnexpectedResponseExceptionDetail - Response listBlobHierarchySegmentNoCustomHeadersSync( - @HostParam("url") String url, @PathParam("containerName") String containerName, - @QueryParam("restype") String restype, @QueryParam("comp") String comp, @QueryParam("prefix") String prefix, + @UnexpectedResponseExceptionDetail(exceptionBodyClass = StorageError.class) + Response listBlobHierarchySegment(@HostParam("url") String url, + @PathParam("containerName") String containerName, @QueryParam("restype") String restype, + @QueryParam("comp") String comp, @QueryParam("prefix") String prefix, @QueryParam("delimiter") String delimiter, @QueryParam("marker") String marker, @QueryParam("maxresults") Integer maxresults, @QueryParam("include") String include, @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, @HeaderParam("Accept") String accept, - Context context); + RequestOptions requestOptions); @HttpRequestInformation(method = HttpMethod.GET, path = "/{containerName}", expectedStatusCodes = { 200 }) - @UnexpectedResponseExceptionDetail - ResponseBase getAccountInfoSync(@HostParam("url") String url, + @UnexpectedResponseExceptionDetail(exceptionBodyClass = StorageError.class) + default ListBlobsHierarchySegmentResponse listBlobHierarchySegment(@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); + @QueryParam("comp") String comp, @QueryParam("delimiter") String delimiter, + @HeaderParam("x-ms-version") String version, @HeaderParam("Accept") String accept) { + return listBlobHierarchySegment(url, containerName, restype, comp, null, delimiter, null, null, null, null, + version, null, accept, null).getValue(); + } @HttpRequestInformation(method = HttpMethod.GET, path = "/{containerName}", expectedStatusCodes = { 200 }) - @UnexpectedResponseExceptionDetail - 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); + @UnexpectedResponseExceptionDetail(exceptionBodyClass = StorageError.class) + Response 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, + RequestOptions requestOptions); + + @HttpRequestInformation(method = HttpMethod.GET, path = "/{containerName}", expectedStatusCodes = { 200 }) + @UnexpectedResponseExceptionDetail(exceptionBodyClass = StorageError.class) + default void getAccountInfo(@HostParam("url") String url, @PathParam("containerName") String containerName, + @QueryParam("restype") String restype, @QueryParam("comp") String comp, + @HeaderParam("x-ms-version") String version, @HeaderParam("Accept") String accept) { + getAccountInfo(url, containerName, restype, comp, null, version, null, accept, null); + } } /** * creates a new container under the specified account. If the container with the same name already exists, the * operation fails. - * + * * @param containerName The container name. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting @@ -478,16 +453,15 @@ Response getAccountInfoNoCustomHeadersSync(@HostParam("url") String url, * @param requestId Provides a 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. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws StorageErrorException thrown if the request is rejected by server. + * @throws HttpResponseException thrown if the service returns an error. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link ResponseBase}. + * @return the response. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ResponseBase createWithResponse(String containerName, Integer timeout, - Map metadata, PublicAccessType access, String requestId, - BlobContainerEncryptionScope blobContainerEncryptionScope, Context context) { + public Response createWithResponse(String containerName, Integer timeout, Map metadata, + PublicAccessType access, String requestId, BlobContainerEncryptionScope blobContainerEncryptionScope, + RequestOptions requestOptions) { final String restype = "container"; final String accept = "application/xml"; String defaultEncryptionScopeInternal = null; @@ -501,15 +475,15 @@ public ResponseBase createWithResponse(String con = blobContainerEncryptionScope.isEncryptionScopeOverridePrevented(); } Boolean encryptionScopeOverridePrevented = encryptionScopeOverridePreventedInternal; - return service.createSync(this.client.getUrl(), containerName, restype, timeout, metadata, access, + return service.create(this.client.getUrl(), containerName, restype, timeout, metadata, access, this.client.getVersion(), requestId, defaultEncryptionScope, encryptionScopeOverridePrevented, accept, - context); + requestOptions); } /** * creates a new container under the specified account. If the container with the same name already exists, the * operation fails. - * + * * @param containerName The container name. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting @@ -525,66 +499,19 @@ public ResponseBase createWithResponse(String con * analytics logs when storage analytics logging is enabled. * @param blobContainerEncryptionScope Parameter group. * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws StorageErrorException thrown if the request is rejected by server. + * @throws HttpResponseException thrown if the service returns an error. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ - @ServiceMethod(returns = ReturnType.SINGLE) public void create(String containerName, Integer timeout, Map metadata, PublicAccessType access, String requestId, BlobContainerEncryptionScope blobContainerEncryptionScope) { createWithResponse(containerName, timeout, metadata, access, requestId, blobContainerEncryptionScope, - Context.none()); - } - - /** - * creates a new container under the specified account. If the container with the same name already exists, the - * operation fails. - * - * @param containerName The container name. - * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. - * @param metadata Optional. Specifies a user-defined name-value pair associated with the blob. If no name-value - * pairs are specified, the operation will copy the metadata from the source blob or file to the destination blob. - * If one or more name-value pairs are specified, the destination blob is created with the specified metadata, and - * metadata is not copied from the source blob or file. Note that beginning with version 2009-09-19, metadata names - * must adhere to the naming rules for C# identifiers. See Naming and Referencing Containers, Blobs, and Metadata - * for more information. - * @param access Specifies whether data in the container may be accessed publicly and the level of access. - * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. - * @param blobContainerEncryptionScope Parameter group. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws StorageErrorException 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 Response createNoCustomHeadersWithResponse(String containerName, Integer timeout, - Map metadata, PublicAccessType access, String requestId, - BlobContainerEncryptionScope blobContainerEncryptionScope, Context context) { - final String restype = "container"; - final String accept = "application/xml"; - String defaultEncryptionScopeInternal = null; - 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); + RequestOptions.none()); } /** * returns all user-defined metadata and system properties for the specified container. The data returned does not * include the container's list of blobs. - * + * * @param containerName The container name. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting @@ -592,25 +519,24 @@ public Response createNoCustomHeadersWithResponse(String containerName, In * @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. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws StorageErrorException thrown if the request is rejected by server. + * @throws HttpResponseException thrown if the service returns an error. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link ResponseBase}. + * @return the response. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ResponseBase getPropertiesWithResponse(String containerName, - Integer timeout, String leaseId, String requestId, Context context) { + public Response getPropertiesWithResponse(String containerName, Integer timeout, String leaseId, + String requestId, RequestOptions requestOptions) { final String restype = "container"; final String accept = "application/xml"; - return service.getPropertiesSync(this.client.getUrl(), containerName, restype, timeout, leaseId, - this.client.getVersion(), requestId, accept, context); + return service.getProperties(this.client.getUrl(), containerName, restype, timeout, leaseId, + this.client.getVersion(), requestId, accept, 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. - * + * * @param containerName The container name. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting @@ -619,44 +545,17 @@ public ResponseBase getPropertiesWithRespo * @param requestId Provides 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 StorageErrorException thrown if the request is rejected by server. + * @throws HttpResponseException thrown if the service returns an error. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ - @ServiceMethod(returns = ReturnType.SINGLE) public void getProperties(String containerName, Integer timeout, String leaseId, String requestId) { - getPropertiesWithResponse(containerName, timeout, leaseId, requestId, Context.none()); - } - - /** - * returns all user-defined metadata and system properties for the specified container. The data returned does not - * include the container's list of blobs. - * - * @param containerName The container name. - * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. - * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. - * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws StorageErrorException 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 Response getPropertiesNoCustomHeadersWithResponse(String containerName, Integer timeout, - String leaseId, String requestId, Context context) { - final String restype = "container"; - final String accept = "application/xml"; - return service.getPropertiesNoCustomHeadersSync(this.client.getUrl(), containerName, restype, timeout, leaseId, - this.client.getVersion(), requestId, accept, context); + getPropertiesWithResponse(containerName, timeout, leaseId, requestId, RequestOptions.none()); } /** * operation marks the specified container for deletion. The container and any blobs contained within it are later * deleted during garbage collection. - * + * * @param containerName The container name. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting @@ -668,30 +567,29 @@ public Response getPropertiesNoCustomHeadersWithResponse(String containerN * 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. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws StorageErrorException thrown if the request is rejected by server. + * @throws HttpResponseException thrown if the service returns an error. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link ResponseBase}. + * @return the response. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ResponseBase deleteWithResponse(String containerName, Integer timeout, - String leaseId, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String requestId, - Context context) { + public Response deleteWithResponse(String containerName, Integer timeout, String leaseId, + OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String requestId, + RequestOptions requestOptions) { 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); + return service.delete(this.client.getUrl(), containerName, restype, timeout, leaseId, ifModifiedSinceConverted, + ifUnmodifiedSinceConverted, this.client.getVersion(), requestId, accept, requestOptions); } /** * operation marks the specified container for deletion. The container and any blobs contained within it are later * deleted during garbage collection. - * + * * @param containerName The container name. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting @@ -704,53 +602,18 @@ public ResponseBase deleteWithResponse(String con * @param requestId Provides 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 StorageErrorException thrown if the request is rejected by server. + * @throws HttpResponseException thrown if the service returns an error. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ - @ServiceMethod(returns = ReturnType.SINGLE) public void delete(String containerName, Integer timeout, String leaseId, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String requestId) { deleteWithResponse(containerName, timeout, leaseId, ifModifiedSince, ifUnmodifiedSince, requestId, - Context.none()); - } - - /** - * operation marks the specified container for deletion. The container and any blobs contained within it are later - * deleted during garbage collection. - * - * @param containerName The container name. - * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. - * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. - * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the - * specified date/time. - * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since - * the specified date/time. - * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws StorageErrorException 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 Response deleteNoCustomHeadersWithResponse(String containerName, Integer timeout, String leaseId, - OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String requestId, Context context) { - final String restype = "container"; - final String accept = "application/xml"; - DateTimeRfc1123 ifModifiedSinceConverted - = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); - DateTimeRfc1123 ifUnmodifiedSinceConverted - = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - return service.deleteNoCustomHeadersSync(this.client.getUrl(), containerName, restype, timeout, leaseId, - ifModifiedSinceConverted, ifUnmodifiedSinceConverted, this.client.getVersion(), requestId, accept, context); + RequestOptions.none()); } /** * operation sets one or more user-defined name-value pairs for the specified container. - * + * * @param containerName The container name. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting @@ -766,28 +629,26 @@ public Response deleteNoCustomHeadersWithResponse(String containerName, In * 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. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws StorageErrorException thrown if the request is rejected by server. + * @throws HttpResponseException thrown if the service returns an error. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link ResponseBase}. + * @return the response. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ResponseBase setMetadataWithResponse(String containerName, - Integer timeout, String leaseId, Map metadata, OffsetDateTime ifModifiedSince, String requestId, - Context context) { + public Response setMetadataWithResponse(String containerName, Integer timeout, String leaseId, + Map metadata, OffsetDateTime ifModifiedSince, String requestId, RequestOptions requestOptions) { 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); + return service.setMetadata(this.client.getUrl(), containerName, restype, comp, timeout, leaseId, metadata, + ifModifiedSinceConverted, this.client.getVersion(), requestId, accept, requestOptions); } /** * operation sets one or more user-defined name-value pairs for the specified container. - * + * * @param containerName The container name. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting @@ -804,55 +665,19 @@ public ResponseBase setMetadataWithResponse( * @param requestId Provides 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 StorageErrorException thrown if the request is rejected by server. + * @throws HttpResponseException thrown if the service returns an error. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ - @ServiceMethod(returns = ReturnType.SINGLE) public void setMetadata(String containerName, Integer timeout, String leaseId, Map metadata, OffsetDateTime ifModifiedSince, String requestId) { - setMetadataWithResponse(containerName, timeout, leaseId, metadata, ifModifiedSince, requestId, Context.none()); - } - - /** - * operation sets one or more user-defined name-value pairs for the specified container. - * - * @param containerName The container name. - * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. - * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. - * @param metadata Optional. Specifies a user-defined name-value pair associated with the blob. If no name-value - * pairs are specified, the operation will copy the metadata from the source blob or file to the destination blob. - * If one or more name-value pairs are specified, the destination blob is created with the specified metadata, and - * metadata is not copied from the source blob or file. Note that beginning with version 2009-09-19, metadata names - * must adhere to the naming rules for C# identifiers. See Naming and Referencing Containers, Blobs, and Metadata - * for more information. - * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the - * specified date/time. - * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws StorageErrorException 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 Response setMetadataNoCustomHeadersWithResponse(String containerName, Integer timeout, String leaseId, - Map metadata, OffsetDateTime ifModifiedSince, String requestId, Context context) { - final String restype = "container"; - final String comp = "metadata"; - final String accept = "application/xml"; - DateTimeRfc1123 ifModifiedSinceConverted - = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); - return service.setMetadataNoCustomHeadersSync(this.client.getUrl(), containerName, restype, comp, timeout, - leaseId, metadata, ifModifiedSinceConverted, this.client.getVersion(), requestId, accept, context); + setMetadataWithResponse(containerName, timeout, leaseId, metadata, ifModifiedSince, requestId, + RequestOptions.none()); } /** * gets the permissions for the specified container. The permissions indicate whether container data may be accessed * publicly. - * + * * @param containerName The container name. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting @@ -860,26 +685,25 @@ public Response setMetadataNoCustomHeadersWithResponse(String containerNam * @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. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws StorageErrorException thrown if the request is rejected by server. + * @throws HttpResponseException thrown if the service returns an error. * @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}. + * @return the permissions for the specified container. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ResponseBase getAccessPolicyWithResponse( - String containerName, Integer timeout, String leaseId, String requestId, Context context) { + public Response getAccessPolicyWithResponse(String containerName, Integer timeout, + String leaseId, String requestId, RequestOptions requestOptions) { 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); + return service.getAccessPolicy(this.client.getUrl(), containerName, restype, comp, timeout, leaseId, + this.client.getVersion(), requestId, accept, requestOptions); } /** * gets the permissions for the specified container. The permissions indicate whether container data may be accessed * publicly. - * + * * @param containerName The container name. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting @@ -888,47 +712,20 @@ public ResponseBase getAccessPolicyNoCustomHeadersWithResponse(String containerName, - Integer timeout, String leaseId, String requestId, Context context) { - final String restype = "container"; - final String comp = "acl"; - final String accept = "application/xml"; - return service.getAccessPolicyNoCustomHeadersSync(this.client.getUrl(), containerName, restype, comp, timeout, - leaseId, this.client.getVersion(), requestId, accept, context); + return getAccessPolicyWithResponse(containerName, timeout, leaseId, requestId, RequestOptions.none()) + .getValue(); } /** * sets the permissions for the specified container. The permissions indicate whether blobs in a container may be * accessed publicly. - * + * * @param containerName The container name. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting @@ -942,16 +739,15 @@ public Response getAccessPolicyNoCustomHeadersWithR * @param requestId Provides a 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. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws StorageErrorException thrown if the request is rejected by server. + * @throws HttpResponseException thrown if the service returns an error. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link ResponseBase}. + * @return the response. */ - @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) { + public Response setAccessPolicyWithResponse(String containerName, Integer timeout, String leaseId, + PublicAccessType access, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String requestId, + List containerAcl, RequestOptions requestOptions) { final String restype = "container"; final String comp = "acl"; final String accept = "application/xml"; @@ -960,15 +756,15 @@ public ResponseBase setAccessPolicyWithR DateTimeRfc1123 ifUnmodifiedSinceConverted = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); BlobSignedIdentifierWrapper containerAclConverted = new BlobSignedIdentifierWrapper(containerAcl); - return service.setAccessPolicySync(this.client.getUrl(), containerName, restype, comp, timeout, leaseId, access, + return service.setAccessPolicy(this.client.getUrl(), containerName, restype, comp, timeout, leaseId, access, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, this.client.getVersion(), requestId, - containerAclConverted, accept, context); + containerAclConverted, accept, requestOptions); } /** * sets the permissions for the specified container. The permissions indicate whether blobs in a container may be * accessed publicly. - * + * * @param containerName The container name. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting @@ -983,60 +779,19 @@ public ResponseBase setAccessPolicyWithR * analytics logs when storage analytics logging is enabled. * @param containerAcl the acls for the container. * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws StorageErrorException thrown if the request is rejected by server. + * @throws HttpResponseException thrown if the service returns an error. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ - @ServiceMethod(returns = ReturnType.SINGLE) public void setAccessPolicy(String containerName, Integer timeout, String leaseId, PublicAccessType access, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String requestId, List containerAcl) { setAccessPolicyWithResponse(containerName, timeout, leaseId, access, ifModifiedSince, ifUnmodifiedSince, - requestId, containerAcl, Context.none()); - } - - /** - * sets the permissions for the specified container. The permissions indicate whether blobs in a container may be - * accessed publicly. - * - * @param containerName The container name. - * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. - * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. - * @param access Specifies whether data in the container may be accessed publicly and the level of access. - * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the - * specified date/time. - * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since - * the specified date/time. - * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. - * @param containerAcl the acls for the container. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws StorageErrorException 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 Response setAccessPolicyNoCustomHeadersWithResponse(String containerName, Integer timeout, - String leaseId, PublicAccessType access, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, - String requestId, List containerAcl, Context context) { - final String restype = "container"; - final String comp = "acl"; - final String accept = "application/xml"; - DateTimeRfc1123 ifModifiedSinceConverted - = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); - DateTimeRfc1123 ifUnmodifiedSinceConverted - = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - 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); + requestId, containerAcl, RequestOptions.none()); } /** * Restores a previously-deleted container. - * + * * @param containerName The container name. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting @@ -1047,25 +802,24 @@ public Response setAccessPolicyNoCustomHeadersWithResponse(String containe * 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. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws StorageErrorException thrown if the request is rejected by server. + * @throws HttpResponseException thrown if the service returns an error. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link ResponseBase}. + * @return the response. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ResponseBase restoreWithResponse(String containerName, Integer timeout, - String requestId, String deletedContainerName, String deletedContainerVersion, Context context) { + public Response restoreWithResponse(String containerName, Integer timeout, String requestId, + String deletedContainerName, String deletedContainerVersion, RequestOptions requestOptions) { 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); + return service.restore(this.client.getUrl(), containerName, restype, comp, timeout, this.client.getVersion(), + requestId, deletedContainerName, deletedContainerVersion, accept, requestOptions); } /** * Restores a previously-deleted container. - * + * * @param containerName The container name. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting @@ -1077,48 +831,18 @@ public ResponseBase restoreWithResponse(String c * @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 StorageErrorException thrown if the request is rejected by server. + * @throws HttpResponseException thrown if the service returns an error. * @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://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. - * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. - * @param deletedContainerName Optional. Version 2019-12-12 and later. Specifies the name of the deleted container - * to restore. - * @param deletedContainerVersion Optional. Version 2019-12-12 and later. Specifies the version of the deleted - * container to restore. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws StorageErrorException 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 Response restoreNoCustomHeadersWithResponse(String containerName, Integer timeout, String requestId, - String deletedContainerName, String deletedContainerVersion, Context context) { - final String restype = "container"; - final String comp = "undelete"; - final String accept = "application/xml"; - return service.restoreNoCustomHeadersSync(this.client.getUrl(), containerName, restype, comp, timeout, - this.client.getVersion(), requestId, deletedContainerName, deletedContainerVersion, accept, context); + RequestOptions.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 @@ -1128,25 +852,24 @@ public Response restoreNoCustomHeadersWithResponse(String containerName, I * 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. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws StorageErrorException thrown if the request is rejected by server. + * @throws HttpResponseException thrown if the service returns an error. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link ResponseBase}. + * @return the response. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ResponseBase renameWithResponse(String containerName, - String sourceContainerName, Integer timeout, String requestId, String sourceLeaseId, Context context) { + public Response renameWithResponse(String containerName, String sourceContainerName, Integer timeout, + String requestId, String sourceLeaseId, RequestOptions requestOptions) { 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); + return service.rename(this.client.getUrl(), containerName, restype, comp, timeout, this.client.getVersion(), + requestId, sourceContainerName, sourceLeaseId, accept, requestOptions); } /** * 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 @@ -1157,46 +880,18 @@ public ResponseBase renameWithResponse(String con * @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 StorageErrorException thrown if the request is rejected by server. + * @throws HttpResponseException thrown if the service returns an error. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ - @ServiceMethod(returns = ReturnType.SINGLE) public void rename(String containerName, String sourceContainerName, Integer timeout, String requestId, String sourceLeaseId) { - renameWithResponse(containerName, sourceContainerName, timeout, requestId, sourceLeaseId, Context.none()); - } - - /** - * Renames an existing container. - * - * @param containerName The container name. - * @param sourceContainerName Required. Specifies the name of the container to rename. - * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. - * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. - * @param sourceLeaseId A lease ID for the source path. If specified, the source path must have an active lease and - * the lease ID must match. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws StorageErrorException 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 Response renameNoCustomHeadersWithResponse(String containerName, String sourceContainerName, - Integer timeout, String requestId, String sourceLeaseId, Context context) { - final String restype = "container"; - final String comp = "rename"; - final String accept = "application/xml"; - return service.renameNoCustomHeadersSync(this.client.getUrl(), containerName, restype, comp, timeout, - this.client.getVersion(), requestId, sourceContainerName, sourceLeaseId, accept, context); + renameWithResponse(containerName, sourceContainerName, timeout, requestId, sourceLeaseId, + RequestOptions.none()); } /** * 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. @@ -1207,26 +902,25 @@ public Response renameNoCustomHeadersWithResponse(String containerName, St * Timeouts for Blob Service Operations.</a>. * @param requestId Provides a 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. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws StorageErrorException thrown if the request is rejected by server. + * @throws HttpResponseException thrown if the service returns an error. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response body along with {@link ResponseBase}. + * @return the response. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ResponseBase submitBatchWithResponse(String containerName, - long contentLength, String multipartContentType, BinaryData body, Integer timeout, String requestId, - Context context) { + public Response submitBatchWithResponse(String containerName, long contentLength, + String multipartContentType, BinaryData body, Integer timeout, String requestId, + RequestOptions requestOptions) { 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); + return service.submitBatch(this.client.getUrl(), containerName, restype, comp, contentLength, + multipartContentType, timeout, this.client.getVersion(), requestId, body, accept, requestOptions); } /** * 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. @@ -1238,50 +932,20 @@ public ResponseBase submitBatchWithRe * @param requestId Provides 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 StorageErrorException thrown if the request is rejected by server. + * @throws HttpResponseException thrown if the service returns an error. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the response. */ - @ServiceMethod(returns = ReturnType.SINGLE) public InputStream submitBatch(String containerName, long contentLength, String multipartContentType, BinaryData body, Integer timeout, String requestId) { return submitBatchWithResponse(containerName, contentLength, multipartContentType, body, timeout, requestId, - Context.none()).getValue(); - } - - /** - * The Batch operation allows multiple API calls to be embedded into a single HTTP request. - * - * @param containerName The container name. - * @param contentLength The length of the request. - * @param multipartContentType Required. The value of this header must be multipart/mixed with a batch boundary. - * Example header value: multipart/mixed; boundary=batch_<GUID>. - * @param body Initial data. - * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. - * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws StorageErrorException 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 Response submitBatchNoCustomHeadersWithResponse(String containerName, long contentLength, - String multipartContentType, BinaryData body, Integer timeout, String requestId, Context context) { - final String restype = "container"; - final String comp = "batch"; - final String accept = "application/xml"; - return service.submitBatchNoCustomHeadersSync(this.client.getUrl(), containerName, restype, comp, contentLength, - multipartContentType, timeout, this.client.getVersion(), requestId, body, accept, context); + RequestOptions.none()).getValue(); } /** * The Filter Blobs operation enables callers to list blobs in a container whose tags match a given search * expression. Filter blobs searches within the given container. - * + * * @param containerName The container name. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting @@ -1300,16 +964,15 @@ public Response submitBatchNoCustomHeadersWithResponse(String conta * 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. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws StorageErrorException thrown if the request is rejected by server. + * @throws HttpResponseException thrown if the service returns an error. * @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}. + * @return the result of a Filter Blobs API call. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ResponseBase filterBlobsWithResponse(String containerName, - Integer timeout, String requestId, String where, String marker, Integer maxresults, - List include, Context context) { + public Response filterBlobsWithResponse(String containerName, Integer timeout, String requestId, + String where, String marker, Integer maxresults, List include, + RequestOptions requestOptions) { final String restype = "container"; final String comp = "blobs"; final String accept = "application/xml"; @@ -1318,14 +981,14 @@ public ResponseBase filterBlobs : include.stream() .map(paramItemValue -> Objects.toString(paramItemValue, "")) .collect(Collectors.joining(",")); - return service.filterBlobsSync(this.client.getUrl(), containerName, restype, comp, timeout, - this.client.getVersion(), requestId, where, marker, maxresults, includeConverted, accept, context); + return service.filterBlobs(this.client.getUrl(), containerName, restype, comp, timeout, + this.client.getVersion(), requestId, where, marker, maxresults, includeConverted, accept, requestOptions); } /** * The Filter Blobs operation enables callers to list blobs in a container whose tags match a given search * expression. Filter blobs searches within the given container. - * + * * @param containerName The container name. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting @@ -1345,65 +1008,20 @@ public ResponseBase filterBlobs * 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 StorageErrorException thrown if the request is rejected by server. + * @throws HttpResponseException thrown if the service returns an error. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the result of a Filter Blobs API call. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public FilterBlobSegment filterBlobs(String containerName, Integer timeout, String requestId, String where, - String marker, Integer maxresults, List include) { - return filterBlobsWithResponse(containerName, timeout, requestId, where, marker, maxresults, include, - Context.none()).getValue(); - } - - /** - * The Filter Blobs operation enables callers to list blobs in a container whose tags match a given search - * expression. Filter blobs searches within the given container. - * - * @param containerName The container name. - * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. - * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. - * @param where Filters the results to return only to return only blobs whose tags match the specified expression. - * @param marker A string value that identifies the portion of the list of containers to be returned with the next - * listing operation. The operation returns the NextMarker value within the response body if the listing operation - * did not return all containers remaining to be listed with the current page. The NextMarker value can be used as - * the value for the marker parameter in a subsequent call to request the next page of list items. The marker value - * is opaque to the client. - * @param maxresults Specifies the maximum number of containers to return. If the request does not specify - * maxresults, or specifies a value greater than 5000, the server will return up to 5000 items. Note that if the - * listing operation crosses a partition boundary, then the service will return a continuation token for retrieving - * the remainder of the results. For this reason, it is possible that the service will return fewer results than - * specified by maxresults, or than the default of 5000. - * @param include Include this parameter to specify one or more datasets to include in the response. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws StorageErrorException 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 Response filterBlobsNoCustomHeadersWithResponse(String containerName, Integer timeout, - String requestId, String where, String marker, Integer maxresults, List include, - Context context) { - final String restype = "container"; - final String comp = "blobs"; - final String accept = "application/xml"; - String includeConverted = (include == null) - ? null - : include.stream() - .map(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); + public FilterBlobSegment filterBlobs(String containerName, Integer timeout, String requestId, String where, + String marker, Integer maxresults, List include) { + return filterBlobsWithResponse(containerName, timeout, requestId, where, marker, maxresults, include, + RequestOptions.none()).getValue(); } /** * [Update] establishes and manages a lock on a container for delete operations. The lock duration can be 15 to 60 * seconds, or can be infinite. - * + * * @param containerName The container name. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting @@ -1420,16 +1038,15 @@ public Response filterBlobsNoCustomHeadersWithResponse(String * 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. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws StorageErrorException thrown if the request is rejected by server. + * @throws HttpResponseException thrown if the service returns an error. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link ResponseBase}. + * @return the response. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ResponseBase acquireLeaseWithResponse(String containerName, - Integer timeout, Integer duration, String proposedLeaseId, OffsetDateTime ifModifiedSince, - OffsetDateTime ifUnmodifiedSince, String requestId, Context context) { + public Response acquireLeaseWithResponse(String containerName, Integer timeout, Integer duration, + String proposedLeaseId, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String requestId, + RequestOptions requestOptions) { final String comp = "lease"; final String restype = "container"; final String action = "acquire"; @@ -1438,15 +1055,15 @@ public ResponseBase acquireLeaseWithRespons = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); DateTimeRfc1123 ifUnmodifiedSinceConverted = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - return service.acquireLeaseSync(this.client.getUrl(), containerName, comp, restype, action, timeout, duration, + return service.acquireLease(this.client.getUrl(), containerName, comp, restype, action, timeout, duration, proposedLeaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, this.client.getVersion(), requestId, - accept, context); + accept, requestOptions); } /** * [Update] establishes and manages a lock on a container for delete operations. The lock duration can be 15 to 60 * seconds, or can be infinite. - * + * * @param containerName The container name. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting @@ -1464,63 +1081,19 @@ public ResponseBase acquireLeaseWithRespons * @param requestId Provides 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 StorageErrorException thrown if the request is rejected by server. + * @throws HttpResponseException thrown if the service returns an error. * @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://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. - * @param duration Specifies the duration of the lease, in seconds, or negative one (-1) for a lease that never - * expires. A non-infinite lease can be between 15 and 60 seconds. A lease duration cannot be changed using renew or - * change. - * @param proposedLeaseId Proposed lease ID, in a GUID string format. The Blob service returns 400 (Invalid request) - * if the proposed lease ID is not in the correct format. See Guid Constructor (String) for a list of valid GUID - * string formats. - * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the - * specified date/time. - * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since - * the specified date/time. - * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws StorageErrorException 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 Response acquireLeaseNoCustomHeadersWithResponse(String containerName, Integer timeout, - Integer duration, String proposedLeaseId, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, - String requestId, Context context) { - final String comp = "lease"; - final String restype = "container"; - final String action = "acquire"; - final String accept = "application/xml"; - DateTimeRfc1123 ifModifiedSinceConverted - = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); - DateTimeRfc1123 ifUnmodifiedSinceConverted - = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - return service.acquireLeaseNoCustomHeadersSync(this.client.getUrl(), containerName, comp, restype, action, - timeout, duration, proposedLeaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, - this.client.getVersion(), requestId, accept, context); + requestId, RequestOptions.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 @@ -1532,16 +1105,15 @@ public Response acquireLeaseNoCustomHeadersWithResponse(String containerNa * 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. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws StorageErrorException thrown if the request is rejected by server. + * @throws HttpResponseException thrown if the service returns an error. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link ResponseBase}. + * @return the response. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ResponseBase releaseLeaseWithResponse(String containerName, - String leaseId, Integer timeout, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, - String requestId, Context context) { + public Response releaseLeaseWithResponse(String containerName, String leaseId, Integer timeout, + OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String requestId, + RequestOptions requestOptions) { final String comp = "lease"; final String restype = "container"; final String action = "release"; @@ -1550,14 +1122,15 @@ public ResponseBase releaseLeaseWithRespons = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); DateTimeRfc1123 ifUnmodifiedSinceConverted = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - return service.releaseLeaseSync(this.client.getUrl(), containerName, comp, restype, action, timeout, leaseId, - ifModifiedSinceConverted, ifUnmodifiedSinceConverted, this.client.getVersion(), requestId, accept, context); + return service.releaseLease(this.client.getUrl(), containerName, comp, restype, action, timeout, leaseId, + ifModifiedSinceConverted, ifUnmodifiedSinceConverted, this.client.getVersion(), requestId, accept, + requestOptions); } /** * [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 @@ -1570,20 +1143,19 @@ public ResponseBase releaseLeaseWithRespons * @param requestId Provides 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 StorageErrorException thrown if the request is rejected by server. + * @throws HttpResponseException thrown if the service returns an error. * @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()); + RequestOptions.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 @@ -1595,53 +1167,15 @@ public void releaseLease(String containerName, String leaseId, Integer timeout, * 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. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws StorageErrorException thrown if the request is rejected by server. + * @throws HttpResponseException thrown if the service returns an error. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the response. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response releaseLeaseNoCustomHeadersWithResponse(String containerName, String leaseId, Integer timeout, - OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String requestId, Context context) { - final String comp = "lease"; - final String restype = "container"; - final String action = "release"; - final String accept = "application/xml"; - DateTimeRfc1123 ifModifiedSinceConverted - = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); - DateTimeRfc1123 ifUnmodifiedSinceConverted - = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - return service.releaseLeaseNoCustomHeadersSync(this.client.getUrl(), containerName, comp, restype, action, - timeout, leaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, this.client.getVersion(), requestId, - accept, context); - } - - /** - * [Update] establishes and manages a lock on a container for delete operations. The lock duration can be 15 to 60 - * seconds, or can be infinite. - * - * @param containerName The container name. - * @param leaseId Specifies the current lease ID on the resource. - * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. - * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the - * specified date/time. - * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since - * the specified date/time. - * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws StorageErrorException thrown if 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) { + public Response renewLeaseWithResponse(String containerName, String leaseId, Integer timeout, + OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String requestId, + RequestOptions requestOptions) { final String comp = "lease"; final String restype = "container"; final String action = "renew"; @@ -1650,14 +1184,15 @@ public ResponseBase renewLeaseWithResponse(St = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); DateTimeRfc1123 ifUnmodifiedSinceConverted = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - return service.renewLeaseSync(this.client.getUrl(), containerName, comp, restype, action, timeout, leaseId, - ifModifiedSinceConverted, ifUnmodifiedSinceConverted, this.client.getVersion(), requestId, accept, context); + return service.renewLease(this.client.getUrl(), containerName, comp, restype, action, timeout, leaseId, + ifModifiedSinceConverted, ifUnmodifiedSinceConverted, this.client.getVersion(), requestId, accept, + requestOptions); } /** * [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 @@ -1670,57 +1205,19 @@ public ResponseBase renewLeaseWithResponse(St * @param requestId Provides 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 StorageErrorException thrown if the request is rejected by server. + * @throws HttpResponseException thrown if the service returns an error. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ - @ServiceMethod(returns = ReturnType.SINGLE) public void renewLease(String containerName, String leaseId, Integer timeout, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String requestId) { renewLeaseWithResponse(containerName, leaseId, timeout, ifModifiedSince, ifUnmodifiedSince, requestId, - Context.none()); - } - - /** - * [Update] establishes and manages a lock on a container for delete operations. The lock duration can be 15 to 60 - * seconds, or can be infinite. - * - * @param containerName The container name. - * @param leaseId Specifies the current lease ID on the resource. - * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. - * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the - * specified date/time. - * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since - * the specified date/time. - * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws StorageErrorException 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 Response renewLeaseNoCustomHeadersWithResponse(String containerName, String leaseId, Integer timeout, - OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String requestId, Context context) { - final String comp = "lease"; - final String restype = "container"; - final String action = "renew"; - final String accept = "application/xml"; - DateTimeRfc1123 ifModifiedSinceConverted - = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); - DateTimeRfc1123 ifUnmodifiedSinceConverted - = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - return service.renewLeaseNoCustomHeadersSync(this.client.getUrl(), containerName, comp, restype, action, - timeout, leaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, this.client.getVersion(), requestId, - accept, context); + RequestOptions.none()); } /** * [Update] establishes and manages a lock on a container for delete operations. The lock duration can be 15 to 60 * seconds, or can be infinite. - * + * * @param containerName The container name. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting @@ -1737,16 +1234,15 @@ public Response renewLeaseNoCustomHeadersWithResponse(String containerName * 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. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws StorageErrorException thrown if the request is rejected by server. + * @throws HttpResponseException thrown if the service returns an error. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link ResponseBase}. + * @return the response. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ResponseBase breakLeaseWithResponse(String containerName, Integer timeout, - Integer breakPeriod, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String requestId, - Context context) { + public Response breakLeaseWithResponse(String containerName, Integer timeout, Integer breakPeriod, + OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String requestId, + RequestOptions requestOptions) { final String comp = "lease"; final String restype = "container"; final String action = "break"; @@ -1755,14 +1251,15 @@ public ResponseBase breakLeaseWithResponse(St = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); DateTimeRfc1123 ifUnmodifiedSinceConverted = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - return service.breakLeaseSync(this.client.getUrl(), containerName, comp, restype, action, timeout, breakPeriod, - ifModifiedSinceConverted, ifUnmodifiedSinceConverted, this.client.getVersion(), requestId, accept, context); + return service.breakLease(this.client.getUrl(), containerName, comp, restype, action, timeout, breakPeriod, + ifModifiedSinceConverted, ifUnmodifiedSinceConverted, this.client.getVersion(), requestId, accept, + requestOptions); } /** * [Update] establishes and manages a lock on a container for delete operations. The lock duration can be 15 to 60 * seconds, or can be infinite. - * + * * @param containerName The container name. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting @@ -1780,63 +1277,19 @@ public ResponseBase breakLeaseWithResponse(St * @param requestId Provides 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 StorageErrorException thrown if the request is rejected by server. + * @throws HttpResponseException thrown if the service returns an error. * @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://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. - * @param breakPeriod For a break operation, proposed duration the lease should continue before it is broken, in - * seconds, between 0 and 60. This break period is only used if it is shorter than the time remaining on the lease. - * If longer, the time remaining on the lease is used. A new lease will not be available before the break period has - * expired, but the lease may be held for longer than the break period. If this header does not appear with a break - * operation, a fixed-duration lease breaks after the remaining lease period elapses, and an infinite lease breaks - * immediately. - * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the - * specified date/time. - * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since - * the specified date/time. - * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws StorageErrorException 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 Response breakLeaseNoCustomHeadersWithResponse(String containerName, Integer timeout, - Integer breakPeriod, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String requestId, - Context context) { - final String comp = "lease"; - final String restype = "container"; - final String action = "break"; - final String accept = "application/xml"; - DateTimeRfc1123 ifModifiedSinceConverted - = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); - DateTimeRfc1123 ifUnmodifiedSinceConverted - = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - return service.breakLeaseNoCustomHeadersSync(this.client.getUrl(), containerName, comp, restype, action, - timeout, breakPeriod, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, this.client.getVersion(), - requestId, accept, context); + RequestOptions.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) @@ -1851,16 +1304,15 @@ public Response breakLeaseNoCustomHeadersWithResponse(String containerName * 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. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws StorageErrorException thrown if the request is rejected by server. + * @throws HttpResponseException thrown if the service returns an error. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link ResponseBase}. + * @return the response. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ResponseBase changeLeaseWithResponse(String containerName, - String leaseId, String proposedLeaseId, Integer timeout, OffsetDateTime ifModifiedSince, - OffsetDateTime ifUnmodifiedSince, String requestId, Context context) { + public Response changeLeaseWithResponse(String containerName, String leaseId, String proposedLeaseId, + Integer timeout, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String requestId, + RequestOptions requestOptions) { final String comp = "lease"; final String restype = "container"; final String action = "change"; @@ -1869,15 +1321,15 @@ public ResponseBase changeLeaseWithResponse( = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); DateTimeRfc1123 ifUnmodifiedSinceConverted = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - return service.changeLeaseSync(this.client.getUrl(), containerName, comp, restype, action, timeout, leaseId, + return service.changeLease(this.client.getUrl(), containerName, comp, restype, action, timeout, leaseId, proposedLeaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, this.client.getVersion(), requestId, - accept, context); + accept, requestOptions); } /** * [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) @@ -1893,60 +1345,18 @@ public ResponseBase changeLeaseWithResponse( * @param requestId Provides 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 StorageErrorException thrown if the request is rejected by server. + * @throws HttpResponseException thrown if the service returns an error. * @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://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. - * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the - * specified date/time. - * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since - * the specified date/time. - * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws StorageErrorException 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 Response changeLeaseNoCustomHeadersWithResponse(String containerName, String leaseId, - String proposedLeaseId, Integer timeout, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, - String requestId, Context context) { - final String comp = "lease"; - final String restype = "container"; - final String action = "change"; - final String accept = "application/xml"; - DateTimeRfc1123 ifModifiedSinceConverted - = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); - DateTimeRfc1123 ifUnmodifiedSinceConverted - = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - return service.changeLeaseNoCustomHeadersSync(this.client.getUrl(), containerName, comp, restype, action, - timeout, leaseId, proposedLeaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, - this.client.getVersion(), requestId, accept, context); + requestId, RequestOptions.none()); } /** * [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 @@ -1965,16 +1375,15 @@ public Response changeLeaseNoCustomHeadersWithResponse(String containerNam * Timeouts for Blob Service Operations.</a>. * @param requestId Provides a 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. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws StorageErrorException thrown if the request is rejected by server. + * @throws HttpResponseException thrown if the service returns an error. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an enumeration of blobs along with {@link ResponseBase}. + * @return an enumeration of blobs. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ResponseBase - listBlobFlatSegmentWithResponse(String containerName, String prefix, String marker, Integer maxresults, - List include, Integer timeout, String requestId, Context context) { + public Response listBlobFlatSegmentWithResponse(String containerName, String prefix, + String marker, Integer maxresults, List include, Integer timeout, String requestId, + RequestOptions requestOptions) { final String restype = "container"; final String comp = "list"; final String accept = "application/xml"; @@ -1983,13 +1392,13 @@ public Response changeLeaseNoCustomHeadersWithResponse(String containerNam : include.stream() .map(paramItemValue -> Objects.toString(paramItemValue, "")) .collect(Collectors.joining(",")); - return service.listBlobFlatSegmentSync(this.client.getUrl(), containerName, restype, comp, prefix, marker, - maxresults, includeConverted, timeout, this.client.getVersion(), requestId, accept, context); + return service.listBlobFlatSegment(this.client.getUrl(), containerName, restype, comp, prefix, marker, + maxresults, includeConverted, timeout, this.client.getVersion(), requestId, accept, requestOptions); } /** * [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 @@ -2009,64 +1418,19 @@ public Response changeLeaseNoCustomHeadersWithResponse(String containerNam * @param requestId Provides 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 StorageErrorException thrown if the request is rejected by server. + * @throws HttpResponseException thrown if the service returns an error. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return an enumeration of blobs. */ - @ServiceMethod(returns = ReturnType.SINGLE) public ListBlobsFlatSegmentResponse listBlobFlatSegment(String containerName, String prefix, String marker, Integer maxresults, List include, Integer timeout, String requestId) { return listBlobFlatSegmentWithResponse(containerName, prefix, marker, maxresults, include, timeout, requestId, - Context.none()).getValue(); - } - - /** - * [Update] The List Blobs operation returns a list of the blobs under the specified container. - * - * @param containerName The container name. - * @param prefix Filters the results to return only containers whose name begins with the specified prefix. - * @param marker A string value that identifies the portion of the list of containers to be returned with the next - * listing operation. The operation returns the NextMarker value within the response body if the listing operation - * did not return all containers remaining to be listed with the current page. The NextMarker value can be used as - * the value for the marker parameter in a subsequent call to request the next page of list items. The marker value - * is opaque to the client. - * @param maxresults Specifies the maximum number of containers to return. If the request does not specify - * maxresults, or specifies a value greater than 5000, the server will return up to 5000 items. Note that if the - * listing operation crosses a partition boundary, then the service will return a continuation token for retrieving - * the remainder of the results. For this reason, it is possible that the service will return fewer results than - * specified by maxresults, or than the default of 5000. - * @param include Include this parameter to specify one or more datasets to include in the response. - * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. - * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws StorageErrorException 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 Response listBlobFlatSegmentNoCustomHeadersWithResponse(String containerName, - String prefix, String marker, Integer maxresults, List include, Integer timeout, - String requestId, Context context) { - final String restype = "container"; - final String comp = "list"; - final String accept = "application/xml"; - String includeConverted = (include == null) - ? null - : include.stream() - .map(paramItemValue -> Objects.toString(paramItemValue, "")) - .collect(Collectors.joining(",")); - return service.listBlobFlatSegmentNoCustomHeadersSync(this.client.getUrl(), containerName, restype, comp, - prefix, marker, maxresults, includeConverted, timeout, this.client.getVersion(), requestId, accept, - context); + RequestOptions.none()).getValue(); } /** * [Update] The List Blobs operation returns a list of the blobs under the specified container. - * + * * @param containerName The container name. * @param delimiter When the request includes this parameter, the operation returns a BlobPrefix element in the * response body that acts as a placeholder for all blobs whose names begin with the same substring up to the @@ -2088,17 +1452,15 @@ public Response listBlobFlatSegmentNoCustomHeaders * Timeouts for Blob Service Operations.</a>. * @param requestId Provides a 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. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws StorageErrorException thrown if the request is rejected by server. + * @throws HttpResponseException thrown if the service returns an error. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an enumeration of blobs along with {@link ResponseBase}. + * @return an enumeration of blobs. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ResponseBase - listBlobHierarchySegmentWithResponse(String containerName, String delimiter, String prefix, String marker, - Integer maxresults, List include, Integer timeout, String requestId, - Context context) { + public Response listBlobHierarchySegmentWithResponse(String containerName, + String delimiter, String prefix, String marker, Integer maxresults, List include, + Integer timeout, String requestId, RequestOptions requestOptions) { final String restype = "container"; final String comp = "list"; final String accept = "application/xml"; @@ -2107,14 +1469,13 @@ public Response listBlobFlatSegmentNoCustomHeaders : include.stream() .map(paramItemValue -> Objects.toString(paramItemValue, "")) .collect(Collectors.joining(",")); - return service.listBlobHierarchySegmentSync(this.client.getUrl(), containerName, restype, comp, prefix, - delimiter, marker, maxresults, includeConverted, timeout, this.client.getVersion(), requestId, accept, - context); + return service.listBlobHierarchySegment(this.client.getUrl(), containerName, restype, comp, prefix, delimiter, + marker, maxresults, includeConverted, timeout, this.client.getVersion(), requestId, accept, requestOptions); } /** * [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 @@ -2137,95 +1498,44 @@ public Response listBlobFlatSegmentNoCustomHeaders * @param requestId Provides 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 StorageErrorException thrown if the request is rejected by server. + * @throws HttpResponseException thrown if the service returns an error. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return an enumeration of blobs. */ - @ServiceMethod(returns = ReturnType.SINGLE) public ListBlobsHierarchySegmentResponse listBlobHierarchySegment(String containerName, String delimiter, String prefix, String marker, Integer maxresults, List include, Integer timeout, String requestId) { - ResponseBase response - = listBlobHierarchySegmentWithResponse(containerName, delimiter, prefix, marker, maxresults, include, - timeout, requestId, Context.none()); - return response.getValue(); - } - - /** - * [Update] The List Blobs operation returns a list of the blobs under the specified container. - * - * @param containerName The container name. - * @param delimiter When the request includes this parameter, the operation returns a BlobPrefix element in the - * response body that acts as a placeholder for all blobs whose names begin with the same substring up to the - * appearance of the delimiter character. The delimiter may be a single character or a string. - * @param prefix Filters the results to return only containers whose name begins with the specified prefix. - * @param marker A string value that identifies the portion of the list of containers to be returned with the next - * listing operation. The operation returns the NextMarker value within the response body if the listing operation - * did not return all containers remaining to be listed with the current page. The NextMarker value can be used as - * the value for the marker parameter in a subsequent call to request the next page of list items. The marker value - * is opaque to the client. - * @param maxresults Specifies the maximum number of containers to return. If the request does not specify - * maxresults, or specifies a value greater than 5000, the server will return up to 5000 items. Note that if the - * listing operation crosses a partition boundary, then the service will return a continuation token for retrieving - * the remainder of the results. For this reason, it is possible that the service will return fewer results than - * specified by maxresults, or than the default of 5000. - * @param include Include this parameter to specify one or more datasets to include in the response. - * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. - * @param requestId Provides a 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 StorageErrorException 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 Response listBlobHierarchySegmentNoCustomHeadersWithResponse( - String containerName, String delimiter, String prefix, String marker, Integer maxresults, - List include, Integer timeout, String requestId, Context context) { - final String restype = "container"; - final String comp = "list"; - final String accept = "application/xml"; - String includeConverted = (include == null) - ? null - : include.stream() - .map(paramItemValue -> Objects.toString(paramItemValue, "")) - .collect(Collectors.joining(",")); - return service.listBlobHierarchySegmentNoCustomHeadersSync(this.client.getUrl(), containerName, restype, comp, - prefix, delimiter, marker, maxresults, includeConverted, timeout, this.client.getVersion(), requestId, - accept, context); + return listBlobHierarchySegmentWithResponse(containerName, delimiter, prefix, marker, maxresults, include, + timeout, requestId, RequestOptions.none()).getValue(); } /** * Returns the sku name and account kind. - * + * * @param containerName The container name. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting * Timeouts for Blob Service Operations.</a>. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the * analytics logs when storage analytics logging is enabled. - * @param context The context to associate with this operation. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws StorageErrorException thrown if the request is rejected by server. + * @throws HttpResponseException thrown if the service returns an error. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link ResponseBase}. + * @return the response. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ResponseBase getAccountInfoWithResponse(String containerName, - Integer timeout, String requestId, Context context) { + public Response getAccountInfoWithResponse(String containerName, Integer timeout, String requestId, + RequestOptions requestOptions) { 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); + return service.getAccountInfo(this.client.getUrl(), containerName, restype, comp, timeout, + this.client.getVersion(), requestId, accept, requestOptions); } /** * Returns the sku name and account kind. - * + * * @param containerName The container name. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting @@ -2233,36 +1543,10 @@ public ResponseBase getAccountInfoWithRes * @param requestId Provides 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 StorageErrorException thrown if the request is rejected by server. + * @throws HttpResponseException thrown if the service returns an error. * @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://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. - * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws StorageErrorException 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 Response getAccountInfoNoCustomHeadersWithResponse(String containerName, Integer timeout, - String requestId, Context context) { - 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); + getAccountInfoWithResponse(containerName, timeout, requestId, RequestOptions.none()); } } diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/implementation/PageBlobsImpl.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/implementation/PageBlobsImpl.java index bab166d852ea..88f24cf88d5d 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/implementation/PageBlobsImpl.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/implementation/PageBlobsImpl.java @@ -4,43 +4,34 @@ package com.azure.v2.storage.blob.implementation; -import com.azure.v2.core.annotation.ReturnType; -import com.azure.v2.core.annotation.ServiceMethod; -import com.azure.v2.core.http.rest.ResponseBase; import com.azure.v2.storage.blob.models.BlobHttpHeaders; import com.azure.v2.storage.blob.models.BlobImmutabilityPolicyMode; import com.azure.v2.storage.blob.models.CpkInfo; import com.azure.v2.storage.blob.models.EncryptionAlgorithmType; import com.azure.v2.storage.blob.models.EncryptionScope; -import com.azure.v2.storage.blob.models.PageBlobsClearPagesHeaders; -import com.azure.v2.storage.blob.models.PageBlobsCopyIncrementalHeaders; -import com.azure.v2.storage.blob.models.PageBlobsCreateHeaders; -import com.azure.v2.storage.blob.models.PageBlobsGetPageRangesDiffHeaders; -import com.azure.v2.storage.blob.models.PageBlobsGetPageRangesHeaders; -import com.azure.v2.storage.blob.models.PageBlobsResizeHeaders; -import com.azure.v2.storage.blob.models.PageBlobsUpdateSequenceNumberHeaders; -import com.azure.v2.storage.blob.models.PageBlobsUploadPagesFromURLHeaders; -import com.azure.v2.storage.blob.models.PageBlobsUploadPagesHeaders; import com.azure.v2.storage.blob.models.PageList; import com.azure.v2.storage.blob.models.PremiumPageBlobAccessTier; import com.azure.v2.storage.blob.models.SequenceNumberActionType; -import com.azure.v2.storage.blob.models.StorageErrorException; -import io.clientcore.core.annotation.ServiceInterface; +import com.azure.v2.storage.blob.models.StorageError; +import io.clientcore.core.annotations.ServiceInterface; import io.clientcore.core.http.RestProxy; -import io.clientcore.core.http.annotation.BodyParam; -import io.clientcore.core.http.annotation.HeaderParam; -import io.clientcore.core.http.annotation.HostParam; -import io.clientcore.core.http.annotation.HttpRequestInformation; -import io.clientcore.core.http.annotation.PathParam; -import io.clientcore.core.http.annotation.QueryParam; -import io.clientcore.core.http.annotation.UnexpectedResponseExceptionDetail; +import io.clientcore.core.http.annotations.BodyParam; +import io.clientcore.core.http.annotations.HeaderParam; +import io.clientcore.core.http.annotations.HostParam; +import io.clientcore.core.http.annotations.HttpRequestInformation; +import io.clientcore.core.http.annotations.PathParam; +import io.clientcore.core.http.annotations.QueryParam; +import io.clientcore.core.http.annotations.UnexpectedResponseExceptionDetail; +import io.clientcore.core.http.exceptions.HttpResponseException; import io.clientcore.core.http.models.HttpMethod; +import io.clientcore.core.http.models.RequestOptions; import io.clientcore.core.http.models.Response; -import io.clientcore.core.util.Base64Util; -import io.clientcore.core.util.Context; -import io.clientcore.core.util.DateTimeRfc1123; -import io.clientcore.core.util.binarydata.BinaryData; - +import io.clientcore.core.http.pipeline.HttpPipeline; +import io.clientcore.core.models.binarydata.BinaryData; +import io.clientcore.core.serialization.ObjectSerializer; +import io.clientcore.core.utils.Base64Util; +import io.clientcore.core.utils.DateTimeRfc1123; +import java.lang.reflect.InvocationTargetException; import java.time.OffsetDateTime; import java.util.Map; @@ -60,7 +51,7 @@ public final class PageBlobsImpl { /** * Initializes an instance of PageBlobsImpl. - * + * * @param client the instance of the service client containing this operation class. */ PageBlobsImpl(AzureBlobStorageImpl client) { @@ -74,15 +65,26 @@ public final class PageBlobsImpl { */ @ServiceInterface(name = "AzureBlobStoragePage", host = "{url}") public interface PageBlobsService { + static PageBlobsService getNewInstance(HttpPipeline pipeline, ObjectSerializer serializer) { + try { + Class clazz = Class.forName("com.azure.v2.storage.blob.implementation.PageBlobsServiceImpl"); + return (PageBlobsService) clazz.getMethod("getNewInstance", HttpPipeline.class, ObjectSerializer.class) + .invoke(null, pipeline, serializer); + } catch (ClassNotFoundException | NoSuchMethodException | IllegalAccessException + | InvocationTargetException e) { + throw new RuntimeException(e); + } + + } + @HttpRequestInformation( method = HttpMethod.PUT, path = "/{containerName}/{blob}", expectedStatusCodes = { 201 }) - @UnexpectedResponseExceptionDetail - 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, + @UnexpectedResponseExceptionDetail(exceptionBodyClass = StorageError.class) + Response 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, @@ -104,49 +106,32 @@ ResponseBase createSync(@HostParam("url") String u @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); + @HeaderParam("x-ms-legal-hold") Boolean legalHold, @HeaderParam("Accept") String accept, + RequestOptions requestOptions); @HttpRequestInformation( method = HttpMethod.PUT, path = "/{containerName}/{blob}", expectedStatusCodes = { 201 }) - @UnexpectedResponseExceptionDetail - 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, + @UnexpectedResponseExceptionDetail(exceptionBodyClass = StorageError.class) + default void create(@HostParam("url") String url, @PathParam("containerName") String containerName, + @PathParam("blob") String blob, @HeaderParam("x-ms-blob-type") String blobType, @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); + @HeaderParam("x-ms-blob-content-length") long blobContentLength, + @HeaderParam("x-ms-version") String version, @HeaderParam("Accept") String accept) { + create(url, containerName, blob, blobType, null, contentLength, null, null, null, null, null, null, null, + null, null, null, null, null, null, null, null, null, null, null, blobContentLength, null, version, + null, null, null, null, null, accept, null); + } @HttpRequestInformation( method = HttpMethod.PUT, path = "/{containerName}/{blob}", expectedStatusCodes = { 201 }) - @UnexpectedResponseExceptionDetail - 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, + @UnexpectedResponseExceptionDetail(exceptionBodyClass = StorageError.class) + Response 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, @@ -165,48 +150,33 @@ ResponseBase uploadPagesSync(@HostParam("url" @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); + RequestOptions requestOptions); @HttpRequestInformation( method = HttpMethod.PUT, path = "/{containerName}/{blob}", expectedStatusCodes = { 201 }) - @UnexpectedResponseExceptionDetail - 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); + @UnexpectedResponseExceptionDetail(exceptionBodyClass = StorageError.class) + default void 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("x-ms-version") String version, @BodyParam("application/octet-stream") BinaryData body, + @HeaderParam("Accept") String accept) { + uploadPages(url, containerName, blob, comp, pageWrite, contentLength, null, null, null, null, null, null, + null, null, null, null, null, null, null, null, null, null, null, version, null, null, null, body, + accept, null); + } @HttpRequestInformation( method = HttpMethod.PUT, path = "/{containerName}/{blob}", expectedStatusCodes = { 201 }) - @UnexpectedResponseExceptionDetail - 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, + @UnexpectedResponseExceptionDetail(exceptionBodyClass = StorageError.class) + Response 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, @@ -218,38 +188,27 @@ ResponseBase clearPagesSync(@HostParam("url") @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); + RequestOptions requestOptions); @HttpRequestInformation( method = HttpMethod.PUT, path = "/{containerName}/{blob}", expectedStatusCodes = { 201 }) - @UnexpectedResponseExceptionDetail - 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); + @UnexpectedResponseExceptionDetail(exceptionBodyClass = StorageError.class) + default void 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, + @HeaderParam("x-ms-version") String version, @HeaderParam("Accept") String accept) { + clearPages(url, containerName, blob, comp, pageWrite, contentLength, null, null, null, null, null, null, + null, null, null, null, null, null, null, null, null, version, null, accept, null); + } @HttpRequestInformation( method = HttpMethod.PUT, path = "/{containerName}/{blob}", expectedStatusCodes = { 201 }) - @UnexpectedResponseExceptionDetail - ResponseBase uploadPagesFromURLSync(@HostParam("url") String url, + @UnexpectedResponseExceptionDetail(exceptionBodyClass = StorageError.class) + Response 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, @@ -273,47 +232,31 @@ ResponseBase uploadPagesFromURLSync(@H @HeaderParam("x-ms-source-if-none-match") String sourceIfNoneMatch, @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, @HeaderParam("x-ms-copy-source-authorization") String copySourceAuthorization, - @HeaderParam("Accept") String accept, Context context); + @HeaderParam("Accept") String accept, RequestOptions requestOptions); @HttpRequestInformation( method = HttpMethod.PUT, path = "/{containerName}/{blob}", expectedStatusCodes = { 201 }) - @UnexpectedResponseExceptionDetail - Response uploadPagesFromURLNoCustomHeadersSync(@HostParam("url") String url, - @PathParam("containerName") String containerName, @PathParam("blob") String blob, - @QueryParam("comp") String comp, @HeaderParam("x-ms-page-write") String pageWrite, - @HeaderParam("x-ms-copy-source") String sourceUrl, @HeaderParam("x-ms-source-range") String sourceRange, - @HeaderParam("x-ms-source-content-md5") String sourceContentMD5, - @HeaderParam("x-ms-source-content-crc64") String sourceContentcrc64, - @HeaderParam("Content-Length") long contentLength, @QueryParam("timeout") Integer timeout, - @HeaderParam("x-ms-range") String range, @HeaderParam("x-ms-encryption-key") String encryptionKey, - @HeaderParam("x-ms-encryption-key-sha256") String encryptionKeySha256, - @HeaderParam("x-ms-encryption-algorithm") EncryptionAlgorithmType encryptionAlgorithm, - @HeaderParam("x-ms-encryption-scope") String encryptionScope, @HeaderParam("x-ms-lease-id") String leaseId, - @HeaderParam("x-ms-if-sequence-number-le") Long ifSequenceNumberLessThanOrEqualTo, - @HeaderParam("x-ms-if-sequence-number-lt") Long ifSequenceNumberLessThan, - @HeaderParam("x-ms-if-sequence-number-eq") Long ifSequenceNumberEqualTo, - @HeaderParam("If-Modified-Since") DateTimeRfc1123 ifModifiedSince, - @HeaderParam("If-Unmodified-Since") DateTimeRfc1123 ifUnmodifiedSince, - @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch, - @HeaderParam("x-ms-if-tags") String ifTags, - @HeaderParam("x-ms-source-if-modified-since") DateTimeRfc1123 sourceIfModifiedSince, - @HeaderParam("x-ms-source-if-unmodified-since") DateTimeRfc1123 sourceIfUnmodifiedSince, - @HeaderParam("x-ms-source-if-match") String sourceIfMatch, - @HeaderParam("x-ms-source-if-none-match") String sourceIfNoneMatch, - @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, - @HeaderParam("x-ms-copy-source-authorization") String copySourceAuthorization, - @HeaderParam("Accept") String accept, Context context); + @UnexpectedResponseExceptionDetail(exceptionBodyClass = StorageError.class) + default void 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("Content-Length") long contentLength, + @HeaderParam("x-ms-range") String range, @HeaderParam("x-ms-version") String version, + @HeaderParam("Accept") String accept) { + uploadPagesFromURL(url, containerName, blob, comp, pageWrite, sourceUrl, sourceRange, null, null, + contentLength, null, range, null, null, null, null, null, null, null, null, null, null, null, null, + null, null, null, null, null, version, null, null, accept, null); + } @HttpRequestInformation( method = HttpMethod.GET, path = "/{containerName}/{blob}", expectedStatusCodes = { 200 }) - @UnexpectedResponseExceptionDetail - ResponseBase getPageRangesSync(@HostParam("url") String url, - @PathParam("containerName") String containerName, @PathParam("blob") String blob, - @QueryParam("comp") String comp, @QueryParam("snapshot") String snapshot, + @UnexpectedResponseExceptionDetail(exceptionBodyClass = StorageError.class) + Response 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, @@ -321,31 +264,27 @@ ResponseBase getPageRangesSync(@HostPar @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); + @QueryParam("maxresults") Integer maxresults, @HeaderParam("Accept") String accept, + RequestOptions requestOptions); @HttpRequestInformation( method = HttpMethod.GET, path = "/{containerName}/{blob}", expectedStatusCodes = { 200 }) - @UnexpectedResponseExceptionDetail - 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); + @UnexpectedResponseExceptionDetail(exceptionBodyClass = StorageError.class) + default PageList getPageRanges(@HostParam("url") String url, @PathParam("containerName") String containerName, + @PathParam("blob") String blob, @QueryParam("comp") String comp, + @HeaderParam("x-ms-version") String version, @HeaderParam("Accept") String accept) { + return getPageRanges(url, containerName, blob, comp, null, null, null, null, null, null, null, null, null, + version, null, null, null, accept, null).getValue(); + } @HttpRequestInformation( method = HttpMethod.GET, path = "/{containerName}/{blob}", expectedStatusCodes = { 200 }) - @UnexpectedResponseExceptionDetail - ResponseBase getPageRangesDiffSync(@HostParam("url") String url, + @UnexpectedResponseExceptionDetail(exceptionBodyClass = StorageError.class) + Response 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, @@ -356,34 +295,29 @@ ResponseBase getPageRangesDiffSync( @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); + @QueryParam("maxresults") Integer maxresults, @HeaderParam("Accept") String accept, + RequestOptions requestOptions); @HttpRequestInformation( method = HttpMethod.GET, path = "/{containerName}/{blob}", expectedStatusCodes = { 200 }) - @UnexpectedResponseExceptionDetail - Response getPageRangesDiffNoCustomHeadersSync(@HostParam("url") String url, + @UnexpectedResponseExceptionDetail(exceptionBodyClass = StorageError.class) + default PageList 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); + @QueryParam("comp") String comp, @HeaderParam("x-ms-version") String version, + @HeaderParam("Accept") String accept) { + return getPageRangesDiff(url, containerName, blob, comp, null, null, null, null, null, null, null, null, + null, null, null, version, null, null, null, accept, null).getValue(); + } @HttpRequestInformation( method = HttpMethod.PUT, path = "/{containerName}/{blob}", expectedStatusCodes = { 200 }) - @UnexpectedResponseExceptionDetail - ResponseBase resizeSync(@HostParam("url") String url, - @PathParam("containerName") String containerName, @PathParam("blob") String blob, - @QueryParam("comp") String comp, @QueryParam("timeout") Integer timeout, + @UnexpectedResponseExceptionDetail(exceptionBodyClass = StorageError.class) + Response 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, @@ -393,33 +327,27 @@ ResponseBase resizeSync(@HostParam("url") String u @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); + @HeaderParam("Accept") String accept, RequestOptions requestOptions); @HttpRequestInformation( method = HttpMethod.PUT, path = "/{containerName}/{blob}", expectedStatusCodes = { 200 }) - @UnexpectedResponseExceptionDetail - 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); + @UnexpectedResponseExceptionDetail(exceptionBodyClass = StorageError.class) + default void resize(@HostParam("url") String url, @PathParam("containerName") String containerName, + @PathParam("blob") String blob, @QueryParam("comp") String comp, + @HeaderParam("x-ms-blob-content-length") long blobContentLength, + @HeaderParam("x-ms-version") String version, @HeaderParam("Accept") String accept) { + resize(url, containerName, blob, comp, null, null, null, null, null, null, null, null, null, null, null, + blobContentLength, version, null, accept, null); + } @HttpRequestInformation( method = HttpMethod.PUT, path = "/{containerName}/{blob}", expectedStatusCodes = { 200 }) - @UnexpectedResponseExceptionDetail - ResponseBase updateSequenceNumberSync(@HostParam("url") String url, + @UnexpectedResponseExceptionDetail(exceptionBodyClass = StorageError.class) + Response 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, @@ -430,60 +358,53 @@ ResponseBase updateSequenceNumberSyn @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); + @HeaderParam("Accept") String accept, RequestOptions requestOptions); @HttpRequestInformation( method = HttpMethod.PUT, path = "/{containerName}/{blob}", expectedStatusCodes = { 200 }) - @UnexpectedResponseExceptionDetail - Response updateSequenceNumberNoCustomHeadersSync(@HostParam("url") String url, + @UnexpectedResponseExceptionDetail(exceptionBodyClass = StorageError.class) + default void 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, + @QueryParam("comp") String comp, @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); + @HeaderParam("x-ms-version") String version, @HeaderParam("Accept") String accept) { + updateSequenceNumber(url, containerName, blob, comp, null, null, null, null, null, null, null, + sequenceNumberAction, null, version, null, accept, null); + } @HttpRequestInformation( method = HttpMethod.PUT, path = "/{containerName}/{blob}", expectedStatusCodes = { 202 }) - @UnexpectedResponseExceptionDetail - ResponseBase copyIncrementalSync(@HostParam("url") String url, - @PathParam("containerName") String containerName, @PathParam("blob") String blob, - @QueryParam("comp") String comp, @QueryParam("timeout") Integer timeout, + @UnexpectedResponseExceptionDetail(exceptionBodyClass = StorageError.class) + Response 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); + @HeaderParam("Accept") String accept, RequestOptions requestOptions); @HttpRequestInformation( method = HttpMethod.PUT, path = "/{containerName}/{blob}", expectedStatusCodes = { 202 }) - @UnexpectedResponseExceptionDetail - 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); + @UnexpectedResponseExceptionDetail(exceptionBodyClass = StorageError.class) + default void copyIncremental(@HostParam("url") String url, @PathParam("containerName") String containerName, + @PathParam("blob") String blob, @QueryParam("comp") String comp, + @HeaderParam("x-ms-copy-source") String copySource, @HeaderParam("x-ms-version") String version, + @HeaderParam("Accept") String accept) { + copyIncremental(url, containerName, blob, comp, null, null, null, null, null, null, copySource, version, + null, accept, null); + } } /** * 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. @@ -518,20 +439,19 @@ Response copyIncrementalNoCustomHeadersSync(@HostParam("url") String url, * @param blobHttpHeaders Parameter group. * @param cpkInfo Parameter group. * @param encryptionScopeParam Parameter group. - * @param context The context to associate with this operation. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws StorageErrorException thrown if the request is rejected by server. + * @throws HttpResponseException thrown if the service returns an error. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link ResponseBase}. + * @return the 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 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, + RequestOptions requestOptions) { final String blobType = "PageBlob"; final String accept = "application/xml"; String contentTypeInternal = null; @@ -591,17 +511,17 @@ public ResponseBase createWithResponse(String cont = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); DateTimeRfc1123 immutabilityPolicyExpiryConverted = immutabilityPolicyExpiry == null ? null : new DateTimeRfc1123(immutabilityPolicyExpiry); - return service.createSync(this.client.getUrl(), containerName, blob, blobType, timeout, contentLength, tier, + 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); + immutabilityPolicyMode, legalHold, accept, requestOptions); } /** * 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. @@ -637,10 +557,9 @@ public ResponseBase createWithResponse(String cont * @param cpkInfo Parameter group. * @param encryptionScopeParam Parameter group. * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws StorageErrorException thrown if the request is rejected by server. + * @throws HttpResponseException thrown if the service returns an error. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ - @ServiceMethod(returns = ReturnType.SINGLE) public void create(String containerName, String blob, long contentLength, long blobContentLength, Integer timeout, PremiumPageBlobAccessTier tier, Map metadata, String leaseId, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, String ifTags, Long blobSequenceNumber, @@ -650,28 +569,29 @@ public void create(String containerName, String blob, long contentLength, long b 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()); + encryptionScopeParam, RequestOptions.none()); } /** - * The Create operation creates a new page blob. - * + * 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 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 body Initial data. + * @param transactionalContentMD5 Specify the transactional md5 for the body, to be validated by the service. + * @param transactionalContentCrc64 Specify the transactional crc64 for the body, to be validated by the service. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting * Timeouts for Blob Service Operations.</a>. - * @param 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 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 @@ -679,62 +599,29 @@ public void create(String containerName, String blob, long contentLength, long b * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. * @param ifNoneMatch Specify an ETag value to operate only on blobs 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 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. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws StorageErrorException thrown if the request is rejected by server. + * @throws HttpResponseException thrown if the service returns an error. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the 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) { - final String blobType = "PageBlob"; + public Response 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, RequestOptions requestOptions) { + final String comp = "page"; + final String pageWrite = "update"; 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(); @@ -755,24 +642,23 @@ public Response createNoCustomHeadersWithResponse(String containerName, St 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.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); + 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, requestOptions); } /** * 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. @@ -805,97 +691,10 @@ public Response createNoCustomHeadersWithResponse(String containerName, St * 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 StorageErrorException thrown if the request is rejected by server. + * @throws HttpResponseException thrown if the service returns an error. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link ResponseBase}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ResponseBase uploadPagesWithResponse(String containerName, String blob, - long contentLength, BinaryData body, byte[] transactionalContentMD5, byte[] transactionalContentCrc64, - Integer timeout, String range, String leaseId, Long ifSequenceNumberLessThanOrEqualTo, - Long ifSequenceNumberLessThan, Long ifSequenceNumberEqualTo, OffsetDateTime ifModifiedSince, - OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, String ifTags, String requestId, - 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.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); - } - - /** - * The Upload Pages operation writes a range of pages to a page blob. - * - * @param containerName The container name. - * @param blob The blob name. - * @param contentLength The length of the request. - * @param body Initial data. - * @param transactionalContentMD5 Specify the transactional md5 for the body, to be validated by the service. - * @param transactionalContentCrc64 Specify the transactional crc64 for the body, to be validated by the service. - * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. - * @param range Return only the bytes of the blob in the specified range. - * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. - * @param ifSequenceNumberLessThanOrEqualTo Specify this header value to operate only on a blob if it has a sequence - * number less than or equal to the specified. - * @param ifSequenceNumberLessThan Specify this header value to operate only on a blob if it has a sequence number - * less than the specified. - * @param ifSequenceNumberEqualTo Specify this header value to operate only on a blob if it has the specified - * sequence number. - * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the - * specified date/time. - * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since - * the specified date/time. - * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. - * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. - * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. - * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. - * @param 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 StorageErrorException 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, @@ -906,18 +705,15 @@ public void uploadPages(String containerName, String blob, long contentLength, B transactionalContentCrc64, timeout, range, leaseId, ifSequenceNumberLessThanOrEqualTo, ifSequenceNumberLessThan, ifSequenceNumberEqualTo, ifModifiedSince, ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, requestId, structuredBodyType, structuredContentLength, cpkInfo, encryptionScopeParam, - Context.none()); + RequestOptions.none()); } /** - * The Upload Pages operation writes a range of pages to a page blob. - * + * 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 body Initial data. - * @param transactionalContentMD5 Specify the transactional md5 for the body, to be validated by the service. - * @param transactionalContentCrc64 Specify the transactional crc64 for the body, to be validated by the service. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting * Timeouts for Blob Service Operations.</a>. @@ -938,102 +734,19 @@ public void uploadPages(String containerName, String blob, long contentLength, B * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. * @param requestId Provides a 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. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws StorageErrorException thrown if the request is rejected by server. + * @throws HttpResponseException thrown if the service returns an error. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the response. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response uploadPagesNoCustomHeadersWithResponse(String containerName, String blob, long contentLength, - BinaryData body, byte[] transactionalContentMD5, byte[] transactionalContentCrc64, Integer timeout, + public Response 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, 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.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); - } - - /** - * The Clear Pages operation clears a set of pages from a page blob. - * - * @param containerName The container name. - * @param blob The blob name. - * @param contentLength The length of the request. - * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. - * @param range Return only the bytes of the blob in the specified range. - * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. - * @param ifSequenceNumberLessThanOrEqualTo Specify this header value to operate only on a blob if it has a sequence - * number less than or equal to the specified. - * @param ifSequenceNumberLessThan Specify this header value to operate only on a blob if it has a sequence number - * less than the specified. - * @param ifSequenceNumberEqualTo Specify this header value to operate only on a blob if it has the specified - * sequence number. - * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the - * specified date/time. - * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since - * the specified date/time. - * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. - * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. - * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. - * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. - * @param cpkInfo Parameter group. - * @param encryptionScopeParam Parameter group. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws StorageErrorException thrown if 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) { + String ifNoneMatch, String ifTags, String requestId, CpkInfo cpkInfo, EncryptionScope encryptionScopeParam, + RequestOptions requestOptions) { final String comp = "page"; final String pageWrite = "clear"; final String accept = "application/xml"; @@ -1061,16 +774,16 @@ public ResponseBase clearPagesWithResponse(Str = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); DateTimeRfc1123 ifUnmodifiedSinceConverted = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - return service.clearPagesSync(this.client.getUrl(), containerName, blob, comp, pageWrite, contentLength, - timeout, range, leaseId, encryptionKey, encryptionKeySha256, encryptionAlgorithm, encryptionScope, + 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); + this.client.getVersion(), requestId, accept, requestOptions); } /** * 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. @@ -1097,96 +810,22 @@ public ResponseBase clearPagesWithResponse(Str * @param cpkInfo Parameter group. * @param encryptionScopeParam Parameter group. * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws StorageErrorException thrown if the request is rejected by server. + * @throws HttpResponseException thrown if the service returns an error. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ - @ServiceMethod(returns = ReturnType.SINGLE) public void clearPages(String containerName, String blob, long contentLength, Integer timeout, String range, String leaseId, Long ifSequenceNumberLessThanOrEqualTo, Long ifSequenceNumberLessThan, Long ifSequenceNumberEqualTo, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, String ifTags, String requestId, CpkInfo cpkInfo, EncryptionScope encryptionScopeParam) { clearPagesWithResponse(containerName, blob, contentLength, timeout, range, leaseId, ifSequenceNumberLessThanOrEqualTo, ifSequenceNumberLessThan, ifSequenceNumberEqualTo, ifModifiedSince, - ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, requestId, cpkInfo, encryptionScopeParam, Context.none()); - } - - /** - * The Clear Pages operation clears a set of pages from a page blob. - * - * @param containerName The container name. - * @param blob The blob name. - * @param contentLength The length of the request. - * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. - * @param range Return only the bytes of the blob in the specified range. - * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. - * @param ifSequenceNumberLessThanOrEqualTo Specify this header value to operate only on a blob if it has a sequence - * number less than or equal to the specified. - * @param ifSequenceNumberLessThan Specify this header value to operate only on a blob if it has a sequence number - * less than the specified. - * @param ifSequenceNumberEqualTo Specify this header value to operate only on a blob if it has the specified - * sequence number. - * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the - * specified date/time. - * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since - * the specified date/time. - * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. - * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. - * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. - * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. - * @param cpkInfo Parameter group. - * @param encryptionScopeParam Parameter group. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws StorageErrorException 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 Response clearPagesNoCustomHeadersWithResponse(String containerName, String blob, long contentLength, - Integer timeout, String range, String leaseId, Long ifSequenceNumberLessThanOrEqualTo, - Long ifSequenceNumberLessThan, Long ifSequenceNumberEqualTo, OffsetDateTime ifModifiedSince, - OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, String ifTags, String requestId, - CpkInfo cpkInfo, EncryptionScope encryptionScopeParam, Context context) { - final String comp = "page"; - final String pageWrite = "clear"; - final String accept = "application/xml"; - String encryptionKeyInternal = null; - if (cpkInfo != null) { - encryptionKeyInternal = cpkInfo.getEncryptionKey(); - } - String encryptionKey = encryptionKeyInternal; - String encryptionKeySha256Internal = null; - if (cpkInfo != null) { - encryptionKeySha256Internal = cpkInfo.getEncryptionKeySha256(); - } - String encryptionKeySha256 = encryptionKeySha256Internal; - EncryptionAlgorithmType encryptionAlgorithmInternal = null; - if (cpkInfo != null) { - encryptionAlgorithmInternal = cpkInfo.getEncryptionAlgorithm(); - } - EncryptionAlgorithmType encryptionAlgorithm = encryptionAlgorithmInternal; - String encryptionScopeInternal = null; - if (encryptionScopeParam != null) { - encryptionScopeInternal = encryptionScopeParam.getEncryptionScope(); - } - String encryptionScope = encryptionScopeInternal; - DateTimeRfc1123 ifModifiedSinceConverted - = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); - DateTimeRfc1123 ifUnmodifiedSinceConverted - = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - return service.clearPagesNoCustomHeadersSync(this.client.getUrl(), containerName, blob, comp, pageWrite, - contentLength, timeout, range, leaseId, encryptionKey, encryptionKeySha256, encryptionAlgorithm, - encryptionScope, ifSequenceNumberLessThanOrEqualTo, ifSequenceNumberLessThan, ifSequenceNumberEqualTo, - ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, - this.client.getVersion(), requestId, accept, context); + ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, requestId, cpkInfo, encryptionScopeParam, + RequestOptions.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. @@ -1227,183 +866,19 @@ public Response clearPagesNoCustomHeadersWithResponse(String containerName * copy source. * @param cpkInfo Parameter group. * @param encryptionScopeParam Parameter group. - * @param context The context to associate with this operation. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws StorageErrorException thrown if 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, 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.uploadPagesFromURLSync(this.client.getUrl(), containerName, blob, comp, pageWrite, sourceUrl, - sourceRange, sourceContentMD5Converted, sourceContentcrc64Converted, contentLength, timeout, range, - encryptionKey, encryptionKeySha256, encryptionAlgorithm, encryptionScope, leaseId, - ifSequenceNumberLessThanOrEqualTo, ifSequenceNumberLessThan, ifSequenceNumberEqualTo, - ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, - sourceIfModifiedSinceConverted, sourceIfUnmodifiedSinceConverted, sourceIfMatch, sourceIfNoneMatch, - this.client.getVersion(), requestId, copySourceAuthorization, accept, context); - } - - /** - * The 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://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. - * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. - * @param ifSequenceNumberLessThanOrEqualTo Specify this header value to operate only on a blob if it has a sequence - * number less than or equal to the specified. - * @param ifSequenceNumberLessThan Specify this header value to operate only on a blob if it has a sequence number - * less than the specified. - * @param ifSequenceNumberEqualTo Specify this header value to operate only on a blob if it has the specified - * sequence number. - * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the - * specified date/time. - * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since - * the specified date/time. - * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. - * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. - * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. - * @param sourceIfModifiedSince Specify this header value to operate only on a blob if it has been modified since - * the specified date/time. - * @param sourceIfUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified - * since the specified date/time. - * @param sourceIfMatch Specify an ETag value to operate only on blobs with a matching value. - * @param sourceIfNoneMatch Specify an ETag value to operate only on blobs without a matching value. - * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. - * @param copySourceAuthorization Only Bearer type is supported. Credentials should be a valid OAuth access token to - * copy source. - * @param cpkInfo Parameter group. - * @param encryptionScopeParam Parameter group. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws StorageErrorException thrown if the request is rejected by server. + * @throws HttpResponseException thrown if the service returns an error. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. */ - @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, + public Response uploadPagesFromURLWithResponse(String containerName, String blob, String sourceUrl, + String sourceRange, long contentLength, String range, byte[] sourceContentMD5, byte[] sourceContentcrc64, + Integer timeout, String leaseId, Long ifSequenceNumberLessThanOrEqualTo, Long ifSequenceNumberLessThan, Long ifSequenceNumberEqualTo, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, String ifTags, OffsetDateTime sourceIfModifiedSince, OffsetDateTime sourceIfUnmodifiedSince, String sourceIfMatch, String sourceIfNoneMatch, String requestId, String copySourceAuthorization, - CpkInfo cpkInfo, EncryptionScope encryptionScopeParam) { - uploadPagesFromURLWithResponse(containerName, blob, sourceUrl, sourceRange, contentLength, range, - sourceContentMD5, sourceContentcrc64, timeout, leaseId, ifSequenceNumberLessThanOrEqualTo, - ifSequenceNumberLessThan, ifSequenceNumberEqualTo, ifModifiedSince, ifUnmodifiedSince, ifMatch, ifNoneMatch, - ifTags, sourceIfModifiedSince, sourceIfUnmodifiedSince, sourceIfMatch, sourceIfNoneMatch, requestId, - copySourceAuthorization, cpkInfo, encryptionScopeParam, Context.none()); - } - - /** - * The 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://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. - * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. - * @param ifSequenceNumberLessThanOrEqualTo Specify this header value to operate only on a blob if it has a sequence - * number less than or equal to the specified. - * @param ifSequenceNumberLessThan Specify this header value to operate only on a blob if it has a sequence number - * less than the specified. - * @param ifSequenceNumberEqualTo Specify this header value to operate only on a blob if it has the specified - * sequence number. - * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the - * specified date/time. - * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since - * the specified date/time. - * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. - * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. - * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. - * @param sourceIfModifiedSince Specify this header value to operate only on a blob if it has been modified since - * the specified date/time. - * @param sourceIfUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified - * since the specified date/time. - * @param sourceIfMatch Specify an ETag value to operate only on blobs with a matching value. - * @param sourceIfNoneMatch Specify an ETag value to operate only on blobs without a matching value. - * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. - * @param copySourceAuthorization Only Bearer type is supported. Credentials should be a valid OAuth access token to - * copy source. - * @param cpkInfo Parameter group. - * @param encryptionScopeParam Parameter group. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws StorageErrorException 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 Response uploadPagesFromURLNoCustomHeadersWithResponse(String containerName, String blob, - String sourceUrl, String sourceRange, long contentLength, String range, byte[] sourceContentMD5, - byte[] sourceContentcrc64, Integer timeout, String leaseId, Long ifSequenceNumberLessThanOrEqualTo, - Long ifSequenceNumberLessThan, Long ifSequenceNumberEqualTo, OffsetDateTime ifModifiedSince, - OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, String ifTags, - OffsetDateTime sourceIfModifiedSince, OffsetDateTime sourceIfUnmodifiedSince, String sourceIfMatch, - String sourceIfNoneMatch, String requestId, String copySourceAuthorization, CpkInfo cpkInfo, - EncryptionScope encryptionScopeParam, Context context) { + CpkInfo cpkInfo, EncryptionScope encryptionScopeParam, RequestOptions requestOptions) { final String comp = "page"; final String pageWrite = "update"; final String accept = "application/xml"; @@ -1428,95 +903,48 @@ public Response uploadPagesFromURLNoCustomHeadersWithResponse(String conta } String encryptionScope = encryptionScopeInternal; String sourceContentMD5Converted = Base64Util.encodeToString(sourceContentMD5); - String sourceContentcrc64Converted = Base64Util.encodeToString(sourceContentcrc64); - DateTimeRfc1123 ifModifiedSinceConverted - = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); - DateTimeRfc1123 ifUnmodifiedSinceConverted - = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - DateTimeRfc1123 sourceIfModifiedSinceConverted - = sourceIfModifiedSince == null ? null : new DateTimeRfc1123(sourceIfModifiedSince); - DateTimeRfc1123 sourceIfUnmodifiedSinceConverted - = sourceIfUnmodifiedSince == null ? null : new DateTimeRfc1123(sourceIfUnmodifiedSince); - return service.uploadPagesFromURLNoCustomHeadersSync(this.client.getUrl(), containerName, blob, comp, pageWrite, - sourceUrl, sourceRange, sourceContentMD5Converted, sourceContentcrc64Converted, contentLength, timeout, - range, encryptionKey, encryptionKeySha256, encryptionAlgorithm, encryptionScope, leaseId, - ifSequenceNumberLessThanOrEqualTo, ifSequenceNumberLessThan, ifSequenceNumberEqualTo, - ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, - sourceIfModifiedSinceConverted, sourceIfUnmodifiedSinceConverted, sourceIfMatch, sourceIfNoneMatch, - this.client.getVersion(), requestId, copySourceAuthorization, accept, context); - } - - /** - * The Get Page Ranges operation returns the list of valid page ranges for a page blob, version or snapshot of a - * page blob. - * - * @param containerName The container name. - * @param blob The blob name. - * @param snapshot The snapshot parameter is an opaque DateTime value that, when present, specifies the blob - * snapshot to retrieve. For more information on working with blob snapshots, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/creating-a-snapshot-of-a-blob">Creating - * a Snapshot of a Blob.</a>. - * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. - * @param range Return only the bytes of the blob in the specified range. - * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. - * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the - * specified date/time. - * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since - * the specified date/time. - * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. - * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. - * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. - * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. - * @param marker A string value that identifies the portion of the list of containers to be returned with the next - * listing operation. The operation returns the NextMarker value within the response body if the listing operation - * did not return all containers remaining to be listed with the current page. The NextMarker value can be used as - * the value for the marker parameter in a subsequent call to request the next page of list items. The marker value - * is opaque to the client. - * @param maxresults Specifies the maximum number of containers to return. If the request does not specify - * maxresults, or specifies a value greater than 5000, the server will return up to 5000 items. Note that if the - * listing operation crosses a partition boundary, then the service will return a continuation token for retrieving - * the remainder of the results. For this reason, it is possible that the service will return fewer results than - * specified by maxresults, or than the default of 5000. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws StorageErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of pages along with {@link ResponseBase}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ResponseBase getPageRangesWithResponse(String containerName, - String blob, String snapshot, Integer timeout, String range, String leaseId, OffsetDateTime ifModifiedSince, - OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, String ifTags, String requestId, - String marker, Integer maxresults, Context context) { - final String comp = "pagelist"; - final String accept = "application/xml"; + String sourceContentcrc64Converted = Base64Util.encodeToString(sourceContentcrc64); 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); + DateTimeRfc1123 sourceIfModifiedSinceConverted + = sourceIfModifiedSince == null ? null : new DateTimeRfc1123(sourceIfModifiedSince); + DateTimeRfc1123 sourceIfUnmodifiedSinceConverted + = sourceIfUnmodifiedSince == null ? null : new DateTimeRfc1123(sourceIfUnmodifiedSince); + return service.uploadPagesFromURL(this.client.getUrl(), containerName, blob, comp, pageWrite, sourceUrl, + sourceRange, sourceContentMD5Converted, sourceContentcrc64Converted, contentLength, timeout, range, + encryptionKey, encryptionKeySha256, encryptionAlgorithm, encryptionScope, leaseId, + ifSequenceNumberLessThanOrEqualTo, ifSequenceNumberLessThan, ifSequenceNumberEqualTo, + ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, + sourceIfModifiedSinceConverted, sourceIfUnmodifiedSinceConverted, sourceIfMatch, sourceIfNoneMatch, + this.client.getVersion(), requestId, copySourceAuthorization, accept, requestOptions); } /** - * The Get Page Ranges operation returns the list of valid page ranges for a page blob, version or snapshot of a - * page blob. - * + * The Upload Pages operation writes a range of pages to a page blob where the contents are read from a URL. + * * @param containerName The container name. * @param blob The blob name. - * @param snapshot The snapshot parameter is an opaque DateTime value that, when present, specifies the blob - * snapshot to retrieve. For more information on working with blob snapshots, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/creating-a-snapshot-of-a-blob">Creating - * a Snapshot of a Blob.</a>. + * @param sourceUrl Specify a URL to the copy source. + * @param sourceRange Bytes of source data in the specified range. The length of this range should match the + * ContentLength header and x-ms-range/Range destination range header. + * @param contentLength The length of the request. + * @param range The range of bytes to which the source range would be written. The range should be 512 aligned and + * range-end is required. + * @param sourceContentMD5 Specify the md5 calculated for the range of bytes that must be read from the copy source. + * @param sourceContentcrc64 Specify the crc64 calculated for the range of bytes that must be read from the copy + * source. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting * Timeouts for Blob Service Operations.</a>. - * @param range Return only the bytes of the blob in the specified range. * @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 @@ -1524,35 +952,40 @@ public ResponseBase getPageRangesWithRe * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. + * @param sourceIfModifiedSince Specify this header value to operate only on a blob if it has been modified since + * the specified date/time. + * @param sourceIfUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified + * since the specified date/time. + * @param sourceIfMatch Specify an ETag value to operate only on blobs with a matching value. + * @param sourceIfNoneMatch Specify an ETag value to operate only on blobs without a matching value. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the * analytics logs when storage analytics logging is enabled. - * @param marker A string value that identifies the portion of the list of containers to be returned with the next - * listing operation. The operation returns the NextMarker value within the response body if the listing operation - * did not return all containers remaining to be listed with the current page. The NextMarker value can be used as - * the value for the marker parameter in a subsequent call to request the next page of list items. The marker value - * is opaque to the client. - * @param maxresults Specifies the maximum number of containers to return. If the request does not specify - * maxresults, or specifies a value greater than 5000, the server will return up to 5000 items. Note that if the - * listing operation crosses a partition boundary, then the service will return a continuation token for retrieving - * the remainder of the results. For this reason, it is possible that the service will return fewer results than - * specified by maxresults, or than the default of 5000. + * @param copySourceAuthorization Only Bearer type is supported. Credentials should be a valid OAuth access token to + * copy source. + * @param cpkInfo Parameter group. + * @param encryptionScopeParam Parameter group. * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws StorageErrorException thrown if the request is rejected by server. + * @throws HttpResponseException thrown if the service returns an error. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of pages. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public PageList getPageRanges(String containerName, String blob, String snapshot, Integer timeout, String range, - String leaseId, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, - String ifNoneMatch, String ifTags, String requestId, String marker, Integer maxresults) { - return getPageRangesWithResponse(containerName, blob, snapshot, timeout, range, leaseId, ifModifiedSince, - ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, requestId, marker, maxresults, Context.none()).getValue(); + public void uploadPagesFromURL(String containerName, String blob, String sourceUrl, String sourceRange, + long contentLength, String range, byte[] sourceContentMD5, byte[] sourceContentcrc64, Integer timeout, + String leaseId, Long ifSequenceNumberLessThanOrEqualTo, Long ifSequenceNumberLessThan, + Long ifSequenceNumberEqualTo, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, + String ifNoneMatch, String ifTags, OffsetDateTime sourceIfModifiedSince, OffsetDateTime sourceIfUnmodifiedSince, + String sourceIfMatch, String sourceIfNoneMatch, String requestId, String copySourceAuthorization, + CpkInfo cpkInfo, EncryptionScope encryptionScopeParam) { + uploadPagesFromURLWithResponse(containerName, blob, sourceUrl, sourceRange, contentLength, range, + sourceContentMD5, sourceContentcrc64, timeout, leaseId, ifSequenceNumberLessThanOrEqualTo, + ifSequenceNumberLessThan, ifSequenceNumberEqualTo, ifModifiedSince, ifUnmodifiedSince, ifMatch, ifNoneMatch, + ifTags, sourceIfModifiedSince, sourceIfUnmodifiedSince, sourceIfMatch, sourceIfNoneMatch, requestId, + copySourceAuthorization, cpkInfo, encryptionScopeParam, RequestOptions.none()); } /** * 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 @@ -1583,32 +1016,31 @@ public PageList getPageRanges(String containerName, String blob, String snapshot * 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. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws StorageErrorException thrown if the request is rejected by server. + * @throws HttpResponseException thrown if the service returns an error. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the list of pages. */ - @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) { + public Response 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, + RequestOptions requestOptions) { 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); + 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, requestOptions); } /** - * [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. - * + * 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 @@ -1618,14 +1050,6 @@ public Response getPageRangesNoCustomHeadersWithResponse(String contai * @param timeout The timeout parameter is expressed in seconds. For more information, see <a * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting * Timeouts for Blob Service Operations.</a>. - * @param prevsnapshot Optional in version 2015-07-08 and newer. The prevsnapshot parameter is a DateTime value that - * specifies that the response will contain only pages that were changed between target blob and previous snapshot. - * Changed pages include both updated and cleared pages. The target blob may be a snapshot, as long as the snapshot - * specified by prevsnapshot is the older of the two. Note that incremental snapshots are currently supported only - * for blobs created on or after January 1, 2016. - * @param prevSnapshotUrl Optional. This header is only supported in service versions 2019-04-19 and after and - * specifies the URL of a previous snapshot of the target blob. The response will only contain pages that were - * changed between the target blob and its previous snapshot. * @param range Return only the bytes of the blob in the specified range. * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the @@ -1647,32 +1071,23 @@ public Response getPageRangesNoCustomHeadersWithResponse(String contai * 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 StorageErrorException thrown if the request is rejected by server. + * @throws HttpResponseException thrown if the service returns an error. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of pages along with {@link ResponseBase}. + * @return the list of pages. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ResponseBase getPageRangesDiffWithResponse(String containerName, - String blob, String snapshot, Integer timeout, String prevsnapshot, String prevSnapshotUrl, String range, + 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, Context context) { - final String comp = "pagelist"; - final String accept = "application/xml"; - DateTimeRfc1123 ifModifiedSinceConverted - = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); - DateTimeRfc1123 ifUnmodifiedSinceConverted - = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - return service.getPageRangesDiffSync(this.client.getUrl(), containerName, blob, comp, snapshot, timeout, - prevsnapshot, prevSnapshotUrl, range, leaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, - ifMatch, ifNoneMatch, ifTags, this.client.getVersion(), requestId, marker, maxresults, accept, context); + String ifNoneMatch, String ifTags, String requestId, String marker, Integer maxresults) { + return getPageRangesWithResponse(containerName, blob, snapshot, timeout, range, leaseId, ifModifiedSince, + ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, requestId, marker, maxresults, RequestOptions.none()) + .getValue(); } /** * [Update] The Get Page Ranges Diff operation returns the list of valid page ranges for a page blob that were * changed between target blob and previous snapshot or version. - * + * * @param containerName The container name. * @param blob The blob name. * @param snapshot The snapshot parameter is an opaque DateTime value that, when present, specifies the blob @@ -1711,25 +1126,32 @@ public ResponseBase getPageRangesDi * 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 requestOptions The options to configure the HTTP request before HTTP client sends it. * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws StorageErrorException thrown if the request is rejected by server. + * @throws HttpResponseException thrown if the service returns an error. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the list of pages. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public PageList getPageRangesDiff(String containerName, String blob, String snapshot, Integer timeout, - String prevsnapshot, String prevSnapshotUrl, String range, String leaseId, OffsetDateTime ifModifiedSince, - OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, String ifTags, String requestId, - String marker, Integer maxresults) { - return getPageRangesDiffWithResponse(containerName, blob, snapshot, timeout, prevsnapshot, prevSnapshotUrl, - range, leaseId, ifModifiedSince, ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, requestId, marker, - maxresults, Context.none()).getValue(); + public Response 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, RequestOptions requestOptions) { + 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, + requestOptions); } /** * [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 @@ -1768,32 +1190,23 @@ public PageList getPageRangesDiff(String containerName, String blob, String snap * 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 StorageErrorException thrown if the request is rejected by server. + * @throws HttpResponseException thrown if the service returns an error. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the list of pages. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getPageRangesDiffNoCustomHeadersWithResponse(String containerName, String blob, - String snapshot, Integer timeout, String prevsnapshot, String prevSnapshotUrl, String range, String leaseId, - OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, - String ifTags, String requestId, String marker, Integer maxresults, Context context) { - final String comp = "pagelist"; - final String accept = "application/xml"; - DateTimeRfc1123 ifModifiedSinceConverted - = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); - DateTimeRfc1123 ifUnmodifiedSinceConverted - = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - return service.getPageRangesDiffNoCustomHeadersSync(this.client.getUrl(), containerName, blob, comp, snapshot, - timeout, prevsnapshot, prevSnapshotUrl, range, leaseId, ifModifiedSinceConverted, - ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, this.client.getVersion(), requestId, marker, - maxresults, accept, context); + public PageList getPageRangesDiff(String containerName, String blob, String snapshot, Integer timeout, + String prevsnapshot, String prevSnapshotUrl, String range, String leaseId, OffsetDateTime ifModifiedSince, + OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, String ifTags, String requestId, + String marker, Integer maxresults) { + return getPageRangesDiffWithResponse(containerName, blob, snapshot, timeout, prevsnapshot, prevSnapshotUrl, + range, leaseId, ifModifiedSince, ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, requestId, marker, + maxresults, RequestOptions.none()).getValue(); } /** * 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 @@ -1813,17 +1226,16 @@ public Response getPageRangesDiffNoCustomHeadersWithResponse(String co * 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. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws StorageErrorException thrown if the request is rejected by server. + * @throws HttpResponseException thrown if the service returns an error. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link ResponseBase}. + * @return the response. */ - @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) { + public Response 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, + RequestOptions requestOptions) { final String comp = "properties"; final String accept = "application/xml"; String encryptionKeyInternal = null; @@ -1850,15 +1262,15 @@ public ResponseBase resizeWithResponse(String cont = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); DateTimeRfc1123 ifUnmodifiedSinceConverted = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - return service.resizeSync(this.client.getUrl(), containerName, blob, comp, timeout, leaseId, encryptionKey, + 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); + requestId, accept, requestOptions); } /** * 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 @@ -1879,85 +1291,19 @@ public ResponseBase resizeWithResponse(String cont * @param cpkInfo Parameter group. * @param encryptionScopeParam Parameter group. * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws StorageErrorException thrown if the request is rejected by server. + * @throws HttpResponseException thrown if the service returns an error. * @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://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. - * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. - * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the - * specified date/time. - * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since - * the specified date/time. - * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. - * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. - * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. - * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. - * @param cpkInfo Parameter group. - * @param encryptionScopeParam Parameter group. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws StorageErrorException 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 Response resizeNoCustomHeadersWithResponse(String containerName, String blob, long blobContentLength, - Integer timeout, String leaseId, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, - String ifMatch, String ifNoneMatch, String ifTags, String requestId, CpkInfo cpkInfo, - EncryptionScope encryptionScopeParam, Context context) { - final String comp = "properties"; - final String accept = "application/xml"; - String encryptionKeyInternal = null; - 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); + ifMatch, ifNoneMatch, ifTags, requestId, cpkInfo, encryptionScopeParam, RequestOptions.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 @@ -1978,31 +1324,30 @@ public Response resizeNoCustomHeadersWithResponse(String containerName, St * 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. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws StorageErrorException thrown if the request is rejected by server. + * @throws HttpResponseException thrown if the service returns an error. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link ResponseBase}. + * @return the response. */ - @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) { + public Response 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, RequestOptions requestOptions) { 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, + return service.updateSequenceNumber(this.client.getUrl(), containerName, blob, comp, timeout, leaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, sequenceNumberAction, - blobSequenceNumber, this.client.getVersion(), requestId, accept, context); + blobSequenceNumber, this.client.getVersion(), requestId, accept, requestOptions); } /** * 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 @@ -2024,60 +1369,14 @@ public ResponseBase updateSequenceNu * @param requestId Provides 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 StorageErrorException thrown if the request is rejected by server. + * @throws HttpResponseException thrown if the service returns an error. * @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://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. - * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. - * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the - * specified date/time. - * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since - * the specified date/time. - * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. - * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. - * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. - * @param blobSequenceNumber Set for page blobs only. The sequence number is a user-controlled value that you can - * use to track requests. The value of the sequence number must be between 0 and 2^63 - 1. - * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws StorageErrorException 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 Response updateSequenceNumberNoCustomHeadersWithResponse(String containerName, String blob, - SequenceNumberActionType sequenceNumberAction, Integer timeout, String leaseId, OffsetDateTime ifModifiedSince, - OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, String ifTags, Long blobSequenceNumber, - String requestId, Context context) { - final String comp = "properties"; - final String accept = "application/xml"; - DateTimeRfc1123 ifModifiedSinceConverted - = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); - DateTimeRfc1123 ifUnmodifiedSinceConverted - = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - return service.updateSequenceNumberNoCustomHeadersSync(this.client.getUrl(), containerName, blob, comp, timeout, - leaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, - sequenceNumberAction, blobSequenceNumber, this.client.getVersion(), requestId, accept, context); + ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, blobSequenceNumber, requestId, RequestOptions.none()); } /** @@ -2085,7 +1384,7 @@ public Response updateSequenceNumberNoCustomHeadersWithResponse(String con * 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 @@ -2103,26 +1402,24 @@ public Response updateSequenceNumberNoCustomHeadersWithResponse(String con * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. * @param requestId Provides a 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. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws StorageErrorException thrown if the request is rejected by server. + * @throws HttpResponseException thrown if the service returns an error. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link ResponseBase}. + * @return the response. */ - @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) { + public Response copyIncrementalWithResponse(String containerName, String blob, String copySource, + Integer timeout, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, + String ifNoneMatch, String ifTags, String requestId, RequestOptions requestOptions) { 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, + return service.copyIncremental(this.client.getUrl(), containerName, blob, comp, timeout, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, copySource, - this.client.getVersion(), requestId, accept, context); + this.client.getVersion(), requestId, accept, requestOptions); } /** @@ -2130,7 +1427,7 @@ public ResponseBase copyIncrementalWithRe * is copied such that only the differential changes between the previously copied snapshot are transferred to the * destination. The copied snapshots are complete copies of the original snapshot and can be read or copied from as * usual. This API is supported since REST version 2016-05-31. - * + * * @param containerName The container name. * @param blob The blob name. * @param copySource Specifies the name of the source page blob snapshot. This value is a URL of up to 2 KB in @@ -2149,58 +1446,13 @@ public ResponseBase copyIncrementalWithRe * @param requestId Provides 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 StorageErrorException thrown if the request is rejected by server. + * @throws HttpResponseException thrown if the service returns an error. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ - @ServiceMethod(returns = ReturnType.SINGLE) public void copyIncremental(String containerName, String blob, String copySource, Integer timeout, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, String ifTags, String requestId) { copyIncrementalWithResponse(containerName, blob, copySource, timeout, ifModifiedSince, ifUnmodifiedSince, - ifMatch, ifNoneMatch, ifTags, requestId, Context.none()); - } - - /** - * The Copy Incremental operation copies a snapshot of the source page blob to a destination page blob. The snapshot - * is copied such that only the differential changes between the previously copied snapshot are transferred to the - * destination. The copied snapshots are complete copies of the original snapshot and can be read or copied from as - * usual. This API is supported since REST version 2016-05-31. - * - * @param containerName The container name. - * @param blob The blob name. - * @param copySource Specifies the name of the source page blob snapshot. This value is a URL of up to 2 KB in - * length that specifies a page blob snapshot. The value should be URL-encoded as it would appear in a request URI. - * The source blob must either be public or must be authenticated via a shared access signature. - * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. - * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the - * specified date/time. - * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since - * the specified date/time. - * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. - * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. - * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. - * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws StorageErrorException 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 Response copyIncrementalNoCustomHeadersWithResponse(String containerName, String blob, - String copySource, Integer timeout, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, - String ifMatch, String ifNoneMatch, String ifTags, String requestId, Context context) { - final String comp = "incrementalcopy"; - final String accept = "application/xml"; - DateTimeRfc1123 ifModifiedSinceConverted - = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); - DateTimeRfc1123 ifUnmodifiedSinceConverted - = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - return service.copyIncrementalNoCustomHeadersSync(this.client.getUrl(), containerName, blob, comp, timeout, - ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, copySource, - this.client.getVersion(), requestId, accept, context); + ifMatch, ifNoneMatch, ifTags, requestId, RequestOptions.none()); } } diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/implementation/ServicesImpl.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/implementation/ServicesImpl.java index 40cc3fc6b488..fbe519597b76 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/implementation/ServicesImpl.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/implementation/ServicesImpl.java @@ -4,12 +4,6 @@ package com.azure.v2.storage.blob.implementation; -import com.azure.v2.core.annotation.ReturnType; -import com.azure.v2.core.annotation.ServiceMethod; -import com.azure.v2.core.http.rest.PagedIterable; -import com.azure.v2.core.http.rest.PagedResponse; -import com.azure.v2.core.http.rest.PagedResponseBase; -import com.azure.v2.core.http.rest.ResponseBase; import com.azure.v2.storage.blob.models.BlobContainerItem; import com.azure.v2.storage.blob.models.BlobContainersSegment; import com.azure.v2.storage.blob.models.BlobServiceProperties; @@ -18,32 +12,29 @@ import com.azure.v2.storage.blob.models.FilterBlobsIncludeItem; import com.azure.v2.storage.blob.models.KeyInfo; import com.azure.v2.storage.blob.models.ListBlobContainersIncludeType; -import com.azure.v2.storage.blob.models.ServicesFilterBlobsHeaders; -import com.azure.v2.storage.blob.models.ServicesGetAccountInfoHeaders; -import com.azure.v2.storage.blob.models.ServicesGetPropertiesHeaders; -import com.azure.v2.storage.blob.models.ServicesGetStatisticsHeaders; -import com.azure.v2.storage.blob.models.ServicesGetUserDelegationKeyHeaders; -import com.azure.v2.storage.blob.models.ServicesListBlobContainersSegmentHeaders; -import com.azure.v2.storage.blob.models.ServicesListBlobContainersSegmentNextHeaders; -import com.azure.v2.storage.blob.models.ServicesSetPropertiesHeaders; -import com.azure.v2.storage.blob.models.ServicesSubmitBatchHeaders; -import com.azure.v2.storage.blob.models.StorageErrorException; +import com.azure.v2.storage.blob.models.StorageError; import com.azure.v2.storage.blob.models.UserDelegationKey; -import io.clientcore.core.annotation.ServiceInterface; +import io.clientcore.core.annotations.ServiceInterface; import io.clientcore.core.http.RestProxy; -import io.clientcore.core.http.annotation.BodyParam; -import io.clientcore.core.http.annotation.HeaderParam; -import io.clientcore.core.http.annotation.HostParam; -import io.clientcore.core.http.annotation.HttpRequestInformation; -import io.clientcore.core.http.annotation.PathParam; -import io.clientcore.core.http.annotation.QueryParam; -import io.clientcore.core.http.annotation.UnexpectedResponseExceptionDetail; +import io.clientcore.core.http.annotations.BodyParam; +import io.clientcore.core.http.annotations.HeaderParam; +import io.clientcore.core.http.annotations.HostParam; +import io.clientcore.core.http.annotations.HttpRequestInformation; +import io.clientcore.core.http.annotations.PathParam; +import io.clientcore.core.http.annotations.QueryParam; +import io.clientcore.core.http.annotations.UnexpectedResponseExceptionDetail; +import io.clientcore.core.http.exceptions.HttpResponseException; import io.clientcore.core.http.models.HttpMethod; +import io.clientcore.core.http.models.PagedIterable; +import io.clientcore.core.http.models.PagedResponse; +import io.clientcore.core.http.models.RequestOptions; import io.clientcore.core.http.models.Response; -import io.clientcore.core.util.Context; -import io.clientcore.core.util.binarydata.BinaryData; - +import io.clientcore.core.http.pipeline.HttpPipeline; +import io.clientcore.core.models.binarydata.BinaryData; +import io.clientcore.core.serialization.ObjectSerializer; +import io.clientcore.core.utils.Context; import java.io.InputStream; +import java.lang.reflect.InvocationTargetException; import java.util.List; import java.util.Objects; import java.util.stream.Collectors; @@ -64,7 +55,7 @@ public final class ServicesImpl { /** * Initializes an instance of ServicesImpl. - * + * * @param client the instance of the service client containing this operation class. */ ServicesImpl(AzureBlobStorageImpl client) { @@ -78,186 +69,195 @@ public final class ServicesImpl { */ @ServiceInterface(name = "AzureBlobStorageServ", host = "{url}") public interface ServicesService { + static ServicesService getNewInstance(HttpPipeline pipeline, ObjectSerializer serializer) { + try { + Class clazz = Class.forName("com.azure.v2.storage.blob.implementation.ServicesServiceImpl"); + return (ServicesService) clazz.getMethod("getNewInstance", HttpPipeline.class, ObjectSerializer.class) + .invoke(null, pipeline, serializer); + } catch (ClassNotFoundException | NoSuchMethodException | IllegalAccessException + | InvocationTargetException e) { + throw new RuntimeException(e); + } + + } + @HttpRequestInformation(method = HttpMethod.PUT, path = "/", expectedStatusCodes = { 202 }) - @UnexpectedResponseExceptionDetail - 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, + @UnexpectedResponseExceptionDetail(exceptionBodyClass = StorageError.class) + Response 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); + @HeaderParam("Accept") String accept, RequestOptions requestOptions); @HttpRequestInformation(method = HttpMethod.PUT, path = "/", expectedStatusCodes = { 202 }) - @UnexpectedResponseExceptionDetail - 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, + @UnexpectedResponseExceptionDetail(exceptionBodyClass = StorageError.class) + default void setProperties(@HostParam("url") String url, @QueryParam("restype") String restype, + @QueryParam("comp") String comp, @HeaderParam("x-ms-version") String version, @BodyParam("application/xml") BlobServiceProperties blobServiceProperties, - @HeaderParam("Accept") String accept, Context context); + @HeaderParam("Accept") String accept) { + setProperties(url, restype, comp, null, version, null, blobServiceProperties, accept, null); + } @HttpRequestInformation(method = HttpMethod.GET, path = "/", expectedStatusCodes = { 200 }) - @UnexpectedResponseExceptionDetail - 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); - - @HttpRequestInformation(method = HttpMethod.GET, path = "/", expectedStatusCodes = { 200 }) - @UnexpectedResponseExceptionDetail - Response getPropertiesNoCustomHeadersSync(@HostParam("url") String url, + @UnexpectedResponseExceptionDetail(exceptionBodyClass = StorageError.class) + Response 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); + RequestOptions requestOptions); @HttpRequestInformation(method = HttpMethod.GET, path = "/", expectedStatusCodes = { 200 }) - @UnexpectedResponseExceptionDetail - 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); + @UnexpectedResponseExceptionDetail(exceptionBodyClass = StorageError.class) + default BlobServiceProperties getProperties(@HostParam("url") String url, @QueryParam("restype") String restype, + @QueryParam("comp") String comp, @HeaderParam("x-ms-version") String version, + @HeaderParam("Accept") String accept) { + return getProperties(url, restype, comp, null, version, null, accept, null).getValue(); + } @HttpRequestInformation(method = HttpMethod.GET, path = "/", expectedStatusCodes = { 200 }) - @UnexpectedResponseExceptionDetail - Response getStatisticsNoCustomHeadersSync(@HostParam("url") String url, + @UnexpectedResponseExceptionDetail(exceptionBodyClass = StorageError.class) + Response 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); + RequestOptions requestOptions); @HttpRequestInformation(method = HttpMethod.GET, path = "/", expectedStatusCodes = { 200 }) - @UnexpectedResponseExceptionDetail - 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); + @UnexpectedResponseExceptionDetail(exceptionBodyClass = StorageError.class) + default BlobServiceStatistics getStatistics(@HostParam("url") String url, @QueryParam("restype") String restype, + @QueryParam("comp") String comp, @HeaderParam("x-ms-version") String version, + @HeaderParam("Accept") String accept) { + return getStatistics(url, restype, comp, null, version, null, accept, null).getValue(); + } @HttpRequestInformation(method = HttpMethod.GET, path = "/", expectedStatusCodes = { 200 }) - @UnexpectedResponseExceptionDetail - Response listBlobContainersSegmentNoCustomHeadersSync(@HostParam("url") String url, + @UnexpectedResponseExceptionDetail(exceptionBodyClass = StorageError.class) + Response 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); + RequestOptions requestOptions); + + @HttpRequestInformation(method = HttpMethod.GET, path = "/", expectedStatusCodes = { 200 }) + @UnexpectedResponseExceptionDetail(exceptionBodyClass = StorageError.class) + default BlobContainersSegment listBlobContainersSegment(@HostParam("url") String url, + @QueryParam("comp") String comp, @HeaderParam("x-ms-version") String version, + @HeaderParam("Accept") String accept) { + return listBlobContainersSegment(url, comp, null, null, null, null, null, version, null, accept, null) + .getValue(); + } @HttpRequestInformation(method = HttpMethod.POST, path = "/", expectedStatusCodes = { 200 }) - @UnexpectedResponseExceptionDetail - ResponseBase getUserDelegationKeySync( - @HostParam("url") String url, @QueryParam("restype") String restype, @QueryParam("comp") String comp, + @UnexpectedResponseExceptionDetail(exceptionBodyClass = StorageError.class) + Response 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); + @HeaderParam("Accept") String accept, RequestOptions requestOptions); @HttpRequestInformation(method = HttpMethod.POST, path = "/", expectedStatusCodes = { 200 }) - @UnexpectedResponseExceptionDetail - Response getUserDelegationKeyNoCustomHeadersSync(@HostParam("url") String url, + @UnexpectedResponseExceptionDetail(exceptionBodyClass = StorageError.class) + default UserDelegationKey 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); + @HeaderParam("x-ms-version") String version, @BodyParam("application/xml") KeyInfo keyInfo, + @HeaderParam("Accept") String accept) { + return getUserDelegationKey(url, restype, comp, null, version, null, keyInfo, accept, null).getValue(); + } @HttpRequestInformation(method = HttpMethod.GET, path = "/", expectedStatusCodes = { 200 }) - @UnexpectedResponseExceptionDetail - 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); + @UnexpectedResponseExceptionDetail(exceptionBodyClass = StorageError.class) + Response 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, RequestOptions requestOptions); @HttpRequestInformation(method = HttpMethod.GET, path = "/", expectedStatusCodes = { 200 }) - @UnexpectedResponseExceptionDetail - 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); + @UnexpectedResponseExceptionDetail(exceptionBodyClass = StorageError.class) + default void getAccountInfo(@HostParam("url") String url, @QueryParam("restype") String restype, + @QueryParam("comp") String comp, @HeaderParam("x-ms-version") String version, + @HeaderParam("Accept") String accept) { + getAccountInfo(url, restype, comp, null, version, null, accept, null); + } @HttpRequestInformation(method = HttpMethod.POST, path = "/", expectedStatusCodes = { 202 }) - @UnexpectedResponseExceptionDetail - 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); + @UnexpectedResponseExceptionDetail(exceptionBodyClass = StorageError.class) + Response 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, RequestOptions requestOptions); @HttpRequestInformation(method = HttpMethod.POST, path = "/", expectedStatusCodes = { 202 }) - @UnexpectedResponseExceptionDetail - 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); + @UnexpectedResponseExceptionDetail(exceptionBodyClass = StorageError.class) + default InputStream submitBatch(@HostParam("url") String url, @QueryParam("comp") String comp, + @HeaderParam("Content-Length") long contentLength, @HeaderParam("Content-Type") String multipartContentType, + @HeaderParam("x-ms-version") String version, @BodyParam("application/xml") BinaryData body, + @HeaderParam("Accept") String accept) { + return submitBatch(url, comp, contentLength, multipartContentType, null, version, null, body, accept, null) + .getValue(); + } @HttpRequestInformation(method = HttpMethod.GET, path = "/", expectedStatusCodes = { 200 }) - @UnexpectedResponseExceptionDetail - 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); + @UnexpectedResponseExceptionDetail(exceptionBodyClass = StorageError.class) + Response 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, RequestOptions requestOptions); @HttpRequestInformation(method = HttpMethod.GET, path = "/", expectedStatusCodes = { 200 }) - @UnexpectedResponseExceptionDetail - 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); + @UnexpectedResponseExceptionDetail(exceptionBodyClass = StorageError.class) + default FilterBlobSegment filterBlobs(@HostParam("url") String url, @QueryParam("comp") String comp, + @HeaderParam("x-ms-version") String version, @HeaderParam("Accept") String accept) { + return filterBlobs(url, comp, null, version, null, null, null, null, null, accept, null).getValue(); + } @HttpRequestInformation(method = HttpMethod.GET, path = "{nextLink}", expectedStatusCodes = { 200 }) - @UnexpectedResponseExceptionDetail - 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); + @UnexpectedResponseExceptionDetail(exceptionBodyClass = StorageError.class) + Response 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, RequestOptions requestOptions); @HttpRequestInformation(method = HttpMethod.GET, path = "{nextLink}", expectedStatusCodes = { 200 }) - @UnexpectedResponseExceptionDetail - Response listBlobContainersSegmentNextNoCustomHeadersSync( + @UnexpectedResponseExceptionDetail(exceptionBodyClass = StorageError.class) + default BlobContainersSegment 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); + @HeaderParam("x-ms-version") String version, @HeaderParam("Accept") String accept) { + return listBlobContainersSegmentNext(nextLink, url, version, null, accept, null).getValue(); + } } /** * Sets properties for a storage account's Blob service endpoint, including properties for Storage Analytics and * CORS (Cross-Origin Resource Sharing) rules. - * + * * @param blobServiceProperties The StorageService properties. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting * Timeouts for Blob Service Operations.</a>. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the * analytics logs when storage analytics logging is enabled. - * @param context The context to associate with this operation. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws StorageErrorException thrown if the request is rejected by server. + * @throws HttpResponseException thrown if the service returns an error. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link ResponseBase}. + * @return the response. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ResponseBase setPropertiesWithResponse( - BlobServiceProperties blobServiceProperties, Integer timeout, String requestId, Context context) { + public Response setPropertiesWithResponse(BlobServiceProperties blobServiceProperties, Integer timeout, + String requestId, RequestOptions requestOptions) { 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); + return service.setProperties(this.client.getUrl(), restype, comp, timeout, this.client.getVersion(), requestId, + blobServiceProperties, accept, requestOptions); } /** * Sets properties for a storage account's Blob service endpoint, including properties for Storage Analytics and * CORS (Cross-Origin Resource Sharing) rules. - * + * * @param blobServiceProperties The StorageService properties. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting @@ -265,184 +265,102 @@ public ResponseBase setPropertiesWithRespons * @param requestId Provides 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 StorageErrorException thrown if the request is rejected by server. + * @throws HttpResponseException thrown if the service returns an error. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ - @ServiceMethod(returns = ReturnType.SINGLE) public void setProperties(BlobServiceProperties blobServiceProperties, Integer timeout, String requestId) { - setPropertiesWithResponse(blobServiceProperties, timeout, requestId, Context.none()); - } - - /** - * Sets properties for a storage account's Blob service endpoint, including properties for Storage Analytics and - * CORS (Cross-Origin Resource Sharing) rules. - * - * @param blobServiceProperties The StorageService properties. - * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. - * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws StorageErrorException 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 Response setPropertiesNoCustomHeadersWithResponse(BlobServiceProperties blobServiceProperties, - Integer timeout, String requestId, Context context) { - final String restype = "service"; - final String comp = "properties"; - final String accept = "application/xml"; - return service.setPropertiesNoCustomHeadersSync(this.client.getUrl(), restype, comp, timeout, - this.client.getVersion(), requestId, blobServiceProperties, accept, context); + setPropertiesWithResponse(blobServiceProperties, timeout, requestId, RequestOptions.none()); } /** * gets the properties of a storage account's Blob service, including properties for Storage Analytics and CORS * (Cross-Origin Resource Sharing) rules. - * + * * @param timeout The timeout parameter is expressed in seconds. For more information, see <a * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting * Timeouts for Blob Service Operations.</a>. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the * analytics logs when storage analytics logging is enabled. - * @param context The context to associate with this operation. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws StorageErrorException thrown if the request is rejected by server. + * @throws HttpResponseException thrown if the service returns an error. * @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}. + * (Cross-Origin Resource Sharing) rules. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ResponseBase getPropertiesWithResponse(Integer timeout, - String requestId, Context context) { + public Response getPropertiesWithResponse(Integer timeout, String requestId, + RequestOptions requestOptions) { 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); + return service.getProperties(this.client.getUrl(), restype, comp, timeout, this.client.getVersion(), requestId, + accept, requestOptions); } /** * gets the properties of a storage account's Blob service, including properties for Storage Analytics and CORS * (Cross-Origin Resource Sharing) rules. - * + * * @param timeout The timeout parameter is expressed in seconds. For more information, see <a * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting * Timeouts for Blob Service Operations.</a>. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the * analytics logs when storage analytics logging is enabled. * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws StorageErrorException thrown if the request is rejected by server. + * @throws HttpResponseException thrown if the service returns an error. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the properties of a storage account's Blob service, including properties for Storage Analytics and CORS * (Cross-Origin Resource Sharing) rules. */ - @ServiceMethod(returns = ReturnType.SINGLE) public BlobServiceProperties getProperties(Integer timeout, String requestId) { - return getPropertiesWithResponse(timeout, requestId, Context.none()).getValue(); - } - - /** - * gets the properties of a storage account's Blob service, including properties for Storage Analytics and CORS - * (Cross-Origin Resource Sharing) rules. - * - * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. - * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws StorageErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the properties of a storage account's Blob service, including properties for Storage Analytics and CORS - * (Cross-Origin Resource Sharing) rules. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getPropertiesNoCustomHeadersWithResponse(Integer timeout, String requestId, - Context context) { - final String restype = "service"; - final String comp = "properties"; - final String accept = "application/xml"; - return service.getPropertiesNoCustomHeadersSync(this.client.getUrl(), restype, comp, timeout, - this.client.getVersion(), requestId, accept, context); + return getPropertiesWithResponse(timeout, requestId, RequestOptions.none()).getValue(); } /** * Retrieves statistics related to replication for the Blob service. It is only available on the secondary location * endpoint when read-access geo-redundant replication is enabled for the storage account. - * + * * @param timeout The timeout parameter is expressed in seconds. For more information, see <a * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting * Timeouts for Blob Service Operations.</a>. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the * analytics logs when storage analytics logging is enabled. - * @param context The context to associate with this operation. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws StorageErrorException thrown if the request is rejected by server. + * @throws HttpResponseException thrown if the service returns an error. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return stats for the storage service along with {@link ResponseBase}. + * @return stats for the storage service. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ResponseBase getStatisticsWithResponse(Integer timeout, - String requestId, Context context) { + public Response getStatisticsWithResponse(Integer timeout, String requestId, + RequestOptions requestOptions) { 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); + return service.getStatistics(this.client.getUrl(), restype, comp, timeout, this.client.getVersion(), requestId, + accept, 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. - * + * * @param timeout The timeout parameter is expressed in seconds. For more information, see <a * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting * Timeouts for Blob Service Operations.</a>. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the * analytics logs when storage analytics logging is enabled. * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws StorageErrorException thrown if the request is rejected by server. + * @throws HttpResponseException thrown if the service returns an error. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return stats for the storage service. */ - @ServiceMethod(returns = ReturnType.SINGLE) public BlobServiceStatistics getStatistics(Integer timeout, String requestId) { - return getStatisticsWithResponse(timeout, requestId, Context.none()).getValue(); - } - - /** - * Retrieves statistics related to replication for the Blob service. It is only available on the secondary location - * endpoint when read-access geo-redundant replication is enabled for the storage account. - * - * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. - * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws StorageErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return stats for the storage service. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getStatisticsNoCustomHeadersWithResponse(Integer timeout, String requestId, - Context context) { - final String restype = "service"; - final String comp = "stats"; - final String accept = "application/xml"; - return service.getStatisticsNoCustomHeadersSync(this.client.getUrl(), restype, comp, timeout, - this.client.getVersion(), requestId, accept, context); + return getStatisticsWithResponse(timeout, requestId, RequestOptions.none()).getValue(); } /** * 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 @@ -461,16 +379,14 @@ public Response getStatisticsNoCustomHeadersWithResponse( * Timeouts for Blob Service Operations.</a>. * @param requestId Provides a 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 StorageErrorException thrown if the request is rejected by server. + * @throws HttpResponseException thrown if the service returns an error. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an enumeration of containers along with {@link PagedResponse}. + * @return an enumeration of containers. */ - @ServiceMethod(returns = ReturnType.SINGLE) public PagedResponse listBlobContainersSegmentSinglePage(String prefix, String marker, Integer maxresults, List listBlobContainersIncludeType, Integer timeout, - String requestId, Context context) { + String requestId) { final String comp = "list"; final String accept = "application/xml"; String listBlobContainersIncludeTypeConverted = (listBlobContainersIncludeType == null) @@ -478,16 +394,16 @@ public PagedResponse listBlobContainersSegmentSinglePage(Stri : 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()); + Response res = service.listBlobContainersSegment(this.client.getUrl(), comp, prefix, + marker, maxresults, listBlobContainersIncludeTypeConverted, timeout, this.client.getVersion(), requestId, + accept, RequestOptions.none()); + return new PagedResponse<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getBody(), + res.getValue().getBlobContainerItems(), null, res.getValue().getNextMarker(), null, null, 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 @@ -506,25 +422,32 @@ public PagedResponse listBlobContainersSegmentSinglePage(Stri * Timeouts for Blob Service Operations.</a>. * @param requestId Provides a 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. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws StorageErrorException thrown if the request is rejected by server. + * @throws HttpResponseException thrown if the service returns an error. * @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}. + * @return an enumeration of containers. */ - @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)); + public PagedResponse listBlobContainersSegmentSinglePage(String prefix, String marker, + Integer maxresults, List listBlobContainersIncludeType, Integer timeout, + String requestId, RequestOptions requestOptions) { + 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.listBlobContainersSegment(this.client.getUrl(), comp, prefix, + marker, maxresults, listBlobContainersIncludeTypeConverted, timeout, this.client.getVersion(), requestId, + accept, requestOptions); + return new PagedResponse<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getBody(), + res.getValue().getBlobContainerItems(), null, res.getValue().getNextMarker(), null, null, 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 @@ -543,33 +466,22 @@ public PagedIterable listBlobContainersSegment(String prefix, * Timeouts for Blob Service Operations.</a>. * @param requestId Provides a 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 StorageErrorException thrown if the request is rejected by server. + * @throws HttpResponseException thrown if the service returns an error. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an enumeration of containers along with {@link PagedResponse}. + * @return an enumeration of containers. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public PagedResponse listBlobContainersSegmentNoCustomHeadersSinglePage(String prefix, - String marker, Integer maxresults, List listBlobContainersIncludeType, - Integer timeout, String requestId, Context context) { - final String comp = "list"; - final String accept = "application/xml"; - String listBlobContainersIncludeTypeConverted = (listBlobContainersIncludeType == null) - ? null - : listBlobContainersIncludeType.stream() - .map(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); + public PagedIterable listBlobContainersSegment(String prefix, String marker, Integer maxresults, + List listBlobContainersIncludeType, Integer timeout, String requestId) { + return new PagedIterable<>( + (pagingOptions) -> listBlobContainersSegmentSinglePage(prefix, marker, maxresults, + listBlobContainersIncludeType, timeout, requestId), + (pagingOptions, 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 @@ -588,52 +500,55 @@ public PagedResponse listBlobContainersSegmentNoCustomHeaders * Timeouts for Blob Service Operations.</a>. * @param requestId Provides a 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. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws StorageErrorException thrown if the request is rejected by server. + * @throws HttpResponseException thrown if the service returns an error. * @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}. + * @return an enumeration of containers. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listBlobContainersSegmentNoCustomHeaders(String prefix, String marker, - Integer maxresults, List listBlobContainersIncludeType, Integer timeout, - String requestId, Context context) { + public PagedIterable listBlobContainersSegment(String prefix, String marker, Integer maxresults, + List listBlobContainersIncludeType, Integer timeout, String requestId, + RequestOptions requestOptions) { + RequestOptions requestOptionsForNextPage = new RequestOptions(); + requestOptionsForNextPage.setContext(requestOptions != null && requestOptions.getContext() != null + ? requestOptions.getContext() + : Context.none()); return new PagedIterable<>( - () -> listBlobContainersSegmentNoCustomHeadersSinglePage(prefix, marker, maxresults, - listBlobContainersIncludeType, timeout, requestId, context), - nextLink -> listBlobContainersSegmentNextSinglePage(nextLink, requestId, context)); + (pagingOptions) -> listBlobContainersSegmentSinglePage(prefix, marker, maxresults, + listBlobContainersIncludeType, timeout, requestId, requestOptions), + (pagingOptions, nextLink) -> listBlobContainersSegmentNextSinglePage(nextLink, requestId, + requestOptionsForNextPage)); } /** * Retrieves a user delegation key for the Blob service. This is only a valid operation when using bearer token * authentication. - * + * * @param keyInfo Key information. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting * Timeouts for Blob Service Operations.</a>. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the * analytics logs when storage analytics logging is enabled. - * @param context The context to associate with this operation. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws StorageErrorException thrown if the request is rejected by server. + * @throws HttpResponseException thrown if the service returns an error. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a user delegation key along with {@link ResponseBase}. + * @return a user delegation key. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ResponseBase - getUserDelegationKeyWithResponse(KeyInfo keyInfo, Integer timeout, String requestId, Context context) { + public Response getUserDelegationKeyWithResponse(KeyInfo keyInfo, Integer timeout, + String requestId, RequestOptions requestOptions) { 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); + return service.getUserDelegationKey(this.client.getUrl(), restype, comp, timeout, this.client.getVersion(), + requestId, keyInfo, accept, requestOptions); } /** * Retrieves a user delegation key for the Blob service. This is only a valid operation when using bearer token * authentication. - * + * * @param keyInfo Key information. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting @@ -641,109 +556,55 @@ public PagedIterable listBlobContainersSegmentNoCustomHeaders * @param requestId Provides 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 StorageErrorException thrown if the request is rejected by server. + * @throws HttpResponseException thrown if the service returns an error. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a user delegation key. */ - @ServiceMethod(returns = ReturnType.SINGLE) public UserDelegationKey getUserDelegationKey(KeyInfo keyInfo, Integer timeout, String requestId) { - return getUserDelegationKeyWithResponse(keyInfo, timeout, requestId, Context.none()).getValue(); - } - - /** - * Retrieves a user delegation key for the Blob service. This is only a valid operation when using bearer token - * authentication. - * - * @param keyInfo Key information. - * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. - * @param requestId Provides a 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 StorageErrorException 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 Response getUserDelegationKeyNoCustomHeadersWithResponse(KeyInfo keyInfo, Integer timeout, - String requestId, Context context) { - final String restype = "service"; - final String comp = "userdelegationkey"; - final String accept = "application/xml"; - return service.getUserDelegationKeyNoCustomHeadersSync(this.client.getUrl(), restype, comp, timeout, - this.client.getVersion(), requestId, keyInfo, accept, context); + return getUserDelegationKeyWithResponse(keyInfo, timeout, requestId, RequestOptions.none()).getValue(); } /** * Returns the sku name and account kind. - * + * * @param timeout The timeout parameter is expressed in seconds. For more information, see <a * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting * Timeouts for Blob Service Operations.</a>. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the * analytics logs when storage analytics logging is enabled. - * @param context The context to associate with this operation. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws StorageErrorException thrown if the request is rejected by server. + * @throws HttpResponseException thrown if the service returns an error. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link ResponseBase}. + * @return the response. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ResponseBase getAccountInfoWithResponse(Integer timeout, - String requestId, Context context) { + public Response getAccountInfoWithResponse(Integer timeout, String requestId, RequestOptions requestOptions) { 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); + return service.getAccountInfo(this.client.getUrl(), restype, comp, timeout, this.client.getVersion(), requestId, + accept, requestOptions); } /** * Returns the sku name and account kind. - * + * * @param timeout The timeout parameter is expressed in seconds. For more information, see <a * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting * Timeouts for Blob Service Operations.</a>. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the * analytics logs when storage analytics logging is enabled. * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws StorageErrorException thrown if the request is rejected by server. + * @throws HttpResponseException thrown if the service returns an error. * @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://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. - * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws StorageErrorException 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 Response getAccountInfoNoCustomHeadersWithResponse(Integer timeout, String requestId, - Context context) { - 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); + getAccountInfoWithResponse(timeout, requestId, RequestOptions.none()); } /** * 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>. @@ -753,24 +614,23 @@ public Response getAccountInfoNoCustomHeadersWithResponse(Integer timeout, * Timeouts for Blob Service Operations.</a>. * @param requestId Provides a 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. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws StorageErrorException thrown if the request is rejected by server. + * @throws HttpResponseException thrown if the service returns an error. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response body along with {@link ResponseBase}. + * @return the response. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ResponseBase submitBatchWithResponse(long contentLength, - String multipartContentType, BinaryData body, Integer timeout, String requestId, Context context) { + public Response submitBatchWithResponse(long contentLength, String multipartContentType, + BinaryData body, Integer timeout, String requestId, RequestOptions requestOptions) { 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); + return service.submitBatch(this.client.getUrl(), comp, contentLength, multipartContentType, timeout, + this.client.getVersion(), requestId, body, accept, requestOptions); } /** * 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>. @@ -781,49 +641,21 @@ public ResponseBase submitBatchWithResp * @param requestId Provides 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 StorageErrorException thrown if the request is rejected by server. + * @throws HttpResponseException thrown if the service returns an error. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the response. */ - @ServiceMethod(returns = ReturnType.SINGLE) public InputStream submitBatch(long contentLength, String multipartContentType, BinaryData body, Integer timeout, String requestId) { - return submitBatchWithResponse(contentLength, multipartContentType, body, timeout, requestId, Context.none()) - .getValue(); - } - - /** - * The Batch operation allows multiple API calls to be embedded into a single HTTP request. - * - * @param contentLength The length of the request. - * @param multipartContentType Required. The value of this header must be multipart/mixed with a batch boundary. - * Example header value: multipart/mixed; boundary=batch_<GUID>. - * @param body Initial data. - * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. - * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws StorageErrorException 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 Response submitBatchNoCustomHeadersWithResponse(long contentLength, String multipartContentType, - BinaryData body, Integer timeout, String requestId, Context context) { - final String comp = "batch"; - final String accept = "application/xml"; - return service.submitBatchNoCustomHeadersSync(this.client.getUrl(), comp, contentLength, multipartContentType, - timeout, this.client.getVersion(), requestId, body, accept, context); + return submitBatchWithResponse(contentLength, multipartContentType, body, timeout, requestId, + RequestOptions.none()).getValue(); } /** * The Filter Blobs operation enables callers to list blobs across all containers whose tags match a given search * expression. Filter blobs searches across all containers within a storage account but can be scoped within the * expression to a single container. - * + * * @param timeout The timeout parameter is expressed in seconds. For more information, see <a * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting * Timeouts for Blob Service Operations.</a>. @@ -841,16 +673,14 @@ public Response submitBatchNoCustomHeadersWithResponse(long content * 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. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws StorageErrorException thrown if the request is rejected by server. + * @throws HttpResponseException thrown if the service returns an error. * @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}. + * @return the result of a Filter Blobs API call. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ResponseBase filterBlobsWithResponse(Integer timeout, - String requestId, String where, String marker, Integer maxresults, List include, - Context context) { + public Response filterBlobsWithResponse(Integer timeout, String requestId, String where, + String marker, Integer maxresults, List include, RequestOptions requestOptions) { final String comp = "blobs"; final String accept = "application/xml"; String includeConverted = (include == null) @@ -858,15 +688,15 @@ public ResponseBase filterBlobsWi : include.stream() .map(paramItemValue -> Objects.toString(paramItemValue, "")) .collect(Collectors.joining(",")); - return service.filterBlobsSync(this.client.getUrl(), comp, timeout, this.client.getVersion(), requestId, where, - marker, maxresults, includeConverted, accept, context); + return service.filterBlobs(this.client.getUrl(), comp, timeout, this.client.getVersion(), requestId, where, + marker, maxresults, includeConverted, accept, requestOptions); } /** * The Filter Blobs operation enables callers to list blobs across all containers whose tags match a given search * expression. Filter blobs searches across all containers within a storage account but can be scoped within the * expression to a single container. - * + * * @param timeout The timeout parameter is expressed in seconds. For more information, see <a * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting * Timeouts for Blob Service Operations.</a>. @@ -885,101 +715,53 @@ public ResponseBase filterBlobsWi * 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 StorageErrorException thrown if the request is rejected by server. + * @throws HttpResponseException thrown if the service returns an error. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the result of a Filter Blobs API call. */ - @ServiceMethod(returns = ReturnType.SINGLE) public FilterBlobSegment filterBlobs(Integer timeout, String requestId, String where, String marker, Integer maxresults, List include) { - return filterBlobsWithResponse(timeout, requestId, where, marker, maxresults, include, Context.none()) + return filterBlobsWithResponse(timeout, requestId, where, marker, maxresults, include, RequestOptions.none()) .getValue(); } - /** - * The Filter Blobs operation enables callers to list blobs across all containers whose tags match a given search - * expression. Filter blobs searches across all containers within a storage account but can be scoped within the - * expression to a single container. - * - * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. - * @param requestId Provides a 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 StorageErrorException 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 Response filterBlobsNoCustomHeadersWithResponse(Integer timeout, String requestId, - String where, String marker, Integer maxresults, List include, Context context) { - final String comp = "blobs"; - final String accept = "application/xml"; - String includeConverted = (include == null) - ? null - : include.stream() - .map(paramItemValue -> Objects.toString(paramItemValue, "")) - .collect(Collectors.joining(",")); - return service.filterBlobsNoCustomHeadersSync(this.client.getUrl(), comp, timeout, this.client.getVersion(), - requestId, where, marker, maxresults, includeConverted, accept, context); - } - /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items. * @param requestId Provides a 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 StorageErrorException thrown if the request is rejected by server. + * @throws HttpResponseException thrown if the service returns an error. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an enumeration of containers along with {@link PagedResponse}. + * @return an enumeration of containers. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public PagedResponse listBlobContainersSegmentNextSinglePage(String nextLink, String requestId, - Context context) { + public PagedResponse listBlobContainersSegmentNextSinglePage(String nextLink, String requestId) { final String accept = "application/xml"; - ResponseBase res - = service.listBlobContainersSegmentNextSync(nextLink, this.client.getUrl(), this.client.getVersion(), - requestId, accept, context); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().getBlobContainerItems(), res.getValue().getNextMarker(), res.getDeserializedHeaders()); + Response res = service.listBlobContainersSegmentNext(nextLink, this.client.getUrl(), + this.client.getVersion(), requestId, accept, RequestOptions.none()); + return new PagedResponse<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getBody(), + res.getValue().getBlobContainerItems(), null, res.getValue().getNextMarker(), null, null, 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. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws StorageErrorException thrown if the request is rejected by server. + * @throws HttpResponseException thrown if the service returns an error. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an enumeration of containers along with {@link PagedResponse}. + * @return an enumeration of containers. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public PagedResponse listBlobContainersSegmentNextNoCustomHeadersSinglePage(String nextLink, - String requestId, Context context) { + public PagedResponse listBlobContainersSegmentNextSinglePage(String nextLink, String requestId, + RequestOptions requestOptions) { 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); + Response res = service.listBlobContainersSegmentNext(nextLink, this.client.getUrl(), + this.client.getVersion(), requestId, accept, requestOptions); + return new PagedResponse<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getBody(), + res.getValue().getBlobContainerItems(), null, res.getValue().getNextMarker(), null, null, null); } } diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/implementation/models/BlobSignedIdentifierWrapper.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/implementation/models/BlobSignedIdentifierWrapper.java index 1ca7db2b66a8..d90fb8419c9e 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/implementation/models/BlobSignedIdentifierWrapper.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/implementation/models/BlobSignedIdentifierWrapper.java @@ -4,17 +4,15 @@ package com.azure.v2.storage.blob.implementation.models; -import com.azure.v2.core.util.CoreUtils; import com.azure.v2.storage.blob.models.BlobSignedIdentifier; import io.clientcore.core.serialization.xml.XmlReader; import io.clientcore.core.serialization.xml.XmlSerializable; import io.clientcore.core.serialization.xml.XmlToken; import io.clientcore.core.serialization.xml.XmlWriter; - -import javax.xml.namespace.QName; -import javax.xml.stream.XMLStreamException; import java.util.ArrayList; import java.util.List; +import javax.xml.namespace.QName; +import javax.xml.stream.XMLStreamException; /** * A wrapper around List<BlobSignedIdentifier> which provides top-level metadata for serialization. @@ -24,7 +22,7 @@ public final class BlobSignedIdentifierWrapper implements XmlSerializable signedIdentifiers) { @@ -33,7 +31,7 @@ public BlobSignedIdentifierWrapper(List signedIdentifiers) /** * Get the List<BlobSignedIdentifier> contained in this wrapper. - * + * * @return the List<BlobSignedIdentifier>. */ public List items() { @@ -47,7 +45,7 @@ public XmlWriter toXml(XmlWriter xmlWriter) throws XMLStreamException { @Override public XmlWriter toXml(XmlWriter xmlWriter, String rootElementName) throws XMLStreamException { - rootElementName = CoreUtils.isNullOrEmpty(rootElementName) ? "SignedIdentifiers" : rootElementName; + rootElementName = rootElementName == null || rootElementName.isEmpty() ? "SignedIdentifiers" : rootElementName; xmlWriter.writeStartElement(rootElementName); if (signedIdentifiers != null) { for (BlobSignedIdentifier element : signedIdentifiers) { @@ -63,7 +61,7 @@ public static BlobSignedIdentifierWrapper fromXml(XmlReader xmlReader) throws XM public static BlobSignedIdentifierWrapper fromXml(XmlReader xmlReader, String rootElementName) throws XMLStreamException { - rootElementName = CoreUtils.isNullOrEmpty(rootElementName) ? "SignedIdentifiers" : rootElementName; + rootElementName = rootElementName == null || rootElementName.isEmpty() ? "SignedIdentifiers" : rootElementName; return xmlReader.readObject(rootElementName, reader -> { List items = null; diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/AccessTier.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/AccessTier.java index ce7af26dd27e..f51f0f0bbe69 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/AccessTier.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/AccessTier.java @@ -4,10 +4,13 @@ package com.azure.v2.storage.blob.models; -import io.clientcore.core.util.ExpandableEnum; - +import io.clientcore.core.utils.ExpandableEnum; +import java.util.ArrayList; +import java.util.Collection; import java.util.Map; +import java.util.Objects; import java.util.concurrent.ConcurrentHashMap; +import java.util.function.Function; /** * Defines values for AccessTier. @@ -15,121 +18,139 @@ public final class AccessTier implements ExpandableEnum { private static final Map VALUES = new ConcurrentHashMap<>(); + private static final Function NEW_INSTANCE = AccessTier::new; + /** * Static value P4 for AccessTier. */ - public static final AccessTier P4 = fromString("P4"); + public static final AccessTier P4 = fromValue("P4"); /** * Static value P6 for AccessTier. */ - public static final AccessTier P6 = fromString("P6"); + public static final AccessTier P6 = fromValue("P6"); /** * Static value P10 for AccessTier. */ - public static final AccessTier P10 = fromString("P10"); + public static final AccessTier P10 = fromValue("P10"); /** * Static value P15 for AccessTier. */ - public static final AccessTier P15 = fromString("P15"); + public static final AccessTier P15 = fromValue("P15"); /** * Static value P20 for AccessTier. */ - public static final AccessTier P20 = fromString("P20"); + public static final AccessTier P20 = fromValue("P20"); /** * Static value P30 for AccessTier. */ - public static final AccessTier P30 = fromString("P30"); + public static final AccessTier P30 = fromValue("P30"); /** * Static value P40 for AccessTier. */ - public static final AccessTier P40 = fromString("P40"); + public static final AccessTier P40 = fromValue("P40"); /** * Static value P50 for AccessTier. */ - public static final AccessTier P50 = fromString("P50"); + public static final AccessTier P50 = fromValue("P50"); /** * Static value P60 for AccessTier. */ - public static final AccessTier P60 = fromString("P60"); + public static final AccessTier P60 = fromValue("P60"); /** * Static value P70 for AccessTier. */ - public static final AccessTier P70 = fromString("P70"); + public static final AccessTier P70 = fromValue("P70"); /** * Static value P80 for AccessTier. */ - public static final AccessTier P80 = fromString("P80"); + public static final AccessTier P80 = fromValue("P80"); /** * Static value Hot for AccessTier. */ - public static final AccessTier HOT = fromString("Hot"); + public static final AccessTier HOT = fromValue("Hot"); /** * Static value Cool for AccessTier. */ - public static final AccessTier COOL = fromString("Cool"); + public static final AccessTier COOL = fromValue("Cool"); /** * Static value Archive for AccessTier. */ - public static final AccessTier ARCHIVE = fromString("Archive"); + public static final AccessTier ARCHIVE = fromValue("Archive"); /** * Static value Premium for AccessTier. */ - public static final AccessTier PREMIUM = fromString("Premium"); + public static final AccessTier PREMIUM = fromValue("Premium"); /** * Static value Cold for AccessTier. */ - public static final AccessTier COLD = fromString("Cold"); + public static final AccessTier COLD = fromValue("Cold"); - private final String name; + private final String value; - private AccessTier(String name) { - this.name = name; + private AccessTier(String value) { + this.value = value; } /** * Creates or finds a AccessTier. - * - * @param name a name to look for. + * + * @param value a value to look for. * @return the corresponding AccessTier. + * @throws IllegalArgumentException if value is null. */ - public static AccessTier fromString(String name) { - if (name == null) { - return null; + public static AccessTier fromValue(String value) { + if (value == null) { + throw new IllegalArgumentException("'value' cannot be null."); } - AccessTier value = VALUES.get(name); - if (value != null) { - return value; - } - return VALUES.computeIfAbsent(name, key -> new AccessTier(key)); + return VALUES.computeIfAbsent(value, NEW_INSTANCE); + } + + /** + * Gets known AccessTier values. + * + * @return Known AccessTier values. + */ + public static Collection values() { + return new ArrayList<>(VALUES.values()); } /** * Gets the value of the AccessTier instance. - * + * * @return the value of the AccessTier instance. */ @Override public String getValue() { - return this.name; + return this.value; } @Override public String toString() { - return name; + return Objects.toString(this.value); + } + + @Override + public boolean equals(Object obj) { + return this == obj; + } + + @Override + public int hashCode() { + return Objects.hashCode(this.value); } } diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/AccountKind.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/AccountKind.java index 25b1df73989e..ab64c1c30837 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/AccountKind.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/AccountKind.java @@ -44,7 +44,7 @@ public enum AccountKind { /** * Parses a serialized value to a AccountKind instance. - * + * * @param value the serialized value to parse. * @return the parsed AccountKind object, or null if unable to parse. */ diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/AppendBlobsAppendBlockFromUrlHeaders.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/AppendBlobsAppendBlockFromUrlHeaders.java index 264b4fdc4139..ff7169a8488f 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/AppendBlobsAppendBlockFromUrlHeaders.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/AppendBlobsAppendBlockFromUrlHeaders.java @@ -4,19 +4,18 @@ package com.azure.v2.storage.blob.models; -import com.azure.v2.core.annotation.Fluent; -import com.azure.v2.core.util.CoreUtils; +import io.clientcore.core.annotations.Metadata; +import io.clientcore.core.annotations.TypeConditions; import io.clientcore.core.http.models.HttpHeaderName; import io.clientcore.core.http.models.HttpHeaders; -import io.clientcore.core.util.DateTimeRfc1123; - +import io.clientcore.core.utils.DateTimeRfc1123; import java.time.OffsetDateTime; import java.util.Base64; /** * The AppendBlobsAppendBlockFromUrlHeaders model. */ -@Fluent +@Metadata(conditions = { TypeConditions.FLUENT }) public final class AppendBlobsAppendBlockFromUrlHeaders { /* * The x-ms-version property. @@ -88,6 +87,8 @@ public final class AppendBlobsAppendBlockFromUrlHeaders { private static final HttpHeaderName X_MS_ENCRYPTION_KEY_SHA256 = HttpHeaderName.fromString("x-ms-encryption-key-sha256"); + private static final HttpHeaderName X_MS_REQUEST_ID = HttpHeaderName.fromString("x-ms-request-id"); + private static final HttpHeaderName X_MS_REQUEST_SERVER_ENCRYPTED = HttpHeaderName.fromString("x-ms-request-server-encrypted"); @@ -98,7 +99,7 @@ public final class AppendBlobsAppendBlockFromUrlHeaders { // HttpHeaders containing the raw property values. /** * Creates an instance of AppendBlobsAppendBlockFromUrlHeaders class. - * + * * @param rawHeaders The raw HttpHeaders that will be used to create the property values. */ public AppendBlobsAppendBlockFromUrlHeaders(HttpHeaders rawHeaders) { @@ -117,7 +118,7 @@ public AppendBlobsAppendBlockFromUrlHeaders(HttpHeaders rawHeaders) { this.lastModified = new DateTimeRfc1123(lastModified); } this.xMsEncryptionKeySha256 = rawHeaders.getValue(X_MS_ENCRYPTION_KEY_SHA256); - this.xMsRequestId = rawHeaders.getValue(HttpHeaderName.fromString("x-ms-request-id")); + this.xMsRequestId = rawHeaders.getValue(X_MS_REQUEST_ID); String xMsRequestServerEncrypted = rawHeaders.getValue(X_MS_REQUEST_SERVER_ENCRYPTED); if (xMsRequestServerEncrypted != null) { this.xMsRequestServerEncrypted = Boolean.parseBoolean(xMsRequestServerEncrypted); @@ -136,7 +137,7 @@ public AppendBlobsAppendBlockFromUrlHeaders(HttpHeaders rawHeaders) { /** * Get the xMsVersion property: The x-ms-version property. - * + * * @return the xMsVersion value. */ public String getXMsVersion() { @@ -145,7 +146,7 @@ public String getXMsVersion() { /** * Set the xMsVersion property: The x-ms-version property. - * + * * @param xMsVersion the xMsVersion value to set. * @return the AppendBlobsAppendBlockFromUrlHeaders object itself. */ @@ -156,7 +157,7 @@ public AppendBlobsAppendBlockFromUrlHeaders setXMsVersion(String xMsVersion) { /** * Get the eTag property: The ETag property. - * + * * @return the eTag value. */ public String getETag() { @@ -165,7 +166,7 @@ public String getETag() { /** * Set the eTag property: The ETag property. - * + * * @param eTag the eTag value to set. * @return the AppendBlobsAppendBlockFromUrlHeaders object itself. */ @@ -176,27 +177,27 @@ public AppendBlobsAppendBlockFromUrlHeaders setETag(String eTag) { /** * Get the xMsContentCrc64 property: The x-ms-content-crc64 property. - * + * * @return the xMsContentCrc64 value. */ public byte[] getXMsContentCrc64() { - return CoreUtils.clone(this.xMsContentCrc64); + return this.xMsContentCrc64; } /** * Set the xMsContentCrc64 property: The x-ms-content-crc64 property. - * + * * @param xMsContentCrc64 the xMsContentCrc64 value to set. * @return the AppendBlobsAppendBlockFromUrlHeaders object itself. */ public AppendBlobsAppendBlockFromUrlHeaders setXMsContentCrc64(byte[] xMsContentCrc64) { - this.xMsContentCrc64 = CoreUtils.clone(xMsContentCrc64); + this.xMsContentCrc64 = xMsContentCrc64; return this; } /** * Get the xMsBlobCommittedBlockCount property: The x-ms-blob-committed-block-count property. - * + * * @return the xMsBlobCommittedBlockCount value. */ public Integer getXMsBlobCommittedBlockCount() { @@ -205,7 +206,7 @@ public Integer getXMsBlobCommittedBlockCount() { /** * Set the xMsBlobCommittedBlockCount property: The x-ms-blob-committed-block-count property. - * + * * @param xMsBlobCommittedBlockCount the xMsBlobCommittedBlockCount value to set. * @return the AppendBlobsAppendBlockFromUrlHeaders object itself. */ @@ -216,7 +217,7 @@ public AppendBlobsAppendBlockFromUrlHeaders setXMsBlobCommittedBlockCount(Intege /** * Get the lastModified property: The Last-Modified property. - * + * * @return the lastModified value. */ public OffsetDateTime getLastModified() { @@ -228,7 +229,7 @@ public OffsetDateTime getLastModified() { /** * Set the lastModified property: The Last-Modified property. - * + * * @param lastModified the lastModified value to set. * @return the AppendBlobsAppendBlockFromUrlHeaders object itself. */ @@ -243,7 +244,7 @@ public AppendBlobsAppendBlockFromUrlHeaders setLastModified(OffsetDateTime lastM /** * Get the xMsEncryptionKeySha256 property: The x-ms-encryption-key-sha256 property. - * + * * @return the xMsEncryptionKeySha256 value. */ public String getXMsEncryptionKeySha256() { @@ -252,7 +253,7 @@ public String getXMsEncryptionKeySha256() { /** * Set the xMsEncryptionKeySha256 property: The x-ms-encryption-key-sha256 property. - * + * * @param xMsEncryptionKeySha256 the xMsEncryptionKeySha256 value to set. * @return the AppendBlobsAppendBlockFromUrlHeaders object itself. */ @@ -263,7 +264,7 @@ public AppendBlobsAppendBlockFromUrlHeaders setXMsEncryptionKeySha256(String xMs /** * Get the xMsRequestId property: The x-ms-request-id property. - * + * * @return the xMsRequestId value. */ public String getXMsRequestId() { @@ -272,7 +273,7 @@ public String getXMsRequestId() { /** * Set the xMsRequestId property: The x-ms-request-id property. - * + * * @param xMsRequestId the xMsRequestId value to set. * @return the AppendBlobsAppendBlockFromUrlHeaders object itself. */ @@ -283,7 +284,7 @@ public AppendBlobsAppendBlockFromUrlHeaders setXMsRequestId(String xMsRequestId) /** * Get the xMsRequestServerEncrypted property: The x-ms-request-server-encrypted property. - * + * * @return the xMsRequestServerEncrypted value. */ public Boolean isXMsRequestServerEncrypted() { @@ -292,7 +293,7 @@ public Boolean isXMsRequestServerEncrypted() { /** * Set the xMsRequestServerEncrypted property: The x-ms-request-server-encrypted property. - * + * * @param xMsRequestServerEncrypted the xMsRequestServerEncrypted value to set. * @return the AppendBlobsAppendBlockFromUrlHeaders object itself. */ @@ -303,7 +304,7 @@ public AppendBlobsAppendBlockFromUrlHeaders setXMsRequestServerEncrypted(Boolean /** * Get the date property: The Date property. - * + * * @return the date value. */ public OffsetDateTime getDate() { @@ -315,7 +316,7 @@ public OffsetDateTime getDate() { /** * Set the date property: The Date property. - * + * * @param date the date value to set. * @return the AppendBlobsAppendBlockFromUrlHeaders object itself. */ @@ -330,27 +331,27 @@ public AppendBlobsAppendBlockFromUrlHeaders setDate(OffsetDateTime date) { /** * Get the contentMD5 property: The Content-MD5 property. - * + * * @return the contentMD5 value. */ public byte[] getContentMD5() { - return CoreUtils.clone(this.contentMD5); + return this.contentMD5; } /** * Set the contentMD5 property: The Content-MD5 property. - * + * * @param contentMD5 the contentMD5 value to set. * @return the AppendBlobsAppendBlockFromUrlHeaders object itself. */ public AppendBlobsAppendBlockFromUrlHeaders setContentMD5(byte[] contentMD5) { - this.contentMD5 = CoreUtils.clone(contentMD5); + this.contentMD5 = contentMD5; return this; } /** * Get the xMsBlobAppendOffset property: The x-ms-blob-append-offset property. - * + * * @return the xMsBlobAppendOffset value. */ public String getXMsBlobAppendOffset() { @@ -359,7 +360,7 @@ public String getXMsBlobAppendOffset() { /** * Set the xMsBlobAppendOffset property: The x-ms-blob-append-offset property. - * + * * @param xMsBlobAppendOffset the xMsBlobAppendOffset value to set. * @return the AppendBlobsAppendBlockFromUrlHeaders object itself. */ @@ -370,7 +371,7 @@ public AppendBlobsAppendBlockFromUrlHeaders setXMsBlobAppendOffset(String xMsBlo /** * Get the xMsEncryptionScope property: The x-ms-encryption-scope property. - * + * * @return the xMsEncryptionScope value. */ public String getXMsEncryptionScope() { @@ -379,7 +380,7 @@ public String getXMsEncryptionScope() { /** * Set the xMsEncryptionScope property: The x-ms-encryption-scope property. - * + * * @param xMsEncryptionScope the xMsEncryptionScope value to set. * @return the AppendBlobsAppendBlockFromUrlHeaders object itself. */ diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/AppendBlobsAppendBlockHeaders.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/AppendBlobsAppendBlockHeaders.java index 38540813e670..e932114037cb 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/AppendBlobsAppendBlockHeaders.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/AppendBlobsAppendBlockHeaders.java @@ -4,19 +4,18 @@ package com.azure.v2.storage.blob.models; -import com.azure.v2.core.annotation.Fluent; -import com.azure.v2.core.util.CoreUtils; +import io.clientcore.core.annotations.Metadata; +import io.clientcore.core.annotations.TypeConditions; import io.clientcore.core.http.models.HttpHeaderName; import io.clientcore.core.http.models.HttpHeaders; -import io.clientcore.core.util.DateTimeRfc1123; - +import io.clientcore.core.utils.DateTimeRfc1123; import java.time.OffsetDateTime; import java.util.Base64; /** * The AppendBlobsAppendBlockHeaders model. */ -@Fluent +@Metadata(conditions = { TypeConditions.FLUENT }) public final class AppendBlobsAppendBlockHeaders { /* * The x-ms-version property. @@ -103,6 +102,10 @@ public final class AppendBlobsAppendBlockHeaders { private static final HttpHeaderName X_MS_REQUEST_SERVER_ENCRYPTED = HttpHeaderName.fromString("x-ms-request-server-encrypted"); + private static final HttpHeaderName X_MS_REQUEST_ID = HttpHeaderName.fromString("x-ms-request-id"); + + private static final HttpHeaderName X_MS_CLIENT_REQUEST_ID = HttpHeaderName.fromString("x-ms-client-request-id"); + private static final HttpHeaderName X_MS_BLOB_APPEND_OFFSET = HttpHeaderName.fromString("x-ms-blob-append-offset"); private static final HttpHeaderName X_MS_ENCRYPTION_SCOPE = HttpHeaderName.fromString("x-ms-encryption-scope"); @@ -110,7 +113,7 @@ public final class AppendBlobsAppendBlockHeaders { // HttpHeaders containing the raw property values. /** * Creates an instance of AppendBlobsAppendBlockHeaders class. - * + * * @param rawHeaders The raw HttpHeaders that will be used to create the property values. */ public AppendBlobsAppendBlockHeaders(HttpHeaders rawHeaders) { @@ -142,15 +145,15 @@ public AppendBlobsAppendBlockHeaders(HttpHeaders rawHeaders) { this.contentMD5 = Base64.getDecoder().decode(contentMD5); } this.eTag = rawHeaders.getValue(HttpHeaderName.ETAG); - this.xMsRequestId = rawHeaders.getValue(HttpHeaderName.fromString("x-ms-request-id")); - this.xMsClientRequestId = rawHeaders.getValue(HttpHeaderName.fromString("x-ms-client-request-id")); + this.xMsRequestId = rawHeaders.getValue(X_MS_REQUEST_ID); + this.xMsClientRequestId = rawHeaders.getValue(X_MS_CLIENT_REQUEST_ID); this.xMsBlobAppendOffset = rawHeaders.getValue(X_MS_BLOB_APPEND_OFFSET); this.xMsEncryptionScope = rawHeaders.getValue(X_MS_ENCRYPTION_SCOPE); } /** * Get the xMsVersion property: The x-ms-version property. - * + * * @return the xMsVersion value. */ public String getXMsVersion() { @@ -159,7 +162,7 @@ public String getXMsVersion() { /** * Set the xMsVersion property: The x-ms-version property. - * + * * @param xMsVersion the xMsVersion value to set. * @return the AppendBlobsAppendBlockHeaders object itself. */ @@ -170,27 +173,27 @@ public AppendBlobsAppendBlockHeaders setXMsVersion(String xMsVersion) { /** * Get the xMsContentCrc64 property: The x-ms-content-crc64 property. - * + * * @return the xMsContentCrc64 value. */ public byte[] getXMsContentCrc64() { - return CoreUtils.clone(this.xMsContentCrc64); + return this.xMsContentCrc64; } /** * Set the xMsContentCrc64 property: The x-ms-content-crc64 property. - * + * * @param xMsContentCrc64 the xMsContentCrc64 value to set. * @return the AppendBlobsAppendBlockHeaders object itself. */ public AppendBlobsAppendBlockHeaders setXMsContentCrc64(byte[] xMsContentCrc64) { - this.xMsContentCrc64 = CoreUtils.clone(xMsContentCrc64); + this.xMsContentCrc64 = xMsContentCrc64; return this; } /** * Get the xMsBlobCommittedBlockCount property: The x-ms-blob-committed-block-count property. - * + * * @return the xMsBlobCommittedBlockCount value. */ public Integer getXMsBlobCommittedBlockCount() { @@ -199,7 +202,7 @@ public Integer getXMsBlobCommittedBlockCount() { /** * Set the xMsBlobCommittedBlockCount property: The x-ms-blob-committed-block-count property. - * + * * @param xMsBlobCommittedBlockCount the xMsBlobCommittedBlockCount value to set. * @return the AppendBlobsAppendBlockHeaders object itself. */ @@ -210,7 +213,7 @@ public AppendBlobsAppendBlockHeaders setXMsBlobCommittedBlockCount(Integer xMsBl /** * Get the lastModified property: The Last-Modified property. - * + * * @return the lastModified value. */ public OffsetDateTime getLastModified() { @@ -222,7 +225,7 @@ public OffsetDateTime getLastModified() { /** * Set the lastModified property: The Last-Modified property. - * + * * @param lastModified the lastModified value to set. * @return the AppendBlobsAppendBlockHeaders object itself. */ @@ -237,7 +240,7 @@ public AppendBlobsAppendBlockHeaders setLastModified(OffsetDateTime lastModified /** * Get the xMsEncryptionKeySha256 property: The x-ms-encryption-key-sha256 property. - * + * * @return the xMsEncryptionKeySha256 value. */ public String getXMsEncryptionKeySha256() { @@ -246,7 +249,7 @@ public String getXMsEncryptionKeySha256() { /** * Set the xMsEncryptionKeySha256 property: The x-ms-encryption-key-sha256 property. - * + * * @param xMsEncryptionKeySha256 the xMsEncryptionKeySha256 value to set. * @return the AppendBlobsAppendBlockHeaders object itself. */ @@ -257,7 +260,7 @@ public AppendBlobsAppendBlockHeaders setXMsEncryptionKeySha256(String xMsEncrypt /** * Get the xMsStructuredBody property: The x-ms-structured-body property. - * + * * @return the xMsStructuredBody value. */ public String getXMsStructuredBody() { @@ -266,7 +269,7 @@ public String getXMsStructuredBody() { /** * Set the xMsStructuredBody property: The x-ms-structured-body property. - * + * * @param xMsStructuredBody the xMsStructuredBody value to set. * @return the AppendBlobsAppendBlockHeaders object itself. */ @@ -277,7 +280,7 @@ public AppendBlobsAppendBlockHeaders setXMsStructuredBody(String xMsStructuredBo /** * Get the xMsRequestServerEncrypted property: The x-ms-request-server-encrypted property. - * + * * @return the xMsRequestServerEncrypted value. */ public Boolean isXMsRequestServerEncrypted() { @@ -286,7 +289,7 @@ public Boolean isXMsRequestServerEncrypted() { /** * Set the xMsRequestServerEncrypted property: The x-ms-request-server-encrypted property. - * + * * @param xMsRequestServerEncrypted the xMsRequestServerEncrypted value to set. * @return the AppendBlobsAppendBlockHeaders object itself. */ @@ -297,7 +300,7 @@ public AppendBlobsAppendBlockHeaders setXMsRequestServerEncrypted(Boolean xMsReq /** * Get the date property: The Date property. - * + * * @return the date value. */ public OffsetDateTime getDate() { @@ -309,7 +312,7 @@ public OffsetDateTime getDate() { /** * Set the date property: The Date property. - * + * * @param date the date value to set. * @return the AppendBlobsAppendBlockHeaders object itself. */ @@ -324,27 +327,27 @@ public AppendBlobsAppendBlockHeaders setDate(OffsetDateTime date) { /** * Get the contentMD5 property: The Content-MD5 property. - * + * * @return the contentMD5 value. */ public byte[] getContentMD5() { - return CoreUtils.clone(this.contentMD5); + return this.contentMD5; } /** * Set the contentMD5 property: The Content-MD5 property. - * + * * @param contentMD5 the contentMD5 value to set. * @return the AppendBlobsAppendBlockHeaders object itself. */ public AppendBlobsAppendBlockHeaders setContentMD5(byte[] contentMD5) { - this.contentMD5 = CoreUtils.clone(contentMD5); + this.contentMD5 = contentMD5; return this; } /** * Get the eTag property: The ETag property. - * + * * @return the eTag value. */ public String getETag() { @@ -353,7 +356,7 @@ public String getETag() { /** * Set the eTag property: The ETag property. - * + * * @param eTag the eTag value to set. * @return the AppendBlobsAppendBlockHeaders object itself. */ @@ -364,7 +367,7 @@ public AppendBlobsAppendBlockHeaders setETag(String eTag) { /** * Get the xMsRequestId property: The x-ms-request-id property. - * + * * @return the xMsRequestId value. */ public String getXMsRequestId() { @@ -373,7 +376,7 @@ public String getXMsRequestId() { /** * Set the xMsRequestId property: The x-ms-request-id property. - * + * * @param xMsRequestId the xMsRequestId value to set. * @return the AppendBlobsAppendBlockHeaders object itself. */ @@ -384,7 +387,7 @@ public AppendBlobsAppendBlockHeaders setXMsRequestId(String xMsRequestId) { /** * Get the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @return the xMsClientRequestId value. */ public String getXMsClientRequestId() { @@ -393,7 +396,7 @@ public String getXMsClientRequestId() { /** * Set the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @param xMsClientRequestId the xMsClientRequestId value to set. * @return the AppendBlobsAppendBlockHeaders object itself. */ @@ -404,7 +407,7 @@ public AppendBlobsAppendBlockHeaders setXMsClientRequestId(String xMsClientReque /** * Get the xMsBlobAppendOffset property: The x-ms-blob-append-offset property. - * + * * @return the xMsBlobAppendOffset value. */ public String getXMsBlobAppendOffset() { @@ -413,7 +416,7 @@ public String getXMsBlobAppendOffset() { /** * Set the xMsBlobAppendOffset property: The x-ms-blob-append-offset property. - * + * * @param xMsBlobAppendOffset the xMsBlobAppendOffset value to set. * @return the AppendBlobsAppendBlockHeaders object itself. */ @@ -424,7 +427,7 @@ public AppendBlobsAppendBlockHeaders setXMsBlobAppendOffset(String xMsBlobAppend /** * Get the xMsEncryptionScope property: The x-ms-encryption-scope property. - * + * * @return the xMsEncryptionScope value. */ public String getXMsEncryptionScope() { @@ -433,7 +436,7 @@ public String getXMsEncryptionScope() { /** * Set the xMsEncryptionScope property: The x-ms-encryption-scope property. - * + * * @param xMsEncryptionScope the xMsEncryptionScope value to set. * @return the AppendBlobsAppendBlockHeaders object itself. */ diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/AppendBlobsCreateHeaders.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/AppendBlobsCreateHeaders.java index e3012cd9e18d..1a2e6bcfbcf5 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/AppendBlobsCreateHeaders.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/AppendBlobsCreateHeaders.java @@ -4,19 +4,18 @@ package com.azure.v2.storage.blob.models; -import com.azure.v2.core.annotation.Fluent; -import com.azure.v2.core.util.CoreUtils; +import io.clientcore.core.annotations.Metadata; +import io.clientcore.core.annotations.TypeConditions; import io.clientcore.core.http.models.HttpHeaderName; import io.clientcore.core.http.models.HttpHeaders; -import io.clientcore.core.util.DateTimeRfc1123; - +import io.clientcore.core.utils.DateTimeRfc1123; import java.time.OffsetDateTime; import java.util.Base64; /** * The AppendBlobsCreateHeaders model. */ -@Fluent +@Metadata(conditions = { TypeConditions.FLUENT }) public final class AppendBlobsCreateHeaders { /* * The x-ms-version property. @@ -80,15 +79,19 @@ public final class AppendBlobsCreateHeaders { private static final HttpHeaderName X_MS_ENCRYPTION_KEY_SHA256 = HttpHeaderName.fromString("x-ms-encryption-key-sha256"); + private static final HttpHeaderName X_MS_REQUEST_ID = HttpHeaderName.fromString("x-ms-request-id"); + private static final HttpHeaderName X_MS_REQUEST_SERVER_ENCRYPTED = HttpHeaderName.fromString("x-ms-request-server-encrypted"); + private static final HttpHeaderName X_MS_CLIENT_REQUEST_ID = HttpHeaderName.fromString("x-ms-client-request-id"); + private static final HttpHeaderName X_MS_ENCRYPTION_SCOPE = HttpHeaderName.fromString("x-ms-encryption-scope"); // HttpHeaders containing the raw property values. /** * Creates an instance of AppendBlobsCreateHeaders class. - * + * * @param rawHeaders The raw HttpHeaders that will be used to create the property values. */ public AppendBlobsCreateHeaders(HttpHeaders rawHeaders) { @@ -100,12 +103,12 @@ public AppendBlobsCreateHeaders(HttpHeaders rawHeaders) { } this.xMsVersionId = rawHeaders.getValue(X_MS_VERSION_ID); this.xMsEncryptionKeySha256 = rawHeaders.getValue(X_MS_ENCRYPTION_KEY_SHA256); - this.xMsRequestId = rawHeaders.getValue(HttpHeaderName.fromString("x-ms-request-id")); + this.xMsRequestId = rawHeaders.getValue(X_MS_REQUEST_ID); String xMsRequestServerEncrypted = rawHeaders.getValue(X_MS_REQUEST_SERVER_ENCRYPTED); if (xMsRequestServerEncrypted != null) { this.xMsRequestServerEncrypted = Boolean.parseBoolean(xMsRequestServerEncrypted); } - this.xMsClientRequestId = rawHeaders.getValue(HttpHeaderName.fromString("x-ms-client-request-id")); + this.xMsClientRequestId = rawHeaders.getValue(X_MS_CLIENT_REQUEST_ID); String date = rawHeaders.getValue(HttpHeaderName.DATE); if (date != null) { this.date = new DateTimeRfc1123(date); @@ -119,7 +122,7 @@ public AppendBlobsCreateHeaders(HttpHeaders rawHeaders) { /** * Get the xMsVersion property: The x-ms-version property. - * + * * @return the xMsVersion value. */ public String getXMsVersion() { @@ -128,7 +131,7 @@ public String getXMsVersion() { /** * Set the xMsVersion property: The x-ms-version property. - * + * * @param xMsVersion the xMsVersion value to set. * @return the AppendBlobsCreateHeaders object itself. */ @@ -139,7 +142,7 @@ public AppendBlobsCreateHeaders setXMsVersion(String xMsVersion) { /** * Get the eTag property: The ETag property. - * + * * @return the eTag value. */ public String getETag() { @@ -148,7 +151,7 @@ public String getETag() { /** * Set the eTag property: The ETag property. - * + * * @param eTag the eTag value to set. * @return the AppendBlobsCreateHeaders object itself. */ @@ -159,7 +162,7 @@ public AppendBlobsCreateHeaders setETag(String eTag) { /** * Get the lastModified property: The Last-Modified property. - * + * * @return the lastModified value. */ public OffsetDateTime getLastModified() { @@ -171,7 +174,7 @@ public OffsetDateTime getLastModified() { /** * Set the lastModified property: The Last-Modified property. - * + * * @param lastModified the lastModified value to set. * @return the AppendBlobsCreateHeaders object itself. */ @@ -186,7 +189,7 @@ public AppendBlobsCreateHeaders setLastModified(OffsetDateTime lastModified) { /** * Get the xMsVersionId property: The x-ms-version-id property. - * + * * @return the xMsVersionId value. */ public String getXMsVersionId() { @@ -195,7 +198,7 @@ public String getXMsVersionId() { /** * Set the xMsVersionId property: The x-ms-version-id property. - * + * * @param xMsVersionId the xMsVersionId value to set. * @return the AppendBlobsCreateHeaders object itself. */ @@ -206,7 +209,7 @@ public AppendBlobsCreateHeaders setXMsVersionId(String xMsVersionId) { /** * Get the xMsEncryptionKeySha256 property: The x-ms-encryption-key-sha256 property. - * + * * @return the xMsEncryptionKeySha256 value. */ public String getXMsEncryptionKeySha256() { @@ -215,7 +218,7 @@ public String getXMsEncryptionKeySha256() { /** * Set the xMsEncryptionKeySha256 property: The x-ms-encryption-key-sha256 property. - * + * * @param xMsEncryptionKeySha256 the xMsEncryptionKeySha256 value to set. * @return the AppendBlobsCreateHeaders object itself. */ @@ -226,7 +229,7 @@ public AppendBlobsCreateHeaders setXMsEncryptionKeySha256(String xMsEncryptionKe /** * Get the xMsRequestId property: The x-ms-request-id property. - * + * * @return the xMsRequestId value. */ public String getXMsRequestId() { @@ -235,7 +238,7 @@ public String getXMsRequestId() { /** * Set the xMsRequestId property: The x-ms-request-id property. - * + * * @param xMsRequestId the xMsRequestId value to set. * @return the AppendBlobsCreateHeaders object itself. */ @@ -246,7 +249,7 @@ public AppendBlobsCreateHeaders setXMsRequestId(String xMsRequestId) { /** * Get the xMsRequestServerEncrypted property: The x-ms-request-server-encrypted property. - * + * * @return the xMsRequestServerEncrypted value. */ public Boolean isXMsRequestServerEncrypted() { @@ -255,7 +258,7 @@ public Boolean isXMsRequestServerEncrypted() { /** * Set the xMsRequestServerEncrypted property: The x-ms-request-server-encrypted property. - * + * * @param xMsRequestServerEncrypted the xMsRequestServerEncrypted value to set. * @return the AppendBlobsCreateHeaders object itself. */ @@ -266,7 +269,7 @@ public AppendBlobsCreateHeaders setXMsRequestServerEncrypted(Boolean xMsRequestS /** * Get the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @return the xMsClientRequestId value. */ public String getXMsClientRequestId() { @@ -275,7 +278,7 @@ public String getXMsClientRequestId() { /** * Set the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @param xMsClientRequestId the xMsClientRequestId value to set. * @return the AppendBlobsCreateHeaders object itself. */ @@ -286,7 +289,7 @@ public AppendBlobsCreateHeaders setXMsClientRequestId(String xMsClientRequestId) /** * Get the date property: The Date property. - * + * * @return the date value. */ public OffsetDateTime getDate() { @@ -298,7 +301,7 @@ public OffsetDateTime getDate() { /** * Set the date property: The Date property. - * + * * @param date the date value to set. * @return the AppendBlobsCreateHeaders object itself. */ @@ -313,27 +316,27 @@ public AppendBlobsCreateHeaders setDate(OffsetDateTime date) { /** * Get the contentMD5 property: The Content-MD5 property. - * + * * @return the contentMD5 value. */ public byte[] getContentMD5() { - return CoreUtils.clone(this.contentMD5); + return this.contentMD5; } /** * Set the contentMD5 property: The Content-MD5 property. - * + * * @param contentMD5 the contentMD5 value to set. * @return the AppendBlobsCreateHeaders object itself. */ public AppendBlobsCreateHeaders setContentMD5(byte[] contentMD5) { - this.contentMD5 = CoreUtils.clone(contentMD5); + this.contentMD5 = contentMD5; return this; } /** * Get the xMsEncryptionScope property: The x-ms-encryption-scope property. - * + * * @return the xMsEncryptionScope value. */ public String getXMsEncryptionScope() { @@ -342,7 +345,7 @@ public String getXMsEncryptionScope() { /** * Set the xMsEncryptionScope property: The x-ms-encryption-scope property. - * + * * @param xMsEncryptionScope the xMsEncryptionScope value to set. * @return the AppendBlobsCreateHeaders object itself. */ diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/AppendBlobsSealHeaders.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/AppendBlobsSealHeaders.java index b52db5294ccb..d670d1b92268 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/AppendBlobsSealHeaders.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/AppendBlobsSealHeaders.java @@ -4,17 +4,17 @@ package com.azure.v2.storage.blob.models; -import com.azure.v2.core.annotation.Fluent; +import io.clientcore.core.annotations.Metadata; +import io.clientcore.core.annotations.TypeConditions; import io.clientcore.core.http.models.HttpHeaderName; import io.clientcore.core.http.models.HttpHeaders; -import io.clientcore.core.util.DateTimeRfc1123; - +import io.clientcore.core.utils.DateTimeRfc1123; import java.time.OffsetDateTime; /** * The AppendBlobsSealHeaders model. */ -@Fluent +@Metadata(conditions = { TypeConditions.FLUENT }) public final class AppendBlobsSealHeaders { /* * The x-ms-version property. @@ -55,10 +55,14 @@ public final class AppendBlobsSealHeaders { private static final HttpHeaderName X_MS_BLOB_SEALED = HttpHeaderName.fromString("x-ms-blob-sealed"); + private static final HttpHeaderName X_MS_REQUEST_ID = HttpHeaderName.fromString("x-ms-request-id"); + + private static final HttpHeaderName X_MS_CLIENT_REQUEST_ID = HttpHeaderName.fromString("x-ms-client-request-id"); + // HttpHeaders containing the raw property values. /** * Creates an instance of AppendBlobsSealHeaders class. - * + * * @param rawHeaders The raw HttpHeaders that will be used to create the property values. */ public AppendBlobsSealHeaders(HttpHeaders rawHeaders) { @@ -72,8 +76,8 @@ public AppendBlobsSealHeaders(HttpHeaders rawHeaders) { if (lastModified != null) { this.lastModified = new DateTimeRfc1123(lastModified); } - this.xMsRequestId = rawHeaders.getValue(HttpHeaderName.fromString("x-ms-request-id")); - this.xMsClientRequestId = rawHeaders.getValue(HttpHeaderName.fromString("x-ms-client-request-id")); + this.xMsRequestId = rawHeaders.getValue(X_MS_REQUEST_ID); + this.xMsClientRequestId = rawHeaders.getValue(X_MS_CLIENT_REQUEST_ID); String date = rawHeaders.getValue(HttpHeaderName.DATE); if (date != null) { this.date = new DateTimeRfc1123(date); @@ -82,7 +86,7 @@ public AppendBlobsSealHeaders(HttpHeaders rawHeaders) { /** * Get the xMsVersion property: The x-ms-version property. - * + * * @return the xMsVersion value. */ public String getXMsVersion() { @@ -91,7 +95,7 @@ public String getXMsVersion() { /** * Set the xMsVersion property: The x-ms-version property. - * + * * @param xMsVersion the xMsVersion value to set. * @return the AppendBlobsSealHeaders object itself. */ @@ -102,7 +106,7 @@ public AppendBlobsSealHeaders setXMsVersion(String xMsVersion) { /** * Get the eTag property: The ETag property. - * + * * @return the eTag value. */ public String getETag() { @@ -111,7 +115,7 @@ public String getETag() { /** * Set the eTag property: The ETag property. - * + * * @param eTag the eTag value to set. * @return the AppendBlobsSealHeaders object itself. */ @@ -122,7 +126,7 @@ public AppendBlobsSealHeaders setETag(String eTag) { /** * Get the xMsBlobSealed property: The x-ms-blob-sealed property. - * + * * @return the xMsBlobSealed value. */ public Boolean isXMsBlobSealed() { @@ -131,7 +135,7 @@ public Boolean isXMsBlobSealed() { /** * Set the xMsBlobSealed property: The x-ms-blob-sealed property. - * + * * @param xMsBlobSealed the xMsBlobSealed value to set. * @return the AppendBlobsSealHeaders object itself. */ @@ -142,7 +146,7 @@ public AppendBlobsSealHeaders setXMsBlobSealed(Boolean xMsBlobSealed) { /** * Get the lastModified property: The Last-Modified property. - * + * * @return the lastModified value. */ public OffsetDateTime getLastModified() { @@ -154,7 +158,7 @@ public OffsetDateTime getLastModified() { /** * Set the lastModified property: The Last-Modified property. - * + * * @param lastModified the lastModified value to set. * @return the AppendBlobsSealHeaders object itself. */ @@ -169,7 +173,7 @@ public AppendBlobsSealHeaders setLastModified(OffsetDateTime lastModified) { /** * Get the xMsRequestId property: The x-ms-request-id property. - * + * * @return the xMsRequestId value. */ public String getXMsRequestId() { @@ -178,7 +182,7 @@ public String getXMsRequestId() { /** * Set the xMsRequestId property: The x-ms-request-id property. - * + * * @param xMsRequestId the xMsRequestId value to set. * @return the AppendBlobsSealHeaders object itself. */ @@ -189,7 +193,7 @@ public AppendBlobsSealHeaders setXMsRequestId(String xMsRequestId) { /** * Get the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @return the xMsClientRequestId value. */ public String getXMsClientRequestId() { @@ -198,7 +202,7 @@ public String getXMsClientRequestId() { /** * Set the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @param xMsClientRequestId the xMsClientRequestId value to set. * @return the AppendBlobsSealHeaders object itself. */ @@ -209,7 +213,7 @@ public AppendBlobsSealHeaders setXMsClientRequestId(String xMsClientRequestId) { /** * Get the date property: The Date property. - * + * * @return the date value. */ public OffsetDateTime getDate() { @@ -221,7 +225,7 @@ public OffsetDateTime getDate() { /** * Set the date property: The Date property. - * + * * @param date the date value to set. * @return the AppendBlobsSealHeaders object itself. */ diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ArchiveStatus.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ArchiveStatus.java index 7638d05edc05..5ae8219570c9 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ArchiveStatus.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ArchiveStatus.java @@ -4,10 +4,13 @@ package com.azure.v2.storage.blob.models; -import io.clientcore.core.util.ExpandableEnum; - +import io.clientcore.core.utils.ExpandableEnum; +import java.util.ArrayList; +import java.util.Collection; import java.util.Map; +import java.util.Objects; import java.util.concurrent.ConcurrentHashMap; +import java.util.function.Function; /** * Defines values for ArchiveStatus. @@ -15,56 +18,74 @@ public final class ArchiveStatus implements ExpandableEnum { private static final Map VALUES = new ConcurrentHashMap<>(); + private static final Function NEW_INSTANCE = ArchiveStatus::new; + /** * Static value rehydrate-pending-to-hot for ArchiveStatus. */ - public static final ArchiveStatus REHYDRATE_PENDING_TO_HOT = fromString("rehydrate-pending-to-hot"); + public static final ArchiveStatus REHYDRATE_PENDING_TO_HOT = fromValue("rehydrate-pending-to-hot"); /** * Static value rehydrate-pending-to-cool for ArchiveStatus. */ - public static final ArchiveStatus REHYDRATE_PENDING_TO_COOL = fromString("rehydrate-pending-to-cool"); + public static final ArchiveStatus REHYDRATE_PENDING_TO_COOL = fromValue("rehydrate-pending-to-cool"); /** * Static value rehydrate-pending-to-cold for ArchiveStatus. */ - public static final ArchiveStatus REHYDRATE_PENDING_TO_COLD = fromString("rehydrate-pending-to-cold"); + public static final ArchiveStatus REHYDRATE_PENDING_TO_COLD = fromValue("rehydrate-pending-to-cold"); - private final String name; + private final String value; - private ArchiveStatus(String name) { - this.name = name; + private ArchiveStatus(String value) { + this.value = value; } /** * Creates or finds a ArchiveStatus. - * - * @param name a name to look for. + * + * @param value a value to look for. * @return the corresponding ArchiveStatus. + * @throws IllegalArgumentException if value is null. */ - public static ArchiveStatus fromString(String name) { - if (name == null) { - return null; + public static ArchiveStatus fromValue(String value) { + if (value == null) { + throw new IllegalArgumentException("'value' cannot be null."); } - ArchiveStatus value = VALUES.get(name); - if (value != null) { - return value; - } - return VALUES.computeIfAbsent(name, key -> new ArchiveStatus(key)); + return VALUES.computeIfAbsent(value, NEW_INSTANCE); + } + + /** + * Gets known ArchiveStatus values. + * + * @return Known ArchiveStatus values. + */ + public static Collection values() { + return new ArrayList<>(VALUES.values()); } /** * Gets the value of the ArchiveStatus instance. - * + * * @return the value of the ArchiveStatus instance. */ @Override public String getValue() { - return this.name; + return this.value; } @Override public String toString() { - return name; + return Objects.toString(this.value); + } + + @Override + public boolean equals(Object obj) { + return this == obj; + } + + @Override + public int hashCode() { + return Objects.hashCode(this.value); } } diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ArrowConfiguration.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ArrowConfiguration.java index c7ae5003990b..ad210c99bfb4 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ArrowConfiguration.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ArrowConfiguration.java @@ -4,22 +4,21 @@ package com.azure.v2.storage.blob.models; -import com.azure.v2.core.annotation.Fluent; -import com.azure.v2.core.util.CoreUtils; +import io.clientcore.core.annotations.Metadata; +import io.clientcore.core.annotations.TypeConditions; import io.clientcore.core.serialization.xml.XmlReader; import io.clientcore.core.serialization.xml.XmlSerializable; import io.clientcore.core.serialization.xml.XmlToken; import io.clientcore.core.serialization.xml.XmlWriter; - -import javax.xml.namespace.QName; -import javax.xml.stream.XMLStreamException; import java.util.ArrayList; import java.util.List; +import javax.xml.namespace.QName; +import javax.xml.stream.XMLStreamException; /** * Groups the settings used for formatting the response if the response should be Arrow formatted. */ -@Fluent +@Metadata(conditions = { TypeConditions.FLUENT }) public final class ArrowConfiguration implements XmlSerializable { /* * The Schema property. @@ -34,7 +33,7 @@ public ArrowConfiguration() { /** * Get the schema property: The Schema property. - * + * * @return the schema value. */ public List getSchema() { @@ -46,7 +45,7 @@ public List getSchema() { /** * Set the schema property: The Schema property. - * + * * @param schema the schema value to set. * @return the ArrowConfiguration object itself. */ @@ -62,7 +61,7 @@ public XmlWriter toXml(XmlWriter xmlWriter) throws XMLStreamException { @Override public XmlWriter toXml(XmlWriter xmlWriter, String rootElementName) throws XMLStreamException { - rootElementName = CoreUtils.isNullOrEmpty(rootElementName) ? "ArrowConfiguration" : rootElementName; + rootElementName = rootElementName == null || rootElementName.isEmpty() ? "ArrowConfiguration" : rootElementName; xmlWriter.writeStartElement(rootElementName); if (this.schema != null) { xmlWriter.writeStartElement("Schema"); @@ -76,7 +75,7 @@ public XmlWriter toXml(XmlWriter xmlWriter, String rootElementName) throws XMLSt /** * Reads an instance of ArrowConfiguration from the XmlReader. - * + * * @param xmlReader The XmlReader being read. * @return An instance of ArrowConfiguration if the XmlReader was pointing to an instance of it, or null if it was * pointing to XML null. @@ -88,7 +87,7 @@ public static ArrowConfiguration fromXml(XmlReader xmlReader) throws XMLStreamEx /** * Reads an instance of ArrowConfiguration from the XmlReader. - * + * * @param xmlReader The XmlReader being read. * @param rootElementName Optional root element name to override the default defined by the model. Used to support * cases where the model can deserialize from different root element names. @@ -97,7 +96,8 @@ public static ArrowConfiguration fromXml(XmlReader xmlReader) throws XMLStreamEx * @throws XMLStreamException If an error occurs while reading the ArrowConfiguration. */ public static ArrowConfiguration fromXml(XmlReader xmlReader, String rootElementName) throws XMLStreamException { - String finalRootElementName = CoreUtils.isNullOrEmpty(rootElementName) ? "ArrowConfiguration" : rootElementName; + String finalRootElementName + = rootElementName == null || rootElementName.isEmpty() ? "ArrowConfiguration" : rootElementName; return xmlReader.readObject(finalRootElementName, reader -> { ArrowConfiguration deserializedArrowConfiguration = new ArrowConfiguration(); while (reader.nextElement() != XmlToken.END_ELEMENT) { diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ArrowField.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ArrowField.java index 607ebd12ece2..f2af4ed54a46 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ArrowField.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ArrowField.java @@ -4,20 +4,19 @@ package com.azure.v2.storage.blob.models; -import com.azure.v2.core.annotation.Fluent; -import com.azure.v2.core.util.CoreUtils; +import io.clientcore.core.annotations.Metadata; +import io.clientcore.core.annotations.TypeConditions; import io.clientcore.core.serialization.xml.XmlReader; import io.clientcore.core.serialization.xml.XmlSerializable; import io.clientcore.core.serialization.xml.XmlToken; import io.clientcore.core.serialization.xml.XmlWriter; - import javax.xml.namespace.QName; import javax.xml.stream.XMLStreamException; /** * Groups settings regarding specific field of an arrow schema. */ -@Fluent +@Metadata(conditions = { TypeConditions.FLUENT }) public final class ArrowField implements XmlSerializable { /* * The Type property. @@ -47,7 +46,7 @@ public ArrowField() { /** * Get the type property: The Type property. - * + * * @return the type value. */ public String getType() { @@ -56,7 +55,7 @@ public String getType() { /** * Set the type property: The Type property. - * + * * @param type the type value to set. * @return the ArrowField object itself. */ @@ -67,7 +66,7 @@ public ArrowField setType(String type) { /** * Get the name property: The Name property. - * + * * @return the name value. */ public String getName() { @@ -76,7 +75,7 @@ public String getName() { /** * Set the name property: The Name property. - * + * * @param name the name value to set. * @return the ArrowField object itself. */ @@ -87,7 +86,7 @@ public ArrowField setName(String name) { /** * Get the precision property: The Precision property. - * + * * @return the precision value. */ public Integer getPrecision() { @@ -96,7 +95,7 @@ public Integer getPrecision() { /** * Set the precision property: The Precision property. - * + * * @param precision the precision value to set. * @return the ArrowField object itself. */ @@ -107,7 +106,7 @@ public ArrowField setPrecision(Integer precision) { /** * Get the scale property: The Scale property. - * + * * @return the scale value. */ public Integer getScale() { @@ -116,7 +115,7 @@ public Integer getScale() { /** * Set the scale property: The Scale property. - * + * * @param scale the scale value to set. * @return the ArrowField object itself. */ @@ -132,7 +131,7 @@ public XmlWriter toXml(XmlWriter xmlWriter) throws XMLStreamException { @Override public XmlWriter toXml(XmlWriter xmlWriter, String rootElementName) throws XMLStreamException { - rootElementName = CoreUtils.isNullOrEmpty(rootElementName) ? "Field" : rootElementName; + rootElementName = rootElementName == null || rootElementName.isEmpty() ? "Field" : rootElementName; xmlWriter.writeStartElement(rootElementName); xmlWriter.writeStringElement("Type", this.type); xmlWriter.writeStringElement("Name", this.name); @@ -143,7 +142,7 @@ public XmlWriter toXml(XmlWriter xmlWriter, String rootElementName) throws XMLSt /** * Reads an instance of ArrowField from the XmlReader. - * + * * @param xmlReader The XmlReader being read. * @return An instance of ArrowField if the XmlReader was pointing to an instance of it, or null if it was pointing * to XML null. @@ -155,7 +154,7 @@ public static ArrowField fromXml(XmlReader xmlReader) throws XMLStreamException /** * Reads an instance of ArrowField from the XmlReader. - * + * * @param xmlReader The XmlReader being read. * @param rootElementName Optional root element name to override the default defined by the model. Used to support * cases where the model can deserialize from different root element names. @@ -164,7 +163,7 @@ public static ArrowField fromXml(XmlReader xmlReader) throws XMLStreamException * @throws XMLStreamException If an error occurs while reading the ArrowField. */ public static ArrowField fromXml(XmlReader xmlReader, String rootElementName) throws XMLStreamException { - String finalRootElementName = CoreUtils.isNullOrEmpty(rootElementName) ? "Field" : rootElementName; + String finalRootElementName = rootElementName == null || rootElementName.isEmpty() ? "Field" : rootElementName; return xmlReader.readObject(finalRootElementName, reader -> { ArrowField deserializedArrowField = new ArrowField(); while (reader.nextElement() != XmlToken.END_ELEMENT) { diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobAccessPolicy.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobAccessPolicy.java index c5bfb8326cbe..f2366d28df1d 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobAccessPolicy.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobAccessPolicy.java @@ -4,22 +4,21 @@ package com.azure.v2.storage.blob.models; -import com.azure.v2.core.annotation.Fluent; -import com.azure.v2.core.util.CoreUtils; +import io.clientcore.core.annotations.Metadata; +import io.clientcore.core.annotations.TypeConditions; import io.clientcore.core.serialization.xml.XmlReader; import io.clientcore.core.serialization.xml.XmlSerializable; import io.clientcore.core.serialization.xml.XmlToken; import io.clientcore.core.serialization.xml.XmlWriter; - -import javax.xml.namespace.QName; -import javax.xml.stream.XMLStreamException; import java.time.OffsetDateTime; import java.time.format.DateTimeFormatter; +import javax.xml.namespace.QName; +import javax.xml.stream.XMLStreamException; /** * An Access policy. */ -@Fluent +@Metadata(conditions = { TypeConditions.FLUENT }) public final class BlobAccessPolicy implements XmlSerializable { /* * the date-time the policy is active @@ -44,7 +43,7 @@ public BlobAccessPolicy() { /** * Get the startsOn property: the date-time the policy is active. - * + * * @return the startsOn value. */ public OffsetDateTime getStartsOn() { @@ -53,7 +52,7 @@ public OffsetDateTime getStartsOn() { /** * Set the startsOn property: the date-time the policy is active. - * + * * @param startsOn the startsOn value to set. * @return the BlobAccessPolicy object itself. */ @@ -64,7 +63,7 @@ public BlobAccessPolicy setStartsOn(OffsetDateTime startsOn) { /** * Get the expiresOn property: the date-time the policy expires. - * + * * @return the expiresOn value. */ public OffsetDateTime getExpiresOn() { @@ -73,7 +72,7 @@ public OffsetDateTime getExpiresOn() { /** * Set the expiresOn property: the date-time the policy expires. - * + * * @param expiresOn the expiresOn value to set. * @return the BlobAccessPolicy object itself. */ @@ -84,7 +83,7 @@ public BlobAccessPolicy setExpiresOn(OffsetDateTime expiresOn) { /** * Get the permissions property: the permissions for the acl policy. - * + * * @return the permissions value. */ public String getPermissions() { @@ -93,7 +92,7 @@ public String getPermissions() { /** * Set the permissions property: the permissions for the acl policy. - * + * * @param permissions the permissions value to set. * @return the BlobAccessPolicy object itself. */ @@ -109,7 +108,7 @@ public XmlWriter toXml(XmlWriter xmlWriter) throws XMLStreamException { @Override public XmlWriter toXml(XmlWriter xmlWriter, String rootElementName) throws XMLStreamException { - rootElementName = CoreUtils.isNullOrEmpty(rootElementName) ? "BlobAccessPolicy" : rootElementName; + rootElementName = rootElementName == null || rootElementName.isEmpty() ? "BlobAccessPolicy" : rootElementName; xmlWriter.writeStartElement(rootElementName); xmlWriter.writeStringElement("Start", this.startsOn == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.startsOn)); @@ -121,7 +120,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. @@ -133,7 +132,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. @@ -142,7 +141,8 @@ public static BlobAccessPolicy fromXml(XmlReader xmlReader) throws XMLStreamExce * @throws XMLStreamException If an error occurs while reading the BlobAccessPolicy. */ public static BlobAccessPolicy fromXml(XmlReader xmlReader, String rootElementName) throws XMLStreamException { - String finalRootElementName = CoreUtils.isNullOrEmpty(rootElementName) ? "BlobAccessPolicy" : rootElementName; + String finalRootElementName + = rootElementName == null || rootElementName.isEmpty() ? "BlobAccessPolicy" : rootElementName; return xmlReader.readObject(finalRootElementName, reader -> { BlobAccessPolicy deserializedBlobAccessPolicy = new BlobAccessPolicy(); while (reader.nextElement() != XmlToken.END_ELEMENT) { @@ -150,10 +150,10 @@ public static BlobAccessPolicy fromXml(XmlReader xmlReader, String rootElementNa if ("Start".equals(elementName.getLocalPart())) { deserializedBlobAccessPolicy.startsOn - = reader.getNullableElement(dateString -> CoreUtils.parseBestOffsetDateTime(dateString)); + = reader.getNullableElement(dateString -> OffsetDateTime.parse(dateString)); } else if ("Expiry".equals(elementName.getLocalPart())) { deserializedBlobAccessPolicy.expiresOn - = reader.getNullableElement(dateString -> CoreUtils.parseBestOffsetDateTime(dateString)); + = reader.getNullableElement(dateString -> OffsetDateTime.parse(dateString)); } else if ("Permission".equals(elementName.getLocalPart())) { deserializedBlobAccessPolicy.permissions = reader.getStringElement(); } else { diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobAnalyticsLogging.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobAnalyticsLogging.java index a23b8d373c5e..c0946a3859ea 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobAnalyticsLogging.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobAnalyticsLogging.java @@ -4,20 +4,19 @@ package com.azure.v2.storage.blob.models; -import com.azure.v2.core.annotation.Fluent; -import com.azure.v2.core.util.CoreUtils; +import io.clientcore.core.annotations.Metadata; +import io.clientcore.core.annotations.TypeConditions; import io.clientcore.core.serialization.xml.XmlReader; import io.clientcore.core.serialization.xml.XmlSerializable; import io.clientcore.core.serialization.xml.XmlToken; import io.clientcore.core.serialization.xml.XmlWriter; - import javax.xml.namespace.QName; import javax.xml.stream.XMLStreamException; /** * Azure Analytics Logging settings. */ -@Fluent +@Metadata(conditions = { TypeConditions.FLUENT }) public final class BlobAnalyticsLogging implements XmlSerializable { /* * The version of Storage Analytics to configure. @@ -52,7 +51,7 @@ public BlobAnalyticsLogging() { /** * Get the version property: The version of Storage Analytics to configure. - * + * * @return the version value. */ public String getVersion() { @@ -61,7 +60,7 @@ public String getVersion() { /** * Set the version property: The version of Storage Analytics to configure. - * + * * @param version the version value to set. * @return the BlobAnalyticsLogging object itself. */ @@ -72,7 +71,7 @@ public BlobAnalyticsLogging setVersion(String version) { /** * Get the delete property: Indicates whether all delete requests should be logged. - * + * * @return the delete value. */ public boolean isDelete() { @@ -81,7 +80,7 @@ public boolean isDelete() { /** * Set the delete property: Indicates whether all delete requests should be logged. - * + * * @param delete the delete value to set. * @return the BlobAnalyticsLogging object itself. */ @@ -92,7 +91,7 @@ public BlobAnalyticsLogging setDelete(boolean delete) { /** * Get the read property: Indicates whether all read requests should be logged. - * + * * @return the read value. */ public boolean isRead() { @@ -101,7 +100,7 @@ public boolean isRead() { /** * Set the read property: Indicates whether all read requests should be logged. - * + * * @param read the read value to set. * @return the BlobAnalyticsLogging object itself. */ @@ -112,7 +111,7 @@ public BlobAnalyticsLogging setRead(boolean read) { /** * Get the write property: Indicates whether all write requests should be logged. - * + * * @return the write value. */ public boolean isWrite() { @@ -121,7 +120,7 @@ public boolean isWrite() { /** * Set the write property: Indicates whether all write requests should be logged. - * + * * @param write the write value to set. * @return the BlobAnalyticsLogging object itself. */ @@ -133,7 +132,7 @@ public BlobAnalyticsLogging setWrite(boolean write) { /** * Get the retentionPolicy property: the retention policy which determines how long the associated data should * persist. - * + * * @return the retentionPolicy value. */ public BlobRetentionPolicy getRetentionPolicy() { @@ -143,7 +142,7 @@ public BlobRetentionPolicy getRetentionPolicy() { /** * Set the retentionPolicy property: the retention policy which determines how long the associated data should * persist. - * + * * @param retentionPolicy the retentionPolicy value to set. * @return the BlobAnalyticsLogging object itself. */ @@ -159,7 +158,8 @@ public XmlWriter toXml(XmlWriter xmlWriter) throws XMLStreamException { @Override public XmlWriter toXml(XmlWriter xmlWriter, String rootElementName) throws XMLStreamException { - rootElementName = CoreUtils.isNullOrEmpty(rootElementName) ? "BlobAnalyticsLogging" : rootElementName; + rootElementName + = rootElementName == null || rootElementName.isEmpty() ? "BlobAnalyticsLogging" : rootElementName; xmlWriter.writeStartElement(rootElementName); xmlWriter.writeStringElement("Version", this.version); xmlWriter.writeBooleanElement("Delete", this.delete); @@ -171,7 +171,7 @@ 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. @@ -183,7 +183,7 @@ 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. @@ -193,7 +193,7 @@ public static BlobAnalyticsLogging fromXml(XmlReader xmlReader) throws XMLStream */ public static BlobAnalyticsLogging fromXml(XmlReader xmlReader, String rootElementName) throws XMLStreamException { String finalRootElementName - = CoreUtils.isNullOrEmpty(rootElementName) ? "BlobAnalyticsLogging" : rootElementName; + = rootElementName == null || rootElementName.isEmpty() ? "BlobAnalyticsLogging" : rootElementName; return xmlReader.readObject(finalRootElementName, reader -> { BlobAnalyticsLogging deserializedBlobAnalyticsLogging = new BlobAnalyticsLogging(); while (reader.nextElement() != XmlToken.END_ELEMENT) { diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobContainerEncryptionScope.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobContainerEncryptionScope.java index a1105ea610a7..70bd8183a69b 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobContainerEncryptionScope.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobContainerEncryptionScope.java @@ -4,12 +4,13 @@ package com.azure.v2.storage.blob.models; -import com.azure.v2.core.annotation.Fluent; +import io.clientcore.core.annotations.Metadata; +import io.clientcore.core.annotations.TypeConditions; /** * Parameter group. */ -@Fluent +@Metadata(conditions = { TypeConditions.FLUENT }) public final class BlobContainerEncryptionScope { /* * Optional. Version 2019-07-07 and later. Specifies the default encryption scope to set on the container and use @@ -32,7 +33,7 @@ public BlobContainerEncryptionScope() { /** * Get the defaultEncryptionScope property: Optional. Version 2019-07-07 and later. Specifies the default encryption * scope to set on the container and use for all future writes. - * + * * @return the defaultEncryptionScope value. */ public String getDefaultEncryptionScope() { @@ -42,7 +43,7 @@ public String getDefaultEncryptionScope() { /** * Set the defaultEncryptionScope property: Optional. Version 2019-07-07 and later. Specifies the default encryption * scope to set on the container and use for all future writes. - * + * * @param defaultEncryptionScope the defaultEncryptionScope value to set. * @return the BlobContainerEncryptionScope object itself. */ @@ -54,7 +55,7 @@ public BlobContainerEncryptionScope setDefaultEncryptionScope(String defaultEncr /** * Get the encryptionScopeOverridePrevented property: Optional. Version 2019-07-07 and newer. If true, prevents any * request from specifying a different encryption scope than the scope set on the container. - * + * * @return the encryptionScopeOverridePrevented value. */ public Boolean isEncryptionScopeOverridePrevented() { @@ -64,7 +65,7 @@ public Boolean isEncryptionScopeOverridePrevented() { /** * Set the encryptionScopeOverridePrevented property: Optional. Version 2019-07-07 and newer. If true, prevents any * request from specifying a different encryption scope than the scope set on the container. - * + * * @param encryptionScopeOverridePrevented the encryptionScopeOverridePrevented value to set. * @return the BlobContainerEncryptionScope object itself. */ diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobContainerItem.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobContainerItem.java index 5357d909e531..b3013ca30375 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobContainerItem.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobContainerItem.java @@ -4,22 +4,21 @@ package com.azure.v2.storage.blob.models; -import com.azure.v2.core.annotation.Fluent; -import com.azure.v2.core.util.CoreUtils; +import io.clientcore.core.annotations.Metadata; +import io.clientcore.core.annotations.TypeConditions; import io.clientcore.core.serialization.xml.XmlReader; import io.clientcore.core.serialization.xml.XmlSerializable; import io.clientcore.core.serialization.xml.XmlToken; import io.clientcore.core.serialization.xml.XmlWriter; - -import javax.xml.namespace.QName; -import javax.xml.stream.XMLStreamException; import java.util.LinkedHashMap; import java.util.Map; +import javax.xml.namespace.QName; +import javax.xml.stream.XMLStreamException; /** * An Azure Storage container. */ -@Fluent +@Metadata(conditions = { TypeConditions.FLUENT }) public final class BlobContainerItem implements XmlSerializable { /* * The Name property. @@ -54,7 +53,7 @@ public BlobContainerItem() { /** * Get the name property: The Name property. - * + * * @return the name value. */ public String getName() { @@ -63,7 +62,7 @@ public String getName() { /** * Set the name property: The Name property. - * + * * @param name the name value to set. * @return the BlobContainerItem object itself. */ @@ -74,7 +73,7 @@ public BlobContainerItem setName(String name) { /** * Get the deleted property: The Deleted property. - * + * * @return the deleted value. */ public Boolean isDeleted() { @@ -83,7 +82,7 @@ public Boolean isDeleted() { /** * Set the deleted property: The Deleted property. - * + * * @param deleted the deleted value to set. * @return the BlobContainerItem object itself. */ @@ -94,7 +93,7 @@ public BlobContainerItem setDeleted(Boolean deleted) { /** * Get the version property: The Version property. - * + * * @return the version value. */ public String getVersion() { @@ -103,7 +102,7 @@ public String getVersion() { /** * Set the version property: The Version property. - * + * * @param version the version value to set. * @return the BlobContainerItem object itself. */ @@ -114,7 +113,7 @@ public BlobContainerItem setVersion(String version) { /** * Get the properties property: Properties of a container. - * + * * @return the properties value. */ public BlobContainerItemProperties getProperties() { @@ -123,7 +122,7 @@ public BlobContainerItemProperties getProperties() { /** * Set the properties property: Properties of a container. - * + * * @param properties the properties value to set. * @return the BlobContainerItem object itself. */ @@ -134,7 +133,7 @@ public BlobContainerItem setProperties(BlobContainerItemProperties properties) { /** * Get the metadata property: Dictionary of <string>. - * + * * @return the metadata value. */ public Map getMetadata() { @@ -143,7 +142,7 @@ public Map getMetadata() { /** * Set the metadata property: Dictionary of <string>. - * + * * @param metadata the metadata value to set. * @return the BlobContainerItem object itself. */ @@ -159,7 +158,7 @@ public XmlWriter toXml(XmlWriter xmlWriter) throws XMLStreamException { @Override public XmlWriter toXml(XmlWriter xmlWriter, String rootElementName) throws XMLStreamException { - rootElementName = CoreUtils.isNullOrEmpty(rootElementName) ? "Container" : rootElementName; + rootElementName = rootElementName == null || rootElementName.isEmpty() ? "Container" : rootElementName; xmlWriter.writeStartElement(rootElementName); xmlWriter.writeStringElement("Name", this.name); xmlWriter.writeBooleanElement("Deleted", this.deleted); @@ -177,7 +176,7 @@ 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. @@ -189,7 +188,7 @@ 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. @@ -198,7 +197,8 @@ public static BlobContainerItem fromXml(XmlReader xmlReader) throws XMLStreamExc * @throws XMLStreamException If an error occurs while reading the BlobContainerItem. */ public static BlobContainerItem fromXml(XmlReader xmlReader, String rootElementName) throws XMLStreamException { - String finalRootElementName = CoreUtils.isNullOrEmpty(rootElementName) ? "Container" : rootElementName; + String finalRootElementName + = rootElementName == null || rootElementName.isEmpty() ? "Container" : rootElementName; return xmlReader.readObject(finalRootElementName, reader -> { BlobContainerItem deserializedBlobContainerItem = new BlobContainerItem(); while (reader.nextElement() != XmlToken.END_ELEMENT) { diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobContainerItemProperties.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobContainerItemProperties.java index 2ec5b7031794..79ac998b5e5e 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobContainerItemProperties.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobContainerItemProperties.java @@ -4,23 +4,22 @@ package com.azure.v2.storage.blob.models; -import com.azure.v2.core.annotation.Fluent; -import com.azure.v2.core.util.CoreUtils; +import io.clientcore.core.annotations.Metadata; +import io.clientcore.core.annotations.TypeConditions; import io.clientcore.core.serialization.xml.XmlReader; import io.clientcore.core.serialization.xml.XmlSerializable; import io.clientcore.core.serialization.xml.XmlToken; import io.clientcore.core.serialization.xml.XmlWriter; -import io.clientcore.core.util.DateTimeRfc1123; - -import javax.xml.namespace.QName; -import javax.xml.stream.XMLStreamException; +import io.clientcore.core.utils.DateTimeRfc1123; import java.time.OffsetDateTime; import java.util.Objects; +import javax.xml.namespace.QName; +import javax.xml.stream.XMLStreamException; /** * Properties of a container. */ -@Fluent +@Metadata(conditions = { TypeConditions.FLUENT }) public final class BlobContainerItemProperties implements XmlSerializable { /* * The Last-Modified property. @@ -95,7 +94,7 @@ public BlobContainerItemProperties() { /** * Get the lastModified property: The Last-Modified property. - * + * * @return the lastModified value. */ public OffsetDateTime getLastModified() { @@ -107,7 +106,7 @@ public OffsetDateTime getLastModified() { /** * Set the lastModified property: The Last-Modified property. - * + * * @param lastModified the lastModified value to set. * @return the BlobContainerItemProperties object itself. */ @@ -122,7 +121,7 @@ public BlobContainerItemProperties setLastModified(OffsetDateTime lastModified) /** * Get the eTag property: The Etag property. - * + * * @return the eTag value. */ public String getETag() { @@ -131,7 +130,7 @@ public String getETag() { /** * Set the eTag property: The Etag property. - * + * * @param eTag the eTag value to set. * @return the BlobContainerItemProperties object itself. */ @@ -142,7 +141,7 @@ public BlobContainerItemProperties setETag(String eTag) { /** * Get the leaseStatus property: The LeaseStatus property. - * + * * @return the leaseStatus value. */ public LeaseStatusType getLeaseStatus() { @@ -151,7 +150,7 @@ public LeaseStatusType getLeaseStatus() { /** * Set the leaseStatus property: The LeaseStatus property. - * + * * @param leaseStatus the leaseStatus value to set. * @return the BlobContainerItemProperties object itself. */ @@ -162,7 +161,7 @@ public BlobContainerItemProperties setLeaseStatus(LeaseStatusType leaseStatus) { /** * Get the leaseState property: The LeaseState property. - * + * * @return the leaseState value. */ public LeaseStateType getLeaseState() { @@ -171,7 +170,7 @@ public LeaseStateType getLeaseState() { /** * Set the leaseState property: The LeaseState property. - * + * * @param leaseState the leaseState value to set. * @return the BlobContainerItemProperties object itself. */ @@ -182,7 +181,7 @@ public BlobContainerItemProperties setLeaseState(LeaseStateType leaseState) { /** * Get the leaseDuration property: The LeaseDuration property. - * + * * @return the leaseDuration value. */ public LeaseDurationType getLeaseDuration() { @@ -191,7 +190,7 @@ public LeaseDurationType getLeaseDuration() { /** * Set the leaseDuration property: The LeaseDuration property. - * + * * @param leaseDuration the leaseDuration value to set. * @return the BlobContainerItemProperties object itself. */ @@ -202,7 +201,7 @@ public BlobContainerItemProperties setLeaseDuration(LeaseDurationType leaseDurat /** * Get the publicAccess property: The PublicAccess property. - * + * * @return the publicAccess value. */ public PublicAccessType getPublicAccess() { @@ -211,7 +210,7 @@ public PublicAccessType getPublicAccess() { /** * Set the publicAccess property: The PublicAccess property. - * + * * @param publicAccess the publicAccess value to set. * @return the BlobContainerItemProperties object itself. */ @@ -222,7 +221,7 @@ public BlobContainerItemProperties setPublicAccess(PublicAccessType publicAccess /** * Get the hasImmutabilityPolicy property: The HasImmutabilityPolicy property. - * + * * @return the hasImmutabilityPolicy value. */ public Boolean isHasImmutabilityPolicy() { @@ -231,7 +230,7 @@ public Boolean isHasImmutabilityPolicy() { /** * Set the hasImmutabilityPolicy property: The HasImmutabilityPolicy property. - * + * * @param hasImmutabilityPolicy the hasImmutabilityPolicy value to set. * @return the BlobContainerItemProperties object itself. */ @@ -242,7 +241,7 @@ public BlobContainerItemProperties setHasImmutabilityPolicy(Boolean hasImmutabil /** * Get the hasLegalHold property: The HasLegalHold property. - * + * * @return the hasLegalHold value. */ public Boolean isHasLegalHold() { @@ -251,7 +250,7 @@ public Boolean isHasLegalHold() { /** * Set the hasLegalHold property: The HasLegalHold property. - * + * * @param hasLegalHold the hasLegalHold value to set. * @return the BlobContainerItemProperties object itself. */ @@ -262,7 +261,7 @@ public BlobContainerItemProperties setHasLegalHold(Boolean hasLegalHold) { /** * Get the defaultEncryptionScope property: The DefaultEncryptionScope property. - * + * * @return the defaultEncryptionScope value. */ public String getDefaultEncryptionScope() { @@ -271,7 +270,7 @@ public String getDefaultEncryptionScope() { /** * Set the defaultEncryptionScope property: The DefaultEncryptionScope property. - * + * * @param defaultEncryptionScope the defaultEncryptionScope value to set. * @return the BlobContainerItemProperties object itself. */ @@ -282,7 +281,7 @@ public BlobContainerItemProperties setDefaultEncryptionScope(String defaultEncry /** * Get the encryptionScopeOverridePrevented property: The DenyEncryptionScopeOverride property. - * + * * @return the encryptionScopeOverridePrevented value. */ public Boolean isEncryptionScopeOverridePrevented() { @@ -291,7 +290,7 @@ public Boolean isEncryptionScopeOverridePrevented() { /** * Set the encryptionScopeOverridePrevented property: The DenyEncryptionScopeOverride property. - * + * * @param encryptionScopeOverridePrevented the encryptionScopeOverridePrevented value to set. * @return the BlobContainerItemProperties object itself. */ @@ -302,7 +301,7 @@ public BlobContainerItemProperties setEncryptionScopeOverridePrevented(Boolean e /** * Get the deletedTime property: The DeletedTime property. - * + * * @return the deletedTime value. */ public OffsetDateTime getDeletedTime() { @@ -314,7 +313,7 @@ public OffsetDateTime getDeletedTime() { /** * Set the deletedTime property: The DeletedTime property. - * + * * @param deletedTime the deletedTime value to set. * @return the BlobContainerItemProperties object itself. */ @@ -329,7 +328,7 @@ public BlobContainerItemProperties setDeletedTime(OffsetDateTime deletedTime) { /** * Get the remainingRetentionDays property: The RemainingRetentionDays property. - * + * * @return the remainingRetentionDays value. */ public Integer getRemainingRetentionDays() { @@ -338,7 +337,7 @@ public Integer getRemainingRetentionDays() { /** * Set the remainingRetentionDays property: The RemainingRetentionDays property. - * + * * @param remainingRetentionDays the remainingRetentionDays value to set. * @return the BlobContainerItemProperties object itself. */ @@ -350,7 +349,7 @@ public BlobContainerItemProperties setRemainingRetentionDays(Integer remainingRe /** * Get the isImmutableStorageWithVersioningEnabled property: Indicates if version level worm is enabled on this * container. - * + * * @return the isImmutableStorageWithVersioningEnabled value. */ public Boolean isImmutableStorageWithVersioningEnabled() { @@ -360,7 +359,7 @@ public Boolean isImmutableStorageWithVersioningEnabled() { /** * Set the isImmutableStorageWithVersioningEnabled property: Indicates if version level worm is enabled on this * container. - * + * * @param isImmutableStorageWithVersioningEnabled the isImmutableStorageWithVersioningEnabled value to set. * @return the BlobContainerItemProperties object itself. */ @@ -377,7 +376,8 @@ public XmlWriter toXml(XmlWriter xmlWriter) throws XMLStreamException { @Override public XmlWriter toXml(XmlWriter xmlWriter, String rootElementName) throws XMLStreamException { - rootElementName = CoreUtils.isNullOrEmpty(rootElementName) ? "BlobContainerItemProperties" : rootElementName; + rootElementName + = rootElementName == null || rootElementName.isEmpty() ? "BlobContainerItemProperties" : rootElementName; xmlWriter.writeStartElement(rootElementName); xmlWriter.writeStringElement("Last-Modified", Objects.toString(this.lastModified, null)); xmlWriter.writeStringElement("Etag", this.eTag); @@ -385,7 +385,7 @@ public XmlWriter toXml(XmlWriter xmlWriter, String rootElementName) throws XMLSt xmlWriter.writeStringElement("LeaseState", this.leaseState == null ? null : this.leaseState.toString()); xmlWriter.writeStringElement("LeaseDuration", this.leaseDuration == null ? null : this.leaseDuration.toString()); - xmlWriter.writeStringElement("PublicAccess", this.publicAccess == null ? null : this.publicAccess.toString()); + xmlWriter.writeStringElement("PublicAccess", this.publicAccess == null ? null : this.publicAccess.getValue()); xmlWriter.writeBooleanElement("HasImmutabilityPolicy", this.hasImmutabilityPolicy); xmlWriter.writeBooleanElement("HasLegalHold", this.hasLegalHold); xmlWriter.writeStringElement("DefaultEncryptionScope", this.defaultEncryptionScope); @@ -399,7 +399,7 @@ public XmlWriter toXml(XmlWriter xmlWriter, String rootElementName) throws XMLSt /** * Reads an instance of BlobContainerItemProperties from the XmlReader. - * + * * @param xmlReader The XmlReader being read. * @return An instance of BlobContainerItemProperties if the XmlReader was pointing to an instance of it, or null if * it was pointing to XML null. @@ -411,7 +411,7 @@ public static BlobContainerItemProperties fromXml(XmlReader xmlReader) throws XM /** * Reads an instance of BlobContainerItemProperties from the XmlReader. - * + * * @param xmlReader The XmlReader being read. * @param rootElementName Optional root element name to override the default defined by the model. Used to support * cases where the model can deserialize from different root element names. @@ -422,7 +422,7 @@ public static BlobContainerItemProperties fromXml(XmlReader xmlReader) throws XM public static BlobContainerItemProperties fromXml(XmlReader xmlReader, String rootElementName) throws XMLStreamException { String finalRootElementName - = CoreUtils.isNullOrEmpty(rootElementName) ? "BlobContainerItemProperties" : rootElementName; + = rootElementName == null || rootElementName.isEmpty() ? "BlobContainerItemProperties" : rootElementName; return xmlReader.readObject(finalRootElementName, reader -> { BlobContainerItemProperties deserializedBlobContainerItemProperties = new BlobContainerItemProperties(); while (reader.nextElement() != XmlToken.END_ELEMENT) { @@ -444,7 +444,7 @@ public static BlobContainerItemProperties fromXml(XmlReader xmlReader, String ro = LeaseDurationType.fromString(reader.getStringElement()); } else if ("PublicAccess".equals(elementName.getLocalPart())) { deserializedBlobContainerItemProperties.publicAccess - = PublicAccessType.fromString(reader.getStringElement()); + = PublicAccessType.fromValue(reader.getStringElement()); } else if ("HasImmutabilityPolicy".equals(elementName.getLocalPart())) { deserializedBlobContainerItemProperties.hasImmutabilityPolicy = reader.getNullableElement(Boolean::parseBoolean); diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobContainersSegment.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobContainersSegment.java index 32b4b5922530..a36859fc509b 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobContainersSegment.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobContainersSegment.java @@ -4,22 +4,21 @@ package com.azure.v2.storage.blob.models; -import com.azure.v2.core.annotation.Fluent; -import com.azure.v2.core.util.CoreUtils; +import io.clientcore.core.annotations.Metadata; +import io.clientcore.core.annotations.TypeConditions; import io.clientcore.core.serialization.xml.XmlReader; import io.clientcore.core.serialization.xml.XmlSerializable; import io.clientcore.core.serialization.xml.XmlToken; import io.clientcore.core.serialization.xml.XmlWriter; - -import javax.xml.namespace.QName; -import javax.xml.stream.XMLStreamException; import java.util.ArrayList; import java.util.List; +import javax.xml.namespace.QName; +import javax.xml.stream.XMLStreamException; /** * An enumeration of containers. */ -@Fluent +@Metadata(conditions = { TypeConditions.FLUENT }) public final class BlobContainersSegment implements XmlSerializable { /* * The ServiceEndpoint property. @@ -59,7 +58,7 @@ public BlobContainersSegment() { /** * Get the serviceEndpoint property: The ServiceEndpoint property. - * + * * @return the serviceEndpoint value. */ public String getServiceEndpoint() { @@ -68,7 +67,7 @@ public String getServiceEndpoint() { /** * Set the serviceEndpoint property: The ServiceEndpoint property. - * + * * @param serviceEndpoint the serviceEndpoint value to set. * @return the BlobContainersSegment object itself. */ @@ -79,7 +78,7 @@ public BlobContainersSegment setServiceEndpoint(String serviceEndpoint) { /** * Get the prefix property: The Prefix property. - * + * * @return the prefix value. */ public String getPrefix() { @@ -88,7 +87,7 @@ public String getPrefix() { /** * Set the prefix property: The Prefix property. - * + * * @param prefix the prefix value to set. * @return the BlobContainersSegment object itself. */ @@ -99,7 +98,7 @@ public BlobContainersSegment setPrefix(String prefix) { /** * Get the marker property: The Marker property. - * + * * @return the marker value. */ public String getMarker() { @@ -108,7 +107,7 @@ public String getMarker() { /** * Set the marker property: The Marker property. - * + * * @param marker the marker value to set. * @return the BlobContainersSegment object itself. */ @@ -119,7 +118,7 @@ public BlobContainersSegment setMarker(String marker) { /** * Get the maxResults property: The MaxResults property. - * + * * @return the maxResults value. */ public Integer getMaxResults() { @@ -128,7 +127,7 @@ public Integer getMaxResults() { /** * Set the maxResults property: The MaxResults property. - * + * * @param maxResults the maxResults value to set. * @return the BlobContainersSegment object itself. */ @@ -139,7 +138,7 @@ public BlobContainersSegment setMaxResults(Integer maxResults) { /** * Get the nextMarker property: The NextMarker property. - * + * * @return the nextMarker value. */ public String getNextMarker() { @@ -148,7 +147,7 @@ public String getNextMarker() { /** * Set the nextMarker property: The NextMarker property. - * + * * @param nextMarker the nextMarker value to set. * @return the BlobContainersSegment object itself. */ @@ -159,7 +158,7 @@ public BlobContainersSegment setNextMarker(String nextMarker) { /** * Get the blobContainerItems property: The BlobContainerItems property. - * + * * @return the blobContainerItems value. */ public List getBlobContainerItems() { @@ -171,7 +170,7 @@ public List getBlobContainerItems() { /** * Set the blobContainerItems property: The BlobContainerItems property. - * + * * @param blobContainerItems the blobContainerItems value to set. * @return the BlobContainersSegment object itself. */ @@ -187,7 +186,7 @@ public XmlWriter toXml(XmlWriter xmlWriter) throws XMLStreamException { @Override public XmlWriter toXml(XmlWriter xmlWriter, String rootElementName) throws XMLStreamException { - rootElementName = CoreUtils.isNullOrEmpty(rootElementName) ? "EnumerationResults" : rootElementName; + rootElementName = rootElementName == null || rootElementName.isEmpty() ? "EnumerationResults" : rootElementName; xmlWriter.writeStartElement(rootElementName); xmlWriter.writeStringAttribute("ServiceEndpoint", this.serviceEndpoint); xmlWriter.writeStringElement("Prefix", this.prefix); @@ -206,7 +205,7 @@ public XmlWriter toXml(XmlWriter xmlWriter, String rootElementName) throws XMLSt /** * Reads an instance of BlobContainersSegment from the XmlReader. - * + * * @param xmlReader The XmlReader being read. * @return An instance of BlobContainersSegment if the XmlReader was pointing to an instance of it, or null if it * was pointing to XML null. @@ -218,7 +217,7 @@ public static BlobContainersSegment fromXml(XmlReader xmlReader) throws XMLStrea /** * Reads an instance of BlobContainersSegment from the XmlReader. - * + * * @param xmlReader The XmlReader being read. * @param rootElementName Optional root element name to override the default defined by the model. Used to support * cases where the model can deserialize from different root element names. @@ -227,7 +226,8 @@ public static BlobContainersSegment fromXml(XmlReader xmlReader) throws XMLStrea * @throws XMLStreamException If an error occurs while reading the BlobContainersSegment. */ public static BlobContainersSegment fromXml(XmlReader xmlReader, String rootElementName) throws XMLStreamException { - String finalRootElementName = CoreUtils.isNullOrEmpty(rootElementName) ? "EnumerationResults" : rootElementName; + String finalRootElementName + = rootElementName == null || rootElementName.isEmpty() ? "EnumerationResults" : rootElementName; return xmlReader.readObject(finalRootElementName, reader -> { BlobContainersSegment deserializedBlobContainersSegment = new BlobContainersSegment(); deserializedBlobContainersSegment.serviceEndpoint = reader.getStringAttribute(null, "ServiceEndpoint"); diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobCopySourceTagsMode.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobCopySourceTagsMode.java index 2e8bc8921fa0..5eecd5be65a7 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobCopySourceTagsMode.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobCopySourceTagsMode.java @@ -4,10 +4,13 @@ package com.azure.v2.storage.blob.models; -import io.clientcore.core.util.ExpandableEnum; - +import io.clientcore.core.utils.ExpandableEnum; +import java.util.ArrayList; +import java.util.Collection; import java.util.Map; +import java.util.Objects; import java.util.concurrent.ConcurrentHashMap; +import java.util.function.Function; /** * Defines values for BlobCopySourceTagsMode. @@ -15,51 +18,69 @@ public final class BlobCopySourceTagsMode implements ExpandableEnum { private static final Map VALUES = new ConcurrentHashMap<>(); + private static final Function NEW_INSTANCE = BlobCopySourceTagsMode::new; + /** * Static value REPLACE for BlobCopySourceTagsMode. */ - public static final BlobCopySourceTagsMode REPLACE = fromString("REPLACE"); + public static final BlobCopySourceTagsMode REPLACE = fromValue("REPLACE"); /** * Static value COPY for BlobCopySourceTagsMode. */ - public static final BlobCopySourceTagsMode COPY = fromString("COPY"); + public static final BlobCopySourceTagsMode COPY = fromValue("COPY"); - private final String name; + private final String value; - private BlobCopySourceTagsMode(String name) { - this.name = name; + private BlobCopySourceTagsMode(String value) { + this.value = value; } /** * Creates or finds a BlobCopySourceTagsMode. - * - * @param name a name to look for. + * + * @param value a value to look for. * @return the corresponding BlobCopySourceTagsMode. + * @throws IllegalArgumentException if value is null. */ - public static BlobCopySourceTagsMode fromString(String name) { - if (name == null) { - return null; + public static BlobCopySourceTagsMode fromValue(String value) { + if (value == null) { + throw new IllegalArgumentException("'value' cannot be null."); } - BlobCopySourceTagsMode value = VALUES.get(name); - if (value != null) { - return value; - } - return VALUES.computeIfAbsent(name, key -> new BlobCopySourceTagsMode(key)); + return VALUES.computeIfAbsent(value, NEW_INSTANCE); + } + + /** + * Gets known BlobCopySourceTagsMode values. + * + * @return Known BlobCopySourceTagsMode values. + */ + public static Collection values() { + return new ArrayList<>(VALUES.values()); } /** * Gets the value of the BlobCopySourceTagsMode instance. - * + * * @return the value of the BlobCopySourceTagsMode instance. */ @Override public String getValue() { - return this.name; + return this.value; } @Override public String toString() { - return name; + return Objects.toString(this.value); + } + + @Override + public boolean equals(Object obj) { + return this == obj; + } + + @Override + public int hashCode() { + return Objects.hashCode(this.value); } } diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobCorsRule.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobCorsRule.java index fb7d19040b7d..ac82ffeaa20e 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobCorsRule.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobCorsRule.java @@ -4,13 +4,12 @@ package com.azure.v2.storage.blob.models; -import com.azure.v2.core.annotation.Fluent; -import com.azure.v2.core.util.CoreUtils; +import io.clientcore.core.annotations.Metadata; +import io.clientcore.core.annotations.TypeConditions; import io.clientcore.core.serialization.xml.XmlReader; import io.clientcore.core.serialization.xml.XmlSerializable; import io.clientcore.core.serialization.xml.XmlToken; import io.clientcore.core.serialization.xml.XmlWriter; - import javax.xml.namespace.QName; import javax.xml.stream.XMLStreamException; @@ -20,7 +19,7 @@ * calling APIs in a different domain; CORS provides a secure way to allow one domain (the origin domain) to call APIs * in another domain. */ -@Fluent +@Metadata(conditions = { TypeConditions.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 @@ -62,7 +61,7 @@ public BlobCorsRule() { * service via CORS. The origin domain is the domain from which the request originates. Note that the origin must be * an exact case-sensitive match with the origin that the user age sends to the service. You can also use the * wildcard character '*' to allow all origin domains to make requests via CORS. - * + * * @return the allowedOrigins value. */ public String getAllowedOrigins() { @@ -74,7 +73,7 @@ public String getAllowedOrigins() { * service via CORS. The origin domain is the domain from which the request originates. Note that the origin must be * an exact case-sensitive match with the origin that the user age sends to the service. You can also use the * wildcard character '*' to allow all origin domains to make requests via CORS. - * + * * @param allowedOrigins the allowedOrigins value to set. * @return the BlobCorsRule object itself. */ @@ -86,7 +85,7 @@ public BlobCorsRule setAllowedOrigins(String allowedOrigins) { /** * Get the allowedMethods property: The methods (HTTP request verbs) that the origin domain may use for a CORS * request. (comma separated). - * + * * @return the allowedMethods value. */ public String getAllowedMethods() { @@ -96,7 +95,7 @@ public String getAllowedMethods() { /** * Set the allowedMethods property: The methods (HTTP request verbs) that the origin domain may use for a CORS * request. (comma separated). - * + * * @param allowedMethods the allowedMethods value to set. * @return the BlobCorsRule object itself. */ @@ -107,7 +106,7 @@ public BlobCorsRule setAllowedMethods(String allowedMethods) { /** * Get the allowedHeaders property: the request headers that the origin domain may specify on the CORS request. - * + * * @return the allowedHeaders value. */ public String getAllowedHeaders() { @@ -116,7 +115,7 @@ public String getAllowedHeaders() { /** * Set the allowedHeaders property: the request headers that the origin domain may specify on the CORS request. - * + * * @param allowedHeaders the allowedHeaders value to set. * @return the BlobCorsRule object itself. */ @@ -128,7 +127,7 @@ public BlobCorsRule setAllowedHeaders(String allowedHeaders) { /** * Get the exposedHeaders property: The response headers that may be sent in the response to the CORS request and * exposed by the browser to the request issuer. - * + * * @return the exposedHeaders value. */ public String getExposedHeaders() { @@ -138,7 +137,7 @@ public String getExposedHeaders() { /** * Set the exposedHeaders property: The response headers that may be sent in the response to the CORS request and * exposed by the browser to the request issuer. - * + * * @param exposedHeaders the exposedHeaders value to set. * @return the BlobCorsRule object itself. */ @@ -150,7 +149,7 @@ public BlobCorsRule setExposedHeaders(String exposedHeaders) { /** * Get the maxAgeInSeconds property: The maximum amount time that a browser should cache the preflight OPTIONS * request. - * + * * @return the maxAgeInSeconds value. */ public int getMaxAgeInSeconds() { @@ -160,7 +159,7 @@ public int getMaxAgeInSeconds() { /** * Set the maxAgeInSeconds property: The maximum amount time that a browser should cache the preflight OPTIONS * request. - * + * * @param maxAgeInSeconds the maxAgeInSeconds value to set. * @return the BlobCorsRule object itself. */ @@ -176,7 +175,7 @@ public XmlWriter toXml(XmlWriter xmlWriter) throws XMLStreamException { @Override public XmlWriter toXml(XmlWriter xmlWriter, String rootElementName) throws XMLStreamException { - rootElementName = CoreUtils.isNullOrEmpty(rootElementName) ? "CorsRule" : rootElementName; + rootElementName = rootElementName == null || rootElementName.isEmpty() ? "CorsRule" : rootElementName; xmlWriter.writeStartElement(rootElementName); xmlWriter.writeStringElement("AllowedOrigins", this.allowedOrigins); xmlWriter.writeStringElement("AllowedMethods", this.allowedMethods); @@ -188,7 +187,7 @@ 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. @@ -200,7 +199,7 @@ 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. @@ -209,7 +208,8 @@ public static BlobCorsRule fromXml(XmlReader xmlReader) throws XMLStreamExceptio * @throws XMLStreamException If an error occurs while reading the BlobCorsRule. */ public static BlobCorsRule fromXml(XmlReader xmlReader, String rootElementName) throws XMLStreamException { - String finalRootElementName = CoreUtils.isNullOrEmpty(rootElementName) ? "CorsRule" : rootElementName; + String finalRootElementName + = rootElementName == null || rootElementName.isEmpty() ? "CorsRule" : rootElementName; return xmlReader.readObject(finalRootElementName, reader -> { BlobCorsRule deserializedBlobCorsRule = new BlobCorsRule(); while (reader.nextElement() != XmlToken.END_ELEMENT) { diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobDeleteType.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobDeleteType.java index 1f9f84a5f7c0..a2d413b70535 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobDeleteType.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobDeleteType.java @@ -4,10 +4,13 @@ package com.azure.v2.storage.blob.models; -import io.clientcore.core.util.ExpandableEnum; - +import io.clientcore.core.utils.ExpandableEnum; +import java.util.ArrayList; +import java.util.Collection; import java.util.Map; +import java.util.Objects; import java.util.concurrent.ConcurrentHashMap; +import java.util.function.Function; /** * Defines values for BlobDeleteType. @@ -15,46 +18,64 @@ public final class BlobDeleteType implements ExpandableEnum { private static final Map VALUES = new ConcurrentHashMap<>(); + private static final Function NEW_INSTANCE = BlobDeleteType::new; + /** * Static value Permanent for BlobDeleteType. */ - public static final BlobDeleteType PERMANENT = fromString("Permanent"); + public static final BlobDeleteType PERMANENT = fromValue("Permanent"); - private final String name; + private final String value; - private BlobDeleteType(String name) { - this.name = name; + private BlobDeleteType(String value) { + this.value = value; } /** * Creates or finds a BlobDeleteType. - * - * @param name a name to look for. + * + * @param value a value to look for. * @return the corresponding BlobDeleteType. + * @throws IllegalArgumentException if value is null. */ - public static BlobDeleteType fromString(String name) { - if (name == null) { - return null; + public static BlobDeleteType fromValue(String value) { + if (value == null) { + throw new IllegalArgumentException("'value' cannot be null."); } - BlobDeleteType value = VALUES.get(name); - if (value != null) { - return value; - } - return VALUES.computeIfAbsent(name, key -> new BlobDeleteType(key)); + return VALUES.computeIfAbsent(value, NEW_INSTANCE); + } + + /** + * Gets known BlobDeleteType values. + * + * @return Known BlobDeleteType values. + */ + public static Collection values() { + return new ArrayList<>(VALUES.values()); } /** * Gets the value of the BlobDeleteType instance. - * + * * @return the value of the BlobDeleteType instance. */ @Override public String getValue() { - return this.name; + return this.value; } @Override public String toString() { - return name; + return Objects.toString(this.value); + } + + @Override + public boolean equals(Object obj) { + return this == obj; + } + + @Override + public int hashCode() { + return Objects.hashCode(this.value); } } diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobErrorCode.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobErrorCode.java index 46e2c9053aeb..85a8c7494638 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobErrorCode.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobErrorCode.java @@ -4,10 +4,13 @@ package com.azure.v2.storage.blob.models; -import io.clientcore.core.util.ExpandableEnum; - +import io.clientcore.core.utils.ExpandableEnum; +import java.util.ArrayList; +import java.util.Collection; import java.util.Map; +import java.util.Objects; import java.util.concurrent.ConcurrentHashMap; +import java.util.function.Function; /** * Error codes returned by the service. @@ -15,643 +18,661 @@ public final class BlobErrorCode implements ExpandableEnum { private static final Map VALUES = new ConcurrentHashMap<>(); + private static final Function NEW_INSTANCE = BlobErrorCode::new; + /** * Static value AccountAlreadyExists for BlobErrorCode. */ - public static final BlobErrorCode ACCOUNT_ALREADY_EXISTS = fromString("AccountAlreadyExists"); + public static final BlobErrorCode ACCOUNT_ALREADY_EXISTS = fromValue("AccountAlreadyExists"); /** * Static value AccountBeingCreated for BlobErrorCode. */ - public static final BlobErrorCode ACCOUNT_BEING_CREATED = fromString("AccountBeingCreated"); + public static final BlobErrorCode ACCOUNT_BEING_CREATED = fromValue("AccountBeingCreated"); /** * Static value AccountIsDisabled for BlobErrorCode. */ - public static final BlobErrorCode ACCOUNT_IS_DISABLED = fromString("AccountIsDisabled"); + public static final BlobErrorCode ACCOUNT_IS_DISABLED = fromValue("AccountIsDisabled"); /** * Static value AuthenticationFailed for BlobErrorCode. */ - public static final BlobErrorCode AUTHENTICATION_FAILED = fromString("AuthenticationFailed"); + public static final BlobErrorCode AUTHENTICATION_FAILED = fromValue("AuthenticationFailed"); /** * Static value AuthorizationFailure for BlobErrorCode. */ - public static final BlobErrorCode AUTHORIZATION_FAILURE = fromString("AuthorizationFailure"); + public static final BlobErrorCode AUTHORIZATION_FAILURE = fromValue("AuthorizationFailure"); /** * Static value ConditionHeadersNotSupported for BlobErrorCode. */ - public static final BlobErrorCode CONDITION_HEADERS_NOT_SUPPORTED = fromString("ConditionHeadersNotSupported"); + public static final BlobErrorCode CONDITION_HEADERS_NOT_SUPPORTED = fromValue("ConditionHeadersNotSupported"); /** * Static value ConditionNotMet for BlobErrorCode. */ - public static final BlobErrorCode CONDITION_NOT_MET = fromString("ConditionNotMet"); + public static final BlobErrorCode CONDITION_NOT_MET = fromValue("ConditionNotMet"); /** * Static value EmptyMetadataKey for BlobErrorCode. */ - public static final BlobErrorCode EMPTY_METADATA_KEY = fromString("EmptyMetadataKey"); + public static final BlobErrorCode EMPTY_METADATA_KEY = fromValue("EmptyMetadataKey"); /** * Static value InsufficientAccountPermissions for BlobErrorCode. */ - public static final BlobErrorCode INSUFFICIENT_ACCOUNT_PERMISSIONS = fromString("InsufficientAccountPermissions"); + public static final BlobErrorCode INSUFFICIENT_ACCOUNT_PERMISSIONS = fromValue("InsufficientAccountPermissions"); /** * Static value InternalError for BlobErrorCode. */ - public static final BlobErrorCode INTERNAL_ERROR = fromString("InternalError"); + public static final BlobErrorCode INTERNAL_ERROR = fromValue("InternalError"); /** * Static value InvalidAuthenticationInfo for BlobErrorCode. */ - public static final BlobErrorCode INVALID_AUTHENTICATION_INFO = fromString("InvalidAuthenticationInfo"); + public static final BlobErrorCode INVALID_AUTHENTICATION_INFO = fromValue("InvalidAuthenticationInfo"); /** * Static value InvalidHeaderValue for BlobErrorCode. */ - public static final BlobErrorCode INVALID_HEADER_VALUE = fromString("InvalidHeaderValue"); + public static final BlobErrorCode INVALID_HEADER_VALUE = fromValue("InvalidHeaderValue"); /** * Static value InvalidHttpVerb for BlobErrorCode. */ - public static final BlobErrorCode INVALID_HTTP_VERB = fromString("InvalidHttpVerb"); + public static final BlobErrorCode INVALID_HTTP_VERB = fromValue("InvalidHttpVerb"); /** * Static value InvalidInput for BlobErrorCode. */ - public static final BlobErrorCode INVALID_INPUT = fromString("InvalidInput"); + public static final BlobErrorCode INVALID_INPUT = fromValue("InvalidInput"); /** * Static value InvalidMd5 for BlobErrorCode. */ - public static final BlobErrorCode INVALID_MD5 = fromString("InvalidMd5"); + public static final BlobErrorCode INVALID_MD5 = fromValue("InvalidMd5"); /** * Static value InvalidMetadata for BlobErrorCode. */ - public static final BlobErrorCode INVALID_METADATA = fromString("InvalidMetadata"); + public static final BlobErrorCode INVALID_METADATA = fromValue("InvalidMetadata"); /** * Static value InvalidQueryParameterValue for BlobErrorCode. */ - public static final BlobErrorCode INVALID_QUERY_PARAMETER_VALUE = fromString("InvalidQueryParameterValue"); + public static final BlobErrorCode INVALID_QUERY_PARAMETER_VALUE = fromValue("InvalidQueryParameterValue"); /** * Static value InvalidRange for BlobErrorCode. */ - public static final BlobErrorCode INVALID_RANGE = fromString("InvalidRange"); + public static final BlobErrorCode INVALID_RANGE = fromValue("InvalidRange"); /** * Static value InvalidResourceName for BlobErrorCode. */ - public static final BlobErrorCode INVALID_RESOURCE_NAME = fromString("InvalidResourceName"); + public static final BlobErrorCode INVALID_RESOURCE_NAME = fromValue("InvalidResourceName"); /** * Static value InvalidUri for BlobErrorCode. */ - public static final BlobErrorCode INVALID_URI = fromString("InvalidUri"); + public static final BlobErrorCode INVALID_URI = fromValue("InvalidUri"); /** * Static value InvalidXmlDocument for BlobErrorCode. */ - public static final BlobErrorCode INVALID_XML_DOCUMENT = fromString("InvalidXmlDocument"); + public static final BlobErrorCode INVALID_XML_DOCUMENT = fromValue("InvalidXmlDocument"); /** * Static value InvalidXmlNodeValue for BlobErrorCode. */ - public static final BlobErrorCode INVALID_XML_NODE_VALUE = fromString("InvalidXmlNodeValue"); + public static final BlobErrorCode INVALID_XML_NODE_VALUE = fromValue("InvalidXmlNodeValue"); /** * Static value Md5Mismatch for BlobErrorCode. */ - public static final BlobErrorCode MD5MISMATCH = fromString("Md5Mismatch"); + public static final BlobErrorCode MD5MISMATCH = fromValue("Md5Mismatch"); /** * Static value MetadataTooLarge for BlobErrorCode. */ - public static final BlobErrorCode METADATA_TOO_LARGE = fromString("MetadataTooLarge"); + public static final BlobErrorCode METADATA_TOO_LARGE = fromValue("MetadataTooLarge"); /** * Static value MissingContentLengthHeader for BlobErrorCode. */ - public static final BlobErrorCode MISSING_CONTENT_LENGTH_HEADER = fromString("MissingContentLengthHeader"); + public static final BlobErrorCode MISSING_CONTENT_LENGTH_HEADER = fromValue("MissingContentLengthHeader"); /** * Static value MissingRequiredQueryParameter for BlobErrorCode. */ - public static final BlobErrorCode MISSING_REQUIRED_QUERY_PARAMETER = fromString("MissingRequiredQueryParameter"); + public static final BlobErrorCode MISSING_REQUIRED_QUERY_PARAMETER = fromValue("MissingRequiredQueryParameter"); /** * Static value MissingRequiredHeader for BlobErrorCode. */ - public static final BlobErrorCode MISSING_REQUIRED_HEADER = fromString("MissingRequiredHeader"); + public static final BlobErrorCode MISSING_REQUIRED_HEADER = fromValue("MissingRequiredHeader"); /** * Static value MissingRequiredXmlNode for BlobErrorCode. */ - public static final BlobErrorCode MISSING_REQUIRED_XML_NODE = fromString("MissingRequiredXmlNode"); + public static final BlobErrorCode MISSING_REQUIRED_XML_NODE = fromValue("MissingRequiredXmlNode"); /** * Static value MultipleConditionHeadersNotSupported for BlobErrorCode. */ public static final BlobErrorCode MULTIPLE_CONDITION_HEADERS_NOT_SUPPORTED - = fromString("MultipleConditionHeadersNotSupported"); + = fromValue("MultipleConditionHeadersNotSupported"); /** * Static value OperationTimedOut for BlobErrorCode. */ - public static final BlobErrorCode OPERATION_TIMED_OUT = fromString("OperationTimedOut"); + public static final BlobErrorCode OPERATION_TIMED_OUT = fromValue("OperationTimedOut"); /** * Static value OutOfRangeInput for BlobErrorCode. */ - public static final BlobErrorCode OUT_OF_RANGE_INPUT = fromString("OutOfRangeInput"); + public static final BlobErrorCode OUT_OF_RANGE_INPUT = fromValue("OutOfRangeInput"); /** * Static value OutOfRangeQueryParameterValue for BlobErrorCode. */ - public static final BlobErrorCode OUT_OF_RANGE_QUERY_PARAMETER_VALUE = fromString("OutOfRangeQueryParameterValue"); + public static final BlobErrorCode OUT_OF_RANGE_QUERY_PARAMETER_VALUE = fromValue("OutOfRangeQueryParameterValue"); /** * Static value RequestBodyTooLarge for BlobErrorCode. */ - public static final BlobErrorCode REQUEST_BODY_TOO_LARGE = fromString("RequestBodyTooLarge"); + public static final BlobErrorCode REQUEST_BODY_TOO_LARGE = fromValue("RequestBodyTooLarge"); /** * Static value ResourceTypeMismatch for BlobErrorCode. */ - public static final BlobErrorCode RESOURCE_TYPE_MISMATCH = fromString("ResourceTypeMismatch"); + public static final BlobErrorCode RESOURCE_TYPE_MISMATCH = fromValue("ResourceTypeMismatch"); /** * Static value RequestUrlFailedToParse for BlobErrorCode. */ - public static final BlobErrorCode REQUEST_URL_FAILED_TO_PARSE = fromString("RequestUrlFailedToParse"); + public static final BlobErrorCode REQUEST_URL_FAILED_TO_PARSE = fromValue("RequestUrlFailedToParse"); /** * Static value ResourceAlreadyExists for BlobErrorCode. */ - public static final BlobErrorCode RESOURCE_ALREADY_EXISTS = fromString("ResourceAlreadyExists"); + public static final BlobErrorCode RESOURCE_ALREADY_EXISTS = fromValue("ResourceAlreadyExists"); /** * Static value ResourceNotFound for BlobErrorCode. */ - public static final BlobErrorCode RESOURCE_NOT_FOUND = fromString("ResourceNotFound"); + public static final BlobErrorCode RESOURCE_NOT_FOUND = fromValue("ResourceNotFound"); /** * Static value ServerBusy for BlobErrorCode. */ - public static final BlobErrorCode SERVER_BUSY = fromString("ServerBusy"); + public static final BlobErrorCode SERVER_BUSY = fromValue("ServerBusy"); /** * Static value UnsupportedHeader for BlobErrorCode. */ - public static final BlobErrorCode UNSUPPORTED_HEADER = fromString("UnsupportedHeader"); + public static final BlobErrorCode UNSUPPORTED_HEADER = fromValue("UnsupportedHeader"); /** * Static value UnsupportedXmlNode for BlobErrorCode. */ - public static final BlobErrorCode UNSUPPORTED_XML_NODE = fromString("UnsupportedXmlNode"); + public static final BlobErrorCode UNSUPPORTED_XML_NODE = fromValue("UnsupportedXmlNode"); /** * Static value UnsupportedQueryParameter for BlobErrorCode. */ - public static final BlobErrorCode UNSUPPORTED_QUERY_PARAMETER = fromString("UnsupportedQueryParameter"); + public static final BlobErrorCode UNSUPPORTED_QUERY_PARAMETER = fromValue("UnsupportedQueryParameter"); /** * Static value UnsupportedHttpVerb for BlobErrorCode. */ - public static final BlobErrorCode UNSUPPORTED_HTTP_VERB = fromString("UnsupportedHttpVerb"); + public static final BlobErrorCode UNSUPPORTED_HTTP_VERB = fromValue("UnsupportedHttpVerb"); /** * Static value AppendPositionConditionNotMet for BlobErrorCode. */ - public static final BlobErrorCode APPEND_POSITION_CONDITION_NOT_MET = fromString("AppendPositionConditionNotMet"); + public static final BlobErrorCode APPEND_POSITION_CONDITION_NOT_MET = fromValue("AppendPositionConditionNotMet"); /** * Static value BlobAlreadyExists for BlobErrorCode. */ - public static final BlobErrorCode BLOB_ALREADY_EXISTS = fromString("BlobAlreadyExists"); + public static final BlobErrorCode BLOB_ALREADY_EXISTS = fromValue("BlobAlreadyExists"); /** * Static value BlobImmutableDueToPolicy for BlobErrorCode. */ - public static final BlobErrorCode BLOB_IMMUTABLE_DUE_TO_POLICY = fromString("BlobImmutableDueToPolicy"); + public static final BlobErrorCode BLOB_IMMUTABLE_DUE_TO_POLICY = fromValue("BlobImmutableDueToPolicy"); /** * Static value BlobNotFound for BlobErrorCode. */ - public static final BlobErrorCode BLOB_NOT_FOUND = fromString("BlobNotFound"); + public static final BlobErrorCode BLOB_NOT_FOUND = fromValue("BlobNotFound"); /** * Static value BlobOverwritten for BlobErrorCode. */ - public static final BlobErrorCode BLOB_OVERWRITTEN = fromString("BlobOverwritten"); + public static final BlobErrorCode BLOB_OVERWRITTEN = fromValue("BlobOverwritten"); /** * Static value BlobTierInadequateForContentLength for BlobErrorCode. */ public static final BlobErrorCode BLOB_TIER_INADEQUATE_FOR_CONTENT_LENGTH - = fromString("BlobTierInadequateForContentLength"); + = fromValue("BlobTierInadequateForContentLength"); /** * Static value BlobUsesCustomerSpecifiedEncryption for BlobErrorCode. */ public static final BlobErrorCode BLOB_USES_CUSTOMER_SPECIFIED_ENCRYPTION - = fromString("BlobUsesCustomerSpecifiedEncryption"); + = fromValue("BlobUsesCustomerSpecifiedEncryption"); /** * Static value BlockCountExceedsLimit for BlobErrorCode. */ - public static final BlobErrorCode BLOCK_COUNT_EXCEEDS_LIMIT = fromString("BlockCountExceedsLimit"); + public static final BlobErrorCode BLOCK_COUNT_EXCEEDS_LIMIT = fromValue("BlockCountExceedsLimit"); /** * Static value BlockListTooLong for BlobErrorCode. */ - public static final BlobErrorCode BLOCK_LIST_TOO_LONG = fromString("BlockListTooLong"); + public static final BlobErrorCode BLOCK_LIST_TOO_LONG = fromValue("BlockListTooLong"); /** * Static value CannotChangeToLowerTier for BlobErrorCode. */ - public static final BlobErrorCode CANNOT_CHANGE_TO_LOWER_TIER = fromString("CannotChangeToLowerTier"); + public static final BlobErrorCode CANNOT_CHANGE_TO_LOWER_TIER = fromValue("CannotChangeToLowerTier"); /** * Static value CannotVerifyCopySource for BlobErrorCode. */ - public static final BlobErrorCode CANNOT_VERIFY_COPY_SOURCE = fromString("CannotVerifyCopySource"); + public static final BlobErrorCode CANNOT_VERIFY_COPY_SOURCE = fromValue("CannotVerifyCopySource"); /** * Static value ContainerAlreadyExists for BlobErrorCode. */ - public static final BlobErrorCode CONTAINER_ALREADY_EXISTS = fromString("ContainerAlreadyExists"); + public static final BlobErrorCode CONTAINER_ALREADY_EXISTS = fromValue("ContainerAlreadyExists"); /** * Static value ContainerBeingDeleted for BlobErrorCode. */ - public static final BlobErrorCode CONTAINER_BEING_DELETED = fromString("ContainerBeingDeleted"); + public static final BlobErrorCode CONTAINER_BEING_DELETED = fromValue("ContainerBeingDeleted"); /** * Static value ContainerDisabled for BlobErrorCode. */ - public static final BlobErrorCode CONTAINER_DISABLED = fromString("ContainerDisabled"); + public static final BlobErrorCode CONTAINER_DISABLED = fromValue("ContainerDisabled"); /** * Static value ContainerNotFound for BlobErrorCode. */ - public static final BlobErrorCode CONTAINER_NOT_FOUND = fromString("ContainerNotFound"); + public static final BlobErrorCode CONTAINER_NOT_FOUND = fromValue("ContainerNotFound"); /** * Static value ContentLengthLargerThanTierLimit for BlobErrorCode. */ public static final BlobErrorCode CONTENT_LENGTH_LARGER_THAN_TIER_LIMIT - = fromString("ContentLengthLargerThanTierLimit"); + = fromValue("ContentLengthLargerThanTierLimit"); /** * Static value CopyAcrossAccountsNotSupported for BlobErrorCode. */ - public static final BlobErrorCode COPY_ACROSS_ACCOUNTS_NOT_SUPPORTED = fromString("CopyAcrossAccountsNotSupported"); + public static final BlobErrorCode COPY_ACROSS_ACCOUNTS_NOT_SUPPORTED = fromValue("CopyAcrossAccountsNotSupported"); /** * Static value CopyIdMismatch for BlobErrorCode. */ - public static final BlobErrorCode COPY_ID_MISMATCH = fromString("CopyIdMismatch"); + public static final BlobErrorCode COPY_ID_MISMATCH = fromValue("CopyIdMismatch"); /** * Static value FeatureVersionMismatch for BlobErrorCode. */ - public static final BlobErrorCode FEATURE_VERSION_MISMATCH = fromString("FeatureVersionMismatch"); + public static final BlobErrorCode FEATURE_VERSION_MISMATCH = fromValue("FeatureVersionMismatch"); /** * Static value IncrementalCopyBlobMismatch for BlobErrorCode. */ - public static final BlobErrorCode INCREMENTAL_COPY_BLOB_MISMATCH = fromString("IncrementalCopyBlobMismatch"); + public static final BlobErrorCode INCREMENTAL_COPY_BLOB_MISMATCH = fromValue("IncrementalCopyBlobMismatch"); /** * Static value IncrementalCopyOfEarlierVersionSnapshotNotAllowed for BlobErrorCode. */ public static final BlobErrorCode INCREMENTAL_COPY_OF_EARLIER_VERSION_SNAPSHOT_NOT_ALLOWED - = fromString("IncrementalCopyOfEarlierVersionSnapshotNotAllowed"); + = fromValue("IncrementalCopyOfEarlierVersionSnapshotNotAllowed"); /** * Static value IncrementalCopySourceMustBeSnapshot for BlobErrorCode. */ public static final BlobErrorCode INCREMENTAL_COPY_SOURCE_MUST_BE_SNAPSHOT - = fromString("IncrementalCopySourceMustBeSnapshot"); + = fromValue("IncrementalCopySourceMustBeSnapshot"); /** * Static value InfiniteLeaseDurationRequired for BlobErrorCode. */ - public static final BlobErrorCode INFINITE_LEASE_DURATION_REQUIRED = fromString("InfiniteLeaseDurationRequired"); + public static final BlobErrorCode INFINITE_LEASE_DURATION_REQUIRED = fromValue("InfiniteLeaseDurationRequired"); /** * Static value InvalidBlobOrBlock for BlobErrorCode. */ - public static final BlobErrorCode INVALID_BLOB_OR_BLOCK = fromString("InvalidBlobOrBlock"); + public static final BlobErrorCode INVALID_BLOB_OR_BLOCK = fromValue("InvalidBlobOrBlock"); /** * Static value InvalidBlobTier for BlobErrorCode. */ - public static final BlobErrorCode INVALID_BLOB_TIER = fromString("InvalidBlobTier"); + public static final BlobErrorCode INVALID_BLOB_TIER = fromValue("InvalidBlobTier"); /** * Static value InvalidBlobType for BlobErrorCode. */ - public static final BlobErrorCode INVALID_BLOB_TYPE = fromString("InvalidBlobType"); + public static final BlobErrorCode INVALID_BLOB_TYPE = fromValue("InvalidBlobType"); /** * Static value InvalidBlockId for BlobErrorCode. */ - public static final BlobErrorCode INVALID_BLOCK_ID = fromString("InvalidBlockId"); + public static final BlobErrorCode INVALID_BLOCK_ID = fromValue("InvalidBlockId"); /** * Static value InvalidBlockList for BlobErrorCode. */ - public static final BlobErrorCode INVALID_BLOCK_LIST = fromString("InvalidBlockList"); + public static final BlobErrorCode INVALID_BLOCK_LIST = fromValue("InvalidBlockList"); /** * Static value InvalidOperation for BlobErrorCode. */ - public static final BlobErrorCode INVALID_OPERATION = fromString("InvalidOperation"); + public static final BlobErrorCode INVALID_OPERATION = fromValue("InvalidOperation"); /** * Static value InvalidPageRange for BlobErrorCode. */ - public static final BlobErrorCode INVALID_PAGE_RANGE = fromString("InvalidPageRange"); + public static final BlobErrorCode INVALID_PAGE_RANGE = fromValue("InvalidPageRange"); /** * Static value InvalidSourceBlobType for BlobErrorCode. */ - public static final BlobErrorCode INVALID_SOURCE_BLOB_TYPE = fromString("InvalidSourceBlobType"); + public static final BlobErrorCode INVALID_SOURCE_BLOB_TYPE = fromValue("InvalidSourceBlobType"); /** * Static value InvalidSourceBlobUrl for BlobErrorCode. */ - public static final BlobErrorCode INVALID_SOURCE_BLOB_URL = fromString("InvalidSourceBlobUrl"); + public static final BlobErrorCode INVALID_SOURCE_BLOB_URL = fromValue("InvalidSourceBlobUrl"); /** * Static value InvalidVersionForPageBlobOperation for BlobErrorCode. */ public static final BlobErrorCode INVALID_VERSION_FOR_PAGE_BLOB_OPERATION - = fromString("InvalidVersionForPageBlobOperation"); + = fromValue("InvalidVersionForPageBlobOperation"); /** * Static value LeaseAlreadyPresent for BlobErrorCode. */ - public static final BlobErrorCode LEASE_ALREADY_PRESENT = fromString("LeaseAlreadyPresent"); + public static final BlobErrorCode LEASE_ALREADY_PRESENT = fromValue("LeaseAlreadyPresent"); /** * Static value LeaseAlreadyBroken for BlobErrorCode. */ - public static final BlobErrorCode LEASE_ALREADY_BROKEN = fromString("LeaseAlreadyBroken"); + public static final BlobErrorCode LEASE_ALREADY_BROKEN = fromValue("LeaseAlreadyBroken"); /** * Static value LeaseIdMismatchWithBlobOperation for BlobErrorCode. */ public static final BlobErrorCode LEASE_ID_MISMATCH_WITH_BLOB_OPERATION - = fromString("LeaseIdMismatchWithBlobOperation"); + = fromValue("LeaseIdMismatchWithBlobOperation"); /** * Static value LeaseIdMismatchWithContainerOperation for BlobErrorCode. */ public static final BlobErrorCode LEASE_ID_MISMATCH_WITH_CONTAINER_OPERATION - = fromString("LeaseIdMismatchWithContainerOperation"); + = fromValue("LeaseIdMismatchWithContainerOperation"); /** * Static value LeaseIdMismatchWithLeaseOperation for BlobErrorCode. */ public static final BlobErrorCode LEASE_ID_MISMATCH_WITH_LEASE_OPERATION - = fromString("LeaseIdMismatchWithLeaseOperation"); + = fromValue("LeaseIdMismatchWithLeaseOperation"); /** * Static value LeaseIdMissing for BlobErrorCode. */ - public static final BlobErrorCode LEASE_ID_MISSING = fromString("LeaseIdMissing"); + public static final BlobErrorCode LEASE_ID_MISSING = fromValue("LeaseIdMissing"); /** * Static value LeaseIsBreakingAndCannotBeAcquired for BlobErrorCode. */ public static final BlobErrorCode LEASE_IS_BREAKING_AND_CANNOT_BE_ACQUIRED - = fromString("LeaseIsBreakingAndCannotBeAcquired"); + = fromValue("LeaseIsBreakingAndCannotBeAcquired"); /** * Static value LeaseIsBreakingAndCannotBeChanged for BlobErrorCode. */ public static final BlobErrorCode LEASE_IS_BREAKING_AND_CANNOT_BE_CHANGED - = fromString("LeaseIsBreakingAndCannotBeChanged"); + = fromValue("LeaseIsBreakingAndCannotBeChanged"); /** * Static value LeaseIsBrokenAndCannotBeRenewed for BlobErrorCode. */ public static final BlobErrorCode LEASE_IS_BROKEN_AND_CANNOT_BE_RENEWED - = fromString("LeaseIsBrokenAndCannotBeRenewed"); + = fromValue("LeaseIsBrokenAndCannotBeRenewed"); /** * Static value LeaseLost for BlobErrorCode. */ - public static final BlobErrorCode LEASE_LOST = fromString("LeaseLost"); + public static final BlobErrorCode LEASE_LOST = fromValue("LeaseLost"); /** * Static value LeaseNotPresentWithBlobOperation for BlobErrorCode. */ public static final BlobErrorCode LEASE_NOT_PRESENT_WITH_BLOB_OPERATION - = fromString("LeaseNotPresentWithBlobOperation"); + = fromValue("LeaseNotPresentWithBlobOperation"); /** * Static value LeaseNotPresentWithContainerOperation for BlobErrorCode. */ public static final BlobErrorCode LEASE_NOT_PRESENT_WITH_CONTAINER_OPERATION - = fromString("LeaseNotPresentWithContainerOperation"); + = fromValue("LeaseNotPresentWithContainerOperation"); /** * Static value LeaseNotPresentWithLeaseOperation for BlobErrorCode. */ public static final BlobErrorCode LEASE_NOT_PRESENT_WITH_LEASE_OPERATION - = fromString("LeaseNotPresentWithLeaseOperation"); + = fromValue("LeaseNotPresentWithLeaseOperation"); /** * Static value MaxBlobSizeConditionNotMet for BlobErrorCode. */ - public static final BlobErrorCode MAX_BLOB_SIZE_CONDITION_NOT_MET = fromString("MaxBlobSizeConditionNotMet"); + public static final BlobErrorCode MAX_BLOB_SIZE_CONDITION_NOT_MET = fromValue("MaxBlobSizeConditionNotMet"); /** * Static value NoAuthenticationInformation for BlobErrorCode. */ - public static final BlobErrorCode NO_AUTHENTICATION_INFORMATION = fromString("NoAuthenticationInformation"); + public static final BlobErrorCode NO_AUTHENTICATION_INFORMATION = fromValue("NoAuthenticationInformation"); /** * Static value NoPendingCopyOperation for BlobErrorCode. */ - public static final BlobErrorCode NO_PENDING_COPY_OPERATION = fromString("NoPendingCopyOperation"); + public static final BlobErrorCode NO_PENDING_COPY_OPERATION = fromValue("NoPendingCopyOperation"); /** * Static value OperationNotAllowedOnIncrementalCopyBlob for BlobErrorCode. */ public static final BlobErrorCode OPERATION_NOT_ALLOWED_ON_INCREMENTAL_COPY_BLOB - = fromString("OperationNotAllowedOnIncrementalCopyBlob"); + = fromValue("OperationNotAllowedOnIncrementalCopyBlob"); /** * Static value PendingCopyOperation for BlobErrorCode. */ - public static final BlobErrorCode PENDING_COPY_OPERATION = fromString("PendingCopyOperation"); + public static final BlobErrorCode PENDING_COPY_OPERATION = fromValue("PendingCopyOperation"); /** * Static value PreviousSnapshotCannotBeNewer for BlobErrorCode. */ - public static final BlobErrorCode PREVIOUS_SNAPSHOT_CANNOT_BE_NEWER = fromString("PreviousSnapshotCannotBeNewer"); + public static final BlobErrorCode PREVIOUS_SNAPSHOT_CANNOT_BE_NEWER = fromValue("PreviousSnapshotCannotBeNewer"); /** * Static value PreviousSnapshotNotFound for BlobErrorCode. */ - public static final BlobErrorCode PREVIOUS_SNAPSHOT_NOT_FOUND = fromString("PreviousSnapshotNotFound"); + public static final BlobErrorCode PREVIOUS_SNAPSHOT_NOT_FOUND = fromValue("PreviousSnapshotNotFound"); /** * Static value PreviousSnapshotOperationNotSupported for BlobErrorCode. */ public static final BlobErrorCode PREVIOUS_SNAPSHOT_OPERATION_NOT_SUPPORTED - = fromString("PreviousSnapshotOperationNotSupported"); + = fromValue("PreviousSnapshotOperationNotSupported"); /** * Static value SequenceNumberConditionNotMet for BlobErrorCode. */ - public static final BlobErrorCode SEQUENCE_NUMBER_CONDITION_NOT_MET = fromString("SequenceNumberConditionNotMet"); + public static final BlobErrorCode SEQUENCE_NUMBER_CONDITION_NOT_MET = fromValue("SequenceNumberConditionNotMet"); /** * Static value SequenceNumberIncrementTooLarge for BlobErrorCode. */ public static final BlobErrorCode SEQUENCE_NUMBER_INCREMENT_TOO_LARGE - = fromString("SequenceNumberIncrementTooLarge"); + = fromValue("SequenceNumberIncrementTooLarge"); /** * Static value SnapshotCountExceeded for BlobErrorCode. */ - public static final BlobErrorCode SNAPSHOT_COUNT_EXCEEDED = fromString("SnapshotCountExceeded"); + public static final BlobErrorCode SNAPSHOT_COUNT_EXCEEDED = fromValue("SnapshotCountExceeded"); /** * Static value SnapshotOperationRateExceeded for BlobErrorCode. */ - public static final BlobErrorCode SNAPSHOT_OPERATION_RATE_EXCEEDED = fromString("SnapshotOperationRateExceeded"); + public static final BlobErrorCode SNAPSHOT_OPERATION_RATE_EXCEEDED = fromValue("SnapshotOperationRateExceeded"); /** * Static value SnapshotsPresent for BlobErrorCode. */ - public static final BlobErrorCode SNAPSHOTS_PRESENT = fromString("SnapshotsPresent"); + public static final BlobErrorCode SNAPSHOTS_PRESENT = fromValue("SnapshotsPresent"); /** * Static value SourceConditionNotMet for BlobErrorCode. */ - public static final BlobErrorCode SOURCE_CONDITION_NOT_MET = fromString("SourceConditionNotMet"); + public static final BlobErrorCode SOURCE_CONDITION_NOT_MET = fromValue("SourceConditionNotMet"); /** * Static value SystemInUse for BlobErrorCode. */ - public static final BlobErrorCode SYSTEM_IN_USE = fromString("SystemInUse"); + public static final BlobErrorCode SYSTEM_IN_USE = fromValue("SystemInUse"); /** * Static value TargetConditionNotMet for BlobErrorCode. */ - public static final BlobErrorCode TARGET_CONDITION_NOT_MET = fromString("TargetConditionNotMet"); + public static final BlobErrorCode TARGET_CONDITION_NOT_MET = fromValue("TargetConditionNotMet"); /** * Static value UnauthorizedBlobOverwrite for BlobErrorCode. */ - public static final BlobErrorCode UNAUTHORIZED_BLOB_OVERWRITE = fromString("UnauthorizedBlobOverwrite"); + public static final BlobErrorCode UNAUTHORIZED_BLOB_OVERWRITE = fromValue("UnauthorizedBlobOverwrite"); /** * Static value BlobBeingRehydrated for BlobErrorCode. */ - public static final BlobErrorCode BLOB_BEING_REHYDRATED = fromString("BlobBeingRehydrated"); + public static final BlobErrorCode BLOB_BEING_REHYDRATED = fromValue("BlobBeingRehydrated"); /** * Static value BlobArchived for BlobErrorCode. */ - public static final BlobErrorCode BLOB_ARCHIVED = fromString("BlobArchived"); + public static final BlobErrorCode BLOB_ARCHIVED = fromValue("BlobArchived"); /** * Static value BlobNotArchived for BlobErrorCode. */ - public static final BlobErrorCode BLOB_NOT_ARCHIVED = fromString("BlobNotArchived"); + public static final BlobErrorCode BLOB_NOT_ARCHIVED = fromValue("BlobNotArchived"); /** * Static value AuthorizationSourceIPMismatch for BlobErrorCode. */ - public static final BlobErrorCode AUTHORIZATION_SOURCE_IPMISMATCH = fromString("AuthorizationSourceIPMismatch"); + public static final BlobErrorCode AUTHORIZATION_SOURCE_IPMISMATCH = fromValue("AuthorizationSourceIPMismatch"); /** * Static value AuthorizationProtocolMismatch for BlobErrorCode. */ - public static final BlobErrorCode AUTHORIZATION_PROTOCOL_MISMATCH = fromString("AuthorizationProtocolMismatch"); + public static final BlobErrorCode AUTHORIZATION_PROTOCOL_MISMATCH = fromValue("AuthorizationProtocolMismatch"); /** * Static value AuthorizationPermissionMismatch for BlobErrorCode. */ - public static final BlobErrorCode AUTHORIZATION_PERMISSION_MISMATCH = fromString("AuthorizationPermissionMismatch"); + public static final BlobErrorCode AUTHORIZATION_PERMISSION_MISMATCH = fromValue("AuthorizationPermissionMismatch"); /** * Static value AuthorizationServiceMismatch for BlobErrorCode. */ - public static final BlobErrorCode AUTHORIZATION_SERVICE_MISMATCH = fromString("AuthorizationServiceMismatch"); + public static final BlobErrorCode AUTHORIZATION_SERVICE_MISMATCH = fromValue("AuthorizationServiceMismatch"); /** * Static value AuthorizationResourceTypeMismatch for BlobErrorCode. */ public static final BlobErrorCode AUTHORIZATION_RESOURCE_TYPE_MISMATCH - = fromString("AuthorizationResourceTypeMismatch"); + = fromValue("AuthorizationResourceTypeMismatch"); /** * Static value BlobAccessTierNotSupportedForAccountType for BlobErrorCode. */ public static final BlobErrorCode BLOB_ACCESS_TIER_NOT_SUPPORTED_FOR_ACCOUNT_TYPE - = fromString("BlobAccessTierNotSupportedForAccountType"); + = fromValue("BlobAccessTierNotSupportedForAccountType"); /** * Static value SnaphotOperationRateExceeded for BlobErrorCode. */ - public static final BlobErrorCode SNAPHOT_OPERATION_RATE_EXCEEDED = fromString("SnaphotOperationRateExceeded"); + public static final BlobErrorCode SNAPHOT_OPERATION_RATE_EXCEEDED = fromValue("SnaphotOperationRateExceeded"); /** * Static value IncrementalCopyOfEralierVersionSnapshotNotAllowed for BlobErrorCode. */ public static final BlobErrorCode INCREMENTAL_COPY_OF_ERALIER_VERSION_SNAPSHOT_NOT_ALLOWED - = fromString("IncrementalCopyOfEralierVersionSnapshotNotAllowed"); + = fromValue("IncrementalCopyOfEralierVersionSnapshotNotAllowed"); - private final String name; + private final String value; - private BlobErrorCode(String name) { - this.name = name; + private BlobErrorCode(String value) { + this.value = value; } /** * Creates or finds a BlobErrorCode. - * - * @param name a name to look for. + * + * @param value a value to look for. * @return the corresponding BlobErrorCode. + * @throws IllegalArgumentException if value is null. */ - public static BlobErrorCode fromString(String name) { - if (name == null) { - return null; + public static BlobErrorCode fromValue(String value) { + if (value == null) { + throw new IllegalArgumentException("'value' cannot be null."); } - BlobErrorCode value = VALUES.get(name); - if (value != null) { - return value; - } - return VALUES.computeIfAbsent(name, key -> new BlobErrorCode(key)); + return VALUES.computeIfAbsent(value, NEW_INSTANCE); + } + + /** + * Gets known BlobErrorCode values. + * + * @return Known BlobErrorCode values. + */ + public static Collection values() { + return new ArrayList<>(VALUES.values()); } /** * Gets the value of the BlobErrorCode instance. - * + * * @return the value of the BlobErrorCode instance. */ @Override public String getValue() { - return this.name; + return this.value; } @Override public String toString() { - return name; + return Objects.toString(this.value); + } + + @Override + public boolean equals(Object obj) { + return this == obj; + } + + @Override + public int hashCode() { + return Objects.hashCode(this.value); } } diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobExpiryOptions.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobExpiryOptions.java index e978388538a9..4b45b9ad5203 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobExpiryOptions.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobExpiryOptions.java @@ -4,10 +4,13 @@ package com.azure.v2.storage.blob.models; -import io.clientcore.core.util.ExpandableEnum; - +import io.clientcore.core.utils.ExpandableEnum; +import java.util.ArrayList; +import java.util.Collection; import java.util.Map; +import java.util.Objects; import java.util.concurrent.ConcurrentHashMap; +import java.util.function.Function; /** * Defines values for BlobExpiryOptions. @@ -15,61 +18,79 @@ public final class BlobExpiryOptions implements ExpandableEnum { private static final Map VALUES = new ConcurrentHashMap<>(); + private static final Function NEW_INSTANCE = BlobExpiryOptions::new; + /** * Static value NeverExpire for BlobExpiryOptions. */ - public static final BlobExpiryOptions NEVER_EXPIRE = fromString("NeverExpire"); + public static final BlobExpiryOptions NEVER_EXPIRE = fromValue("NeverExpire"); /** * Static value RelativeToCreation for BlobExpiryOptions. */ - public static final BlobExpiryOptions RELATIVE_TO_CREATION = fromString("RelativeToCreation"); + public static final BlobExpiryOptions RELATIVE_TO_CREATION = fromValue("RelativeToCreation"); /** * Static value RelativeToNow for BlobExpiryOptions. */ - public static final BlobExpiryOptions RELATIVE_TO_NOW = fromString("RelativeToNow"); + public static final BlobExpiryOptions RELATIVE_TO_NOW = fromValue("RelativeToNow"); /** * Static value Absolute for BlobExpiryOptions. */ - public static final BlobExpiryOptions ABSOLUTE = fromString("Absolute"); + public static final BlobExpiryOptions ABSOLUTE = fromValue("Absolute"); - private final String name; + private final String value; - private BlobExpiryOptions(String name) { - this.name = name; + private BlobExpiryOptions(String value) { + this.value = value; } /** * Creates or finds a BlobExpiryOptions. - * - * @param name a name to look for. + * + * @param value a value to look for. * @return the corresponding BlobExpiryOptions. + * @throws IllegalArgumentException if value is null. */ - public static BlobExpiryOptions fromString(String name) { - if (name == null) { - return null; + public static BlobExpiryOptions fromValue(String value) { + if (value == null) { + throw new IllegalArgumentException("'value' cannot be null."); } - BlobExpiryOptions value = VALUES.get(name); - if (value != null) { - return value; - } - return VALUES.computeIfAbsent(name, key -> new BlobExpiryOptions(key)); + return VALUES.computeIfAbsent(value, NEW_INSTANCE); + } + + /** + * Gets known BlobExpiryOptions values. + * + * @return Known BlobExpiryOptions values. + */ + public static Collection values() { + return new ArrayList<>(VALUES.values()); } /** * Gets the value of the BlobExpiryOptions instance. - * + * * @return the value of the BlobExpiryOptions instance. */ @Override public String getValue() { - return this.name; + return this.value; } @Override public String toString() { - return name; + return Objects.toString(this.value); + } + + @Override + public boolean equals(Object obj) { + return this == obj; + } + + @Override + public int hashCode() { + return Objects.hashCode(this.value); } } diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobFlatListSegment.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobFlatListSegment.java index cc4a0221f433..27ddb51f7856 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobFlatListSegment.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobFlatListSegment.java @@ -4,22 +4,21 @@ package com.azure.v2.storage.blob.models; -import com.azure.v2.core.annotation.Fluent; -import com.azure.v2.core.util.CoreUtils; +import io.clientcore.core.annotations.Metadata; +import io.clientcore.core.annotations.TypeConditions; import io.clientcore.core.serialization.xml.XmlReader; import io.clientcore.core.serialization.xml.XmlSerializable; import io.clientcore.core.serialization.xml.XmlToken; import io.clientcore.core.serialization.xml.XmlWriter; - -import javax.xml.namespace.QName; -import javax.xml.stream.XMLStreamException; import java.util.ArrayList; import java.util.List; +import javax.xml.namespace.QName; +import javax.xml.stream.XMLStreamException; /** * The BlobFlatListSegment model. */ -@Fluent +@Metadata(conditions = { TypeConditions.FLUENT }) public final class BlobFlatListSegment implements XmlSerializable { /* * The BlobItems property. @@ -34,7 +33,7 @@ public BlobFlatListSegment() { /** * Get the blobItems property: The BlobItems property. - * + * * @return the blobItems value. */ public List getBlobItems() { @@ -43,7 +42,7 @@ public List getBlobItems() { /** * Set the blobItems property: The BlobItems property. - * + * * @param blobItems the blobItems value to set. * @return the BlobFlatListSegment object itself. */ @@ -59,7 +58,7 @@ public XmlWriter toXml(XmlWriter xmlWriter) throws XMLStreamException { @Override public XmlWriter toXml(XmlWriter xmlWriter, String rootElementName) throws XMLStreamException { - rootElementName = CoreUtils.isNullOrEmpty(rootElementName) ? "Blobs" : rootElementName; + rootElementName = rootElementName == null || rootElementName.isEmpty() ? "Blobs" : rootElementName; xmlWriter.writeStartElement(rootElementName); if (this.blobItems != null) { for (BlobItemInternal element : this.blobItems) { @@ -71,7 +70,7 @@ public XmlWriter toXml(XmlWriter xmlWriter, String rootElementName) throws XMLSt /** * 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. @@ -83,7 +82,7 @@ public static BlobFlatListSegment fromXml(XmlReader xmlReader) throws XMLStreamE /** * 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. @@ -92,7 +91,7 @@ public static BlobFlatListSegment fromXml(XmlReader xmlReader) throws XMLStreamE * @throws XMLStreamException If an error occurs while reading the BlobFlatListSegment. */ public static BlobFlatListSegment fromXml(XmlReader xmlReader, String rootElementName) throws XMLStreamException { - String finalRootElementName = CoreUtils.isNullOrEmpty(rootElementName) ? "Blobs" : rootElementName; + String finalRootElementName = rootElementName == null || rootElementName.isEmpty() ? "Blobs" : rootElementName; return xmlReader.readObject(finalRootElementName, reader -> { BlobFlatListSegment deserializedBlobFlatListSegment = new BlobFlatListSegment(); while (reader.nextElement() != XmlToken.END_ELEMENT) { diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobHierarchyListSegment.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobHierarchyListSegment.java index b50deec6a586..47538b79e2b9 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobHierarchyListSegment.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobHierarchyListSegment.java @@ -4,22 +4,21 @@ package com.azure.v2.storage.blob.models; -import com.azure.v2.core.annotation.Fluent; -import com.azure.v2.core.util.CoreUtils; +import io.clientcore.core.annotations.Metadata; +import io.clientcore.core.annotations.TypeConditions; import io.clientcore.core.serialization.xml.XmlReader; import io.clientcore.core.serialization.xml.XmlSerializable; import io.clientcore.core.serialization.xml.XmlToken; import io.clientcore.core.serialization.xml.XmlWriter; - -import javax.xml.namespace.QName; -import javax.xml.stream.XMLStreamException; import java.util.ArrayList; import java.util.List; +import javax.xml.namespace.QName; +import javax.xml.stream.XMLStreamException; /** * The BlobHierarchyListSegment model. */ -@Fluent +@Metadata(conditions = { TypeConditions.FLUENT }) public final class BlobHierarchyListSegment implements XmlSerializable { /* * The BlobPrefixes property. @@ -39,7 +38,7 @@ public BlobHierarchyListSegment() { /** * Get the blobPrefixes property: The BlobPrefixes property. - * + * * @return the blobPrefixes value. */ public List getBlobPrefixes() { @@ -48,7 +47,7 @@ public List getBlobPrefixes() { /** * Set the blobPrefixes property: The BlobPrefixes property. - * + * * @param blobPrefixes the blobPrefixes value to set. * @return the BlobHierarchyListSegment object itself. */ @@ -59,7 +58,7 @@ public BlobHierarchyListSegment setBlobPrefixes(List blobPre /** * Get the blobItems property: The BlobItems property. - * + * * @return the blobItems value. */ public List getBlobItems() { @@ -68,7 +67,7 @@ public List getBlobItems() { /** * Set the blobItems property: The BlobItems property. - * + * * @param blobItems the blobItems value to set. * @return the BlobHierarchyListSegment object itself. */ @@ -84,7 +83,7 @@ public XmlWriter toXml(XmlWriter xmlWriter) throws XMLStreamException { @Override public XmlWriter toXml(XmlWriter xmlWriter, String rootElementName) throws XMLStreamException { - rootElementName = CoreUtils.isNullOrEmpty(rootElementName) ? "Blobs" : rootElementName; + rootElementName = rootElementName == null || rootElementName.isEmpty() ? "Blobs" : rootElementName; xmlWriter.writeStartElement(rootElementName); if (this.blobPrefixes != null) { for (BlobPrefixInternal element : this.blobPrefixes) { @@ -101,7 +100,7 @@ public XmlWriter toXml(XmlWriter xmlWriter, String rootElementName) throws XMLSt /** * Reads an instance of BlobHierarchyListSegment from the XmlReader. - * + * * @param xmlReader The XmlReader being read. * @return An instance of BlobHierarchyListSegment if the XmlReader was pointing to an instance of it, or null if it * was pointing to XML null. @@ -113,7 +112,7 @@ public static BlobHierarchyListSegment fromXml(XmlReader xmlReader) throws XMLSt /** * Reads an instance of BlobHierarchyListSegment from the XmlReader. - * + * * @param xmlReader The XmlReader being read. * @param rootElementName Optional root element name to override the default defined by the model. Used to support * cases where the model can deserialize from different root element names. @@ -123,7 +122,7 @@ public static BlobHierarchyListSegment fromXml(XmlReader xmlReader) throws XMLSt */ public static BlobHierarchyListSegment fromXml(XmlReader xmlReader, String rootElementName) throws XMLStreamException { - String finalRootElementName = CoreUtils.isNullOrEmpty(rootElementName) ? "Blobs" : rootElementName; + String finalRootElementName = rootElementName == null || rootElementName.isEmpty() ? "Blobs" : rootElementName; return xmlReader.readObject(finalRootElementName, reader -> { BlobHierarchyListSegment deserializedBlobHierarchyListSegment = new BlobHierarchyListSegment(); while (reader.nextElement() != XmlToken.END_ELEMENT) { diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobHttpHeaders.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobHttpHeaders.java index f96a03651c8e..7aca03e9c0de 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobHttpHeaders.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobHttpHeaders.java @@ -4,13 +4,13 @@ package com.azure.v2.storage.blob.models; -import com.azure.v2.core.annotation.Fluent; -import com.azure.v2.core.util.CoreUtils; +import io.clientcore.core.annotations.Metadata; +import io.clientcore.core.annotations.TypeConditions; /** * Parameter group. */ -@Fluent +@Metadata(conditions = { TypeConditions.FLUENT }) public final class BlobHttpHeaders { /* * Optional. Sets the blob's cache control. If specified, this property is stored with the blob and returned with a @@ -57,7 +57,7 @@ public BlobHttpHeaders() { /** * Get the cacheControl property: Optional. Sets the blob's cache control. If specified, this property is stored * with the blob and returned with a read request. - * + * * @return the cacheControl value. */ public String getCacheControl() { @@ -67,7 +67,7 @@ public String getCacheControl() { /** * Set the cacheControl property: Optional. Sets the blob's cache control. If specified, this property is stored * with the blob and returned with a read request. - * + * * @param cacheControl the cacheControl value to set. * @return the BlobHttpHeaders object itself. */ @@ -79,7 +79,7 @@ public BlobHttpHeaders setCacheControl(String cacheControl) { /** * Get the contentType property: Optional. Sets the blob's content type. If specified, this property is stored with * the blob and returned with a read request. - * + * * @return the contentType value. */ public String getContentType() { @@ -89,7 +89,7 @@ public String getContentType() { /** * Set the contentType property: Optional. Sets the blob's content type. If specified, this property is stored with * the blob and returned with a read request. - * + * * @param contentType the contentType value to set. * @return the BlobHttpHeaders object itself. */ @@ -102,30 +102,30 @@ public BlobHttpHeaders setContentType(String contentType) { * Get the contentMd5 property: Optional. An MD5 hash of the blob content. Note that this hash is not validated, as * the hashes for the individual blocks were validated when each was uploaded. The value does not need to be base64 * encoded as the SDK will perform the encoding. - * + * * @return the contentMd5 value. */ public byte[] getContentMd5() { - return CoreUtils.clone(this.contentMd5); + return this.contentMd5; } /** * Set the contentMd5 property: Optional. An MD5 hash of the blob content. Note that this hash is not validated, as * the hashes for the individual blocks were validated when each was uploaded. The value does not need to be base64 * encoded as the SDK will perform the encoding. - * + * * @param contentMd5 the contentMd5 value to set. * @return the BlobHttpHeaders object itself. */ public BlobHttpHeaders setContentMd5(byte[] contentMd5) { - this.contentMd5 = CoreUtils.clone(contentMd5); + this.contentMd5 = contentMd5; return this; } /** * Get the contentEncoding property: Optional. Sets the blob's content encoding. If specified, this property is * stored with the blob and returned with a read request. - * + * * @return the contentEncoding value. */ public String getContentEncoding() { @@ -135,7 +135,7 @@ public String getContentEncoding() { /** * Set the contentEncoding property: Optional. Sets the blob's content encoding. If specified, this property is * stored with the blob and returned with a read request. - * + * * @param contentEncoding the contentEncoding value to set. * @return the BlobHttpHeaders object itself. */ @@ -147,7 +147,7 @@ public BlobHttpHeaders setContentEncoding(String contentEncoding) { /** * Get the contentLanguage property: Optional. Set the blob's content language. If specified, this property is * stored with the blob and returned with a read request. - * + * * @return the contentLanguage value. */ public String getContentLanguage() { @@ -157,7 +157,7 @@ public String getContentLanguage() { /** * Set the contentLanguage property: Optional. Set the blob's content language. If specified, this property is * stored with the blob and returned with a read request. - * + * * @param contentLanguage the contentLanguage value to set. * @return the BlobHttpHeaders object itself. */ @@ -168,7 +168,7 @@ public BlobHttpHeaders setContentLanguage(String contentLanguage) { /** * Get the contentDisposition property: Optional. Sets the blob's Content-Disposition header. - * + * * @return the contentDisposition value. */ public String getContentDisposition() { @@ -177,7 +177,7 @@ public String getContentDisposition() { /** * Set the contentDisposition property: Optional. Sets the blob's Content-Disposition header. - * + * * @param contentDisposition the contentDisposition value to set. * @return the BlobHttpHeaders object itself. */ diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobImmutabilityPolicyMode.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobImmutabilityPolicyMode.java index 223500dacd8e..3bcbd6e38ce6 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobImmutabilityPolicyMode.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobImmutabilityPolicyMode.java @@ -34,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-v2/src/main/java/com/azure/v2/storage/blob/models/BlobItemInternal.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobItemInternal.java index 5c7ddcaed43e..7688ef3f366f 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobItemInternal.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobItemInternal.java @@ -4,22 +4,21 @@ package com.azure.v2.storage.blob.models; -import com.azure.v2.core.annotation.Fluent; -import com.azure.v2.core.util.CoreUtils; +import io.clientcore.core.annotations.Metadata; +import io.clientcore.core.annotations.TypeConditions; import io.clientcore.core.serialization.xml.XmlReader; import io.clientcore.core.serialization.xml.XmlSerializable; import io.clientcore.core.serialization.xml.XmlToken; import io.clientcore.core.serialization.xml.XmlWriter; - -import javax.xml.namespace.QName; -import javax.xml.stream.XMLStreamException; import java.util.LinkedHashMap; import java.util.Map; +import javax.xml.namespace.QName; +import javax.xml.stream.XMLStreamException; /** * An Azure Storage blob. */ -@Fluent +@Metadata(conditions = { TypeConditions.FLUENT }) public final class BlobItemInternal implements XmlSerializable { /* * The Name property. @@ -84,7 +83,7 @@ public BlobItemInternal() { /** * Get the name property: The Name property. - * + * * @return the name value. */ public BlobName getName() { @@ -93,7 +92,7 @@ public BlobName getName() { /** * Set the name property: The Name property. - * + * * @param name the name value to set. * @return the BlobItemInternal object itself. */ @@ -104,7 +103,7 @@ public BlobItemInternal setName(BlobName name) { /** * Get the deleted property: The Deleted property. - * + * * @return the deleted value. */ public boolean isDeleted() { @@ -113,7 +112,7 @@ public boolean isDeleted() { /** * Set the deleted property: The Deleted property. - * + * * @param deleted the deleted value to set. * @return the BlobItemInternal object itself. */ @@ -124,7 +123,7 @@ public BlobItemInternal setDeleted(boolean deleted) { /** * Get the snapshot property: The Snapshot property. - * + * * @return the snapshot value. */ public String getSnapshot() { @@ -133,7 +132,7 @@ public String getSnapshot() { /** * Set the snapshot property: The Snapshot property. - * + * * @param snapshot the snapshot value to set. * @return the BlobItemInternal object itself. */ @@ -144,7 +143,7 @@ public BlobItemInternal setSnapshot(String snapshot) { /** * Get the versionId property: The VersionId property. - * + * * @return the versionId value. */ public String getVersionId() { @@ -153,7 +152,7 @@ public String getVersionId() { /** * Set the versionId property: The VersionId property. - * + * * @param versionId the versionId value to set. * @return the BlobItemInternal object itself. */ @@ -164,7 +163,7 @@ public BlobItemInternal setVersionId(String versionId) { /** * Get the isCurrentVersion property: The IsCurrentVersion property. - * + * * @return the isCurrentVersion value. */ public Boolean isCurrentVersion() { @@ -173,7 +172,7 @@ public Boolean isCurrentVersion() { /** * Set the isCurrentVersion property: The IsCurrentVersion property. - * + * * @param isCurrentVersion the isCurrentVersion value to set. * @return the BlobItemInternal object itself. */ @@ -184,7 +183,7 @@ public BlobItemInternal setIsCurrentVersion(Boolean isCurrentVersion) { /** * Get the properties property: Properties of a blob. - * + * * @return the properties value. */ public BlobItemPropertiesInternal getProperties() { @@ -193,7 +192,7 @@ public BlobItemPropertiesInternal getProperties() { /** * Set the properties property: Properties of a blob. - * + * * @param properties the properties value to set. * @return the BlobItemInternal object itself. */ @@ -204,7 +203,7 @@ public BlobItemInternal setProperties(BlobItemPropertiesInternal properties) { /** * Get the metadata property: Dictionary of <string>. - * + * * @return the metadata value. */ public Map getMetadata() { @@ -213,7 +212,7 @@ public Map getMetadata() { /** * Set the metadata property: Dictionary of <string>. - * + * * @param metadata the metadata value to set. * @return the BlobItemInternal object itself. */ @@ -224,7 +223,7 @@ public BlobItemInternal setMetadata(Map metadata) { /** * Get the blobTags property: Blob tags. - * + * * @return the blobTags value. */ public BlobTags getBlobTags() { @@ -233,7 +232,7 @@ public BlobTags getBlobTags() { /** * Set the blobTags property: Blob tags. - * + * * @param blobTags the blobTags value to set. * @return the BlobItemInternal object itself. */ @@ -244,7 +243,7 @@ public BlobItemInternal setBlobTags(BlobTags blobTags) { /** * Get the objectReplicationMetadata property: Dictionary of <string>. - * + * * @return the objectReplicationMetadata value. */ public Map getObjectReplicationMetadata() { @@ -253,7 +252,7 @@ public Map getObjectReplicationMetadata() { /** * Set the objectReplicationMetadata property: Dictionary of <string>. - * + * * @param objectReplicationMetadata the objectReplicationMetadata value to set. * @return the BlobItemInternal object itself. */ @@ -264,7 +263,7 @@ public BlobItemInternal setObjectReplicationMetadata(Map objectR /** * Get the hasVersionsOnly property: The HasVersionsOnly property. - * + * * @return the hasVersionsOnly value. */ public Boolean isHasVersionsOnly() { @@ -273,7 +272,7 @@ public Boolean isHasVersionsOnly() { /** * Set the hasVersionsOnly property: The HasVersionsOnly property. - * + * * @param hasVersionsOnly the hasVersionsOnly value to set. * @return the BlobItemInternal object itself. */ @@ -284,7 +283,7 @@ public BlobItemInternal setHasVersionsOnly(Boolean hasVersionsOnly) { /** * Get the isPrefix property: The IsPrefix property. - * + * * @return the isPrefix value. */ public Boolean isPrefix() { @@ -293,7 +292,7 @@ public Boolean isPrefix() { /** * Set the isPrefix property: The IsPrefix property. - * + * * @param isPrefix the isPrefix value to set. * @return the BlobItemInternal object itself. */ @@ -309,7 +308,7 @@ public XmlWriter toXml(XmlWriter xmlWriter) throws XMLStreamException { @Override public XmlWriter toXml(XmlWriter xmlWriter, String rootElementName) throws XMLStreamException { - rootElementName = CoreUtils.isNullOrEmpty(rootElementName) ? "Blob" : rootElementName; + rootElementName = rootElementName == null || rootElementName.isEmpty() ? "Blob" : rootElementName; xmlWriter.writeStartElement(rootElementName); xmlWriter.writeXml(this.name, "Name"); xmlWriter.writeBooleanElement("Deleted", this.deleted); @@ -339,7 +338,7 @@ public XmlWriter toXml(XmlWriter xmlWriter, String rootElementName) throws XMLSt /** * 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. @@ -351,7 +350,7 @@ 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. @@ -360,7 +359,7 @@ public static BlobItemInternal fromXml(XmlReader xmlReader) throws XMLStreamExce * @throws XMLStreamException If an error occurs while reading the BlobItemInternal. */ public static BlobItemInternal fromXml(XmlReader xmlReader, String rootElementName) throws XMLStreamException { - String finalRootElementName = CoreUtils.isNullOrEmpty(rootElementName) ? "Blob" : rootElementName; + String finalRootElementName = rootElementName == null || rootElementName.isEmpty() ? "Blob" : rootElementName; return xmlReader.readObject(finalRootElementName, reader -> { BlobItemInternal deserializedBlobItemInternal = new BlobItemInternal(); while (reader.nextElement() != XmlToken.END_ELEMENT) { diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobItemPropertiesInternal.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobItemPropertiesInternal.java index 4e77b9dd15d4..e2509e785727 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobItemPropertiesInternal.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobItemPropertiesInternal.java @@ -4,23 +4,22 @@ package com.azure.v2.storage.blob.models; -import com.azure.v2.core.annotation.Fluent; -import com.azure.v2.core.util.CoreUtils; +import io.clientcore.core.annotations.Metadata; +import io.clientcore.core.annotations.TypeConditions; import io.clientcore.core.serialization.xml.XmlReader; import io.clientcore.core.serialization.xml.XmlSerializable; import io.clientcore.core.serialization.xml.XmlToken; import io.clientcore.core.serialization.xml.XmlWriter; -import io.clientcore.core.util.DateTimeRfc1123; - -import javax.xml.namespace.QName; -import javax.xml.stream.XMLStreamException; +import io.clientcore.core.utils.DateTimeRfc1123; import java.time.OffsetDateTime; import java.util.Objects; +import javax.xml.namespace.QName; +import javax.xml.stream.XMLStreamException; /** * Properties of a blob. */ -@Fluent +@Metadata(conditions = { TypeConditions.FLUENT }) public final class BlobItemPropertiesInternal implements XmlSerializable { /* * The Creation-Time property. @@ -231,7 +230,7 @@ public BlobItemPropertiesInternal() { /** * Get the creationTime property: The Creation-Time property. - * + * * @return the creationTime value. */ public OffsetDateTime getCreationTime() { @@ -243,7 +242,7 @@ public OffsetDateTime getCreationTime() { /** * Set the creationTime property: The Creation-Time property. - * + * * @param creationTime the creationTime value to set. * @return the BlobItemPropertiesInternal object itself. */ @@ -258,7 +257,7 @@ public BlobItemPropertiesInternal setCreationTime(OffsetDateTime creationTime) { /** * Get the lastModified property: The Last-Modified property. - * + * * @return the lastModified value. */ public OffsetDateTime getLastModified() { @@ -270,7 +269,7 @@ public OffsetDateTime getLastModified() { /** * Set the lastModified property: The Last-Modified property. - * + * * @param lastModified the lastModified value to set. * @return the BlobItemPropertiesInternal object itself. */ @@ -285,7 +284,7 @@ public BlobItemPropertiesInternal setLastModified(OffsetDateTime lastModified) { /** * Get the eTag property: The Etag property. - * + * * @return the eTag value. */ public String getETag() { @@ -294,7 +293,7 @@ public String getETag() { /** * Set the eTag property: The Etag property. - * + * * @param eTag the eTag value to set. * @return the BlobItemPropertiesInternal object itself. */ @@ -305,7 +304,7 @@ public BlobItemPropertiesInternal setETag(String eTag) { /** * Get the contentLength property: Size in bytes. - * + * * @return the contentLength value. */ public Long getContentLength() { @@ -314,7 +313,7 @@ public Long getContentLength() { /** * Set the contentLength property: Size in bytes. - * + * * @param contentLength the contentLength value to set. * @return the BlobItemPropertiesInternal object itself. */ @@ -325,7 +324,7 @@ public BlobItemPropertiesInternal setContentLength(Long contentLength) { /** * Get the contentType property: The Content-Type property. - * + * * @return the contentType value. */ public String getContentType() { @@ -334,7 +333,7 @@ public String getContentType() { /** * Set the contentType property: The Content-Type property. - * + * * @param contentType the contentType value to set. * @return the BlobItemPropertiesInternal object itself. */ @@ -345,7 +344,7 @@ public BlobItemPropertiesInternal setContentType(String contentType) { /** * Get the contentEncoding property: The Content-Encoding property. - * + * * @return the contentEncoding value. */ public String getContentEncoding() { @@ -354,7 +353,7 @@ public String getContentEncoding() { /** * Set the contentEncoding property: The Content-Encoding property. - * + * * @param contentEncoding the contentEncoding value to set. * @return the BlobItemPropertiesInternal object itself. */ @@ -365,7 +364,7 @@ public BlobItemPropertiesInternal setContentEncoding(String contentEncoding) { /** * Get the contentLanguage property: The Content-Language property. - * + * * @return the contentLanguage value. */ public String getContentLanguage() { @@ -374,7 +373,7 @@ public String getContentLanguage() { /** * Set the contentLanguage property: The Content-Language property. - * + * * @param contentLanguage the contentLanguage value to set. * @return the BlobItemPropertiesInternal object itself. */ @@ -385,27 +384,27 @@ public BlobItemPropertiesInternal setContentLanguage(String contentLanguage) { /** * Get the contentMd5 property: The Content-MD5 property. - * + * * @return the contentMd5 value. */ public byte[] getContentMd5() { - return CoreUtils.clone(this.contentMd5); + return this.contentMd5; } /** * Set the contentMd5 property: The Content-MD5 property. - * + * * @param contentMd5 the contentMd5 value to set. * @return the BlobItemPropertiesInternal object itself. */ public BlobItemPropertiesInternal setContentMd5(byte[] contentMd5) { - this.contentMd5 = CoreUtils.clone(contentMd5); + this.contentMd5 = contentMd5; return this; } /** * Get the contentDisposition property: The Content-Disposition property. - * + * * @return the contentDisposition value. */ public String getContentDisposition() { @@ -414,7 +413,7 @@ public String getContentDisposition() { /** * Set the contentDisposition property: The Content-Disposition property. - * + * * @param contentDisposition the contentDisposition value to set. * @return the BlobItemPropertiesInternal object itself. */ @@ -425,7 +424,7 @@ public BlobItemPropertiesInternal setContentDisposition(String contentDispositio /** * Get the cacheControl property: The Cache-Control property. - * + * * @return the cacheControl value. */ public String getCacheControl() { @@ -434,7 +433,7 @@ public String getCacheControl() { /** * Set the cacheControl property: The Cache-Control property. - * + * * @param cacheControl the cacheControl value to set. * @return the BlobItemPropertiesInternal object itself. */ @@ -445,7 +444,7 @@ public BlobItemPropertiesInternal setCacheControl(String cacheControl) { /** * Get the blobSequenceNumber property: The x-ms-blob-sequence-number property. - * + * * @return the blobSequenceNumber value. */ public Long getBlobSequenceNumber() { @@ -454,7 +453,7 @@ public Long getBlobSequenceNumber() { /** * Set the blobSequenceNumber property: The x-ms-blob-sequence-number property. - * + * * @param blobSequenceNumber the blobSequenceNumber value to set. * @return the BlobItemPropertiesInternal object itself. */ @@ -465,7 +464,7 @@ public BlobItemPropertiesInternal setBlobSequenceNumber(Long blobSequenceNumber) /** * Get the blobType property: The BlobType property. - * + * * @return the blobType value. */ public BlobType getBlobType() { @@ -474,7 +473,7 @@ public BlobType getBlobType() { /** * Set the blobType property: The BlobType property. - * + * * @param blobType the blobType value to set. * @return the BlobItemPropertiesInternal object itself. */ @@ -485,7 +484,7 @@ public BlobItemPropertiesInternal setBlobType(BlobType blobType) { /** * Get the leaseStatus property: The LeaseStatus property. - * + * * @return the leaseStatus value. */ public LeaseStatusType getLeaseStatus() { @@ -494,7 +493,7 @@ public LeaseStatusType getLeaseStatus() { /** * Set the leaseStatus property: The LeaseStatus property. - * + * * @param leaseStatus the leaseStatus value to set. * @return the BlobItemPropertiesInternal object itself. */ @@ -505,7 +504,7 @@ public BlobItemPropertiesInternal setLeaseStatus(LeaseStatusType leaseStatus) { /** * Get the leaseState property: The LeaseState property. - * + * * @return the leaseState value. */ public LeaseStateType getLeaseState() { @@ -514,7 +513,7 @@ public LeaseStateType getLeaseState() { /** * Set the leaseState property: The LeaseState property. - * + * * @param leaseState the leaseState value to set. * @return the BlobItemPropertiesInternal object itself. */ @@ -525,7 +524,7 @@ public BlobItemPropertiesInternal setLeaseState(LeaseStateType leaseState) { /** * Get the leaseDuration property: The LeaseDuration property. - * + * * @return the leaseDuration value. */ public LeaseDurationType getLeaseDuration() { @@ -534,7 +533,7 @@ public LeaseDurationType getLeaseDuration() { /** * Set the leaseDuration property: The LeaseDuration property. - * + * * @param leaseDuration the leaseDuration value to set. * @return the BlobItemPropertiesInternal object itself. */ @@ -545,7 +544,7 @@ public BlobItemPropertiesInternal setLeaseDuration(LeaseDurationType leaseDurati /** * Get the copyId property: The CopyId property. - * + * * @return the copyId value. */ public String getCopyId() { @@ -554,7 +553,7 @@ public String getCopyId() { /** * Set the copyId property: The CopyId property. - * + * * @param copyId the copyId value to set. * @return the BlobItemPropertiesInternal object itself. */ @@ -565,7 +564,7 @@ public BlobItemPropertiesInternal setCopyId(String copyId) { /** * Get the copyStatus property: The CopyStatus property. - * + * * @return the copyStatus value. */ public CopyStatusType getCopyStatus() { @@ -574,7 +573,7 @@ public CopyStatusType getCopyStatus() { /** * Set the copyStatus property: The CopyStatus property. - * + * * @param copyStatus the copyStatus value to set. * @return the BlobItemPropertiesInternal object itself. */ @@ -585,7 +584,7 @@ public BlobItemPropertiesInternal setCopyStatus(CopyStatusType copyStatus) { /** * Get the copySource property: The CopySource property. - * + * * @return the copySource value. */ public String getCopySource() { @@ -594,7 +593,7 @@ public String getCopySource() { /** * Set the copySource property: The CopySource property. - * + * * @param copySource the copySource value to set. * @return the BlobItemPropertiesInternal object itself. */ @@ -605,7 +604,7 @@ public BlobItemPropertiesInternal setCopySource(String copySource) { /** * Get the copyProgress property: The CopyProgress property. - * + * * @return the copyProgress value. */ public String getCopyProgress() { @@ -614,7 +613,7 @@ public String getCopyProgress() { /** * Set the copyProgress property: The CopyProgress property. - * + * * @param copyProgress the copyProgress value to set. * @return the BlobItemPropertiesInternal object itself. */ @@ -625,7 +624,7 @@ public BlobItemPropertiesInternal setCopyProgress(String copyProgress) { /** * Get the copyCompletionTime property: The CopyCompletionTime property. - * + * * @return the copyCompletionTime value. */ public OffsetDateTime getCopyCompletionTime() { @@ -637,7 +636,7 @@ public OffsetDateTime getCopyCompletionTime() { /** * Set the copyCompletionTime property: The CopyCompletionTime property. - * + * * @param copyCompletionTime the copyCompletionTime value to set. * @return the BlobItemPropertiesInternal object itself. */ @@ -652,7 +651,7 @@ public BlobItemPropertiesInternal setCopyCompletionTime(OffsetDateTime copyCompl /** * Get the copyStatusDescription property: The CopyStatusDescription property. - * + * * @return the copyStatusDescription value. */ public String getCopyStatusDescription() { @@ -661,7 +660,7 @@ public String getCopyStatusDescription() { /** * Set the copyStatusDescription property: The CopyStatusDescription property. - * + * * @param copyStatusDescription the copyStatusDescription value to set. * @return the BlobItemPropertiesInternal object itself. */ @@ -672,7 +671,7 @@ public BlobItemPropertiesInternal setCopyStatusDescription(String copyStatusDesc /** * Get the serverEncrypted property: The ServerEncrypted property. - * + * * @return the serverEncrypted value. */ public Boolean isServerEncrypted() { @@ -681,7 +680,7 @@ public Boolean isServerEncrypted() { /** * Set the serverEncrypted property: The ServerEncrypted property. - * + * * @param serverEncrypted the serverEncrypted value to set. * @return the BlobItemPropertiesInternal object itself. */ @@ -692,7 +691,7 @@ public BlobItemPropertiesInternal setServerEncrypted(Boolean serverEncrypted) { /** * Get the incrementalCopy property: The IncrementalCopy property. - * + * * @return the incrementalCopy value. */ public Boolean isIncrementalCopy() { @@ -701,7 +700,7 @@ public Boolean isIncrementalCopy() { /** * Set the incrementalCopy property: The IncrementalCopy property. - * + * * @param incrementalCopy the incrementalCopy value to set. * @return the BlobItemPropertiesInternal object itself. */ @@ -712,7 +711,7 @@ public BlobItemPropertiesInternal setIncrementalCopy(Boolean incrementalCopy) { /** * Get the destinationSnapshot property: The DestinationSnapshot property. - * + * * @return the destinationSnapshot value. */ public String getDestinationSnapshot() { @@ -721,7 +720,7 @@ public String getDestinationSnapshot() { /** * Set the destinationSnapshot property: The DestinationSnapshot property. - * + * * @param destinationSnapshot the destinationSnapshot value to set. * @return the BlobItemPropertiesInternal object itself. */ @@ -732,7 +731,7 @@ public BlobItemPropertiesInternal setDestinationSnapshot(String destinationSnaps /** * Get the deletedTime property: The DeletedTime property. - * + * * @return the deletedTime value. */ public OffsetDateTime getDeletedTime() { @@ -744,7 +743,7 @@ public OffsetDateTime getDeletedTime() { /** * Set the deletedTime property: The DeletedTime property. - * + * * @param deletedTime the deletedTime value to set. * @return the BlobItemPropertiesInternal object itself. */ @@ -759,7 +758,7 @@ public BlobItemPropertiesInternal setDeletedTime(OffsetDateTime deletedTime) { /** * Get the remainingRetentionDays property: The RemainingRetentionDays property. - * + * * @return the remainingRetentionDays value. */ public Integer getRemainingRetentionDays() { @@ -768,7 +767,7 @@ public Integer getRemainingRetentionDays() { /** * Set the remainingRetentionDays property: The RemainingRetentionDays property. - * + * * @param remainingRetentionDays the remainingRetentionDays value to set. * @return the BlobItemPropertiesInternal object itself. */ @@ -779,7 +778,7 @@ public BlobItemPropertiesInternal setRemainingRetentionDays(Integer remainingRet /** * Get the accessTier property: The AccessTier property. - * + * * @return the accessTier value. */ public AccessTier getAccessTier() { @@ -788,7 +787,7 @@ public AccessTier getAccessTier() { /** * Set the accessTier property: The AccessTier property. - * + * * @param accessTier the accessTier value to set. * @return the BlobItemPropertiesInternal object itself. */ @@ -799,7 +798,7 @@ public BlobItemPropertiesInternal setAccessTier(AccessTier accessTier) { /** * Get the accessTierInferred property: The AccessTierInferred property. - * + * * @return the accessTierInferred value. */ public Boolean isAccessTierInferred() { @@ -808,7 +807,7 @@ public Boolean isAccessTierInferred() { /** * Set the accessTierInferred property: The AccessTierInferred property. - * + * * @param accessTierInferred the accessTierInferred value to set. * @return the BlobItemPropertiesInternal object itself. */ @@ -819,7 +818,7 @@ public BlobItemPropertiesInternal setAccessTierInferred(Boolean accessTierInferr /** * Get the archiveStatus property: The ArchiveStatus property. - * + * * @return the archiveStatus value. */ public ArchiveStatus getArchiveStatus() { @@ -828,7 +827,7 @@ public ArchiveStatus getArchiveStatus() { /** * Set the archiveStatus property: The ArchiveStatus property. - * + * * @param archiveStatus the archiveStatus value to set. * @return the BlobItemPropertiesInternal object itself. */ @@ -839,7 +838,7 @@ public BlobItemPropertiesInternal setArchiveStatus(ArchiveStatus archiveStatus) /** * Get the customerProvidedKeySha256 property: The CustomerProvidedKeySha256 property. - * + * * @return the customerProvidedKeySha256 value. */ public String getCustomerProvidedKeySha256() { @@ -848,7 +847,7 @@ public String getCustomerProvidedKeySha256() { /** * Set the customerProvidedKeySha256 property: The CustomerProvidedKeySha256 property. - * + * * @param customerProvidedKeySha256 the customerProvidedKeySha256 value to set. * @return the BlobItemPropertiesInternal object itself. */ @@ -859,7 +858,7 @@ public BlobItemPropertiesInternal setCustomerProvidedKeySha256(String customerPr /** * Get the encryptionScope property: The name of the encryption scope under which the blob is encrypted. - * + * * @return the encryptionScope value. */ public String getEncryptionScope() { @@ -868,7 +867,7 @@ public String getEncryptionScope() { /** * Set the encryptionScope property: The name of the encryption scope under which the blob is encrypted. - * + * * @param encryptionScope the encryptionScope value to set. * @return the BlobItemPropertiesInternal object itself. */ @@ -879,7 +878,7 @@ public BlobItemPropertiesInternal setEncryptionScope(String encryptionScope) { /** * Get the accessTierChangeTime property: The AccessTierChangeTime property. - * + * * @return the accessTierChangeTime value. */ public OffsetDateTime getAccessTierChangeTime() { @@ -891,7 +890,7 @@ public OffsetDateTime getAccessTierChangeTime() { /** * Set the accessTierChangeTime property: The AccessTierChangeTime property. - * + * * @param accessTierChangeTime the accessTierChangeTime value to set. * @return the BlobItemPropertiesInternal object itself. */ @@ -906,7 +905,7 @@ public BlobItemPropertiesInternal setAccessTierChangeTime(OffsetDateTime accessT /** * Get the tagCount property: The TagCount property. - * + * * @return the tagCount value. */ public Integer getTagCount() { @@ -915,7 +914,7 @@ public Integer getTagCount() { /** * Set the tagCount property: The TagCount property. - * + * * @param tagCount the tagCount value to set. * @return the BlobItemPropertiesInternal object itself. */ @@ -926,7 +925,7 @@ public BlobItemPropertiesInternal setTagCount(Integer tagCount) { /** * Get the expiresOn property: The Expiry-Time property. - * + * * @return the expiresOn value. */ public OffsetDateTime getExpiresOn() { @@ -938,7 +937,7 @@ public OffsetDateTime getExpiresOn() { /** * Set the expiresOn property: The Expiry-Time property. - * + * * @param expiresOn the expiresOn value to set. * @return the BlobItemPropertiesInternal object itself. */ @@ -953,7 +952,7 @@ public BlobItemPropertiesInternal setExpiresOn(OffsetDateTime expiresOn) { /** * Get the isSealed property: The Sealed property. - * + * * @return the isSealed value. */ public Boolean isSealed() { @@ -962,7 +961,7 @@ public Boolean isSealed() { /** * Set the isSealed property: The Sealed property. - * + * * @param isSealed the isSealed value to set. * @return the BlobItemPropertiesInternal object itself. */ @@ -974,7 +973,7 @@ public BlobItemPropertiesInternal setIsSealed(Boolean isSealed) { /** * Get the rehydratePriority property: If an object is in rehydrate pending state then this header is returned with * priority of rehydrate. Valid values are High and Standard. - * + * * @return the rehydratePriority value. */ public RehydratePriority getRehydratePriority() { @@ -984,7 +983,7 @@ public RehydratePriority getRehydratePriority() { /** * Set the rehydratePriority property: If an object is in rehydrate pending state then this header is returned with * priority of rehydrate. Valid values are High and Standard. - * + * * @param rehydratePriority the rehydratePriority value to set. * @return the BlobItemPropertiesInternal object itself. */ @@ -995,7 +994,7 @@ public BlobItemPropertiesInternal setRehydratePriority(RehydratePriority rehydra /** * Get the lastAccessedOn property: The LastAccessTime property. - * + * * @return the lastAccessedOn value. */ public OffsetDateTime getLastAccessedOn() { @@ -1007,7 +1006,7 @@ public OffsetDateTime getLastAccessedOn() { /** * Set the lastAccessedOn property: The LastAccessTime property. - * + * * @param lastAccessedOn the lastAccessedOn value to set. * @return the BlobItemPropertiesInternal object itself. */ @@ -1022,7 +1021,7 @@ public BlobItemPropertiesInternal setLastAccessedOn(OffsetDateTime lastAccessedO /** * Get the immutabilityPolicyExpiresOn property: The ImmutabilityPolicyUntilDate property. - * + * * @return the immutabilityPolicyExpiresOn value. */ public OffsetDateTime getImmutabilityPolicyExpiresOn() { @@ -1034,7 +1033,7 @@ public OffsetDateTime getImmutabilityPolicyExpiresOn() { /** * Set the immutabilityPolicyExpiresOn property: The ImmutabilityPolicyUntilDate property. - * + * * @param immutabilityPolicyExpiresOn the immutabilityPolicyExpiresOn value to set. * @return the BlobItemPropertiesInternal object itself. */ @@ -1049,7 +1048,7 @@ public BlobItemPropertiesInternal setImmutabilityPolicyExpiresOn(OffsetDateTime /** * Get the immutabilityPolicyMode property: The ImmutabilityPolicyMode property. - * + * * @return the immutabilityPolicyMode value. */ public BlobImmutabilityPolicyMode getImmutabilityPolicyMode() { @@ -1058,7 +1057,7 @@ public BlobImmutabilityPolicyMode getImmutabilityPolicyMode() { /** * Set the immutabilityPolicyMode property: The ImmutabilityPolicyMode property. - * + * * @param immutabilityPolicyMode the immutabilityPolicyMode value to set. * @return the BlobItemPropertiesInternal object itself. */ @@ -1069,7 +1068,7 @@ public BlobItemPropertiesInternal setImmutabilityPolicyMode(BlobImmutabilityPoli /** * Get the legalHold property: The LegalHold property. - * + * * @return the legalHold value. */ public Boolean isLegalHold() { @@ -1078,7 +1077,7 @@ public Boolean isLegalHold() { /** * Set the legalHold property: The LegalHold property. - * + * * @param legalHold the legalHold value to set. * @return the BlobItemPropertiesInternal object itself. */ @@ -1094,7 +1093,7 @@ public XmlWriter toXml(XmlWriter xmlWriter) throws XMLStreamException { @Override public XmlWriter toXml(XmlWriter xmlWriter, String rootElementName) throws XMLStreamException { - rootElementName = CoreUtils.isNullOrEmpty(rootElementName) ? "Properties" : rootElementName; + rootElementName = rootElementName == null || rootElementName.isEmpty() ? "Properties" : rootElementName; xmlWriter.writeStartElement(rootElementName); xmlWriter.writeStringElement("Creation-Time", Objects.toString(this.creationTime, null)); xmlWriter.writeStringElement("Last-Modified", Objects.toString(this.lastModified, null)); @@ -1123,10 +1122,10 @@ public XmlWriter toXml(XmlWriter xmlWriter, String rootElementName) throws XMLSt xmlWriter.writeStringElement("DestinationSnapshot", this.destinationSnapshot); xmlWriter.writeStringElement("DeletedTime", Objects.toString(this.deletedTime, null)); xmlWriter.writeNumberElement("RemainingRetentionDays", this.remainingRetentionDays); - xmlWriter.writeStringElement("AccessTier", this.accessTier == null ? null : this.accessTier.toString()); + xmlWriter.writeStringElement("AccessTier", this.accessTier == null ? null : this.accessTier.getValue()); xmlWriter.writeBooleanElement("AccessTierInferred", this.accessTierInferred); xmlWriter.writeStringElement("ArchiveStatus", - this.archiveStatus == null ? null : this.archiveStatus.toString()); + this.archiveStatus == null ? null : this.archiveStatus.getValue()); xmlWriter.writeStringElement("CustomerProvidedKeySha256", this.customerProvidedKeySha256); xmlWriter.writeStringElement("EncryptionScope", this.encryptionScope); xmlWriter.writeStringElement("AccessTierChangeTime", Objects.toString(this.accessTierChangeTime, null)); @@ -1134,7 +1133,7 @@ public XmlWriter toXml(XmlWriter xmlWriter, String rootElementName) throws XMLSt xmlWriter.writeStringElement("Expiry-Time", Objects.toString(this.expiresOn, null)); xmlWriter.writeBooleanElement("Sealed", this.isSealed); xmlWriter.writeStringElement("RehydratePriority", - this.rehydratePriority == null ? null : this.rehydratePriority.toString()); + this.rehydratePriority == null ? null : this.rehydratePriority.getValue()); xmlWriter.writeStringElement("LastAccessTime", Objects.toString(this.lastAccessedOn, null)); xmlWriter.writeStringElement("ImmutabilityPolicyUntilDate", Objects.toString(this.immutabilityPolicyExpiresOn, null)); @@ -1146,7 +1145,7 @@ 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. @@ -1158,7 +1157,7 @@ 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. @@ -1168,7 +1167,8 @@ public static BlobItemPropertiesInternal fromXml(XmlReader xmlReader) throws XML */ public static BlobItemPropertiesInternal fromXml(XmlReader xmlReader, String rootElementName) throws XMLStreamException { - String finalRootElementName = CoreUtils.isNullOrEmpty(rootElementName) ? "Properties" : rootElementName; + String finalRootElementName + = rootElementName == null || rootElementName.isEmpty() ? "Properties" : rootElementName; return xmlReader.readObject(finalRootElementName, reader -> { BlobItemPropertiesInternal deserializedBlobItemPropertiesInternal = new BlobItemPropertiesInternal(); while (reader.nextElement() != XmlToken.END_ELEMENT) { @@ -1239,14 +1239,13 @@ public static BlobItemPropertiesInternal fromXml(XmlReader xmlReader, String roo deserializedBlobItemPropertiesInternal.remainingRetentionDays = reader.getNullableElement(Integer::parseInt); } else if ("AccessTier".equals(elementName.getLocalPart())) { - deserializedBlobItemPropertiesInternal.accessTier - = AccessTier.fromString(reader.getStringElement()); + deserializedBlobItemPropertiesInternal.accessTier = AccessTier.fromValue(reader.getStringElement()); } else if ("AccessTierInferred".equals(elementName.getLocalPart())) { deserializedBlobItemPropertiesInternal.accessTierInferred = reader.getNullableElement(Boolean::parseBoolean); } else if ("ArchiveStatus".equals(elementName.getLocalPart())) { deserializedBlobItemPropertiesInternal.archiveStatus - = ArchiveStatus.fromString(reader.getStringElement()); + = ArchiveStatus.fromValue(reader.getStringElement()); } else if ("CustomerProvidedKeySha256".equals(elementName.getLocalPart())) { deserializedBlobItemPropertiesInternal.customerProvidedKeySha256 = reader.getStringElement(); } else if ("EncryptionScope".equals(elementName.getLocalPart())) { @@ -1262,7 +1261,7 @@ public static BlobItemPropertiesInternal fromXml(XmlReader xmlReader, String roo deserializedBlobItemPropertiesInternal.isSealed = reader.getNullableElement(Boolean::parseBoolean); } else if ("RehydratePriority".equals(elementName.getLocalPart())) { deserializedBlobItemPropertiesInternal.rehydratePriority - = RehydratePriority.fromString(reader.getStringElement()); + = RehydratePriority.fromValue(reader.getStringElement()); } else if ("LastAccessTime".equals(elementName.getLocalPart())) { deserializedBlobItemPropertiesInternal.lastAccessedOn = reader.getNullableElement(DateTimeRfc1123::new); diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobMetrics.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobMetrics.java index f31ff7f676a2..87f011f23edd 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobMetrics.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobMetrics.java @@ -4,20 +4,19 @@ package com.azure.v2.storage.blob.models; -import com.azure.v2.core.annotation.Fluent; -import com.azure.v2.core.util.CoreUtils; +import io.clientcore.core.annotations.Metadata; +import io.clientcore.core.annotations.TypeConditions; import io.clientcore.core.serialization.xml.XmlReader; import io.clientcore.core.serialization.xml.XmlSerializable; import io.clientcore.core.serialization.xml.XmlToken; import io.clientcore.core.serialization.xml.XmlWriter; - import javax.xml.namespace.QName; import javax.xml.stream.XMLStreamException; /** * a summary of request statistics grouped by API in hour or minute aggregates for blobs. */ -@Fluent +@Metadata(conditions = { TypeConditions.FLUENT }) public final class BlobMetrics implements XmlSerializable { /* * The version of Storage Analytics to configure. @@ -47,7 +46,7 @@ public BlobMetrics() { /** * Get the version property: The version of Storage Analytics to configure. - * + * * @return the version value. */ public String getVersion() { @@ -56,7 +55,7 @@ public String getVersion() { /** * Set the version property: The version of Storage Analytics to configure. - * + * * @param version the version value to set. * @return the BlobMetrics object itself. */ @@ -67,7 +66,7 @@ public BlobMetrics setVersion(String version) { /** * Get the enabled property: Indicates whether metrics are enabled for the Blob service. - * + * * @return the enabled value. */ public boolean isEnabled() { @@ -76,7 +75,7 @@ public boolean isEnabled() { /** * Set the enabled property: Indicates whether metrics are enabled for the Blob service. - * + * * @param enabled the enabled value to set. * @return the BlobMetrics object itself. */ @@ -88,7 +87,7 @@ public BlobMetrics setEnabled(boolean enabled) { /** * Get the includeApis property: Indicates whether metrics should generate summary statistics for called API * operations. - * + * * @return the includeApis value. */ public Boolean isIncludeApis() { @@ -98,7 +97,7 @@ public Boolean isIncludeApis() { /** * Set the includeApis property: Indicates whether metrics should generate summary statistics for called API * operations. - * + * * @param includeApis the includeApis value to set. * @return the BlobMetrics object itself. */ @@ -110,7 +109,7 @@ public BlobMetrics setIncludeApis(Boolean includeApis) { /** * Get the retentionPolicy property: the retention policy which determines how long the associated data should * persist. - * + * * @return the retentionPolicy value. */ public BlobRetentionPolicy getRetentionPolicy() { @@ -120,7 +119,7 @@ public BlobRetentionPolicy getRetentionPolicy() { /** * Set the retentionPolicy property: the retention policy which determines how long the associated data should * persist. - * + * * @param retentionPolicy the retentionPolicy value to set. * @return the BlobMetrics object itself. */ @@ -136,7 +135,7 @@ public XmlWriter toXml(XmlWriter xmlWriter) throws XMLStreamException { @Override public XmlWriter toXml(XmlWriter xmlWriter, String rootElementName) throws XMLStreamException { - rootElementName = CoreUtils.isNullOrEmpty(rootElementName) ? "BlobMetrics" : rootElementName; + rootElementName = rootElementName == null || rootElementName.isEmpty() ? "BlobMetrics" : rootElementName; xmlWriter.writeStartElement(rootElementName); xmlWriter.writeStringElement("Version", this.version); xmlWriter.writeBooleanElement("Enabled", this.enabled); @@ -147,7 +146,7 @@ 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. @@ -159,7 +158,7 @@ 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. @@ -168,7 +167,8 @@ public static BlobMetrics fromXml(XmlReader xmlReader) throws XMLStreamException * @throws XMLStreamException If an error occurs while reading the BlobMetrics. */ public static BlobMetrics fromXml(XmlReader xmlReader, String rootElementName) throws XMLStreamException { - String finalRootElementName = CoreUtils.isNullOrEmpty(rootElementName) ? "BlobMetrics" : rootElementName; + String finalRootElementName + = rootElementName == null || rootElementName.isEmpty() ? "BlobMetrics" : rootElementName; return xmlReader.readObject(finalRootElementName, reader -> { BlobMetrics deserializedBlobMetrics = new BlobMetrics(); while (reader.nextElement() != XmlToken.END_ELEMENT) { diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobName.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobName.java index 8debab5bdf91..163aa90204c4 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobName.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobName.java @@ -4,18 +4,17 @@ package com.azure.v2.storage.blob.models; -import com.azure.v2.core.annotation.Fluent; -import com.azure.v2.core.util.CoreUtils; +import io.clientcore.core.annotations.Metadata; +import io.clientcore.core.annotations.TypeConditions; import io.clientcore.core.serialization.xml.XmlReader; import io.clientcore.core.serialization.xml.XmlSerializable; import io.clientcore.core.serialization.xml.XmlWriter; - import javax.xml.stream.XMLStreamException; /** * The BlobName model. */ -@Fluent +@Metadata(conditions = { TypeConditions.FLUENT }) public final class BlobName implements XmlSerializable { /* * Indicates if the blob name is encoded. @@ -35,7 +34,7 @@ public BlobName() { /** * Get the encoded property: Indicates if the blob name is encoded. - * + * * @return the encoded value. */ public Boolean isEncoded() { @@ -44,7 +43,7 @@ public Boolean isEncoded() { /** * Set the encoded property: Indicates if the blob name is encoded. - * + * * @param encoded the encoded value to set. * @return the BlobName object itself. */ @@ -55,7 +54,7 @@ public BlobName setEncoded(Boolean encoded) { /** * Get the content property: The name of the blob. - * + * * @return the content value. */ public String getContent() { @@ -64,7 +63,7 @@ public String getContent() { /** * Set the content property: The name of the blob. - * + * * @param content the content value to set. * @return the BlobName object itself. */ @@ -80,7 +79,7 @@ public XmlWriter toXml(XmlWriter xmlWriter) throws XMLStreamException { @Override public XmlWriter toXml(XmlWriter xmlWriter, String rootElementName) throws XMLStreamException { - rootElementName = CoreUtils.isNullOrEmpty(rootElementName) ? "BlobName" : rootElementName; + rootElementName = rootElementName == null || rootElementName.isEmpty() ? "BlobName" : rootElementName; xmlWriter.writeStartElement(rootElementName); xmlWriter.writeBooleanAttribute("Encoded", this.encoded); xmlWriter.writeString(this.content); @@ -89,7 +88,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. @@ -101,7 +100,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. @@ -110,7 +109,8 @@ public static BlobName fromXml(XmlReader xmlReader) throws XMLStreamException { * @throws XMLStreamException If an error occurs while reading the BlobName. */ public static BlobName fromXml(XmlReader xmlReader, String rootElementName) throws XMLStreamException { - String finalRootElementName = CoreUtils.isNullOrEmpty(rootElementName) ? "BlobName" : rootElementName; + String finalRootElementName + = rootElementName == null || rootElementName.isEmpty() ? "BlobName" : rootElementName; return xmlReader.readObject(finalRootElementName, reader -> { BlobName deserializedBlobName = new BlobName(); deserializedBlobName.encoded = reader.getNullableAttribute(null, "Encoded", Boolean::parseBoolean); diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobPrefixInternal.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobPrefixInternal.java index d3558d9f2494..ef62231d38dd 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobPrefixInternal.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobPrefixInternal.java @@ -4,20 +4,19 @@ package com.azure.v2.storage.blob.models; -import com.azure.v2.core.annotation.Fluent; -import com.azure.v2.core.util.CoreUtils; +import io.clientcore.core.annotations.Metadata; +import io.clientcore.core.annotations.TypeConditions; import io.clientcore.core.serialization.xml.XmlReader; import io.clientcore.core.serialization.xml.XmlSerializable; import io.clientcore.core.serialization.xml.XmlToken; import io.clientcore.core.serialization.xml.XmlWriter; - import javax.xml.namespace.QName; import javax.xml.stream.XMLStreamException; /** * The BlobPrefixInternal model. */ -@Fluent +@Metadata(conditions = { TypeConditions.FLUENT }) public final class BlobPrefixInternal implements XmlSerializable { /* * The Name property. @@ -32,7 +31,7 @@ public BlobPrefixInternal() { /** * Get the name property: The Name property. - * + * * @return the name value. */ public BlobName getName() { @@ -41,7 +40,7 @@ public BlobName getName() { /** * Set the name property: The Name property. - * + * * @param name the name value to set. * @return the BlobPrefixInternal object itself. */ @@ -57,7 +56,7 @@ public XmlWriter toXml(XmlWriter xmlWriter) throws XMLStreamException { @Override public XmlWriter toXml(XmlWriter xmlWriter, String rootElementName) throws XMLStreamException { - rootElementName = CoreUtils.isNullOrEmpty(rootElementName) ? "BlobPrefix" : rootElementName; + rootElementName = rootElementName == null || rootElementName.isEmpty() ? "BlobPrefix" : rootElementName; xmlWriter.writeStartElement(rootElementName); xmlWriter.writeXml(this.name, "Name"); return xmlWriter.writeEndElement(); @@ -65,7 +64,7 @@ public XmlWriter toXml(XmlWriter xmlWriter, String rootElementName) throws XMLSt /** * Reads an instance of BlobPrefixInternal from the XmlReader. - * + * * @param xmlReader The XmlReader being read. * @return An instance of BlobPrefixInternal if the XmlReader was pointing to an instance of it, or null if it was * pointing to XML null. @@ -77,7 +76,7 @@ public static BlobPrefixInternal fromXml(XmlReader xmlReader) throws XMLStreamEx /** * Reads an instance of BlobPrefixInternal from the XmlReader. - * + * * @param xmlReader The XmlReader being read. * @param rootElementName Optional root element name to override the default defined by the model. Used to support * cases where the model can deserialize from different root element names. @@ -86,7 +85,8 @@ public static BlobPrefixInternal fromXml(XmlReader xmlReader) throws XMLStreamEx * @throws XMLStreamException If an error occurs while reading the BlobPrefixInternal. */ public static BlobPrefixInternal fromXml(XmlReader xmlReader, String rootElementName) throws XMLStreamException { - String finalRootElementName = CoreUtils.isNullOrEmpty(rootElementName) ? "BlobPrefix" : rootElementName; + String finalRootElementName + = rootElementName == null || rootElementName.isEmpty() ? "BlobPrefix" : rootElementName; return xmlReader.readObject(finalRootElementName, reader -> { BlobPrefixInternal deserializedBlobPrefixInternal = new BlobPrefixInternal(); while (reader.nextElement() != XmlToken.END_ELEMENT) { diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobRetentionPolicy.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobRetentionPolicy.java index ec8426e99a4d..6bd3d40baf8e 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobRetentionPolicy.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobRetentionPolicy.java @@ -4,20 +4,19 @@ package com.azure.v2.storage.blob.models; -import com.azure.v2.core.annotation.Fluent; -import com.azure.v2.core.util.CoreUtils; +import io.clientcore.core.annotations.Metadata; +import io.clientcore.core.annotations.TypeConditions; import io.clientcore.core.serialization.xml.XmlReader; import io.clientcore.core.serialization.xml.XmlSerializable; import io.clientcore.core.serialization.xml.XmlToken; import io.clientcore.core.serialization.xml.XmlWriter; - import javax.xml.namespace.QName; import javax.xml.stream.XMLStreamException; /** * the retention policy which determines how long the associated data should persist. */ -@Fluent +@Metadata(conditions = { TypeConditions.FLUENT }) public final class BlobRetentionPolicy implements XmlSerializable { /* * Indicates whether a retention policy is enabled for the storage service @@ -38,7 +37,7 @@ public BlobRetentionPolicy() { /** * Get the enabled property: Indicates whether a retention policy is enabled for the storage service. - * + * * @return the enabled value. */ public boolean isEnabled() { @@ -47,7 +46,7 @@ public boolean isEnabled() { /** * Set the enabled property: Indicates whether a retention policy is enabled for the storage service. - * + * * @param enabled the enabled value to set. * @return the BlobRetentionPolicy object itself. */ @@ -59,7 +58,7 @@ public BlobRetentionPolicy setEnabled(boolean enabled) { /** * Get the days property: Indicates the number of days that metrics or logging or soft-deleted data should be * retained. All data older than this value will be deleted. - * + * * @return the days value. */ public Integer getDays() { @@ -69,7 +68,7 @@ public Integer getDays() { /** * Set the days property: Indicates the number of days that metrics or logging or soft-deleted data should be * retained. All data older than this value will be deleted. - * + * * @param days the days value to set. * @return the BlobRetentionPolicy object itself. */ @@ -85,7 +84,8 @@ public XmlWriter toXml(XmlWriter xmlWriter) throws XMLStreamException { @Override public XmlWriter toXml(XmlWriter xmlWriter, String rootElementName) throws XMLStreamException { - rootElementName = CoreUtils.isNullOrEmpty(rootElementName) ? "BlobRetentionPolicy" : rootElementName; + rootElementName + = rootElementName == null || rootElementName.isEmpty() ? "BlobRetentionPolicy" : rootElementName; xmlWriter.writeStartElement(rootElementName); xmlWriter.writeBooleanElement("Enabled", this.enabled); xmlWriter.writeNumberElement("Days", this.days); @@ -94,7 +94,7 @@ public XmlWriter toXml(XmlWriter xmlWriter, String rootElementName) throws XMLSt /** * 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. @@ -106,7 +106,7 @@ 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. @@ -116,7 +116,7 @@ public static BlobRetentionPolicy fromXml(XmlReader xmlReader) throws XMLStreamE */ public static BlobRetentionPolicy fromXml(XmlReader xmlReader, String rootElementName) throws XMLStreamException { String finalRootElementName - = CoreUtils.isNullOrEmpty(rootElementName) ? "BlobRetentionPolicy" : rootElementName; + = rootElementName == null || rootElementName.isEmpty() ? "BlobRetentionPolicy" : rootElementName; return xmlReader.readObject(finalRootElementName, reader -> { BlobRetentionPolicy deserializedBlobRetentionPolicy = new BlobRetentionPolicy(); while (reader.nextElement() != XmlToken.END_ELEMENT) { diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobServiceProperties.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobServiceProperties.java index 8529ae013fdd..f0f195f505b1 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobServiceProperties.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobServiceProperties.java @@ -4,22 +4,21 @@ package com.azure.v2.storage.blob.models; -import com.azure.v2.core.annotation.Fluent; -import com.azure.v2.core.util.CoreUtils; +import io.clientcore.core.annotations.Metadata; +import io.clientcore.core.annotations.TypeConditions; import io.clientcore.core.serialization.xml.XmlReader; import io.clientcore.core.serialization.xml.XmlSerializable; import io.clientcore.core.serialization.xml.XmlToken; import io.clientcore.core.serialization.xml.XmlWriter; - -import javax.xml.namespace.QName; -import javax.xml.stream.XMLStreamException; import java.util.ArrayList; import java.util.List; +import javax.xml.namespace.QName; +import javax.xml.stream.XMLStreamException; /** * Storage Service Properties. */ -@Fluent +@Metadata(conditions = { TypeConditions.FLUENT }) public final class BlobServiceProperties implements XmlSerializable { /* * Azure Analytics Logging settings. @@ -65,7 +64,7 @@ public BlobServiceProperties() { /** * Get the logging property: Azure Analytics Logging settings. - * + * * @return the logging value. */ public BlobAnalyticsLogging getLogging() { @@ -74,7 +73,7 @@ public BlobAnalyticsLogging getLogging() { /** * Set the logging property: Azure Analytics Logging settings. - * + * * @param logging the logging value to set. * @return the BlobServiceProperties object itself. */ @@ -86,7 +85,7 @@ public BlobServiceProperties setLogging(BlobAnalyticsLogging logging) { /** * Get the hourMetrics property: a summary of request statistics grouped by API in hour or minute aggregates for * blobs. - * + * * @return the hourMetrics value. */ public BlobMetrics getHourMetrics() { @@ -96,7 +95,7 @@ public BlobMetrics getHourMetrics() { /** * Set the hourMetrics property: a summary of request statistics grouped by API in hour or minute aggregates for * blobs. - * + * * @param hourMetrics the hourMetrics value to set. * @return the BlobServiceProperties object itself. */ @@ -108,7 +107,7 @@ public BlobServiceProperties setHourMetrics(BlobMetrics hourMetrics) { /** * Get the minuteMetrics property: a summary of request statistics grouped by API in hour or minute aggregates for * blobs. - * + * * @return the minuteMetrics value. */ public BlobMetrics getMinuteMetrics() { @@ -118,7 +117,7 @@ public BlobMetrics getMinuteMetrics() { /** * Set the minuteMetrics property: a summary of request statistics grouped by API in hour or minute aggregates for * blobs. - * + * * @param minuteMetrics the minuteMetrics value to set. * @return the BlobServiceProperties object itself. */ @@ -129,7 +128,7 @@ public BlobServiceProperties setMinuteMetrics(BlobMetrics minuteMetrics) { /** * Get the cors property: The set of CORS rules. - * + * * @return the cors value. */ public List getCors() { @@ -141,7 +140,7 @@ public List getCors() { /** * Set the cors property: The set of CORS rules. - * + * * @param cors the cors value to set. * @return the BlobServiceProperties object itself. */ @@ -154,7 +153,7 @@ public BlobServiceProperties setCors(List cors) { * Get the defaultServiceVersion property: The default version to use for requests to the Blob service if an * incoming request's version is not specified. Possible values include version 2008-10-27 and all more recent * versions. - * + * * @return the defaultServiceVersion value. */ public String getDefaultServiceVersion() { @@ -165,7 +164,7 @@ public String getDefaultServiceVersion() { * Set the defaultServiceVersion property: The default version to use for requests to the Blob service if an * incoming request's version is not specified. Possible values include version 2008-10-27 and all more recent * versions. - * + * * @param defaultServiceVersion the defaultServiceVersion value to set. * @return the BlobServiceProperties object itself. */ @@ -177,7 +176,7 @@ public BlobServiceProperties setDefaultServiceVersion(String defaultServiceVersi /** * Get the deleteRetentionPolicy property: the retention policy which determines how long the associated data should * persist. - * + * * @return the deleteRetentionPolicy value. */ public BlobRetentionPolicy getDeleteRetentionPolicy() { @@ -187,7 +186,7 @@ public BlobRetentionPolicy getDeleteRetentionPolicy() { /** * Set the deleteRetentionPolicy property: the retention policy which determines how long the associated data should * persist. - * + * * @param deleteRetentionPolicy the deleteRetentionPolicy value to set. * @return the BlobServiceProperties object itself. */ @@ -198,7 +197,7 @@ public BlobServiceProperties setDeleteRetentionPolicy(BlobRetentionPolicy delete /** * Get the staticWebsite property: The properties that enable an account to host a static website. - * + * * @return the staticWebsite value. */ public StaticWebsite getStaticWebsite() { @@ -207,7 +206,7 @@ public StaticWebsite getStaticWebsite() { /** * Set the staticWebsite property: The properties that enable an account to host a static website. - * + * * @param staticWebsite the staticWebsite value to set. * @return the BlobServiceProperties object itself. */ @@ -223,7 +222,8 @@ public XmlWriter toXml(XmlWriter xmlWriter) throws XMLStreamException { @Override public XmlWriter toXml(XmlWriter xmlWriter, String rootElementName) throws XMLStreamException { - rootElementName = CoreUtils.isNullOrEmpty(rootElementName) ? "StorageServiceProperties" : rootElementName; + rootElementName + = rootElementName == null || rootElementName.isEmpty() ? "StorageServiceProperties" : rootElementName; xmlWriter.writeStartElement(rootElementName); xmlWriter.writeXml(this.logging, "Logging"); xmlWriter.writeXml(this.hourMetrics, "HourMetrics"); @@ -243,7 +243,7 @@ public XmlWriter toXml(XmlWriter xmlWriter, String rootElementName) throws XMLSt /** * Reads an instance of BlobServiceProperties from the XmlReader. - * + * * @param xmlReader The XmlReader being read. * @return An instance of BlobServiceProperties if the XmlReader was pointing to an instance of it, or null if it * was pointing to XML null. @@ -255,7 +255,7 @@ public static BlobServiceProperties fromXml(XmlReader xmlReader) throws XMLStrea /** * Reads an instance of BlobServiceProperties from the XmlReader. - * + * * @param xmlReader The XmlReader being read. * @param rootElementName Optional root element name to override the default defined by the model. Used to support * cases where the model can deserialize from different root element names. @@ -265,7 +265,7 @@ public static BlobServiceProperties fromXml(XmlReader xmlReader) throws XMLStrea */ public static BlobServiceProperties fromXml(XmlReader xmlReader, String rootElementName) throws XMLStreamException { String finalRootElementName - = CoreUtils.isNullOrEmpty(rootElementName) ? "StorageServiceProperties" : rootElementName; + = rootElementName == null || rootElementName.isEmpty() ? "StorageServiceProperties" : rootElementName; return xmlReader.readObject(finalRootElementName, reader -> { BlobServiceProperties deserializedBlobServiceProperties = new BlobServiceProperties(); while (reader.nextElement() != XmlToken.END_ELEMENT) { diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobServiceStatistics.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobServiceStatistics.java index 2b6095569a00..18dce5c2d818 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobServiceStatistics.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobServiceStatistics.java @@ -4,20 +4,19 @@ package com.azure.v2.storage.blob.models; -import com.azure.v2.core.annotation.Fluent; -import com.azure.v2.core.util.CoreUtils; +import io.clientcore.core.annotations.Metadata; +import io.clientcore.core.annotations.TypeConditions; import io.clientcore.core.serialization.xml.XmlReader; import io.clientcore.core.serialization.xml.XmlSerializable; import io.clientcore.core.serialization.xml.XmlToken; import io.clientcore.core.serialization.xml.XmlWriter; - import javax.xml.namespace.QName; import javax.xml.stream.XMLStreamException; /** * Stats for the storage service. */ -@Fluent +@Metadata(conditions = { TypeConditions.FLUENT }) public final class BlobServiceStatistics implements XmlSerializable { /* * Geo-Replication information for the Secondary Storage Service @@ -32,7 +31,7 @@ public BlobServiceStatistics() { /** * Get the geoReplication property: Geo-Replication information for the Secondary Storage Service. - * + * * @return the geoReplication value. */ public GeoReplication getGeoReplication() { @@ -41,7 +40,7 @@ public GeoReplication getGeoReplication() { /** * Set the geoReplication property: Geo-Replication information for the Secondary Storage Service. - * + * * @param geoReplication the geoReplication value to set. * @return the BlobServiceStatistics object itself. */ @@ -57,7 +56,8 @@ public XmlWriter toXml(XmlWriter xmlWriter) throws XMLStreamException { @Override public XmlWriter toXml(XmlWriter xmlWriter, String rootElementName) throws XMLStreamException { - rootElementName = CoreUtils.isNullOrEmpty(rootElementName) ? "StorageServiceStats" : rootElementName; + rootElementName + = rootElementName == null || rootElementName.isEmpty() ? "StorageServiceStats" : rootElementName; xmlWriter.writeStartElement(rootElementName); xmlWriter.writeXml(this.geoReplication, "GeoReplication"); return xmlWriter.writeEndElement(); @@ -65,7 +65,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. @@ -77,7 +77,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. @@ -87,7 +87,7 @@ public static BlobServiceStatistics fromXml(XmlReader xmlReader) throws XMLStrea */ public static BlobServiceStatistics fromXml(XmlReader xmlReader, String rootElementName) throws XMLStreamException { String finalRootElementName - = CoreUtils.isNullOrEmpty(rootElementName) ? "StorageServiceStats" : rootElementName; + = rootElementName == null || rootElementName.isEmpty() ? "StorageServiceStats" : rootElementName; return xmlReader.readObject(finalRootElementName, reader -> { BlobServiceStatistics deserializedBlobServiceStatistics = new BlobServiceStatistics(); while (reader.nextElement() != XmlToken.END_ELEMENT) { diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobSignedIdentifier.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobSignedIdentifier.java index c9920c1c9ddf..202188a6554d 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobSignedIdentifier.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobSignedIdentifier.java @@ -4,20 +4,19 @@ package com.azure.v2.storage.blob.models; -import com.azure.v2.core.annotation.Fluent; -import com.azure.v2.core.util.CoreUtils; +import io.clientcore.core.annotations.Metadata; +import io.clientcore.core.annotations.TypeConditions; import io.clientcore.core.serialization.xml.XmlReader; import io.clientcore.core.serialization.xml.XmlSerializable; import io.clientcore.core.serialization.xml.XmlToken; import io.clientcore.core.serialization.xml.XmlWriter; - import javax.xml.namespace.QName; import javax.xml.stream.XMLStreamException; /** * signed identifier. */ -@Fluent +@Metadata(conditions = { TypeConditions.FLUENT }) public final class BlobSignedIdentifier implements XmlSerializable { /* * a unique id @@ -37,7 +36,7 @@ public BlobSignedIdentifier() { /** * Get the id property: a unique id. - * + * * @return the id value. */ public String getId() { @@ -46,7 +45,7 @@ public String getId() { /** * Set the id property: a unique id. - * + * * @param id the id value to set. * @return the BlobSignedIdentifier object itself. */ @@ -57,7 +56,7 @@ public BlobSignedIdentifier setId(String id) { /** * Get the accessPolicy property: An Access policy. - * + * * @return the accessPolicy value. */ public BlobAccessPolicy getAccessPolicy() { @@ -66,7 +65,7 @@ public BlobAccessPolicy getAccessPolicy() { /** * Set the accessPolicy property: An Access policy. - * + * * @param accessPolicy the accessPolicy value to set. * @return the BlobSignedIdentifier object itself. */ @@ -82,7 +81,7 @@ public XmlWriter toXml(XmlWriter xmlWriter) throws XMLStreamException { @Override public XmlWriter toXml(XmlWriter xmlWriter, String rootElementName) throws XMLStreamException { - rootElementName = CoreUtils.isNullOrEmpty(rootElementName) ? "SignedIdentifier" : rootElementName; + rootElementName = rootElementName == null || rootElementName.isEmpty() ? "SignedIdentifier" : rootElementName; xmlWriter.writeStartElement(rootElementName); xmlWriter.writeStringElement("Id", this.id); xmlWriter.writeXml(this.accessPolicy, "AccessPolicy"); @@ -91,7 +90,7 @@ 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. @@ -103,7 +102,7 @@ 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. @@ -112,7 +111,8 @@ public static BlobSignedIdentifier fromXml(XmlReader xmlReader) throws XMLStream * @throws XMLStreamException If an error occurs while reading the BlobSignedIdentifier. */ public static BlobSignedIdentifier fromXml(XmlReader xmlReader, String rootElementName) throws XMLStreamException { - String finalRootElementName = CoreUtils.isNullOrEmpty(rootElementName) ? "SignedIdentifier" : rootElementName; + String finalRootElementName + = rootElementName == null || rootElementName.isEmpty() ? "SignedIdentifier" : rootElementName; return xmlReader.readObject(finalRootElementName, reader -> { BlobSignedIdentifier deserializedBlobSignedIdentifier = new BlobSignedIdentifier(); while (reader.nextElement() != XmlToken.END_ELEMENT) { diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobTag.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobTag.java index 46b428772c48..2ca7755e1599 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobTag.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobTag.java @@ -4,20 +4,19 @@ package com.azure.v2.storage.blob.models; -import com.azure.v2.core.annotation.Fluent; -import com.azure.v2.core.util.CoreUtils; +import io.clientcore.core.annotations.Metadata; +import io.clientcore.core.annotations.TypeConditions; import io.clientcore.core.serialization.xml.XmlReader; import io.clientcore.core.serialization.xml.XmlSerializable; import io.clientcore.core.serialization.xml.XmlToken; import io.clientcore.core.serialization.xml.XmlWriter; - import javax.xml.namespace.QName; import javax.xml.stream.XMLStreamException; /** * The BlobTag model. */ -@Fluent +@Metadata(conditions = { TypeConditions.FLUENT }) public final class BlobTag implements XmlSerializable { /* * The Key property. @@ -37,7 +36,7 @@ public BlobTag() { /** * Get the key property: The Key property. - * + * * @return the key value. */ public String getKey() { @@ -46,7 +45,7 @@ public String getKey() { /** * Set the key property: The Key property. - * + * * @param key the key value to set. * @return the BlobTag object itself. */ @@ -57,7 +56,7 @@ public BlobTag setKey(String key) { /** * Get the value property: The Value property. - * + * * @return the value value. */ public String getValue() { @@ -66,7 +65,7 @@ public String getValue() { /** * Set the value property: The Value property. - * + * * @param value the value value to set. * @return the BlobTag object itself. */ @@ -82,7 +81,7 @@ public XmlWriter toXml(XmlWriter xmlWriter) throws XMLStreamException { @Override public XmlWriter toXml(XmlWriter xmlWriter, String rootElementName) throws XMLStreamException { - rootElementName = CoreUtils.isNullOrEmpty(rootElementName) ? "Tag" : rootElementName; + rootElementName = rootElementName == null || rootElementName.isEmpty() ? "Tag" : rootElementName; xmlWriter.writeStartElement(rootElementName); xmlWriter.writeStringElement("Key", this.key); xmlWriter.writeStringElement("Value", this.value); @@ -91,7 +90,7 @@ public XmlWriter toXml(XmlWriter xmlWriter, String rootElementName) throws XMLSt /** * Reads an instance of BlobTag from the XmlReader. - * + * * @param xmlReader The XmlReader being read. * @return An instance of BlobTag if the XmlReader was pointing to an instance of it, or null if it was pointing to * XML null. @@ -103,7 +102,7 @@ public static BlobTag fromXml(XmlReader xmlReader) throws XMLStreamException { /** * Reads an instance of BlobTag from the XmlReader. - * + * * @param xmlReader The XmlReader being read. * @param rootElementName Optional root element name to override the default defined by the model. Used to support * cases where the model can deserialize from different root element names. @@ -112,7 +111,7 @@ public static BlobTag fromXml(XmlReader xmlReader) throws XMLStreamException { * @throws XMLStreamException If an error occurs while reading the BlobTag. */ public static BlobTag fromXml(XmlReader xmlReader, String rootElementName) throws XMLStreamException { - String finalRootElementName = CoreUtils.isNullOrEmpty(rootElementName) ? "Tag" : rootElementName; + String finalRootElementName = rootElementName == null || rootElementName.isEmpty() ? "Tag" : rootElementName; return xmlReader.readObject(finalRootElementName, reader -> { BlobTag deserializedBlobTag = new BlobTag(); while (reader.nextElement() != XmlToken.END_ELEMENT) { diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobTags.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobTags.java index ca87033ca39f..a658ac325b54 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobTags.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobTags.java @@ -4,22 +4,21 @@ package com.azure.v2.storage.blob.models; -import com.azure.v2.core.annotation.Fluent; -import com.azure.v2.core.util.CoreUtils; +import io.clientcore.core.annotations.Metadata; +import io.clientcore.core.annotations.TypeConditions; import io.clientcore.core.serialization.xml.XmlReader; import io.clientcore.core.serialization.xml.XmlSerializable; import io.clientcore.core.serialization.xml.XmlToken; import io.clientcore.core.serialization.xml.XmlWriter; - -import javax.xml.namespace.QName; -import javax.xml.stream.XMLStreamException; import java.util.ArrayList; import java.util.List; +import javax.xml.namespace.QName; +import javax.xml.stream.XMLStreamException; /** * Blob tags. */ -@Fluent +@Metadata(conditions = { TypeConditions.FLUENT }) public final class BlobTags implements XmlSerializable { /* * The BlobTagSet property. @@ -34,7 +33,7 @@ public BlobTags() { /** * Get the blobTagSet property: The BlobTagSet property. - * + * * @return the blobTagSet value. */ public List getBlobTagSet() { @@ -46,7 +45,7 @@ public List getBlobTagSet() { /** * Set the blobTagSet property: The BlobTagSet property. - * + * * @param blobTagSet the blobTagSet value to set. * @return the BlobTags object itself. */ @@ -62,7 +61,7 @@ public XmlWriter toXml(XmlWriter xmlWriter) throws XMLStreamException { @Override public XmlWriter toXml(XmlWriter xmlWriter, String rootElementName) throws XMLStreamException { - rootElementName = CoreUtils.isNullOrEmpty(rootElementName) ? "Tags" : rootElementName; + rootElementName = rootElementName == null || rootElementName.isEmpty() ? "Tags" : rootElementName; xmlWriter.writeStartElement(rootElementName); if (this.blobTagSet != null) { xmlWriter.writeStartElement("TagSet"); @@ -76,7 +75,7 @@ public XmlWriter toXml(XmlWriter xmlWriter, String rootElementName) throws XMLSt /** * Reads an instance of BlobTags from the XmlReader. - * + * * @param xmlReader The XmlReader being read. * @return An instance of BlobTags if the XmlReader was pointing to an instance of it, or null if it was pointing to * XML null. @@ -88,7 +87,7 @@ public static BlobTags fromXml(XmlReader xmlReader) throws XMLStreamException { /** * Reads an instance of BlobTags from the XmlReader. - * + * * @param xmlReader The XmlReader being read. * @param rootElementName Optional root element name to override the default defined by the model. Used to support * cases where the model can deserialize from different root element names. @@ -97,7 +96,7 @@ public static BlobTags fromXml(XmlReader xmlReader) throws XMLStreamException { * @throws XMLStreamException If an error occurs while reading the BlobTags. */ public static BlobTags fromXml(XmlReader xmlReader, String rootElementName) throws XMLStreamException { - String finalRootElementName = CoreUtils.isNullOrEmpty(rootElementName) ? "Tags" : rootElementName; + String finalRootElementName = rootElementName == null || rootElementName.isEmpty() ? "Tags" : rootElementName; return xmlReader.readObject(finalRootElementName, reader -> { BlobTags deserializedBlobTags = new BlobTags(); while (reader.nextElement() != XmlToken.END_ELEMENT) { diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobType.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobType.java index a8100ab8045f..5888ff4bb3ea 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobType.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobType.java @@ -34,7 +34,7 @@ public enum BlobType { /** * Parses a serialized value to a BlobType instance. - * + * * @param value the serialized value to parse. * @return the parsed BlobType object, or null if unable to parse. */ diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobsAbortCopyFromURLHeaders.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobsAbortCopyFromURLHeaders.java index a1af9d0942c5..ac926ce8fe0e 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobsAbortCopyFromURLHeaders.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobsAbortCopyFromURLHeaders.java @@ -4,17 +4,17 @@ package com.azure.v2.storage.blob.models; -import com.azure.v2.core.annotation.Fluent; +import io.clientcore.core.annotations.Metadata; +import io.clientcore.core.annotations.TypeConditions; import io.clientcore.core.http.models.HttpHeaderName; import io.clientcore.core.http.models.HttpHeaders; -import io.clientcore.core.util.DateTimeRfc1123; - +import io.clientcore.core.utils.DateTimeRfc1123; import java.time.OffsetDateTime; /** * The BlobsAbortCopyFromURLHeaders model. */ -@Fluent +@Metadata(conditions = { TypeConditions.FLUENT }) public final class BlobsAbortCopyFromURLHeaders { /* * The x-ms-version property. @@ -38,16 +38,20 @@ public final class BlobsAbortCopyFromURLHeaders { private static final HttpHeaderName X_MS_VERSION = HttpHeaderName.fromString("x-ms-version"); + private static final HttpHeaderName X_MS_REQUEST_ID = HttpHeaderName.fromString("x-ms-request-id"); + + private static final HttpHeaderName X_MS_CLIENT_REQUEST_ID = HttpHeaderName.fromString("x-ms-client-request-id"); + // HttpHeaders containing the raw property values. /** * Creates an instance of BlobsAbortCopyFromURLHeaders class. - * + * * @param rawHeaders The raw HttpHeaders that will be used to create the property values. */ public BlobsAbortCopyFromURLHeaders(HttpHeaders rawHeaders) { this.xMsVersion = rawHeaders.getValue(X_MS_VERSION); - this.xMsRequestId = rawHeaders.getValue(HttpHeaderName.fromString("x-ms-request-id")); - this.xMsClientRequestId = rawHeaders.getValue(HttpHeaderName.fromString("x-ms-client-request-id")); + this.xMsRequestId = rawHeaders.getValue(X_MS_REQUEST_ID); + this.xMsClientRequestId = rawHeaders.getValue(X_MS_CLIENT_REQUEST_ID); String date = rawHeaders.getValue(HttpHeaderName.DATE); if (date != null) { this.date = new DateTimeRfc1123(date); @@ -56,7 +60,7 @@ public BlobsAbortCopyFromURLHeaders(HttpHeaders rawHeaders) { /** * Get the xMsVersion property: The x-ms-version property. - * + * * @return the xMsVersion value. */ public String getXMsVersion() { @@ -65,7 +69,7 @@ public String getXMsVersion() { /** * Set the xMsVersion property: The x-ms-version property. - * + * * @param xMsVersion the xMsVersion value to set. * @return the BlobsAbortCopyFromURLHeaders object itself. */ @@ -76,7 +80,7 @@ public BlobsAbortCopyFromURLHeaders setXMsVersion(String xMsVersion) { /** * Get the xMsRequestId property: The x-ms-request-id property. - * + * * @return the xMsRequestId value. */ public String getXMsRequestId() { @@ -85,7 +89,7 @@ public String getXMsRequestId() { /** * Set the xMsRequestId property: The x-ms-request-id property. - * + * * @param xMsRequestId the xMsRequestId value to set. * @return the BlobsAbortCopyFromURLHeaders object itself. */ @@ -96,7 +100,7 @@ public BlobsAbortCopyFromURLHeaders setXMsRequestId(String xMsRequestId) { /** * Get the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @return the xMsClientRequestId value. */ public String getXMsClientRequestId() { @@ -105,7 +109,7 @@ public String getXMsClientRequestId() { /** * Set the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @param xMsClientRequestId the xMsClientRequestId value to set. * @return the BlobsAbortCopyFromURLHeaders object itself. */ @@ -116,7 +120,7 @@ public BlobsAbortCopyFromURLHeaders setXMsClientRequestId(String xMsClientReques /** * Get the date property: The Date property. - * + * * @return the date value. */ public OffsetDateTime getDate() { @@ -128,7 +132,7 @@ public OffsetDateTime getDate() { /** * Set the date property: The Date property. - * + * * @param date the date value to set. * @return the BlobsAbortCopyFromURLHeaders object itself. */ diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobsAcquireLeaseHeaders.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobsAcquireLeaseHeaders.java index 92f900f802e6..67789398df0c 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobsAcquireLeaseHeaders.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobsAcquireLeaseHeaders.java @@ -4,17 +4,17 @@ package com.azure.v2.storage.blob.models; -import com.azure.v2.core.annotation.Fluent; +import io.clientcore.core.annotations.Metadata; +import io.clientcore.core.annotations.TypeConditions; import io.clientcore.core.http.models.HttpHeaderName; import io.clientcore.core.http.models.HttpHeaders; -import io.clientcore.core.util.DateTimeRfc1123; - +import io.clientcore.core.utils.DateTimeRfc1123; import java.time.OffsetDateTime; /** * The BlobsAcquireLeaseHeaders model. */ -@Fluent +@Metadata(conditions = { TypeConditions.FLUENT }) public final class BlobsAcquireLeaseHeaders { /* * The x-ms-version property. @@ -55,10 +55,14 @@ public final class BlobsAcquireLeaseHeaders { private static final HttpHeaderName X_MS_LEASE_ID = HttpHeaderName.fromString("x-ms-lease-id"); + private static final HttpHeaderName X_MS_REQUEST_ID = HttpHeaderName.fromString("x-ms-request-id"); + + private static final HttpHeaderName X_MS_CLIENT_REQUEST_ID = HttpHeaderName.fromString("x-ms-client-request-id"); + // HttpHeaders containing the raw property values. /** * Creates an instance of BlobsAcquireLeaseHeaders class. - * + * * @param rawHeaders The raw HttpHeaders that will be used to create the property values. */ public BlobsAcquireLeaseHeaders(HttpHeaders rawHeaders) { @@ -69,8 +73,8 @@ public BlobsAcquireLeaseHeaders(HttpHeaders rawHeaders) { if (lastModified != null) { this.lastModified = new DateTimeRfc1123(lastModified); } - this.xMsRequestId = rawHeaders.getValue(HttpHeaderName.fromString("x-ms-request-id")); - this.xMsClientRequestId = rawHeaders.getValue(HttpHeaderName.fromString("x-ms-client-request-id")); + this.xMsRequestId = rawHeaders.getValue(X_MS_REQUEST_ID); + this.xMsClientRequestId = rawHeaders.getValue(X_MS_CLIENT_REQUEST_ID); String date = rawHeaders.getValue(HttpHeaderName.DATE); if (date != null) { this.date = new DateTimeRfc1123(date); @@ -79,7 +83,7 @@ public BlobsAcquireLeaseHeaders(HttpHeaders rawHeaders) { /** * Get the xMsVersion property: The x-ms-version property. - * + * * @return the xMsVersion value. */ public String getXMsVersion() { @@ -88,7 +92,7 @@ public String getXMsVersion() { /** * Set the xMsVersion property: The x-ms-version property. - * + * * @param xMsVersion the xMsVersion value to set. * @return the BlobsAcquireLeaseHeaders object itself. */ @@ -99,7 +103,7 @@ public BlobsAcquireLeaseHeaders setXMsVersion(String xMsVersion) { /** * Get the eTag property: The ETag property. - * + * * @return the eTag value. */ public String getETag() { @@ -108,7 +112,7 @@ public String getETag() { /** * Set the eTag property: The ETag property. - * + * * @param eTag the eTag value to set. * @return the BlobsAcquireLeaseHeaders object itself. */ @@ -119,7 +123,7 @@ public BlobsAcquireLeaseHeaders setETag(String eTag) { /** * Get the xMsLeaseId property: The x-ms-lease-id property. - * + * * @return the xMsLeaseId value. */ public String getXMsLeaseId() { @@ -128,7 +132,7 @@ public String getXMsLeaseId() { /** * Set the xMsLeaseId property: The x-ms-lease-id property. - * + * * @param xMsLeaseId the xMsLeaseId value to set. * @return the BlobsAcquireLeaseHeaders object itself. */ @@ -139,7 +143,7 @@ public BlobsAcquireLeaseHeaders setXMsLeaseId(String xMsLeaseId) { /** * Get the lastModified property: The Last-Modified property. - * + * * @return the lastModified value. */ public OffsetDateTime getLastModified() { @@ -151,7 +155,7 @@ public OffsetDateTime getLastModified() { /** * Set the lastModified property: The Last-Modified property. - * + * * @param lastModified the lastModified value to set. * @return the BlobsAcquireLeaseHeaders object itself. */ @@ -166,7 +170,7 @@ public BlobsAcquireLeaseHeaders setLastModified(OffsetDateTime lastModified) { /** * Get the xMsRequestId property: The x-ms-request-id property. - * + * * @return the xMsRequestId value. */ public String getXMsRequestId() { @@ -175,7 +179,7 @@ public String getXMsRequestId() { /** * Set the xMsRequestId property: The x-ms-request-id property. - * + * * @param xMsRequestId the xMsRequestId value to set. * @return the BlobsAcquireLeaseHeaders object itself. */ @@ -186,7 +190,7 @@ public BlobsAcquireLeaseHeaders setXMsRequestId(String xMsRequestId) { /** * Get the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @return the xMsClientRequestId value. */ public String getXMsClientRequestId() { @@ -195,7 +199,7 @@ public String getXMsClientRequestId() { /** * Set the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @param xMsClientRequestId the xMsClientRequestId value to set. * @return the BlobsAcquireLeaseHeaders object itself. */ @@ -206,7 +210,7 @@ public BlobsAcquireLeaseHeaders setXMsClientRequestId(String xMsClientRequestId) /** * Get the date property: The Date property. - * + * * @return the date value. */ public OffsetDateTime getDate() { @@ -218,7 +222,7 @@ public OffsetDateTime getDate() { /** * Set the date property: The Date property. - * + * * @param date the date value to set. * @return the BlobsAcquireLeaseHeaders object itself. */ diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobsBreakLeaseHeaders.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobsBreakLeaseHeaders.java index 2cd9d72139e4..fc7e1fae13a1 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobsBreakLeaseHeaders.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobsBreakLeaseHeaders.java @@ -4,17 +4,17 @@ package com.azure.v2.storage.blob.models; -import com.azure.v2.core.annotation.Fluent; +import io.clientcore.core.annotations.Metadata; +import io.clientcore.core.annotations.TypeConditions; import io.clientcore.core.http.models.HttpHeaderName; import io.clientcore.core.http.models.HttpHeaders; -import io.clientcore.core.util.DateTimeRfc1123; - +import io.clientcore.core.utils.DateTimeRfc1123; import java.time.OffsetDateTime; /** * The BlobsBreakLeaseHeaders model. */ -@Fluent +@Metadata(conditions = { TypeConditions.FLUENT }) public final class BlobsBreakLeaseHeaders { /* * The x-ms-version property. @@ -55,10 +55,14 @@ public final class BlobsBreakLeaseHeaders { private static final HttpHeaderName X_MS_LEASE_TIME = HttpHeaderName.fromString("x-ms-lease-time"); + private static final HttpHeaderName X_MS_REQUEST_ID = HttpHeaderName.fromString("x-ms-request-id"); + + private static final HttpHeaderName X_MS_CLIENT_REQUEST_ID = HttpHeaderName.fromString("x-ms-client-request-id"); + // HttpHeaders containing the raw property values. /** * Creates an instance of BlobsBreakLeaseHeaders class. - * + * * @param rawHeaders The raw HttpHeaders that will be used to create the property values. */ public BlobsBreakLeaseHeaders(HttpHeaders rawHeaders) { @@ -72,8 +76,8 @@ public BlobsBreakLeaseHeaders(HttpHeaders rawHeaders) { if (lastModified != null) { this.lastModified = new DateTimeRfc1123(lastModified); } - this.xMsRequestId = rawHeaders.getValue(HttpHeaderName.fromString("x-ms-request-id")); - this.xMsClientRequestId = rawHeaders.getValue(HttpHeaderName.fromString("x-ms-client-request-id")); + this.xMsRequestId = rawHeaders.getValue(X_MS_REQUEST_ID); + this.xMsClientRequestId = rawHeaders.getValue(X_MS_CLIENT_REQUEST_ID); String date = rawHeaders.getValue(HttpHeaderName.DATE); if (date != null) { this.date = new DateTimeRfc1123(date); @@ -82,7 +86,7 @@ public BlobsBreakLeaseHeaders(HttpHeaders rawHeaders) { /** * Get the xMsVersion property: The x-ms-version property. - * + * * @return the xMsVersion value. */ public String getXMsVersion() { @@ -91,7 +95,7 @@ public String getXMsVersion() { /** * Set the xMsVersion property: The x-ms-version property. - * + * * @param xMsVersion the xMsVersion value to set. * @return the BlobsBreakLeaseHeaders object itself. */ @@ -102,7 +106,7 @@ public BlobsBreakLeaseHeaders setXMsVersion(String xMsVersion) { /** * Get the eTag property: The ETag property. - * + * * @return the eTag value. */ public String getETag() { @@ -111,7 +115,7 @@ public String getETag() { /** * Set the eTag property: The ETag property. - * + * * @param eTag the eTag value to set. * @return the BlobsBreakLeaseHeaders object itself. */ @@ -122,7 +126,7 @@ public BlobsBreakLeaseHeaders setETag(String eTag) { /** * Get the xMsLeaseTime property: The x-ms-lease-time property. - * + * * @return the xMsLeaseTime value. */ public Integer getXMsLeaseTime() { @@ -131,7 +135,7 @@ public Integer getXMsLeaseTime() { /** * Set the xMsLeaseTime property: The x-ms-lease-time property. - * + * * @param xMsLeaseTime the xMsLeaseTime value to set. * @return the BlobsBreakLeaseHeaders object itself. */ @@ -142,7 +146,7 @@ public BlobsBreakLeaseHeaders setXMsLeaseTime(Integer xMsLeaseTime) { /** * Get the lastModified property: The Last-Modified property. - * + * * @return the lastModified value. */ public OffsetDateTime getLastModified() { @@ -154,7 +158,7 @@ public OffsetDateTime getLastModified() { /** * Set the lastModified property: The Last-Modified property. - * + * * @param lastModified the lastModified value to set. * @return the BlobsBreakLeaseHeaders object itself. */ @@ -169,7 +173,7 @@ public BlobsBreakLeaseHeaders setLastModified(OffsetDateTime lastModified) { /** * Get the xMsRequestId property: The x-ms-request-id property. - * + * * @return the xMsRequestId value. */ public String getXMsRequestId() { @@ -178,7 +182,7 @@ public String getXMsRequestId() { /** * Set the xMsRequestId property: The x-ms-request-id property. - * + * * @param xMsRequestId the xMsRequestId value to set. * @return the BlobsBreakLeaseHeaders object itself. */ @@ -189,7 +193,7 @@ public BlobsBreakLeaseHeaders setXMsRequestId(String xMsRequestId) { /** * Get the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @return the xMsClientRequestId value. */ public String getXMsClientRequestId() { @@ -198,7 +202,7 @@ public String getXMsClientRequestId() { /** * Set the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @param xMsClientRequestId the xMsClientRequestId value to set. * @return the BlobsBreakLeaseHeaders object itself. */ @@ -209,7 +213,7 @@ public BlobsBreakLeaseHeaders setXMsClientRequestId(String xMsClientRequestId) { /** * Get the date property: The Date property. - * + * * @return the date value. */ public OffsetDateTime getDate() { @@ -221,7 +225,7 @@ public OffsetDateTime getDate() { /** * Set the date property: The Date property. - * + * * @param date the date value to set. * @return the BlobsBreakLeaseHeaders object itself. */ diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobsChangeLeaseHeaders.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobsChangeLeaseHeaders.java index 7d6c718e1aba..b5af5112a093 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobsChangeLeaseHeaders.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobsChangeLeaseHeaders.java @@ -4,17 +4,17 @@ package com.azure.v2.storage.blob.models; -import com.azure.v2.core.annotation.Fluent; +import io.clientcore.core.annotations.Metadata; +import io.clientcore.core.annotations.TypeConditions; import io.clientcore.core.http.models.HttpHeaderName; import io.clientcore.core.http.models.HttpHeaders; -import io.clientcore.core.util.DateTimeRfc1123; - +import io.clientcore.core.utils.DateTimeRfc1123; import java.time.OffsetDateTime; /** * The BlobsChangeLeaseHeaders model. */ -@Fluent +@Metadata(conditions = { TypeConditions.FLUENT }) public final class BlobsChangeLeaseHeaders { /* * The x-ms-version property. @@ -55,10 +55,14 @@ public final class BlobsChangeLeaseHeaders { private static final HttpHeaderName X_MS_LEASE_ID = HttpHeaderName.fromString("x-ms-lease-id"); + private static final HttpHeaderName X_MS_REQUEST_ID = HttpHeaderName.fromString("x-ms-request-id"); + + private static final HttpHeaderName X_MS_CLIENT_REQUEST_ID = HttpHeaderName.fromString("x-ms-client-request-id"); + // HttpHeaders containing the raw property values. /** * Creates an instance of BlobsChangeLeaseHeaders class. - * + * * @param rawHeaders The raw HttpHeaders that will be used to create the property values. */ public BlobsChangeLeaseHeaders(HttpHeaders rawHeaders) { @@ -69,8 +73,8 @@ public BlobsChangeLeaseHeaders(HttpHeaders rawHeaders) { if (lastModified != null) { this.lastModified = new DateTimeRfc1123(lastModified); } - this.xMsRequestId = rawHeaders.getValue(HttpHeaderName.fromString("x-ms-request-id")); - this.xMsClientRequestId = rawHeaders.getValue(HttpHeaderName.fromString("x-ms-client-request-id")); + this.xMsRequestId = rawHeaders.getValue(X_MS_REQUEST_ID); + this.xMsClientRequestId = rawHeaders.getValue(X_MS_CLIENT_REQUEST_ID); String date = rawHeaders.getValue(HttpHeaderName.DATE); if (date != null) { this.date = new DateTimeRfc1123(date); @@ -79,7 +83,7 @@ public BlobsChangeLeaseHeaders(HttpHeaders rawHeaders) { /** * Get the xMsVersion property: The x-ms-version property. - * + * * @return the xMsVersion value. */ public String getXMsVersion() { @@ -88,7 +92,7 @@ public String getXMsVersion() { /** * Set the xMsVersion property: The x-ms-version property. - * + * * @param xMsVersion the xMsVersion value to set. * @return the BlobsChangeLeaseHeaders object itself. */ @@ -99,7 +103,7 @@ public BlobsChangeLeaseHeaders setXMsVersion(String xMsVersion) { /** * Get the eTag property: The ETag property. - * + * * @return the eTag value. */ public String getETag() { @@ -108,7 +112,7 @@ public String getETag() { /** * Set the eTag property: The ETag property. - * + * * @param eTag the eTag value to set. * @return the BlobsChangeLeaseHeaders object itself. */ @@ -119,7 +123,7 @@ public BlobsChangeLeaseHeaders setETag(String eTag) { /** * Get the xMsLeaseId property: The x-ms-lease-id property. - * + * * @return the xMsLeaseId value. */ public String getXMsLeaseId() { @@ -128,7 +132,7 @@ public String getXMsLeaseId() { /** * Set the xMsLeaseId property: The x-ms-lease-id property. - * + * * @param xMsLeaseId the xMsLeaseId value to set. * @return the BlobsChangeLeaseHeaders object itself. */ @@ -139,7 +143,7 @@ public BlobsChangeLeaseHeaders setXMsLeaseId(String xMsLeaseId) { /** * Get the lastModified property: The Last-Modified property. - * + * * @return the lastModified value. */ public OffsetDateTime getLastModified() { @@ -151,7 +155,7 @@ public OffsetDateTime getLastModified() { /** * Set the lastModified property: The Last-Modified property. - * + * * @param lastModified the lastModified value to set. * @return the BlobsChangeLeaseHeaders object itself. */ @@ -166,7 +170,7 @@ public BlobsChangeLeaseHeaders setLastModified(OffsetDateTime lastModified) { /** * Get the xMsRequestId property: The x-ms-request-id property. - * + * * @return the xMsRequestId value. */ public String getXMsRequestId() { @@ -175,7 +179,7 @@ public String getXMsRequestId() { /** * Set the xMsRequestId property: The x-ms-request-id property. - * + * * @param xMsRequestId the xMsRequestId value to set. * @return the BlobsChangeLeaseHeaders object itself. */ @@ -186,7 +190,7 @@ public BlobsChangeLeaseHeaders setXMsRequestId(String xMsRequestId) { /** * Get the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @return the xMsClientRequestId value. */ public String getXMsClientRequestId() { @@ -195,7 +199,7 @@ public String getXMsClientRequestId() { /** * Set the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @param xMsClientRequestId the xMsClientRequestId value to set. * @return the BlobsChangeLeaseHeaders object itself. */ @@ -206,7 +210,7 @@ public BlobsChangeLeaseHeaders setXMsClientRequestId(String xMsClientRequestId) /** * Get the date property: The Date property. - * + * * @return the date value. */ public OffsetDateTime getDate() { @@ -218,7 +222,7 @@ public OffsetDateTime getDate() { /** * Set the date property: The Date property. - * + * * @param date the date value to set. * @return the BlobsChangeLeaseHeaders object itself. */ diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobsCopyFromURLHeaders.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobsCopyFromURLHeaders.java index ec4b2454d990..df8a2124f7e5 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobsCopyFromURLHeaders.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobsCopyFromURLHeaders.java @@ -4,19 +4,18 @@ package com.azure.v2.storage.blob.models; -import com.azure.v2.core.annotation.Fluent; -import com.azure.v2.core.util.CoreUtils; +import io.clientcore.core.annotations.Metadata; +import io.clientcore.core.annotations.TypeConditions; import io.clientcore.core.http.models.HttpHeaderName; import io.clientcore.core.http.models.HttpHeaders; -import io.clientcore.core.util.DateTimeRfc1123; - +import io.clientcore.core.utils.DateTimeRfc1123; import java.time.OffsetDateTime; import java.util.Base64; /** * The BlobsCopyFromURLHeaders model. */ -@Fluent +@Metadata(conditions = { TypeConditions.FLUENT }) public final class BlobsCopyFromURLHeaders { /* * The x-ms-version property. @@ -88,12 +87,16 @@ public final class BlobsCopyFromURLHeaders { private static final HttpHeaderName X_MS_COPY_STATUS = HttpHeaderName.fromString("x-ms-copy-status"); + private static final HttpHeaderName X_MS_REQUEST_ID = HttpHeaderName.fromString("x-ms-request-id"); + + private static final HttpHeaderName X_MS_CLIENT_REQUEST_ID = HttpHeaderName.fromString("x-ms-client-request-id"); + private static final HttpHeaderName X_MS_ENCRYPTION_SCOPE = HttpHeaderName.fromString("x-ms-encryption-scope"); // HttpHeaders containing the raw property values. /** * Creates an instance of BlobsCopyFromURLHeaders class. - * + * * @param rawHeaders The raw HttpHeaders that will be used to create the property values. */ public BlobsCopyFromURLHeaders(HttpHeaders rawHeaders) { @@ -110,8 +113,8 @@ public BlobsCopyFromURLHeaders(HttpHeaders rawHeaders) { } this.xMsVersionId = rawHeaders.getValue(X_MS_VERSION_ID); this.xMsCopyStatus = rawHeaders.getValue(X_MS_COPY_STATUS); - this.xMsRequestId = rawHeaders.getValue(HttpHeaderName.fromString("x-ms-request-id")); - this.xMsClientRequestId = rawHeaders.getValue(HttpHeaderName.fromString("x-ms-client-request-id")); + this.xMsRequestId = rawHeaders.getValue(X_MS_REQUEST_ID); + this.xMsClientRequestId = rawHeaders.getValue(X_MS_CLIENT_REQUEST_ID); String date = rawHeaders.getValue(HttpHeaderName.DATE); if (date != null) { this.date = new DateTimeRfc1123(date); @@ -125,7 +128,7 @@ public BlobsCopyFromURLHeaders(HttpHeaders rawHeaders) { /** * Get the xMsVersion property: The x-ms-version property. - * + * * @return the xMsVersion value. */ public String getXMsVersion() { @@ -134,7 +137,7 @@ public String getXMsVersion() { /** * Set the xMsVersion property: The x-ms-version property. - * + * * @param xMsVersion the xMsVersion value to set. * @return the BlobsCopyFromURLHeaders object itself. */ @@ -145,7 +148,7 @@ public BlobsCopyFromURLHeaders setXMsVersion(String xMsVersion) { /** * Get the xMsCopyId property: The x-ms-copy-id property. - * + * * @return the xMsCopyId value. */ public String getXMsCopyId() { @@ -154,7 +157,7 @@ public String getXMsCopyId() { /** * Set the xMsCopyId property: The x-ms-copy-id property. - * + * * @param xMsCopyId the xMsCopyId value to set. * @return the BlobsCopyFromURLHeaders object itself. */ @@ -165,7 +168,7 @@ public BlobsCopyFromURLHeaders setXMsCopyId(String xMsCopyId) { /** * Get the eTag property: The ETag property. - * + * * @return the eTag value. */ public String getETag() { @@ -174,7 +177,7 @@ public String getETag() { /** * Set the eTag property: The ETag property. - * + * * @param eTag the eTag value to set. * @return the BlobsCopyFromURLHeaders object itself. */ @@ -185,27 +188,27 @@ public BlobsCopyFromURLHeaders setETag(String eTag) { /** * Get the xMsContentCrc64 property: The x-ms-content-crc64 property. - * + * * @return the xMsContentCrc64 value. */ public byte[] getXMsContentCrc64() { - return CoreUtils.clone(this.xMsContentCrc64); + return this.xMsContentCrc64; } /** * Set the xMsContentCrc64 property: The x-ms-content-crc64 property. - * + * * @param xMsContentCrc64 the xMsContentCrc64 value to set. * @return the BlobsCopyFromURLHeaders object itself. */ public BlobsCopyFromURLHeaders setXMsContentCrc64(byte[] xMsContentCrc64) { - this.xMsContentCrc64 = CoreUtils.clone(xMsContentCrc64); + this.xMsContentCrc64 = xMsContentCrc64; return this; } /** * Get the lastModified property: The Last-Modified property. - * + * * @return the lastModified value. */ public OffsetDateTime getLastModified() { @@ -217,7 +220,7 @@ public OffsetDateTime getLastModified() { /** * Set the lastModified property: The Last-Modified property. - * + * * @param lastModified the lastModified value to set. * @return the BlobsCopyFromURLHeaders object itself. */ @@ -232,7 +235,7 @@ public BlobsCopyFromURLHeaders setLastModified(OffsetDateTime lastModified) { /** * Get the xMsVersionId property: The x-ms-version-id property. - * + * * @return the xMsVersionId value. */ public String getXMsVersionId() { @@ -241,7 +244,7 @@ public String getXMsVersionId() { /** * Set the xMsVersionId property: The x-ms-version-id property. - * + * * @param xMsVersionId the xMsVersionId value to set. * @return the BlobsCopyFromURLHeaders object itself. */ @@ -252,7 +255,7 @@ public BlobsCopyFromURLHeaders setXMsVersionId(String xMsVersionId) { /** * Get the xMsCopyStatus property: The x-ms-copy-status property. - * + * * @return the xMsCopyStatus value. */ public String getXMsCopyStatus() { @@ -261,7 +264,7 @@ public String getXMsCopyStatus() { /** * Set the xMsCopyStatus property: The x-ms-copy-status property. - * + * * @param xMsCopyStatus the xMsCopyStatus value to set. * @return the BlobsCopyFromURLHeaders object itself. */ @@ -272,7 +275,7 @@ public BlobsCopyFromURLHeaders setXMsCopyStatus(String xMsCopyStatus) { /** * Get the xMsRequestId property: The x-ms-request-id property. - * + * * @return the xMsRequestId value. */ public String getXMsRequestId() { @@ -281,7 +284,7 @@ public String getXMsRequestId() { /** * Set the xMsRequestId property: The x-ms-request-id property. - * + * * @param xMsRequestId the xMsRequestId value to set. * @return the BlobsCopyFromURLHeaders object itself. */ @@ -292,7 +295,7 @@ public BlobsCopyFromURLHeaders setXMsRequestId(String xMsRequestId) { /** * Get the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @return the xMsClientRequestId value. */ public String getXMsClientRequestId() { @@ -301,7 +304,7 @@ public String getXMsClientRequestId() { /** * Set the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @param xMsClientRequestId the xMsClientRequestId value to set. * @return the BlobsCopyFromURLHeaders object itself. */ @@ -312,7 +315,7 @@ public BlobsCopyFromURLHeaders setXMsClientRequestId(String xMsClientRequestId) /** * Get the date property: The Date property. - * + * * @return the date value. */ public OffsetDateTime getDate() { @@ -324,7 +327,7 @@ public OffsetDateTime getDate() { /** * Set the date property: The Date property. - * + * * @param date the date value to set. * @return the BlobsCopyFromURLHeaders object itself. */ @@ -339,27 +342,27 @@ public BlobsCopyFromURLHeaders setDate(OffsetDateTime date) { /** * Get the contentMD5 property: The Content-MD5 property. - * + * * @return the contentMD5 value. */ public byte[] getContentMD5() { - return CoreUtils.clone(this.contentMD5); + return this.contentMD5; } /** * Set the contentMD5 property: The Content-MD5 property. - * + * * @param contentMD5 the contentMD5 value to set. * @return the BlobsCopyFromURLHeaders object itself. */ public BlobsCopyFromURLHeaders setContentMD5(byte[] contentMD5) { - this.contentMD5 = CoreUtils.clone(contentMD5); + this.contentMD5 = contentMD5; return this; } /** * Get the xMsEncryptionScope property: The x-ms-encryption-scope property. - * + * * @return the xMsEncryptionScope value. */ public String getXMsEncryptionScope() { @@ -368,7 +371,7 @@ public String getXMsEncryptionScope() { /** * Set the xMsEncryptionScope property: The x-ms-encryption-scope property. - * + * * @param xMsEncryptionScope the xMsEncryptionScope value to set. * @return the BlobsCopyFromURLHeaders object itself. */ diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobsCreateSnapshotHeaders.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobsCreateSnapshotHeaders.java index 777eef252aaa..d5b441c6538b 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobsCreateSnapshotHeaders.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobsCreateSnapshotHeaders.java @@ -4,17 +4,17 @@ package com.azure.v2.storage.blob.models; -import com.azure.v2.core.annotation.Fluent; +import io.clientcore.core.annotations.Metadata; +import io.clientcore.core.annotations.TypeConditions; import io.clientcore.core.http.models.HttpHeaderName; import io.clientcore.core.http.models.HttpHeaders; -import io.clientcore.core.util.DateTimeRfc1123; - +import io.clientcore.core.utils.DateTimeRfc1123; import java.time.OffsetDateTime; /** * The BlobsCreateSnapshotHeaders model. */ -@Fluent +@Metadata(conditions = { TypeConditions.FLUENT }) public final class BlobsCreateSnapshotHeaders { /* * The x-ms-snapshot property. @@ -67,13 +67,17 @@ public final class BlobsCreateSnapshotHeaders { private static final HttpHeaderName X_MS_VERSION_ID = HttpHeaderName.fromString("x-ms-version-id"); + private static final HttpHeaderName X_MS_REQUEST_ID = HttpHeaderName.fromString("x-ms-request-id"); + private static final HttpHeaderName X_MS_REQUEST_SERVER_ENCRYPTED = HttpHeaderName.fromString("x-ms-request-server-encrypted"); + private static final HttpHeaderName X_MS_CLIENT_REQUEST_ID = HttpHeaderName.fromString("x-ms-client-request-id"); + // HttpHeaders containing the raw property values. /** * Creates an instance of BlobsCreateSnapshotHeaders class. - * + * * @param rawHeaders The raw HttpHeaders that will be used to create the property values. */ public BlobsCreateSnapshotHeaders(HttpHeaders rawHeaders) { @@ -85,12 +89,12 @@ public BlobsCreateSnapshotHeaders(HttpHeaders rawHeaders) { this.lastModified = new DateTimeRfc1123(lastModified); } this.xMsVersionId = rawHeaders.getValue(X_MS_VERSION_ID); - this.xMsRequestId = rawHeaders.getValue(HttpHeaderName.fromString("x-ms-request-id")); + this.xMsRequestId = rawHeaders.getValue(X_MS_REQUEST_ID); String xMsRequestServerEncrypted = rawHeaders.getValue(X_MS_REQUEST_SERVER_ENCRYPTED); if (xMsRequestServerEncrypted != null) { this.xMsRequestServerEncrypted = Boolean.parseBoolean(xMsRequestServerEncrypted); } - this.xMsClientRequestId = rawHeaders.getValue(HttpHeaderName.fromString("x-ms-client-request-id")); + this.xMsClientRequestId = rawHeaders.getValue(X_MS_CLIENT_REQUEST_ID); String date = rawHeaders.getValue(HttpHeaderName.DATE); if (date != null) { this.date = new DateTimeRfc1123(date); @@ -99,7 +103,7 @@ public BlobsCreateSnapshotHeaders(HttpHeaders rawHeaders) { /** * Get the xMsSnapshot property: The x-ms-snapshot property. - * + * * @return the xMsSnapshot value. */ public String getXMsSnapshot() { @@ -108,7 +112,7 @@ public String getXMsSnapshot() { /** * Set the xMsSnapshot property: The x-ms-snapshot property. - * + * * @param xMsSnapshot the xMsSnapshot value to set. * @return the BlobsCreateSnapshotHeaders object itself. */ @@ -119,7 +123,7 @@ public BlobsCreateSnapshotHeaders setXMsSnapshot(String xMsSnapshot) { /** * Get the xMsVersion property: The x-ms-version property. - * + * * @return the xMsVersion value. */ public String getXMsVersion() { @@ -128,7 +132,7 @@ public String getXMsVersion() { /** * Set the xMsVersion property: The x-ms-version property. - * + * * @param xMsVersion the xMsVersion value to set. * @return the BlobsCreateSnapshotHeaders object itself. */ @@ -139,7 +143,7 @@ public BlobsCreateSnapshotHeaders setXMsVersion(String xMsVersion) { /** * Get the eTag property: The ETag property. - * + * * @return the eTag value. */ public String getETag() { @@ -148,7 +152,7 @@ public String getETag() { /** * Set the eTag property: The ETag property. - * + * * @param eTag the eTag value to set. * @return the BlobsCreateSnapshotHeaders object itself. */ @@ -159,7 +163,7 @@ public BlobsCreateSnapshotHeaders setETag(String eTag) { /** * Get the lastModified property: The Last-Modified property. - * + * * @return the lastModified value. */ public OffsetDateTime getLastModified() { @@ -171,7 +175,7 @@ public OffsetDateTime getLastModified() { /** * Set the lastModified property: The Last-Modified property. - * + * * @param lastModified the lastModified value to set. * @return the BlobsCreateSnapshotHeaders object itself. */ @@ -186,7 +190,7 @@ public BlobsCreateSnapshotHeaders setLastModified(OffsetDateTime lastModified) { /** * Get the xMsVersionId property: The x-ms-version-id property. - * + * * @return the xMsVersionId value. */ public String getXMsVersionId() { @@ -195,7 +199,7 @@ public String getXMsVersionId() { /** * Set the xMsVersionId property: The x-ms-version-id property. - * + * * @param xMsVersionId the xMsVersionId value to set. * @return the BlobsCreateSnapshotHeaders object itself. */ @@ -206,7 +210,7 @@ public BlobsCreateSnapshotHeaders setXMsVersionId(String xMsVersionId) { /** * Get the xMsRequestId property: The x-ms-request-id property. - * + * * @return the xMsRequestId value. */ public String getXMsRequestId() { @@ -215,7 +219,7 @@ public String getXMsRequestId() { /** * Set the xMsRequestId property: The x-ms-request-id property. - * + * * @param xMsRequestId the xMsRequestId value to set. * @return the BlobsCreateSnapshotHeaders object itself. */ @@ -226,7 +230,7 @@ public BlobsCreateSnapshotHeaders setXMsRequestId(String xMsRequestId) { /** * Get the xMsRequestServerEncrypted property: The x-ms-request-server-encrypted property. - * + * * @return the xMsRequestServerEncrypted value. */ public Boolean isXMsRequestServerEncrypted() { @@ -235,7 +239,7 @@ public Boolean isXMsRequestServerEncrypted() { /** * Set the xMsRequestServerEncrypted property: The x-ms-request-server-encrypted property. - * + * * @param xMsRequestServerEncrypted the xMsRequestServerEncrypted value to set. * @return the BlobsCreateSnapshotHeaders object itself. */ @@ -246,7 +250,7 @@ public BlobsCreateSnapshotHeaders setXMsRequestServerEncrypted(Boolean xMsReques /** * Get the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @return the xMsClientRequestId value. */ public String getXMsClientRequestId() { @@ -255,7 +259,7 @@ public String getXMsClientRequestId() { /** * Set the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @param xMsClientRequestId the xMsClientRequestId value to set. * @return the BlobsCreateSnapshotHeaders object itself. */ @@ -266,7 +270,7 @@ public BlobsCreateSnapshotHeaders setXMsClientRequestId(String xMsClientRequestI /** * Get the date property: The Date property. - * + * * @return the date value. */ public OffsetDateTime getDate() { @@ -278,7 +282,7 @@ public OffsetDateTime getDate() { /** * Set the date property: The Date property. - * + * * @param date the date value to set. * @return the BlobsCreateSnapshotHeaders object itself. */ diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobsDeleteHeaders.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobsDeleteHeaders.java index a847a8f928bf..f1e9bec034ee 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobsDeleteHeaders.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobsDeleteHeaders.java @@ -4,17 +4,17 @@ package com.azure.v2.storage.blob.models; -import com.azure.v2.core.annotation.Fluent; +import io.clientcore.core.annotations.Metadata; +import io.clientcore.core.annotations.TypeConditions; import io.clientcore.core.http.models.HttpHeaderName; import io.clientcore.core.http.models.HttpHeaders; -import io.clientcore.core.util.DateTimeRfc1123; - +import io.clientcore.core.utils.DateTimeRfc1123; import java.time.OffsetDateTime; /** * The BlobsDeleteHeaders model. */ -@Fluent +@Metadata(conditions = { TypeConditions.FLUENT }) public final class BlobsDeleteHeaders { /* * The x-ms-version property. @@ -38,16 +38,20 @@ public final class BlobsDeleteHeaders { private static final HttpHeaderName X_MS_VERSION = HttpHeaderName.fromString("x-ms-version"); + private static final HttpHeaderName X_MS_REQUEST_ID = HttpHeaderName.fromString("x-ms-request-id"); + + private static final HttpHeaderName X_MS_CLIENT_REQUEST_ID = HttpHeaderName.fromString("x-ms-client-request-id"); + // HttpHeaders containing the raw property values. /** * Creates an instance of BlobsDeleteHeaders class. - * + * * @param rawHeaders The raw HttpHeaders that will be used to create the property values. */ public BlobsDeleteHeaders(HttpHeaders rawHeaders) { this.xMsVersion = rawHeaders.getValue(X_MS_VERSION); - this.xMsRequestId = rawHeaders.getValue(HttpHeaderName.fromString("x-ms-request-id")); - this.xMsClientRequestId = rawHeaders.getValue(HttpHeaderName.fromString("x-ms-client-request-id")); + this.xMsRequestId = rawHeaders.getValue(X_MS_REQUEST_ID); + this.xMsClientRequestId = rawHeaders.getValue(X_MS_CLIENT_REQUEST_ID); String date = rawHeaders.getValue(HttpHeaderName.DATE); if (date != null) { this.date = new DateTimeRfc1123(date); @@ -56,7 +60,7 @@ public BlobsDeleteHeaders(HttpHeaders rawHeaders) { /** * Get the xMsVersion property: The x-ms-version property. - * + * * @return the xMsVersion value. */ public String getXMsVersion() { @@ -65,7 +69,7 @@ public String getXMsVersion() { /** * Set the xMsVersion property: The x-ms-version property. - * + * * @param xMsVersion the xMsVersion value to set. * @return the BlobsDeleteHeaders object itself. */ @@ -76,7 +80,7 @@ public BlobsDeleteHeaders setXMsVersion(String xMsVersion) { /** * Get the xMsRequestId property: The x-ms-request-id property. - * + * * @return the xMsRequestId value. */ public String getXMsRequestId() { @@ -85,7 +89,7 @@ public String getXMsRequestId() { /** * Set the xMsRequestId property: The x-ms-request-id property. - * + * * @param xMsRequestId the xMsRequestId value to set. * @return the BlobsDeleteHeaders object itself. */ @@ -96,7 +100,7 @@ public BlobsDeleteHeaders setXMsRequestId(String xMsRequestId) { /** * Get the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @return the xMsClientRequestId value. */ public String getXMsClientRequestId() { @@ -105,7 +109,7 @@ public String getXMsClientRequestId() { /** * Set the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @param xMsClientRequestId the xMsClientRequestId value to set. * @return the BlobsDeleteHeaders object itself. */ @@ -116,7 +120,7 @@ public BlobsDeleteHeaders setXMsClientRequestId(String xMsClientRequestId) { /** * Get the date property: The Date property. - * + * * @return the date value. */ public OffsetDateTime getDate() { @@ -128,7 +132,7 @@ public OffsetDateTime getDate() { /** * Set the date property: The Date property. - * + * * @param date the date value to set. * @return the BlobsDeleteHeaders object itself. */ diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobsDeleteImmutabilityPolicyHeaders.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobsDeleteImmutabilityPolicyHeaders.java index d91861a03e98..2a145ead2391 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobsDeleteImmutabilityPolicyHeaders.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobsDeleteImmutabilityPolicyHeaders.java @@ -4,17 +4,17 @@ package com.azure.v2.storage.blob.models; -import com.azure.v2.core.annotation.Fluent; +import io.clientcore.core.annotations.Metadata; +import io.clientcore.core.annotations.TypeConditions; import io.clientcore.core.http.models.HttpHeaderName; import io.clientcore.core.http.models.HttpHeaders; -import io.clientcore.core.util.DateTimeRfc1123; - +import io.clientcore.core.utils.DateTimeRfc1123; import java.time.OffsetDateTime; /** * The BlobsDeleteImmutabilityPolicyHeaders model. */ -@Fluent +@Metadata(conditions = { TypeConditions.FLUENT }) public final class BlobsDeleteImmutabilityPolicyHeaders { /* * The x-ms-version property. @@ -38,16 +38,20 @@ public final class BlobsDeleteImmutabilityPolicyHeaders { private static final HttpHeaderName X_MS_VERSION = HttpHeaderName.fromString("x-ms-version"); + private static final HttpHeaderName X_MS_REQUEST_ID = HttpHeaderName.fromString("x-ms-request-id"); + + private static final HttpHeaderName X_MS_CLIENT_REQUEST_ID = HttpHeaderName.fromString("x-ms-client-request-id"); + // HttpHeaders containing the raw property values. /** * Creates an instance of BlobsDeleteImmutabilityPolicyHeaders class. - * + * * @param rawHeaders The raw HttpHeaders that will be used to create the property values. */ public BlobsDeleteImmutabilityPolicyHeaders(HttpHeaders rawHeaders) { this.xMsVersion = rawHeaders.getValue(X_MS_VERSION); - this.xMsRequestId = rawHeaders.getValue(HttpHeaderName.fromString("x-ms-request-id")); - this.xMsClientRequestId = rawHeaders.getValue(HttpHeaderName.fromString("x-ms-client-request-id")); + this.xMsRequestId = rawHeaders.getValue(X_MS_REQUEST_ID); + this.xMsClientRequestId = rawHeaders.getValue(X_MS_CLIENT_REQUEST_ID); String date = rawHeaders.getValue(HttpHeaderName.DATE); if (date != null) { this.date = new DateTimeRfc1123(date); @@ -56,7 +60,7 @@ public BlobsDeleteImmutabilityPolicyHeaders(HttpHeaders rawHeaders) { /** * Get the xMsVersion property: The x-ms-version property. - * + * * @return the xMsVersion value. */ public String getXMsVersion() { @@ -65,7 +69,7 @@ public String getXMsVersion() { /** * Set the xMsVersion property: The x-ms-version property. - * + * * @param xMsVersion the xMsVersion value to set. * @return the BlobsDeleteImmutabilityPolicyHeaders object itself. */ @@ -76,7 +80,7 @@ public BlobsDeleteImmutabilityPolicyHeaders setXMsVersion(String xMsVersion) { /** * Get the xMsRequestId property: The x-ms-request-id property. - * + * * @return the xMsRequestId value. */ public String getXMsRequestId() { @@ -85,7 +89,7 @@ public String getXMsRequestId() { /** * Set the xMsRequestId property: The x-ms-request-id property. - * + * * @param xMsRequestId the xMsRequestId value to set. * @return the BlobsDeleteImmutabilityPolicyHeaders object itself. */ @@ -96,7 +100,7 @@ public BlobsDeleteImmutabilityPolicyHeaders setXMsRequestId(String xMsRequestId) /** * Get the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @return the xMsClientRequestId value. */ public String getXMsClientRequestId() { @@ -105,7 +109,7 @@ public String getXMsClientRequestId() { /** * Set the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @param xMsClientRequestId the xMsClientRequestId value to set. * @return the BlobsDeleteImmutabilityPolicyHeaders object itself. */ @@ -116,7 +120,7 @@ public BlobsDeleteImmutabilityPolicyHeaders setXMsClientRequestId(String xMsClie /** * Get the date property: The Date property. - * + * * @return the date value. */ public OffsetDateTime getDate() { @@ -128,7 +132,7 @@ public OffsetDateTime getDate() { /** * Set the date property: The Date property. - * + * * @param date the date value to set. * @return the BlobsDeleteImmutabilityPolicyHeaders object itself. */ diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobsDownloadHeaders.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobsDownloadHeaders.java index 088924b94faf..ce9f856b5441 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobsDownloadHeaders.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobsDownloadHeaders.java @@ -4,22 +4,20 @@ package com.azure.v2.storage.blob.models; -import com.azure.v2.core.annotation.Fluent; -import com.azure.v2.core.util.CoreUtils; -import io.clientcore.core.http.models.HttpHeader; +import io.clientcore.core.annotations.Metadata; +import io.clientcore.core.annotations.TypeConditions; import io.clientcore.core.http.models.HttpHeaderName; import io.clientcore.core.http.models.HttpHeaders; -import io.clientcore.core.util.DateTimeRfc1123; - +import io.clientcore.core.utils.DateTimeRfc1123; import java.time.OffsetDateTime; import java.util.Base64; -import java.util.HashMap; +import java.util.LinkedHashMap; import java.util.Map; /** * The BlobsDownloadHeaders model. */ -@Fluent +@Metadata(conditions = { TypeConditions.FLUENT }) public final class BlobsDownloadHeaders { /* * The x-ms-is-current-version property. @@ -283,6 +281,8 @@ public final class BlobsDownloadHeaders { private static final HttpHeaderName X_MS_LEASE_DURATION = HttpHeaderName.fromString("x-ms-lease-duration"); + private static final HttpHeaderName X_MS_REQUEST_ID = HttpHeaderName.fromString("x-ms-request-id"); + private static final HttpHeaderName X_MS_LAST_ACCESS_TIME = HttpHeaderName.fromString("x-ms-last-access-time"); private static final HttpHeaderName X_MS_VERSION = HttpHeaderName.fromString("x-ms-version"); @@ -317,12 +317,14 @@ public final class BlobsDownloadHeaders { private static final HttpHeaderName X_MS_COPY_STATUS = HttpHeaderName.fromString("x-ms-copy-status"); + private static final HttpHeaderName X_MS_CLIENT_REQUEST_ID = HttpHeaderName.fromString("x-ms-client-request-id"); + private static final HttpHeaderName X_MS_ENCRYPTION_SCOPE = HttpHeaderName.fromString("x-ms-encryption-scope"); // HttpHeaders containing the raw property values. /** * Creates an instance of BlobsDownloadHeaders class. - * + * * @param rawHeaders The raw HttpHeaders that will be used to create the property values. */ public BlobsDownloadHeaders(HttpHeaders rawHeaders) { @@ -377,7 +379,7 @@ public BlobsDownloadHeaders(HttpHeaders rawHeaders) { if (contentLength != null) { this.contentLength = Long.parseLong(contentLength); } - this.xMsRequestId = rawHeaders.getValue(HttpHeaderName.fromString("x-ms-request-id")); + this.xMsRequestId = rawHeaders.getValue(X_MS_REQUEST_ID); this.contentType = rawHeaders.getValue(HttpHeaderName.CONTENT_TYPE); String xMsLastAccessTime = rawHeaders.getValue(X_MS_LAST_ACCESS_TIME); if (xMsLastAccessTime != null) { @@ -437,29 +439,28 @@ public BlobsDownloadHeaders(HttpHeaders rawHeaders) { this.xMsCopyStatus = CopyStatusType.fromString(xMsCopyStatus); } this.contentLanguage = rawHeaders.getValue(HttpHeaderName.CONTENT_LANGUAGE); - this.xMsClientRequestId = rawHeaders.getValue(HttpHeaderName.fromString("x-ms-client-request-id")); + this.xMsClientRequestId = rawHeaders.getValue(X_MS_CLIENT_REQUEST_ID); this.xMsEncryptionScope = rawHeaders.getValue(X_MS_ENCRYPTION_SCOPE); - Map xMsMetaHeaderCollection = new HashMap<>(); - Map xMsOrHeaderCollection = new HashMap<>(); + Map xMsMetaHeaderCollection = new LinkedHashMap<>(); + Map xMsOrHeaderCollection = new LinkedHashMap<>(); - for (HttpHeader header : rawHeaders) { - String headerName = header.getValue(); + rawHeaders.stream().forEach(header -> { + String headerName = header.getName().getValue(); if (headerName.startsWith("x-ms-meta-")) { xMsMetaHeaderCollection.put(headerName.substring(10), header.getValue()); - continue; + return; } if (headerName.startsWith("x-ms-or-")) { xMsOrHeaderCollection.put(headerName.substring(8), header.getValue()); } - } - + }); this.xMsMeta = xMsMetaHeaderCollection; this.xMsOr = xMsOrHeaderCollection; } /** * Get the xMsIsCurrentVersion property: The x-ms-is-current-version property. - * + * * @return the xMsIsCurrentVersion value. */ public Boolean isXMsIsCurrentVersion() { @@ -468,7 +469,7 @@ public Boolean isXMsIsCurrentVersion() { /** * Set the xMsIsCurrentVersion property: The x-ms-is-current-version property. - * + * * @param xMsIsCurrentVersion the xMsIsCurrentVersion value to set. * @return the BlobsDownloadHeaders object itself. */ @@ -479,7 +480,7 @@ public BlobsDownloadHeaders setXMsIsCurrentVersion(Boolean xMsIsCurrentVersion) /** * Get the xMsLeaseStatus property: The x-ms-lease-status property. - * + * * @return the xMsLeaseStatus value. */ public LeaseStatusType getXMsLeaseStatus() { @@ -488,7 +489,7 @@ public LeaseStatusType getXMsLeaseStatus() { /** * Set the xMsLeaseStatus property: The x-ms-lease-status property. - * + * * @param xMsLeaseStatus the xMsLeaseStatus value to set. * @return the BlobsDownloadHeaders object itself. */ @@ -499,7 +500,7 @@ public BlobsDownloadHeaders setXMsLeaseStatus(LeaseStatusType xMsLeaseStatus) { /** * Get the xMsTagCount property: The x-ms-tag-count property. - * + * * @return the xMsTagCount value. */ public Long getXMsTagCount() { @@ -508,7 +509,7 @@ public Long getXMsTagCount() { /** * Set the xMsTagCount property: The x-ms-tag-count property. - * + * * @param xMsTagCount the xMsTagCount value to set. * @return the BlobsDownloadHeaders object itself. */ @@ -519,7 +520,7 @@ public BlobsDownloadHeaders setXMsTagCount(Long xMsTagCount) { /** * Get the contentRange property: The Content-Range property. - * + * * @return the contentRange value. */ public String getContentRange() { @@ -528,7 +529,7 @@ public String getContentRange() { /** * Set the contentRange property: The Content-Range property. - * + * * @param contentRange the contentRange value to set. * @return the BlobsDownloadHeaders object itself. */ @@ -539,7 +540,7 @@ public BlobsDownloadHeaders setContentRange(String contentRange) { /** * Get the xMsLeaseState property: The x-ms-lease-state property. - * + * * @return the xMsLeaseState value. */ public LeaseStateType getXMsLeaseState() { @@ -548,7 +549,7 @@ public LeaseStateType getXMsLeaseState() { /** * Set the xMsLeaseState property: The x-ms-lease-state property. - * + * * @param xMsLeaseState the xMsLeaseState value to set. * @return the BlobsDownloadHeaders object itself. */ @@ -559,7 +560,7 @@ public BlobsDownloadHeaders setXMsLeaseState(LeaseStateType xMsLeaseState) { /** * Get the xMsBlobSealed property: The x-ms-blob-sealed property. - * + * * @return the xMsBlobSealed value. */ public Boolean isXMsBlobSealed() { @@ -568,7 +569,7 @@ public Boolean isXMsBlobSealed() { /** * Set the xMsBlobSealed property: The x-ms-blob-sealed property. - * + * * @param xMsBlobSealed the xMsBlobSealed value to set. * @return the BlobsDownloadHeaders object itself. */ @@ -579,7 +580,7 @@ public BlobsDownloadHeaders setXMsBlobSealed(Boolean xMsBlobSealed) { /** * Get the lastModified property: The Last-Modified property. - * + * * @return the lastModified value. */ public OffsetDateTime getLastModified() { @@ -591,7 +592,7 @@ public OffsetDateTime getLastModified() { /** * Set the lastModified property: The Last-Modified property. - * + * * @param lastModified the lastModified value to set. * @return the BlobsDownloadHeaders object itself. */ @@ -606,7 +607,7 @@ public BlobsDownloadHeaders setLastModified(OffsetDateTime lastModified) { /** * Get the xMsVersionId property: The x-ms-version-id property. - * + * * @return the xMsVersionId value. */ public String getXMsVersionId() { @@ -615,7 +616,7 @@ public String getXMsVersionId() { /** * Set the xMsVersionId property: The x-ms-version-id property. - * + * * @param xMsVersionId the xMsVersionId value to set. * @return the BlobsDownloadHeaders object itself. */ @@ -626,7 +627,7 @@ public BlobsDownloadHeaders setXMsVersionId(String xMsVersionId) { /** * Get the xMsEncryptionKeySha256 property: The x-ms-encryption-key-sha256 property. - * + * * @return the xMsEncryptionKeySha256 value. */ public String getXMsEncryptionKeySha256() { @@ -635,7 +636,7 @@ public String getXMsEncryptionKeySha256() { /** * Set the xMsEncryptionKeySha256 property: The x-ms-encryption-key-sha256 property. - * + * * @param xMsEncryptionKeySha256 the xMsEncryptionKeySha256 value to set. * @return the BlobsDownloadHeaders object itself. */ @@ -646,7 +647,7 @@ public BlobsDownloadHeaders setXMsEncryptionKeySha256(String xMsEncryptionKeySha /** * Get the xMsStructuredBody property: The x-ms-structured-body property. - * + * * @return the xMsStructuredBody value. */ public String getXMsStructuredBody() { @@ -655,7 +656,7 @@ public String getXMsStructuredBody() { /** * Set the xMsStructuredBody property: The x-ms-structured-body property. - * + * * @param xMsStructuredBody the xMsStructuredBody value to set. * @return the BlobsDownloadHeaders object itself. */ @@ -666,7 +667,7 @@ public BlobsDownloadHeaders setXMsStructuredBody(String xMsStructuredBody) { /** * Get the xMsBlobType property: The x-ms-blob-type property. - * + * * @return the xMsBlobType value. */ public BlobType getXMsBlobType() { @@ -675,7 +676,7 @@ public BlobType getXMsBlobType() { /** * Set the xMsBlobType property: The x-ms-blob-type property. - * + * * @param xMsBlobType the xMsBlobType value to set. * @return the BlobsDownloadHeaders object itself. */ @@ -686,7 +687,7 @@ public BlobsDownloadHeaders setXMsBlobType(BlobType xMsBlobType) { /** * Get the xMsImmutabilityPolicyMode property: The x-ms-immutability-policy-mode property. - * + * * @return the xMsImmutabilityPolicyMode value. */ public String getXMsImmutabilityPolicyMode() { @@ -695,7 +696,7 @@ public String getXMsImmutabilityPolicyMode() { /** * Set the xMsImmutabilityPolicyMode property: The x-ms-immutability-policy-mode property. - * + * * @param xMsImmutabilityPolicyMode the xMsImmutabilityPolicyMode value to set. * @return the BlobsDownloadHeaders object itself. */ @@ -706,7 +707,7 @@ public BlobsDownloadHeaders setXMsImmutabilityPolicyMode(String xMsImmutabilityP /** * Get the xMsStructuredContentLength property: The x-ms-structured-content-length property. - * + * * @return the xMsStructuredContentLength value. */ public Long getXMsStructuredContentLength() { @@ -715,7 +716,7 @@ public Long getXMsStructuredContentLength() { /** * Set the xMsStructuredContentLength property: The x-ms-structured-content-length property. - * + * * @param xMsStructuredContentLength the xMsStructuredContentLength value to set. * @return the BlobsDownloadHeaders object itself. */ @@ -726,7 +727,7 @@ public BlobsDownloadHeaders setXMsStructuredContentLength(Long xMsStructuredCont /** * Get the contentEncoding property: The Content-Encoding property. - * + * * @return the contentEncoding value. */ public String getContentEncoding() { @@ -735,7 +736,7 @@ public String getContentEncoding() { /** * Set the contentEncoding property: The Content-Encoding property. - * + * * @param contentEncoding the contentEncoding value to set. * @return the BlobsDownloadHeaders object itself. */ @@ -746,7 +747,7 @@ public BlobsDownloadHeaders setContentEncoding(String contentEncoding) { /** * Get the xMsCopyStatusDescription property: The x-ms-copy-status-description property. - * + * * @return the xMsCopyStatusDescription value. */ public String getXMsCopyStatusDescription() { @@ -755,7 +756,7 @@ public String getXMsCopyStatusDescription() { /** * Set the xMsCopyStatusDescription property: The x-ms-copy-status-description property. - * + * * @param xMsCopyStatusDescription the xMsCopyStatusDescription value to set. * @return the BlobsDownloadHeaders object itself. */ @@ -766,7 +767,7 @@ public BlobsDownloadHeaders setXMsCopyStatusDescription(String xMsCopyStatusDesc /** * Get the xMsCreationTime property: The x-ms-creation-time property. - * + * * @return the xMsCreationTime value. */ public OffsetDateTime getXMsCreationTime() { @@ -778,7 +779,7 @@ public OffsetDateTime getXMsCreationTime() { /** * Set the xMsCreationTime property: The x-ms-creation-time property. - * + * * @param xMsCreationTime the xMsCreationTime value to set. * @return the BlobsDownloadHeaders object itself. */ @@ -793,7 +794,7 @@ public BlobsDownloadHeaders setXMsCreationTime(OffsetDateTime xMsCreationTime) { /** * Get the xMsLeaseDuration property: The x-ms-lease-duration property. - * + * * @return the xMsLeaseDuration value. */ public LeaseDurationType getXMsLeaseDuration() { @@ -802,7 +803,7 @@ public LeaseDurationType getXMsLeaseDuration() { /** * Set the xMsLeaseDuration property: The x-ms-lease-duration property. - * + * * @param xMsLeaseDuration the xMsLeaseDuration value to set. * @return the BlobsDownloadHeaders object itself. */ @@ -813,7 +814,7 @@ public BlobsDownloadHeaders setXMsLeaseDuration(LeaseDurationType xMsLeaseDurati /** * Get the contentLength property: The Content-Length property. - * + * * @return the contentLength value. */ public Long getContentLength() { @@ -822,7 +823,7 @@ public Long getContentLength() { /** * Set the contentLength property: The Content-Length property. - * + * * @param contentLength the contentLength value to set. * @return the BlobsDownloadHeaders object itself. */ @@ -833,7 +834,7 @@ public BlobsDownloadHeaders setContentLength(Long contentLength) { /** * Get the xMsRequestId property: The x-ms-request-id property. - * + * * @return the xMsRequestId value. */ public String getXMsRequestId() { @@ -842,7 +843,7 @@ public String getXMsRequestId() { /** * Set the xMsRequestId property: The x-ms-request-id property. - * + * * @param xMsRequestId the xMsRequestId value to set. * @return the BlobsDownloadHeaders object itself. */ @@ -853,7 +854,7 @@ public BlobsDownloadHeaders setXMsRequestId(String xMsRequestId) { /** * Get the contentType property: The Content-Type property. - * + * * @return the contentType value. */ public String getContentType() { @@ -862,7 +863,7 @@ public String getContentType() { /** * Set the contentType property: The Content-Type property. - * + * * @param contentType the contentType value to set. * @return the BlobsDownloadHeaders object itself. */ @@ -873,7 +874,7 @@ public BlobsDownloadHeaders setContentType(String contentType) { /** * Get the xMsLastAccessTime property: The x-ms-last-access-time property. - * + * * @return the xMsLastAccessTime value. */ public OffsetDateTime getXMsLastAccessTime() { @@ -885,7 +886,7 @@ public OffsetDateTime getXMsLastAccessTime() { /** * Set the xMsLastAccessTime property: The x-ms-last-access-time property. - * + * * @param xMsLastAccessTime the xMsLastAccessTime value to set. * @return the BlobsDownloadHeaders object itself. */ @@ -900,7 +901,7 @@ public BlobsDownloadHeaders setXMsLastAccessTime(OffsetDateTime xMsLastAccessTim /** * Get the xMsVersion property: The x-ms-version property. - * + * * @return the xMsVersion value. */ public String getXMsVersion() { @@ -909,7 +910,7 @@ public String getXMsVersion() { /** * Set the xMsVersion property: The x-ms-version property. - * + * * @param xMsVersion the xMsVersion value to set. * @return the BlobsDownloadHeaders object itself. */ @@ -920,7 +921,7 @@ public BlobsDownloadHeaders setXMsVersion(String xMsVersion) { /** * Get the xMsCopyId property: The x-ms-copy-id property. - * + * * @return the xMsCopyId value. */ public String getXMsCopyId() { @@ -929,7 +930,7 @@ public String getXMsCopyId() { /** * Set the xMsCopyId property: The x-ms-copy-id property. - * + * * @param xMsCopyId the xMsCopyId value to set. * @return the BlobsDownloadHeaders object itself. */ @@ -940,7 +941,7 @@ public BlobsDownloadHeaders setXMsCopyId(String xMsCopyId) { /** * Get the xMsCopySource property: The x-ms-copy-source property. - * + * * @return the xMsCopySource value. */ public String getXMsCopySource() { @@ -949,7 +950,7 @@ public String getXMsCopySource() { /** * Set the xMsCopySource property: The x-ms-copy-source property. - * + * * @param xMsCopySource the xMsCopySource value to set. * @return the BlobsDownloadHeaders object itself. */ @@ -960,7 +961,7 @@ public BlobsDownloadHeaders setXMsCopySource(String xMsCopySource) { /** * Get the xMsImmutabilityPolicyUntilDate property: The x-ms-immutability-policy-until-date property. - * + * * @return the xMsImmutabilityPolicyUntilDate value. */ public OffsetDateTime getXMsImmutabilityPolicyUntilDate() { @@ -972,7 +973,7 @@ public OffsetDateTime getXMsImmutabilityPolicyUntilDate() { /** * Set the xMsImmutabilityPolicyUntilDate property: The x-ms-immutability-policy-until-date property. - * + * * @param xMsImmutabilityPolicyUntilDate the xMsImmutabilityPolicyUntilDate value to set. * @return the BlobsDownloadHeaders object itself. */ @@ -987,27 +988,27 @@ public BlobsDownloadHeaders setXMsImmutabilityPolicyUntilDate(OffsetDateTime xMs /** * Get the xMsContentCrc64 property: The x-ms-content-crc64 property. - * + * * @return the xMsContentCrc64 value. */ public byte[] getXMsContentCrc64() { - return CoreUtils.clone(this.xMsContentCrc64); + return this.xMsContentCrc64; } /** * Set the xMsContentCrc64 property: The x-ms-content-crc64 property. - * + * * @param xMsContentCrc64 the xMsContentCrc64 value to set. * @return the BlobsDownloadHeaders object itself. */ public BlobsDownloadHeaders setXMsContentCrc64(byte[] xMsContentCrc64) { - this.xMsContentCrc64 = CoreUtils.clone(xMsContentCrc64); + this.xMsContentCrc64 = xMsContentCrc64; return this; } /** * Get the xMsBlobSequenceNumber property: The x-ms-blob-sequence-number property. - * + * * @return the xMsBlobSequenceNumber value. */ public Long getXMsBlobSequenceNumber() { @@ -1016,7 +1017,7 @@ public Long getXMsBlobSequenceNumber() { /** * Set the xMsBlobSequenceNumber property: The x-ms-blob-sequence-number property. - * + * * @param xMsBlobSequenceNumber the xMsBlobSequenceNumber value to set. * @return the BlobsDownloadHeaders object itself. */ @@ -1027,7 +1028,7 @@ public BlobsDownloadHeaders setXMsBlobSequenceNumber(Long xMsBlobSequenceNumber) /** * Get the xMsCopyProgress property: The x-ms-copy-progress property. - * + * * @return the xMsCopyProgress value. */ public String getXMsCopyProgress() { @@ -1036,7 +1037,7 @@ public String getXMsCopyProgress() { /** * Set the xMsCopyProgress property: The x-ms-copy-progress property. - * + * * @param xMsCopyProgress the xMsCopyProgress value to set. * @return the BlobsDownloadHeaders object itself. */ @@ -1047,7 +1048,7 @@ public BlobsDownloadHeaders setXMsCopyProgress(String xMsCopyProgress) { /** * Get the xMsBlobCommittedBlockCount property: The x-ms-blob-committed-block-count property. - * + * * @return the xMsBlobCommittedBlockCount value. */ public Integer getXMsBlobCommittedBlockCount() { @@ -1056,7 +1057,7 @@ public Integer getXMsBlobCommittedBlockCount() { /** * Set the xMsBlobCommittedBlockCount property: The x-ms-blob-committed-block-count property. - * + * * @param xMsBlobCommittedBlockCount the xMsBlobCommittedBlockCount value to set. * @return the BlobsDownloadHeaders object itself. */ @@ -1067,27 +1068,27 @@ public BlobsDownloadHeaders setXMsBlobCommittedBlockCount(Integer xMsBlobCommitt /** * Get the xMsBlobContentMd5 property: The x-ms-blob-content-md5 property. - * + * * @return the xMsBlobContentMd5 value. */ public byte[] getXMsBlobContentMd5() { - return CoreUtils.clone(this.xMsBlobContentMd5); + return this.xMsBlobContentMd5; } /** * Set the xMsBlobContentMd5 property: The x-ms-blob-content-md5 property. - * + * * @param xMsBlobContentMd5 the xMsBlobContentMd5 value to set. * @return the BlobsDownloadHeaders object itself. */ public BlobsDownloadHeaders setXMsBlobContentMd5(byte[] xMsBlobContentMd5) { - this.xMsBlobContentMd5 = CoreUtils.clone(xMsBlobContentMd5); + this.xMsBlobContentMd5 = xMsBlobContentMd5; return this; } /** * Get the xMsMeta property: The x-ms-meta- property. - * + * * @return the xMsMeta value. */ public Map getXMsMeta() { @@ -1096,7 +1097,7 @@ public Map getXMsMeta() { /** * Set the xMsMeta property: The x-ms-meta- property. - * + * * @param xMsMeta the xMsMeta value to set. * @return the BlobsDownloadHeaders object itself. */ @@ -1107,7 +1108,7 @@ public BlobsDownloadHeaders setXMsMeta(Map xMsMeta) { /** * Get the xMsLegalHold property: The x-ms-legal-hold property. - * + * * @return the xMsLegalHold value. */ public Boolean isXMsLegalHold() { @@ -1116,7 +1117,7 @@ public Boolean isXMsLegalHold() { /** * Set the xMsLegalHold property: The x-ms-legal-hold property. - * + * * @param xMsLegalHold the xMsLegalHold value to set. * @return the BlobsDownloadHeaders object itself. */ @@ -1127,7 +1128,7 @@ public BlobsDownloadHeaders setXMsLegalHold(Boolean xMsLegalHold) { /** * Get the date property: The Date property. - * + * * @return the date value. */ public OffsetDateTime getDate() { @@ -1139,7 +1140,7 @@ public OffsetDateTime getDate() { /** * Set the date property: The Date property. - * + * * @param date the date value to set. * @return the BlobsDownloadHeaders object itself. */ @@ -1154,27 +1155,27 @@ public BlobsDownloadHeaders setDate(OffsetDateTime date) { /** * Get the contentMD5 property: The Content-MD5 property. - * + * * @return the contentMD5 value. */ public byte[] getContentMD5() { - return CoreUtils.clone(this.contentMD5); + return this.contentMD5; } /** * Set the contentMD5 property: The Content-MD5 property. - * + * * @param contentMD5 the contentMD5 value to set. * @return the BlobsDownloadHeaders object itself. */ public BlobsDownloadHeaders setContentMD5(byte[] contentMD5) { - this.contentMD5 = CoreUtils.clone(contentMD5); + this.contentMD5 = contentMD5; return this; } /** * Get the xMsCopyCompletionTime property: The x-ms-copy-completion-time property. - * + * * @return the xMsCopyCompletionTime value. */ public OffsetDateTime getXMsCopyCompletionTime() { @@ -1186,7 +1187,7 @@ public OffsetDateTime getXMsCopyCompletionTime() { /** * Set the xMsCopyCompletionTime property: The x-ms-copy-completion-time property. - * + * * @param xMsCopyCompletionTime the xMsCopyCompletionTime value to set. * @return the BlobsDownloadHeaders object itself. */ @@ -1201,7 +1202,7 @@ public BlobsDownloadHeaders setXMsCopyCompletionTime(OffsetDateTime xMsCopyCompl /** * Get the acceptRanges property: The Accept-Ranges property. - * + * * @return the acceptRanges value. */ public String getAcceptRanges() { @@ -1210,7 +1211,7 @@ public String getAcceptRanges() { /** * Set the acceptRanges property: The Accept-Ranges property. - * + * * @param acceptRanges the acceptRanges value to set. * @return the BlobsDownloadHeaders object itself. */ @@ -1221,7 +1222,7 @@ public BlobsDownloadHeaders setAcceptRanges(String acceptRanges) { /** * Get the xMsServerEncrypted property: The x-ms-server-encrypted property. - * + * * @return the xMsServerEncrypted value. */ public Boolean isXMsServerEncrypted() { @@ -1230,7 +1231,7 @@ public Boolean isXMsServerEncrypted() { /** * Set the xMsServerEncrypted property: The x-ms-server-encrypted property. - * + * * @param xMsServerEncrypted the xMsServerEncrypted value to set. * @return the BlobsDownloadHeaders object itself. */ @@ -1241,7 +1242,7 @@ public BlobsDownloadHeaders setXMsServerEncrypted(Boolean xMsServerEncrypted) { /** * Get the xMsOrPolicyId property: The x-ms-or-policy-id property. - * + * * @return the xMsOrPolicyId value. */ public String getXMsOrPolicyId() { @@ -1250,7 +1251,7 @@ public String getXMsOrPolicyId() { /** * Set the xMsOrPolicyId property: The x-ms-or-policy-id property. - * + * * @param xMsOrPolicyId the xMsOrPolicyId value to set. * @return the BlobsDownloadHeaders object itself. */ @@ -1261,7 +1262,7 @@ public BlobsDownloadHeaders setXMsOrPolicyId(String xMsOrPolicyId) { /** * Get the cacheControl property: The Cache-Control property. - * + * * @return the cacheControl value. */ public String getCacheControl() { @@ -1270,7 +1271,7 @@ public String getCacheControl() { /** * Set the cacheControl property: The Cache-Control property. - * + * * @param cacheControl the cacheControl value to set. * @return the BlobsDownloadHeaders object itself. */ @@ -1281,7 +1282,7 @@ public BlobsDownloadHeaders setCacheControl(String cacheControl) { /** * Get the eTag property: The ETag property. - * + * * @return the eTag value. */ public String getETag() { @@ -1290,7 +1291,7 @@ public String getETag() { /** * Set the eTag property: The ETag property. - * + * * @param eTag the eTag value to set. * @return the BlobsDownloadHeaders object itself. */ @@ -1301,7 +1302,7 @@ public BlobsDownloadHeaders setETag(String eTag) { /** * Get the contentDisposition property: The Content-Disposition property. - * + * * @return the contentDisposition value. */ public String getContentDisposition() { @@ -1310,7 +1311,7 @@ public String getContentDisposition() { /** * Set the contentDisposition property: The Content-Disposition property. - * + * * @param contentDisposition the contentDisposition value to set. * @return the BlobsDownloadHeaders object itself. */ @@ -1321,7 +1322,7 @@ public BlobsDownloadHeaders setContentDisposition(String contentDisposition) { /** * Get the xMsCopyStatus property: The x-ms-copy-status property. - * + * * @return the xMsCopyStatus value. */ public CopyStatusType getXMsCopyStatus() { @@ -1330,7 +1331,7 @@ public CopyStatusType getXMsCopyStatus() { /** * Set the xMsCopyStatus property: The x-ms-copy-status property. - * + * * @param xMsCopyStatus the xMsCopyStatus value to set. * @return the BlobsDownloadHeaders object itself. */ @@ -1341,7 +1342,7 @@ public BlobsDownloadHeaders setXMsCopyStatus(CopyStatusType xMsCopyStatus) { /** * Get the contentLanguage property: The Content-Language property. - * + * * @return the contentLanguage value. */ public String getContentLanguage() { @@ -1350,7 +1351,7 @@ public String getContentLanguage() { /** * Set the contentLanguage property: The Content-Language property. - * + * * @param contentLanguage the contentLanguage value to set. * @return the BlobsDownloadHeaders object itself. */ @@ -1361,7 +1362,7 @@ public BlobsDownloadHeaders setContentLanguage(String contentLanguage) { /** * Get the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @return the xMsClientRequestId value. */ public String getXMsClientRequestId() { @@ -1370,7 +1371,7 @@ public String getXMsClientRequestId() { /** * Set the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @param xMsClientRequestId the xMsClientRequestId value to set. * @return the BlobsDownloadHeaders object itself. */ @@ -1381,7 +1382,7 @@ public BlobsDownloadHeaders setXMsClientRequestId(String xMsClientRequestId) { /** * Get the xMsOr property: The x-ms-or- property. - * + * * @return the xMsOr value. */ public Map getXMsOr() { @@ -1390,7 +1391,7 @@ public Map getXMsOr() { /** * Set the xMsOr property: The x-ms-or- property. - * + * * @param xMsOr the xMsOr value to set. * @return the BlobsDownloadHeaders object itself. */ @@ -1401,7 +1402,7 @@ public BlobsDownloadHeaders setXMsOr(Map xMsOr) { /** * Get the xMsEncryptionScope property: The x-ms-encryption-scope property. - * + * * @return the xMsEncryptionScope value. */ public String getXMsEncryptionScope() { @@ -1410,7 +1411,7 @@ public String getXMsEncryptionScope() { /** * Set the xMsEncryptionScope property: The x-ms-encryption-scope property. - * + * * @param xMsEncryptionScope the xMsEncryptionScope value to set. * @return the BlobsDownloadHeaders object itself. */ diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobsGetAccountInfoHeaders.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobsGetAccountInfoHeaders.java index b5ff2c35d745..c568884fc9ec 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobsGetAccountInfoHeaders.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobsGetAccountInfoHeaders.java @@ -4,17 +4,17 @@ package com.azure.v2.storage.blob.models; -import com.azure.v2.core.annotation.Fluent; +import io.clientcore.core.annotations.Metadata; +import io.clientcore.core.annotations.TypeConditions; import io.clientcore.core.http.models.HttpHeaderName; import io.clientcore.core.http.models.HttpHeaders; -import io.clientcore.core.util.DateTimeRfc1123; - +import io.clientcore.core.utils.DateTimeRfc1123; import java.time.OffsetDateTime; /** * The BlobsGetAccountInfoHeaders model. */ -@Fluent +@Metadata(conditions = { TypeConditions.FLUENT }) public final class BlobsGetAccountInfoHeaders { /* * The x-ms-version property. @@ -59,10 +59,14 @@ public final class BlobsGetAccountInfoHeaders { private static final HttpHeaderName X_MS_SKU_NAME = HttpHeaderName.fromString("x-ms-sku-name"); + private static final HttpHeaderName X_MS_REQUEST_ID = HttpHeaderName.fromString("x-ms-request-id"); + + private static final HttpHeaderName X_MS_CLIENT_REQUEST_ID = HttpHeaderName.fromString("x-ms-client-request-id"); + // HttpHeaders containing the raw property values. /** * Creates an instance of BlobsGetAccountInfoHeaders class. - * + * * @param rawHeaders The raw HttpHeaders that will be used to create the property values. */ public BlobsGetAccountInfoHeaders(HttpHeaders rawHeaders) { @@ -79,8 +83,8 @@ public BlobsGetAccountInfoHeaders(HttpHeaders rawHeaders) { if (xMsSkuName != null) { this.xMsSkuName = SkuName.fromString(xMsSkuName); } - this.xMsRequestId = rawHeaders.getValue(HttpHeaderName.fromString("x-ms-request-id")); - this.xMsClientRequestId = rawHeaders.getValue(HttpHeaderName.fromString("x-ms-client-request-id")); + this.xMsRequestId = rawHeaders.getValue(X_MS_REQUEST_ID); + this.xMsClientRequestId = rawHeaders.getValue(X_MS_CLIENT_REQUEST_ID); String date = rawHeaders.getValue(HttpHeaderName.DATE); if (date != null) { this.date = new DateTimeRfc1123(date); @@ -89,7 +93,7 @@ public BlobsGetAccountInfoHeaders(HttpHeaders rawHeaders) { /** * Get the xMsVersion property: The x-ms-version property. - * + * * @return the xMsVersion value. */ public String getXMsVersion() { @@ -98,7 +102,7 @@ public String getXMsVersion() { /** * Set the xMsVersion property: The x-ms-version property. - * + * * @param xMsVersion the xMsVersion value to set. * @return the BlobsGetAccountInfoHeaders object itself. */ @@ -109,7 +113,7 @@ public BlobsGetAccountInfoHeaders setXMsVersion(String xMsVersion) { /** * Get the xMsAccountKind property: The x-ms-account-kind property. - * + * * @return the xMsAccountKind value. */ public AccountKind getXMsAccountKind() { @@ -118,7 +122,7 @@ public AccountKind getXMsAccountKind() { /** * Set the xMsAccountKind property: The x-ms-account-kind property. - * + * * @param xMsAccountKind the xMsAccountKind value to set. * @return the BlobsGetAccountInfoHeaders object itself. */ @@ -129,7 +133,7 @@ public BlobsGetAccountInfoHeaders setXMsAccountKind(AccountKind xMsAccountKind) /** * Get the xMsIsHnsEnabled property: The x-ms-is-hns-enabled property. - * + * * @return the xMsIsHnsEnabled value. */ public Boolean isXMsIsHnsEnabled() { @@ -138,7 +142,7 @@ public Boolean isXMsIsHnsEnabled() { /** * Set the xMsIsHnsEnabled property: The x-ms-is-hns-enabled property. - * + * * @param xMsIsHnsEnabled the xMsIsHnsEnabled value to set. * @return the BlobsGetAccountInfoHeaders object itself. */ @@ -149,7 +153,7 @@ public BlobsGetAccountInfoHeaders setXMsIsHnsEnabled(Boolean xMsIsHnsEnabled) { /** * Get the xMsSkuName property: The x-ms-sku-name property. - * + * * @return the xMsSkuName value. */ public SkuName getXMsSkuName() { @@ -158,7 +162,7 @@ public SkuName getXMsSkuName() { /** * Set the xMsSkuName property: The x-ms-sku-name property. - * + * * @param xMsSkuName the xMsSkuName value to set. * @return the BlobsGetAccountInfoHeaders object itself. */ @@ -169,7 +173,7 @@ public BlobsGetAccountInfoHeaders setXMsSkuName(SkuName xMsSkuName) { /** * Get the xMsRequestId property: The x-ms-request-id property. - * + * * @return the xMsRequestId value. */ public String getXMsRequestId() { @@ -178,7 +182,7 @@ public String getXMsRequestId() { /** * Set the xMsRequestId property: The x-ms-request-id property. - * + * * @param xMsRequestId the xMsRequestId value to set. * @return the BlobsGetAccountInfoHeaders object itself. */ @@ -189,7 +193,7 @@ public BlobsGetAccountInfoHeaders setXMsRequestId(String xMsRequestId) { /** * Get the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @return the xMsClientRequestId value. */ public String getXMsClientRequestId() { @@ -198,7 +202,7 @@ public String getXMsClientRequestId() { /** * Set the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @param xMsClientRequestId the xMsClientRequestId value to set. * @return the BlobsGetAccountInfoHeaders object itself. */ @@ -209,7 +213,7 @@ public BlobsGetAccountInfoHeaders setXMsClientRequestId(String xMsClientRequestI /** * Get the date property: The Date property. - * + * * @return the date value. */ public OffsetDateTime getDate() { @@ -221,7 +225,7 @@ public OffsetDateTime getDate() { /** * Set the date property: The Date property. - * + * * @param date the date value to set. * @return the BlobsGetAccountInfoHeaders object itself. */ diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobsGetPropertiesHeaders.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobsGetPropertiesHeaders.java index 1c2ecc4ecbad..8a60c9a7d636 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobsGetPropertiesHeaders.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobsGetPropertiesHeaders.java @@ -4,22 +4,20 @@ package com.azure.v2.storage.blob.models; -import com.azure.v2.core.annotation.Fluent; -import com.azure.v2.core.util.CoreUtils; -import io.clientcore.core.http.models.HttpHeader; +import io.clientcore.core.annotations.Metadata; +import io.clientcore.core.annotations.TypeConditions; import io.clientcore.core.http.models.HttpHeaderName; import io.clientcore.core.http.models.HttpHeaders; -import io.clientcore.core.util.DateTimeRfc1123; - +import io.clientcore.core.utils.DateTimeRfc1123; import java.time.OffsetDateTime; import java.util.Base64; -import java.util.HashMap; +import java.util.LinkedHashMap; import java.util.Map; /** * The BlobsGetPropertiesHeaders model. */ -@Fluent +@Metadata(conditions = { TypeConditions.FLUENT }) public final class BlobsGetPropertiesHeaders { /* * The x-ms-is-current-version property. @@ -310,6 +308,8 @@ public final class BlobsGetPropertiesHeaders { private static final HttpHeaderName X_MS_OR_POLICY_ID = HttpHeaderName.fromString("x-ms-or-policy-id"); + private static final HttpHeaderName X_MS_CLIENT_REQUEST_ID = HttpHeaderName.fromString("x-ms-client-request-id"); + private static final HttpHeaderName X_MS_ENCRYPTION_SCOPE = HttpHeaderName.fromString("x-ms-encryption-scope"); private static final HttpHeaderName X_MS_TAG_COUNT = HttpHeaderName.fromString("x-ms-tag-count"); @@ -325,6 +325,8 @@ public final class BlobsGetPropertiesHeaders { private static final HttpHeaderName X_MS_COPY_STATUS_DESCRIPTION = HttpHeaderName.fromString("x-ms-copy-status-description"); + private static final HttpHeaderName X_MS_REQUEST_ID = HttpHeaderName.fromString("x-ms-request-id"); + private static final HttpHeaderName X_MS_LAST_ACCESS_TIME = HttpHeaderName.fromString("x-ms-last-access-time"); private static final HttpHeaderName X_MS_COPY_SOURCE = HttpHeaderName.fromString("x-ms-copy-source"); @@ -347,7 +349,7 @@ public final class BlobsGetPropertiesHeaders { // HttpHeaders containing the raw property values. /** * Creates an instance of BlobsGetPropertiesHeaders class. - * + * * @param rawHeaders The raw HttpHeaders that will be used to create the property values. */ public BlobsGetPropertiesHeaders(HttpHeaders rawHeaders) { @@ -418,7 +420,7 @@ public BlobsGetPropertiesHeaders(HttpHeaders rawHeaders) { this.eTag = rawHeaders.getValue(HttpHeaderName.ETAG); this.contentDisposition = rawHeaders.getValue(HttpHeaderName.CONTENT_DISPOSITION); this.contentLanguage = rawHeaders.getValue(HttpHeaderName.CONTENT_LANGUAGE); - this.xMsClientRequestId = rawHeaders.getValue(HttpHeaderName.fromString("x-ms-client-request-id")); + this.xMsClientRequestId = rawHeaders.getValue(X_MS_CLIENT_REQUEST_ID); this.xMsEncryptionScope = rawHeaders.getValue(X_MS_ENCRYPTION_SCOPE); String xMsTagCount = rawHeaders.getValue(X_MS_TAG_COUNT); if (xMsTagCount != null) { @@ -442,7 +444,7 @@ public BlobsGetPropertiesHeaders(HttpHeaders rawHeaders) { if (contentLength != null) { this.contentLength = Long.parseLong(contentLength); } - this.xMsRequestId = rawHeaders.getValue(HttpHeaderName.fromString("x-ms-request-id")); + this.xMsRequestId = rawHeaders.getValue(X_MS_REQUEST_ID); this.contentType = rawHeaders.getValue(HttpHeaderName.CONTENT_TYPE); String xMsLastAccessTime = rawHeaders.getValue(X_MS_LAST_ACCESS_TIME); if (xMsLastAccessTime != null) { @@ -473,27 +475,26 @@ public BlobsGetPropertiesHeaders(HttpHeaders rawHeaders) { this.xMsCopyStatus = CopyStatusType.fromString(xMsCopyStatus); } this.xMsArchiveStatus = rawHeaders.getValue(X_MS_ARCHIVE_STATUS); - Map xMsOrHeaderCollection = new HashMap<>(); - Map xMsMetaHeaderCollection = new HashMap<>(); + Map xMsOrHeaderCollection = new LinkedHashMap<>(); + Map xMsMetaHeaderCollection = new LinkedHashMap<>(); - for (HttpHeader header : rawHeaders) { - String headerName = header.getValue(); + rawHeaders.stream().forEach(header -> { + String headerName = header.getName().getValue(); if (headerName.startsWith("x-ms-or-")) { xMsOrHeaderCollection.put(headerName.substring(8), header.getValue()); - continue; + return; } if (headerName.startsWith("x-ms-meta-")) { xMsMetaHeaderCollection.put(headerName.substring(10), header.getValue()); } - } - + }); this.xMsOr = xMsOrHeaderCollection; this.xMsMeta = xMsMetaHeaderCollection; } /** * Get the xMsIsCurrentVersion property: The x-ms-is-current-version property. - * + * * @return the xMsIsCurrentVersion value. */ public Boolean isXMsIsCurrentVersion() { @@ -502,7 +503,7 @@ public Boolean isXMsIsCurrentVersion() { /** * Set the xMsIsCurrentVersion property: The x-ms-is-current-version property. - * + * * @param xMsIsCurrentVersion the xMsIsCurrentVersion value to set. * @return the BlobsGetPropertiesHeaders object itself. */ @@ -513,7 +514,7 @@ public BlobsGetPropertiesHeaders setXMsIsCurrentVersion(Boolean xMsIsCurrentVers /** * Get the xMsLeaseStatus property: The x-ms-lease-status property. - * + * * @return the xMsLeaseStatus value. */ public LeaseStatusType getXMsLeaseStatus() { @@ -522,7 +523,7 @@ public LeaseStatusType getXMsLeaseStatus() { /** * Set the xMsLeaseStatus property: The x-ms-lease-status property. - * + * * @param xMsLeaseStatus the xMsLeaseStatus value to set. * @return the BlobsGetPropertiesHeaders object itself. */ @@ -533,7 +534,7 @@ public BlobsGetPropertiesHeaders setXMsLeaseStatus(LeaseStatusType xMsLeaseStatu /** * Get the xMsCopyDestinationSnapshot property: The x-ms-copy-destination-snapshot property. - * + * * @return the xMsCopyDestinationSnapshot value. */ public String getXMsCopyDestinationSnapshot() { @@ -542,7 +543,7 @@ public String getXMsCopyDestinationSnapshot() { /** * Set the xMsCopyDestinationSnapshot property: The x-ms-copy-destination-snapshot property. - * + * * @param xMsCopyDestinationSnapshot the xMsCopyDestinationSnapshot value to set. * @return the BlobsGetPropertiesHeaders object itself. */ @@ -553,7 +554,7 @@ public BlobsGetPropertiesHeaders setXMsCopyDestinationSnapshot(String xMsCopyDes /** * Get the xMsLeaseState property: The x-ms-lease-state property. - * + * * @return the xMsLeaseState value. */ public LeaseStateType getXMsLeaseState() { @@ -562,7 +563,7 @@ public LeaseStateType getXMsLeaseState() { /** * Set the xMsLeaseState property: The x-ms-lease-state property. - * + * * @param xMsLeaseState the xMsLeaseState value to set. * @return the BlobsGetPropertiesHeaders object itself. */ @@ -573,7 +574,7 @@ public BlobsGetPropertiesHeaders setXMsLeaseState(LeaseStateType xMsLeaseState) /** * Get the xMsBlobSealed property: The x-ms-blob-sealed property. - * + * * @return the xMsBlobSealed value. */ public Boolean isXMsBlobSealed() { @@ -582,7 +583,7 @@ public Boolean isXMsBlobSealed() { /** * Set the xMsBlobSealed property: The x-ms-blob-sealed property. - * + * * @param xMsBlobSealed the xMsBlobSealed value to set. * @return the BlobsGetPropertiesHeaders object itself. */ @@ -593,7 +594,7 @@ public BlobsGetPropertiesHeaders setXMsBlobSealed(Boolean xMsBlobSealed) { /** * Get the xMsVersionId property: The x-ms-version-id property. - * + * * @return the xMsVersionId value. */ public String getXMsVersionId() { @@ -602,7 +603,7 @@ public String getXMsVersionId() { /** * Set the xMsVersionId property: The x-ms-version-id property. - * + * * @param xMsVersionId the xMsVersionId value to set. * @return the BlobsGetPropertiesHeaders object itself. */ @@ -613,7 +614,7 @@ public BlobsGetPropertiesHeaders setXMsVersionId(String xMsVersionId) { /** * Get the xMsEncryptionKeySha256 property: The x-ms-encryption-key-sha256 property. - * + * * @return the xMsEncryptionKeySha256 value. */ public String getXMsEncryptionKeySha256() { @@ -622,7 +623,7 @@ public String getXMsEncryptionKeySha256() { /** * Set the xMsEncryptionKeySha256 property: The x-ms-encryption-key-sha256 property. - * + * * @param xMsEncryptionKeySha256 the xMsEncryptionKeySha256 value to set. * @return the BlobsGetPropertiesHeaders object itself. */ @@ -633,7 +634,7 @@ public BlobsGetPropertiesHeaders setXMsEncryptionKeySha256(String xMsEncryptionK /** * Get the xMsAccessTierChangeTime property: The x-ms-access-tier-change-time property. - * + * * @return the xMsAccessTierChangeTime value. */ public OffsetDateTime getXMsAccessTierChangeTime() { @@ -645,7 +646,7 @@ public OffsetDateTime getXMsAccessTierChangeTime() { /** * Set the xMsAccessTierChangeTime property: The x-ms-access-tier-change-time property. - * + * * @param xMsAccessTierChangeTime the xMsAccessTierChangeTime value to set. * @return the BlobsGetPropertiesHeaders object itself. */ @@ -660,7 +661,7 @@ public BlobsGetPropertiesHeaders setXMsAccessTierChangeTime(OffsetDateTime xMsAc /** * Get the xMsBlobType property: The x-ms-blob-type property. - * + * * @return the xMsBlobType value. */ public BlobType getXMsBlobType() { @@ -669,7 +670,7 @@ public BlobType getXMsBlobType() { /** * Set the xMsBlobType property: The x-ms-blob-type property. - * + * * @param xMsBlobType the xMsBlobType value to set. * @return the BlobsGetPropertiesHeaders object itself. */ @@ -680,7 +681,7 @@ public BlobsGetPropertiesHeaders setXMsBlobType(BlobType xMsBlobType) { /** * Get the contentEncoding property: The Content-Encoding property. - * + * * @return the contentEncoding value. */ public String getContentEncoding() { @@ -689,7 +690,7 @@ public String getContentEncoding() { /** * Set the contentEncoding property: The Content-Encoding property. - * + * * @param contentEncoding the contentEncoding value to set. * @return the BlobsGetPropertiesHeaders object itself. */ @@ -700,7 +701,7 @@ public BlobsGetPropertiesHeaders setContentEncoding(String contentEncoding) { /** * Get the xMsCreationTime property: The x-ms-creation-time property. - * + * * @return the xMsCreationTime value. */ public OffsetDateTime getXMsCreationTime() { @@ -712,7 +713,7 @@ public OffsetDateTime getXMsCreationTime() { /** * Set the xMsCreationTime property: The x-ms-creation-time property. - * + * * @param xMsCreationTime the xMsCreationTime value to set. * @return the BlobsGetPropertiesHeaders object itself. */ @@ -727,7 +728,7 @@ public BlobsGetPropertiesHeaders setXMsCreationTime(OffsetDateTime xMsCreationTi /** * Get the xMsIncrementalCopy property: The x-ms-incremental-copy property. - * + * * @return the xMsIncrementalCopy value. */ public Boolean isXMsIncrementalCopy() { @@ -736,7 +737,7 @@ public Boolean isXMsIncrementalCopy() { /** * Set the xMsIncrementalCopy property: The x-ms-incremental-copy property. - * + * * @param xMsIncrementalCopy the xMsIncrementalCopy value to set. * @return the BlobsGetPropertiesHeaders object itself. */ @@ -747,7 +748,7 @@ public BlobsGetPropertiesHeaders setXMsIncrementalCopy(Boolean xMsIncrementalCop /** * Get the xMsLeaseDuration property: The x-ms-lease-duration property. - * + * * @return the xMsLeaseDuration value. */ public LeaseDurationType getXMsLeaseDuration() { @@ -756,7 +757,7 @@ public LeaseDurationType getXMsLeaseDuration() { /** * Set the xMsLeaseDuration property: The x-ms-lease-duration property. - * + * * @param xMsLeaseDuration the xMsLeaseDuration value to set. * @return the BlobsGetPropertiesHeaders object itself. */ @@ -767,7 +768,7 @@ public BlobsGetPropertiesHeaders setXMsLeaseDuration(LeaseDurationType xMsLeaseD /** * Get the xMsVersion property: The x-ms-version property. - * + * * @return the xMsVersion value. */ public String getXMsVersion() { @@ -776,7 +777,7 @@ public String getXMsVersion() { /** * Set the xMsVersion property: The x-ms-version property. - * + * * @param xMsVersion the xMsVersion value to set. * @return the BlobsGetPropertiesHeaders object itself. */ @@ -787,7 +788,7 @@ public BlobsGetPropertiesHeaders setXMsVersion(String xMsVersion) { /** * Get the xMsCopyId property: The x-ms-copy-id property. - * + * * @return the xMsCopyId value. */ public String getXMsCopyId() { @@ -796,7 +797,7 @@ public String getXMsCopyId() { /** * Set the xMsCopyId property: The x-ms-copy-id property. - * + * * @param xMsCopyId the xMsCopyId value to set. * @return the BlobsGetPropertiesHeaders object itself. */ @@ -807,7 +808,7 @@ public BlobsGetPropertiesHeaders setXMsCopyId(String xMsCopyId) { /** * Get the xMsImmutabilityPolicyUntilDate property: The x-ms-immutability-policy-until-date property. - * + * * @return the xMsImmutabilityPolicyUntilDate value. */ public OffsetDateTime getXMsImmutabilityPolicyUntilDate() { @@ -819,7 +820,7 @@ public OffsetDateTime getXMsImmutabilityPolicyUntilDate() { /** * Set the xMsImmutabilityPolicyUntilDate property: The x-ms-immutability-policy-until-date property. - * + * * @param xMsImmutabilityPolicyUntilDate the xMsImmutabilityPolicyUntilDate value to set. * @return the BlobsGetPropertiesHeaders object itself. */ @@ -834,7 +835,7 @@ public BlobsGetPropertiesHeaders setXMsImmutabilityPolicyUntilDate(OffsetDateTim /** * Get the xMsBlobSequenceNumber property: The x-ms-blob-sequence-number property. - * + * * @return the xMsBlobSequenceNumber value. */ public Long getXMsBlobSequenceNumber() { @@ -843,7 +844,7 @@ public Long getXMsBlobSequenceNumber() { /** * Set the xMsBlobSequenceNumber property: The x-ms-blob-sequence-number property. - * + * * @param xMsBlobSequenceNumber the xMsBlobSequenceNumber value to set. * @return the BlobsGetPropertiesHeaders object itself. */ @@ -854,7 +855,7 @@ public BlobsGetPropertiesHeaders setXMsBlobSequenceNumber(Long xMsBlobSequenceNu /** * Get the xMsBlobCommittedBlockCount property: The x-ms-blob-committed-block-count property. - * + * * @return the xMsBlobCommittedBlockCount value. */ public Integer getXMsBlobCommittedBlockCount() { @@ -863,7 +864,7 @@ public Integer getXMsBlobCommittedBlockCount() { /** * Set the xMsBlobCommittedBlockCount property: The x-ms-blob-committed-block-count property. - * + * * @param xMsBlobCommittedBlockCount the xMsBlobCommittedBlockCount value to set. * @return the BlobsGetPropertiesHeaders object itself. */ @@ -874,7 +875,7 @@ public BlobsGetPropertiesHeaders setXMsBlobCommittedBlockCount(Integer xMsBlobCo /** * Get the xMsLegalHold property: The x-ms-legal-hold property. - * + * * @return the xMsLegalHold value. */ public Boolean isXMsLegalHold() { @@ -883,7 +884,7 @@ public Boolean isXMsLegalHold() { /** * Set the xMsLegalHold property: The x-ms-legal-hold property. - * + * * @param xMsLegalHold the xMsLegalHold value to set. * @return the BlobsGetPropertiesHeaders object itself. */ @@ -894,27 +895,27 @@ public BlobsGetPropertiesHeaders setXMsLegalHold(Boolean xMsLegalHold) { /** * Get the contentMD5 property: The Content-MD5 property. - * + * * @return the contentMD5 value. */ public byte[] getContentMD5() { - return CoreUtils.clone(this.contentMD5); + return this.contentMD5; } /** * Set the contentMD5 property: The Content-MD5 property. - * + * * @param contentMD5 the contentMD5 value to set. * @return the BlobsGetPropertiesHeaders object itself. */ public BlobsGetPropertiesHeaders setContentMD5(byte[] contentMD5) { - this.contentMD5 = CoreUtils.clone(contentMD5); + this.contentMD5 = contentMD5; return this; } /** * Get the xMsOrPolicyId property: The x-ms-or-policy-id property. - * + * * @return the xMsOrPolicyId value. */ public String getXMsOrPolicyId() { @@ -923,7 +924,7 @@ public String getXMsOrPolicyId() { /** * Set the xMsOrPolicyId property: The x-ms-or-policy-id property. - * + * * @param xMsOrPolicyId the xMsOrPolicyId value to set. * @return the BlobsGetPropertiesHeaders object itself. */ @@ -934,7 +935,7 @@ public BlobsGetPropertiesHeaders setXMsOrPolicyId(String xMsOrPolicyId) { /** * Get the cacheControl property: The Cache-Control property. - * + * * @return the cacheControl value. */ public String getCacheControl() { @@ -943,7 +944,7 @@ public String getCacheControl() { /** * Set the cacheControl property: The Cache-Control property. - * + * * @param cacheControl the cacheControl value to set. * @return the BlobsGetPropertiesHeaders object itself. */ @@ -954,7 +955,7 @@ public BlobsGetPropertiesHeaders setCacheControl(String cacheControl) { /** * Get the eTag property: The ETag property. - * + * * @return the eTag value. */ public String getETag() { @@ -963,7 +964,7 @@ public String getETag() { /** * Set the eTag property: The ETag property. - * + * * @param eTag the eTag value to set. * @return the BlobsGetPropertiesHeaders object itself. */ @@ -974,7 +975,7 @@ public BlobsGetPropertiesHeaders setETag(String eTag) { /** * Get the contentDisposition property: The Content-Disposition property. - * + * * @return the contentDisposition value. */ public String getContentDisposition() { @@ -983,7 +984,7 @@ public String getContentDisposition() { /** * Set the contentDisposition property: The Content-Disposition property. - * + * * @param contentDisposition the contentDisposition value to set. * @return the BlobsGetPropertiesHeaders object itself. */ @@ -994,7 +995,7 @@ public BlobsGetPropertiesHeaders setContentDisposition(String contentDisposition /** * Get the contentLanguage property: The Content-Language property. - * + * * @return the contentLanguage value. */ public String getContentLanguage() { @@ -1003,7 +1004,7 @@ public String getContentLanguage() { /** * Set the contentLanguage property: The Content-Language property. - * + * * @param contentLanguage the contentLanguage value to set. * @return the BlobsGetPropertiesHeaders object itself. */ @@ -1014,7 +1015,7 @@ public BlobsGetPropertiesHeaders setContentLanguage(String contentLanguage) { /** * Get the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @return the xMsClientRequestId value. */ public String getXMsClientRequestId() { @@ -1023,7 +1024,7 @@ public String getXMsClientRequestId() { /** * Set the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @param xMsClientRequestId the xMsClientRequestId value to set. * @return the BlobsGetPropertiesHeaders object itself. */ @@ -1034,7 +1035,7 @@ public BlobsGetPropertiesHeaders setXMsClientRequestId(String xMsClientRequestId /** * Get the xMsOr property: The x-ms-or- property. - * + * * @return the xMsOr value. */ public Map getXMsOr() { @@ -1043,7 +1044,7 @@ public Map getXMsOr() { /** * Set the xMsOr property: The x-ms-or- property. - * + * * @param xMsOr the xMsOr value to set. * @return the BlobsGetPropertiesHeaders object itself. */ @@ -1054,7 +1055,7 @@ public BlobsGetPropertiesHeaders setXMsOr(Map xMsOr) { /** * Get the xMsEncryptionScope property: The x-ms-encryption-scope property. - * + * * @return the xMsEncryptionScope value. */ public String getXMsEncryptionScope() { @@ -1063,7 +1064,7 @@ public String getXMsEncryptionScope() { /** * Set the xMsEncryptionScope property: The x-ms-encryption-scope property. - * + * * @param xMsEncryptionScope the xMsEncryptionScope value to set. * @return the BlobsGetPropertiesHeaders object itself. */ @@ -1074,7 +1075,7 @@ public BlobsGetPropertiesHeaders setXMsEncryptionScope(String xMsEncryptionScope /** * Get the xMsTagCount property: The x-ms-tag-count property. - * + * * @return the xMsTagCount value. */ public Long getXMsTagCount() { @@ -1083,7 +1084,7 @@ public Long getXMsTagCount() { /** * Set the xMsTagCount property: The x-ms-tag-count property. - * + * * @param xMsTagCount the xMsTagCount value to set. * @return the BlobsGetPropertiesHeaders object itself. */ @@ -1094,7 +1095,7 @@ public BlobsGetPropertiesHeaders setXMsTagCount(Long xMsTagCount) { /** * Get the lastModified property: The Last-Modified property. - * + * * @return the lastModified value. */ public OffsetDateTime getLastModified() { @@ -1106,7 +1107,7 @@ public OffsetDateTime getLastModified() { /** * Set the lastModified property: The Last-Modified property. - * + * * @param lastModified the lastModified value to set. * @return the BlobsGetPropertiesHeaders object itself. */ @@ -1121,7 +1122,7 @@ public BlobsGetPropertiesHeaders setLastModified(OffsetDateTime lastModified) { /** * Get the xMsAccessTierInferred property: The x-ms-access-tier-inferred property. - * + * * @return the xMsAccessTierInferred value. */ public Boolean isXMsAccessTierInferred() { @@ -1130,7 +1131,7 @@ public Boolean isXMsAccessTierInferred() { /** * Set the xMsAccessTierInferred property: The x-ms-access-tier-inferred property. - * + * * @param xMsAccessTierInferred the xMsAccessTierInferred value to set. * @return the BlobsGetPropertiesHeaders object itself. */ @@ -1141,7 +1142,7 @@ public BlobsGetPropertiesHeaders setXMsAccessTierInferred(Boolean xMsAccessTierI /** * Get the xMsImmutabilityPolicyMode property: The x-ms-immutability-policy-mode property. - * + * * @return the xMsImmutabilityPolicyMode value. */ public BlobImmutabilityPolicyMode getXMsImmutabilityPolicyMode() { @@ -1150,7 +1151,7 @@ public BlobImmutabilityPolicyMode getXMsImmutabilityPolicyMode() { /** * Set the xMsImmutabilityPolicyMode property: The x-ms-immutability-policy-mode property. - * + * * @param xMsImmutabilityPolicyMode the xMsImmutabilityPolicyMode value to set. * @return the BlobsGetPropertiesHeaders object itself. */ @@ -1162,7 +1163,7 @@ public BlobImmutabilityPolicyMode getXMsImmutabilityPolicyMode() { /** * Get the xMsAccessTier property: The x-ms-access-tier property. - * + * * @return the xMsAccessTier value. */ public String getXMsAccessTier() { @@ -1171,7 +1172,7 @@ public String getXMsAccessTier() { /** * Set the xMsAccessTier property: The x-ms-access-tier property. - * + * * @param xMsAccessTier the xMsAccessTier value to set. * @return the BlobsGetPropertiesHeaders object itself. */ @@ -1182,7 +1183,7 @@ public BlobsGetPropertiesHeaders setXMsAccessTier(String xMsAccessTier) { /** * Get the xMsCopyStatusDescription property: The x-ms-copy-status-description property. - * + * * @return the xMsCopyStatusDescription value. */ public String getXMsCopyStatusDescription() { @@ -1191,7 +1192,7 @@ public String getXMsCopyStatusDescription() { /** * Set the xMsCopyStatusDescription property: The x-ms-copy-status-description property. - * + * * @param xMsCopyStatusDescription the xMsCopyStatusDescription value to set. * @return the BlobsGetPropertiesHeaders object itself. */ @@ -1202,7 +1203,7 @@ public BlobsGetPropertiesHeaders setXMsCopyStatusDescription(String xMsCopyStatu /** * Get the contentLength property: The Content-Length property. - * + * * @return the contentLength value. */ public Long getContentLength() { @@ -1211,7 +1212,7 @@ public Long getContentLength() { /** * Set the contentLength property: The Content-Length property. - * + * * @param contentLength the contentLength value to set. * @return the BlobsGetPropertiesHeaders object itself. */ @@ -1222,7 +1223,7 @@ public BlobsGetPropertiesHeaders setContentLength(Long contentLength) { /** * Get the xMsRequestId property: The x-ms-request-id property. - * + * * @return the xMsRequestId value. */ public String getXMsRequestId() { @@ -1231,7 +1232,7 @@ public String getXMsRequestId() { /** * Set the xMsRequestId property: The x-ms-request-id property. - * + * * @param xMsRequestId the xMsRequestId value to set. * @return the BlobsGetPropertiesHeaders object itself. */ @@ -1242,7 +1243,7 @@ public BlobsGetPropertiesHeaders setXMsRequestId(String xMsRequestId) { /** * Get the contentType property: The Content-Type property. - * + * * @return the contentType value. */ public String getContentType() { @@ -1251,7 +1252,7 @@ public String getContentType() { /** * Set the contentType property: The Content-Type property. - * + * * @param contentType the contentType value to set. * @return the BlobsGetPropertiesHeaders object itself. */ @@ -1262,7 +1263,7 @@ public BlobsGetPropertiesHeaders setContentType(String contentType) { /** * Get the xMsLastAccessTime property: The x-ms-last-access-time property. - * + * * @return the xMsLastAccessTime value. */ public OffsetDateTime getXMsLastAccessTime() { @@ -1274,7 +1275,7 @@ public OffsetDateTime getXMsLastAccessTime() { /** * Set the xMsLastAccessTime property: The x-ms-last-access-time property. - * + * * @param xMsLastAccessTime the xMsLastAccessTime value to set. * @return the BlobsGetPropertiesHeaders object itself. */ @@ -1289,7 +1290,7 @@ public BlobsGetPropertiesHeaders setXMsLastAccessTime(OffsetDateTime xMsLastAcce /** * Get the xMsCopySource property: The x-ms-copy-source property. - * + * * @return the xMsCopySource value. */ public String getXMsCopySource() { @@ -1298,7 +1299,7 @@ public String getXMsCopySource() { /** * Set the xMsCopySource property: The x-ms-copy-source property. - * + * * @param xMsCopySource the xMsCopySource value to set. * @return the BlobsGetPropertiesHeaders object itself. */ @@ -1309,7 +1310,7 @@ public BlobsGetPropertiesHeaders setXMsCopySource(String xMsCopySource) { /** * Get the xMsCopyProgress property: The x-ms-copy-progress property. - * + * * @return the xMsCopyProgress value. */ public String getXMsCopyProgress() { @@ -1318,7 +1319,7 @@ public String getXMsCopyProgress() { /** * Set the xMsCopyProgress property: The x-ms-copy-progress property. - * + * * @param xMsCopyProgress the xMsCopyProgress value to set. * @return the BlobsGetPropertiesHeaders object itself. */ @@ -1329,7 +1330,7 @@ public BlobsGetPropertiesHeaders setXMsCopyProgress(String xMsCopyProgress) { /** * Get the xMsMeta property: The x-ms-meta- property. - * + * * @return the xMsMeta value. */ public Map getXMsMeta() { @@ -1338,7 +1339,7 @@ public Map getXMsMeta() { /** * Set the xMsMeta property: The x-ms-meta- property. - * + * * @param xMsMeta the xMsMeta value to set. * @return the BlobsGetPropertiesHeaders object itself. */ @@ -1349,7 +1350,7 @@ public BlobsGetPropertiesHeaders setXMsMeta(Map xMsMeta) { /** * Get the date property: The Date property. - * + * * @return the date value. */ public OffsetDateTime getDate() { @@ -1361,7 +1362,7 @@ public OffsetDateTime getDate() { /** * Set the date property: The Date property. - * + * * @param date the date value to set. * @return the BlobsGetPropertiesHeaders object itself. */ @@ -1376,7 +1377,7 @@ public BlobsGetPropertiesHeaders setDate(OffsetDateTime date) { /** * Get the xMsExpiryTime property: The x-ms-expiry-time property. - * + * * @return the xMsExpiryTime value. */ public OffsetDateTime getXMsExpiryTime() { @@ -1388,7 +1389,7 @@ public OffsetDateTime getXMsExpiryTime() { /** * Set the xMsExpiryTime property: The x-ms-expiry-time property. - * + * * @param xMsExpiryTime the xMsExpiryTime value to set. * @return the BlobsGetPropertiesHeaders object itself. */ @@ -1403,7 +1404,7 @@ public BlobsGetPropertiesHeaders setXMsExpiryTime(OffsetDateTime xMsExpiryTime) /** * Get the xMsCopyCompletionTime property: The x-ms-copy-completion-time property. - * + * * @return the xMsCopyCompletionTime value. */ public OffsetDateTime getXMsCopyCompletionTime() { @@ -1415,7 +1416,7 @@ public OffsetDateTime getXMsCopyCompletionTime() { /** * Set the xMsCopyCompletionTime property: The x-ms-copy-completion-time property. - * + * * @param xMsCopyCompletionTime the xMsCopyCompletionTime value to set. * @return the BlobsGetPropertiesHeaders object itself. */ @@ -1430,7 +1431,7 @@ public BlobsGetPropertiesHeaders setXMsCopyCompletionTime(OffsetDateTime xMsCopy /** * Get the acceptRanges property: The Accept-Ranges property. - * + * * @return the acceptRanges value. */ public String getAcceptRanges() { @@ -1439,7 +1440,7 @@ public String getAcceptRanges() { /** * Set the acceptRanges property: The Accept-Ranges property. - * + * * @param acceptRanges the acceptRanges value to set. * @return the BlobsGetPropertiesHeaders object itself. */ @@ -1450,7 +1451,7 @@ public BlobsGetPropertiesHeaders setAcceptRanges(String acceptRanges) { /** * Get the xMsServerEncrypted property: The x-ms-server-encrypted property. - * + * * @return the xMsServerEncrypted value. */ public Boolean isXMsServerEncrypted() { @@ -1459,7 +1460,7 @@ public Boolean isXMsServerEncrypted() { /** * Set the xMsServerEncrypted property: The x-ms-server-encrypted property. - * + * * @param xMsServerEncrypted the xMsServerEncrypted value to set. * @return the BlobsGetPropertiesHeaders object itself. */ @@ -1470,7 +1471,7 @@ public BlobsGetPropertiesHeaders setXMsServerEncrypted(Boolean xMsServerEncrypte /** * Get the xMsRehydratePriority property: The x-ms-rehydrate-priority property. - * + * * @return the xMsRehydratePriority value. */ public String getXMsRehydratePriority() { @@ -1479,7 +1480,7 @@ public String getXMsRehydratePriority() { /** * Set the xMsRehydratePriority property: The x-ms-rehydrate-priority property. - * + * * @param xMsRehydratePriority the xMsRehydratePriority value to set. * @return the BlobsGetPropertiesHeaders object itself. */ @@ -1490,7 +1491,7 @@ public BlobsGetPropertiesHeaders setXMsRehydratePriority(String xMsRehydratePrio /** * Get the xMsCopyStatus property: The x-ms-copy-status property. - * + * * @return the xMsCopyStatus value. */ public CopyStatusType getXMsCopyStatus() { @@ -1499,7 +1500,7 @@ public CopyStatusType getXMsCopyStatus() { /** * Set the xMsCopyStatus property: The x-ms-copy-status property. - * + * * @param xMsCopyStatus the xMsCopyStatus value to set. * @return the BlobsGetPropertiesHeaders object itself. */ @@ -1510,7 +1511,7 @@ public BlobsGetPropertiesHeaders setXMsCopyStatus(CopyStatusType xMsCopyStatus) /** * Get the xMsArchiveStatus property: The x-ms-archive-status property. - * + * * @return the xMsArchiveStatus value. */ public String getXMsArchiveStatus() { @@ -1519,7 +1520,7 @@ public String getXMsArchiveStatus() { /** * Set the xMsArchiveStatus property: The x-ms-archive-status property. - * + * * @param xMsArchiveStatus the xMsArchiveStatus value to set. * @return the BlobsGetPropertiesHeaders object itself. */ diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobsGetTagsHeaders.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobsGetTagsHeaders.java index c5e428b1d7b7..b41128b3bdbe 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobsGetTagsHeaders.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobsGetTagsHeaders.java @@ -4,17 +4,17 @@ package com.azure.v2.storage.blob.models; -import com.azure.v2.core.annotation.Fluent; +import io.clientcore.core.annotations.Metadata; +import io.clientcore.core.annotations.TypeConditions; import io.clientcore.core.http.models.HttpHeaderName; import io.clientcore.core.http.models.HttpHeaders; -import io.clientcore.core.util.DateTimeRfc1123; - +import io.clientcore.core.utils.DateTimeRfc1123; import java.time.OffsetDateTime; /** * The BlobsGetTagsHeaders model. */ -@Fluent +@Metadata(conditions = { TypeConditions.FLUENT }) public final class BlobsGetTagsHeaders { /* * The x-ms-version property. @@ -38,16 +38,20 @@ public final class BlobsGetTagsHeaders { private static final HttpHeaderName X_MS_VERSION = HttpHeaderName.fromString("x-ms-version"); + private static final HttpHeaderName X_MS_REQUEST_ID = HttpHeaderName.fromString("x-ms-request-id"); + + private static final HttpHeaderName X_MS_CLIENT_REQUEST_ID = HttpHeaderName.fromString("x-ms-client-request-id"); + // HttpHeaders containing the raw property values. /** * Creates an instance of BlobsGetTagsHeaders class. - * + * * @param rawHeaders The raw HttpHeaders that will be used to create the property values. */ public BlobsGetTagsHeaders(HttpHeaders rawHeaders) { this.xMsVersion = rawHeaders.getValue(X_MS_VERSION); - this.xMsRequestId = rawHeaders.getValue(HttpHeaderName.fromString("x-ms-request-id")); - this.xMsClientRequestId = rawHeaders.getValue(HttpHeaderName.fromString("x-ms-client-request-id")); + this.xMsRequestId = rawHeaders.getValue(X_MS_REQUEST_ID); + this.xMsClientRequestId = rawHeaders.getValue(X_MS_CLIENT_REQUEST_ID); String date = rawHeaders.getValue(HttpHeaderName.DATE); if (date != null) { this.date = new DateTimeRfc1123(date); @@ -56,7 +60,7 @@ public BlobsGetTagsHeaders(HttpHeaders rawHeaders) { /** * Get the xMsVersion property: The x-ms-version property. - * + * * @return the xMsVersion value. */ public String getXMsVersion() { @@ -65,7 +69,7 @@ public String getXMsVersion() { /** * Set the xMsVersion property: The x-ms-version property. - * + * * @param xMsVersion the xMsVersion value to set. * @return the BlobsGetTagsHeaders object itself. */ @@ -76,7 +80,7 @@ public BlobsGetTagsHeaders setXMsVersion(String xMsVersion) { /** * Get the xMsRequestId property: The x-ms-request-id property. - * + * * @return the xMsRequestId value. */ public String getXMsRequestId() { @@ -85,7 +89,7 @@ public String getXMsRequestId() { /** * Set the xMsRequestId property: The x-ms-request-id property. - * + * * @param xMsRequestId the xMsRequestId value to set. * @return the BlobsGetTagsHeaders object itself. */ @@ -96,7 +100,7 @@ public BlobsGetTagsHeaders setXMsRequestId(String xMsRequestId) { /** * Get the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @return the xMsClientRequestId value. */ public String getXMsClientRequestId() { @@ -105,7 +109,7 @@ public String getXMsClientRequestId() { /** * Set the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @param xMsClientRequestId the xMsClientRequestId value to set. * @return the BlobsGetTagsHeaders object itself. */ @@ -116,7 +120,7 @@ public BlobsGetTagsHeaders setXMsClientRequestId(String xMsClientRequestId) { /** * Get the date property: The Date property. - * + * * @return the date value. */ public OffsetDateTime getDate() { @@ -128,7 +132,7 @@ public OffsetDateTime getDate() { /** * Set the date property: The Date property. - * + * * @param date the date value to set. * @return the BlobsGetTagsHeaders object itself. */ diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobsQueryHeaders.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobsQueryHeaders.java index 85d6e80b0934..6ff0dba3787a 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobsQueryHeaders.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobsQueryHeaders.java @@ -4,22 +4,20 @@ package com.azure.v2.storage.blob.models; -import com.azure.v2.core.annotation.Fluent; -import com.azure.v2.core.util.CoreUtils; -import io.clientcore.core.http.models.HttpHeader; +import io.clientcore.core.annotations.Metadata; +import io.clientcore.core.annotations.TypeConditions; import io.clientcore.core.http.models.HttpHeaderName; import io.clientcore.core.http.models.HttpHeaders; -import io.clientcore.core.util.DateTimeRfc1123; - +import io.clientcore.core.utils.DateTimeRfc1123; import java.time.OffsetDateTime; import java.util.Base64; -import java.util.HashMap; +import java.util.LinkedHashMap; import java.util.Map; /** * The BlobsQueryHeaders model. */ -@Fluent +@Metadata(conditions = { TypeConditions.FLUENT }) public final class BlobsQueryHeaders { /* * The x-ms-lease-status property. @@ -200,6 +198,8 @@ public final class BlobsQueryHeaders { private static final HttpHeaderName X_MS_LEASE_DURATION = HttpHeaderName.fromString("x-ms-lease-duration"); + private static final HttpHeaderName X_MS_REQUEST_ID = HttpHeaderName.fromString("x-ms-request-id"); + private static final HttpHeaderName X_MS_VERSION = HttpHeaderName.fromString("x-ms-version"); private static final HttpHeaderName X_MS_COPY_ID = HttpHeaderName.fromString("x-ms-copy-id"); @@ -225,12 +225,14 @@ public final class BlobsQueryHeaders { private static final HttpHeaderName X_MS_COPY_STATUS = HttpHeaderName.fromString("x-ms-copy-status"); + private static final HttpHeaderName X_MS_CLIENT_REQUEST_ID = HttpHeaderName.fromString("x-ms-client-request-id"); + private static final HttpHeaderName X_MS_ENCRYPTION_SCOPE = HttpHeaderName.fromString("x-ms-encryption-scope"); // HttpHeaders containing the raw property values. /** * Creates an instance of BlobsQueryHeaders class. - * + * * @param rawHeaders The raw HttpHeaders that will be used to create the property values. */ public BlobsQueryHeaders(HttpHeaders rawHeaders) { @@ -262,7 +264,7 @@ public BlobsQueryHeaders(HttpHeaders rawHeaders) { if (contentLength != null) { this.contentLength = Long.parseLong(contentLength); } - this.xMsRequestId = rawHeaders.getValue(HttpHeaderName.fromString("x-ms-request-id")); + this.xMsRequestId = rawHeaders.getValue(X_MS_REQUEST_ID); this.contentType = rawHeaders.getValue(HttpHeaderName.CONTENT_TYPE); this.xMsVersion = rawHeaders.getValue(X_MS_VERSION); this.xMsCopyId = rawHeaders.getValue(X_MS_COPY_ID); @@ -309,23 +311,22 @@ public BlobsQueryHeaders(HttpHeaders rawHeaders) { this.xMsCopyStatus = CopyStatusType.fromString(xMsCopyStatus); } this.contentLanguage = rawHeaders.getValue(HttpHeaderName.CONTENT_LANGUAGE); - this.xMsClientRequestId = rawHeaders.getValue(HttpHeaderName.fromString("x-ms-client-request-id")); + this.xMsClientRequestId = rawHeaders.getValue(X_MS_CLIENT_REQUEST_ID); this.xMsEncryptionScope = rawHeaders.getValue(X_MS_ENCRYPTION_SCOPE); - Map xMsMetaHeaderCollection = new HashMap<>(); + Map xMsMetaHeaderCollection = new LinkedHashMap<>(); - for (HttpHeader header : rawHeaders) { - String headerName = header.getValue(); + rawHeaders.stream().forEach(header -> { + String headerName = header.getName().getValue(); if (headerName.startsWith("x-ms-meta-")) { xMsMetaHeaderCollection.put(headerName.substring(10), header.getValue()); } - } - + }); this.xMsMeta = xMsMetaHeaderCollection; } /** * Get the xMsLeaseStatus property: The x-ms-lease-status property. - * + * * @return the xMsLeaseStatus value. */ public LeaseStatusType getXMsLeaseStatus() { @@ -334,7 +335,7 @@ public LeaseStatusType getXMsLeaseStatus() { /** * Set the xMsLeaseStatus property: The x-ms-lease-status property. - * + * * @param xMsLeaseStatus the xMsLeaseStatus value to set. * @return the BlobsQueryHeaders object itself. */ @@ -345,7 +346,7 @@ public BlobsQueryHeaders setXMsLeaseStatus(LeaseStatusType xMsLeaseStatus) { /** * Get the contentRange property: The Content-Range property. - * + * * @return the contentRange value. */ public String getContentRange() { @@ -354,7 +355,7 @@ public String getContentRange() { /** * Set the contentRange property: The Content-Range property. - * + * * @param contentRange the contentRange value to set. * @return the BlobsQueryHeaders object itself. */ @@ -365,7 +366,7 @@ public BlobsQueryHeaders setContentRange(String contentRange) { /** * Get the xMsLeaseState property: The x-ms-lease-state property. - * + * * @return the xMsLeaseState value. */ public LeaseStateType getXMsLeaseState() { @@ -374,7 +375,7 @@ public LeaseStateType getXMsLeaseState() { /** * Set the xMsLeaseState property: The x-ms-lease-state property. - * + * * @param xMsLeaseState the xMsLeaseState value to set. * @return the BlobsQueryHeaders object itself. */ @@ -385,7 +386,7 @@ public BlobsQueryHeaders setXMsLeaseState(LeaseStateType xMsLeaseState) { /** * Get the lastModified property: The Last-Modified property. - * + * * @return the lastModified value. */ public OffsetDateTime getLastModified() { @@ -397,7 +398,7 @@ public OffsetDateTime getLastModified() { /** * Set the lastModified property: The Last-Modified property. - * + * * @param lastModified the lastModified value to set. * @return the BlobsQueryHeaders object itself. */ @@ -412,7 +413,7 @@ public BlobsQueryHeaders setLastModified(OffsetDateTime lastModified) { /** * Get the xMsEncryptionKeySha256 property: The x-ms-encryption-key-sha256 property. - * + * * @return the xMsEncryptionKeySha256 value. */ public String getXMsEncryptionKeySha256() { @@ -421,7 +422,7 @@ public String getXMsEncryptionKeySha256() { /** * Set the xMsEncryptionKeySha256 property: The x-ms-encryption-key-sha256 property. - * + * * @param xMsEncryptionKeySha256 the xMsEncryptionKeySha256 value to set. * @return the BlobsQueryHeaders object itself. */ @@ -432,7 +433,7 @@ public BlobsQueryHeaders setXMsEncryptionKeySha256(String xMsEncryptionKeySha256 /** * Get the xMsBlobType property: The x-ms-blob-type property. - * + * * @return the xMsBlobType value. */ public BlobType getXMsBlobType() { @@ -441,7 +442,7 @@ public BlobType getXMsBlobType() { /** * Set the xMsBlobType property: The x-ms-blob-type property. - * + * * @param xMsBlobType the xMsBlobType value to set. * @return the BlobsQueryHeaders object itself. */ @@ -452,7 +453,7 @@ public BlobsQueryHeaders setXMsBlobType(BlobType xMsBlobType) { /** * Get the contentEncoding property: The Content-Encoding property. - * + * * @return the contentEncoding value. */ public String getContentEncoding() { @@ -461,7 +462,7 @@ public String getContentEncoding() { /** * Set the contentEncoding property: The Content-Encoding property. - * + * * @param contentEncoding the contentEncoding value to set. * @return the BlobsQueryHeaders object itself. */ @@ -472,7 +473,7 @@ public BlobsQueryHeaders setContentEncoding(String contentEncoding) { /** * Get the xMsCopyStatusDescription property: The x-ms-copy-status-description property. - * + * * @return the xMsCopyStatusDescription value. */ public String getXMsCopyStatusDescription() { @@ -481,7 +482,7 @@ public String getXMsCopyStatusDescription() { /** * Set the xMsCopyStatusDescription property: The x-ms-copy-status-description property. - * + * * @param xMsCopyStatusDescription the xMsCopyStatusDescription value to set. * @return the BlobsQueryHeaders object itself. */ @@ -492,7 +493,7 @@ public BlobsQueryHeaders setXMsCopyStatusDescription(String xMsCopyStatusDescrip /** * Get the xMsLeaseDuration property: The x-ms-lease-duration property. - * + * * @return the xMsLeaseDuration value. */ public LeaseDurationType getXMsLeaseDuration() { @@ -501,7 +502,7 @@ public LeaseDurationType getXMsLeaseDuration() { /** * Set the xMsLeaseDuration property: The x-ms-lease-duration property. - * + * * @param xMsLeaseDuration the xMsLeaseDuration value to set. * @return the BlobsQueryHeaders object itself. */ @@ -512,7 +513,7 @@ public BlobsQueryHeaders setXMsLeaseDuration(LeaseDurationType xMsLeaseDuration) /** * Get the contentLength property: The Content-Length property. - * + * * @return the contentLength value. */ public Long getContentLength() { @@ -521,7 +522,7 @@ public Long getContentLength() { /** * Set the contentLength property: The Content-Length property. - * + * * @param contentLength the contentLength value to set. * @return the BlobsQueryHeaders object itself. */ @@ -532,7 +533,7 @@ public BlobsQueryHeaders setContentLength(Long contentLength) { /** * Get the xMsRequestId property: The x-ms-request-id property. - * + * * @return the xMsRequestId value. */ public String getXMsRequestId() { @@ -541,7 +542,7 @@ public String getXMsRequestId() { /** * Set the xMsRequestId property: The x-ms-request-id property. - * + * * @param xMsRequestId the xMsRequestId value to set. * @return the BlobsQueryHeaders object itself. */ @@ -552,7 +553,7 @@ public BlobsQueryHeaders setXMsRequestId(String xMsRequestId) { /** * Get the contentType property: The Content-Type property. - * + * * @return the contentType value. */ public String getContentType() { @@ -561,7 +562,7 @@ public String getContentType() { /** * Set the contentType property: The Content-Type property. - * + * * @param contentType the contentType value to set. * @return the BlobsQueryHeaders object itself. */ @@ -572,7 +573,7 @@ public BlobsQueryHeaders setContentType(String contentType) { /** * Get the xMsVersion property: The x-ms-version property. - * + * * @return the xMsVersion value. */ public String getXMsVersion() { @@ -581,7 +582,7 @@ public String getXMsVersion() { /** * Set the xMsVersion property: The x-ms-version property. - * + * * @param xMsVersion the xMsVersion value to set. * @return the BlobsQueryHeaders object itself. */ @@ -592,7 +593,7 @@ public BlobsQueryHeaders setXMsVersion(String xMsVersion) { /** * Get the xMsCopyId property: The x-ms-copy-id property. - * + * * @return the xMsCopyId value. */ public String getXMsCopyId() { @@ -601,7 +602,7 @@ public String getXMsCopyId() { /** * Set the xMsCopyId property: The x-ms-copy-id property. - * + * * @param xMsCopyId the xMsCopyId value to set. * @return the BlobsQueryHeaders object itself. */ @@ -612,7 +613,7 @@ public BlobsQueryHeaders setXMsCopyId(String xMsCopyId) { /** * Get the xMsCopySource property: The x-ms-copy-source property. - * + * * @return the xMsCopySource value. */ public String getXMsCopySource() { @@ -621,7 +622,7 @@ public String getXMsCopySource() { /** * Set the xMsCopySource property: The x-ms-copy-source property. - * + * * @param xMsCopySource the xMsCopySource value to set. * @return the BlobsQueryHeaders object itself. */ @@ -632,27 +633,27 @@ public BlobsQueryHeaders setXMsCopySource(String xMsCopySource) { /** * Get the xMsContentCrc64 property: The x-ms-content-crc64 property. - * + * * @return the xMsContentCrc64 value. */ public byte[] getXMsContentCrc64() { - return CoreUtils.clone(this.xMsContentCrc64); + return this.xMsContentCrc64; } /** * Set the xMsContentCrc64 property: The x-ms-content-crc64 property. - * + * * @param xMsContentCrc64 the xMsContentCrc64 value to set. * @return the BlobsQueryHeaders object itself. */ public BlobsQueryHeaders setXMsContentCrc64(byte[] xMsContentCrc64) { - this.xMsContentCrc64 = CoreUtils.clone(xMsContentCrc64); + this.xMsContentCrc64 = xMsContentCrc64; return this; } /** * Get the xMsBlobSequenceNumber property: The x-ms-blob-sequence-number property. - * + * * @return the xMsBlobSequenceNumber value. */ public Long getXMsBlobSequenceNumber() { @@ -661,7 +662,7 @@ public Long getXMsBlobSequenceNumber() { /** * Set the xMsBlobSequenceNumber property: The x-ms-blob-sequence-number property. - * + * * @param xMsBlobSequenceNumber the xMsBlobSequenceNumber value to set. * @return the BlobsQueryHeaders object itself. */ @@ -672,7 +673,7 @@ public BlobsQueryHeaders setXMsBlobSequenceNumber(Long xMsBlobSequenceNumber) { /** * Get the xMsCopyProgress property: The x-ms-copy-progress property. - * + * * @return the xMsCopyProgress value. */ public String getXMsCopyProgress() { @@ -681,7 +682,7 @@ public String getXMsCopyProgress() { /** * Set the xMsCopyProgress property: The x-ms-copy-progress property. - * + * * @param xMsCopyProgress the xMsCopyProgress value to set. * @return the BlobsQueryHeaders object itself. */ @@ -692,7 +693,7 @@ public BlobsQueryHeaders setXMsCopyProgress(String xMsCopyProgress) { /** * Get the xMsBlobCommittedBlockCount property: The x-ms-blob-committed-block-count property. - * + * * @return the xMsBlobCommittedBlockCount value. */ public Integer getXMsBlobCommittedBlockCount() { @@ -701,7 +702,7 @@ public Integer getXMsBlobCommittedBlockCount() { /** * Set the xMsBlobCommittedBlockCount property: The x-ms-blob-committed-block-count property. - * + * * @param xMsBlobCommittedBlockCount the xMsBlobCommittedBlockCount value to set. * @return the BlobsQueryHeaders object itself. */ @@ -712,27 +713,27 @@ public BlobsQueryHeaders setXMsBlobCommittedBlockCount(Integer xMsBlobCommittedB /** * Get the xMsBlobContentMd5 property: The x-ms-blob-content-md5 property. - * + * * @return the xMsBlobContentMd5 value. */ public byte[] getXMsBlobContentMd5() { - return CoreUtils.clone(this.xMsBlobContentMd5); + return this.xMsBlobContentMd5; } /** * Set the xMsBlobContentMd5 property: The x-ms-blob-content-md5 property. - * + * * @param xMsBlobContentMd5 the xMsBlobContentMd5 value to set. * @return the BlobsQueryHeaders object itself. */ public BlobsQueryHeaders setXMsBlobContentMd5(byte[] xMsBlobContentMd5) { - this.xMsBlobContentMd5 = CoreUtils.clone(xMsBlobContentMd5); + this.xMsBlobContentMd5 = xMsBlobContentMd5; return this; } /** * Get the xMsMeta property: The x-ms-meta- property. - * + * * @return the xMsMeta value. */ public Map getXMsMeta() { @@ -741,7 +742,7 @@ public Map getXMsMeta() { /** * Set the xMsMeta property: The x-ms-meta- property. - * + * * @param xMsMeta the xMsMeta value to set. * @return the BlobsQueryHeaders object itself. */ @@ -752,7 +753,7 @@ public BlobsQueryHeaders setXMsMeta(Map xMsMeta) { /** * Get the date property: The Date property. - * + * * @return the date value. */ public OffsetDateTime getDate() { @@ -764,7 +765,7 @@ public OffsetDateTime getDate() { /** * Set the date property: The Date property. - * + * * @param date the date value to set. * @return the BlobsQueryHeaders object itself. */ @@ -779,27 +780,27 @@ public BlobsQueryHeaders setDate(OffsetDateTime date) { /** * Get the contentMD5 property: The Content-MD5 property. - * + * * @return the contentMD5 value. */ public byte[] getContentMD5() { - return CoreUtils.clone(this.contentMD5); + return this.contentMD5; } /** * Set the contentMD5 property: The Content-MD5 property. - * + * * @param contentMD5 the contentMD5 value to set. * @return the BlobsQueryHeaders object itself. */ public BlobsQueryHeaders setContentMD5(byte[] contentMD5) { - this.contentMD5 = CoreUtils.clone(contentMD5); + this.contentMD5 = contentMD5; return this; } /** * Get the xMsCopyCompletionTime property: The x-ms-copy-completion-time property. - * + * * @return the xMsCopyCompletionTime value. */ public OffsetDateTime getXMsCopyCompletionTime() { @@ -811,7 +812,7 @@ public OffsetDateTime getXMsCopyCompletionTime() { /** * Set the xMsCopyCompletionTime property: The x-ms-copy-completion-time property. - * + * * @param xMsCopyCompletionTime the xMsCopyCompletionTime value to set. * @return the BlobsQueryHeaders object itself. */ @@ -826,7 +827,7 @@ public BlobsQueryHeaders setXMsCopyCompletionTime(OffsetDateTime xMsCopyCompleti /** * Get the acceptRanges property: The Accept-Ranges property. - * + * * @return the acceptRanges value. */ public String getAcceptRanges() { @@ -835,7 +836,7 @@ public String getAcceptRanges() { /** * Set the acceptRanges property: The Accept-Ranges property. - * + * * @param acceptRanges the acceptRanges value to set. * @return the BlobsQueryHeaders object itself. */ @@ -846,7 +847,7 @@ public BlobsQueryHeaders setAcceptRanges(String acceptRanges) { /** * Get the xMsServerEncrypted property: The x-ms-server-encrypted property. - * + * * @return the xMsServerEncrypted value. */ public Boolean isXMsServerEncrypted() { @@ -855,7 +856,7 @@ public Boolean isXMsServerEncrypted() { /** * Set the xMsServerEncrypted property: The x-ms-server-encrypted property. - * + * * @param xMsServerEncrypted the xMsServerEncrypted value to set. * @return the BlobsQueryHeaders object itself. */ @@ -866,7 +867,7 @@ public BlobsQueryHeaders setXMsServerEncrypted(Boolean xMsServerEncrypted) { /** * Get the cacheControl property: The Cache-Control property. - * + * * @return the cacheControl value. */ public String getCacheControl() { @@ -875,7 +876,7 @@ public String getCacheControl() { /** * Set the cacheControl property: The Cache-Control property. - * + * * @param cacheControl the cacheControl value to set. * @return the BlobsQueryHeaders object itself. */ @@ -886,7 +887,7 @@ public BlobsQueryHeaders setCacheControl(String cacheControl) { /** * Get the eTag property: The ETag property. - * + * * @return the eTag value. */ public String getETag() { @@ -895,7 +896,7 @@ public String getETag() { /** * Set the eTag property: The ETag property. - * + * * @param eTag the eTag value to set. * @return the BlobsQueryHeaders object itself. */ @@ -906,7 +907,7 @@ public BlobsQueryHeaders setETag(String eTag) { /** * Get the contentDisposition property: The Content-Disposition property. - * + * * @return the contentDisposition value. */ public String getContentDisposition() { @@ -915,7 +916,7 @@ public String getContentDisposition() { /** * Set the contentDisposition property: The Content-Disposition property. - * + * * @param contentDisposition the contentDisposition value to set. * @return the BlobsQueryHeaders object itself. */ @@ -926,7 +927,7 @@ public BlobsQueryHeaders setContentDisposition(String contentDisposition) { /** * Get the xMsCopyStatus property: The x-ms-copy-status property. - * + * * @return the xMsCopyStatus value. */ public CopyStatusType getXMsCopyStatus() { @@ -935,7 +936,7 @@ public CopyStatusType getXMsCopyStatus() { /** * Set the xMsCopyStatus property: The x-ms-copy-status property. - * + * * @param xMsCopyStatus the xMsCopyStatus value to set. * @return the BlobsQueryHeaders object itself. */ @@ -946,7 +947,7 @@ public BlobsQueryHeaders setXMsCopyStatus(CopyStatusType xMsCopyStatus) { /** * Get the contentLanguage property: The Content-Language property. - * + * * @return the contentLanguage value. */ public String getContentLanguage() { @@ -955,7 +956,7 @@ public String getContentLanguage() { /** * Set the contentLanguage property: The Content-Language property. - * + * * @param contentLanguage the contentLanguage value to set. * @return the BlobsQueryHeaders object itself. */ @@ -966,7 +967,7 @@ public BlobsQueryHeaders setContentLanguage(String contentLanguage) { /** * Get the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @return the xMsClientRequestId value. */ public String getXMsClientRequestId() { @@ -975,7 +976,7 @@ public String getXMsClientRequestId() { /** * Set the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @param xMsClientRequestId the xMsClientRequestId value to set. * @return the BlobsQueryHeaders object itself. */ @@ -986,7 +987,7 @@ public BlobsQueryHeaders setXMsClientRequestId(String xMsClientRequestId) { /** * Get the xMsEncryptionScope property: The x-ms-encryption-scope property. - * + * * @return the xMsEncryptionScope value. */ public String getXMsEncryptionScope() { @@ -995,7 +996,7 @@ public String getXMsEncryptionScope() { /** * Set the xMsEncryptionScope property: The x-ms-encryption-scope property. - * + * * @param xMsEncryptionScope the xMsEncryptionScope value to set. * @return the BlobsQueryHeaders object itself. */ diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobsReleaseLeaseHeaders.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobsReleaseLeaseHeaders.java index 7911c72689b8..60a28e2d58f5 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobsReleaseLeaseHeaders.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobsReleaseLeaseHeaders.java @@ -4,17 +4,17 @@ package com.azure.v2.storage.blob.models; -import com.azure.v2.core.annotation.Fluent; +import io.clientcore.core.annotations.Metadata; +import io.clientcore.core.annotations.TypeConditions; import io.clientcore.core.http.models.HttpHeaderName; import io.clientcore.core.http.models.HttpHeaders; -import io.clientcore.core.util.DateTimeRfc1123; - +import io.clientcore.core.utils.DateTimeRfc1123; import java.time.OffsetDateTime; /** * The BlobsReleaseLeaseHeaders model. */ -@Fluent +@Metadata(conditions = { TypeConditions.FLUENT }) public final class BlobsReleaseLeaseHeaders { /* * The x-ms-version property. @@ -48,10 +48,14 @@ public final class BlobsReleaseLeaseHeaders { private static final HttpHeaderName X_MS_VERSION = HttpHeaderName.fromString("x-ms-version"); + private static final HttpHeaderName X_MS_REQUEST_ID = HttpHeaderName.fromString("x-ms-request-id"); + + private static final HttpHeaderName X_MS_CLIENT_REQUEST_ID = HttpHeaderName.fromString("x-ms-client-request-id"); + // HttpHeaders containing the raw property values. /** * Creates an instance of BlobsReleaseLeaseHeaders class. - * + * * @param rawHeaders The raw HttpHeaders that will be used to create the property values. */ public BlobsReleaseLeaseHeaders(HttpHeaders rawHeaders) { @@ -61,8 +65,8 @@ public BlobsReleaseLeaseHeaders(HttpHeaders rawHeaders) { if (lastModified != null) { this.lastModified = new DateTimeRfc1123(lastModified); } - this.xMsRequestId = rawHeaders.getValue(HttpHeaderName.fromString("x-ms-request-id")); - this.xMsClientRequestId = rawHeaders.getValue(HttpHeaderName.fromString("x-ms-client-request-id")); + this.xMsRequestId = rawHeaders.getValue(X_MS_REQUEST_ID); + this.xMsClientRequestId = rawHeaders.getValue(X_MS_CLIENT_REQUEST_ID); String date = rawHeaders.getValue(HttpHeaderName.DATE); if (date != null) { this.date = new DateTimeRfc1123(date); @@ -71,7 +75,7 @@ public BlobsReleaseLeaseHeaders(HttpHeaders rawHeaders) { /** * Get the xMsVersion property: The x-ms-version property. - * + * * @return the xMsVersion value. */ public String getXMsVersion() { @@ -80,7 +84,7 @@ public String getXMsVersion() { /** * Set the xMsVersion property: The x-ms-version property. - * + * * @param xMsVersion the xMsVersion value to set. * @return the BlobsReleaseLeaseHeaders object itself. */ @@ -91,7 +95,7 @@ public BlobsReleaseLeaseHeaders setXMsVersion(String xMsVersion) { /** * Get the eTag property: The ETag property. - * + * * @return the eTag value. */ public String getETag() { @@ -100,7 +104,7 @@ public String getETag() { /** * Set the eTag property: The ETag property. - * + * * @param eTag the eTag value to set. * @return the BlobsReleaseLeaseHeaders object itself. */ @@ -111,7 +115,7 @@ public BlobsReleaseLeaseHeaders setETag(String eTag) { /** * Get the lastModified property: The Last-Modified property. - * + * * @return the lastModified value. */ public OffsetDateTime getLastModified() { @@ -123,7 +127,7 @@ public OffsetDateTime getLastModified() { /** * Set the lastModified property: The Last-Modified property. - * + * * @param lastModified the lastModified value to set. * @return the BlobsReleaseLeaseHeaders object itself. */ @@ -138,7 +142,7 @@ public BlobsReleaseLeaseHeaders setLastModified(OffsetDateTime lastModified) { /** * Get the xMsRequestId property: The x-ms-request-id property. - * + * * @return the xMsRequestId value. */ public String getXMsRequestId() { @@ -147,7 +151,7 @@ public String getXMsRequestId() { /** * Set the xMsRequestId property: The x-ms-request-id property. - * + * * @param xMsRequestId the xMsRequestId value to set. * @return the BlobsReleaseLeaseHeaders object itself. */ @@ -158,7 +162,7 @@ public BlobsReleaseLeaseHeaders setXMsRequestId(String xMsRequestId) { /** * Get the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @return the xMsClientRequestId value. */ public String getXMsClientRequestId() { @@ -167,7 +171,7 @@ public String getXMsClientRequestId() { /** * Set the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @param xMsClientRequestId the xMsClientRequestId value to set. * @return the BlobsReleaseLeaseHeaders object itself. */ @@ -178,7 +182,7 @@ public BlobsReleaseLeaseHeaders setXMsClientRequestId(String xMsClientRequestId) /** * Get the date property: The Date property. - * + * * @return the date value. */ public OffsetDateTime getDate() { @@ -190,7 +194,7 @@ public OffsetDateTime getDate() { /** * Set the date property: The Date property. - * + * * @param date the date value to set. * @return the BlobsReleaseLeaseHeaders object itself. */ diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobsRenewLeaseHeaders.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobsRenewLeaseHeaders.java index 004b3d6c2569..82089f4f0ba5 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobsRenewLeaseHeaders.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobsRenewLeaseHeaders.java @@ -4,17 +4,17 @@ package com.azure.v2.storage.blob.models; -import com.azure.v2.core.annotation.Fluent; +import io.clientcore.core.annotations.Metadata; +import io.clientcore.core.annotations.TypeConditions; import io.clientcore.core.http.models.HttpHeaderName; import io.clientcore.core.http.models.HttpHeaders; -import io.clientcore.core.util.DateTimeRfc1123; - +import io.clientcore.core.utils.DateTimeRfc1123; import java.time.OffsetDateTime; /** * The BlobsRenewLeaseHeaders model. */ -@Fluent +@Metadata(conditions = { TypeConditions.FLUENT }) public final class BlobsRenewLeaseHeaders { /* * The x-ms-version property. @@ -55,10 +55,14 @@ public final class BlobsRenewLeaseHeaders { private static final HttpHeaderName X_MS_LEASE_ID = HttpHeaderName.fromString("x-ms-lease-id"); + private static final HttpHeaderName X_MS_REQUEST_ID = HttpHeaderName.fromString("x-ms-request-id"); + + private static final HttpHeaderName X_MS_CLIENT_REQUEST_ID = HttpHeaderName.fromString("x-ms-client-request-id"); + // HttpHeaders containing the raw property values. /** * Creates an instance of BlobsRenewLeaseHeaders class. - * + * * @param rawHeaders The raw HttpHeaders that will be used to create the property values. */ public BlobsRenewLeaseHeaders(HttpHeaders rawHeaders) { @@ -69,8 +73,8 @@ public BlobsRenewLeaseHeaders(HttpHeaders rawHeaders) { if (lastModified != null) { this.lastModified = new DateTimeRfc1123(lastModified); } - this.xMsRequestId = rawHeaders.getValue(HttpHeaderName.fromString("x-ms-request-id")); - this.xMsClientRequestId = rawHeaders.getValue(HttpHeaderName.fromString("x-ms-client-request-id")); + this.xMsRequestId = rawHeaders.getValue(X_MS_REQUEST_ID); + this.xMsClientRequestId = rawHeaders.getValue(X_MS_CLIENT_REQUEST_ID); String date = rawHeaders.getValue(HttpHeaderName.DATE); if (date != null) { this.date = new DateTimeRfc1123(date); @@ -79,7 +83,7 @@ public BlobsRenewLeaseHeaders(HttpHeaders rawHeaders) { /** * Get the xMsVersion property: The x-ms-version property. - * + * * @return the xMsVersion value. */ public String getXMsVersion() { @@ -88,7 +92,7 @@ public String getXMsVersion() { /** * Set the xMsVersion property: The x-ms-version property. - * + * * @param xMsVersion the xMsVersion value to set. * @return the BlobsRenewLeaseHeaders object itself. */ @@ -99,7 +103,7 @@ public BlobsRenewLeaseHeaders setXMsVersion(String xMsVersion) { /** * Get the eTag property: The ETag property. - * + * * @return the eTag value. */ public String getETag() { @@ -108,7 +112,7 @@ public String getETag() { /** * Set the eTag property: The ETag property. - * + * * @param eTag the eTag value to set. * @return the BlobsRenewLeaseHeaders object itself. */ @@ -119,7 +123,7 @@ public BlobsRenewLeaseHeaders setETag(String eTag) { /** * Get the xMsLeaseId property: The x-ms-lease-id property. - * + * * @return the xMsLeaseId value. */ public String getXMsLeaseId() { @@ -128,7 +132,7 @@ public String getXMsLeaseId() { /** * Set the xMsLeaseId property: The x-ms-lease-id property. - * + * * @param xMsLeaseId the xMsLeaseId value to set. * @return the BlobsRenewLeaseHeaders object itself. */ @@ -139,7 +143,7 @@ public BlobsRenewLeaseHeaders setXMsLeaseId(String xMsLeaseId) { /** * Get the lastModified property: The Last-Modified property. - * + * * @return the lastModified value. */ public OffsetDateTime getLastModified() { @@ -151,7 +155,7 @@ public OffsetDateTime getLastModified() { /** * Set the lastModified property: The Last-Modified property. - * + * * @param lastModified the lastModified value to set. * @return the BlobsRenewLeaseHeaders object itself. */ @@ -166,7 +170,7 @@ public BlobsRenewLeaseHeaders setLastModified(OffsetDateTime lastModified) { /** * Get the xMsRequestId property: The x-ms-request-id property. - * + * * @return the xMsRequestId value. */ public String getXMsRequestId() { @@ -175,7 +179,7 @@ public String getXMsRequestId() { /** * Set the xMsRequestId property: The x-ms-request-id property. - * + * * @param xMsRequestId the xMsRequestId value to set. * @return the BlobsRenewLeaseHeaders object itself. */ @@ -186,7 +190,7 @@ public BlobsRenewLeaseHeaders setXMsRequestId(String xMsRequestId) { /** * Get the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @return the xMsClientRequestId value. */ public String getXMsClientRequestId() { @@ -195,7 +199,7 @@ public String getXMsClientRequestId() { /** * Set the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @param xMsClientRequestId the xMsClientRequestId value to set. * @return the BlobsRenewLeaseHeaders object itself. */ @@ -206,7 +210,7 @@ public BlobsRenewLeaseHeaders setXMsClientRequestId(String xMsClientRequestId) { /** * Get the date property: The Date property. - * + * * @return the date value. */ public OffsetDateTime getDate() { @@ -218,7 +222,7 @@ public OffsetDateTime getDate() { /** * Set the date property: The Date property. - * + * * @param date the date value to set. * @return the BlobsRenewLeaseHeaders object itself. */ diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobsSetExpiryHeaders.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobsSetExpiryHeaders.java index 772914e61b01..668f23d0f6f3 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobsSetExpiryHeaders.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobsSetExpiryHeaders.java @@ -4,17 +4,17 @@ package com.azure.v2.storage.blob.models; -import com.azure.v2.core.annotation.Fluent; +import io.clientcore.core.annotations.Metadata; +import io.clientcore.core.annotations.TypeConditions; import io.clientcore.core.http.models.HttpHeaderName; import io.clientcore.core.http.models.HttpHeaders; -import io.clientcore.core.util.DateTimeRfc1123; - +import io.clientcore.core.utils.DateTimeRfc1123; import java.time.OffsetDateTime; /** * The BlobsSetExpiryHeaders model. */ -@Fluent +@Metadata(conditions = { TypeConditions.FLUENT }) public final class BlobsSetExpiryHeaders { /* * The x-ms-version property. @@ -48,10 +48,14 @@ public final class BlobsSetExpiryHeaders { private static final HttpHeaderName X_MS_VERSION = HttpHeaderName.fromString("x-ms-version"); + private static final HttpHeaderName X_MS_REQUEST_ID = HttpHeaderName.fromString("x-ms-request-id"); + + private static final HttpHeaderName X_MS_CLIENT_REQUEST_ID = HttpHeaderName.fromString("x-ms-client-request-id"); + // HttpHeaders containing the raw property values. /** * Creates an instance of BlobsSetExpiryHeaders class. - * + * * @param rawHeaders The raw HttpHeaders that will be used to create the property values. */ public BlobsSetExpiryHeaders(HttpHeaders rawHeaders) { @@ -61,8 +65,8 @@ public BlobsSetExpiryHeaders(HttpHeaders rawHeaders) { if (lastModified != null) { this.lastModified = new DateTimeRfc1123(lastModified); } - this.xMsRequestId = rawHeaders.getValue(HttpHeaderName.fromString("x-ms-request-id")); - this.xMsClientRequestId = rawHeaders.getValue(HttpHeaderName.fromString("x-ms-client-request-id")); + this.xMsRequestId = rawHeaders.getValue(X_MS_REQUEST_ID); + this.xMsClientRequestId = rawHeaders.getValue(X_MS_CLIENT_REQUEST_ID); String date = rawHeaders.getValue(HttpHeaderName.DATE); if (date != null) { this.date = new DateTimeRfc1123(date); @@ -71,7 +75,7 @@ public BlobsSetExpiryHeaders(HttpHeaders rawHeaders) { /** * Get the xMsVersion property: The x-ms-version property. - * + * * @return the xMsVersion value. */ public String getXMsVersion() { @@ -80,7 +84,7 @@ public String getXMsVersion() { /** * Set the xMsVersion property: The x-ms-version property. - * + * * @param xMsVersion the xMsVersion value to set. * @return the BlobsSetExpiryHeaders object itself. */ @@ -91,7 +95,7 @@ public BlobsSetExpiryHeaders setXMsVersion(String xMsVersion) { /** * Get the eTag property: The ETag property. - * + * * @return the eTag value. */ public String getETag() { @@ -100,7 +104,7 @@ public String getETag() { /** * Set the eTag property: The ETag property. - * + * * @param eTag the eTag value to set. * @return the BlobsSetExpiryHeaders object itself. */ @@ -111,7 +115,7 @@ public BlobsSetExpiryHeaders setETag(String eTag) { /** * Get the lastModified property: The Last-Modified property. - * + * * @return the lastModified value. */ public OffsetDateTime getLastModified() { @@ -123,7 +127,7 @@ public OffsetDateTime getLastModified() { /** * Set the lastModified property: The Last-Modified property. - * + * * @param lastModified the lastModified value to set. * @return the BlobsSetExpiryHeaders object itself. */ @@ -138,7 +142,7 @@ public BlobsSetExpiryHeaders setLastModified(OffsetDateTime lastModified) { /** * Get the xMsRequestId property: The x-ms-request-id property. - * + * * @return the xMsRequestId value. */ public String getXMsRequestId() { @@ -147,7 +151,7 @@ public String getXMsRequestId() { /** * Set the xMsRequestId property: The x-ms-request-id property. - * + * * @param xMsRequestId the xMsRequestId value to set. * @return the BlobsSetExpiryHeaders object itself. */ @@ -158,7 +162,7 @@ public BlobsSetExpiryHeaders setXMsRequestId(String xMsRequestId) { /** * Get the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @return the xMsClientRequestId value. */ public String getXMsClientRequestId() { @@ -167,7 +171,7 @@ public String getXMsClientRequestId() { /** * Set the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @param xMsClientRequestId the xMsClientRequestId value to set. * @return the BlobsSetExpiryHeaders object itself. */ @@ -178,7 +182,7 @@ public BlobsSetExpiryHeaders setXMsClientRequestId(String xMsClientRequestId) { /** * Get the date property: The Date property. - * + * * @return the date value. */ public OffsetDateTime getDate() { @@ -190,7 +194,7 @@ public OffsetDateTime getDate() { /** * Set the date property: The Date property. - * + * * @param date the date value to set. * @return the BlobsSetExpiryHeaders object itself. */ diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobsSetHttpHeadersHeaders.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobsSetHttpHeadersHeaders.java index 68e933ef0254..bd56a9ec0f46 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobsSetHttpHeadersHeaders.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobsSetHttpHeadersHeaders.java @@ -4,17 +4,17 @@ package com.azure.v2.storage.blob.models; -import com.azure.v2.core.annotation.Fluent; +import io.clientcore.core.annotations.Metadata; +import io.clientcore.core.annotations.TypeConditions; import io.clientcore.core.http.models.HttpHeaderName; import io.clientcore.core.http.models.HttpHeaders; -import io.clientcore.core.util.DateTimeRfc1123; - +import io.clientcore.core.utils.DateTimeRfc1123; import java.time.OffsetDateTime; /** * The BlobsSetHttpHeadersHeaders model. */ -@Fluent +@Metadata(conditions = { TypeConditions.FLUENT }) public final class BlobsSetHttpHeadersHeaders { /* * The x-ms-version property. @@ -56,10 +56,14 @@ public final class BlobsSetHttpHeadersHeaders { private static final HttpHeaderName X_MS_BLOB_SEQUENCE_NUMBER = HttpHeaderName.fromString("x-ms-blob-sequence-number"); + private static final HttpHeaderName X_MS_REQUEST_ID = HttpHeaderName.fromString("x-ms-request-id"); + + private static final HttpHeaderName X_MS_CLIENT_REQUEST_ID = HttpHeaderName.fromString("x-ms-client-request-id"); + // HttpHeaders containing the raw property values. /** * Creates an instance of BlobsSetHttpHeadersHeaders class. - * + * * @param rawHeaders The raw HttpHeaders that will be used to create the property values. */ public BlobsSetHttpHeadersHeaders(HttpHeaders rawHeaders) { @@ -73,8 +77,8 @@ public BlobsSetHttpHeadersHeaders(HttpHeaders rawHeaders) { if (lastModified != null) { this.lastModified = new DateTimeRfc1123(lastModified); } - this.xMsRequestId = rawHeaders.getValue(HttpHeaderName.fromString("x-ms-request-id")); - this.xMsClientRequestId = rawHeaders.getValue(HttpHeaderName.fromString("x-ms-client-request-id")); + this.xMsRequestId = rawHeaders.getValue(X_MS_REQUEST_ID); + this.xMsClientRequestId = rawHeaders.getValue(X_MS_CLIENT_REQUEST_ID); String date = rawHeaders.getValue(HttpHeaderName.DATE); if (date != null) { this.date = new DateTimeRfc1123(date); @@ -83,7 +87,7 @@ public BlobsSetHttpHeadersHeaders(HttpHeaders rawHeaders) { /** * Get the xMsVersion property: The x-ms-version property. - * + * * @return the xMsVersion value. */ public String getXMsVersion() { @@ -92,7 +96,7 @@ public String getXMsVersion() { /** * Set the xMsVersion property: The x-ms-version property. - * + * * @param xMsVersion the xMsVersion value to set. * @return the BlobsSetHttpHeadersHeaders object itself. */ @@ -103,7 +107,7 @@ public BlobsSetHttpHeadersHeaders setXMsVersion(String xMsVersion) { /** * Get the eTag property: The ETag property. - * + * * @return the eTag value. */ public String getETag() { @@ -112,7 +116,7 @@ public String getETag() { /** * Set the eTag property: The ETag property. - * + * * @param eTag the eTag value to set. * @return the BlobsSetHttpHeadersHeaders object itself. */ @@ -123,7 +127,7 @@ public BlobsSetHttpHeadersHeaders setETag(String eTag) { /** * Get the xMsBlobSequenceNumber property: The x-ms-blob-sequence-number property. - * + * * @return the xMsBlobSequenceNumber value. */ public Long getXMsBlobSequenceNumber() { @@ -132,7 +136,7 @@ public Long getXMsBlobSequenceNumber() { /** * Set the xMsBlobSequenceNumber property: The x-ms-blob-sequence-number property. - * + * * @param xMsBlobSequenceNumber the xMsBlobSequenceNumber value to set. * @return the BlobsSetHttpHeadersHeaders object itself. */ @@ -143,7 +147,7 @@ public BlobsSetHttpHeadersHeaders setXMsBlobSequenceNumber(Long xMsBlobSequenceN /** * Get the lastModified property: The Last-Modified property. - * + * * @return the lastModified value. */ public OffsetDateTime getLastModified() { @@ -155,7 +159,7 @@ public OffsetDateTime getLastModified() { /** * Set the lastModified property: The Last-Modified property. - * + * * @param lastModified the lastModified value to set. * @return the BlobsSetHttpHeadersHeaders object itself. */ @@ -170,7 +174,7 @@ public BlobsSetHttpHeadersHeaders setLastModified(OffsetDateTime lastModified) { /** * Get the xMsRequestId property: The x-ms-request-id property. - * + * * @return the xMsRequestId value. */ public String getXMsRequestId() { @@ -179,7 +183,7 @@ public String getXMsRequestId() { /** * Set the xMsRequestId property: The x-ms-request-id property. - * + * * @param xMsRequestId the xMsRequestId value to set. * @return the BlobsSetHttpHeadersHeaders object itself. */ @@ -190,7 +194,7 @@ public BlobsSetHttpHeadersHeaders setXMsRequestId(String xMsRequestId) { /** * Get the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @return the xMsClientRequestId value. */ public String getXMsClientRequestId() { @@ -199,7 +203,7 @@ public String getXMsClientRequestId() { /** * Set the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @param xMsClientRequestId the xMsClientRequestId value to set. * @return the BlobsSetHttpHeadersHeaders object itself. */ @@ -210,7 +214,7 @@ public BlobsSetHttpHeadersHeaders setXMsClientRequestId(String xMsClientRequestI /** * Get the date property: The Date property. - * + * * @return the date value. */ public OffsetDateTime getDate() { @@ -222,7 +226,7 @@ public OffsetDateTime getDate() { /** * Set the date property: The Date property. - * + * * @param date the date value to set. * @return the BlobsSetHttpHeadersHeaders object itself. */ diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobsSetImmutabilityPolicyHeaders.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobsSetImmutabilityPolicyHeaders.java index 03b105e3fac5..d5f71f831808 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobsSetImmutabilityPolicyHeaders.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobsSetImmutabilityPolicyHeaders.java @@ -4,17 +4,17 @@ package com.azure.v2.storage.blob.models; -import com.azure.v2.core.annotation.Fluent; +import io.clientcore.core.annotations.Metadata; +import io.clientcore.core.annotations.TypeConditions; import io.clientcore.core.http.models.HttpHeaderName; import io.clientcore.core.http.models.HttpHeaders; -import io.clientcore.core.util.DateTimeRfc1123; - +import io.clientcore.core.utils.DateTimeRfc1123; import java.time.OffsetDateTime; /** * The BlobsSetImmutabilityPolicyHeaders model. */ -@Fluent +@Metadata(conditions = { TypeConditions.FLUENT }) public final class BlobsSetImmutabilityPolicyHeaders { /* * The x-ms-immutability-policy-mode property. @@ -54,10 +54,14 @@ public final class BlobsSetImmutabilityPolicyHeaders { private static final HttpHeaderName X_MS_IMMUTABILITY_POLICY_UNTIL_DATE = HttpHeaderName.fromString("x-ms-immutability-policy-until-date"); + private static final HttpHeaderName X_MS_REQUEST_ID = HttpHeaderName.fromString("x-ms-request-id"); + + private static final HttpHeaderName X_MS_CLIENT_REQUEST_ID = HttpHeaderName.fromString("x-ms-client-request-id"); + // HttpHeaders containing the raw property values. /** * Creates an instance of BlobsSetImmutabilityPolicyHeaders class. - * + * * @param rawHeaders The raw HttpHeaders that will be used to create the property values. */ public BlobsSetImmutabilityPolicyHeaders(HttpHeaders rawHeaders) { @@ -70,8 +74,8 @@ public BlobsSetImmutabilityPolicyHeaders(HttpHeaders rawHeaders) { if (xMsImmutabilityPolicyUntilDate != null) { this.xMsImmutabilityPolicyUntilDate = new DateTimeRfc1123(xMsImmutabilityPolicyUntilDate); } - this.xMsRequestId = rawHeaders.getValue(HttpHeaderName.fromString("x-ms-request-id")); - this.xMsClientRequestId = rawHeaders.getValue(HttpHeaderName.fromString("x-ms-client-request-id")); + this.xMsRequestId = rawHeaders.getValue(X_MS_REQUEST_ID); + this.xMsClientRequestId = rawHeaders.getValue(X_MS_CLIENT_REQUEST_ID); String date = rawHeaders.getValue(HttpHeaderName.DATE); if (date != null) { this.date = new DateTimeRfc1123(date); @@ -80,7 +84,7 @@ public BlobsSetImmutabilityPolicyHeaders(HttpHeaders rawHeaders) { /** * Get the xMsImmutabilityPolicyMode property: The x-ms-immutability-policy-mode property. - * + * * @return the xMsImmutabilityPolicyMode value. */ public BlobImmutabilityPolicyMode getXMsImmutabilityPolicyMode() { @@ -89,7 +93,7 @@ public BlobImmutabilityPolicyMode getXMsImmutabilityPolicyMode() { /** * Set the xMsImmutabilityPolicyMode property: The x-ms-immutability-policy-mode property. - * + * * @param xMsImmutabilityPolicyMode the xMsImmutabilityPolicyMode value to set. * @return the BlobsSetImmutabilityPolicyHeaders object itself. */ @@ -101,7 +105,7 @@ public BlobImmutabilityPolicyMode getXMsImmutabilityPolicyMode() { /** * Get the xMsVersion property: The x-ms-version property. - * + * * @return the xMsVersion value. */ public String getXMsVersion() { @@ -110,7 +114,7 @@ public String getXMsVersion() { /** * Set the xMsVersion property: The x-ms-version property. - * + * * @param xMsVersion the xMsVersion value to set. * @return the BlobsSetImmutabilityPolicyHeaders object itself. */ @@ -121,7 +125,7 @@ public BlobsSetImmutabilityPolicyHeaders setXMsVersion(String xMsVersion) { /** * Get the xMsImmutabilityPolicyUntilDate property: The x-ms-immutability-policy-until-date property. - * + * * @return the xMsImmutabilityPolicyUntilDate value. */ public OffsetDateTime getXMsImmutabilityPolicyUntilDate() { @@ -133,7 +137,7 @@ public OffsetDateTime getXMsImmutabilityPolicyUntilDate() { /** * Set the xMsImmutabilityPolicyUntilDate property: The x-ms-immutability-policy-until-date property. - * + * * @param xMsImmutabilityPolicyUntilDate the xMsImmutabilityPolicyUntilDate value to set. * @return the BlobsSetImmutabilityPolicyHeaders object itself. */ @@ -149,7 +153,7 @@ public OffsetDateTime getXMsImmutabilityPolicyUntilDate() { /** * Get the xMsRequestId property: The x-ms-request-id property. - * + * * @return the xMsRequestId value. */ public String getXMsRequestId() { @@ -158,7 +162,7 @@ public String getXMsRequestId() { /** * Set the xMsRequestId property: The x-ms-request-id property. - * + * * @param xMsRequestId the xMsRequestId value to set. * @return the BlobsSetImmutabilityPolicyHeaders object itself. */ @@ -169,7 +173,7 @@ public BlobsSetImmutabilityPolicyHeaders setXMsRequestId(String xMsRequestId) { /** * Get the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @return the xMsClientRequestId value. */ public String getXMsClientRequestId() { @@ -178,7 +182,7 @@ public String getXMsClientRequestId() { /** * Set the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @param xMsClientRequestId the xMsClientRequestId value to set. * @return the BlobsSetImmutabilityPolicyHeaders object itself. */ @@ -189,7 +193,7 @@ public BlobsSetImmutabilityPolicyHeaders setXMsClientRequestId(String xMsClientR /** * Get the date property: The Date property. - * + * * @return the date value. */ public OffsetDateTime getDate() { @@ -201,7 +205,7 @@ public OffsetDateTime getDate() { /** * Set the date property: The Date property. - * + * * @param date the date value to set. * @return the BlobsSetImmutabilityPolicyHeaders object itself. */ diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobsSetLegalHoldHeaders.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobsSetLegalHoldHeaders.java index 92e41ea467b9..81a3c24e9a11 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobsSetLegalHoldHeaders.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobsSetLegalHoldHeaders.java @@ -4,17 +4,17 @@ package com.azure.v2.storage.blob.models; -import com.azure.v2.core.annotation.Fluent; +import io.clientcore.core.annotations.Metadata; +import io.clientcore.core.annotations.TypeConditions; import io.clientcore.core.http.models.HttpHeaderName; import io.clientcore.core.http.models.HttpHeaders; -import io.clientcore.core.util.DateTimeRfc1123; - +import io.clientcore.core.utils.DateTimeRfc1123; import java.time.OffsetDateTime; /** * The BlobsSetLegalHoldHeaders model. */ -@Fluent +@Metadata(conditions = { TypeConditions.FLUENT }) public final class BlobsSetLegalHoldHeaders { /* * The x-ms-version property. @@ -43,22 +43,26 @@ public final class BlobsSetLegalHoldHeaders { private static final HttpHeaderName X_MS_VERSION = HttpHeaderName.fromString("x-ms-version"); + private static final HttpHeaderName X_MS_REQUEST_ID = HttpHeaderName.fromString("x-ms-request-id"); + private static final HttpHeaderName X_MS_LEGAL_HOLD = HttpHeaderName.fromString("x-ms-legal-hold"); + private static final HttpHeaderName X_MS_CLIENT_REQUEST_ID = HttpHeaderName.fromString("x-ms-client-request-id"); + // HttpHeaders containing the raw property values. /** * Creates an instance of BlobsSetLegalHoldHeaders class. - * + * * @param rawHeaders The raw HttpHeaders that will be used to create the property values. */ public BlobsSetLegalHoldHeaders(HttpHeaders rawHeaders) { this.xMsVersion = rawHeaders.getValue(X_MS_VERSION); - this.xMsRequestId = rawHeaders.getValue(HttpHeaderName.fromString("x-ms-request-id")); + this.xMsRequestId = rawHeaders.getValue(X_MS_REQUEST_ID); String xMsLegalHold = rawHeaders.getValue(X_MS_LEGAL_HOLD); if (xMsLegalHold != null) { this.xMsLegalHold = Boolean.parseBoolean(xMsLegalHold); } - this.xMsClientRequestId = rawHeaders.getValue(HttpHeaderName.fromString("x-ms-client-request-id")); + this.xMsClientRequestId = rawHeaders.getValue(X_MS_CLIENT_REQUEST_ID); String date = rawHeaders.getValue(HttpHeaderName.DATE); if (date != null) { this.date = new DateTimeRfc1123(date); @@ -67,7 +71,7 @@ public BlobsSetLegalHoldHeaders(HttpHeaders rawHeaders) { /** * Get the xMsVersion property: The x-ms-version property. - * + * * @return the xMsVersion value. */ public String getXMsVersion() { @@ -76,7 +80,7 @@ public String getXMsVersion() { /** * Set the xMsVersion property: The x-ms-version property. - * + * * @param xMsVersion the xMsVersion value to set. * @return the BlobsSetLegalHoldHeaders object itself. */ @@ -87,7 +91,7 @@ public BlobsSetLegalHoldHeaders setXMsVersion(String xMsVersion) { /** * Get the xMsRequestId property: The x-ms-request-id property. - * + * * @return the xMsRequestId value. */ public String getXMsRequestId() { @@ -96,7 +100,7 @@ public String getXMsRequestId() { /** * Set the xMsRequestId property: The x-ms-request-id property. - * + * * @param xMsRequestId the xMsRequestId value to set. * @return the BlobsSetLegalHoldHeaders object itself. */ @@ -107,7 +111,7 @@ public BlobsSetLegalHoldHeaders setXMsRequestId(String xMsRequestId) { /** * Get the xMsLegalHold property: The x-ms-legal-hold property. - * + * * @return the xMsLegalHold value. */ public Boolean isXMsLegalHold() { @@ -116,7 +120,7 @@ public Boolean isXMsLegalHold() { /** * Set the xMsLegalHold property: The x-ms-legal-hold property. - * + * * @param xMsLegalHold the xMsLegalHold value to set. * @return the BlobsSetLegalHoldHeaders object itself. */ @@ -127,7 +131,7 @@ public BlobsSetLegalHoldHeaders setXMsLegalHold(Boolean xMsLegalHold) { /** * Get the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @return the xMsClientRequestId value. */ public String getXMsClientRequestId() { @@ -136,7 +140,7 @@ public String getXMsClientRequestId() { /** * Set the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @param xMsClientRequestId the xMsClientRequestId value to set. * @return the BlobsSetLegalHoldHeaders object itself. */ @@ -147,7 +151,7 @@ public BlobsSetLegalHoldHeaders setXMsClientRequestId(String xMsClientRequestId) /** * Get the date property: The Date property. - * + * * @return the date value. */ public OffsetDateTime getDate() { @@ -159,7 +163,7 @@ public OffsetDateTime getDate() { /** * Set the date property: The Date property. - * + * * @param date the date value to set. * @return the BlobsSetLegalHoldHeaders object itself. */ diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobsSetMetadataHeaders.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobsSetMetadataHeaders.java index 58cf990789ca..8884abac6b7a 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobsSetMetadataHeaders.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobsSetMetadataHeaders.java @@ -4,17 +4,17 @@ package com.azure.v2.storage.blob.models; -import com.azure.v2.core.annotation.Fluent; +import io.clientcore.core.annotations.Metadata; +import io.clientcore.core.annotations.TypeConditions; import io.clientcore.core.http.models.HttpHeaderName; import io.clientcore.core.http.models.HttpHeaders; -import io.clientcore.core.util.DateTimeRfc1123; - +import io.clientcore.core.utils.DateTimeRfc1123; import java.time.OffsetDateTime; /** * The BlobsSetMetadataHeaders model. */ -@Fluent +@Metadata(conditions = { TypeConditions.FLUENT }) public final class BlobsSetMetadataHeaders { /* * The x-ms-version property. @@ -73,15 +73,19 @@ public final class BlobsSetMetadataHeaders { private static final HttpHeaderName X_MS_ENCRYPTION_KEY_SHA256 = HttpHeaderName.fromString("x-ms-encryption-key-sha256"); + private static final HttpHeaderName X_MS_REQUEST_ID = HttpHeaderName.fromString("x-ms-request-id"); + private static final HttpHeaderName X_MS_REQUEST_SERVER_ENCRYPTED = HttpHeaderName.fromString("x-ms-request-server-encrypted"); + private static final HttpHeaderName X_MS_CLIENT_REQUEST_ID = HttpHeaderName.fromString("x-ms-client-request-id"); + private static final HttpHeaderName X_MS_ENCRYPTION_SCOPE = HttpHeaderName.fromString("x-ms-encryption-scope"); // HttpHeaders containing the raw property values. /** * Creates an instance of BlobsSetMetadataHeaders class. - * + * * @param rawHeaders The raw HttpHeaders that will be used to create the property values. */ public BlobsSetMetadataHeaders(HttpHeaders rawHeaders) { @@ -93,12 +97,12 @@ public BlobsSetMetadataHeaders(HttpHeaders rawHeaders) { } this.xMsVersionId = rawHeaders.getValue(X_MS_VERSION_ID); this.xMsEncryptionKeySha256 = rawHeaders.getValue(X_MS_ENCRYPTION_KEY_SHA256); - this.xMsRequestId = rawHeaders.getValue(HttpHeaderName.fromString("x-ms-request-id")); + this.xMsRequestId = rawHeaders.getValue(X_MS_REQUEST_ID); String xMsRequestServerEncrypted = rawHeaders.getValue(X_MS_REQUEST_SERVER_ENCRYPTED); if (xMsRequestServerEncrypted != null) { this.xMsRequestServerEncrypted = Boolean.parseBoolean(xMsRequestServerEncrypted); } - this.xMsClientRequestId = rawHeaders.getValue(HttpHeaderName.fromString("x-ms-client-request-id")); + this.xMsClientRequestId = rawHeaders.getValue(X_MS_CLIENT_REQUEST_ID); String date = rawHeaders.getValue(HttpHeaderName.DATE); if (date != null) { this.date = new DateTimeRfc1123(date); @@ -108,7 +112,7 @@ public BlobsSetMetadataHeaders(HttpHeaders rawHeaders) { /** * Get the xMsVersion property: The x-ms-version property. - * + * * @return the xMsVersion value. */ public String getXMsVersion() { @@ -117,7 +121,7 @@ public String getXMsVersion() { /** * Set the xMsVersion property: The x-ms-version property. - * + * * @param xMsVersion the xMsVersion value to set. * @return the BlobsSetMetadataHeaders object itself. */ @@ -128,7 +132,7 @@ public BlobsSetMetadataHeaders setXMsVersion(String xMsVersion) { /** * Get the eTag property: The ETag property. - * + * * @return the eTag value. */ public String getETag() { @@ -137,7 +141,7 @@ public String getETag() { /** * Set the eTag property: The ETag property. - * + * * @param eTag the eTag value to set. * @return the BlobsSetMetadataHeaders object itself. */ @@ -148,7 +152,7 @@ public BlobsSetMetadataHeaders setETag(String eTag) { /** * Get the lastModified property: The Last-Modified property. - * + * * @return the lastModified value. */ public OffsetDateTime getLastModified() { @@ -160,7 +164,7 @@ public OffsetDateTime getLastModified() { /** * Set the lastModified property: The Last-Modified property. - * + * * @param lastModified the lastModified value to set. * @return the BlobsSetMetadataHeaders object itself. */ @@ -175,7 +179,7 @@ public BlobsSetMetadataHeaders setLastModified(OffsetDateTime lastModified) { /** * Get the xMsVersionId property: The x-ms-version-id property. - * + * * @return the xMsVersionId value. */ public String getXMsVersionId() { @@ -184,7 +188,7 @@ public String getXMsVersionId() { /** * Set the xMsVersionId property: The x-ms-version-id property. - * + * * @param xMsVersionId the xMsVersionId value to set. * @return the BlobsSetMetadataHeaders object itself. */ @@ -195,7 +199,7 @@ public BlobsSetMetadataHeaders setXMsVersionId(String xMsVersionId) { /** * Get the xMsEncryptionKeySha256 property: The x-ms-encryption-key-sha256 property. - * + * * @return the xMsEncryptionKeySha256 value. */ public String getXMsEncryptionKeySha256() { @@ -204,7 +208,7 @@ public String getXMsEncryptionKeySha256() { /** * Set the xMsEncryptionKeySha256 property: The x-ms-encryption-key-sha256 property. - * + * * @param xMsEncryptionKeySha256 the xMsEncryptionKeySha256 value to set. * @return the BlobsSetMetadataHeaders object itself. */ @@ -215,7 +219,7 @@ public BlobsSetMetadataHeaders setXMsEncryptionKeySha256(String xMsEncryptionKey /** * Get the xMsRequestId property: The x-ms-request-id property. - * + * * @return the xMsRequestId value. */ public String getXMsRequestId() { @@ -224,7 +228,7 @@ public String getXMsRequestId() { /** * Set the xMsRequestId property: The x-ms-request-id property. - * + * * @param xMsRequestId the xMsRequestId value to set. * @return the BlobsSetMetadataHeaders object itself. */ @@ -235,7 +239,7 @@ public BlobsSetMetadataHeaders setXMsRequestId(String xMsRequestId) { /** * Get the xMsRequestServerEncrypted property: The x-ms-request-server-encrypted property. - * + * * @return the xMsRequestServerEncrypted value. */ public Boolean isXMsRequestServerEncrypted() { @@ -244,7 +248,7 @@ public Boolean isXMsRequestServerEncrypted() { /** * Set the xMsRequestServerEncrypted property: The x-ms-request-server-encrypted property. - * + * * @param xMsRequestServerEncrypted the xMsRequestServerEncrypted value to set. * @return the BlobsSetMetadataHeaders object itself. */ @@ -255,7 +259,7 @@ public BlobsSetMetadataHeaders setXMsRequestServerEncrypted(Boolean xMsRequestSe /** * Get the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @return the xMsClientRequestId value. */ public String getXMsClientRequestId() { @@ -264,7 +268,7 @@ public String getXMsClientRequestId() { /** * Set the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @param xMsClientRequestId the xMsClientRequestId value to set. * @return the BlobsSetMetadataHeaders object itself. */ @@ -275,7 +279,7 @@ public BlobsSetMetadataHeaders setXMsClientRequestId(String xMsClientRequestId) /** * Get the date property: The Date property. - * + * * @return the date value. */ public OffsetDateTime getDate() { @@ -287,7 +291,7 @@ public OffsetDateTime getDate() { /** * Set the date property: The Date property. - * + * * @param date the date value to set. * @return the BlobsSetMetadataHeaders object itself. */ @@ -302,7 +306,7 @@ public BlobsSetMetadataHeaders setDate(OffsetDateTime date) { /** * Get the xMsEncryptionScope property: The x-ms-encryption-scope property. - * + * * @return the xMsEncryptionScope value. */ public String getXMsEncryptionScope() { @@ -311,7 +315,7 @@ public String getXMsEncryptionScope() { /** * Set the xMsEncryptionScope property: The x-ms-encryption-scope property. - * + * * @param xMsEncryptionScope the xMsEncryptionScope value to set. * @return the BlobsSetMetadataHeaders object itself. */ diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobsSetTagsHeaders.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobsSetTagsHeaders.java index 62566c7dc3c4..460a6d783236 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobsSetTagsHeaders.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobsSetTagsHeaders.java @@ -4,17 +4,17 @@ package com.azure.v2.storage.blob.models; -import com.azure.v2.core.annotation.Fluent; +import io.clientcore.core.annotations.Metadata; +import io.clientcore.core.annotations.TypeConditions; import io.clientcore.core.http.models.HttpHeaderName; import io.clientcore.core.http.models.HttpHeaders; -import io.clientcore.core.util.DateTimeRfc1123; - +import io.clientcore.core.utils.DateTimeRfc1123; import java.time.OffsetDateTime; /** * The BlobsSetTagsHeaders model. */ -@Fluent +@Metadata(conditions = { TypeConditions.FLUENT }) public final class BlobsSetTagsHeaders { /* * The x-ms-version property. @@ -38,16 +38,20 @@ public final class BlobsSetTagsHeaders { private static final HttpHeaderName X_MS_VERSION = HttpHeaderName.fromString("x-ms-version"); + private static final HttpHeaderName X_MS_REQUEST_ID = HttpHeaderName.fromString("x-ms-request-id"); + + private static final HttpHeaderName X_MS_CLIENT_REQUEST_ID = HttpHeaderName.fromString("x-ms-client-request-id"); + // HttpHeaders containing the raw property values. /** * Creates an instance of BlobsSetTagsHeaders class. - * + * * @param rawHeaders The raw HttpHeaders that will be used to create the property values. */ public BlobsSetTagsHeaders(HttpHeaders rawHeaders) { this.xMsVersion = rawHeaders.getValue(X_MS_VERSION); - this.xMsRequestId = rawHeaders.getValue(HttpHeaderName.fromString("x-ms-request-id")); - this.xMsClientRequestId = rawHeaders.getValue(HttpHeaderName.fromString("x-ms-client-request-id")); + this.xMsRequestId = rawHeaders.getValue(X_MS_REQUEST_ID); + this.xMsClientRequestId = rawHeaders.getValue(X_MS_CLIENT_REQUEST_ID); String date = rawHeaders.getValue(HttpHeaderName.DATE); if (date != null) { this.date = new DateTimeRfc1123(date); @@ -56,7 +60,7 @@ public BlobsSetTagsHeaders(HttpHeaders rawHeaders) { /** * Get the xMsVersion property: The x-ms-version property. - * + * * @return the xMsVersion value. */ public String getXMsVersion() { @@ -65,7 +69,7 @@ public String getXMsVersion() { /** * Set the xMsVersion property: The x-ms-version property. - * + * * @param xMsVersion the xMsVersion value to set. * @return the BlobsSetTagsHeaders object itself. */ @@ -76,7 +80,7 @@ public BlobsSetTagsHeaders setXMsVersion(String xMsVersion) { /** * Get the xMsRequestId property: The x-ms-request-id property. - * + * * @return the xMsRequestId value. */ public String getXMsRequestId() { @@ -85,7 +89,7 @@ public String getXMsRequestId() { /** * Set the xMsRequestId property: The x-ms-request-id property. - * + * * @param xMsRequestId the xMsRequestId value to set. * @return the BlobsSetTagsHeaders object itself. */ @@ -96,7 +100,7 @@ public BlobsSetTagsHeaders setXMsRequestId(String xMsRequestId) { /** * Get the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @return the xMsClientRequestId value. */ public String getXMsClientRequestId() { @@ -105,7 +109,7 @@ public String getXMsClientRequestId() { /** * Set the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @param xMsClientRequestId the xMsClientRequestId value to set. * @return the BlobsSetTagsHeaders object itself. */ @@ -116,7 +120,7 @@ public BlobsSetTagsHeaders setXMsClientRequestId(String xMsClientRequestId) { /** * Get the date property: The Date property. - * + * * @return the date value. */ public OffsetDateTime getDate() { @@ -128,7 +132,7 @@ public OffsetDateTime getDate() { /** * Set the date property: The Date property. - * + * * @param date the date value to set. * @return the BlobsSetTagsHeaders object itself. */ diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobsSetTierHeaders.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobsSetTierHeaders.java index 8dc5f41eee3e..42c17a22f9be 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobsSetTierHeaders.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobsSetTierHeaders.java @@ -4,14 +4,15 @@ package com.azure.v2.storage.blob.models; -import com.azure.v2.core.annotation.Fluent; +import io.clientcore.core.annotations.Metadata; +import io.clientcore.core.annotations.TypeConditions; import io.clientcore.core.http.models.HttpHeaderName; import io.clientcore.core.http.models.HttpHeaders; /** * The BlobsSetTierHeaders model. */ -@Fluent +@Metadata(conditions = { TypeConditions.FLUENT }) public final class BlobsSetTierHeaders { /* * The x-ms-version property. @@ -30,21 +31,25 @@ public final class BlobsSetTierHeaders { private static final HttpHeaderName X_MS_VERSION = HttpHeaderName.fromString("x-ms-version"); + private static final HttpHeaderName X_MS_REQUEST_ID = HttpHeaderName.fromString("x-ms-request-id"); + + private static final HttpHeaderName X_MS_CLIENT_REQUEST_ID = HttpHeaderName.fromString("x-ms-client-request-id"); + // HttpHeaders containing the raw property values. /** * Creates an instance of BlobsSetTierHeaders class. - * + * * @param rawHeaders The raw HttpHeaders that will be used to create the property values. */ public BlobsSetTierHeaders(HttpHeaders rawHeaders) { this.xMsVersion = rawHeaders.getValue(X_MS_VERSION); - this.xMsRequestId = rawHeaders.getValue(HttpHeaderName.fromString("x-ms-request-id")); - this.xMsClientRequestId = rawHeaders.getValue(HttpHeaderName.fromString("x-ms-client-request-id")); + this.xMsRequestId = rawHeaders.getValue(X_MS_REQUEST_ID); + this.xMsClientRequestId = rawHeaders.getValue(X_MS_CLIENT_REQUEST_ID); } /** * Get the xMsVersion property: The x-ms-version property. - * + * * @return the xMsVersion value. */ public String getXMsVersion() { @@ -53,7 +58,7 @@ public String getXMsVersion() { /** * Set the xMsVersion property: The x-ms-version property. - * + * * @param xMsVersion the xMsVersion value to set. * @return the BlobsSetTierHeaders object itself. */ @@ -64,7 +69,7 @@ public BlobsSetTierHeaders setXMsVersion(String xMsVersion) { /** * Get the xMsRequestId property: The x-ms-request-id property. - * + * * @return the xMsRequestId value. */ public String getXMsRequestId() { @@ -73,7 +78,7 @@ public String getXMsRequestId() { /** * Set the xMsRequestId property: The x-ms-request-id property. - * + * * @param xMsRequestId the xMsRequestId value to set. * @return the BlobsSetTierHeaders object itself. */ @@ -84,7 +89,7 @@ public BlobsSetTierHeaders setXMsRequestId(String xMsRequestId) { /** * Get the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @return the xMsClientRequestId value. */ public String getXMsClientRequestId() { @@ -93,7 +98,7 @@ public String getXMsClientRequestId() { /** * Set the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @param xMsClientRequestId the xMsClientRequestId value to set. * @return the BlobsSetTierHeaders object itself. */ diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobsStartCopyFromURLHeaders.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobsStartCopyFromURLHeaders.java index f4455eafbf03..c10c0c9a0a06 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobsStartCopyFromURLHeaders.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobsStartCopyFromURLHeaders.java @@ -4,17 +4,17 @@ package com.azure.v2.storage.blob.models; -import com.azure.v2.core.annotation.Fluent; +import io.clientcore.core.annotations.Metadata; +import io.clientcore.core.annotations.TypeConditions; import io.clientcore.core.http.models.HttpHeaderName; import io.clientcore.core.http.models.HttpHeaders; -import io.clientcore.core.util.DateTimeRfc1123; - +import io.clientcore.core.utils.DateTimeRfc1123; import java.time.OffsetDateTime; /** * The BlobsStartCopyFromURLHeaders model. */ -@Fluent +@Metadata(conditions = { TypeConditions.FLUENT }) public final class BlobsStartCopyFromURLHeaders { /* * The x-ms-version property. @@ -69,10 +69,14 @@ public final class BlobsStartCopyFromURLHeaders { private static final HttpHeaderName X_MS_COPY_STATUS = HttpHeaderName.fromString("x-ms-copy-status"); + private static final HttpHeaderName X_MS_REQUEST_ID = HttpHeaderName.fromString("x-ms-request-id"); + + private static final HttpHeaderName X_MS_CLIENT_REQUEST_ID = HttpHeaderName.fromString("x-ms-client-request-id"); + // HttpHeaders containing the raw property values. /** * Creates an instance of BlobsStartCopyFromURLHeaders class. - * + * * @param rawHeaders The raw HttpHeaders that will be used to create the property values. */ public BlobsStartCopyFromURLHeaders(HttpHeaders rawHeaders) { @@ -88,8 +92,8 @@ public BlobsStartCopyFromURLHeaders(HttpHeaders rawHeaders) { if (xMsCopyStatus != null) { this.xMsCopyStatus = CopyStatusType.fromString(xMsCopyStatus); } - this.xMsRequestId = rawHeaders.getValue(HttpHeaderName.fromString("x-ms-request-id")); - this.xMsClientRequestId = rawHeaders.getValue(HttpHeaderName.fromString("x-ms-client-request-id")); + this.xMsRequestId = rawHeaders.getValue(X_MS_REQUEST_ID); + this.xMsClientRequestId = rawHeaders.getValue(X_MS_CLIENT_REQUEST_ID); String date = rawHeaders.getValue(HttpHeaderName.DATE); if (date != null) { this.date = new DateTimeRfc1123(date); @@ -98,7 +102,7 @@ public BlobsStartCopyFromURLHeaders(HttpHeaders rawHeaders) { /** * Get the xMsVersion property: The x-ms-version property. - * + * * @return the xMsVersion value. */ public String getXMsVersion() { @@ -107,7 +111,7 @@ public String getXMsVersion() { /** * Set the xMsVersion property: The x-ms-version property. - * + * * @param xMsVersion the xMsVersion value to set. * @return the BlobsStartCopyFromURLHeaders object itself. */ @@ -118,7 +122,7 @@ public BlobsStartCopyFromURLHeaders setXMsVersion(String xMsVersion) { /** * Get the xMsCopyId property: The x-ms-copy-id property. - * + * * @return the xMsCopyId value. */ public String getXMsCopyId() { @@ -127,7 +131,7 @@ public String getXMsCopyId() { /** * Set the xMsCopyId property: The x-ms-copy-id property. - * + * * @param xMsCopyId the xMsCopyId value to set. * @return the BlobsStartCopyFromURLHeaders object itself. */ @@ -138,7 +142,7 @@ public BlobsStartCopyFromURLHeaders setXMsCopyId(String xMsCopyId) { /** * Get the eTag property: The ETag property. - * + * * @return the eTag value. */ public String getETag() { @@ -147,7 +151,7 @@ public String getETag() { /** * Set the eTag property: The ETag property. - * + * * @param eTag the eTag value to set. * @return the BlobsStartCopyFromURLHeaders object itself. */ @@ -158,7 +162,7 @@ public BlobsStartCopyFromURLHeaders setETag(String eTag) { /** * Get the lastModified property: The Last-Modified property. - * + * * @return the lastModified value. */ public OffsetDateTime getLastModified() { @@ -170,7 +174,7 @@ public OffsetDateTime getLastModified() { /** * Set the lastModified property: The Last-Modified property. - * + * * @param lastModified the lastModified value to set. * @return the BlobsStartCopyFromURLHeaders object itself. */ @@ -185,7 +189,7 @@ public BlobsStartCopyFromURLHeaders setLastModified(OffsetDateTime lastModified) /** * Get the xMsVersionId property: The x-ms-version-id property. - * + * * @return the xMsVersionId value. */ public String getXMsVersionId() { @@ -194,7 +198,7 @@ public String getXMsVersionId() { /** * Set the xMsVersionId property: The x-ms-version-id property. - * + * * @param xMsVersionId the xMsVersionId value to set. * @return the BlobsStartCopyFromURLHeaders object itself. */ @@ -205,7 +209,7 @@ public BlobsStartCopyFromURLHeaders setXMsVersionId(String xMsVersionId) { /** * Get the xMsCopyStatus property: The x-ms-copy-status property. - * + * * @return the xMsCopyStatus value. */ public CopyStatusType getXMsCopyStatus() { @@ -214,7 +218,7 @@ public CopyStatusType getXMsCopyStatus() { /** * Set the xMsCopyStatus property: The x-ms-copy-status property. - * + * * @param xMsCopyStatus the xMsCopyStatus value to set. * @return the BlobsStartCopyFromURLHeaders object itself. */ @@ -225,7 +229,7 @@ public BlobsStartCopyFromURLHeaders setXMsCopyStatus(CopyStatusType xMsCopyStatu /** * Get the xMsRequestId property: The x-ms-request-id property. - * + * * @return the xMsRequestId value. */ public String getXMsRequestId() { @@ -234,7 +238,7 @@ public String getXMsRequestId() { /** * Set the xMsRequestId property: The x-ms-request-id property. - * + * * @param xMsRequestId the xMsRequestId value to set. * @return the BlobsStartCopyFromURLHeaders object itself. */ @@ -245,7 +249,7 @@ public BlobsStartCopyFromURLHeaders setXMsRequestId(String xMsRequestId) { /** * Get the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @return the xMsClientRequestId value. */ public String getXMsClientRequestId() { @@ -254,7 +258,7 @@ public String getXMsClientRequestId() { /** * Set the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @param xMsClientRequestId the xMsClientRequestId value to set. * @return the BlobsStartCopyFromURLHeaders object itself. */ @@ -265,7 +269,7 @@ public BlobsStartCopyFromURLHeaders setXMsClientRequestId(String xMsClientReques /** * Get the date property: The Date property. - * + * * @return the date value. */ public OffsetDateTime getDate() { @@ -277,7 +281,7 @@ public OffsetDateTime getDate() { /** * Set the date property: The Date property. - * + * * @param date the date value to set. * @return the BlobsStartCopyFromURLHeaders object itself. */ diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobsUndeleteHeaders.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobsUndeleteHeaders.java index 5e12ee7d229d..ce5000252627 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobsUndeleteHeaders.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlobsUndeleteHeaders.java @@ -4,17 +4,17 @@ package com.azure.v2.storage.blob.models; -import com.azure.v2.core.annotation.Fluent; +import io.clientcore.core.annotations.Metadata; +import io.clientcore.core.annotations.TypeConditions; import io.clientcore.core.http.models.HttpHeaderName; import io.clientcore.core.http.models.HttpHeaders; -import io.clientcore.core.util.DateTimeRfc1123; - +import io.clientcore.core.utils.DateTimeRfc1123; import java.time.OffsetDateTime; /** * The BlobsUndeleteHeaders model. */ -@Fluent +@Metadata(conditions = { TypeConditions.FLUENT }) public final class BlobsUndeleteHeaders { /* * The x-ms-version property. @@ -38,16 +38,20 @@ public final class BlobsUndeleteHeaders { private static final HttpHeaderName X_MS_VERSION = HttpHeaderName.fromString("x-ms-version"); + private static final HttpHeaderName X_MS_REQUEST_ID = HttpHeaderName.fromString("x-ms-request-id"); + + private static final HttpHeaderName X_MS_CLIENT_REQUEST_ID = HttpHeaderName.fromString("x-ms-client-request-id"); + // HttpHeaders containing the raw property values. /** * Creates an instance of BlobsUndeleteHeaders class. - * + * * @param rawHeaders The raw HttpHeaders that will be used to create the property values. */ public BlobsUndeleteHeaders(HttpHeaders rawHeaders) { this.xMsVersion = rawHeaders.getValue(X_MS_VERSION); - this.xMsRequestId = rawHeaders.getValue(HttpHeaderName.fromString("x-ms-request-id")); - this.xMsClientRequestId = rawHeaders.getValue(HttpHeaderName.fromString("x-ms-client-request-id")); + this.xMsRequestId = rawHeaders.getValue(X_MS_REQUEST_ID); + this.xMsClientRequestId = rawHeaders.getValue(X_MS_CLIENT_REQUEST_ID); String date = rawHeaders.getValue(HttpHeaderName.DATE); if (date != null) { this.date = new DateTimeRfc1123(date); @@ -56,7 +60,7 @@ public BlobsUndeleteHeaders(HttpHeaders rawHeaders) { /** * Get the xMsVersion property: The x-ms-version property. - * + * * @return the xMsVersion value. */ public String getXMsVersion() { @@ -65,7 +69,7 @@ public String getXMsVersion() { /** * Set the xMsVersion property: The x-ms-version property. - * + * * @param xMsVersion the xMsVersion value to set. * @return the BlobsUndeleteHeaders object itself. */ @@ -76,7 +80,7 @@ public BlobsUndeleteHeaders setXMsVersion(String xMsVersion) { /** * Get the xMsRequestId property: The x-ms-request-id property. - * + * * @return the xMsRequestId value. */ public String getXMsRequestId() { @@ -85,7 +89,7 @@ public String getXMsRequestId() { /** * Set the xMsRequestId property: The x-ms-request-id property. - * + * * @param xMsRequestId the xMsRequestId value to set. * @return the BlobsUndeleteHeaders object itself. */ @@ -96,7 +100,7 @@ public BlobsUndeleteHeaders setXMsRequestId(String xMsRequestId) { /** * Get the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @return the xMsClientRequestId value. */ public String getXMsClientRequestId() { @@ -105,7 +109,7 @@ public String getXMsClientRequestId() { /** * Set the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @param xMsClientRequestId the xMsClientRequestId value to set. * @return the BlobsUndeleteHeaders object itself. */ @@ -116,7 +120,7 @@ public BlobsUndeleteHeaders setXMsClientRequestId(String xMsClientRequestId) { /** * Get the date property: The Date property. - * + * * @return the date value. */ public OffsetDateTime getDate() { @@ -128,7 +132,7 @@ public OffsetDateTime getDate() { /** * Set the date property: The Date property. - * + * * @param date the date value to set. * @return the BlobsUndeleteHeaders object itself. */ diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/Block.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/Block.java index 331a7ab85e66..9561869a1160 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/Block.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/Block.java @@ -4,20 +4,19 @@ package com.azure.v2.storage.blob.models; -import com.azure.v2.core.annotation.Fluent; -import com.azure.v2.core.util.CoreUtils; +import io.clientcore.core.annotations.Metadata; +import io.clientcore.core.annotations.TypeConditions; import io.clientcore.core.serialization.xml.XmlReader; import io.clientcore.core.serialization.xml.XmlSerializable; import io.clientcore.core.serialization.xml.XmlToken; import io.clientcore.core.serialization.xml.XmlWriter; - import javax.xml.namespace.QName; import javax.xml.stream.XMLStreamException; /** * Represents a single block in a block blob. It describes the block's ID and size. */ -@Fluent +@Metadata(conditions = { TypeConditions.FLUENT }) public final class Block implements XmlSerializable { /* * The base64 encoded block ID. @@ -42,7 +41,7 @@ public Block() { /** * Get the name property: The base64 encoded block ID. - * + * * @return the name value. */ public String getName() { @@ -51,7 +50,7 @@ public String getName() { /** * Set the name property: The base64 encoded block ID. - * + * * @param name the name value to set. * @return the Block object itself. */ @@ -62,7 +61,7 @@ public Block setName(String name) { /** * Get the sizeLong property: The block size in bytes. - * + * * @return the sizeLong value. */ public long getSizeLong() { @@ -71,7 +70,7 @@ public long getSizeLong() { /** * Set the sizeLong property: The block size in bytes. - * + * * @param sizeLong the sizeLong value to set. * @return the Block object itself. */ @@ -82,7 +81,7 @@ public Block setSizeLong(long sizeLong) { /** * Get the sizeInt property: The SizeInt property. - * + * * @return the sizeInt value. */ public int getSizeInt() { @@ -91,7 +90,7 @@ public int getSizeInt() { /** * Set the sizeInt property: The SizeInt property. - * + * * @param sizeInt the sizeInt value to set. * @return the Block object itself. */ @@ -107,7 +106,7 @@ public XmlWriter toXml(XmlWriter xmlWriter) throws XMLStreamException { @Override public XmlWriter toXml(XmlWriter xmlWriter, String rootElementName) throws XMLStreamException { - rootElementName = CoreUtils.isNullOrEmpty(rootElementName) ? "Block" : rootElementName; + rootElementName = rootElementName == null || rootElementName.isEmpty() ? "Block" : rootElementName; xmlWriter.writeStartElement(rootElementName); xmlWriter.writeStringElement("Name", this.name); xmlWriter.writeLongElement("Size", this.sizeLong); @@ -117,7 +116,7 @@ public XmlWriter toXml(XmlWriter xmlWriter, String rootElementName) throws XMLSt /** * Reads an instance of Block from the XmlReader. - * + * * @param xmlReader The XmlReader being read. * @return An instance of Block if the XmlReader was pointing to an instance of it, or null if it was pointing to * XML null. @@ -129,7 +128,7 @@ public static Block fromXml(XmlReader xmlReader) throws XMLStreamException { /** * Reads an instance of Block from the XmlReader. - * + * * @param xmlReader The XmlReader being read. * @param rootElementName Optional root element name to override the default defined by the model. Used to support * cases where the model can deserialize from different root element names. @@ -138,7 +137,7 @@ public static Block fromXml(XmlReader xmlReader) throws XMLStreamException { * @throws XMLStreamException If an error occurs while reading the Block. */ public static Block fromXml(XmlReader xmlReader, String rootElementName) throws XMLStreamException { - String finalRootElementName = CoreUtils.isNullOrEmpty(rootElementName) ? "Block" : rootElementName; + String finalRootElementName = rootElementName == null || rootElementName.isEmpty() ? "Block" : rootElementName; return xmlReader.readObject(finalRootElementName, reader -> { Block deserializedBlock = new Block(); while (reader.nextElement() != XmlToken.END_ELEMENT) { diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlockBlobsCommitBlockListHeaders.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlockBlobsCommitBlockListHeaders.java index dfa3f56dea15..c25621898425 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlockBlobsCommitBlockListHeaders.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlockBlobsCommitBlockListHeaders.java @@ -4,19 +4,18 @@ package com.azure.v2.storage.blob.models; -import com.azure.v2.core.annotation.Fluent; -import com.azure.v2.core.util.CoreUtils; +import io.clientcore.core.annotations.Metadata; +import io.clientcore.core.annotations.TypeConditions; import io.clientcore.core.http.models.HttpHeaderName; import io.clientcore.core.http.models.HttpHeaders; -import io.clientcore.core.util.DateTimeRfc1123; - +import io.clientcore.core.utils.DateTimeRfc1123; import java.time.OffsetDateTime; import java.util.Base64; /** * The BlockBlobsCommitBlockListHeaders model. */ -@Fluent +@Metadata(conditions = { TypeConditions.FLUENT }) public final class BlockBlobsCommitBlockListHeaders { /* * The x-ms-version property. @@ -87,15 +86,19 @@ public final class BlockBlobsCommitBlockListHeaders { private static final HttpHeaderName X_MS_ENCRYPTION_KEY_SHA256 = HttpHeaderName.fromString("x-ms-encryption-key-sha256"); + private static final HttpHeaderName X_MS_REQUEST_ID = HttpHeaderName.fromString("x-ms-request-id"); + private static final HttpHeaderName X_MS_REQUEST_SERVER_ENCRYPTED = HttpHeaderName.fromString("x-ms-request-server-encrypted"); + private static final HttpHeaderName X_MS_CLIENT_REQUEST_ID = HttpHeaderName.fromString("x-ms-client-request-id"); + private static final HttpHeaderName X_MS_ENCRYPTION_SCOPE = HttpHeaderName.fromString("x-ms-encryption-scope"); // HttpHeaders containing the raw property values. /** * Creates an instance of BlockBlobsCommitBlockListHeaders class. - * + * * @param rawHeaders The raw HttpHeaders that will be used to create the property values. */ public BlockBlobsCommitBlockListHeaders(HttpHeaders rawHeaders) { @@ -111,12 +114,12 @@ public BlockBlobsCommitBlockListHeaders(HttpHeaders rawHeaders) { } this.xMsVersionId = rawHeaders.getValue(X_MS_VERSION_ID); this.xMsEncryptionKeySha256 = rawHeaders.getValue(X_MS_ENCRYPTION_KEY_SHA256); - this.xMsRequestId = rawHeaders.getValue(HttpHeaderName.fromString("x-ms-request-id")); + this.xMsRequestId = rawHeaders.getValue(X_MS_REQUEST_ID); String xMsRequestServerEncrypted = rawHeaders.getValue(X_MS_REQUEST_SERVER_ENCRYPTED); if (xMsRequestServerEncrypted != null) { this.xMsRequestServerEncrypted = Boolean.parseBoolean(xMsRequestServerEncrypted); } - this.xMsClientRequestId = rawHeaders.getValue(HttpHeaderName.fromString("x-ms-client-request-id")); + this.xMsClientRequestId = rawHeaders.getValue(X_MS_CLIENT_REQUEST_ID); String date = rawHeaders.getValue(HttpHeaderName.DATE); if (date != null) { this.date = new DateTimeRfc1123(date); @@ -130,7 +133,7 @@ public BlockBlobsCommitBlockListHeaders(HttpHeaders rawHeaders) { /** * Get the xMsVersion property: The x-ms-version property. - * + * * @return the xMsVersion value. */ public String getXMsVersion() { @@ -139,7 +142,7 @@ public String getXMsVersion() { /** * Set the xMsVersion property: The x-ms-version property. - * + * * @param xMsVersion the xMsVersion value to set. * @return the BlockBlobsCommitBlockListHeaders object itself. */ @@ -150,7 +153,7 @@ public BlockBlobsCommitBlockListHeaders setXMsVersion(String xMsVersion) { /** * Get the eTag property: The ETag property. - * + * * @return the eTag value. */ public String getETag() { @@ -159,7 +162,7 @@ public String getETag() { /** * Set the eTag property: The ETag property. - * + * * @param eTag the eTag value to set. * @return the BlockBlobsCommitBlockListHeaders object itself. */ @@ -170,27 +173,27 @@ public BlockBlobsCommitBlockListHeaders setETag(String eTag) { /** * Get the xMsContentCrc64 property: The x-ms-content-crc64 property. - * + * * @return the xMsContentCrc64 value. */ public byte[] getXMsContentCrc64() { - return CoreUtils.clone(this.xMsContentCrc64); + return this.xMsContentCrc64; } /** * Set the xMsContentCrc64 property: The x-ms-content-crc64 property. - * + * * @param xMsContentCrc64 the xMsContentCrc64 value to set. * @return the BlockBlobsCommitBlockListHeaders object itself. */ public BlockBlobsCommitBlockListHeaders setXMsContentCrc64(byte[] xMsContentCrc64) { - this.xMsContentCrc64 = CoreUtils.clone(xMsContentCrc64); + this.xMsContentCrc64 = xMsContentCrc64; return this; } /** * Get the lastModified property: The Last-Modified property. - * + * * @return the lastModified value. */ public OffsetDateTime getLastModified() { @@ -202,7 +205,7 @@ public OffsetDateTime getLastModified() { /** * Set the lastModified property: The Last-Modified property. - * + * * @param lastModified the lastModified value to set. * @return the BlockBlobsCommitBlockListHeaders object itself. */ @@ -217,7 +220,7 @@ public BlockBlobsCommitBlockListHeaders setLastModified(OffsetDateTime lastModif /** * Get the xMsVersionId property: The x-ms-version-id property. - * + * * @return the xMsVersionId value. */ public String getXMsVersionId() { @@ -226,7 +229,7 @@ public String getXMsVersionId() { /** * Set the xMsVersionId property: The x-ms-version-id property. - * + * * @param xMsVersionId the xMsVersionId value to set. * @return the BlockBlobsCommitBlockListHeaders object itself. */ @@ -237,7 +240,7 @@ public BlockBlobsCommitBlockListHeaders setXMsVersionId(String xMsVersionId) { /** * Get the xMsEncryptionKeySha256 property: The x-ms-encryption-key-sha256 property. - * + * * @return the xMsEncryptionKeySha256 value. */ public String getXMsEncryptionKeySha256() { @@ -246,7 +249,7 @@ public String getXMsEncryptionKeySha256() { /** * Set the xMsEncryptionKeySha256 property: The x-ms-encryption-key-sha256 property. - * + * * @param xMsEncryptionKeySha256 the xMsEncryptionKeySha256 value to set. * @return the BlockBlobsCommitBlockListHeaders object itself. */ @@ -257,7 +260,7 @@ public BlockBlobsCommitBlockListHeaders setXMsEncryptionKeySha256(String xMsEncr /** * Get the xMsRequestId property: The x-ms-request-id property. - * + * * @return the xMsRequestId value. */ public String getXMsRequestId() { @@ -266,7 +269,7 @@ public String getXMsRequestId() { /** * Set the xMsRequestId property: The x-ms-request-id property. - * + * * @param xMsRequestId the xMsRequestId value to set. * @return the BlockBlobsCommitBlockListHeaders object itself. */ @@ -277,7 +280,7 @@ public BlockBlobsCommitBlockListHeaders setXMsRequestId(String xMsRequestId) { /** * Get the xMsRequestServerEncrypted property: The x-ms-request-server-encrypted property. - * + * * @return the xMsRequestServerEncrypted value. */ public Boolean isXMsRequestServerEncrypted() { @@ -286,7 +289,7 @@ public Boolean isXMsRequestServerEncrypted() { /** * Set the xMsRequestServerEncrypted property: The x-ms-request-server-encrypted property. - * + * * @param xMsRequestServerEncrypted the xMsRequestServerEncrypted value to set. * @return the BlockBlobsCommitBlockListHeaders object itself. */ @@ -297,7 +300,7 @@ public BlockBlobsCommitBlockListHeaders setXMsRequestServerEncrypted(Boolean xMs /** * Get the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @return the xMsClientRequestId value. */ public String getXMsClientRequestId() { @@ -306,7 +309,7 @@ public String getXMsClientRequestId() { /** * Set the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @param xMsClientRequestId the xMsClientRequestId value to set. * @return the BlockBlobsCommitBlockListHeaders object itself. */ @@ -317,7 +320,7 @@ public BlockBlobsCommitBlockListHeaders setXMsClientRequestId(String xMsClientRe /** * Get the date property: The Date property. - * + * * @return the date value. */ public OffsetDateTime getDate() { @@ -329,7 +332,7 @@ public OffsetDateTime getDate() { /** * Set the date property: The Date property. - * + * * @param date the date value to set. * @return the BlockBlobsCommitBlockListHeaders object itself. */ @@ -344,27 +347,27 @@ public BlockBlobsCommitBlockListHeaders setDate(OffsetDateTime date) { /** * Get the contentMD5 property: The Content-MD5 property. - * + * * @return the contentMD5 value. */ public byte[] getContentMD5() { - return CoreUtils.clone(this.contentMD5); + return this.contentMD5; } /** * Set the contentMD5 property: The Content-MD5 property. - * + * * @param contentMD5 the contentMD5 value to set. * @return the BlockBlobsCommitBlockListHeaders object itself. */ public BlockBlobsCommitBlockListHeaders setContentMD5(byte[] contentMD5) { - this.contentMD5 = CoreUtils.clone(contentMD5); + this.contentMD5 = contentMD5; return this; } /** * Get the xMsEncryptionScope property: The x-ms-encryption-scope property. - * + * * @return the xMsEncryptionScope value. */ public String getXMsEncryptionScope() { @@ -373,7 +376,7 @@ public String getXMsEncryptionScope() { /** * Set the xMsEncryptionScope property: The x-ms-encryption-scope property. - * + * * @param xMsEncryptionScope the xMsEncryptionScope value to set. * @return the BlockBlobsCommitBlockListHeaders object itself. */ diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlockBlobsGetBlockListHeaders.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlockBlobsGetBlockListHeaders.java index 6f86a1371390..30cac29ed24f 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlockBlobsGetBlockListHeaders.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlockBlobsGetBlockListHeaders.java @@ -4,17 +4,17 @@ package com.azure.v2.storage.blob.models; -import com.azure.v2.core.annotation.Fluent; +import io.clientcore.core.annotations.Metadata; +import io.clientcore.core.annotations.TypeConditions; import io.clientcore.core.http.models.HttpHeaderName; import io.clientcore.core.http.models.HttpHeaders; -import io.clientcore.core.util.DateTimeRfc1123; - +import io.clientcore.core.utils.DateTimeRfc1123; import java.time.OffsetDateTime; /** * The BlockBlobsGetBlockListHeaders model. */ -@Fluent +@Metadata(conditions = { TypeConditions.FLUENT }) public final class BlockBlobsGetBlockListHeaders { /* * The x-ms-version property. @@ -61,10 +61,14 @@ public final class BlockBlobsGetBlockListHeaders { private static final HttpHeaderName X_MS_BLOB_CONTENT_LENGTH = HttpHeaderName.fromString("x-ms-blob-content-length"); + private static final HttpHeaderName X_MS_REQUEST_ID = HttpHeaderName.fromString("x-ms-request-id"); + + private static final HttpHeaderName X_MS_CLIENT_REQUEST_ID = HttpHeaderName.fromString("x-ms-client-request-id"); + // HttpHeaders containing the raw property values. /** * Creates an instance of BlockBlobsGetBlockListHeaders class. - * + * * @param rawHeaders The raw HttpHeaders that will be used to create the property values. */ public BlockBlobsGetBlockListHeaders(HttpHeaders rawHeaders) { @@ -78,8 +82,8 @@ public BlockBlobsGetBlockListHeaders(HttpHeaders rawHeaders) { if (lastModified != null) { this.lastModified = new DateTimeRfc1123(lastModified); } - this.xMsRequestId = rawHeaders.getValue(HttpHeaderName.fromString("x-ms-request-id")); - this.xMsClientRequestId = rawHeaders.getValue(HttpHeaderName.fromString("x-ms-client-request-id")); + this.xMsRequestId = rawHeaders.getValue(X_MS_REQUEST_ID); + this.xMsClientRequestId = rawHeaders.getValue(X_MS_CLIENT_REQUEST_ID); String date = rawHeaders.getValue(HttpHeaderName.DATE); if (date != null) { this.date = new DateTimeRfc1123(date); @@ -89,7 +93,7 @@ public BlockBlobsGetBlockListHeaders(HttpHeaders rawHeaders) { /** * Get the xMsVersion property: The x-ms-version property. - * + * * @return the xMsVersion value. */ public String getXMsVersion() { @@ -98,7 +102,7 @@ public String getXMsVersion() { /** * Set the xMsVersion property: The x-ms-version property. - * + * * @param xMsVersion the xMsVersion value to set. * @return the BlockBlobsGetBlockListHeaders object itself. */ @@ -109,7 +113,7 @@ public BlockBlobsGetBlockListHeaders setXMsVersion(String xMsVersion) { /** * Get the xMsBlobContentLength property: The x-ms-blob-content-length property. - * + * * @return the xMsBlobContentLength value. */ public Long getXMsBlobContentLength() { @@ -118,7 +122,7 @@ public Long getXMsBlobContentLength() { /** * Set the xMsBlobContentLength property: The x-ms-blob-content-length property. - * + * * @param xMsBlobContentLength the xMsBlobContentLength value to set. * @return the BlockBlobsGetBlockListHeaders object itself. */ @@ -129,7 +133,7 @@ public BlockBlobsGetBlockListHeaders setXMsBlobContentLength(Long xMsBlobContent /** * Get the eTag property: The ETag property. - * + * * @return the eTag value. */ public String getETag() { @@ -138,7 +142,7 @@ public String getETag() { /** * Set the eTag property: The ETag property. - * + * * @param eTag the eTag value to set. * @return the BlockBlobsGetBlockListHeaders object itself. */ @@ -149,7 +153,7 @@ public BlockBlobsGetBlockListHeaders setETag(String eTag) { /** * Get the lastModified property: The Last-Modified property. - * + * * @return the lastModified value. */ public OffsetDateTime getLastModified() { @@ -161,7 +165,7 @@ public OffsetDateTime getLastModified() { /** * Set the lastModified property: The Last-Modified property. - * + * * @param lastModified the lastModified value to set. * @return the BlockBlobsGetBlockListHeaders object itself. */ @@ -176,7 +180,7 @@ public BlockBlobsGetBlockListHeaders setLastModified(OffsetDateTime lastModified /** * Get the xMsRequestId property: The x-ms-request-id property. - * + * * @return the xMsRequestId value. */ public String getXMsRequestId() { @@ -185,7 +189,7 @@ public String getXMsRequestId() { /** * Set the xMsRequestId property: The x-ms-request-id property. - * + * * @param xMsRequestId the xMsRequestId value to set. * @return the BlockBlobsGetBlockListHeaders object itself. */ @@ -196,7 +200,7 @@ public BlockBlobsGetBlockListHeaders setXMsRequestId(String xMsRequestId) { /** * Get the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @return the xMsClientRequestId value. */ public String getXMsClientRequestId() { @@ -205,7 +209,7 @@ public String getXMsClientRequestId() { /** * Set the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @param xMsClientRequestId the xMsClientRequestId value to set. * @return the BlockBlobsGetBlockListHeaders object itself. */ @@ -216,7 +220,7 @@ public BlockBlobsGetBlockListHeaders setXMsClientRequestId(String xMsClientReque /** * Get the date property: The Date property. - * + * * @return the date value. */ public OffsetDateTime getDate() { @@ -228,7 +232,7 @@ public OffsetDateTime getDate() { /** * Set the date property: The Date property. - * + * * @param date the date value to set. * @return the BlockBlobsGetBlockListHeaders object itself. */ @@ -243,7 +247,7 @@ public BlockBlobsGetBlockListHeaders setDate(OffsetDateTime date) { /** * Get the contentType property: The Content-Type property. - * + * * @return the contentType value. */ public String getContentType() { @@ -252,7 +256,7 @@ public String getContentType() { /** * Set the contentType property: The Content-Type property. - * + * * @param contentType the contentType value to set. * @return the BlockBlobsGetBlockListHeaders object itself. */ diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlockBlobsPutBlobFromUrlHeaders.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlockBlobsPutBlobFromUrlHeaders.java index e635422ce1e7..92a29ab099d9 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlockBlobsPutBlobFromUrlHeaders.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlockBlobsPutBlobFromUrlHeaders.java @@ -4,19 +4,18 @@ package com.azure.v2.storage.blob.models; -import com.azure.v2.core.annotation.Fluent; -import com.azure.v2.core.util.CoreUtils; +import io.clientcore.core.annotations.Metadata; +import io.clientcore.core.annotations.TypeConditions; import io.clientcore.core.http.models.HttpHeaderName; import io.clientcore.core.http.models.HttpHeaders; -import io.clientcore.core.util.DateTimeRfc1123; - +import io.clientcore.core.utils.DateTimeRfc1123; import java.time.OffsetDateTime; import java.util.Base64; /** * The BlockBlobsPutBlobFromUrlHeaders model. */ -@Fluent +@Metadata(conditions = { TypeConditions.FLUENT }) public final class BlockBlobsPutBlobFromUrlHeaders { /* * The x-ms-version property. @@ -80,15 +79,19 @@ public final class BlockBlobsPutBlobFromUrlHeaders { private static final HttpHeaderName X_MS_ENCRYPTION_KEY_SHA256 = HttpHeaderName.fromString("x-ms-encryption-key-sha256"); + private static final HttpHeaderName X_MS_REQUEST_ID = HttpHeaderName.fromString("x-ms-request-id"); + private static final HttpHeaderName X_MS_REQUEST_SERVER_ENCRYPTED = HttpHeaderName.fromString("x-ms-request-server-encrypted"); + private static final HttpHeaderName X_MS_CLIENT_REQUEST_ID = HttpHeaderName.fromString("x-ms-client-request-id"); + private static final HttpHeaderName X_MS_ENCRYPTION_SCOPE = HttpHeaderName.fromString("x-ms-encryption-scope"); // HttpHeaders containing the raw property values. /** * Creates an instance of BlockBlobsPutBlobFromUrlHeaders class. - * + * * @param rawHeaders The raw HttpHeaders that will be used to create the property values. */ public BlockBlobsPutBlobFromUrlHeaders(HttpHeaders rawHeaders) { @@ -100,12 +103,12 @@ public BlockBlobsPutBlobFromUrlHeaders(HttpHeaders rawHeaders) { } this.xMsVersionId = rawHeaders.getValue(X_MS_VERSION_ID); this.xMsEncryptionKeySha256 = rawHeaders.getValue(X_MS_ENCRYPTION_KEY_SHA256); - this.xMsRequestId = rawHeaders.getValue(HttpHeaderName.fromString("x-ms-request-id")); + this.xMsRequestId = rawHeaders.getValue(X_MS_REQUEST_ID); String xMsRequestServerEncrypted = rawHeaders.getValue(X_MS_REQUEST_SERVER_ENCRYPTED); if (xMsRequestServerEncrypted != null) { this.xMsRequestServerEncrypted = Boolean.parseBoolean(xMsRequestServerEncrypted); } - this.xMsClientRequestId = rawHeaders.getValue(HttpHeaderName.fromString("x-ms-client-request-id")); + this.xMsClientRequestId = rawHeaders.getValue(X_MS_CLIENT_REQUEST_ID); String date = rawHeaders.getValue(HttpHeaderName.DATE); if (date != null) { this.date = new DateTimeRfc1123(date); @@ -119,7 +122,7 @@ public BlockBlobsPutBlobFromUrlHeaders(HttpHeaders rawHeaders) { /** * Get the xMsVersion property: The x-ms-version property. - * + * * @return the xMsVersion value. */ public String getXMsVersion() { @@ -128,7 +131,7 @@ public String getXMsVersion() { /** * Set the xMsVersion property: The x-ms-version property. - * + * * @param xMsVersion the xMsVersion value to set. * @return the BlockBlobsPutBlobFromUrlHeaders object itself. */ @@ -139,7 +142,7 @@ public BlockBlobsPutBlobFromUrlHeaders setXMsVersion(String xMsVersion) { /** * Get the eTag property: The ETag property. - * + * * @return the eTag value. */ public String getETag() { @@ -148,7 +151,7 @@ public String getETag() { /** * Set the eTag property: The ETag property. - * + * * @param eTag the eTag value to set. * @return the BlockBlobsPutBlobFromUrlHeaders object itself. */ @@ -159,7 +162,7 @@ public BlockBlobsPutBlobFromUrlHeaders setETag(String eTag) { /** * Get the lastModified property: The Last-Modified property. - * + * * @return the lastModified value. */ public OffsetDateTime getLastModified() { @@ -171,7 +174,7 @@ public OffsetDateTime getLastModified() { /** * Set the lastModified property: The Last-Modified property. - * + * * @param lastModified the lastModified value to set. * @return the BlockBlobsPutBlobFromUrlHeaders object itself. */ @@ -186,7 +189,7 @@ public BlockBlobsPutBlobFromUrlHeaders setLastModified(OffsetDateTime lastModifi /** * Get the xMsVersionId property: The x-ms-version-id property. - * + * * @return the xMsVersionId value. */ public String getXMsVersionId() { @@ -195,7 +198,7 @@ public String getXMsVersionId() { /** * Set the xMsVersionId property: The x-ms-version-id property. - * + * * @param xMsVersionId the xMsVersionId value to set. * @return the BlockBlobsPutBlobFromUrlHeaders object itself. */ @@ -206,7 +209,7 @@ public BlockBlobsPutBlobFromUrlHeaders setXMsVersionId(String xMsVersionId) { /** * Get the xMsEncryptionKeySha256 property: The x-ms-encryption-key-sha256 property. - * + * * @return the xMsEncryptionKeySha256 value. */ public String getXMsEncryptionKeySha256() { @@ -215,7 +218,7 @@ public String getXMsEncryptionKeySha256() { /** * Set the xMsEncryptionKeySha256 property: The x-ms-encryption-key-sha256 property. - * + * * @param xMsEncryptionKeySha256 the xMsEncryptionKeySha256 value to set. * @return the BlockBlobsPutBlobFromUrlHeaders object itself. */ @@ -226,7 +229,7 @@ public BlockBlobsPutBlobFromUrlHeaders setXMsEncryptionKeySha256(String xMsEncry /** * Get the xMsRequestId property: The x-ms-request-id property. - * + * * @return the xMsRequestId value. */ public String getXMsRequestId() { @@ -235,7 +238,7 @@ public String getXMsRequestId() { /** * Set the xMsRequestId property: The x-ms-request-id property. - * + * * @param xMsRequestId the xMsRequestId value to set. * @return the BlockBlobsPutBlobFromUrlHeaders object itself. */ @@ -246,7 +249,7 @@ public BlockBlobsPutBlobFromUrlHeaders setXMsRequestId(String xMsRequestId) { /** * Get the xMsRequestServerEncrypted property: The x-ms-request-server-encrypted property. - * + * * @return the xMsRequestServerEncrypted value. */ public Boolean isXMsRequestServerEncrypted() { @@ -255,7 +258,7 @@ public Boolean isXMsRequestServerEncrypted() { /** * Set the xMsRequestServerEncrypted property: The x-ms-request-server-encrypted property. - * + * * @param xMsRequestServerEncrypted the xMsRequestServerEncrypted value to set. * @return the BlockBlobsPutBlobFromUrlHeaders object itself. */ @@ -266,7 +269,7 @@ public BlockBlobsPutBlobFromUrlHeaders setXMsRequestServerEncrypted(Boolean xMsR /** * Get the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @return the xMsClientRequestId value. */ public String getXMsClientRequestId() { @@ -275,7 +278,7 @@ public String getXMsClientRequestId() { /** * Set the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @param xMsClientRequestId the xMsClientRequestId value to set. * @return the BlockBlobsPutBlobFromUrlHeaders object itself. */ @@ -286,7 +289,7 @@ public BlockBlobsPutBlobFromUrlHeaders setXMsClientRequestId(String xMsClientReq /** * Get the date property: The Date property. - * + * * @return the date value. */ public OffsetDateTime getDate() { @@ -298,7 +301,7 @@ public OffsetDateTime getDate() { /** * Set the date property: The Date property. - * + * * @param date the date value to set. * @return the BlockBlobsPutBlobFromUrlHeaders object itself. */ @@ -313,27 +316,27 @@ public BlockBlobsPutBlobFromUrlHeaders setDate(OffsetDateTime date) { /** * Get the contentMD5 property: The Content-MD5 property. - * + * * @return the contentMD5 value. */ public byte[] getContentMD5() { - return CoreUtils.clone(this.contentMD5); + return this.contentMD5; } /** * Set the contentMD5 property: The Content-MD5 property. - * + * * @param contentMD5 the contentMD5 value to set. * @return the BlockBlobsPutBlobFromUrlHeaders object itself. */ public BlockBlobsPutBlobFromUrlHeaders setContentMD5(byte[] contentMD5) { - this.contentMD5 = CoreUtils.clone(contentMD5); + this.contentMD5 = contentMD5; return this; } /** * Get the xMsEncryptionScope property: The x-ms-encryption-scope property. - * + * * @return the xMsEncryptionScope value. */ public String getXMsEncryptionScope() { @@ -342,7 +345,7 @@ public String getXMsEncryptionScope() { /** * Set the xMsEncryptionScope property: The x-ms-encryption-scope property. - * + * * @param xMsEncryptionScope the xMsEncryptionScope value to set. * @return the BlockBlobsPutBlobFromUrlHeaders object itself. */ diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlockBlobsStageBlockFromURLHeaders.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlockBlobsStageBlockFromURLHeaders.java index 2755e43c97e3..46038c944f5f 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlockBlobsStageBlockFromURLHeaders.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlockBlobsStageBlockFromURLHeaders.java @@ -4,19 +4,18 @@ package com.azure.v2.storage.blob.models; -import com.azure.v2.core.annotation.Fluent; -import com.azure.v2.core.util.CoreUtils; +import io.clientcore.core.annotations.Metadata; +import io.clientcore.core.annotations.TypeConditions; import io.clientcore.core.http.models.HttpHeaderName; import io.clientcore.core.http.models.HttpHeaders; -import io.clientcore.core.util.DateTimeRfc1123; - +import io.clientcore.core.utils.DateTimeRfc1123; import java.time.OffsetDateTime; import java.util.Base64; /** * The BlockBlobsStageBlockFromURLHeaders model. */ -@Fluent +@Metadata(conditions = { TypeConditions.FLUENT }) public final class BlockBlobsStageBlockFromURLHeaders { /* * The x-ms-version property. @@ -70,15 +69,19 @@ public final class BlockBlobsStageBlockFromURLHeaders { private static final HttpHeaderName X_MS_ENCRYPTION_KEY_SHA256 = HttpHeaderName.fromString("x-ms-encryption-key-sha256"); + private static final HttpHeaderName X_MS_REQUEST_ID = HttpHeaderName.fromString("x-ms-request-id"); + private static final HttpHeaderName X_MS_REQUEST_SERVER_ENCRYPTED = HttpHeaderName.fromString("x-ms-request-server-encrypted"); + private static final HttpHeaderName X_MS_CLIENT_REQUEST_ID = HttpHeaderName.fromString("x-ms-client-request-id"); + private static final HttpHeaderName X_MS_ENCRYPTION_SCOPE = HttpHeaderName.fromString("x-ms-encryption-scope"); // HttpHeaders containing the raw property values. /** * Creates an instance of BlockBlobsStageBlockFromURLHeaders class. - * + * * @param rawHeaders The raw HttpHeaders that will be used to create the property values. */ public BlockBlobsStageBlockFromURLHeaders(HttpHeaders rawHeaders) { @@ -88,12 +91,12 @@ public BlockBlobsStageBlockFromURLHeaders(HttpHeaders rawHeaders) { this.xMsContentCrc64 = Base64.getDecoder().decode(xMsContentCrc64); } this.xMsEncryptionKeySha256 = rawHeaders.getValue(X_MS_ENCRYPTION_KEY_SHA256); - this.xMsRequestId = rawHeaders.getValue(HttpHeaderName.fromString("x-ms-request-id")); + this.xMsRequestId = rawHeaders.getValue(X_MS_REQUEST_ID); String xMsRequestServerEncrypted = rawHeaders.getValue(X_MS_REQUEST_SERVER_ENCRYPTED); if (xMsRequestServerEncrypted != null) { this.xMsRequestServerEncrypted = Boolean.parseBoolean(xMsRequestServerEncrypted); } - this.xMsClientRequestId = rawHeaders.getValue(HttpHeaderName.fromString("x-ms-client-request-id")); + this.xMsClientRequestId = rawHeaders.getValue(X_MS_CLIENT_REQUEST_ID); String date = rawHeaders.getValue(HttpHeaderName.DATE); if (date != null) { this.date = new DateTimeRfc1123(date); @@ -107,7 +110,7 @@ public BlockBlobsStageBlockFromURLHeaders(HttpHeaders rawHeaders) { /** * Get the xMsVersion property: The x-ms-version property. - * + * * @return the xMsVersion value. */ public String getXMsVersion() { @@ -116,7 +119,7 @@ public String getXMsVersion() { /** * Set the xMsVersion property: The x-ms-version property. - * + * * @param xMsVersion the xMsVersion value to set. * @return the BlockBlobsStageBlockFromURLHeaders object itself. */ @@ -127,27 +130,27 @@ public BlockBlobsStageBlockFromURLHeaders setXMsVersion(String xMsVersion) { /** * Get the xMsContentCrc64 property: The x-ms-content-crc64 property. - * + * * @return the xMsContentCrc64 value. */ public byte[] getXMsContentCrc64() { - return CoreUtils.clone(this.xMsContentCrc64); + return this.xMsContentCrc64; } /** * Set the xMsContentCrc64 property: The x-ms-content-crc64 property. - * + * * @param xMsContentCrc64 the xMsContentCrc64 value to set. * @return the BlockBlobsStageBlockFromURLHeaders object itself. */ public BlockBlobsStageBlockFromURLHeaders setXMsContentCrc64(byte[] xMsContentCrc64) { - this.xMsContentCrc64 = CoreUtils.clone(xMsContentCrc64); + this.xMsContentCrc64 = xMsContentCrc64; return this; } /** * Get the xMsEncryptionKeySha256 property: The x-ms-encryption-key-sha256 property. - * + * * @return the xMsEncryptionKeySha256 value. */ public String getXMsEncryptionKeySha256() { @@ -156,7 +159,7 @@ public String getXMsEncryptionKeySha256() { /** * Set the xMsEncryptionKeySha256 property: The x-ms-encryption-key-sha256 property. - * + * * @param xMsEncryptionKeySha256 the xMsEncryptionKeySha256 value to set. * @return the BlockBlobsStageBlockFromURLHeaders object itself. */ @@ -167,7 +170,7 @@ public BlockBlobsStageBlockFromURLHeaders setXMsEncryptionKeySha256(String xMsEn /** * Get the xMsRequestId property: The x-ms-request-id property. - * + * * @return the xMsRequestId value. */ public String getXMsRequestId() { @@ -176,7 +179,7 @@ public String getXMsRequestId() { /** * Set the xMsRequestId property: The x-ms-request-id property. - * + * * @param xMsRequestId the xMsRequestId value to set. * @return the BlockBlobsStageBlockFromURLHeaders object itself. */ @@ -187,7 +190,7 @@ public BlockBlobsStageBlockFromURLHeaders setXMsRequestId(String xMsRequestId) { /** * Get the xMsRequestServerEncrypted property: The x-ms-request-server-encrypted property. - * + * * @return the xMsRequestServerEncrypted value. */ public Boolean isXMsRequestServerEncrypted() { @@ -196,7 +199,7 @@ public Boolean isXMsRequestServerEncrypted() { /** * Set the xMsRequestServerEncrypted property: The x-ms-request-server-encrypted property. - * + * * @param xMsRequestServerEncrypted the xMsRequestServerEncrypted value to set. * @return the BlockBlobsStageBlockFromURLHeaders object itself. */ @@ -207,7 +210,7 @@ public BlockBlobsStageBlockFromURLHeaders setXMsRequestServerEncrypted(Boolean x /** * Get the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @return the xMsClientRequestId value. */ public String getXMsClientRequestId() { @@ -216,7 +219,7 @@ public String getXMsClientRequestId() { /** * Set the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @param xMsClientRequestId the xMsClientRequestId value to set. * @return the BlockBlobsStageBlockFromURLHeaders object itself. */ @@ -227,7 +230,7 @@ public BlockBlobsStageBlockFromURLHeaders setXMsClientRequestId(String xMsClient /** * Get the date property: The Date property. - * + * * @return the date value. */ public OffsetDateTime getDate() { @@ -239,7 +242,7 @@ public OffsetDateTime getDate() { /** * Set the date property: The Date property. - * + * * @param date the date value to set. * @return the BlockBlobsStageBlockFromURLHeaders object itself. */ @@ -254,27 +257,27 @@ public BlockBlobsStageBlockFromURLHeaders setDate(OffsetDateTime date) { /** * Get the contentMD5 property: The Content-MD5 property. - * + * * @return the contentMD5 value. */ public byte[] getContentMD5() { - return CoreUtils.clone(this.contentMD5); + return this.contentMD5; } /** * Set the contentMD5 property: The Content-MD5 property. - * + * * @param contentMD5 the contentMD5 value to set. * @return the BlockBlobsStageBlockFromURLHeaders object itself. */ public BlockBlobsStageBlockFromURLHeaders setContentMD5(byte[] contentMD5) { - this.contentMD5 = CoreUtils.clone(contentMD5); + this.contentMD5 = contentMD5; return this; } /** * Get the xMsEncryptionScope property: The x-ms-encryption-scope property. - * + * * @return the xMsEncryptionScope value. */ public String getXMsEncryptionScope() { @@ -283,7 +286,7 @@ public String getXMsEncryptionScope() { /** * Set the xMsEncryptionScope property: The x-ms-encryption-scope property. - * + * * @param xMsEncryptionScope the xMsEncryptionScope value to set. * @return the BlockBlobsStageBlockFromURLHeaders object itself. */ diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlockBlobsStageBlockHeaders.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlockBlobsStageBlockHeaders.java index da88b413bcbb..394184c165f7 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlockBlobsStageBlockHeaders.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlockBlobsStageBlockHeaders.java @@ -4,19 +4,18 @@ package com.azure.v2.storage.blob.models; -import com.azure.v2.core.annotation.Fluent; -import com.azure.v2.core.util.CoreUtils; +import io.clientcore.core.annotations.Metadata; +import io.clientcore.core.annotations.TypeConditions; import io.clientcore.core.http.models.HttpHeaderName; import io.clientcore.core.http.models.HttpHeaders; -import io.clientcore.core.util.DateTimeRfc1123; - +import io.clientcore.core.utils.DateTimeRfc1123; import java.time.OffsetDateTime; import java.util.Base64; /** * The BlockBlobsStageBlockHeaders model. */ -@Fluent +@Metadata(conditions = { TypeConditions.FLUENT }) public final class BlockBlobsStageBlockHeaders { /* * The x-ms-version property. @@ -77,15 +76,19 @@ public final class BlockBlobsStageBlockHeaders { private static final HttpHeaderName X_MS_STRUCTURED_BODY = HttpHeaderName.fromString("x-ms-structured-body"); + private static final HttpHeaderName X_MS_REQUEST_ID = HttpHeaderName.fromString("x-ms-request-id"); + private static final HttpHeaderName X_MS_REQUEST_SERVER_ENCRYPTED = HttpHeaderName.fromString("x-ms-request-server-encrypted"); + private static final HttpHeaderName X_MS_CLIENT_REQUEST_ID = HttpHeaderName.fromString("x-ms-client-request-id"); + private static final HttpHeaderName X_MS_ENCRYPTION_SCOPE = HttpHeaderName.fromString("x-ms-encryption-scope"); // HttpHeaders containing the raw property values. /** * Creates an instance of BlockBlobsStageBlockHeaders class. - * + * * @param rawHeaders The raw HttpHeaders that will be used to create the property values. */ public BlockBlobsStageBlockHeaders(HttpHeaders rawHeaders) { @@ -96,12 +99,12 @@ public BlockBlobsStageBlockHeaders(HttpHeaders rawHeaders) { } this.xMsEncryptionKeySha256 = rawHeaders.getValue(X_MS_ENCRYPTION_KEY_SHA256); this.xMsStructuredBody = rawHeaders.getValue(X_MS_STRUCTURED_BODY); - this.xMsRequestId = rawHeaders.getValue(HttpHeaderName.fromString("x-ms-request-id")); + this.xMsRequestId = rawHeaders.getValue(X_MS_REQUEST_ID); String xMsRequestServerEncrypted = rawHeaders.getValue(X_MS_REQUEST_SERVER_ENCRYPTED); if (xMsRequestServerEncrypted != null) { this.xMsRequestServerEncrypted = Boolean.parseBoolean(xMsRequestServerEncrypted); } - this.xMsClientRequestId = rawHeaders.getValue(HttpHeaderName.fromString("x-ms-client-request-id")); + this.xMsClientRequestId = rawHeaders.getValue(X_MS_CLIENT_REQUEST_ID); String date = rawHeaders.getValue(HttpHeaderName.DATE); if (date != null) { this.date = new DateTimeRfc1123(date); @@ -115,7 +118,7 @@ public BlockBlobsStageBlockHeaders(HttpHeaders rawHeaders) { /** * Get the xMsVersion property: The x-ms-version property. - * + * * @return the xMsVersion value. */ public String getXMsVersion() { @@ -124,7 +127,7 @@ public String getXMsVersion() { /** * Set the xMsVersion property: The x-ms-version property. - * + * * @param xMsVersion the xMsVersion value to set. * @return the BlockBlobsStageBlockHeaders object itself. */ @@ -135,27 +138,27 @@ public BlockBlobsStageBlockHeaders setXMsVersion(String xMsVersion) { /** * Get the xMsContentCrc64 property: The x-ms-content-crc64 property. - * + * * @return the xMsContentCrc64 value. */ public byte[] getXMsContentCrc64() { - return CoreUtils.clone(this.xMsContentCrc64); + return this.xMsContentCrc64; } /** * Set the xMsContentCrc64 property: The x-ms-content-crc64 property. - * + * * @param xMsContentCrc64 the xMsContentCrc64 value to set. * @return the BlockBlobsStageBlockHeaders object itself. */ public BlockBlobsStageBlockHeaders setXMsContentCrc64(byte[] xMsContentCrc64) { - this.xMsContentCrc64 = CoreUtils.clone(xMsContentCrc64); + this.xMsContentCrc64 = xMsContentCrc64; return this; } /** * Get the xMsEncryptionKeySha256 property: The x-ms-encryption-key-sha256 property. - * + * * @return the xMsEncryptionKeySha256 value. */ public String getXMsEncryptionKeySha256() { @@ -164,7 +167,7 @@ public String getXMsEncryptionKeySha256() { /** * Set the xMsEncryptionKeySha256 property: The x-ms-encryption-key-sha256 property. - * + * * @param xMsEncryptionKeySha256 the xMsEncryptionKeySha256 value to set. * @return the BlockBlobsStageBlockHeaders object itself. */ @@ -175,7 +178,7 @@ public BlockBlobsStageBlockHeaders setXMsEncryptionKeySha256(String xMsEncryptio /** * Get the xMsStructuredBody property: The x-ms-structured-body property. - * + * * @return the xMsStructuredBody value. */ public String getXMsStructuredBody() { @@ -184,7 +187,7 @@ public String getXMsStructuredBody() { /** * Set the xMsStructuredBody property: The x-ms-structured-body property. - * + * * @param xMsStructuredBody the xMsStructuredBody value to set. * @return the BlockBlobsStageBlockHeaders object itself. */ @@ -195,7 +198,7 @@ public BlockBlobsStageBlockHeaders setXMsStructuredBody(String xMsStructuredBody /** * Get the xMsRequestId property: The x-ms-request-id property. - * + * * @return the xMsRequestId value. */ public String getXMsRequestId() { @@ -204,7 +207,7 @@ public String getXMsRequestId() { /** * Set the xMsRequestId property: The x-ms-request-id property. - * + * * @param xMsRequestId the xMsRequestId value to set. * @return the BlockBlobsStageBlockHeaders object itself. */ @@ -215,7 +218,7 @@ public BlockBlobsStageBlockHeaders setXMsRequestId(String xMsRequestId) { /** * Get the xMsRequestServerEncrypted property: The x-ms-request-server-encrypted property. - * + * * @return the xMsRequestServerEncrypted value. */ public Boolean isXMsRequestServerEncrypted() { @@ -224,7 +227,7 @@ public Boolean isXMsRequestServerEncrypted() { /** * Set the xMsRequestServerEncrypted property: The x-ms-request-server-encrypted property. - * + * * @param xMsRequestServerEncrypted the xMsRequestServerEncrypted value to set. * @return the BlockBlobsStageBlockHeaders object itself. */ @@ -235,7 +238,7 @@ public BlockBlobsStageBlockHeaders setXMsRequestServerEncrypted(Boolean xMsReque /** * Get the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @return the xMsClientRequestId value. */ public String getXMsClientRequestId() { @@ -244,7 +247,7 @@ public String getXMsClientRequestId() { /** * Set the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @param xMsClientRequestId the xMsClientRequestId value to set. * @return the BlockBlobsStageBlockHeaders object itself. */ @@ -255,7 +258,7 @@ public BlockBlobsStageBlockHeaders setXMsClientRequestId(String xMsClientRequest /** * Get the date property: The Date property. - * + * * @return the date value. */ public OffsetDateTime getDate() { @@ -267,7 +270,7 @@ public OffsetDateTime getDate() { /** * Set the date property: The Date property. - * + * * @param date the date value to set. * @return the BlockBlobsStageBlockHeaders object itself. */ @@ -282,27 +285,27 @@ public BlockBlobsStageBlockHeaders setDate(OffsetDateTime date) { /** * Get the contentMD5 property: The Content-MD5 property. - * + * * @return the contentMD5 value. */ public byte[] getContentMD5() { - return CoreUtils.clone(this.contentMD5); + return this.contentMD5; } /** * Set the contentMD5 property: The Content-MD5 property. - * + * * @param contentMD5 the contentMD5 value to set. * @return the BlockBlobsStageBlockHeaders object itself. */ public BlockBlobsStageBlockHeaders setContentMD5(byte[] contentMD5) { - this.contentMD5 = CoreUtils.clone(contentMD5); + this.contentMD5 = contentMD5; return this; } /** * Get the xMsEncryptionScope property: The x-ms-encryption-scope property. - * + * * @return the xMsEncryptionScope value. */ public String getXMsEncryptionScope() { @@ -311,7 +314,7 @@ public String getXMsEncryptionScope() { /** * Set the xMsEncryptionScope property: The x-ms-encryption-scope property. - * + * * @param xMsEncryptionScope the xMsEncryptionScope value to set. * @return the BlockBlobsStageBlockHeaders object itself. */ diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlockBlobsUploadHeaders.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlockBlobsUploadHeaders.java index 34f924e91714..1437c6295585 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlockBlobsUploadHeaders.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlockBlobsUploadHeaders.java @@ -4,19 +4,18 @@ package com.azure.v2.storage.blob.models; -import com.azure.v2.core.annotation.Fluent; -import com.azure.v2.core.util.CoreUtils; +import io.clientcore.core.annotations.Metadata; +import io.clientcore.core.annotations.TypeConditions; import io.clientcore.core.http.models.HttpHeaderName; import io.clientcore.core.http.models.HttpHeaders; -import io.clientcore.core.util.DateTimeRfc1123; - +import io.clientcore.core.utils.DateTimeRfc1123; import java.time.OffsetDateTime; import java.util.Base64; /** * The BlockBlobsUploadHeaders model. */ -@Fluent +@Metadata(conditions = { TypeConditions.FLUENT }) public final class BlockBlobsUploadHeaders { /* * The x-ms-version property. @@ -87,15 +86,19 @@ public final class BlockBlobsUploadHeaders { private static final HttpHeaderName X_MS_STRUCTURED_BODY = HttpHeaderName.fromString("x-ms-structured-body"); + private static final HttpHeaderName X_MS_REQUEST_ID = HttpHeaderName.fromString("x-ms-request-id"); + private static final HttpHeaderName X_MS_REQUEST_SERVER_ENCRYPTED = HttpHeaderName.fromString("x-ms-request-server-encrypted"); + private static final HttpHeaderName X_MS_CLIENT_REQUEST_ID = HttpHeaderName.fromString("x-ms-client-request-id"); + private static final HttpHeaderName X_MS_ENCRYPTION_SCOPE = HttpHeaderName.fromString("x-ms-encryption-scope"); // HttpHeaders containing the raw property values. /** * Creates an instance of BlockBlobsUploadHeaders class. - * + * * @param rawHeaders The raw HttpHeaders that will be used to create the property values. */ public BlockBlobsUploadHeaders(HttpHeaders rawHeaders) { @@ -108,12 +111,12 @@ public BlockBlobsUploadHeaders(HttpHeaders rawHeaders) { this.xMsVersionId = rawHeaders.getValue(X_MS_VERSION_ID); this.xMsEncryptionKeySha256 = rawHeaders.getValue(X_MS_ENCRYPTION_KEY_SHA256); this.xMsStructuredBody = rawHeaders.getValue(X_MS_STRUCTURED_BODY); - this.xMsRequestId = rawHeaders.getValue(HttpHeaderName.fromString("x-ms-request-id")); + this.xMsRequestId = rawHeaders.getValue(X_MS_REQUEST_ID); String xMsRequestServerEncrypted = rawHeaders.getValue(X_MS_REQUEST_SERVER_ENCRYPTED); if (xMsRequestServerEncrypted != null) { this.xMsRequestServerEncrypted = Boolean.parseBoolean(xMsRequestServerEncrypted); } - this.xMsClientRequestId = rawHeaders.getValue(HttpHeaderName.fromString("x-ms-client-request-id")); + this.xMsClientRequestId = rawHeaders.getValue(X_MS_CLIENT_REQUEST_ID); String date = rawHeaders.getValue(HttpHeaderName.DATE); if (date != null) { this.date = new DateTimeRfc1123(date); @@ -127,7 +130,7 @@ public BlockBlobsUploadHeaders(HttpHeaders rawHeaders) { /** * Get the xMsVersion property: The x-ms-version property. - * + * * @return the xMsVersion value. */ public String getXMsVersion() { @@ -136,7 +139,7 @@ public String getXMsVersion() { /** * Set the xMsVersion property: The x-ms-version property. - * + * * @param xMsVersion the xMsVersion value to set. * @return the BlockBlobsUploadHeaders object itself. */ @@ -147,7 +150,7 @@ public BlockBlobsUploadHeaders setXMsVersion(String xMsVersion) { /** * Get the eTag property: The ETag property. - * + * * @return the eTag value. */ public String getETag() { @@ -156,7 +159,7 @@ public String getETag() { /** * Set the eTag property: The ETag property. - * + * * @param eTag the eTag value to set. * @return the BlockBlobsUploadHeaders object itself. */ @@ -167,7 +170,7 @@ public BlockBlobsUploadHeaders setETag(String eTag) { /** * Get the lastModified property: The Last-Modified property. - * + * * @return the lastModified value. */ public OffsetDateTime getLastModified() { @@ -179,7 +182,7 @@ public OffsetDateTime getLastModified() { /** * Set the lastModified property: The Last-Modified property. - * + * * @param lastModified the lastModified value to set. * @return the BlockBlobsUploadHeaders object itself. */ @@ -194,7 +197,7 @@ public BlockBlobsUploadHeaders setLastModified(OffsetDateTime lastModified) { /** * Get the xMsVersionId property: The x-ms-version-id property. - * + * * @return the xMsVersionId value. */ public String getXMsVersionId() { @@ -203,7 +206,7 @@ public String getXMsVersionId() { /** * Set the xMsVersionId property: The x-ms-version-id property. - * + * * @param xMsVersionId the xMsVersionId value to set. * @return the BlockBlobsUploadHeaders object itself. */ @@ -214,7 +217,7 @@ public BlockBlobsUploadHeaders setXMsVersionId(String xMsVersionId) { /** * Get the xMsEncryptionKeySha256 property: The x-ms-encryption-key-sha256 property. - * + * * @return the xMsEncryptionKeySha256 value. */ public String getXMsEncryptionKeySha256() { @@ -223,7 +226,7 @@ public String getXMsEncryptionKeySha256() { /** * Set the xMsEncryptionKeySha256 property: The x-ms-encryption-key-sha256 property. - * + * * @param xMsEncryptionKeySha256 the xMsEncryptionKeySha256 value to set. * @return the BlockBlobsUploadHeaders object itself. */ @@ -234,7 +237,7 @@ public BlockBlobsUploadHeaders setXMsEncryptionKeySha256(String xMsEncryptionKey /** * Get the xMsStructuredBody property: The x-ms-structured-body property. - * + * * @return the xMsStructuredBody value. */ public String getXMsStructuredBody() { @@ -243,7 +246,7 @@ public String getXMsStructuredBody() { /** * Set the xMsStructuredBody property: The x-ms-structured-body property. - * + * * @param xMsStructuredBody the xMsStructuredBody value to set. * @return the BlockBlobsUploadHeaders object itself. */ @@ -254,7 +257,7 @@ public BlockBlobsUploadHeaders setXMsStructuredBody(String xMsStructuredBody) { /** * Get the xMsRequestId property: The x-ms-request-id property. - * + * * @return the xMsRequestId value. */ public String getXMsRequestId() { @@ -263,7 +266,7 @@ public String getXMsRequestId() { /** * Set the xMsRequestId property: The x-ms-request-id property. - * + * * @param xMsRequestId the xMsRequestId value to set. * @return the BlockBlobsUploadHeaders object itself. */ @@ -274,7 +277,7 @@ public BlockBlobsUploadHeaders setXMsRequestId(String xMsRequestId) { /** * Get the xMsRequestServerEncrypted property: The x-ms-request-server-encrypted property. - * + * * @return the xMsRequestServerEncrypted value. */ public Boolean isXMsRequestServerEncrypted() { @@ -283,7 +286,7 @@ public Boolean isXMsRequestServerEncrypted() { /** * Set the xMsRequestServerEncrypted property: The x-ms-request-server-encrypted property. - * + * * @param xMsRequestServerEncrypted the xMsRequestServerEncrypted value to set. * @return the BlockBlobsUploadHeaders object itself. */ @@ -294,7 +297,7 @@ public BlockBlobsUploadHeaders setXMsRequestServerEncrypted(Boolean xMsRequestSe /** * Get the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @return the xMsClientRequestId value. */ public String getXMsClientRequestId() { @@ -303,7 +306,7 @@ public String getXMsClientRequestId() { /** * Set the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @param xMsClientRequestId the xMsClientRequestId value to set. * @return the BlockBlobsUploadHeaders object itself. */ @@ -314,7 +317,7 @@ public BlockBlobsUploadHeaders setXMsClientRequestId(String xMsClientRequestId) /** * Get the date property: The Date property. - * + * * @return the date value. */ public OffsetDateTime getDate() { @@ -326,7 +329,7 @@ public OffsetDateTime getDate() { /** * Set the date property: The Date property. - * + * * @param date the date value to set. * @return the BlockBlobsUploadHeaders object itself. */ @@ -341,27 +344,27 @@ public BlockBlobsUploadHeaders setDate(OffsetDateTime date) { /** * Get the contentMD5 property: The Content-MD5 property. - * + * * @return the contentMD5 value. */ public byte[] getContentMD5() { - return CoreUtils.clone(this.contentMD5); + return this.contentMD5; } /** * Set the contentMD5 property: The Content-MD5 property. - * + * * @param contentMD5 the contentMD5 value to set. * @return the BlockBlobsUploadHeaders object itself. */ public BlockBlobsUploadHeaders setContentMD5(byte[] contentMD5) { - this.contentMD5 = CoreUtils.clone(contentMD5); + this.contentMD5 = contentMD5; return this; } /** * Get the xMsEncryptionScope property: The x-ms-encryption-scope property. - * + * * @return the xMsEncryptionScope value. */ public String getXMsEncryptionScope() { @@ -370,7 +373,7 @@ public String getXMsEncryptionScope() { /** * Set the xMsEncryptionScope property: The x-ms-encryption-scope property. - * + * * @param xMsEncryptionScope the xMsEncryptionScope value to set. * @return the BlockBlobsUploadHeaders object itself. */ diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlockList.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlockList.java index d074f14ed4c0..7eb0e602cc58 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlockList.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlockList.java @@ -4,22 +4,21 @@ package com.azure.v2.storage.blob.models; -import com.azure.v2.core.annotation.Fluent; -import com.azure.v2.core.util.CoreUtils; +import io.clientcore.core.annotations.Metadata; +import io.clientcore.core.annotations.TypeConditions; import io.clientcore.core.serialization.xml.XmlReader; import io.clientcore.core.serialization.xml.XmlSerializable; import io.clientcore.core.serialization.xml.XmlToken; import io.clientcore.core.serialization.xml.XmlWriter; - -import javax.xml.namespace.QName; -import javax.xml.stream.XMLStreamException; import java.util.ArrayList; import java.util.List; +import javax.xml.namespace.QName; +import javax.xml.stream.XMLStreamException; /** * The BlockList model. */ -@Fluent +@Metadata(conditions = { TypeConditions.FLUENT }) public final class BlockList implements XmlSerializable { /* * The CommittedBlocks property. @@ -39,7 +38,7 @@ public BlockList() { /** * Get the committedBlocks property: The CommittedBlocks property. - * + * * @return the committedBlocks value. */ public List getCommittedBlocks() { @@ -51,7 +50,7 @@ public List getCommittedBlocks() { /** * Set the committedBlocks property: The CommittedBlocks property. - * + * * @param committedBlocks the committedBlocks value to set. * @return the BlockList object itself. */ @@ -62,7 +61,7 @@ public BlockList setCommittedBlocks(List committedBlocks) { /** * Get the uncommittedBlocks property: The UncommittedBlocks property. - * + * * @return the uncommittedBlocks value. */ public List getUncommittedBlocks() { @@ -74,7 +73,7 @@ public List getUncommittedBlocks() { /** * Set the uncommittedBlocks property: The UncommittedBlocks property. - * + * * @param uncommittedBlocks the uncommittedBlocks value to set. * @return the BlockList object itself. */ @@ -90,7 +89,7 @@ public XmlWriter toXml(XmlWriter xmlWriter) throws XMLStreamException { @Override public XmlWriter toXml(XmlWriter xmlWriter, String rootElementName) throws XMLStreamException { - rootElementName = CoreUtils.isNullOrEmpty(rootElementName) ? "BlockList" : rootElementName; + rootElementName = rootElementName == null || rootElementName.isEmpty() ? "BlockList" : rootElementName; xmlWriter.writeStartElement(rootElementName); if (this.committedBlocks != null) { xmlWriter.writeStartElement("CommittedBlocks"); @@ -111,7 +110,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. @@ -123,7 +122,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. @@ -132,7 +131,8 @@ public static BlockList fromXml(XmlReader xmlReader) throws XMLStreamException { * @throws XMLStreamException If an error occurs while reading the BlockList. */ public static BlockList fromXml(XmlReader xmlReader, String rootElementName) throws XMLStreamException { - String finalRootElementName = CoreUtils.isNullOrEmpty(rootElementName) ? "BlockList" : rootElementName; + String finalRootElementName + = rootElementName == null || rootElementName.isEmpty() ? "BlockList" : rootElementName; return xmlReader.readObject(finalRootElementName, reader -> { BlockList deserializedBlockList = new BlockList(); while (reader.nextElement() != XmlToken.END_ELEMENT) { diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlockListType.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlockListType.java index afe97c7e9940..7e8fda0bfc67 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlockListType.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlockListType.java @@ -34,7 +34,7 @@ public enum BlockListType { /** * Parses a serialized value to a BlockListType instance. - * + * * @param value the serialized value to parse. * @return the parsed BlockListType object, or null if unable to parse. */ diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlockLookupList.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlockLookupList.java index 63868cfd0fc8..8d0eb895e91d 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlockLookupList.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/BlockLookupList.java @@ -4,22 +4,21 @@ package com.azure.v2.storage.blob.models; -import com.azure.v2.core.annotation.Fluent; -import com.azure.v2.core.util.CoreUtils; +import io.clientcore.core.annotations.Metadata; +import io.clientcore.core.annotations.TypeConditions; import io.clientcore.core.serialization.xml.XmlReader; import io.clientcore.core.serialization.xml.XmlSerializable; import io.clientcore.core.serialization.xml.XmlToken; import io.clientcore.core.serialization.xml.XmlWriter; - -import javax.xml.namespace.QName; -import javax.xml.stream.XMLStreamException; import java.util.ArrayList; import java.util.List; +import javax.xml.namespace.QName; +import javax.xml.stream.XMLStreamException; /** * The BlockLookupList model. */ -@Fluent +@Metadata(conditions = { TypeConditions.FLUENT }) public final class BlockLookupList implements XmlSerializable { /* * The Committed property. @@ -44,7 +43,7 @@ public BlockLookupList() { /** * Get the committed property: The Committed property. - * + * * @return the committed value. */ public List getCommitted() { @@ -53,7 +52,7 @@ public List getCommitted() { /** * Set the committed property: The Committed property. - * + * * @param committed the committed value to set. * @return the BlockLookupList object itself. */ @@ -64,7 +63,7 @@ public BlockLookupList setCommitted(List committed) { /** * Get the uncommitted property: The Uncommitted property. - * + * * @return the uncommitted value. */ public List getUncommitted() { @@ -73,7 +72,7 @@ public List getUncommitted() { /** * Set the uncommitted property: The Uncommitted property. - * + * * @param uncommitted the uncommitted value to set. * @return the BlockLookupList object itself. */ @@ -84,7 +83,7 @@ public BlockLookupList setUncommitted(List uncommitted) { /** * Get the latest property: The Latest property. - * + * * @return the latest value. */ public List getLatest() { @@ -93,7 +92,7 @@ public List getLatest() { /** * Set the latest property: The Latest property. - * + * * @param latest the latest value to set. * @return the BlockLookupList object itself. */ @@ -109,7 +108,7 @@ public XmlWriter toXml(XmlWriter xmlWriter) throws XMLStreamException { @Override public XmlWriter toXml(XmlWriter xmlWriter, String rootElementName) throws XMLStreamException { - rootElementName = CoreUtils.isNullOrEmpty(rootElementName) ? "BlockList" : rootElementName; + rootElementName = rootElementName == null || rootElementName.isEmpty() ? "BlockList" : rootElementName; xmlWriter.writeStartElement(rootElementName); if (this.committed != null) { for (String element : this.committed) { @@ -131,7 +130,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. @@ -143,7 +142,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. @@ -152,7 +151,8 @@ public static BlockLookupList fromXml(XmlReader xmlReader) throws XMLStreamExcep * @throws XMLStreamException If an error occurs while reading the BlockLookupList. */ public static BlockLookupList fromXml(XmlReader xmlReader, String rootElementName) throws XMLStreamException { - String finalRootElementName = CoreUtils.isNullOrEmpty(rootElementName) ? "BlockList" : rootElementName; + String finalRootElementName + = rootElementName == null || rootElementName.isEmpty() ? "BlockList" : rootElementName; return xmlReader.readObject(finalRootElementName, reader -> { BlockLookupList deserializedBlockLookupList = new BlockLookupList(); while (reader.nextElement() != XmlToken.END_ELEMENT) { diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ClearRange.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ClearRange.java index 829cbb0718f0..dba994238def 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ClearRange.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ClearRange.java @@ -4,20 +4,19 @@ package com.azure.v2.storage.blob.models; -import com.azure.v2.core.annotation.Fluent; -import com.azure.v2.core.util.CoreUtils; +import io.clientcore.core.annotations.Metadata; +import io.clientcore.core.annotations.TypeConditions; import io.clientcore.core.serialization.xml.XmlReader; import io.clientcore.core.serialization.xml.XmlSerializable; import io.clientcore.core.serialization.xml.XmlToken; import io.clientcore.core.serialization.xml.XmlWriter; - import javax.xml.namespace.QName; import javax.xml.stream.XMLStreamException; /** * The ClearRange model. */ -@Fluent +@Metadata(conditions = { TypeConditions.FLUENT }) public final class ClearRange implements XmlSerializable { /* * The Start property. @@ -37,7 +36,7 @@ public ClearRange() { /** * Get the start property: The Start property. - * + * * @return the start value. */ public long getStart() { @@ -46,7 +45,7 @@ public long getStart() { /** * Set the start property: The Start property. - * + * * @param start the start value to set. * @return the ClearRange object itself. */ @@ -57,7 +56,7 @@ public ClearRange setStart(long start) { /** * Get the end property: The End property. - * + * * @return the end value. */ public long getEnd() { @@ -66,7 +65,7 @@ public long getEnd() { /** * Set the end property: The End property. - * + * * @param end the end value to set. * @return the ClearRange object itself. */ @@ -82,7 +81,7 @@ public XmlWriter toXml(XmlWriter xmlWriter) throws XMLStreamException { @Override public XmlWriter toXml(XmlWriter xmlWriter, String rootElementName) throws XMLStreamException { - rootElementName = CoreUtils.isNullOrEmpty(rootElementName) ? "ClearRange" : rootElementName; + rootElementName = rootElementName == null || rootElementName.isEmpty() ? "ClearRange" : rootElementName; xmlWriter.writeStartElement(rootElementName); xmlWriter.writeLongElement("Start", this.start); xmlWriter.writeLongElement("End", this.end); @@ -91,7 +90,7 @@ 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. @@ -103,7 +102,7 @@ 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. @@ -112,7 +111,8 @@ public static ClearRange fromXml(XmlReader xmlReader) throws XMLStreamException * @throws XMLStreamException If an error occurs while reading the ClearRange. */ public static ClearRange fromXml(XmlReader xmlReader, String rootElementName) throws XMLStreamException { - String finalRootElementName = CoreUtils.isNullOrEmpty(rootElementName) ? "ClearRange" : rootElementName; + String finalRootElementName + = rootElementName == null || rootElementName.isEmpty() ? "ClearRange" : rootElementName; return xmlReader.readObject(finalRootElementName, reader -> { ClearRange deserializedClearRange = new ClearRange(); while (reader.nextElement() != XmlToken.END_ELEMENT) { diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ContainersAcquireLeaseHeaders.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ContainersAcquireLeaseHeaders.java index 8648ac085917..e4ed70561416 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ContainersAcquireLeaseHeaders.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ContainersAcquireLeaseHeaders.java @@ -4,17 +4,17 @@ package com.azure.v2.storage.blob.models; -import com.azure.v2.core.annotation.Fluent; +import io.clientcore.core.annotations.Metadata; +import io.clientcore.core.annotations.TypeConditions; import io.clientcore.core.http.models.HttpHeaderName; import io.clientcore.core.http.models.HttpHeaders; -import io.clientcore.core.util.DateTimeRfc1123; - +import io.clientcore.core.utils.DateTimeRfc1123; import java.time.OffsetDateTime; /** * The ContainersAcquireLeaseHeaders model. */ -@Fluent +@Metadata(conditions = { TypeConditions.FLUENT }) public final class ContainersAcquireLeaseHeaders { /* * The x-ms-version property. @@ -55,10 +55,14 @@ public final class ContainersAcquireLeaseHeaders { private static final HttpHeaderName X_MS_LEASE_ID = HttpHeaderName.fromString("x-ms-lease-id"); + private static final HttpHeaderName X_MS_REQUEST_ID = HttpHeaderName.fromString("x-ms-request-id"); + + private static final HttpHeaderName X_MS_CLIENT_REQUEST_ID = HttpHeaderName.fromString("x-ms-client-request-id"); + // HttpHeaders containing the raw property values. /** * Creates an instance of ContainersAcquireLeaseHeaders class. - * + * * @param rawHeaders The raw HttpHeaders that will be used to create the property values. */ public ContainersAcquireLeaseHeaders(HttpHeaders rawHeaders) { @@ -69,8 +73,8 @@ public ContainersAcquireLeaseHeaders(HttpHeaders rawHeaders) { if (lastModified != null) { this.lastModified = new DateTimeRfc1123(lastModified); } - this.xMsRequestId = rawHeaders.getValue(HttpHeaderName.fromString("x-ms-request-id")); - this.xMsClientRequestId = rawHeaders.getValue(HttpHeaderName.fromString("x-ms-client-request-id")); + this.xMsRequestId = rawHeaders.getValue(X_MS_REQUEST_ID); + this.xMsClientRequestId = rawHeaders.getValue(X_MS_CLIENT_REQUEST_ID); String date = rawHeaders.getValue(HttpHeaderName.DATE); if (date != null) { this.date = new DateTimeRfc1123(date); @@ -79,7 +83,7 @@ public ContainersAcquireLeaseHeaders(HttpHeaders rawHeaders) { /** * Get the xMsVersion property: The x-ms-version property. - * + * * @return the xMsVersion value. */ public String getXMsVersion() { @@ -88,7 +92,7 @@ public String getXMsVersion() { /** * Set the xMsVersion property: The x-ms-version property. - * + * * @param xMsVersion the xMsVersion value to set. * @return the ContainersAcquireLeaseHeaders object itself. */ @@ -99,7 +103,7 @@ public ContainersAcquireLeaseHeaders setXMsVersion(String xMsVersion) { /** * Get the eTag property: The ETag property. - * + * * @return the eTag value. */ public String getETag() { @@ -108,7 +112,7 @@ public String getETag() { /** * Set the eTag property: The ETag property. - * + * * @param eTag the eTag value to set. * @return the ContainersAcquireLeaseHeaders object itself. */ @@ -119,7 +123,7 @@ public ContainersAcquireLeaseHeaders setETag(String eTag) { /** * Get the xMsLeaseId property: The x-ms-lease-id property. - * + * * @return the xMsLeaseId value. */ public String getXMsLeaseId() { @@ -128,7 +132,7 @@ public String getXMsLeaseId() { /** * Set the xMsLeaseId property: The x-ms-lease-id property. - * + * * @param xMsLeaseId the xMsLeaseId value to set. * @return the ContainersAcquireLeaseHeaders object itself. */ @@ -139,7 +143,7 @@ public ContainersAcquireLeaseHeaders setXMsLeaseId(String xMsLeaseId) { /** * Get the lastModified property: The Last-Modified property. - * + * * @return the lastModified value. */ public OffsetDateTime getLastModified() { @@ -151,7 +155,7 @@ public OffsetDateTime getLastModified() { /** * Set the lastModified property: The Last-Modified property. - * + * * @param lastModified the lastModified value to set. * @return the ContainersAcquireLeaseHeaders object itself. */ @@ -166,7 +170,7 @@ public ContainersAcquireLeaseHeaders setLastModified(OffsetDateTime lastModified /** * Get the xMsRequestId property: The x-ms-request-id property. - * + * * @return the xMsRequestId value. */ public String getXMsRequestId() { @@ -175,7 +179,7 @@ public String getXMsRequestId() { /** * Set the xMsRequestId property: The x-ms-request-id property. - * + * * @param xMsRequestId the xMsRequestId value to set. * @return the ContainersAcquireLeaseHeaders object itself. */ @@ -186,7 +190,7 @@ public ContainersAcquireLeaseHeaders setXMsRequestId(String xMsRequestId) { /** * Get the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @return the xMsClientRequestId value. */ public String getXMsClientRequestId() { @@ -195,7 +199,7 @@ public String getXMsClientRequestId() { /** * Set the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @param xMsClientRequestId the xMsClientRequestId value to set. * @return the ContainersAcquireLeaseHeaders object itself. */ @@ -206,7 +210,7 @@ public ContainersAcquireLeaseHeaders setXMsClientRequestId(String xMsClientReque /** * Get the date property: The Date property. - * + * * @return the date value. */ public OffsetDateTime getDate() { @@ -218,7 +222,7 @@ public OffsetDateTime getDate() { /** * Set the date property: The Date property. - * + * * @param date the date value to set. * @return the ContainersAcquireLeaseHeaders object itself. */ diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ContainersBreakLeaseHeaders.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ContainersBreakLeaseHeaders.java index 933b45157e19..3190fbe8eab1 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ContainersBreakLeaseHeaders.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ContainersBreakLeaseHeaders.java @@ -4,17 +4,17 @@ package com.azure.v2.storage.blob.models; -import com.azure.v2.core.annotation.Fluent; +import io.clientcore.core.annotations.Metadata; +import io.clientcore.core.annotations.TypeConditions; import io.clientcore.core.http.models.HttpHeaderName; import io.clientcore.core.http.models.HttpHeaders; -import io.clientcore.core.util.DateTimeRfc1123; - +import io.clientcore.core.utils.DateTimeRfc1123; import java.time.OffsetDateTime; /** * The ContainersBreakLeaseHeaders model. */ -@Fluent +@Metadata(conditions = { TypeConditions.FLUENT }) public final class ContainersBreakLeaseHeaders { /* * The x-ms-version property. @@ -55,10 +55,14 @@ public final class ContainersBreakLeaseHeaders { private static final HttpHeaderName X_MS_LEASE_TIME = HttpHeaderName.fromString("x-ms-lease-time"); + private static final HttpHeaderName X_MS_REQUEST_ID = HttpHeaderName.fromString("x-ms-request-id"); + + private static final HttpHeaderName X_MS_CLIENT_REQUEST_ID = HttpHeaderName.fromString("x-ms-client-request-id"); + // HttpHeaders containing the raw property values. /** * Creates an instance of ContainersBreakLeaseHeaders class. - * + * * @param rawHeaders The raw HttpHeaders that will be used to create the property values. */ public ContainersBreakLeaseHeaders(HttpHeaders rawHeaders) { @@ -72,8 +76,8 @@ public ContainersBreakLeaseHeaders(HttpHeaders rawHeaders) { if (lastModified != null) { this.lastModified = new DateTimeRfc1123(lastModified); } - this.xMsRequestId = rawHeaders.getValue(HttpHeaderName.fromString("x-ms-request-id")); - this.xMsClientRequestId = rawHeaders.getValue(HttpHeaderName.fromString("x-ms-client-request-id")); + this.xMsRequestId = rawHeaders.getValue(X_MS_REQUEST_ID); + this.xMsClientRequestId = rawHeaders.getValue(X_MS_CLIENT_REQUEST_ID); String date = rawHeaders.getValue(HttpHeaderName.DATE); if (date != null) { this.date = new DateTimeRfc1123(date); @@ -82,7 +86,7 @@ public ContainersBreakLeaseHeaders(HttpHeaders rawHeaders) { /** * Get the xMsVersion property: The x-ms-version property. - * + * * @return the xMsVersion value. */ public String getXMsVersion() { @@ -91,7 +95,7 @@ public String getXMsVersion() { /** * Set the xMsVersion property: The x-ms-version property. - * + * * @param xMsVersion the xMsVersion value to set. * @return the ContainersBreakLeaseHeaders object itself. */ @@ -102,7 +106,7 @@ public ContainersBreakLeaseHeaders setXMsVersion(String xMsVersion) { /** * Get the eTag property: The ETag property. - * + * * @return the eTag value. */ public String getETag() { @@ -111,7 +115,7 @@ public String getETag() { /** * Set the eTag property: The ETag property. - * + * * @param eTag the eTag value to set. * @return the ContainersBreakLeaseHeaders object itself. */ @@ -122,7 +126,7 @@ public ContainersBreakLeaseHeaders setETag(String eTag) { /** * Get the xMsLeaseTime property: The x-ms-lease-time property. - * + * * @return the xMsLeaseTime value. */ public Integer getXMsLeaseTime() { @@ -131,7 +135,7 @@ public Integer getXMsLeaseTime() { /** * Set the xMsLeaseTime property: The x-ms-lease-time property. - * + * * @param xMsLeaseTime the xMsLeaseTime value to set. * @return the ContainersBreakLeaseHeaders object itself. */ @@ -142,7 +146,7 @@ public ContainersBreakLeaseHeaders setXMsLeaseTime(Integer xMsLeaseTime) { /** * Get the lastModified property: The Last-Modified property. - * + * * @return the lastModified value. */ public OffsetDateTime getLastModified() { @@ -154,7 +158,7 @@ public OffsetDateTime getLastModified() { /** * Set the lastModified property: The Last-Modified property. - * + * * @param lastModified the lastModified value to set. * @return the ContainersBreakLeaseHeaders object itself. */ @@ -169,7 +173,7 @@ public ContainersBreakLeaseHeaders setLastModified(OffsetDateTime lastModified) /** * Get the xMsRequestId property: The x-ms-request-id property. - * + * * @return the xMsRequestId value. */ public String getXMsRequestId() { @@ -178,7 +182,7 @@ public String getXMsRequestId() { /** * Set the xMsRequestId property: The x-ms-request-id property. - * + * * @param xMsRequestId the xMsRequestId value to set. * @return the ContainersBreakLeaseHeaders object itself. */ @@ -189,7 +193,7 @@ public ContainersBreakLeaseHeaders setXMsRequestId(String xMsRequestId) { /** * Get the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @return the xMsClientRequestId value. */ public String getXMsClientRequestId() { @@ -198,7 +202,7 @@ public String getXMsClientRequestId() { /** * Set the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @param xMsClientRequestId the xMsClientRequestId value to set. * @return the ContainersBreakLeaseHeaders object itself. */ @@ -209,7 +213,7 @@ public ContainersBreakLeaseHeaders setXMsClientRequestId(String xMsClientRequest /** * Get the date property: The Date property. - * + * * @return the date value. */ public OffsetDateTime getDate() { @@ -221,7 +225,7 @@ public OffsetDateTime getDate() { /** * Set the date property: The Date property. - * + * * @param date the date value to set. * @return the ContainersBreakLeaseHeaders object itself. */ diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ContainersChangeLeaseHeaders.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ContainersChangeLeaseHeaders.java index b020d22a5954..d0a208db338d 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ContainersChangeLeaseHeaders.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ContainersChangeLeaseHeaders.java @@ -4,17 +4,17 @@ package com.azure.v2.storage.blob.models; -import com.azure.v2.core.annotation.Fluent; +import io.clientcore.core.annotations.Metadata; +import io.clientcore.core.annotations.TypeConditions; import io.clientcore.core.http.models.HttpHeaderName; import io.clientcore.core.http.models.HttpHeaders; -import io.clientcore.core.util.DateTimeRfc1123; - +import io.clientcore.core.utils.DateTimeRfc1123; import java.time.OffsetDateTime; /** * The ContainersChangeLeaseHeaders model. */ -@Fluent +@Metadata(conditions = { TypeConditions.FLUENT }) public final class ContainersChangeLeaseHeaders { /* * The x-ms-version property. @@ -55,10 +55,14 @@ public final class ContainersChangeLeaseHeaders { private static final HttpHeaderName X_MS_LEASE_ID = HttpHeaderName.fromString("x-ms-lease-id"); + private static final HttpHeaderName X_MS_REQUEST_ID = HttpHeaderName.fromString("x-ms-request-id"); + + private static final HttpHeaderName X_MS_CLIENT_REQUEST_ID = HttpHeaderName.fromString("x-ms-client-request-id"); + // HttpHeaders containing the raw property values. /** * Creates an instance of ContainersChangeLeaseHeaders class. - * + * * @param rawHeaders The raw HttpHeaders that will be used to create the property values. */ public ContainersChangeLeaseHeaders(HttpHeaders rawHeaders) { @@ -69,8 +73,8 @@ public ContainersChangeLeaseHeaders(HttpHeaders rawHeaders) { if (lastModified != null) { this.lastModified = new DateTimeRfc1123(lastModified); } - this.xMsRequestId = rawHeaders.getValue(HttpHeaderName.fromString("x-ms-request-id")); - this.xMsClientRequestId = rawHeaders.getValue(HttpHeaderName.fromString("x-ms-client-request-id")); + this.xMsRequestId = rawHeaders.getValue(X_MS_REQUEST_ID); + this.xMsClientRequestId = rawHeaders.getValue(X_MS_CLIENT_REQUEST_ID); String date = rawHeaders.getValue(HttpHeaderName.DATE); if (date != null) { this.date = new DateTimeRfc1123(date); @@ -79,7 +83,7 @@ public ContainersChangeLeaseHeaders(HttpHeaders rawHeaders) { /** * Get the xMsVersion property: The x-ms-version property. - * + * * @return the xMsVersion value. */ public String getXMsVersion() { @@ -88,7 +92,7 @@ public String getXMsVersion() { /** * Set the xMsVersion property: The x-ms-version property. - * + * * @param xMsVersion the xMsVersion value to set. * @return the ContainersChangeLeaseHeaders object itself. */ @@ -99,7 +103,7 @@ public ContainersChangeLeaseHeaders setXMsVersion(String xMsVersion) { /** * Get the eTag property: The ETag property. - * + * * @return the eTag value. */ public String getETag() { @@ -108,7 +112,7 @@ public String getETag() { /** * Set the eTag property: The ETag property. - * + * * @param eTag the eTag value to set. * @return the ContainersChangeLeaseHeaders object itself. */ @@ -119,7 +123,7 @@ public ContainersChangeLeaseHeaders setETag(String eTag) { /** * Get the xMsLeaseId property: The x-ms-lease-id property. - * + * * @return the xMsLeaseId value. */ public String getXMsLeaseId() { @@ -128,7 +132,7 @@ public String getXMsLeaseId() { /** * Set the xMsLeaseId property: The x-ms-lease-id property. - * + * * @param xMsLeaseId the xMsLeaseId value to set. * @return the ContainersChangeLeaseHeaders object itself. */ @@ -139,7 +143,7 @@ public ContainersChangeLeaseHeaders setXMsLeaseId(String xMsLeaseId) { /** * Get the lastModified property: The Last-Modified property. - * + * * @return the lastModified value. */ public OffsetDateTime getLastModified() { @@ -151,7 +155,7 @@ public OffsetDateTime getLastModified() { /** * Set the lastModified property: The Last-Modified property. - * + * * @param lastModified the lastModified value to set. * @return the ContainersChangeLeaseHeaders object itself. */ @@ -166,7 +170,7 @@ public ContainersChangeLeaseHeaders setLastModified(OffsetDateTime lastModified) /** * Get the xMsRequestId property: The x-ms-request-id property. - * + * * @return the xMsRequestId value. */ public String getXMsRequestId() { @@ -175,7 +179,7 @@ public String getXMsRequestId() { /** * Set the xMsRequestId property: The x-ms-request-id property. - * + * * @param xMsRequestId the xMsRequestId value to set. * @return the ContainersChangeLeaseHeaders object itself. */ @@ -186,7 +190,7 @@ public ContainersChangeLeaseHeaders setXMsRequestId(String xMsRequestId) { /** * Get the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @return the xMsClientRequestId value. */ public String getXMsClientRequestId() { @@ -195,7 +199,7 @@ public String getXMsClientRequestId() { /** * Set the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @param xMsClientRequestId the xMsClientRequestId value to set. * @return the ContainersChangeLeaseHeaders object itself. */ @@ -206,7 +210,7 @@ public ContainersChangeLeaseHeaders setXMsClientRequestId(String xMsClientReques /** * Get the date property: The Date property. - * + * * @return the date value. */ public OffsetDateTime getDate() { @@ -218,7 +222,7 @@ public OffsetDateTime getDate() { /** * Set the date property: The Date property. - * + * * @param date the date value to set. * @return the ContainersChangeLeaseHeaders object itself. */ diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ContainersCreateHeaders.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ContainersCreateHeaders.java index fa3bfb63eacc..0aba13a559f2 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ContainersCreateHeaders.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ContainersCreateHeaders.java @@ -4,17 +4,17 @@ package com.azure.v2.storage.blob.models; -import com.azure.v2.core.annotation.Fluent; +import io.clientcore.core.annotations.Metadata; +import io.clientcore.core.annotations.TypeConditions; import io.clientcore.core.http.models.HttpHeaderName; import io.clientcore.core.http.models.HttpHeaders; -import io.clientcore.core.util.DateTimeRfc1123; - +import io.clientcore.core.utils.DateTimeRfc1123; import java.time.OffsetDateTime; /** * The ContainersCreateHeaders model. */ -@Fluent +@Metadata(conditions = { TypeConditions.FLUENT }) public final class ContainersCreateHeaders { /* * The x-ms-version property. @@ -48,10 +48,14 @@ public final class ContainersCreateHeaders { private static final HttpHeaderName X_MS_VERSION = HttpHeaderName.fromString("x-ms-version"); + private static final HttpHeaderName X_MS_REQUEST_ID = HttpHeaderName.fromString("x-ms-request-id"); + + private static final HttpHeaderName X_MS_CLIENT_REQUEST_ID = HttpHeaderName.fromString("x-ms-client-request-id"); + // HttpHeaders containing the raw property values. /** * Creates an instance of ContainersCreateHeaders class. - * + * * @param rawHeaders The raw HttpHeaders that will be used to create the property values. */ public ContainersCreateHeaders(HttpHeaders rawHeaders) { @@ -61,8 +65,8 @@ public ContainersCreateHeaders(HttpHeaders rawHeaders) { if (lastModified != null) { this.lastModified = new DateTimeRfc1123(lastModified); } - this.xMsRequestId = rawHeaders.getValue(HttpHeaderName.fromString("x-ms-request-id")); - this.xMsClientRequestId = rawHeaders.getValue(HttpHeaderName.fromString("x-ms-client-request-id")); + this.xMsRequestId = rawHeaders.getValue(X_MS_REQUEST_ID); + this.xMsClientRequestId = rawHeaders.getValue(X_MS_CLIENT_REQUEST_ID); String date = rawHeaders.getValue(HttpHeaderName.DATE); if (date != null) { this.date = new DateTimeRfc1123(date); @@ -71,7 +75,7 @@ public ContainersCreateHeaders(HttpHeaders rawHeaders) { /** * Get the xMsVersion property: The x-ms-version property. - * + * * @return the xMsVersion value. */ public String getXMsVersion() { @@ -80,7 +84,7 @@ public String getXMsVersion() { /** * Set the xMsVersion property: The x-ms-version property. - * + * * @param xMsVersion the xMsVersion value to set. * @return the ContainersCreateHeaders object itself. */ @@ -91,7 +95,7 @@ public ContainersCreateHeaders setXMsVersion(String xMsVersion) { /** * Get the eTag property: The ETag property. - * + * * @return the eTag value. */ public String getETag() { @@ -100,7 +104,7 @@ public String getETag() { /** * Set the eTag property: The ETag property. - * + * * @param eTag the eTag value to set. * @return the ContainersCreateHeaders object itself. */ @@ -111,7 +115,7 @@ public ContainersCreateHeaders setETag(String eTag) { /** * Get the lastModified property: The Last-Modified property. - * + * * @return the lastModified value. */ public OffsetDateTime getLastModified() { @@ -123,7 +127,7 @@ public OffsetDateTime getLastModified() { /** * Set the lastModified property: The Last-Modified property. - * + * * @param lastModified the lastModified value to set. * @return the ContainersCreateHeaders object itself. */ @@ -138,7 +142,7 @@ public ContainersCreateHeaders setLastModified(OffsetDateTime lastModified) { /** * Get the xMsRequestId property: The x-ms-request-id property. - * + * * @return the xMsRequestId value. */ public String getXMsRequestId() { @@ -147,7 +151,7 @@ public String getXMsRequestId() { /** * Set the xMsRequestId property: The x-ms-request-id property. - * + * * @param xMsRequestId the xMsRequestId value to set. * @return the ContainersCreateHeaders object itself. */ @@ -158,7 +162,7 @@ public ContainersCreateHeaders setXMsRequestId(String xMsRequestId) { /** * Get the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @return the xMsClientRequestId value. */ public String getXMsClientRequestId() { @@ -167,7 +171,7 @@ public String getXMsClientRequestId() { /** * Set the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @param xMsClientRequestId the xMsClientRequestId value to set. * @return the ContainersCreateHeaders object itself. */ @@ -178,7 +182,7 @@ public ContainersCreateHeaders setXMsClientRequestId(String xMsClientRequestId) /** * Get the date property: The Date property. - * + * * @return the date value. */ public OffsetDateTime getDate() { @@ -190,7 +194,7 @@ public OffsetDateTime getDate() { /** * Set the date property: The Date property. - * + * * @param date the date value to set. * @return the ContainersCreateHeaders object itself. */ diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ContainersDeleteHeaders.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ContainersDeleteHeaders.java index 7a705788d662..f706ddd22b5f 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ContainersDeleteHeaders.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ContainersDeleteHeaders.java @@ -4,17 +4,17 @@ package com.azure.v2.storage.blob.models; -import com.azure.v2.core.annotation.Fluent; +import io.clientcore.core.annotations.Metadata; +import io.clientcore.core.annotations.TypeConditions; import io.clientcore.core.http.models.HttpHeaderName; import io.clientcore.core.http.models.HttpHeaders; -import io.clientcore.core.util.DateTimeRfc1123; - +import io.clientcore.core.utils.DateTimeRfc1123; import java.time.OffsetDateTime; /** * The ContainersDeleteHeaders model. */ -@Fluent +@Metadata(conditions = { TypeConditions.FLUENT }) public final class ContainersDeleteHeaders { /* * The x-ms-version property. @@ -38,16 +38,20 @@ public final class ContainersDeleteHeaders { private static final HttpHeaderName X_MS_VERSION = HttpHeaderName.fromString("x-ms-version"); + private static final HttpHeaderName X_MS_REQUEST_ID = HttpHeaderName.fromString("x-ms-request-id"); + + private static final HttpHeaderName X_MS_CLIENT_REQUEST_ID = HttpHeaderName.fromString("x-ms-client-request-id"); + // HttpHeaders containing the raw property values. /** * Creates an instance of ContainersDeleteHeaders class. - * + * * @param rawHeaders The raw HttpHeaders that will be used to create the property values. */ public ContainersDeleteHeaders(HttpHeaders rawHeaders) { this.xMsVersion = rawHeaders.getValue(X_MS_VERSION); - this.xMsRequestId = rawHeaders.getValue(HttpHeaderName.fromString("x-ms-request-id")); - this.xMsClientRequestId = rawHeaders.getValue(HttpHeaderName.fromString("x-ms-client-request-id")); + this.xMsRequestId = rawHeaders.getValue(X_MS_REQUEST_ID); + this.xMsClientRequestId = rawHeaders.getValue(X_MS_CLIENT_REQUEST_ID); String date = rawHeaders.getValue(HttpHeaderName.DATE); if (date != null) { this.date = new DateTimeRfc1123(date); @@ -56,7 +60,7 @@ public ContainersDeleteHeaders(HttpHeaders rawHeaders) { /** * Get the xMsVersion property: The x-ms-version property. - * + * * @return the xMsVersion value. */ public String getXMsVersion() { @@ -65,7 +69,7 @@ public String getXMsVersion() { /** * Set the xMsVersion property: The x-ms-version property. - * + * * @param xMsVersion the xMsVersion value to set. * @return the ContainersDeleteHeaders object itself. */ @@ -76,7 +80,7 @@ public ContainersDeleteHeaders setXMsVersion(String xMsVersion) { /** * Get the xMsRequestId property: The x-ms-request-id property. - * + * * @return the xMsRequestId value. */ public String getXMsRequestId() { @@ -85,7 +89,7 @@ public String getXMsRequestId() { /** * Set the xMsRequestId property: The x-ms-request-id property. - * + * * @param xMsRequestId the xMsRequestId value to set. * @return the ContainersDeleteHeaders object itself. */ @@ -96,7 +100,7 @@ public ContainersDeleteHeaders setXMsRequestId(String xMsRequestId) { /** * Get the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @return the xMsClientRequestId value. */ public String getXMsClientRequestId() { @@ -105,7 +109,7 @@ public String getXMsClientRequestId() { /** * Set the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @param xMsClientRequestId the xMsClientRequestId value to set. * @return the ContainersDeleteHeaders object itself. */ @@ -116,7 +120,7 @@ public ContainersDeleteHeaders setXMsClientRequestId(String xMsClientRequestId) /** * Get the date property: The Date property. - * + * * @return the date value. */ public OffsetDateTime getDate() { @@ -128,7 +132,7 @@ public OffsetDateTime getDate() { /** * Set the date property: The Date property. - * + * * @param date the date value to set. * @return the ContainersDeleteHeaders object itself. */ diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ContainersFilterBlobsHeaders.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ContainersFilterBlobsHeaders.java index 30c1b806d461..0d976d829922 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ContainersFilterBlobsHeaders.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ContainersFilterBlobsHeaders.java @@ -4,17 +4,17 @@ package com.azure.v2.storage.blob.models; -import com.azure.v2.core.annotation.Fluent; +import io.clientcore.core.annotations.Metadata; +import io.clientcore.core.annotations.TypeConditions; import io.clientcore.core.http.models.HttpHeaderName; import io.clientcore.core.http.models.HttpHeaders; -import io.clientcore.core.util.DateTimeRfc1123; - +import io.clientcore.core.utils.DateTimeRfc1123; import java.time.OffsetDateTime; /** * The ContainersFilterBlobsHeaders model. */ -@Fluent +@Metadata(conditions = { TypeConditions.FLUENT }) public final class ContainersFilterBlobsHeaders { /* * The x-ms-version property. @@ -38,16 +38,20 @@ public final class ContainersFilterBlobsHeaders { private static final HttpHeaderName X_MS_VERSION = HttpHeaderName.fromString("x-ms-version"); + private static final HttpHeaderName X_MS_REQUEST_ID = HttpHeaderName.fromString("x-ms-request-id"); + + private static final HttpHeaderName X_MS_CLIENT_REQUEST_ID = HttpHeaderName.fromString("x-ms-client-request-id"); + // HttpHeaders containing the raw property values. /** * Creates an instance of ContainersFilterBlobsHeaders class. - * + * * @param rawHeaders The raw HttpHeaders that will be used to create the property values. */ public ContainersFilterBlobsHeaders(HttpHeaders rawHeaders) { this.xMsVersion = rawHeaders.getValue(X_MS_VERSION); - this.xMsRequestId = rawHeaders.getValue(HttpHeaderName.fromString("x-ms-request-id")); - this.xMsClientRequestId = rawHeaders.getValue(HttpHeaderName.fromString("x-ms-client-request-id")); + this.xMsRequestId = rawHeaders.getValue(X_MS_REQUEST_ID); + this.xMsClientRequestId = rawHeaders.getValue(X_MS_CLIENT_REQUEST_ID); String date = rawHeaders.getValue(HttpHeaderName.DATE); if (date != null) { this.date = new DateTimeRfc1123(date); @@ -56,7 +60,7 @@ public ContainersFilterBlobsHeaders(HttpHeaders rawHeaders) { /** * Get the xMsVersion property: The x-ms-version property. - * + * * @return the xMsVersion value. */ public String getXMsVersion() { @@ -65,7 +69,7 @@ public String getXMsVersion() { /** * Set the xMsVersion property: The x-ms-version property. - * + * * @param xMsVersion the xMsVersion value to set. * @return the ContainersFilterBlobsHeaders object itself. */ @@ -76,7 +80,7 @@ public ContainersFilterBlobsHeaders setXMsVersion(String xMsVersion) { /** * Get the xMsRequestId property: The x-ms-request-id property. - * + * * @return the xMsRequestId value. */ public String getXMsRequestId() { @@ -85,7 +89,7 @@ public String getXMsRequestId() { /** * Set the xMsRequestId property: The x-ms-request-id property. - * + * * @param xMsRequestId the xMsRequestId value to set. * @return the ContainersFilterBlobsHeaders object itself. */ @@ -96,7 +100,7 @@ public ContainersFilterBlobsHeaders setXMsRequestId(String xMsRequestId) { /** * Get the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @return the xMsClientRequestId value. */ public String getXMsClientRequestId() { @@ -105,7 +109,7 @@ public String getXMsClientRequestId() { /** * Set the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @param xMsClientRequestId the xMsClientRequestId value to set. * @return the ContainersFilterBlobsHeaders object itself. */ @@ -116,7 +120,7 @@ public ContainersFilterBlobsHeaders setXMsClientRequestId(String xMsClientReques /** * Get the date property: The Date property. - * + * * @return the date value. */ public OffsetDateTime getDate() { @@ -128,7 +132,7 @@ public OffsetDateTime getDate() { /** * Set the date property: The Date property. - * + * * @param date the date value to set. * @return the ContainersFilterBlobsHeaders object itself. */ diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ContainersGetAccessPolicyHeaders.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ContainersGetAccessPolicyHeaders.java index aaaf50e30090..4286f48288ff 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ContainersGetAccessPolicyHeaders.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ContainersGetAccessPolicyHeaders.java @@ -4,17 +4,17 @@ package com.azure.v2.storage.blob.models; -import com.azure.v2.core.annotation.Fluent; +import io.clientcore.core.annotations.Metadata; +import io.clientcore.core.annotations.TypeConditions; import io.clientcore.core.http.models.HttpHeaderName; import io.clientcore.core.http.models.HttpHeaders; -import io.clientcore.core.util.DateTimeRfc1123; - +import io.clientcore.core.utils.DateTimeRfc1123; import java.time.OffsetDateTime; /** * The ContainersGetAccessPolicyHeaders model. */ -@Fluent +@Metadata(conditions = { TypeConditions.FLUENT }) public final class ContainersGetAccessPolicyHeaders { /* * The x-ms-version property. @@ -55,10 +55,14 @@ public final class ContainersGetAccessPolicyHeaders { private static final HttpHeaderName X_MS_BLOB_PUBLIC_ACCESS = HttpHeaderName.fromString("x-ms-blob-public-access"); + private static final HttpHeaderName X_MS_REQUEST_ID = HttpHeaderName.fromString("x-ms-request-id"); + + private static final HttpHeaderName X_MS_CLIENT_REQUEST_ID = HttpHeaderName.fromString("x-ms-client-request-id"); + // HttpHeaders containing the raw property values. /** * Creates an instance of ContainersGetAccessPolicyHeaders class. - * + * * @param rawHeaders The raw HttpHeaders that will be used to create the property values. */ public ContainersGetAccessPolicyHeaders(HttpHeaders rawHeaders) { @@ -70,10 +74,10 @@ public ContainersGetAccessPolicyHeaders(HttpHeaders rawHeaders) { } String xMsBlobPublicAccess = rawHeaders.getValue(X_MS_BLOB_PUBLIC_ACCESS); if (xMsBlobPublicAccess != null) { - this.xMsBlobPublicAccess = PublicAccessType.fromString(xMsBlobPublicAccess); + this.xMsBlobPublicAccess = PublicAccessType.fromValue(xMsBlobPublicAccess); } - this.xMsRequestId = rawHeaders.getValue(HttpHeaderName.fromString("x-ms-request-id")); - this.xMsClientRequestId = rawHeaders.getValue(HttpHeaderName.fromString("x-ms-client-request-id")); + this.xMsRequestId = rawHeaders.getValue(X_MS_REQUEST_ID); + this.xMsClientRequestId = rawHeaders.getValue(X_MS_CLIENT_REQUEST_ID); String date = rawHeaders.getValue(HttpHeaderName.DATE); if (date != null) { this.date = new DateTimeRfc1123(date); @@ -82,7 +86,7 @@ public ContainersGetAccessPolicyHeaders(HttpHeaders rawHeaders) { /** * Get the xMsVersion property: The x-ms-version property. - * + * * @return the xMsVersion value. */ public String getXMsVersion() { @@ -91,7 +95,7 @@ public String getXMsVersion() { /** * Set the xMsVersion property: The x-ms-version property. - * + * * @param xMsVersion the xMsVersion value to set. * @return the ContainersGetAccessPolicyHeaders object itself. */ @@ -102,7 +106,7 @@ public ContainersGetAccessPolicyHeaders setXMsVersion(String xMsVersion) { /** * Get the eTag property: The ETag property. - * + * * @return the eTag value. */ public String getETag() { @@ -111,7 +115,7 @@ public String getETag() { /** * Set the eTag property: The ETag property. - * + * * @param eTag the eTag value to set. * @return the ContainersGetAccessPolicyHeaders object itself. */ @@ -122,7 +126,7 @@ public ContainersGetAccessPolicyHeaders setETag(String eTag) { /** * Get the lastModified property: The Last-Modified property. - * + * * @return the lastModified value. */ public OffsetDateTime getLastModified() { @@ -134,7 +138,7 @@ public OffsetDateTime getLastModified() { /** * Set the lastModified property: The Last-Modified property. - * + * * @param lastModified the lastModified value to set. * @return the ContainersGetAccessPolicyHeaders object itself. */ @@ -149,7 +153,7 @@ public ContainersGetAccessPolicyHeaders setLastModified(OffsetDateTime lastModif /** * Get the xMsBlobPublicAccess property: The x-ms-blob-public-access property. - * + * * @return the xMsBlobPublicAccess value. */ public PublicAccessType getXMsBlobPublicAccess() { @@ -158,7 +162,7 @@ public PublicAccessType getXMsBlobPublicAccess() { /** * Set the xMsBlobPublicAccess property: The x-ms-blob-public-access property. - * + * * @param xMsBlobPublicAccess the xMsBlobPublicAccess value to set. * @return the ContainersGetAccessPolicyHeaders object itself. */ @@ -169,7 +173,7 @@ public ContainersGetAccessPolicyHeaders setXMsBlobPublicAccess(PublicAccessType /** * Get the xMsRequestId property: The x-ms-request-id property. - * + * * @return the xMsRequestId value. */ public String getXMsRequestId() { @@ -178,7 +182,7 @@ public String getXMsRequestId() { /** * Set the xMsRequestId property: The x-ms-request-id property. - * + * * @param xMsRequestId the xMsRequestId value to set. * @return the ContainersGetAccessPolicyHeaders object itself. */ @@ -189,7 +193,7 @@ public ContainersGetAccessPolicyHeaders setXMsRequestId(String xMsRequestId) { /** * Get the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @return the xMsClientRequestId value. */ public String getXMsClientRequestId() { @@ -198,7 +202,7 @@ public String getXMsClientRequestId() { /** * Set the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @param xMsClientRequestId the xMsClientRequestId value to set. * @return the ContainersGetAccessPolicyHeaders object itself. */ @@ -209,7 +213,7 @@ public ContainersGetAccessPolicyHeaders setXMsClientRequestId(String xMsClientRe /** * Get the date property: The Date property. - * + * * @return the date value. */ public OffsetDateTime getDate() { @@ -221,7 +225,7 @@ public OffsetDateTime getDate() { /** * Set the date property: The Date property. - * + * * @param date the date value to set. * @return the ContainersGetAccessPolicyHeaders object itself. */ diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ContainersGetAccountInfoHeaders.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ContainersGetAccountInfoHeaders.java index 942067965498..f35e0a4757af 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ContainersGetAccountInfoHeaders.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ContainersGetAccountInfoHeaders.java @@ -4,17 +4,17 @@ package com.azure.v2.storage.blob.models; -import com.azure.v2.core.annotation.Fluent; +import io.clientcore.core.annotations.Metadata; +import io.clientcore.core.annotations.TypeConditions; import io.clientcore.core.http.models.HttpHeaderName; import io.clientcore.core.http.models.HttpHeaders; -import io.clientcore.core.util.DateTimeRfc1123; - +import io.clientcore.core.utils.DateTimeRfc1123; import java.time.OffsetDateTime; /** * The ContainersGetAccountInfoHeaders model. */ -@Fluent +@Metadata(conditions = { TypeConditions.FLUENT }) public final class ContainersGetAccountInfoHeaders { /* * The x-ms-version property. @@ -59,10 +59,14 @@ public final class ContainersGetAccountInfoHeaders { private static final HttpHeaderName X_MS_SKU_NAME = HttpHeaderName.fromString("x-ms-sku-name"); + private static final HttpHeaderName X_MS_REQUEST_ID = HttpHeaderName.fromString("x-ms-request-id"); + + private static final HttpHeaderName X_MS_CLIENT_REQUEST_ID = HttpHeaderName.fromString("x-ms-client-request-id"); + // HttpHeaders containing the raw property values. /** * Creates an instance of ContainersGetAccountInfoHeaders class. - * + * * @param rawHeaders The raw HttpHeaders that will be used to create the property values. */ public ContainersGetAccountInfoHeaders(HttpHeaders rawHeaders) { @@ -79,8 +83,8 @@ public ContainersGetAccountInfoHeaders(HttpHeaders rawHeaders) { if (xMsSkuName != null) { this.xMsSkuName = SkuName.fromString(xMsSkuName); } - this.xMsRequestId = rawHeaders.getValue(HttpHeaderName.fromString("x-ms-request-id")); - this.xMsClientRequestId = rawHeaders.getValue(HttpHeaderName.fromString("x-ms-client-request-id")); + this.xMsRequestId = rawHeaders.getValue(X_MS_REQUEST_ID); + this.xMsClientRequestId = rawHeaders.getValue(X_MS_CLIENT_REQUEST_ID); String date = rawHeaders.getValue(HttpHeaderName.DATE); if (date != null) { this.date = new DateTimeRfc1123(date); @@ -89,7 +93,7 @@ public ContainersGetAccountInfoHeaders(HttpHeaders rawHeaders) { /** * Get the xMsVersion property: The x-ms-version property. - * + * * @return the xMsVersion value. */ public String getXMsVersion() { @@ -98,7 +102,7 @@ public String getXMsVersion() { /** * Set the xMsVersion property: The x-ms-version property. - * + * * @param xMsVersion the xMsVersion value to set. * @return the ContainersGetAccountInfoHeaders object itself. */ @@ -109,7 +113,7 @@ public ContainersGetAccountInfoHeaders setXMsVersion(String xMsVersion) { /** * Get the xMsAccountKind property: The x-ms-account-kind property. - * + * * @return the xMsAccountKind value. */ public AccountKind getXMsAccountKind() { @@ -118,7 +122,7 @@ public AccountKind getXMsAccountKind() { /** * Set the xMsAccountKind property: The x-ms-account-kind property. - * + * * @param xMsAccountKind the xMsAccountKind value to set. * @return the ContainersGetAccountInfoHeaders object itself. */ @@ -129,7 +133,7 @@ public ContainersGetAccountInfoHeaders setXMsAccountKind(AccountKind xMsAccountK /** * Get the xMsIsHnsEnabled property: The x-ms-is-hns-enabled property. - * + * * @return the xMsIsHnsEnabled value. */ public Boolean isXMsIsHnsEnabled() { @@ -138,7 +142,7 @@ public Boolean isXMsIsHnsEnabled() { /** * Set the xMsIsHnsEnabled property: The x-ms-is-hns-enabled property. - * + * * @param xMsIsHnsEnabled the xMsIsHnsEnabled value to set. * @return the ContainersGetAccountInfoHeaders object itself. */ @@ -149,7 +153,7 @@ public ContainersGetAccountInfoHeaders setXMsIsHnsEnabled(Boolean xMsIsHnsEnable /** * Get the xMsSkuName property: The x-ms-sku-name property. - * + * * @return the xMsSkuName value. */ public SkuName getXMsSkuName() { @@ -158,7 +162,7 @@ public SkuName getXMsSkuName() { /** * Set the xMsSkuName property: The x-ms-sku-name property. - * + * * @param xMsSkuName the xMsSkuName value to set. * @return the ContainersGetAccountInfoHeaders object itself. */ @@ -169,7 +173,7 @@ public ContainersGetAccountInfoHeaders setXMsSkuName(SkuName xMsSkuName) { /** * Get the xMsRequestId property: The x-ms-request-id property. - * + * * @return the xMsRequestId value. */ public String getXMsRequestId() { @@ -178,7 +182,7 @@ public String getXMsRequestId() { /** * Set the xMsRequestId property: The x-ms-request-id property. - * + * * @param xMsRequestId the xMsRequestId value to set. * @return the ContainersGetAccountInfoHeaders object itself. */ @@ -189,7 +193,7 @@ public ContainersGetAccountInfoHeaders setXMsRequestId(String xMsRequestId) { /** * Get the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @return the xMsClientRequestId value. */ public String getXMsClientRequestId() { @@ -198,7 +202,7 @@ public String getXMsClientRequestId() { /** * Set the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @param xMsClientRequestId the xMsClientRequestId value to set. * @return the ContainersGetAccountInfoHeaders object itself. */ @@ -209,7 +213,7 @@ public ContainersGetAccountInfoHeaders setXMsClientRequestId(String xMsClientReq /** * Get the date property: The Date property. - * + * * @return the date value. */ public OffsetDateTime getDate() { @@ -221,7 +225,7 @@ public OffsetDateTime getDate() { /** * Set the date property: The Date property. - * + * * @param date the date value to set. * @return the ContainersGetAccountInfoHeaders object itself. */ diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ContainersGetPropertiesHeaders.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ContainersGetPropertiesHeaders.java index 53fdbac4af78..05c6f2bbe88b 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ContainersGetPropertiesHeaders.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ContainersGetPropertiesHeaders.java @@ -4,20 +4,19 @@ package com.azure.v2.storage.blob.models; -import com.azure.v2.core.annotation.Fluent; -import io.clientcore.core.http.models.HttpHeader; +import io.clientcore.core.annotations.Metadata; +import io.clientcore.core.annotations.TypeConditions; import io.clientcore.core.http.models.HttpHeaderName; import io.clientcore.core.http.models.HttpHeaders; -import io.clientcore.core.util.DateTimeRfc1123; - +import io.clientcore.core.utils.DateTimeRfc1123; import java.time.OffsetDateTime; -import java.util.HashMap; +import java.util.LinkedHashMap; import java.util.Map; /** * The ContainersGetPropertiesHeaders model. */ -@Fluent +@Metadata(conditions = { TypeConditions.FLUENT }) public final class ContainersGetPropertiesHeaders { /* * The x-ms-lease-status property. @@ -123,10 +122,14 @@ public final class ContainersGetPropertiesHeaders { private static final HttpHeaderName X_MS_BLOB_PUBLIC_ACCESS = HttpHeaderName.fromString("x-ms-blob-public-access"); + private static final HttpHeaderName X_MS_REQUEST_ID = HttpHeaderName.fromString("x-ms-request-id"); + + private static final HttpHeaderName X_MS_CLIENT_REQUEST_ID = HttpHeaderName.fromString("x-ms-client-request-id"); + // HttpHeaders containing the raw property values. /** * Creates an instance of ContainersGetPropertiesHeaders class. - * + * * @param rawHeaders The raw HttpHeaders that will be used to create the property values. */ public ContainersGetPropertiesHeaders(HttpHeaders rawHeaders) { @@ -173,25 +176,24 @@ public ContainersGetPropertiesHeaders(HttpHeaders rawHeaders) { } String xMsBlobPublicAccess = rawHeaders.getValue(X_MS_BLOB_PUBLIC_ACCESS); if (xMsBlobPublicAccess != null) { - this.xMsBlobPublicAccess = PublicAccessType.fromString(xMsBlobPublicAccess); + this.xMsBlobPublicAccess = PublicAccessType.fromValue(xMsBlobPublicAccess); } - this.xMsRequestId = rawHeaders.getValue(HttpHeaderName.fromString("x-ms-request-id")); - this.xMsClientRequestId = rawHeaders.getValue(HttpHeaderName.fromString("x-ms-client-request-id")); - Map xMsMetaHeaderCollection = new HashMap<>(); + this.xMsRequestId = rawHeaders.getValue(X_MS_REQUEST_ID); + this.xMsClientRequestId = rawHeaders.getValue(X_MS_CLIENT_REQUEST_ID); + Map xMsMetaHeaderCollection = new LinkedHashMap<>(); - for (HttpHeader header : rawHeaders) { - String headerName = header.getValue(); + rawHeaders.stream().forEach(header -> { + String headerName = header.getName().getValue(); if (headerName.startsWith("x-ms-meta-")) { xMsMetaHeaderCollection.put(headerName.substring(10), header.getValue()); } - } - + }); this.xMsMeta = xMsMetaHeaderCollection; } /** * Get the xMsLeaseStatus property: The x-ms-lease-status property. - * + * * @return the xMsLeaseStatus value. */ public LeaseStatusType getXMsLeaseStatus() { @@ -200,7 +202,7 @@ public LeaseStatusType getXMsLeaseStatus() { /** * Set the xMsLeaseStatus property: The x-ms-lease-status property. - * + * * @param xMsLeaseStatus the xMsLeaseStatus value to set. * @return the ContainersGetPropertiesHeaders object itself. */ @@ -211,7 +213,7 @@ public ContainersGetPropertiesHeaders setXMsLeaseStatus(LeaseStatusType xMsLease /** * Get the xMsVersion property: The x-ms-version property. - * + * * @return the xMsVersion value. */ public String getXMsVersion() { @@ -220,7 +222,7 @@ public String getXMsVersion() { /** * Set the xMsVersion property: The x-ms-version property. - * + * * @param xMsVersion the xMsVersion value to set. * @return the ContainersGetPropertiesHeaders object itself. */ @@ -232,7 +234,7 @@ public ContainersGetPropertiesHeaders setXMsVersion(String xMsVersion) { /** * Get the xMsImmutableStorageWithVersioningEnabled property: The x-ms-immutable-storage-with-versioning-enabled * property. - * + * * @return the xMsImmutableStorageWithVersioningEnabled value. */ public Boolean isXMsImmutableStorageWithVersioningEnabled() { @@ -242,7 +244,7 @@ public Boolean isXMsImmutableStorageWithVersioningEnabled() { /** * Set the xMsImmutableStorageWithVersioningEnabled property: The x-ms-immutable-storage-with-versioning-enabled * property. - * + * * @param xMsImmutableStorageWithVersioningEnabled the xMsImmutableStorageWithVersioningEnabled value to set. * @return the ContainersGetPropertiesHeaders object itself. */ @@ -254,7 +256,7 @@ public Boolean isXMsImmutableStorageWithVersioningEnabled() { /** * Get the xMsLeaseState property: The x-ms-lease-state property. - * + * * @return the xMsLeaseState value. */ public LeaseStateType getXMsLeaseState() { @@ -263,7 +265,7 @@ public LeaseStateType getXMsLeaseState() { /** * Set the xMsLeaseState property: The x-ms-lease-state property. - * + * * @param xMsLeaseState the xMsLeaseState value to set. * @return the ContainersGetPropertiesHeaders object itself. */ @@ -274,7 +276,7 @@ public ContainersGetPropertiesHeaders setXMsLeaseState(LeaseStateType xMsLeaseSt /** * Get the xMsDenyEncryptionScopeOverride property: The x-ms-deny-encryption-scope-override property. - * + * * @return the xMsDenyEncryptionScopeOverride value. */ public Boolean isXMsDenyEncryptionScopeOverride() { @@ -283,7 +285,7 @@ public Boolean isXMsDenyEncryptionScopeOverride() { /** * Set the xMsDenyEncryptionScopeOverride property: The x-ms-deny-encryption-scope-override property. - * + * * @param xMsDenyEncryptionScopeOverride the xMsDenyEncryptionScopeOverride value to set. * @return the ContainersGetPropertiesHeaders object itself. */ @@ -294,7 +296,7 @@ public ContainersGetPropertiesHeaders setXMsDenyEncryptionScopeOverride(Boolean /** * Get the lastModified property: The Last-Modified property. - * + * * @return the lastModified value. */ public OffsetDateTime getLastModified() { @@ -306,7 +308,7 @@ public OffsetDateTime getLastModified() { /** * Set the lastModified property: The Last-Modified property. - * + * * @param lastModified the lastModified value to set. * @return the ContainersGetPropertiesHeaders object itself. */ @@ -321,7 +323,7 @@ public ContainersGetPropertiesHeaders setLastModified(OffsetDateTime lastModifie /** * Get the xMsMeta property: The x-ms-meta- property. - * + * * @return the xMsMeta value. */ public Map getXMsMeta() { @@ -330,7 +332,7 @@ public Map getXMsMeta() { /** * Set the xMsMeta property: The x-ms-meta- property. - * + * * @param xMsMeta the xMsMeta value to set. * @return the ContainersGetPropertiesHeaders object itself. */ @@ -341,7 +343,7 @@ public ContainersGetPropertiesHeaders setXMsMeta(Map xMsMeta) { /** * Get the date property: The Date property. - * + * * @return the date value. */ public OffsetDateTime getDate() { @@ -353,7 +355,7 @@ public OffsetDateTime getDate() { /** * Set the date property: The Date property. - * + * * @param date the date value to set. * @return the ContainersGetPropertiesHeaders object itself. */ @@ -368,7 +370,7 @@ public ContainersGetPropertiesHeaders setDate(OffsetDateTime date) { /** * Get the xMsHasLegalHold property: The x-ms-has-legal-hold property. - * + * * @return the xMsHasLegalHold value. */ public Boolean isXMsHasLegalHold() { @@ -377,7 +379,7 @@ public Boolean isXMsHasLegalHold() { /** * Set the xMsHasLegalHold property: The x-ms-has-legal-hold property. - * + * * @param xMsHasLegalHold the xMsHasLegalHold value to set. * @return the ContainersGetPropertiesHeaders object itself. */ @@ -388,7 +390,7 @@ public ContainersGetPropertiesHeaders setXMsHasLegalHold(Boolean xMsHasLegalHold /** * Get the xMsDefaultEncryptionScope property: The x-ms-default-encryption-scope property. - * + * * @return the xMsDefaultEncryptionScope value. */ public String getXMsDefaultEncryptionScope() { @@ -397,7 +399,7 @@ public String getXMsDefaultEncryptionScope() { /** * Set the xMsDefaultEncryptionScope property: The x-ms-default-encryption-scope property. - * + * * @param xMsDefaultEncryptionScope the xMsDefaultEncryptionScope value to set. * @return the ContainersGetPropertiesHeaders object itself. */ @@ -408,7 +410,7 @@ public ContainersGetPropertiesHeaders setXMsDefaultEncryptionScope(String xMsDef /** * Get the eTag property: The ETag property. - * + * * @return the eTag value. */ public String getETag() { @@ -417,7 +419,7 @@ public String getETag() { /** * Set the eTag property: The ETag property. - * + * * @param eTag the eTag value to set. * @return the ContainersGetPropertiesHeaders object itself. */ @@ -428,7 +430,7 @@ public ContainersGetPropertiesHeaders setETag(String eTag) { /** * Get the xMsHasImmutabilityPolicy property: The x-ms-has-immutability-policy property. - * + * * @return the xMsHasImmutabilityPolicy value. */ public Boolean isXMsHasImmutabilityPolicy() { @@ -437,7 +439,7 @@ public Boolean isXMsHasImmutabilityPolicy() { /** * Set the xMsHasImmutabilityPolicy property: The x-ms-has-immutability-policy property. - * + * * @param xMsHasImmutabilityPolicy the xMsHasImmutabilityPolicy value to set. * @return the ContainersGetPropertiesHeaders object itself. */ @@ -448,7 +450,7 @@ public ContainersGetPropertiesHeaders setXMsHasImmutabilityPolicy(Boolean xMsHas /** * Get the xMsLeaseDuration property: The x-ms-lease-duration property. - * + * * @return the xMsLeaseDuration value. */ public LeaseDurationType getXMsLeaseDuration() { @@ -457,7 +459,7 @@ public LeaseDurationType getXMsLeaseDuration() { /** * Set the xMsLeaseDuration property: The x-ms-lease-duration property. - * + * * @param xMsLeaseDuration the xMsLeaseDuration value to set. * @return the ContainersGetPropertiesHeaders object itself. */ @@ -468,7 +470,7 @@ public ContainersGetPropertiesHeaders setXMsLeaseDuration(LeaseDurationType xMsL /** * Get the xMsBlobPublicAccess property: The x-ms-blob-public-access property. - * + * * @return the xMsBlobPublicAccess value. */ public PublicAccessType getXMsBlobPublicAccess() { @@ -477,7 +479,7 @@ public PublicAccessType getXMsBlobPublicAccess() { /** * Set the xMsBlobPublicAccess property: The x-ms-blob-public-access property. - * + * * @param xMsBlobPublicAccess the xMsBlobPublicAccess value to set. * @return the ContainersGetPropertiesHeaders object itself. */ @@ -488,7 +490,7 @@ public ContainersGetPropertiesHeaders setXMsBlobPublicAccess(PublicAccessType xM /** * Get the xMsRequestId property: The x-ms-request-id property. - * + * * @return the xMsRequestId value. */ public String getXMsRequestId() { @@ -497,7 +499,7 @@ public String getXMsRequestId() { /** * Set the xMsRequestId property: The x-ms-request-id property. - * + * * @param xMsRequestId the xMsRequestId value to set. * @return the ContainersGetPropertiesHeaders object itself. */ @@ -508,7 +510,7 @@ public ContainersGetPropertiesHeaders setXMsRequestId(String xMsRequestId) { /** * Get the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @return the xMsClientRequestId value. */ public String getXMsClientRequestId() { @@ -517,7 +519,7 @@ public String getXMsClientRequestId() { /** * Set the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @param xMsClientRequestId the xMsClientRequestId value to set. * @return the ContainersGetPropertiesHeaders object itself. */ diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ContainersListBlobFlatSegmentHeaders.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ContainersListBlobFlatSegmentHeaders.java index b6dd39d86697..efbabab1d1c7 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ContainersListBlobFlatSegmentHeaders.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ContainersListBlobFlatSegmentHeaders.java @@ -4,17 +4,17 @@ package com.azure.v2.storage.blob.models; -import com.azure.v2.core.annotation.Fluent; +import io.clientcore.core.annotations.Metadata; +import io.clientcore.core.annotations.TypeConditions; import io.clientcore.core.http.models.HttpHeaderName; import io.clientcore.core.http.models.HttpHeaders; -import io.clientcore.core.util.DateTimeRfc1123; - +import io.clientcore.core.utils.DateTimeRfc1123; import java.time.OffsetDateTime; /** * The ContainersListBlobFlatSegmentHeaders model. */ -@Fluent +@Metadata(conditions = { TypeConditions.FLUENT }) public final class ContainersListBlobFlatSegmentHeaders { /* * The x-ms-version property. @@ -43,16 +43,20 @@ public final class ContainersListBlobFlatSegmentHeaders { private static final HttpHeaderName X_MS_VERSION = HttpHeaderName.fromString("x-ms-version"); + private static final HttpHeaderName X_MS_REQUEST_ID = HttpHeaderName.fromString("x-ms-request-id"); + + private static final HttpHeaderName X_MS_CLIENT_REQUEST_ID = HttpHeaderName.fromString("x-ms-client-request-id"); + // HttpHeaders containing the raw property values. /** * Creates an instance of ContainersListBlobFlatSegmentHeaders class. - * + * * @param rawHeaders The raw HttpHeaders that will be used to create the property values. */ public ContainersListBlobFlatSegmentHeaders(HttpHeaders rawHeaders) { this.xMsVersion = rawHeaders.getValue(X_MS_VERSION); - this.xMsRequestId = rawHeaders.getValue(HttpHeaderName.fromString("x-ms-request-id")); - this.xMsClientRequestId = rawHeaders.getValue(HttpHeaderName.fromString("x-ms-client-request-id")); + this.xMsRequestId = rawHeaders.getValue(X_MS_REQUEST_ID); + this.xMsClientRequestId = rawHeaders.getValue(X_MS_CLIENT_REQUEST_ID); String date = rawHeaders.getValue(HttpHeaderName.DATE); if (date != null) { this.date = new DateTimeRfc1123(date); @@ -62,7 +66,7 @@ public ContainersListBlobFlatSegmentHeaders(HttpHeaders rawHeaders) { /** * Get the xMsVersion property: The x-ms-version property. - * + * * @return the xMsVersion value. */ public String getXMsVersion() { @@ -71,7 +75,7 @@ public String getXMsVersion() { /** * Set the xMsVersion property: The x-ms-version property. - * + * * @param xMsVersion the xMsVersion value to set. * @return the ContainersListBlobFlatSegmentHeaders object itself. */ @@ -82,7 +86,7 @@ public ContainersListBlobFlatSegmentHeaders setXMsVersion(String xMsVersion) { /** * Get the xMsRequestId property: The x-ms-request-id property. - * + * * @return the xMsRequestId value. */ public String getXMsRequestId() { @@ -91,7 +95,7 @@ public String getXMsRequestId() { /** * Set the xMsRequestId property: The x-ms-request-id property. - * + * * @param xMsRequestId the xMsRequestId value to set. * @return the ContainersListBlobFlatSegmentHeaders object itself. */ @@ -102,7 +106,7 @@ public ContainersListBlobFlatSegmentHeaders setXMsRequestId(String xMsRequestId) /** * Get the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @return the xMsClientRequestId value. */ public String getXMsClientRequestId() { @@ -111,7 +115,7 @@ public String getXMsClientRequestId() { /** * Set the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @param xMsClientRequestId the xMsClientRequestId value to set. * @return the ContainersListBlobFlatSegmentHeaders object itself. */ @@ -122,7 +126,7 @@ public ContainersListBlobFlatSegmentHeaders setXMsClientRequestId(String xMsClie /** * Get the date property: The Date property. - * + * * @return the date value. */ public OffsetDateTime getDate() { @@ -134,7 +138,7 @@ public OffsetDateTime getDate() { /** * Set the date property: The Date property. - * + * * @param date the date value to set. * @return the ContainersListBlobFlatSegmentHeaders object itself. */ @@ -149,7 +153,7 @@ public ContainersListBlobFlatSegmentHeaders setDate(OffsetDateTime date) { /** * Get the contentType property: The Content-Type property. - * + * * @return the contentType value. */ public String getContentType() { @@ -158,7 +162,7 @@ public String getContentType() { /** * Set the contentType property: The Content-Type property. - * + * * @param contentType the contentType value to set. * @return the ContainersListBlobFlatSegmentHeaders object itself. */ diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ContainersListBlobHierarchySegmentHeaders.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ContainersListBlobHierarchySegmentHeaders.java index 257dfc4a5bb8..872bc7b6ba43 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ContainersListBlobHierarchySegmentHeaders.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ContainersListBlobHierarchySegmentHeaders.java @@ -4,17 +4,17 @@ package com.azure.v2.storage.blob.models; -import com.azure.v2.core.annotation.Fluent; +import io.clientcore.core.annotations.Metadata; +import io.clientcore.core.annotations.TypeConditions; import io.clientcore.core.http.models.HttpHeaderName; import io.clientcore.core.http.models.HttpHeaders; -import io.clientcore.core.util.DateTimeRfc1123; - +import io.clientcore.core.utils.DateTimeRfc1123; import java.time.OffsetDateTime; /** * The ContainersListBlobHierarchySegmentHeaders model. */ -@Fluent +@Metadata(conditions = { TypeConditions.FLUENT }) public final class ContainersListBlobHierarchySegmentHeaders { /* * The x-ms-version property. @@ -43,16 +43,20 @@ public final class ContainersListBlobHierarchySegmentHeaders { private static final HttpHeaderName X_MS_VERSION = HttpHeaderName.fromString("x-ms-version"); + private static final HttpHeaderName X_MS_REQUEST_ID = HttpHeaderName.fromString("x-ms-request-id"); + + private static final HttpHeaderName X_MS_CLIENT_REQUEST_ID = HttpHeaderName.fromString("x-ms-client-request-id"); + // HttpHeaders containing the raw property values. /** * Creates an instance of ContainersListBlobHierarchySegmentHeaders class. - * + * * @param rawHeaders The raw HttpHeaders that will be used to create the property values. */ public ContainersListBlobHierarchySegmentHeaders(HttpHeaders rawHeaders) { this.xMsVersion = rawHeaders.getValue(X_MS_VERSION); - this.xMsRequestId = rawHeaders.getValue(HttpHeaderName.fromString("x-ms-request-id")); - this.xMsClientRequestId = rawHeaders.getValue(HttpHeaderName.fromString("x-ms-client-request-id")); + this.xMsRequestId = rawHeaders.getValue(X_MS_REQUEST_ID); + this.xMsClientRequestId = rawHeaders.getValue(X_MS_CLIENT_REQUEST_ID); String date = rawHeaders.getValue(HttpHeaderName.DATE); if (date != null) { this.date = new DateTimeRfc1123(date); @@ -62,7 +66,7 @@ public ContainersListBlobHierarchySegmentHeaders(HttpHeaders rawHeaders) { /** * Get the xMsVersion property: The x-ms-version property. - * + * * @return the xMsVersion value. */ public String getXMsVersion() { @@ -71,7 +75,7 @@ public String getXMsVersion() { /** * Set the xMsVersion property: The x-ms-version property. - * + * * @param xMsVersion the xMsVersion value to set. * @return the ContainersListBlobHierarchySegmentHeaders object itself. */ @@ -82,7 +86,7 @@ public ContainersListBlobHierarchySegmentHeaders setXMsVersion(String xMsVersion /** * Get the xMsRequestId property: The x-ms-request-id property. - * + * * @return the xMsRequestId value. */ public String getXMsRequestId() { @@ -91,7 +95,7 @@ public String getXMsRequestId() { /** * Set the xMsRequestId property: The x-ms-request-id property. - * + * * @param xMsRequestId the xMsRequestId value to set. * @return the ContainersListBlobHierarchySegmentHeaders object itself. */ @@ -102,7 +106,7 @@ public ContainersListBlobHierarchySegmentHeaders setXMsRequestId(String xMsReque /** * Get the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @return the xMsClientRequestId value. */ public String getXMsClientRequestId() { @@ -111,7 +115,7 @@ public String getXMsClientRequestId() { /** * Set the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @param xMsClientRequestId the xMsClientRequestId value to set. * @return the ContainersListBlobHierarchySegmentHeaders object itself. */ @@ -122,7 +126,7 @@ public ContainersListBlobHierarchySegmentHeaders setXMsClientRequestId(String xM /** * Get the date property: The Date property. - * + * * @return the date value. */ public OffsetDateTime getDate() { @@ -134,7 +138,7 @@ public OffsetDateTime getDate() { /** * Set the date property: The Date property. - * + * * @param date the date value to set. * @return the ContainersListBlobHierarchySegmentHeaders object itself. */ @@ -149,7 +153,7 @@ public ContainersListBlobHierarchySegmentHeaders setDate(OffsetDateTime date) { /** * Get the contentType property: The Content-Type property. - * + * * @return the contentType value. */ public String getContentType() { @@ -158,7 +162,7 @@ public String getContentType() { /** * Set the contentType property: The Content-Type property. - * + * * @param contentType the contentType value to set. * @return the ContainersListBlobHierarchySegmentHeaders object itself. */ diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ContainersReleaseLeaseHeaders.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ContainersReleaseLeaseHeaders.java index 9ef0d0ad99c8..373ca378e1d4 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ContainersReleaseLeaseHeaders.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ContainersReleaseLeaseHeaders.java @@ -4,17 +4,17 @@ package com.azure.v2.storage.blob.models; -import com.azure.v2.core.annotation.Fluent; +import io.clientcore.core.annotations.Metadata; +import io.clientcore.core.annotations.TypeConditions; import io.clientcore.core.http.models.HttpHeaderName; import io.clientcore.core.http.models.HttpHeaders; -import io.clientcore.core.util.DateTimeRfc1123; - +import io.clientcore.core.utils.DateTimeRfc1123; import java.time.OffsetDateTime; /** * The ContainersReleaseLeaseHeaders model. */ -@Fluent +@Metadata(conditions = { TypeConditions.FLUENT }) public final class ContainersReleaseLeaseHeaders { /* * The x-ms-version property. @@ -48,10 +48,14 @@ public final class ContainersReleaseLeaseHeaders { private static final HttpHeaderName X_MS_VERSION = HttpHeaderName.fromString("x-ms-version"); + private static final HttpHeaderName X_MS_REQUEST_ID = HttpHeaderName.fromString("x-ms-request-id"); + + private static final HttpHeaderName X_MS_CLIENT_REQUEST_ID = HttpHeaderName.fromString("x-ms-client-request-id"); + // HttpHeaders containing the raw property values. /** * Creates an instance of ContainersReleaseLeaseHeaders class. - * + * * @param rawHeaders The raw HttpHeaders that will be used to create the property values. */ public ContainersReleaseLeaseHeaders(HttpHeaders rawHeaders) { @@ -61,8 +65,8 @@ public ContainersReleaseLeaseHeaders(HttpHeaders rawHeaders) { if (lastModified != null) { this.lastModified = new DateTimeRfc1123(lastModified); } - this.xMsRequestId = rawHeaders.getValue(HttpHeaderName.fromString("x-ms-request-id")); - this.xMsClientRequestId = rawHeaders.getValue(HttpHeaderName.fromString("x-ms-client-request-id")); + this.xMsRequestId = rawHeaders.getValue(X_MS_REQUEST_ID); + this.xMsClientRequestId = rawHeaders.getValue(X_MS_CLIENT_REQUEST_ID); String date = rawHeaders.getValue(HttpHeaderName.DATE); if (date != null) { this.date = new DateTimeRfc1123(date); @@ -71,7 +75,7 @@ public ContainersReleaseLeaseHeaders(HttpHeaders rawHeaders) { /** * Get the xMsVersion property: The x-ms-version property. - * + * * @return the xMsVersion value. */ public String getXMsVersion() { @@ -80,7 +84,7 @@ public String getXMsVersion() { /** * Set the xMsVersion property: The x-ms-version property. - * + * * @param xMsVersion the xMsVersion value to set. * @return the ContainersReleaseLeaseHeaders object itself. */ @@ -91,7 +95,7 @@ public ContainersReleaseLeaseHeaders setXMsVersion(String xMsVersion) { /** * Get the eTag property: The ETag property. - * + * * @return the eTag value. */ public String getETag() { @@ -100,7 +104,7 @@ public String getETag() { /** * Set the eTag property: The ETag property. - * + * * @param eTag the eTag value to set. * @return the ContainersReleaseLeaseHeaders object itself. */ @@ -111,7 +115,7 @@ public ContainersReleaseLeaseHeaders setETag(String eTag) { /** * Get the lastModified property: The Last-Modified property. - * + * * @return the lastModified value. */ public OffsetDateTime getLastModified() { @@ -123,7 +127,7 @@ public OffsetDateTime getLastModified() { /** * Set the lastModified property: The Last-Modified property. - * + * * @param lastModified the lastModified value to set. * @return the ContainersReleaseLeaseHeaders object itself. */ @@ -138,7 +142,7 @@ public ContainersReleaseLeaseHeaders setLastModified(OffsetDateTime lastModified /** * Get the xMsRequestId property: The x-ms-request-id property. - * + * * @return the xMsRequestId value. */ public String getXMsRequestId() { @@ -147,7 +151,7 @@ public String getXMsRequestId() { /** * Set the xMsRequestId property: The x-ms-request-id property. - * + * * @param xMsRequestId the xMsRequestId value to set. * @return the ContainersReleaseLeaseHeaders object itself. */ @@ -158,7 +162,7 @@ public ContainersReleaseLeaseHeaders setXMsRequestId(String xMsRequestId) { /** * Get the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @return the xMsClientRequestId value. */ public String getXMsClientRequestId() { @@ -167,7 +171,7 @@ public String getXMsClientRequestId() { /** * Set the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @param xMsClientRequestId the xMsClientRequestId value to set. * @return the ContainersReleaseLeaseHeaders object itself. */ @@ -178,7 +182,7 @@ public ContainersReleaseLeaseHeaders setXMsClientRequestId(String xMsClientReque /** * Get the date property: The Date property. - * + * * @return the date value. */ public OffsetDateTime getDate() { @@ -190,7 +194,7 @@ public OffsetDateTime getDate() { /** * Set the date property: The Date property. - * + * * @param date the date value to set. * @return the ContainersReleaseLeaseHeaders object itself. */ diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ContainersRenameHeaders.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ContainersRenameHeaders.java index c49d424e4b15..524ba16b6d0b 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ContainersRenameHeaders.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ContainersRenameHeaders.java @@ -4,17 +4,17 @@ package com.azure.v2.storage.blob.models; -import com.azure.v2.core.annotation.Fluent; +import io.clientcore.core.annotations.Metadata; +import io.clientcore.core.annotations.TypeConditions; import io.clientcore.core.http.models.HttpHeaderName; import io.clientcore.core.http.models.HttpHeaders; -import io.clientcore.core.util.DateTimeRfc1123; - +import io.clientcore.core.utils.DateTimeRfc1123; import java.time.OffsetDateTime; /** * The ContainersRenameHeaders model. */ -@Fluent +@Metadata(conditions = { TypeConditions.FLUENT }) public final class ContainersRenameHeaders { /* * The x-ms-version property. @@ -38,16 +38,20 @@ public final class ContainersRenameHeaders { private static final HttpHeaderName X_MS_VERSION = HttpHeaderName.fromString("x-ms-version"); + private static final HttpHeaderName X_MS_REQUEST_ID = HttpHeaderName.fromString("x-ms-request-id"); + + private static final HttpHeaderName X_MS_CLIENT_REQUEST_ID = HttpHeaderName.fromString("x-ms-client-request-id"); + // HttpHeaders containing the raw property values. /** * Creates an instance of ContainersRenameHeaders class. - * + * * @param rawHeaders The raw HttpHeaders that will be used to create the property values. */ public ContainersRenameHeaders(HttpHeaders rawHeaders) { this.xMsVersion = rawHeaders.getValue(X_MS_VERSION); - this.xMsRequestId = rawHeaders.getValue(HttpHeaderName.fromString("x-ms-request-id")); - this.xMsClientRequestId = rawHeaders.getValue(HttpHeaderName.fromString("x-ms-client-request-id")); + this.xMsRequestId = rawHeaders.getValue(X_MS_REQUEST_ID); + this.xMsClientRequestId = rawHeaders.getValue(X_MS_CLIENT_REQUEST_ID); String date = rawHeaders.getValue(HttpHeaderName.DATE); if (date != null) { this.date = new DateTimeRfc1123(date); @@ -56,7 +60,7 @@ public ContainersRenameHeaders(HttpHeaders rawHeaders) { /** * Get the xMsVersion property: The x-ms-version property. - * + * * @return the xMsVersion value. */ public String getXMsVersion() { @@ -65,7 +69,7 @@ public String getXMsVersion() { /** * Set the xMsVersion property: The x-ms-version property. - * + * * @param xMsVersion the xMsVersion value to set. * @return the ContainersRenameHeaders object itself. */ @@ -76,7 +80,7 @@ public ContainersRenameHeaders setXMsVersion(String xMsVersion) { /** * Get the xMsRequestId property: The x-ms-request-id property. - * + * * @return the xMsRequestId value. */ public String getXMsRequestId() { @@ -85,7 +89,7 @@ public String getXMsRequestId() { /** * Set the xMsRequestId property: The x-ms-request-id property. - * + * * @param xMsRequestId the xMsRequestId value to set. * @return the ContainersRenameHeaders object itself. */ @@ -96,7 +100,7 @@ public ContainersRenameHeaders setXMsRequestId(String xMsRequestId) { /** * Get the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @return the xMsClientRequestId value. */ public String getXMsClientRequestId() { @@ -105,7 +109,7 @@ public String getXMsClientRequestId() { /** * Set the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @param xMsClientRequestId the xMsClientRequestId value to set. * @return the ContainersRenameHeaders object itself. */ @@ -116,7 +120,7 @@ public ContainersRenameHeaders setXMsClientRequestId(String xMsClientRequestId) /** * Get the date property: The Date property. - * + * * @return the date value. */ public OffsetDateTime getDate() { @@ -128,7 +132,7 @@ public OffsetDateTime getDate() { /** * Set the date property: The Date property. - * + * * @param date the date value to set. * @return the ContainersRenameHeaders object itself. */ diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ContainersRenewLeaseHeaders.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ContainersRenewLeaseHeaders.java index b778c4b8ecea..c3381121cfd4 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ContainersRenewLeaseHeaders.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ContainersRenewLeaseHeaders.java @@ -4,17 +4,17 @@ package com.azure.v2.storage.blob.models; -import com.azure.v2.core.annotation.Fluent; +import io.clientcore.core.annotations.Metadata; +import io.clientcore.core.annotations.TypeConditions; import io.clientcore.core.http.models.HttpHeaderName; import io.clientcore.core.http.models.HttpHeaders; -import io.clientcore.core.util.DateTimeRfc1123; - +import io.clientcore.core.utils.DateTimeRfc1123; import java.time.OffsetDateTime; /** * The ContainersRenewLeaseHeaders model. */ -@Fluent +@Metadata(conditions = { TypeConditions.FLUENT }) public final class ContainersRenewLeaseHeaders { /* * The x-ms-version property. @@ -55,10 +55,14 @@ public final class ContainersRenewLeaseHeaders { private static final HttpHeaderName X_MS_LEASE_ID = HttpHeaderName.fromString("x-ms-lease-id"); + private static final HttpHeaderName X_MS_REQUEST_ID = HttpHeaderName.fromString("x-ms-request-id"); + + private static final HttpHeaderName X_MS_CLIENT_REQUEST_ID = HttpHeaderName.fromString("x-ms-client-request-id"); + // HttpHeaders containing the raw property values. /** * Creates an instance of ContainersRenewLeaseHeaders class. - * + * * @param rawHeaders The raw HttpHeaders that will be used to create the property values. */ public ContainersRenewLeaseHeaders(HttpHeaders rawHeaders) { @@ -69,8 +73,8 @@ public ContainersRenewLeaseHeaders(HttpHeaders rawHeaders) { if (lastModified != null) { this.lastModified = new DateTimeRfc1123(lastModified); } - this.xMsRequestId = rawHeaders.getValue(HttpHeaderName.fromString("x-ms-request-id")); - this.xMsClientRequestId = rawHeaders.getValue(HttpHeaderName.fromString("x-ms-client-request-id")); + this.xMsRequestId = rawHeaders.getValue(X_MS_REQUEST_ID); + this.xMsClientRequestId = rawHeaders.getValue(X_MS_CLIENT_REQUEST_ID); String date = rawHeaders.getValue(HttpHeaderName.DATE); if (date != null) { this.date = new DateTimeRfc1123(date); @@ -79,7 +83,7 @@ public ContainersRenewLeaseHeaders(HttpHeaders rawHeaders) { /** * Get the xMsVersion property: The x-ms-version property. - * + * * @return the xMsVersion value. */ public String getXMsVersion() { @@ -88,7 +92,7 @@ public String getXMsVersion() { /** * Set the xMsVersion property: The x-ms-version property. - * + * * @param xMsVersion the xMsVersion value to set. * @return the ContainersRenewLeaseHeaders object itself. */ @@ -99,7 +103,7 @@ public ContainersRenewLeaseHeaders setXMsVersion(String xMsVersion) { /** * Get the eTag property: The ETag property. - * + * * @return the eTag value. */ public String getETag() { @@ -108,7 +112,7 @@ public String getETag() { /** * Set the eTag property: The ETag property. - * + * * @param eTag the eTag value to set. * @return the ContainersRenewLeaseHeaders object itself. */ @@ -119,7 +123,7 @@ public ContainersRenewLeaseHeaders setETag(String eTag) { /** * Get the xMsLeaseId property: The x-ms-lease-id property. - * + * * @return the xMsLeaseId value. */ public String getXMsLeaseId() { @@ -128,7 +132,7 @@ public String getXMsLeaseId() { /** * Set the xMsLeaseId property: The x-ms-lease-id property. - * + * * @param xMsLeaseId the xMsLeaseId value to set. * @return the ContainersRenewLeaseHeaders object itself. */ @@ -139,7 +143,7 @@ public ContainersRenewLeaseHeaders setXMsLeaseId(String xMsLeaseId) { /** * Get the lastModified property: The Last-Modified property. - * + * * @return the lastModified value. */ public OffsetDateTime getLastModified() { @@ -151,7 +155,7 @@ public OffsetDateTime getLastModified() { /** * Set the lastModified property: The Last-Modified property. - * + * * @param lastModified the lastModified value to set. * @return the ContainersRenewLeaseHeaders object itself. */ @@ -166,7 +170,7 @@ public ContainersRenewLeaseHeaders setLastModified(OffsetDateTime lastModified) /** * Get the xMsRequestId property: The x-ms-request-id property. - * + * * @return the xMsRequestId value. */ public String getXMsRequestId() { @@ -175,7 +179,7 @@ public String getXMsRequestId() { /** * Set the xMsRequestId property: The x-ms-request-id property. - * + * * @param xMsRequestId the xMsRequestId value to set. * @return the ContainersRenewLeaseHeaders object itself. */ @@ -186,7 +190,7 @@ public ContainersRenewLeaseHeaders setXMsRequestId(String xMsRequestId) { /** * Get the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @return the xMsClientRequestId value. */ public String getXMsClientRequestId() { @@ -195,7 +199,7 @@ public String getXMsClientRequestId() { /** * Set the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @param xMsClientRequestId the xMsClientRequestId value to set. * @return the ContainersRenewLeaseHeaders object itself. */ @@ -206,7 +210,7 @@ public ContainersRenewLeaseHeaders setXMsClientRequestId(String xMsClientRequest /** * Get the date property: The Date property. - * + * * @return the date value. */ public OffsetDateTime getDate() { @@ -218,7 +222,7 @@ public OffsetDateTime getDate() { /** * Set the date property: The Date property. - * + * * @param date the date value to set. * @return the ContainersRenewLeaseHeaders object itself. */ diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ContainersRestoreHeaders.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ContainersRestoreHeaders.java index 30f94f582587..d971228daf39 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ContainersRestoreHeaders.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ContainersRestoreHeaders.java @@ -4,17 +4,17 @@ package com.azure.v2.storage.blob.models; -import com.azure.v2.core.annotation.Fluent; +import io.clientcore.core.annotations.Metadata; +import io.clientcore.core.annotations.TypeConditions; import io.clientcore.core.http.models.HttpHeaderName; import io.clientcore.core.http.models.HttpHeaders; -import io.clientcore.core.util.DateTimeRfc1123; - +import io.clientcore.core.utils.DateTimeRfc1123; import java.time.OffsetDateTime; /** * The ContainersRestoreHeaders model. */ -@Fluent +@Metadata(conditions = { TypeConditions.FLUENT }) public final class ContainersRestoreHeaders { /* * The x-ms-version property. @@ -38,16 +38,20 @@ public final class ContainersRestoreHeaders { private static final HttpHeaderName X_MS_VERSION = HttpHeaderName.fromString("x-ms-version"); + private static final HttpHeaderName X_MS_REQUEST_ID = HttpHeaderName.fromString("x-ms-request-id"); + + private static final HttpHeaderName X_MS_CLIENT_REQUEST_ID = HttpHeaderName.fromString("x-ms-client-request-id"); + // HttpHeaders containing the raw property values. /** * Creates an instance of ContainersRestoreHeaders class. - * + * * @param rawHeaders The raw HttpHeaders that will be used to create the property values. */ public ContainersRestoreHeaders(HttpHeaders rawHeaders) { this.xMsVersion = rawHeaders.getValue(X_MS_VERSION); - this.xMsRequestId = rawHeaders.getValue(HttpHeaderName.fromString("x-ms-request-id")); - this.xMsClientRequestId = rawHeaders.getValue(HttpHeaderName.fromString("x-ms-client-request-id")); + this.xMsRequestId = rawHeaders.getValue(X_MS_REQUEST_ID); + this.xMsClientRequestId = rawHeaders.getValue(X_MS_CLIENT_REQUEST_ID); String date = rawHeaders.getValue(HttpHeaderName.DATE); if (date != null) { this.date = new DateTimeRfc1123(date); @@ -56,7 +60,7 @@ public ContainersRestoreHeaders(HttpHeaders rawHeaders) { /** * Get the xMsVersion property: The x-ms-version property. - * + * * @return the xMsVersion value. */ public String getXMsVersion() { @@ -65,7 +69,7 @@ public String getXMsVersion() { /** * Set the xMsVersion property: The x-ms-version property. - * + * * @param xMsVersion the xMsVersion value to set. * @return the ContainersRestoreHeaders object itself. */ @@ -76,7 +80,7 @@ public ContainersRestoreHeaders setXMsVersion(String xMsVersion) { /** * Get the xMsRequestId property: The x-ms-request-id property. - * + * * @return the xMsRequestId value. */ public String getXMsRequestId() { @@ -85,7 +89,7 @@ public String getXMsRequestId() { /** * Set the xMsRequestId property: The x-ms-request-id property. - * + * * @param xMsRequestId the xMsRequestId value to set. * @return the ContainersRestoreHeaders object itself. */ @@ -96,7 +100,7 @@ public ContainersRestoreHeaders setXMsRequestId(String xMsRequestId) { /** * Get the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @return the xMsClientRequestId value. */ public String getXMsClientRequestId() { @@ -105,7 +109,7 @@ public String getXMsClientRequestId() { /** * Set the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @param xMsClientRequestId the xMsClientRequestId value to set. * @return the ContainersRestoreHeaders object itself. */ @@ -116,7 +120,7 @@ public ContainersRestoreHeaders setXMsClientRequestId(String xMsClientRequestId) /** * Get the date property: The Date property. - * + * * @return the date value. */ public OffsetDateTime getDate() { @@ -128,7 +132,7 @@ public OffsetDateTime getDate() { /** * Set the date property: The Date property. - * + * * @param date the date value to set. * @return the ContainersRestoreHeaders object itself. */ diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ContainersSetAccessPolicyHeaders.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ContainersSetAccessPolicyHeaders.java index 8d26e5d0db07..13b19c5dc9d4 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ContainersSetAccessPolicyHeaders.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ContainersSetAccessPolicyHeaders.java @@ -4,17 +4,17 @@ package com.azure.v2.storage.blob.models; -import com.azure.v2.core.annotation.Fluent; +import io.clientcore.core.annotations.Metadata; +import io.clientcore.core.annotations.TypeConditions; import io.clientcore.core.http.models.HttpHeaderName; import io.clientcore.core.http.models.HttpHeaders; -import io.clientcore.core.util.DateTimeRfc1123; - +import io.clientcore.core.utils.DateTimeRfc1123; import java.time.OffsetDateTime; /** * The ContainersSetAccessPolicyHeaders model. */ -@Fluent +@Metadata(conditions = { TypeConditions.FLUENT }) public final class ContainersSetAccessPolicyHeaders { /* * The x-ms-version property. @@ -48,10 +48,14 @@ public final class ContainersSetAccessPolicyHeaders { private static final HttpHeaderName X_MS_VERSION = HttpHeaderName.fromString("x-ms-version"); + private static final HttpHeaderName X_MS_REQUEST_ID = HttpHeaderName.fromString("x-ms-request-id"); + + private static final HttpHeaderName X_MS_CLIENT_REQUEST_ID = HttpHeaderName.fromString("x-ms-client-request-id"); + // HttpHeaders containing the raw property values. /** * Creates an instance of ContainersSetAccessPolicyHeaders class. - * + * * @param rawHeaders The raw HttpHeaders that will be used to create the property values. */ public ContainersSetAccessPolicyHeaders(HttpHeaders rawHeaders) { @@ -61,8 +65,8 @@ public ContainersSetAccessPolicyHeaders(HttpHeaders rawHeaders) { if (lastModified != null) { this.lastModified = new DateTimeRfc1123(lastModified); } - this.xMsRequestId = rawHeaders.getValue(HttpHeaderName.fromString("x-ms-request-id")); - this.xMsClientRequestId = rawHeaders.getValue(HttpHeaderName.fromString("x-ms-client-request-id")); + this.xMsRequestId = rawHeaders.getValue(X_MS_REQUEST_ID); + this.xMsClientRequestId = rawHeaders.getValue(X_MS_CLIENT_REQUEST_ID); String date = rawHeaders.getValue(HttpHeaderName.DATE); if (date != null) { this.date = new DateTimeRfc1123(date); @@ -71,7 +75,7 @@ public ContainersSetAccessPolicyHeaders(HttpHeaders rawHeaders) { /** * Get the xMsVersion property: The x-ms-version property. - * + * * @return the xMsVersion value. */ public String getXMsVersion() { @@ -80,7 +84,7 @@ public String getXMsVersion() { /** * Set the xMsVersion property: The x-ms-version property. - * + * * @param xMsVersion the xMsVersion value to set. * @return the ContainersSetAccessPolicyHeaders object itself. */ @@ -91,7 +95,7 @@ public ContainersSetAccessPolicyHeaders setXMsVersion(String xMsVersion) { /** * Get the eTag property: The ETag property. - * + * * @return the eTag value. */ public String getETag() { @@ -100,7 +104,7 @@ public String getETag() { /** * Set the eTag property: The ETag property. - * + * * @param eTag the eTag value to set. * @return the ContainersSetAccessPolicyHeaders object itself. */ @@ -111,7 +115,7 @@ public ContainersSetAccessPolicyHeaders setETag(String eTag) { /** * Get the lastModified property: The Last-Modified property. - * + * * @return the lastModified value. */ public OffsetDateTime getLastModified() { @@ -123,7 +127,7 @@ public OffsetDateTime getLastModified() { /** * Set the lastModified property: The Last-Modified property. - * + * * @param lastModified the lastModified value to set. * @return the ContainersSetAccessPolicyHeaders object itself. */ @@ -138,7 +142,7 @@ public ContainersSetAccessPolicyHeaders setLastModified(OffsetDateTime lastModif /** * Get the xMsRequestId property: The x-ms-request-id property. - * + * * @return the xMsRequestId value. */ public String getXMsRequestId() { @@ -147,7 +151,7 @@ public String getXMsRequestId() { /** * Set the xMsRequestId property: The x-ms-request-id property. - * + * * @param xMsRequestId the xMsRequestId value to set. * @return the ContainersSetAccessPolicyHeaders object itself. */ @@ -158,7 +162,7 @@ public ContainersSetAccessPolicyHeaders setXMsRequestId(String xMsRequestId) { /** * Get the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @return the xMsClientRequestId value. */ public String getXMsClientRequestId() { @@ -167,7 +171,7 @@ public String getXMsClientRequestId() { /** * Set the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @param xMsClientRequestId the xMsClientRequestId value to set. * @return the ContainersSetAccessPolicyHeaders object itself. */ @@ -178,7 +182,7 @@ public ContainersSetAccessPolicyHeaders setXMsClientRequestId(String xMsClientRe /** * Get the date property: The Date property. - * + * * @return the date value. */ public OffsetDateTime getDate() { @@ -190,7 +194,7 @@ public OffsetDateTime getDate() { /** * Set the date property: The Date property. - * + * * @param date the date value to set. * @return the ContainersSetAccessPolicyHeaders object itself. */ diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ContainersSetMetadataHeaders.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ContainersSetMetadataHeaders.java index 6be936174bcc..0c6026a2fe56 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ContainersSetMetadataHeaders.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ContainersSetMetadataHeaders.java @@ -4,17 +4,17 @@ package com.azure.v2.storage.blob.models; -import com.azure.v2.core.annotation.Fluent; +import io.clientcore.core.annotations.Metadata; +import io.clientcore.core.annotations.TypeConditions; import io.clientcore.core.http.models.HttpHeaderName; import io.clientcore.core.http.models.HttpHeaders; -import io.clientcore.core.util.DateTimeRfc1123; - +import io.clientcore.core.utils.DateTimeRfc1123; import java.time.OffsetDateTime; /** * The ContainersSetMetadataHeaders model. */ -@Fluent +@Metadata(conditions = { TypeConditions.FLUENT }) public final class ContainersSetMetadataHeaders { /* * The x-ms-version property. @@ -48,10 +48,14 @@ public final class ContainersSetMetadataHeaders { private static final HttpHeaderName X_MS_VERSION = HttpHeaderName.fromString("x-ms-version"); + private static final HttpHeaderName X_MS_REQUEST_ID = HttpHeaderName.fromString("x-ms-request-id"); + + private static final HttpHeaderName X_MS_CLIENT_REQUEST_ID = HttpHeaderName.fromString("x-ms-client-request-id"); + // HttpHeaders containing the raw property values. /** * Creates an instance of ContainersSetMetadataHeaders class. - * + * * @param rawHeaders The raw HttpHeaders that will be used to create the property values. */ public ContainersSetMetadataHeaders(HttpHeaders rawHeaders) { @@ -61,8 +65,8 @@ public ContainersSetMetadataHeaders(HttpHeaders rawHeaders) { if (lastModified != null) { this.lastModified = new DateTimeRfc1123(lastModified); } - this.xMsRequestId = rawHeaders.getValue(HttpHeaderName.fromString("x-ms-request-id")); - this.xMsClientRequestId = rawHeaders.getValue(HttpHeaderName.fromString("x-ms-client-request-id")); + this.xMsRequestId = rawHeaders.getValue(X_MS_REQUEST_ID); + this.xMsClientRequestId = rawHeaders.getValue(X_MS_CLIENT_REQUEST_ID); String date = rawHeaders.getValue(HttpHeaderName.DATE); if (date != null) { this.date = new DateTimeRfc1123(date); @@ -71,7 +75,7 @@ public ContainersSetMetadataHeaders(HttpHeaders rawHeaders) { /** * Get the xMsVersion property: The x-ms-version property. - * + * * @return the xMsVersion value. */ public String getXMsVersion() { @@ -80,7 +84,7 @@ public String getXMsVersion() { /** * Set the xMsVersion property: The x-ms-version property. - * + * * @param xMsVersion the xMsVersion value to set. * @return the ContainersSetMetadataHeaders object itself. */ @@ -91,7 +95,7 @@ public ContainersSetMetadataHeaders setXMsVersion(String xMsVersion) { /** * Get the eTag property: The ETag property. - * + * * @return the eTag value. */ public String getETag() { @@ -100,7 +104,7 @@ public String getETag() { /** * Set the eTag property: The ETag property. - * + * * @param eTag the eTag value to set. * @return the ContainersSetMetadataHeaders object itself. */ @@ -111,7 +115,7 @@ public ContainersSetMetadataHeaders setETag(String eTag) { /** * Get the lastModified property: The Last-Modified property. - * + * * @return the lastModified value. */ public OffsetDateTime getLastModified() { @@ -123,7 +127,7 @@ public OffsetDateTime getLastModified() { /** * Set the lastModified property: The Last-Modified property. - * + * * @param lastModified the lastModified value to set. * @return the ContainersSetMetadataHeaders object itself. */ @@ -138,7 +142,7 @@ public ContainersSetMetadataHeaders setLastModified(OffsetDateTime lastModified) /** * Get the xMsRequestId property: The x-ms-request-id property. - * + * * @return the xMsRequestId value. */ public String getXMsRequestId() { @@ -147,7 +151,7 @@ public String getXMsRequestId() { /** * Set the xMsRequestId property: The x-ms-request-id property. - * + * * @param xMsRequestId the xMsRequestId value to set. * @return the ContainersSetMetadataHeaders object itself. */ @@ -158,7 +162,7 @@ public ContainersSetMetadataHeaders setXMsRequestId(String xMsRequestId) { /** * Get the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @return the xMsClientRequestId value. */ public String getXMsClientRequestId() { @@ -167,7 +171,7 @@ public String getXMsClientRequestId() { /** * Set the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @param xMsClientRequestId the xMsClientRequestId value to set. * @return the ContainersSetMetadataHeaders object itself. */ @@ -178,7 +182,7 @@ public ContainersSetMetadataHeaders setXMsClientRequestId(String xMsClientReques /** * Get the date property: The Date property. - * + * * @return the date value. */ public OffsetDateTime getDate() { @@ -190,7 +194,7 @@ public OffsetDateTime getDate() { /** * Set the date property: The Date property. - * + * * @param date the date value to set. * @return the ContainersSetMetadataHeaders object itself. */ diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ContainersSubmitBatchHeaders.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ContainersSubmitBatchHeaders.java index 577ce91c347a..5a8b0e1df189 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ContainersSubmitBatchHeaders.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ContainersSubmitBatchHeaders.java @@ -4,14 +4,15 @@ package com.azure.v2.storage.blob.models; -import com.azure.v2.core.annotation.Fluent; +import io.clientcore.core.annotations.Metadata; +import io.clientcore.core.annotations.TypeConditions; import io.clientcore.core.http.models.HttpHeaderName; import io.clientcore.core.http.models.HttpHeaders; /** * The ContainersSubmitBatchHeaders model. */ -@Fluent +@Metadata(conditions = { TypeConditions.FLUENT }) public final class ContainersSubmitBatchHeaders { /* * The x-ms-version property. @@ -30,21 +31,23 @@ public final class ContainersSubmitBatchHeaders { private static final HttpHeaderName X_MS_VERSION = HttpHeaderName.fromString("x-ms-version"); + private static final HttpHeaderName X_MS_REQUEST_ID = HttpHeaderName.fromString("x-ms-request-id"); + // HttpHeaders containing the raw property values. /** * Creates an instance of ContainersSubmitBatchHeaders class. - * + * * @param rawHeaders The raw HttpHeaders that will be used to create the property values. */ public ContainersSubmitBatchHeaders(HttpHeaders rawHeaders) { this.xMsVersion = rawHeaders.getValue(X_MS_VERSION); - this.xMsRequestId = rawHeaders.getValue(HttpHeaderName.fromString("x-ms-request-id")); + this.xMsRequestId = rawHeaders.getValue(X_MS_REQUEST_ID); this.contentType = rawHeaders.getValue(HttpHeaderName.CONTENT_TYPE); } /** * Get the xMsVersion property: The x-ms-version property. - * + * * @return the xMsVersion value. */ public String getXMsVersion() { @@ -53,7 +56,7 @@ public String getXMsVersion() { /** * Set the xMsVersion property: The x-ms-version property. - * + * * @param xMsVersion the xMsVersion value to set. * @return the ContainersSubmitBatchHeaders object itself. */ @@ -64,7 +67,7 @@ public ContainersSubmitBatchHeaders setXMsVersion(String xMsVersion) { /** * Get the xMsRequestId property: The x-ms-request-id property. - * + * * @return the xMsRequestId value. */ public String getXMsRequestId() { @@ -73,7 +76,7 @@ public String getXMsRequestId() { /** * Set the xMsRequestId property: The x-ms-request-id property. - * + * * @param xMsRequestId the xMsRequestId value to set. * @return the ContainersSubmitBatchHeaders object itself. */ @@ -84,7 +87,7 @@ public ContainersSubmitBatchHeaders setXMsRequestId(String xMsRequestId) { /** * Get the contentType property: The Content-Type property. - * + * * @return the contentType value. */ public String getContentType() { @@ -93,7 +96,7 @@ public String getContentType() { /** * Set the contentType property: The Content-Type property. - * + * * @param contentType the contentType value to set. * @return the ContainersSubmitBatchHeaders object itself. */ diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/CopyStatusType.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/CopyStatusType.java index 969feea15694..bf373d85dffa 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/CopyStatusType.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/CopyStatusType.java @@ -39,7 +39,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-v2/src/main/java/com/azure/v2/storage/blob/models/CpkInfo.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/CpkInfo.java index cf26938fb595..7bab8a840f75 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/CpkInfo.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/CpkInfo.java @@ -4,12 +4,13 @@ package com.azure.v2.storage.blob.models; -import com.azure.v2.core.annotation.Fluent; +import io.clientcore.core.annotations.Metadata; +import io.clientcore.core.annotations.TypeConditions; /** * Parameter group. */ -@Fluent +@Metadata(conditions = { TypeConditions.FLUENT }) public final class CpkInfo { /* * Optional. Specifies the encryption key to use to encrypt the data provided in the request. If not specified, @@ -39,7 +40,7 @@ public CpkInfo() { * Get the encryptionKey property: Optional. Specifies the encryption key to use to encrypt the data provided in the * request. If not specified, encryption is performed with the root account encryption key. For more information, * see Encryption at Rest for Azure Storage Services. - * + * * @return the encryptionKey value. */ public String getEncryptionKey() { @@ -50,7 +51,7 @@ public String getEncryptionKey() { * Set the encryptionKey property: Optional. Specifies the encryption key to use to encrypt the data provided in the * request. If not specified, encryption is performed with the root account encryption key. For more information, * see Encryption at Rest for Azure Storage Services. - * + * * @param encryptionKey the encryptionKey value to set. * @return the CpkInfo object itself. */ @@ -62,7 +63,7 @@ public CpkInfo setEncryptionKey(String encryptionKey) { /** * Get the encryptionKeySha256 property: The SHA-256 hash of the provided encryption key. Must be provided if the * x-ms-encryption-key header is provided. - * + * * @return the encryptionKeySha256 value. */ public String getEncryptionKeySha256() { @@ -72,7 +73,7 @@ public String getEncryptionKeySha256() { /** * Set the encryptionKeySha256 property: The SHA-256 hash of the provided encryption key. Must be provided if the * x-ms-encryption-key header is provided. - * + * * @param encryptionKeySha256 the encryptionKeySha256 value to set. * @return the CpkInfo object itself. */ @@ -84,7 +85,7 @@ public CpkInfo setEncryptionKeySha256(String encryptionKeySha256) { /** * Get the encryptionAlgorithm property: The algorithm used to produce the encryption key hash. Currently, the only * accepted value is "AES256". Must be provided if the x-ms-encryption-key header is provided. - * + * * @return the encryptionAlgorithm value. */ public EncryptionAlgorithmType getEncryptionAlgorithm() { @@ -94,7 +95,7 @@ public EncryptionAlgorithmType getEncryptionAlgorithm() { /** * Set the encryptionAlgorithm property: The algorithm used to produce the encryption key hash. Currently, the only * accepted value is "AES256". Must be provided if the x-ms-encryption-key header is provided. - * + * * @param encryptionAlgorithm the encryptionAlgorithm value to set. * @return the CpkInfo object itself. */ diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/DeleteSnapshotsOptionType.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/DeleteSnapshotsOptionType.java index 447b848f540f..69e1358af4fa 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/DeleteSnapshotsOptionType.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/DeleteSnapshotsOptionType.java @@ -29,7 +29,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-v2/src/main/java/com/azure/v2/storage/blob/models/DelimitedTextConfiguration.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/DelimitedTextConfiguration.java index dd9aff1b1c6c..33aae012a3b7 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/DelimitedTextConfiguration.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/DelimitedTextConfiguration.java @@ -4,20 +4,19 @@ package com.azure.v2.storage.blob.models; -import com.azure.v2.core.annotation.Fluent; -import com.azure.v2.core.util.CoreUtils; +import io.clientcore.core.annotations.Metadata; +import io.clientcore.core.annotations.TypeConditions; import io.clientcore.core.serialization.xml.XmlReader; import io.clientcore.core.serialization.xml.XmlSerializable; import io.clientcore.core.serialization.xml.XmlToken; import io.clientcore.core.serialization.xml.XmlWriter; - import javax.xml.namespace.QName; import javax.xml.stream.XMLStreamException; /** * Groups the settings used for interpreting the blob data if the blob is delimited text formatted. */ -@Fluent +@Metadata(conditions = { TypeConditions.FLUENT }) public final class DelimitedTextConfiguration implements XmlSerializable { /* * The string used to separate columns. @@ -52,7 +51,7 @@ public DelimitedTextConfiguration() { /** * Get the columnSeparator property: The string used to separate columns. - * + * * @return the columnSeparator value. */ public String getColumnSeparator() { @@ -61,7 +60,7 @@ public String getColumnSeparator() { /** * Set the columnSeparator property: The string used to separate columns. - * + * * @param columnSeparator the columnSeparator value to set. * @return the DelimitedTextConfiguration object itself. */ @@ -72,7 +71,7 @@ public DelimitedTextConfiguration setColumnSeparator(String columnSeparator) { /** * Get the fieldQuote property: The string used to quote a specific field. - * + * * @return the fieldQuote value. */ public String getFieldQuote() { @@ -81,7 +80,7 @@ public String getFieldQuote() { /** * Set the fieldQuote property: The string used to quote a specific field. - * + * * @param fieldQuote the fieldQuote value to set. * @return the DelimitedTextConfiguration object itself. */ @@ -92,7 +91,7 @@ public DelimitedTextConfiguration setFieldQuote(String fieldQuote) { /** * Get the recordSeparator property: The string used to separate records. - * + * * @return the recordSeparator value. */ public String getRecordSeparator() { @@ -101,7 +100,7 @@ public String getRecordSeparator() { /** * Set the recordSeparator property: The string used to separate records. - * + * * @param recordSeparator the recordSeparator value to set. * @return the DelimitedTextConfiguration object itself. */ @@ -112,7 +111,7 @@ public DelimitedTextConfiguration setRecordSeparator(String recordSeparator) { /** * Get the escapeChar property: The string used as an escape character. - * + * * @return the escapeChar value. */ public String getEscapeChar() { @@ -121,7 +120,7 @@ public String getEscapeChar() { /** * Set the escapeChar property: The string used as an escape character. - * + * * @param escapeChar the escapeChar value to set. * @return the DelimitedTextConfiguration object itself. */ @@ -132,7 +131,7 @@ public DelimitedTextConfiguration setEscapeChar(String escapeChar) { /** * Get the headersPresent property: Represents whether the data has headers. - * + * * @return the headersPresent value. */ public Boolean isHeadersPresent() { @@ -141,7 +140,7 @@ public Boolean isHeadersPresent() { /** * Set the headersPresent property: Represents whether the data has headers. - * + * * @param headersPresent the headersPresent value to set. * @return the DelimitedTextConfiguration object itself. */ @@ -157,7 +156,8 @@ public XmlWriter toXml(XmlWriter xmlWriter) throws XMLStreamException { @Override public XmlWriter toXml(XmlWriter xmlWriter, String rootElementName) throws XMLStreamException { - rootElementName = CoreUtils.isNullOrEmpty(rootElementName) ? "DelimitedTextConfiguration" : rootElementName; + rootElementName + = rootElementName == null || rootElementName.isEmpty() ? "DelimitedTextConfiguration" : rootElementName; xmlWriter.writeStartElement(rootElementName); xmlWriter.writeStringElement("ColumnSeparator", this.columnSeparator); xmlWriter.writeStringElement("FieldQuote", this.fieldQuote); @@ -169,7 +169,7 @@ public XmlWriter toXml(XmlWriter xmlWriter, String rootElementName) throws XMLSt /** * Reads an instance of DelimitedTextConfiguration from the XmlReader. - * + * * @param xmlReader The XmlReader being read. * @return An instance of DelimitedTextConfiguration if the XmlReader was pointing to an instance of it, or null if * it was pointing to XML null. @@ -181,7 +181,7 @@ public static DelimitedTextConfiguration fromXml(XmlReader xmlReader) throws XML /** * Reads an instance of DelimitedTextConfiguration from the XmlReader. - * + * * @param xmlReader The XmlReader being read. * @param rootElementName Optional root element name to override the default defined by the model. Used to support * cases where the model can deserialize from different root element names. @@ -192,7 +192,7 @@ public static DelimitedTextConfiguration fromXml(XmlReader xmlReader) throws XML public static DelimitedTextConfiguration fromXml(XmlReader xmlReader, String rootElementName) throws XMLStreamException { String finalRootElementName - = CoreUtils.isNullOrEmpty(rootElementName) ? "DelimitedTextConfiguration" : rootElementName; + = rootElementName == null || rootElementName.isEmpty() ? "DelimitedTextConfiguration" : rootElementName; return xmlReader.readObject(finalRootElementName, reader -> { DelimitedTextConfiguration deserializedDelimitedTextConfiguration = new DelimitedTextConfiguration(); while (reader.nextElement() != XmlToken.END_ELEMENT) { diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/EncryptionAlgorithmType.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/EncryptionAlgorithmType.java index a518fc06259b..37422368f6c7 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/EncryptionAlgorithmType.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/EncryptionAlgorithmType.java @@ -24,7 +24,7 @@ public enum EncryptionAlgorithmType { /** * Parses a serialized value to a EncryptionAlgorithmType instance. - * + * * @param value the serialized value to parse. * @return the parsed EncryptionAlgorithmType object, or null if unable to parse. */ diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/EncryptionScope.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/EncryptionScope.java index 1fa16ddea7d9..310af8b6a119 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/EncryptionScope.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/EncryptionScope.java @@ -4,12 +4,13 @@ package com.azure.v2.storage.blob.models; -import com.azure.v2.core.annotation.Fluent; +import io.clientcore.core.annotations.Metadata; +import io.clientcore.core.annotations.TypeConditions; /** * Parameter group. */ -@Fluent +@Metadata(conditions = { TypeConditions.FLUENT }) public final class EncryptionScope { /* * Optional. Version 2019-07-07 and later. Specifies the name of the encryption scope to use to encrypt the data @@ -28,7 +29,7 @@ public EncryptionScope() { * Get the encryptionScope property: Optional. Version 2019-07-07 and later. Specifies the name of the encryption * scope to use to encrypt the data provided in the request. If not specified, encryption is performed with the * default account encryption scope. For more information, see Encryption at Rest for Azure Storage Services. - * + * * @return the encryptionScope value. */ public String getEncryptionScope() { @@ -39,7 +40,7 @@ public String getEncryptionScope() { * Set the encryptionScope property: Optional. Version 2019-07-07 and later. Specifies the name of the encryption * scope to use to encrypt the data provided in the request. If not specified, encryption is performed with the * default account encryption scope. For more information, see Encryption at Rest for Azure Storage Services. - * + * * @param encryptionScope the encryptionScope value to set. * @return the EncryptionScope object itself. */ diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/FilterBlobItem.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/FilterBlobItem.java index d6ec8b358548..b279ad4682c8 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/FilterBlobItem.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/FilterBlobItem.java @@ -4,20 +4,19 @@ package com.azure.v2.storage.blob.models; -import com.azure.v2.core.annotation.Fluent; -import com.azure.v2.core.util.CoreUtils; +import io.clientcore.core.annotations.Metadata; +import io.clientcore.core.annotations.TypeConditions; import io.clientcore.core.serialization.xml.XmlReader; import io.clientcore.core.serialization.xml.XmlSerializable; import io.clientcore.core.serialization.xml.XmlToken; import io.clientcore.core.serialization.xml.XmlWriter; - import javax.xml.namespace.QName; import javax.xml.stream.XMLStreamException; /** * Blob info from a Filter Blobs API call. */ -@Fluent +@Metadata(conditions = { TypeConditions.FLUENT }) public final class FilterBlobItem implements XmlSerializable { /* * The Name property. @@ -52,7 +51,7 @@ public FilterBlobItem() { /** * Get the name property: The Name property. - * + * * @return the name value. */ public String getName() { @@ -61,7 +60,7 @@ public String getName() { /** * Set the name property: The Name property. - * + * * @param name the name value to set. * @return the FilterBlobItem object itself. */ @@ -72,7 +71,7 @@ public FilterBlobItem setName(String name) { /** * Get the containerName property: The ContainerName property. - * + * * @return the containerName value. */ public String getContainerName() { @@ -81,7 +80,7 @@ public String getContainerName() { /** * Set the containerName property: The ContainerName property. - * + * * @param containerName the containerName value to set. * @return the FilterBlobItem object itself. */ @@ -92,7 +91,7 @@ public FilterBlobItem setContainerName(String containerName) { /** * Get the tags property: Blob tags. - * + * * @return the tags value. */ public BlobTags getTags() { @@ -101,7 +100,7 @@ public BlobTags getTags() { /** * Set the tags property: Blob tags. - * + * * @param tags the tags value to set. * @return the FilterBlobItem object itself. */ @@ -112,7 +111,7 @@ public FilterBlobItem setTags(BlobTags tags) { /** * Get the versionId property: The VersionId property. - * + * * @return the versionId value. */ public String getVersionId() { @@ -121,7 +120,7 @@ public String getVersionId() { /** * Set the versionId property: The VersionId property. - * + * * @param versionId the versionId value to set. * @return the FilterBlobItem object itself. */ @@ -132,7 +131,7 @@ public FilterBlobItem setVersionId(String versionId) { /** * Get the isCurrentVersion property: The IsCurrentVersion property. - * + * * @return the isCurrentVersion value. */ public Boolean isCurrentVersion() { @@ -141,7 +140,7 @@ public Boolean isCurrentVersion() { /** * Set the isCurrentVersion property: The IsCurrentVersion property. - * + * * @param isCurrentVersion the isCurrentVersion value to set. * @return the FilterBlobItem object itself. */ @@ -157,7 +156,7 @@ public XmlWriter toXml(XmlWriter xmlWriter) throws XMLStreamException { @Override public XmlWriter toXml(XmlWriter xmlWriter, String rootElementName) throws XMLStreamException { - rootElementName = CoreUtils.isNullOrEmpty(rootElementName) ? "Blob" : rootElementName; + rootElementName = rootElementName == null || rootElementName.isEmpty() ? "Blob" : rootElementName; xmlWriter.writeStartElement(rootElementName); xmlWriter.writeStringElement("Name", this.name); xmlWriter.writeStringElement("ContainerName", this.containerName); @@ -169,7 +168,7 @@ public XmlWriter toXml(XmlWriter xmlWriter, String rootElementName) throws XMLSt /** * Reads an instance of FilterBlobItem from the XmlReader. - * + * * @param xmlReader The XmlReader being read. * @return An instance of FilterBlobItem if the XmlReader was pointing to an instance of it, or null if it was * pointing to XML null. @@ -181,7 +180,7 @@ public static FilterBlobItem fromXml(XmlReader xmlReader) throws XMLStreamExcept /** * Reads an instance of FilterBlobItem from the XmlReader. - * + * * @param xmlReader The XmlReader being read. * @param rootElementName Optional root element name to override the default defined by the model. Used to support * cases where the model can deserialize from different root element names. @@ -190,7 +189,7 @@ public static FilterBlobItem fromXml(XmlReader xmlReader) throws XMLStreamExcept * @throws XMLStreamException If an error occurs while reading the FilterBlobItem. */ public static FilterBlobItem fromXml(XmlReader xmlReader, String rootElementName) throws XMLStreamException { - String finalRootElementName = CoreUtils.isNullOrEmpty(rootElementName) ? "Blob" : rootElementName; + String finalRootElementName = rootElementName == null || rootElementName.isEmpty() ? "Blob" : rootElementName; return xmlReader.readObject(finalRootElementName, reader -> { FilterBlobItem deserializedFilterBlobItem = new FilterBlobItem(); while (reader.nextElement() != XmlToken.END_ELEMENT) { diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/FilterBlobSegment.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/FilterBlobSegment.java index b6d629574de5..8f071cb3eb0c 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/FilterBlobSegment.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/FilterBlobSegment.java @@ -4,22 +4,21 @@ package com.azure.v2.storage.blob.models; -import com.azure.v2.core.annotation.Fluent; -import com.azure.v2.core.util.CoreUtils; +import io.clientcore.core.annotations.Metadata; +import io.clientcore.core.annotations.TypeConditions; import io.clientcore.core.serialization.xml.XmlReader; import io.clientcore.core.serialization.xml.XmlSerializable; import io.clientcore.core.serialization.xml.XmlToken; import io.clientcore.core.serialization.xml.XmlWriter; - -import javax.xml.namespace.QName; -import javax.xml.stream.XMLStreamException; import java.util.ArrayList; import java.util.List; +import javax.xml.namespace.QName; +import javax.xml.stream.XMLStreamException; /** * The result of a Filter Blobs API call. */ -@Fluent +@Metadata(conditions = { TypeConditions.FLUENT }) public final class FilterBlobSegment implements XmlSerializable { /* * The ServiceEndpoint property. @@ -49,7 +48,7 @@ public FilterBlobSegment() { /** * Get the serviceEndpoint property: The ServiceEndpoint property. - * + * * @return the serviceEndpoint value. */ public String getServiceEndpoint() { @@ -58,7 +57,7 @@ public String getServiceEndpoint() { /** * Set the serviceEndpoint property: The ServiceEndpoint property. - * + * * @param serviceEndpoint the serviceEndpoint value to set. * @return the FilterBlobSegment object itself. */ @@ -69,7 +68,7 @@ public FilterBlobSegment setServiceEndpoint(String serviceEndpoint) { /** * Get the where property: The Where property. - * + * * @return the where value. */ public String getWhere() { @@ -78,7 +77,7 @@ public String getWhere() { /** * Set the where property: The Where property. - * + * * @param where the where value to set. * @return the FilterBlobSegment object itself. */ @@ -89,7 +88,7 @@ public FilterBlobSegment setWhere(String where) { /** * Get the blobs property: The Blobs property. - * + * * @return the blobs value. */ public List getBlobs() { @@ -101,7 +100,7 @@ public List getBlobs() { /** * Set the blobs property: The Blobs property. - * + * * @param blobs the blobs value to set. * @return the FilterBlobSegment object itself. */ @@ -112,7 +111,7 @@ public FilterBlobSegment setBlobs(List blobs) { /** * Get the nextMarker property: The NextMarker property. - * + * * @return the nextMarker value. */ public String getNextMarker() { @@ -121,7 +120,7 @@ public String getNextMarker() { /** * Set the nextMarker property: The NextMarker property. - * + * * @param nextMarker the nextMarker value to set. * @return the FilterBlobSegment object itself. */ @@ -137,7 +136,7 @@ public XmlWriter toXml(XmlWriter xmlWriter) throws XMLStreamException { @Override public XmlWriter toXml(XmlWriter xmlWriter, String rootElementName) throws XMLStreamException { - rootElementName = CoreUtils.isNullOrEmpty(rootElementName) ? "EnumerationResults" : rootElementName; + rootElementName = rootElementName == null || rootElementName.isEmpty() ? "EnumerationResults" : rootElementName; xmlWriter.writeStartElement(rootElementName); xmlWriter.writeStringAttribute("ServiceEndpoint", this.serviceEndpoint); xmlWriter.writeStringElement("Where", this.where); @@ -154,7 +153,7 @@ public XmlWriter toXml(XmlWriter xmlWriter, String rootElementName) throws XMLSt /** * Reads an instance of FilterBlobSegment from the XmlReader. - * + * * @param xmlReader The XmlReader being read. * @return An instance of FilterBlobSegment if the XmlReader was pointing to an instance of it, or null if it was * pointing to XML null. @@ -166,7 +165,7 @@ public static FilterBlobSegment fromXml(XmlReader xmlReader) throws XMLStreamExc /** * Reads an instance of FilterBlobSegment from the XmlReader. - * + * * @param xmlReader The XmlReader being read. * @param rootElementName Optional root element name to override the default defined by the model. Used to support * cases where the model can deserialize from different root element names. @@ -175,7 +174,8 @@ public static FilterBlobSegment fromXml(XmlReader xmlReader) throws XMLStreamExc * @throws XMLStreamException If an error occurs while reading the FilterBlobSegment. */ public static FilterBlobSegment fromXml(XmlReader xmlReader, String rootElementName) throws XMLStreamException { - String finalRootElementName = CoreUtils.isNullOrEmpty(rootElementName) ? "EnumerationResults" : rootElementName; + String finalRootElementName + = rootElementName == null || rootElementName.isEmpty() ? "EnumerationResults" : rootElementName; return xmlReader.readObject(finalRootElementName, reader -> { FilterBlobSegment deserializedFilterBlobSegment = new FilterBlobSegment(); deserializedFilterBlobSegment.serviceEndpoint = reader.getStringAttribute(null, "ServiceEndpoint"); diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/FilterBlobsIncludeItem.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/FilterBlobsIncludeItem.java index 2fb76ac6d21c..cc7893e5b3d5 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/FilterBlobsIncludeItem.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/FilterBlobsIncludeItem.java @@ -29,7 +29,7 @@ public enum FilterBlobsIncludeItem { /** * Parses a serialized value to a FilterBlobsIncludeItem instance. - * + * * @param value the serialized value to parse. * @return the parsed FilterBlobsIncludeItem object, or null if unable to parse. */ diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/GeoReplication.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/GeoReplication.java index 79d60eef9795..41a36bb6f4d0 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/GeoReplication.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/GeoReplication.java @@ -4,23 +4,22 @@ package com.azure.v2.storage.blob.models; -import com.azure.v2.core.annotation.Fluent; -import com.azure.v2.core.util.CoreUtils; +import io.clientcore.core.annotations.Metadata; +import io.clientcore.core.annotations.TypeConditions; import io.clientcore.core.serialization.xml.XmlReader; import io.clientcore.core.serialization.xml.XmlSerializable; import io.clientcore.core.serialization.xml.XmlToken; import io.clientcore.core.serialization.xml.XmlWriter; -import io.clientcore.core.util.DateTimeRfc1123; - -import javax.xml.namespace.QName; -import javax.xml.stream.XMLStreamException; +import io.clientcore.core.utils.DateTimeRfc1123; import java.time.OffsetDateTime; import java.util.Objects; +import javax.xml.namespace.QName; +import javax.xml.stream.XMLStreamException; /** * Geo-Replication information for the Secondary Storage Service. */ -@Fluent +@Metadata(conditions = { TypeConditions.FLUENT }) public final class GeoReplication implements XmlSerializable { /* * The status of the secondary location @@ -41,7 +40,7 @@ public GeoReplication() { /** * Get the status property: The status of the secondary location. - * + * * @return the status value. */ public GeoReplicationStatus getStatus() { @@ -50,7 +49,7 @@ public GeoReplicationStatus getStatus() { /** * Set the status property: The status of the secondary location. - * + * * @param status the status value to set. * @return the GeoReplication object itself. */ @@ -63,7 +62,7 @@ public GeoReplication setStatus(GeoReplicationStatus status) { * Get the lastSyncTime property: A GMT date/time value, to the second. All primary writes preceding this value are * guaranteed to be available for read operations at the secondary. Primary writes after this point in time may or * may not be available for reads. - * + * * @return the lastSyncTime value. */ public OffsetDateTime getLastSyncTime() { @@ -77,7 +76,7 @@ public OffsetDateTime getLastSyncTime() { * Set the lastSyncTime property: A GMT date/time value, to the second. All primary writes preceding this value are * guaranteed to be available for read operations at the secondary. Primary writes after this point in time may or * may not be available for reads. - * + * * @param lastSyncTime the lastSyncTime value to set. * @return the GeoReplication object itself. */ @@ -97,16 +96,16 @@ public XmlWriter toXml(XmlWriter xmlWriter) throws XMLStreamException { @Override public XmlWriter toXml(XmlWriter xmlWriter, String rootElementName) throws XMLStreamException { - rootElementName = CoreUtils.isNullOrEmpty(rootElementName) ? "GeoReplication" : rootElementName; + rootElementName = rootElementName == null || rootElementName.isEmpty() ? "GeoReplication" : rootElementName; xmlWriter.writeStartElement(rootElementName); - xmlWriter.writeStringElement("Status", this.status == null ? null : this.status.toString()); + xmlWriter.writeStringElement("Status", this.status == null ? null : this.status.getValue()); xmlWriter.writeStringElement("LastSyncTime", Objects.toString(this.lastSyncTime, null)); return xmlWriter.writeEndElement(); } /** * Reads an instance of GeoReplication from the XmlReader. - * + * * @param xmlReader The XmlReader being read. * @return An instance of GeoReplication if the XmlReader was pointing to an instance of it, or null if it was * pointing to XML null. @@ -118,7 +117,7 @@ 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. @@ -127,14 +126,15 @@ public static GeoReplication fromXml(XmlReader xmlReader) throws XMLStreamExcept * @throws XMLStreamException If an error occurs while reading the GeoReplication. */ public static GeoReplication fromXml(XmlReader xmlReader, String rootElementName) throws XMLStreamException { - String finalRootElementName = CoreUtils.isNullOrEmpty(rootElementName) ? "GeoReplication" : rootElementName; + String finalRootElementName + = rootElementName == null || rootElementName.isEmpty() ? "GeoReplication" : rootElementName; return xmlReader.readObject(finalRootElementName, reader -> { GeoReplication deserializedGeoReplication = new GeoReplication(); while (reader.nextElement() != XmlToken.END_ELEMENT) { QName elementName = reader.getElementName(); if ("Status".equals(elementName.getLocalPart())) { - deserializedGeoReplication.status = GeoReplicationStatus.fromString(reader.getStringElement()); + deserializedGeoReplication.status = GeoReplicationStatus.fromValue(reader.getStringElement()); } else if ("LastSyncTime".equals(elementName.getLocalPart())) { deserializedGeoReplication.lastSyncTime = reader.getNullableElement(DateTimeRfc1123::new); } else { diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/GeoReplicationStatus.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/GeoReplicationStatus.java index 501aebace9e1..9a44dd4d868d 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/GeoReplicationStatus.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/GeoReplicationStatus.java @@ -4,10 +4,13 @@ package com.azure.v2.storage.blob.models; -import io.clientcore.core.util.ExpandableEnum; - +import io.clientcore.core.utils.ExpandableEnum; +import java.util.ArrayList; +import java.util.Collection; import java.util.Map; +import java.util.Objects; import java.util.concurrent.ConcurrentHashMap; +import java.util.function.Function; /** * The status of the secondary location. @@ -15,56 +18,74 @@ public final class GeoReplicationStatus implements ExpandableEnum { private static final Map VALUES = new ConcurrentHashMap<>(); + private static final Function NEW_INSTANCE = GeoReplicationStatus::new; + /** * Static value live for GeoReplicationStatus. */ - public static final GeoReplicationStatus LIVE = fromString("live"); + public static final GeoReplicationStatus LIVE = fromValue("live"); /** * Static value bootstrap for GeoReplicationStatus. */ - public static final GeoReplicationStatus BOOTSTRAP = fromString("bootstrap"); + public static final GeoReplicationStatus BOOTSTRAP = fromValue("bootstrap"); /** * Static value unavailable for GeoReplicationStatus. */ - public static final GeoReplicationStatus UNAVAILABLE = fromString("unavailable"); + public static final GeoReplicationStatus UNAVAILABLE = fromValue("unavailable"); - private final String name; + private final String value; - private GeoReplicationStatus(String name) { - this.name = name; + private GeoReplicationStatus(String value) { + this.value = value; } /** * Creates or finds a GeoReplicationStatus. - * - * @param name a name to look for. + * + * @param value a value to look for. * @return the corresponding GeoReplicationStatus. + * @throws IllegalArgumentException if value is null. */ - public static GeoReplicationStatus fromString(String name) { - if (name == null) { - return null; + public static GeoReplicationStatus fromValue(String value) { + if (value == null) { + throw new IllegalArgumentException("'value' cannot be null."); } - GeoReplicationStatus value = VALUES.get(name); - if (value != null) { - return value; - } - return VALUES.computeIfAbsent(name, key -> new GeoReplicationStatus(key)); + return VALUES.computeIfAbsent(value, NEW_INSTANCE); + } + + /** + * Gets known GeoReplicationStatus values. + * + * @return Known GeoReplicationStatus values. + */ + public static Collection values() { + return new ArrayList<>(VALUES.values()); } /** * Gets the value of the GeoReplicationStatus instance. - * + * * @return the value of the GeoReplicationStatus instance. */ @Override public String getValue() { - return this.name; + return this.value; } @Override public String toString() { - return name; + return Objects.toString(this.value); + } + + @Override + public boolean equals(Object obj) { + return this == obj; + } + + @Override + public int hashCode() { + return Objects.hashCode(this.value); } } diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/JsonTextConfiguration.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/JsonTextConfiguration.java index f90a703b5724..6c398447e004 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/JsonTextConfiguration.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/JsonTextConfiguration.java @@ -4,20 +4,19 @@ package com.azure.v2.storage.blob.models; -import com.azure.v2.core.annotation.Fluent; -import com.azure.v2.core.util.CoreUtils; +import io.clientcore.core.annotations.Metadata; +import io.clientcore.core.annotations.TypeConditions; import io.clientcore.core.serialization.xml.XmlReader; import io.clientcore.core.serialization.xml.XmlSerializable; import io.clientcore.core.serialization.xml.XmlToken; import io.clientcore.core.serialization.xml.XmlWriter; - import javax.xml.namespace.QName; import javax.xml.stream.XMLStreamException; /** * json text configuration. */ -@Fluent +@Metadata(conditions = { TypeConditions.FLUENT }) public final class JsonTextConfiguration implements XmlSerializable { /* * The string used to separate records. @@ -32,7 +31,7 @@ public JsonTextConfiguration() { /** * Get the recordSeparator property: The string used to separate records. - * + * * @return the recordSeparator value. */ public String getRecordSeparator() { @@ -41,7 +40,7 @@ public String getRecordSeparator() { /** * Set the recordSeparator property: The string used to separate records. - * + * * @param recordSeparator the recordSeparator value to set. * @return the JsonTextConfiguration object itself. */ @@ -57,7 +56,8 @@ public XmlWriter toXml(XmlWriter xmlWriter) throws XMLStreamException { @Override public XmlWriter toXml(XmlWriter xmlWriter, String rootElementName) throws XMLStreamException { - rootElementName = CoreUtils.isNullOrEmpty(rootElementName) ? "JsonTextConfiguration" : rootElementName; + rootElementName + = rootElementName == null || rootElementName.isEmpty() ? "JsonTextConfiguration" : rootElementName; xmlWriter.writeStartElement(rootElementName); xmlWriter.writeStringElement("RecordSeparator", this.recordSeparator); return xmlWriter.writeEndElement(); @@ -65,7 +65,7 @@ public XmlWriter toXml(XmlWriter xmlWriter, String rootElementName) throws XMLSt /** * Reads an instance of JsonTextConfiguration from the XmlReader. - * + * * @param xmlReader The XmlReader being read. * @return An instance of JsonTextConfiguration if the XmlReader was pointing to an instance of it, or null if it * was pointing to XML null. @@ -77,7 +77,7 @@ public static JsonTextConfiguration fromXml(XmlReader xmlReader) throws XMLStrea /** * Reads an instance of JsonTextConfiguration from the XmlReader. - * + * * @param xmlReader The XmlReader being read. * @param rootElementName Optional root element name to override the default defined by the model. Used to support * cases where the model can deserialize from different root element names. @@ -87,7 +87,7 @@ public static JsonTextConfiguration fromXml(XmlReader xmlReader) throws XMLStrea */ public static JsonTextConfiguration fromXml(XmlReader xmlReader, String rootElementName) throws XMLStreamException { String finalRootElementName - = CoreUtils.isNullOrEmpty(rootElementName) ? "JsonTextConfiguration" : rootElementName; + = rootElementName == null || rootElementName.isEmpty() ? "JsonTextConfiguration" : rootElementName; return xmlReader.readObject(finalRootElementName, reader -> { JsonTextConfiguration deserializedJsonTextConfiguration = new JsonTextConfiguration(); while (reader.nextElement() != XmlToken.END_ELEMENT) { diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/KeyInfo.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/KeyInfo.java index 8a911b533bfd..5b566dbbea37 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/KeyInfo.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/KeyInfo.java @@ -4,20 +4,19 @@ package com.azure.v2.storage.blob.models; -import com.azure.v2.core.annotation.Fluent; -import com.azure.v2.core.util.CoreUtils; +import io.clientcore.core.annotations.Metadata; +import io.clientcore.core.annotations.TypeConditions; import io.clientcore.core.serialization.xml.XmlReader; import io.clientcore.core.serialization.xml.XmlSerializable; import io.clientcore.core.serialization.xml.XmlToken; import io.clientcore.core.serialization.xml.XmlWriter; - import javax.xml.namespace.QName; import javax.xml.stream.XMLStreamException; /** * Key information. */ -@Fluent +@Metadata(conditions = { TypeConditions.FLUENT }) public final class KeyInfo implements XmlSerializable { /* * The date-time the key is active in ISO 8601 UTC time @@ -37,7 +36,7 @@ public KeyInfo() { /** * Get the start property: The date-time the key is active in ISO 8601 UTC time. - * + * * @return the start value. */ public String getStart() { @@ -46,7 +45,7 @@ public String getStart() { /** * Set the start property: The date-time the key is active in ISO 8601 UTC time. - * + * * @param start the start value to set. * @return the KeyInfo object itself. */ @@ -57,7 +56,7 @@ public KeyInfo setStart(String start) { /** * Get the expiry property: The date-time the key expires in ISO 8601 UTC time. - * + * * @return the expiry value. */ public String getExpiry() { @@ -66,7 +65,7 @@ public String getExpiry() { /** * Set the expiry property: The date-time the key expires in ISO 8601 UTC time. - * + * * @param expiry the expiry value to set. * @return the KeyInfo object itself. */ @@ -82,7 +81,7 @@ public XmlWriter toXml(XmlWriter xmlWriter) throws XMLStreamException { @Override public XmlWriter toXml(XmlWriter xmlWriter, String rootElementName) throws XMLStreamException { - rootElementName = CoreUtils.isNullOrEmpty(rootElementName) ? "KeyInfo" : rootElementName; + rootElementName = rootElementName == null || rootElementName.isEmpty() ? "KeyInfo" : rootElementName; xmlWriter.writeStartElement(rootElementName); xmlWriter.writeStringElement("Start", this.start); xmlWriter.writeStringElement("Expiry", this.expiry); @@ -91,7 +90,7 @@ 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. @@ -103,7 +102,7 @@ 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. @@ -112,7 +111,8 @@ public static KeyInfo fromXml(XmlReader xmlReader) throws XMLStreamException { * @throws XMLStreamException If an error occurs while reading the KeyInfo. */ public static KeyInfo fromXml(XmlReader xmlReader, String rootElementName) throws XMLStreamException { - String finalRootElementName = CoreUtils.isNullOrEmpty(rootElementName) ? "KeyInfo" : rootElementName; + String finalRootElementName + = rootElementName == null || rootElementName.isEmpty() ? "KeyInfo" : rootElementName; return xmlReader.readObject(finalRootElementName, reader -> { KeyInfo deserializedKeyInfo = new KeyInfo(); while (reader.nextElement() != XmlToken.END_ELEMENT) { diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/LeaseDurationType.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/LeaseDurationType.java index cc7c30657565..f9a44fa7828c 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/LeaseDurationType.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/LeaseDurationType.java @@ -29,7 +29,7 @@ public enum LeaseDurationType { /** * Parses a serialized value to a LeaseDurationType instance. - * + * * @param value the serialized value to parse. * @return the parsed LeaseDurationType object, or null if unable to parse. */ diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/LeaseStateType.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/LeaseStateType.java index 134bbcdb59fc..3b06b1616a68 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/LeaseStateType.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/LeaseStateType.java @@ -44,7 +44,7 @@ public enum LeaseStateType { /** * Parses a serialized value to a LeaseStateType instance. - * + * * @param value the serialized value to parse. * @return the parsed LeaseStateType object, or null if unable to parse. */ diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/LeaseStatusType.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/LeaseStatusType.java index 1653eff811ed..ad6684aa8577 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/LeaseStatusType.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/LeaseStatusType.java @@ -29,7 +29,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-v2/src/main/java/com/azure/v2/storage/blob/models/ListBlobContainersIncludeType.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ListBlobContainersIncludeType.java index fcc4d5540305..ae759587d38b 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ListBlobContainersIncludeType.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ListBlobContainersIncludeType.java @@ -34,7 +34,7 @@ public enum ListBlobContainersIncludeType { /** * Parses a serialized value to a ListBlobContainersIncludeType instance. - * + * * @param value the serialized value to parse. * @return the parsed ListBlobContainersIncludeType object, or null if unable to parse. */ diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ListBlobsFlatSegmentResponse.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ListBlobsFlatSegmentResponse.java index 0bd9007da7ea..a78e88bf743b 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ListBlobsFlatSegmentResponse.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ListBlobsFlatSegmentResponse.java @@ -4,20 +4,19 @@ package com.azure.v2.storage.blob.models; -import com.azure.v2.core.annotation.Fluent; -import com.azure.v2.core.util.CoreUtils; +import io.clientcore.core.annotations.Metadata; +import io.clientcore.core.annotations.TypeConditions; import io.clientcore.core.serialization.xml.XmlReader; import io.clientcore.core.serialization.xml.XmlSerializable; import io.clientcore.core.serialization.xml.XmlToken; import io.clientcore.core.serialization.xml.XmlWriter; - import javax.xml.namespace.QName; import javax.xml.stream.XMLStreamException; /** * An enumeration of blobs. */ -@Fluent +@Metadata(conditions = { TypeConditions.FLUENT }) public final class ListBlobsFlatSegmentResponse implements XmlSerializable { /* * The ServiceEndpoint property. @@ -62,7 +61,7 @@ public ListBlobsFlatSegmentResponse() { /** * Get the serviceEndpoint property: The ServiceEndpoint property. - * + * * @return the serviceEndpoint value. */ public String getServiceEndpoint() { @@ -71,7 +70,7 @@ public String getServiceEndpoint() { /** * Set the serviceEndpoint property: The ServiceEndpoint property. - * + * * @param serviceEndpoint the serviceEndpoint value to set. * @return the ListBlobsFlatSegmentResponse object itself. */ @@ -82,7 +81,7 @@ public ListBlobsFlatSegmentResponse setServiceEndpoint(String serviceEndpoint) { /** * Get the containerName property: The ContainerName property. - * + * * @return the containerName value. */ public String getContainerName() { @@ -91,7 +90,7 @@ public String getContainerName() { /** * Set the containerName property: The ContainerName property. - * + * * @param containerName the containerName value to set. * @return the ListBlobsFlatSegmentResponse object itself. */ @@ -102,7 +101,7 @@ public ListBlobsFlatSegmentResponse setContainerName(String containerName) { /** * Get the prefix property: The Prefix property. - * + * * @return the prefix value. */ public String getPrefix() { @@ -111,7 +110,7 @@ public String getPrefix() { /** * Set the prefix property: The Prefix property. - * + * * @param prefix the prefix value to set. * @return the ListBlobsFlatSegmentResponse object itself. */ @@ -122,7 +121,7 @@ public ListBlobsFlatSegmentResponse setPrefix(String prefix) { /** * Get the marker property: The Marker property. - * + * * @return the marker value. */ public String getMarker() { @@ -131,7 +130,7 @@ public String getMarker() { /** * Set the marker property: The Marker property. - * + * * @param marker the marker value to set. * @return the ListBlobsFlatSegmentResponse object itself. */ @@ -142,7 +141,7 @@ public ListBlobsFlatSegmentResponse setMarker(String marker) { /** * Get the maxResults property: The MaxResults property. - * + * * @return the maxResults value. */ public int getMaxResults() { @@ -151,7 +150,7 @@ public int getMaxResults() { /** * Set the maxResults property: The MaxResults property. - * + * * @param maxResults the maxResults value to set. * @return the ListBlobsFlatSegmentResponse object itself. */ @@ -162,7 +161,7 @@ public ListBlobsFlatSegmentResponse setMaxResults(int maxResults) { /** * Get the segment property: The Segment property. - * + * * @return the segment value. */ public BlobFlatListSegment getSegment() { @@ -171,7 +170,7 @@ public BlobFlatListSegment getSegment() { /** * Set the segment property: The Segment property. - * + * * @param segment the segment value to set. * @return the ListBlobsFlatSegmentResponse object itself. */ @@ -182,7 +181,7 @@ public ListBlobsFlatSegmentResponse setSegment(BlobFlatListSegment segment) { /** * Get the nextMarker property: The NextMarker property. - * + * * @return the nextMarker value. */ public String getNextMarker() { @@ -191,7 +190,7 @@ public String getNextMarker() { /** * Set the nextMarker property: The NextMarker property. - * + * * @param nextMarker the nextMarker value to set. * @return the ListBlobsFlatSegmentResponse object itself. */ @@ -207,7 +206,7 @@ public XmlWriter toXml(XmlWriter xmlWriter) throws XMLStreamException { @Override public XmlWriter toXml(XmlWriter xmlWriter, String rootElementName) throws XMLStreamException { - rootElementName = CoreUtils.isNullOrEmpty(rootElementName) ? "EnumerationResults" : rootElementName; + rootElementName = rootElementName == null || rootElementName.isEmpty() ? "EnumerationResults" : rootElementName; xmlWriter.writeStartElement(rootElementName); xmlWriter.writeStringAttribute("ServiceEndpoint", this.serviceEndpoint); xmlWriter.writeStringAttribute("ContainerName", this.containerName); @@ -221,7 +220,7 @@ public XmlWriter toXml(XmlWriter xmlWriter, String rootElementName) throws XMLSt /** * Reads an instance of ListBlobsFlatSegmentResponse from the XmlReader. - * + * * @param xmlReader The XmlReader being read. * @return An instance of ListBlobsFlatSegmentResponse if the XmlReader was pointing to an instance of it, or null * if it was pointing to XML null. @@ -233,7 +232,7 @@ public static ListBlobsFlatSegmentResponse fromXml(XmlReader xmlReader) throws X /** * Reads an instance of ListBlobsFlatSegmentResponse from the XmlReader. - * + * * @param xmlReader The XmlReader being read. * @param rootElementName Optional root element name to override the default defined by the model. Used to support * cases where the model can deserialize from different root element names. @@ -243,7 +242,8 @@ public static ListBlobsFlatSegmentResponse fromXml(XmlReader xmlReader) throws X */ public static ListBlobsFlatSegmentResponse fromXml(XmlReader xmlReader, String rootElementName) throws XMLStreamException { - String finalRootElementName = CoreUtils.isNullOrEmpty(rootElementName) ? "EnumerationResults" : rootElementName; + String finalRootElementName + = rootElementName == null || rootElementName.isEmpty() ? "EnumerationResults" : rootElementName; return xmlReader.readObject(finalRootElementName, reader -> { ListBlobsFlatSegmentResponse deserializedListBlobsFlatSegmentResponse = new ListBlobsFlatSegmentResponse(); deserializedListBlobsFlatSegmentResponse.serviceEndpoint diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ListBlobsHierarchySegmentResponse.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ListBlobsHierarchySegmentResponse.java index fc130e1db6cc..60b541d95a6f 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ListBlobsHierarchySegmentResponse.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ListBlobsHierarchySegmentResponse.java @@ -4,20 +4,19 @@ package com.azure.v2.storage.blob.models; -import com.azure.v2.core.annotation.Fluent; -import com.azure.v2.core.util.CoreUtils; +import io.clientcore.core.annotations.Metadata; +import io.clientcore.core.annotations.TypeConditions; import io.clientcore.core.serialization.xml.XmlReader; import io.clientcore.core.serialization.xml.XmlSerializable; import io.clientcore.core.serialization.xml.XmlToken; import io.clientcore.core.serialization.xml.XmlWriter; - import javax.xml.namespace.QName; import javax.xml.stream.XMLStreamException; /** * An enumeration of blobs. */ -@Fluent +@Metadata(conditions = { TypeConditions.FLUENT }) public final class ListBlobsHierarchySegmentResponse implements XmlSerializable { /* * The ServiceEndpoint property. @@ -67,7 +66,7 @@ public ListBlobsHierarchySegmentResponse() { /** * Get the serviceEndpoint property: The ServiceEndpoint property. - * + * * @return the serviceEndpoint value. */ public String getServiceEndpoint() { @@ -76,7 +75,7 @@ public String getServiceEndpoint() { /** * Set the serviceEndpoint property: The ServiceEndpoint property. - * + * * @param serviceEndpoint the serviceEndpoint value to set. * @return the ListBlobsHierarchySegmentResponse object itself. */ @@ -87,7 +86,7 @@ public ListBlobsHierarchySegmentResponse setServiceEndpoint(String serviceEndpoi /** * Get the containerName property: The ContainerName property. - * + * * @return the containerName value. */ public String getContainerName() { @@ -96,7 +95,7 @@ public String getContainerName() { /** * Set the containerName property: The ContainerName property. - * + * * @param containerName the containerName value to set. * @return the ListBlobsHierarchySegmentResponse object itself. */ @@ -107,7 +106,7 @@ public ListBlobsHierarchySegmentResponse setContainerName(String containerName) /** * Get the prefix property: The Prefix property. - * + * * @return the prefix value. */ public String getPrefix() { @@ -116,7 +115,7 @@ public String getPrefix() { /** * Set the prefix property: The Prefix property. - * + * * @param prefix the prefix value to set. * @return the ListBlobsHierarchySegmentResponse object itself. */ @@ -127,7 +126,7 @@ public ListBlobsHierarchySegmentResponse setPrefix(String prefix) { /** * Get the marker property: The Marker property. - * + * * @return the marker value. */ public String getMarker() { @@ -136,7 +135,7 @@ public String getMarker() { /** * Set the marker property: The Marker property. - * + * * @param marker the marker value to set. * @return the ListBlobsHierarchySegmentResponse object itself. */ @@ -147,7 +146,7 @@ public ListBlobsHierarchySegmentResponse setMarker(String marker) { /** * Get the maxResults property: The MaxResults property. - * + * * @return the maxResults value. */ public int getMaxResults() { @@ -156,7 +155,7 @@ public int getMaxResults() { /** * Set the maxResults property: The MaxResults property. - * + * * @param maxResults the maxResults value to set. * @return the ListBlobsHierarchySegmentResponse object itself. */ @@ -167,7 +166,7 @@ public ListBlobsHierarchySegmentResponse setMaxResults(int maxResults) { /** * Get the delimiter property: The Delimiter property. - * + * * @return the delimiter value. */ public String getDelimiter() { @@ -176,7 +175,7 @@ public String getDelimiter() { /** * Set the delimiter property: The Delimiter property. - * + * * @param delimiter the delimiter value to set. * @return the ListBlobsHierarchySegmentResponse object itself. */ @@ -187,7 +186,7 @@ public ListBlobsHierarchySegmentResponse setDelimiter(String delimiter) { /** * Get the segment property: The Segment property. - * + * * @return the segment value. */ public BlobHierarchyListSegment getSegment() { @@ -196,7 +195,7 @@ public BlobHierarchyListSegment getSegment() { /** * Set the segment property: The Segment property. - * + * * @param segment the segment value to set. * @return the ListBlobsHierarchySegmentResponse object itself. */ @@ -207,7 +206,7 @@ public ListBlobsHierarchySegmentResponse setSegment(BlobHierarchyListSegment seg /** * Get the nextMarker property: The NextMarker property. - * + * * @return the nextMarker value. */ public String getNextMarker() { @@ -216,7 +215,7 @@ public String getNextMarker() { /** * Set the nextMarker property: The NextMarker property. - * + * * @param nextMarker the nextMarker value to set. * @return the ListBlobsHierarchySegmentResponse object itself. */ @@ -232,7 +231,7 @@ public XmlWriter toXml(XmlWriter xmlWriter) throws XMLStreamException { @Override public XmlWriter toXml(XmlWriter xmlWriter, String rootElementName) throws XMLStreamException { - rootElementName = CoreUtils.isNullOrEmpty(rootElementName) ? "EnumerationResults" : rootElementName; + rootElementName = rootElementName == null || rootElementName.isEmpty() ? "EnumerationResults" : rootElementName; xmlWriter.writeStartElement(rootElementName); xmlWriter.writeStringAttribute("ServiceEndpoint", this.serviceEndpoint); xmlWriter.writeStringAttribute("ContainerName", this.containerName); @@ -247,7 +246,7 @@ public XmlWriter toXml(XmlWriter xmlWriter, String rootElementName) throws XMLSt /** * Reads an instance of ListBlobsHierarchySegmentResponse from the XmlReader. - * + * * @param xmlReader The XmlReader being read. * @return An instance of ListBlobsHierarchySegmentResponse if the XmlReader was pointing to an instance of it, or * null if it was pointing to XML null. @@ -259,7 +258,7 @@ public static ListBlobsHierarchySegmentResponse fromXml(XmlReader xmlReader) thr /** * Reads an instance of ListBlobsHierarchySegmentResponse from the XmlReader. - * + * * @param xmlReader The XmlReader being read. * @param rootElementName Optional root element name to override the default defined by the model. Used to support * cases where the model can deserialize from different root element names. @@ -269,7 +268,8 @@ public static ListBlobsHierarchySegmentResponse fromXml(XmlReader xmlReader) thr */ public static ListBlobsHierarchySegmentResponse fromXml(XmlReader xmlReader, String rootElementName) throws XMLStreamException { - String finalRootElementName = CoreUtils.isNullOrEmpty(rootElementName) ? "EnumerationResults" : rootElementName; + String finalRootElementName + = rootElementName == null || rootElementName.isEmpty() ? "EnumerationResults" : rootElementName; return xmlReader.readObject(finalRootElementName, reader -> { ListBlobsHierarchySegmentResponse deserializedListBlobsHierarchySegmentResponse = new ListBlobsHierarchySegmentResponse(); diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ListBlobsIncludeItem.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ListBlobsIncludeItem.java index 06b2eb8b8e6b..5fdd8bc94a12 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ListBlobsIncludeItem.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ListBlobsIncludeItem.java @@ -69,7 +69,7 @@ public enum ListBlobsIncludeItem { /** * Parses a serialized value to a ListBlobsIncludeItem instance. - * + * * @param value the serialized value to parse. * @return the parsed ListBlobsIncludeItem object, or null if unable to parse. */ diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/PageBlobsClearPagesHeaders.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/PageBlobsClearPagesHeaders.java index 7714f3f37518..f25ab6effdeb 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/PageBlobsClearPagesHeaders.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/PageBlobsClearPagesHeaders.java @@ -4,19 +4,18 @@ package com.azure.v2.storage.blob.models; -import com.azure.v2.core.annotation.Fluent; -import com.azure.v2.core.util.CoreUtils; +import io.clientcore.core.annotations.Metadata; +import io.clientcore.core.annotations.TypeConditions; import io.clientcore.core.http.models.HttpHeaderName; import io.clientcore.core.http.models.HttpHeaders; -import io.clientcore.core.util.DateTimeRfc1123; - +import io.clientcore.core.utils.DateTimeRfc1123; import java.time.OffsetDateTime; import java.util.Base64; /** * The PageBlobsClearPagesHeaders model. */ -@Fluent +@Metadata(conditions = { TypeConditions.FLUENT }) public final class PageBlobsClearPagesHeaders { /* * The x-ms-version property. @@ -83,13 +82,17 @@ public final class PageBlobsClearPagesHeaders { private static final HttpHeaderName X_MS_ENCRYPTION_KEY_SHA256 = HttpHeaderName.fromString("x-ms-encryption-key-sha256"); + private static final HttpHeaderName X_MS_REQUEST_ID = HttpHeaderName.fromString("x-ms-request-id"); + private static final HttpHeaderName X_MS_REQUEST_SERVER_ENCRYPTED = HttpHeaderName.fromString("x-ms-request-server-encrypted"); + private static final HttpHeaderName X_MS_CLIENT_REQUEST_ID = HttpHeaderName.fromString("x-ms-client-request-id"); + // HttpHeaders containing the raw property values. /** * Creates an instance of PageBlobsClearPagesHeaders class. - * + * * @param rawHeaders The raw HttpHeaders that will be used to create the property values. */ public PageBlobsClearPagesHeaders(HttpHeaders rawHeaders) { @@ -108,12 +111,12 @@ public PageBlobsClearPagesHeaders(HttpHeaders rawHeaders) { this.lastModified = new DateTimeRfc1123(lastModified); } this.xMsEncryptionKeySha256 = rawHeaders.getValue(X_MS_ENCRYPTION_KEY_SHA256); - this.xMsRequestId = rawHeaders.getValue(HttpHeaderName.fromString("x-ms-request-id")); + this.xMsRequestId = rawHeaders.getValue(X_MS_REQUEST_ID); String xMsRequestServerEncrypted = rawHeaders.getValue(X_MS_REQUEST_SERVER_ENCRYPTED); if (xMsRequestServerEncrypted != null) { this.xMsRequestServerEncrypted = Boolean.parseBoolean(xMsRequestServerEncrypted); } - this.xMsClientRequestId = rawHeaders.getValue(HttpHeaderName.fromString("x-ms-client-request-id")); + this.xMsClientRequestId = rawHeaders.getValue(X_MS_CLIENT_REQUEST_ID); String date = rawHeaders.getValue(HttpHeaderName.DATE); if (date != null) { this.date = new DateTimeRfc1123(date); @@ -126,7 +129,7 @@ public PageBlobsClearPagesHeaders(HttpHeaders rawHeaders) { /** * Get the xMsVersion property: The x-ms-version property. - * + * * @return the xMsVersion value. */ public String getXMsVersion() { @@ -135,7 +138,7 @@ public String getXMsVersion() { /** * Set the xMsVersion property: The x-ms-version property. - * + * * @param xMsVersion the xMsVersion value to set. * @return the PageBlobsClearPagesHeaders object itself. */ @@ -146,7 +149,7 @@ public PageBlobsClearPagesHeaders setXMsVersion(String xMsVersion) { /** * Get the eTag property: The ETag property. - * + * * @return the eTag value. */ public String getETag() { @@ -155,7 +158,7 @@ public String getETag() { /** * Set the eTag property: The ETag property. - * + * * @param eTag the eTag value to set. * @return the PageBlobsClearPagesHeaders object itself. */ @@ -166,27 +169,27 @@ public PageBlobsClearPagesHeaders setETag(String eTag) { /** * Get the xMsContentCrc64 property: The x-ms-content-crc64 property. - * + * * @return the xMsContentCrc64 value. */ public byte[] getXMsContentCrc64() { - return CoreUtils.clone(this.xMsContentCrc64); + return this.xMsContentCrc64; } /** * Set the xMsContentCrc64 property: The x-ms-content-crc64 property. - * + * * @param xMsContentCrc64 the xMsContentCrc64 value to set. * @return the PageBlobsClearPagesHeaders object itself. */ public PageBlobsClearPagesHeaders setXMsContentCrc64(byte[] xMsContentCrc64) { - this.xMsContentCrc64 = CoreUtils.clone(xMsContentCrc64); + this.xMsContentCrc64 = xMsContentCrc64; return this; } /** * Get the xMsBlobSequenceNumber property: The x-ms-blob-sequence-number property. - * + * * @return the xMsBlobSequenceNumber value. */ public Long getXMsBlobSequenceNumber() { @@ -195,7 +198,7 @@ public Long getXMsBlobSequenceNumber() { /** * Set the xMsBlobSequenceNumber property: The x-ms-blob-sequence-number property. - * + * * @param xMsBlobSequenceNumber the xMsBlobSequenceNumber value to set. * @return the PageBlobsClearPagesHeaders object itself. */ @@ -206,7 +209,7 @@ public PageBlobsClearPagesHeaders setXMsBlobSequenceNumber(Long xMsBlobSequenceN /** * Get the lastModified property: The Last-Modified property. - * + * * @return the lastModified value. */ public OffsetDateTime getLastModified() { @@ -218,7 +221,7 @@ public OffsetDateTime getLastModified() { /** * Set the lastModified property: The Last-Modified property. - * + * * @param lastModified the lastModified value to set. * @return the PageBlobsClearPagesHeaders object itself. */ @@ -233,7 +236,7 @@ public PageBlobsClearPagesHeaders setLastModified(OffsetDateTime lastModified) { /** * Get the xMsEncryptionKeySha256 property: The x-ms-encryption-key-sha256 property. - * + * * @return the xMsEncryptionKeySha256 value. */ public String getXMsEncryptionKeySha256() { @@ -242,7 +245,7 @@ public String getXMsEncryptionKeySha256() { /** * Set the xMsEncryptionKeySha256 property: The x-ms-encryption-key-sha256 property. - * + * * @param xMsEncryptionKeySha256 the xMsEncryptionKeySha256 value to set. * @return the PageBlobsClearPagesHeaders object itself. */ @@ -253,7 +256,7 @@ public PageBlobsClearPagesHeaders setXMsEncryptionKeySha256(String xMsEncryption /** * Get the xMsRequestId property: The x-ms-request-id property. - * + * * @return the xMsRequestId value. */ public String getXMsRequestId() { @@ -262,7 +265,7 @@ public String getXMsRequestId() { /** * Set the xMsRequestId property: The x-ms-request-id property. - * + * * @param xMsRequestId the xMsRequestId value to set. * @return the PageBlobsClearPagesHeaders object itself. */ @@ -273,7 +276,7 @@ public PageBlobsClearPagesHeaders setXMsRequestId(String xMsRequestId) { /** * Get the xMsRequestServerEncrypted property: The x-ms-request-server-encrypted property. - * + * * @return the xMsRequestServerEncrypted value. */ public Boolean isXMsRequestServerEncrypted() { @@ -282,7 +285,7 @@ public Boolean isXMsRequestServerEncrypted() { /** * Set the xMsRequestServerEncrypted property: The x-ms-request-server-encrypted property. - * + * * @param xMsRequestServerEncrypted the xMsRequestServerEncrypted value to set. * @return the PageBlobsClearPagesHeaders object itself. */ @@ -293,7 +296,7 @@ public PageBlobsClearPagesHeaders setXMsRequestServerEncrypted(Boolean xMsReques /** * Get the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @return the xMsClientRequestId value. */ public String getXMsClientRequestId() { @@ -302,7 +305,7 @@ public String getXMsClientRequestId() { /** * Set the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @param xMsClientRequestId the xMsClientRequestId value to set. * @return the PageBlobsClearPagesHeaders object itself. */ @@ -313,7 +316,7 @@ public PageBlobsClearPagesHeaders setXMsClientRequestId(String xMsClientRequestI /** * Get the date property: The Date property. - * + * * @return the date value. */ public OffsetDateTime getDate() { @@ -325,7 +328,7 @@ public OffsetDateTime getDate() { /** * Set the date property: The Date property. - * + * * @param date the date value to set. * @return the PageBlobsClearPagesHeaders object itself. */ @@ -340,21 +343,21 @@ public PageBlobsClearPagesHeaders setDate(OffsetDateTime date) { /** * Get the contentMD5 property: The Content-MD5 property. - * + * * @return the contentMD5 value. */ public byte[] getContentMD5() { - return CoreUtils.clone(this.contentMD5); + return this.contentMD5; } /** * Set the contentMD5 property: The Content-MD5 property. - * + * * @param contentMD5 the contentMD5 value to set. * @return the PageBlobsClearPagesHeaders object itself. */ public PageBlobsClearPagesHeaders setContentMD5(byte[] contentMD5) { - this.contentMD5 = CoreUtils.clone(contentMD5); + this.contentMD5 = contentMD5; return this; } } diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/PageBlobsCopyIncrementalHeaders.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/PageBlobsCopyIncrementalHeaders.java index e757704bc2d1..b3bfe2d1be85 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/PageBlobsCopyIncrementalHeaders.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/PageBlobsCopyIncrementalHeaders.java @@ -4,17 +4,17 @@ package com.azure.v2.storage.blob.models; -import com.azure.v2.core.annotation.Fluent; +import io.clientcore.core.annotations.Metadata; +import io.clientcore.core.annotations.TypeConditions; import io.clientcore.core.http.models.HttpHeaderName; import io.clientcore.core.http.models.HttpHeaders; -import io.clientcore.core.util.DateTimeRfc1123; - +import io.clientcore.core.utils.DateTimeRfc1123; import java.time.OffsetDateTime; /** * The PageBlobsCopyIncrementalHeaders model. */ -@Fluent +@Metadata(conditions = { TypeConditions.FLUENT }) public final class PageBlobsCopyIncrementalHeaders { /* * The x-ms-version property. @@ -62,10 +62,14 @@ public final class PageBlobsCopyIncrementalHeaders { private static final HttpHeaderName X_MS_COPY_STATUS = HttpHeaderName.fromString("x-ms-copy-status"); + private static final HttpHeaderName X_MS_REQUEST_ID = HttpHeaderName.fromString("x-ms-request-id"); + + private static final HttpHeaderName X_MS_CLIENT_REQUEST_ID = HttpHeaderName.fromString("x-ms-client-request-id"); + // HttpHeaders containing the raw property values. /** * Creates an instance of PageBlobsCopyIncrementalHeaders class. - * + * * @param rawHeaders The raw HttpHeaders that will be used to create the property values. */ public PageBlobsCopyIncrementalHeaders(HttpHeaders rawHeaders) { @@ -80,8 +84,8 @@ public PageBlobsCopyIncrementalHeaders(HttpHeaders rawHeaders) { if (xMsCopyStatus != null) { this.xMsCopyStatus = CopyStatusType.fromString(xMsCopyStatus); } - this.xMsRequestId = rawHeaders.getValue(HttpHeaderName.fromString("x-ms-request-id")); - this.xMsClientRequestId = rawHeaders.getValue(HttpHeaderName.fromString("x-ms-client-request-id")); + this.xMsRequestId = rawHeaders.getValue(X_MS_REQUEST_ID); + this.xMsClientRequestId = rawHeaders.getValue(X_MS_CLIENT_REQUEST_ID); String date = rawHeaders.getValue(HttpHeaderName.DATE); if (date != null) { this.date = new DateTimeRfc1123(date); @@ -90,7 +94,7 @@ public PageBlobsCopyIncrementalHeaders(HttpHeaders rawHeaders) { /** * Get the xMsVersion property: The x-ms-version property. - * + * * @return the xMsVersion value. */ public String getXMsVersion() { @@ -99,7 +103,7 @@ public String getXMsVersion() { /** * Set the xMsVersion property: The x-ms-version property. - * + * * @param xMsVersion the xMsVersion value to set. * @return the PageBlobsCopyIncrementalHeaders object itself. */ @@ -110,7 +114,7 @@ public PageBlobsCopyIncrementalHeaders setXMsVersion(String xMsVersion) { /** * Get the xMsCopyId property: The x-ms-copy-id property. - * + * * @return the xMsCopyId value. */ public String getXMsCopyId() { @@ -119,7 +123,7 @@ public String getXMsCopyId() { /** * Set the xMsCopyId property: The x-ms-copy-id property. - * + * * @param xMsCopyId the xMsCopyId value to set. * @return the PageBlobsCopyIncrementalHeaders object itself. */ @@ -130,7 +134,7 @@ public PageBlobsCopyIncrementalHeaders setXMsCopyId(String xMsCopyId) { /** * Get the eTag property: The ETag property. - * + * * @return the eTag value. */ public String getETag() { @@ -139,7 +143,7 @@ public String getETag() { /** * Set the eTag property: The ETag property. - * + * * @param eTag the eTag value to set. * @return the PageBlobsCopyIncrementalHeaders object itself. */ @@ -150,7 +154,7 @@ public PageBlobsCopyIncrementalHeaders setETag(String eTag) { /** * Get the lastModified property: The Last-Modified property. - * + * * @return the lastModified value. */ public OffsetDateTime getLastModified() { @@ -162,7 +166,7 @@ public OffsetDateTime getLastModified() { /** * Set the lastModified property: The Last-Modified property. - * + * * @param lastModified the lastModified value to set. * @return the PageBlobsCopyIncrementalHeaders object itself. */ @@ -177,7 +181,7 @@ public PageBlobsCopyIncrementalHeaders setLastModified(OffsetDateTime lastModifi /** * Get the xMsCopyStatus property: The x-ms-copy-status property. - * + * * @return the xMsCopyStatus value. */ public CopyStatusType getXMsCopyStatus() { @@ -186,7 +190,7 @@ public CopyStatusType getXMsCopyStatus() { /** * Set the xMsCopyStatus property: The x-ms-copy-status property. - * + * * @param xMsCopyStatus the xMsCopyStatus value to set. * @return the PageBlobsCopyIncrementalHeaders object itself. */ @@ -197,7 +201,7 @@ public PageBlobsCopyIncrementalHeaders setXMsCopyStatus(CopyStatusType xMsCopySt /** * Get the xMsRequestId property: The x-ms-request-id property. - * + * * @return the xMsRequestId value. */ public String getXMsRequestId() { @@ -206,7 +210,7 @@ public String getXMsRequestId() { /** * Set the xMsRequestId property: The x-ms-request-id property. - * + * * @param xMsRequestId the xMsRequestId value to set. * @return the PageBlobsCopyIncrementalHeaders object itself. */ @@ -217,7 +221,7 @@ public PageBlobsCopyIncrementalHeaders setXMsRequestId(String xMsRequestId) { /** * Get the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @return the xMsClientRequestId value. */ public String getXMsClientRequestId() { @@ -226,7 +230,7 @@ public String getXMsClientRequestId() { /** * Set the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @param xMsClientRequestId the xMsClientRequestId value to set. * @return the PageBlobsCopyIncrementalHeaders object itself. */ @@ -237,7 +241,7 @@ public PageBlobsCopyIncrementalHeaders setXMsClientRequestId(String xMsClientReq /** * Get the date property: The Date property. - * + * * @return the date value. */ public OffsetDateTime getDate() { @@ -249,7 +253,7 @@ public OffsetDateTime getDate() { /** * Set the date property: The Date property. - * + * * @param date the date value to set. * @return the PageBlobsCopyIncrementalHeaders object itself. */ diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/PageBlobsCreateHeaders.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/PageBlobsCreateHeaders.java index a82e2ef16a70..6549ad73e03b 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/PageBlobsCreateHeaders.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/PageBlobsCreateHeaders.java @@ -4,19 +4,18 @@ package com.azure.v2.storage.blob.models; -import com.azure.v2.core.annotation.Fluent; -import com.azure.v2.core.util.CoreUtils; +import io.clientcore.core.annotations.Metadata; +import io.clientcore.core.annotations.TypeConditions; import io.clientcore.core.http.models.HttpHeaderName; import io.clientcore.core.http.models.HttpHeaders; -import io.clientcore.core.util.DateTimeRfc1123; - +import io.clientcore.core.utils.DateTimeRfc1123; import java.time.OffsetDateTime; import java.util.Base64; /** * The PageBlobsCreateHeaders model. */ -@Fluent +@Metadata(conditions = { TypeConditions.FLUENT }) public final class PageBlobsCreateHeaders { /* * The x-ms-version property. @@ -80,15 +79,19 @@ public final class PageBlobsCreateHeaders { private static final HttpHeaderName X_MS_ENCRYPTION_KEY_SHA256 = HttpHeaderName.fromString("x-ms-encryption-key-sha256"); + private static final HttpHeaderName X_MS_REQUEST_ID = HttpHeaderName.fromString("x-ms-request-id"); + private static final HttpHeaderName X_MS_REQUEST_SERVER_ENCRYPTED = HttpHeaderName.fromString("x-ms-request-server-encrypted"); + private static final HttpHeaderName X_MS_CLIENT_REQUEST_ID = HttpHeaderName.fromString("x-ms-client-request-id"); + private static final HttpHeaderName X_MS_ENCRYPTION_SCOPE = HttpHeaderName.fromString("x-ms-encryption-scope"); // HttpHeaders containing the raw property values. /** * Creates an instance of PageBlobsCreateHeaders class. - * + * * @param rawHeaders The raw HttpHeaders that will be used to create the property values. */ public PageBlobsCreateHeaders(HttpHeaders rawHeaders) { @@ -100,12 +103,12 @@ public PageBlobsCreateHeaders(HttpHeaders rawHeaders) { } this.xMsVersionId = rawHeaders.getValue(X_MS_VERSION_ID); this.xMsEncryptionKeySha256 = rawHeaders.getValue(X_MS_ENCRYPTION_KEY_SHA256); - this.xMsRequestId = rawHeaders.getValue(HttpHeaderName.fromString("x-ms-request-id")); + this.xMsRequestId = rawHeaders.getValue(X_MS_REQUEST_ID); String xMsRequestServerEncrypted = rawHeaders.getValue(X_MS_REQUEST_SERVER_ENCRYPTED); if (xMsRequestServerEncrypted != null) { this.xMsRequestServerEncrypted = Boolean.parseBoolean(xMsRequestServerEncrypted); } - this.xMsClientRequestId = rawHeaders.getValue(HttpHeaderName.fromString("x-ms-client-request-id")); + this.xMsClientRequestId = rawHeaders.getValue(X_MS_CLIENT_REQUEST_ID); String date = rawHeaders.getValue(HttpHeaderName.DATE); if (date != null) { this.date = new DateTimeRfc1123(date); @@ -119,7 +122,7 @@ public PageBlobsCreateHeaders(HttpHeaders rawHeaders) { /** * Get the xMsVersion property: The x-ms-version property. - * + * * @return the xMsVersion value. */ public String getXMsVersion() { @@ -128,7 +131,7 @@ public String getXMsVersion() { /** * Set the xMsVersion property: The x-ms-version property. - * + * * @param xMsVersion the xMsVersion value to set. * @return the PageBlobsCreateHeaders object itself. */ @@ -139,7 +142,7 @@ public PageBlobsCreateHeaders setXMsVersion(String xMsVersion) { /** * Get the eTag property: The ETag property. - * + * * @return the eTag value. */ public String getETag() { @@ -148,7 +151,7 @@ public String getETag() { /** * Set the eTag property: The ETag property. - * + * * @param eTag the eTag value to set. * @return the PageBlobsCreateHeaders object itself. */ @@ -159,7 +162,7 @@ public PageBlobsCreateHeaders setETag(String eTag) { /** * Get the lastModified property: The Last-Modified property. - * + * * @return the lastModified value. */ public OffsetDateTime getLastModified() { @@ -171,7 +174,7 @@ public OffsetDateTime getLastModified() { /** * Set the lastModified property: The Last-Modified property. - * + * * @param lastModified the lastModified value to set. * @return the PageBlobsCreateHeaders object itself. */ @@ -186,7 +189,7 @@ public PageBlobsCreateHeaders setLastModified(OffsetDateTime lastModified) { /** * Get the xMsVersionId property: The x-ms-version-id property. - * + * * @return the xMsVersionId value. */ public String getXMsVersionId() { @@ -195,7 +198,7 @@ public String getXMsVersionId() { /** * Set the xMsVersionId property: The x-ms-version-id property. - * + * * @param xMsVersionId the xMsVersionId value to set. * @return the PageBlobsCreateHeaders object itself. */ @@ -206,7 +209,7 @@ public PageBlobsCreateHeaders setXMsVersionId(String xMsVersionId) { /** * Get the xMsEncryptionKeySha256 property: The x-ms-encryption-key-sha256 property. - * + * * @return the xMsEncryptionKeySha256 value. */ public String getXMsEncryptionKeySha256() { @@ -215,7 +218,7 @@ public String getXMsEncryptionKeySha256() { /** * Set the xMsEncryptionKeySha256 property: The x-ms-encryption-key-sha256 property. - * + * * @param xMsEncryptionKeySha256 the xMsEncryptionKeySha256 value to set. * @return the PageBlobsCreateHeaders object itself. */ @@ -226,7 +229,7 @@ public PageBlobsCreateHeaders setXMsEncryptionKeySha256(String xMsEncryptionKeyS /** * Get the xMsRequestId property: The x-ms-request-id property. - * + * * @return the xMsRequestId value. */ public String getXMsRequestId() { @@ -235,7 +238,7 @@ public String getXMsRequestId() { /** * Set the xMsRequestId property: The x-ms-request-id property. - * + * * @param xMsRequestId the xMsRequestId value to set. * @return the PageBlobsCreateHeaders object itself. */ @@ -246,7 +249,7 @@ public PageBlobsCreateHeaders setXMsRequestId(String xMsRequestId) { /** * Get the xMsRequestServerEncrypted property: The x-ms-request-server-encrypted property. - * + * * @return the xMsRequestServerEncrypted value. */ public Boolean isXMsRequestServerEncrypted() { @@ -255,7 +258,7 @@ public Boolean isXMsRequestServerEncrypted() { /** * Set the xMsRequestServerEncrypted property: The x-ms-request-server-encrypted property. - * + * * @param xMsRequestServerEncrypted the xMsRequestServerEncrypted value to set. * @return the PageBlobsCreateHeaders object itself. */ @@ -266,7 +269,7 @@ public PageBlobsCreateHeaders setXMsRequestServerEncrypted(Boolean xMsRequestSer /** * Get the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @return the xMsClientRequestId value. */ public String getXMsClientRequestId() { @@ -275,7 +278,7 @@ public String getXMsClientRequestId() { /** * Set the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @param xMsClientRequestId the xMsClientRequestId value to set. * @return the PageBlobsCreateHeaders object itself. */ @@ -286,7 +289,7 @@ public PageBlobsCreateHeaders setXMsClientRequestId(String xMsClientRequestId) { /** * Get the date property: The Date property. - * + * * @return the date value. */ public OffsetDateTime getDate() { @@ -298,7 +301,7 @@ public OffsetDateTime getDate() { /** * Set the date property: The Date property. - * + * * @param date the date value to set. * @return the PageBlobsCreateHeaders object itself. */ @@ -313,27 +316,27 @@ public PageBlobsCreateHeaders setDate(OffsetDateTime date) { /** * Get the contentMD5 property: The Content-MD5 property. - * + * * @return the contentMD5 value. */ public byte[] getContentMD5() { - return CoreUtils.clone(this.contentMD5); + return this.contentMD5; } /** * Set the contentMD5 property: The Content-MD5 property. - * + * * @param contentMD5 the contentMD5 value to set. * @return the PageBlobsCreateHeaders object itself. */ public PageBlobsCreateHeaders setContentMD5(byte[] contentMD5) { - this.contentMD5 = CoreUtils.clone(contentMD5); + this.contentMD5 = contentMD5; return this; } /** * Get the xMsEncryptionScope property: The x-ms-encryption-scope property. - * + * * @return the xMsEncryptionScope value. */ public String getXMsEncryptionScope() { @@ -342,7 +345,7 @@ public String getXMsEncryptionScope() { /** * Set the xMsEncryptionScope property: The x-ms-encryption-scope property. - * + * * @param xMsEncryptionScope the xMsEncryptionScope value to set. * @return the PageBlobsCreateHeaders object itself. */ diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/PageBlobsGetPageRangesDiffHeaders.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/PageBlobsGetPageRangesDiffHeaders.java index 9975f19a68e7..84daa38499e1 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/PageBlobsGetPageRangesDiffHeaders.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/PageBlobsGetPageRangesDiffHeaders.java @@ -4,17 +4,17 @@ package com.azure.v2.storage.blob.models; -import com.azure.v2.core.annotation.Fluent; +import io.clientcore.core.annotations.Metadata; +import io.clientcore.core.annotations.TypeConditions; import io.clientcore.core.http.models.HttpHeaderName; import io.clientcore.core.http.models.HttpHeaders; -import io.clientcore.core.util.DateTimeRfc1123; - +import io.clientcore.core.utils.DateTimeRfc1123; import java.time.OffsetDateTime; /** * The PageBlobsGetPageRangesDiffHeaders model. */ -@Fluent +@Metadata(conditions = { TypeConditions.FLUENT }) public final class PageBlobsGetPageRangesDiffHeaders { /* * The x-ms-version property. @@ -56,10 +56,14 @@ public final class PageBlobsGetPageRangesDiffHeaders { private static final HttpHeaderName X_MS_BLOB_CONTENT_LENGTH = HttpHeaderName.fromString("x-ms-blob-content-length"); + private static final HttpHeaderName X_MS_REQUEST_ID = HttpHeaderName.fromString("x-ms-request-id"); + + private static final HttpHeaderName X_MS_CLIENT_REQUEST_ID = HttpHeaderName.fromString("x-ms-client-request-id"); + // HttpHeaders containing the raw property values. /** * Creates an instance of PageBlobsGetPageRangesDiffHeaders class. - * + * * @param rawHeaders The raw HttpHeaders that will be used to create the property values. */ public PageBlobsGetPageRangesDiffHeaders(HttpHeaders rawHeaders) { @@ -73,8 +77,8 @@ public PageBlobsGetPageRangesDiffHeaders(HttpHeaders rawHeaders) { if (lastModified != null) { this.lastModified = new DateTimeRfc1123(lastModified); } - this.xMsRequestId = rawHeaders.getValue(HttpHeaderName.fromString("x-ms-request-id")); - this.xMsClientRequestId = rawHeaders.getValue(HttpHeaderName.fromString("x-ms-client-request-id")); + this.xMsRequestId = rawHeaders.getValue(X_MS_REQUEST_ID); + this.xMsClientRequestId = rawHeaders.getValue(X_MS_CLIENT_REQUEST_ID); String date = rawHeaders.getValue(HttpHeaderName.DATE); if (date != null) { this.date = new DateTimeRfc1123(date); @@ -83,7 +87,7 @@ public PageBlobsGetPageRangesDiffHeaders(HttpHeaders rawHeaders) { /** * Get the xMsVersion property: The x-ms-version property. - * + * * @return the xMsVersion value. */ public String getXMsVersion() { @@ -92,7 +96,7 @@ public String getXMsVersion() { /** * Set the xMsVersion property: The x-ms-version property. - * + * * @param xMsVersion the xMsVersion value to set. * @return the PageBlobsGetPageRangesDiffHeaders object itself. */ @@ -103,7 +107,7 @@ public PageBlobsGetPageRangesDiffHeaders setXMsVersion(String xMsVersion) { /** * Get the xMsBlobContentLength property: The x-ms-blob-content-length property. - * + * * @return the xMsBlobContentLength value. */ public Long getXMsBlobContentLength() { @@ -112,7 +116,7 @@ public Long getXMsBlobContentLength() { /** * Set the xMsBlobContentLength property: The x-ms-blob-content-length property. - * + * * @param xMsBlobContentLength the xMsBlobContentLength value to set. * @return the PageBlobsGetPageRangesDiffHeaders object itself. */ @@ -123,7 +127,7 @@ public PageBlobsGetPageRangesDiffHeaders setXMsBlobContentLength(Long xMsBlobCon /** * Get the eTag property: The ETag property. - * + * * @return the eTag value. */ public String getETag() { @@ -132,7 +136,7 @@ public String getETag() { /** * Set the eTag property: The ETag property. - * + * * @param eTag the eTag value to set. * @return the PageBlobsGetPageRangesDiffHeaders object itself. */ @@ -143,7 +147,7 @@ public PageBlobsGetPageRangesDiffHeaders setETag(String eTag) { /** * Get the lastModified property: The Last-Modified property. - * + * * @return the lastModified value. */ public OffsetDateTime getLastModified() { @@ -155,7 +159,7 @@ public OffsetDateTime getLastModified() { /** * Set the lastModified property: The Last-Modified property. - * + * * @param lastModified the lastModified value to set. * @return the PageBlobsGetPageRangesDiffHeaders object itself. */ @@ -170,7 +174,7 @@ public PageBlobsGetPageRangesDiffHeaders setLastModified(OffsetDateTime lastModi /** * Get the xMsRequestId property: The x-ms-request-id property. - * + * * @return the xMsRequestId value. */ public String getXMsRequestId() { @@ -179,7 +183,7 @@ public String getXMsRequestId() { /** * Set the xMsRequestId property: The x-ms-request-id property. - * + * * @param xMsRequestId the xMsRequestId value to set. * @return the PageBlobsGetPageRangesDiffHeaders object itself. */ @@ -190,7 +194,7 @@ public PageBlobsGetPageRangesDiffHeaders setXMsRequestId(String xMsRequestId) { /** * Get the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @return the xMsClientRequestId value. */ public String getXMsClientRequestId() { @@ -199,7 +203,7 @@ public String getXMsClientRequestId() { /** * Set the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @param xMsClientRequestId the xMsClientRequestId value to set. * @return the PageBlobsGetPageRangesDiffHeaders object itself. */ @@ -210,7 +214,7 @@ public PageBlobsGetPageRangesDiffHeaders setXMsClientRequestId(String xMsClientR /** * Get the date property: The Date property. - * + * * @return the date value. */ public OffsetDateTime getDate() { @@ -222,7 +226,7 @@ public OffsetDateTime getDate() { /** * Set the date property: The Date property. - * + * * @param date the date value to set. * @return the PageBlobsGetPageRangesDiffHeaders object itself. */ diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/PageBlobsGetPageRangesHeaders.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/PageBlobsGetPageRangesHeaders.java index 636a8214538a..b398b3a9120c 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/PageBlobsGetPageRangesHeaders.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/PageBlobsGetPageRangesHeaders.java @@ -4,17 +4,17 @@ package com.azure.v2.storage.blob.models; -import com.azure.v2.core.annotation.Fluent; -import io.clientcore.core.util.DateTimeRfc1123; +import io.clientcore.core.annotations.Metadata; +import io.clientcore.core.annotations.TypeConditions; import io.clientcore.core.http.models.HttpHeaderName; import io.clientcore.core.http.models.HttpHeaders; - +import io.clientcore.core.utils.DateTimeRfc1123; import java.time.OffsetDateTime; /** * The PageBlobsGetPageRangesHeaders model. */ -@Fluent +@Metadata(conditions = { TypeConditions.FLUENT }) public final class PageBlobsGetPageRangesHeaders { /* * The x-ms-version property. @@ -56,10 +56,14 @@ public final class PageBlobsGetPageRangesHeaders { private static final HttpHeaderName X_MS_BLOB_CONTENT_LENGTH = HttpHeaderName.fromString("x-ms-blob-content-length"); + private static final HttpHeaderName X_MS_REQUEST_ID = HttpHeaderName.fromString("x-ms-request-id"); + + private static final HttpHeaderName X_MS_CLIENT_REQUEST_ID = HttpHeaderName.fromString("x-ms-client-request-id"); + // HttpHeaders containing the raw property values. /** * Creates an instance of PageBlobsGetPageRangesHeaders class. - * + * * @param rawHeaders The raw HttpHeaders that will be used to create the property values. */ public PageBlobsGetPageRangesHeaders(HttpHeaders rawHeaders) { @@ -73,8 +77,8 @@ public PageBlobsGetPageRangesHeaders(HttpHeaders rawHeaders) { if (lastModified != null) { this.lastModified = new DateTimeRfc1123(lastModified); } - this.xMsRequestId = rawHeaders.getValue(HttpHeaderName.fromString("x-ms-request-id")); - this.xMsClientRequestId = rawHeaders.getValue(HttpHeaderName.fromString("x-ms-client-request-id")); + this.xMsRequestId = rawHeaders.getValue(X_MS_REQUEST_ID); + this.xMsClientRequestId = rawHeaders.getValue(X_MS_CLIENT_REQUEST_ID); String date = rawHeaders.getValue(HttpHeaderName.DATE); if (date != null) { this.date = new DateTimeRfc1123(date); @@ -83,7 +87,7 @@ public PageBlobsGetPageRangesHeaders(HttpHeaders rawHeaders) { /** * Get the xMsVersion property: The x-ms-version property. - * + * * @return the xMsVersion value. */ public String getXMsVersion() { @@ -92,7 +96,7 @@ public String getXMsVersion() { /** * Set the xMsVersion property: The x-ms-version property. - * + * * @param xMsVersion the xMsVersion value to set. * @return the PageBlobsGetPageRangesHeaders object itself. */ @@ -103,7 +107,7 @@ public PageBlobsGetPageRangesHeaders setXMsVersion(String xMsVersion) { /** * Get the xMsBlobContentLength property: The x-ms-blob-content-length property. - * + * * @return the xMsBlobContentLength value. */ public Long getXMsBlobContentLength() { @@ -112,7 +116,7 @@ public Long getXMsBlobContentLength() { /** * Set the xMsBlobContentLength property: The x-ms-blob-content-length property. - * + * * @param xMsBlobContentLength the xMsBlobContentLength value to set. * @return the PageBlobsGetPageRangesHeaders object itself. */ @@ -123,7 +127,7 @@ public PageBlobsGetPageRangesHeaders setXMsBlobContentLength(Long xMsBlobContent /** * Get the eTag property: The ETag property. - * + * * @return the eTag value. */ public String getETag() { @@ -132,7 +136,7 @@ public String getETag() { /** * Set the eTag property: The ETag property. - * + * * @param eTag the eTag value to set. * @return the PageBlobsGetPageRangesHeaders object itself. */ @@ -143,7 +147,7 @@ public PageBlobsGetPageRangesHeaders setETag(String eTag) { /** * Get the lastModified property: The Last-Modified property. - * + * * @return the lastModified value. */ public OffsetDateTime getLastModified() { @@ -155,7 +159,7 @@ public OffsetDateTime getLastModified() { /** * Set the lastModified property: The Last-Modified property. - * + * * @param lastModified the lastModified value to set. * @return the PageBlobsGetPageRangesHeaders object itself. */ @@ -170,7 +174,7 @@ public PageBlobsGetPageRangesHeaders setLastModified(OffsetDateTime lastModified /** * Get the xMsRequestId property: The x-ms-request-id property. - * + * * @return the xMsRequestId value. */ public String getXMsRequestId() { @@ -179,7 +183,7 @@ public String getXMsRequestId() { /** * Set the xMsRequestId property: The x-ms-request-id property. - * + * * @param xMsRequestId the xMsRequestId value to set. * @return the PageBlobsGetPageRangesHeaders object itself. */ @@ -190,7 +194,7 @@ public PageBlobsGetPageRangesHeaders setXMsRequestId(String xMsRequestId) { /** * Get the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @return the xMsClientRequestId value. */ public String getXMsClientRequestId() { @@ -199,7 +203,7 @@ public String getXMsClientRequestId() { /** * Set the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @param xMsClientRequestId the xMsClientRequestId value to set. * @return the PageBlobsGetPageRangesHeaders object itself. */ @@ -210,7 +214,7 @@ public PageBlobsGetPageRangesHeaders setXMsClientRequestId(String xMsClientReque /** * Get the date property: The Date property. - * + * * @return the date value. */ public OffsetDateTime getDate() { @@ -222,7 +226,7 @@ public OffsetDateTime getDate() { /** * Set the date property: The Date property. - * + * * @param date the date value to set. * @return the PageBlobsGetPageRangesHeaders object itself. */ diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/PageBlobsResizeHeaders.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/PageBlobsResizeHeaders.java index e60aab302ad0..63304d4af4d5 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/PageBlobsResizeHeaders.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/PageBlobsResizeHeaders.java @@ -4,17 +4,17 @@ package com.azure.v2.storage.blob.models; -import com.azure.v2.core.annotation.Fluent; -import io.clientcore.core.util.DateTimeRfc1123; +import io.clientcore.core.annotations.Metadata; +import io.clientcore.core.annotations.TypeConditions; import io.clientcore.core.http.models.HttpHeaderName; import io.clientcore.core.http.models.HttpHeaders; - +import io.clientcore.core.utils.DateTimeRfc1123; import java.time.OffsetDateTime; /** * The PageBlobsResizeHeaders model. */ -@Fluent +@Metadata(conditions = { TypeConditions.FLUENT }) public final class PageBlobsResizeHeaders { /* * The x-ms-version property. @@ -56,10 +56,14 @@ public final class PageBlobsResizeHeaders { private static final HttpHeaderName X_MS_BLOB_SEQUENCE_NUMBER = HttpHeaderName.fromString("x-ms-blob-sequence-number"); + private static final HttpHeaderName X_MS_REQUEST_ID = HttpHeaderName.fromString("x-ms-request-id"); + + private static final HttpHeaderName X_MS_CLIENT_REQUEST_ID = HttpHeaderName.fromString("x-ms-client-request-id"); + // HttpHeaders containing the raw property values. /** * Creates an instance of PageBlobsResizeHeaders class. - * + * * @param rawHeaders The raw HttpHeaders that will be used to create the property values. */ public PageBlobsResizeHeaders(HttpHeaders rawHeaders) { @@ -73,8 +77,8 @@ public PageBlobsResizeHeaders(HttpHeaders rawHeaders) { if (lastModified != null) { this.lastModified = new DateTimeRfc1123(lastModified); } - this.xMsRequestId = rawHeaders.getValue(HttpHeaderName.fromString("x-ms-request-id")); - this.xMsClientRequestId = rawHeaders.getValue(HttpHeaderName.fromString("x-ms-client-request-id")); + this.xMsRequestId = rawHeaders.getValue(X_MS_REQUEST_ID); + this.xMsClientRequestId = rawHeaders.getValue(X_MS_CLIENT_REQUEST_ID); String date = rawHeaders.getValue(HttpHeaderName.DATE); if (date != null) { this.date = new DateTimeRfc1123(date); @@ -83,7 +87,7 @@ public PageBlobsResizeHeaders(HttpHeaders rawHeaders) { /** * Get the xMsVersion property: The x-ms-version property. - * + * * @return the xMsVersion value. */ public String getXMsVersion() { @@ -92,7 +96,7 @@ public String getXMsVersion() { /** * Set the xMsVersion property: The x-ms-version property. - * + * * @param xMsVersion the xMsVersion value to set. * @return the PageBlobsResizeHeaders object itself. */ @@ -103,7 +107,7 @@ public PageBlobsResizeHeaders setXMsVersion(String xMsVersion) { /** * Get the eTag property: The ETag property. - * + * * @return the eTag value. */ public String getETag() { @@ -112,7 +116,7 @@ public String getETag() { /** * Set the eTag property: The ETag property. - * + * * @param eTag the eTag value to set. * @return the PageBlobsResizeHeaders object itself. */ @@ -123,7 +127,7 @@ public PageBlobsResizeHeaders setETag(String eTag) { /** * Get the xMsBlobSequenceNumber property: The x-ms-blob-sequence-number property. - * + * * @return the xMsBlobSequenceNumber value. */ public Long getXMsBlobSequenceNumber() { @@ -132,7 +136,7 @@ public Long getXMsBlobSequenceNumber() { /** * Set the xMsBlobSequenceNumber property: The x-ms-blob-sequence-number property. - * + * * @param xMsBlobSequenceNumber the xMsBlobSequenceNumber value to set. * @return the PageBlobsResizeHeaders object itself. */ @@ -143,7 +147,7 @@ public PageBlobsResizeHeaders setXMsBlobSequenceNumber(Long xMsBlobSequenceNumbe /** * Get the lastModified property: The Last-Modified property. - * + * * @return the lastModified value. */ public OffsetDateTime getLastModified() { @@ -155,7 +159,7 @@ public OffsetDateTime getLastModified() { /** * Set the lastModified property: The Last-Modified property. - * + * * @param lastModified the lastModified value to set. * @return the PageBlobsResizeHeaders object itself. */ @@ -170,7 +174,7 @@ public PageBlobsResizeHeaders setLastModified(OffsetDateTime lastModified) { /** * Get the xMsRequestId property: The x-ms-request-id property. - * + * * @return the xMsRequestId value. */ public String getXMsRequestId() { @@ -179,7 +183,7 @@ public String getXMsRequestId() { /** * Set the xMsRequestId property: The x-ms-request-id property. - * + * * @param xMsRequestId the xMsRequestId value to set. * @return the PageBlobsResizeHeaders object itself. */ @@ -190,7 +194,7 @@ public PageBlobsResizeHeaders setXMsRequestId(String xMsRequestId) { /** * Get the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @return the xMsClientRequestId value. */ public String getXMsClientRequestId() { @@ -199,7 +203,7 @@ public String getXMsClientRequestId() { /** * Set the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @param xMsClientRequestId the xMsClientRequestId value to set. * @return the PageBlobsResizeHeaders object itself. */ @@ -210,7 +214,7 @@ public PageBlobsResizeHeaders setXMsClientRequestId(String xMsClientRequestId) { /** * Get the date property: The Date property. - * + * * @return the date value. */ public OffsetDateTime getDate() { @@ -222,7 +226,7 @@ public OffsetDateTime getDate() { /** * Set the date property: The Date property. - * + * * @param date the date value to set. * @return the PageBlobsResizeHeaders object itself. */ diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/PageBlobsUpdateSequenceNumberHeaders.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/PageBlobsUpdateSequenceNumberHeaders.java index a1eeef5ea719..1c1e5c95458d 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/PageBlobsUpdateSequenceNumberHeaders.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/PageBlobsUpdateSequenceNumberHeaders.java @@ -4,17 +4,17 @@ package com.azure.v2.storage.blob.models; -import com.azure.v2.core.annotation.Fluent; -import io.clientcore.core.util.DateTimeRfc1123; +import io.clientcore.core.annotations.Metadata; +import io.clientcore.core.annotations.TypeConditions; import io.clientcore.core.http.models.HttpHeaderName; import io.clientcore.core.http.models.HttpHeaders; - +import io.clientcore.core.utils.DateTimeRfc1123; import java.time.OffsetDateTime; /** * The PageBlobsUpdateSequenceNumberHeaders model. */ -@Fluent +@Metadata(conditions = { TypeConditions.FLUENT }) public final class PageBlobsUpdateSequenceNumberHeaders { /* * The x-ms-version property. @@ -56,10 +56,14 @@ public final class PageBlobsUpdateSequenceNumberHeaders { private static final HttpHeaderName X_MS_BLOB_SEQUENCE_NUMBER = HttpHeaderName.fromString("x-ms-blob-sequence-number"); + private static final HttpHeaderName X_MS_REQUEST_ID = HttpHeaderName.fromString("x-ms-request-id"); + + private static final HttpHeaderName X_MS_CLIENT_REQUEST_ID = HttpHeaderName.fromString("x-ms-client-request-id"); + // 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) { @@ -73,8 +77,8 @@ public PageBlobsUpdateSequenceNumberHeaders(HttpHeaders rawHeaders) { if (lastModified != null) { this.lastModified = new DateTimeRfc1123(lastModified); } - this.xMsRequestId = rawHeaders.getValue(HttpHeaderName.fromString("x-ms-request-id")); - this.xMsClientRequestId = rawHeaders.getValue(HttpHeaderName.fromString("x-ms-client-request-id")); + this.xMsRequestId = rawHeaders.getValue(X_MS_REQUEST_ID); + this.xMsClientRequestId = rawHeaders.getValue(X_MS_CLIENT_REQUEST_ID); String date = rawHeaders.getValue(HttpHeaderName.DATE); if (date != null) { this.date = new DateTimeRfc1123(date); @@ -83,7 +87,7 @@ public PageBlobsUpdateSequenceNumberHeaders(HttpHeaders rawHeaders) { /** * Get the xMsVersion property: The x-ms-version property. - * + * * @return the xMsVersion value. */ public String getXMsVersion() { @@ -92,7 +96,7 @@ public String getXMsVersion() { /** * Set the xMsVersion property: The x-ms-version property. - * + * * @param xMsVersion the xMsVersion value to set. * @return the PageBlobsUpdateSequenceNumberHeaders object itself. */ @@ -103,7 +107,7 @@ public PageBlobsUpdateSequenceNumberHeaders setXMsVersion(String xMsVersion) { /** * Get the eTag property: The ETag property. - * + * * @return the eTag value. */ public String getETag() { @@ -112,7 +116,7 @@ public String getETag() { /** * Set the eTag property: The ETag property. - * + * * @param eTag the eTag value to set. * @return the PageBlobsUpdateSequenceNumberHeaders object itself. */ @@ -123,7 +127,7 @@ public PageBlobsUpdateSequenceNumberHeaders setETag(String eTag) { /** * Get the xMsBlobSequenceNumber property: The x-ms-blob-sequence-number property. - * + * * @return the xMsBlobSequenceNumber value. */ public Long getXMsBlobSequenceNumber() { @@ -132,7 +136,7 @@ public Long getXMsBlobSequenceNumber() { /** * Set the xMsBlobSequenceNumber property: The x-ms-blob-sequence-number property. - * + * * @param xMsBlobSequenceNumber the xMsBlobSequenceNumber value to set. * @return the PageBlobsUpdateSequenceNumberHeaders object itself. */ @@ -143,7 +147,7 @@ public PageBlobsUpdateSequenceNumberHeaders setXMsBlobSequenceNumber(Long xMsBlo /** * Get the lastModified property: The Last-Modified property. - * + * * @return the lastModified value. */ public OffsetDateTime getLastModified() { @@ -155,7 +159,7 @@ public OffsetDateTime getLastModified() { /** * Set the lastModified property: The Last-Modified property. - * + * * @param lastModified the lastModified value to set. * @return the PageBlobsUpdateSequenceNumberHeaders object itself. */ @@ -170,7 +174,7 @@ public PageBlobsUpdateSequenceNumberHeaders setLastModified(OffsetDateTime lastM /** * Get the xMsRequestId property: The x-ms-request-id property. - * + * * @return the xMsRequestId value. */ public String getXMsRequestId() { @@ -179,7 +183,7 @@ public String getXMsRequestId() { /** * Set the xMsRequestId property: The x-ms-request-id property. - * + * * @param xMsRequestId the xMsRequestId value to set. * @return the PageBlobsUpdateSequenceNumberHeaders object itself. */ @@ -190,7 +194,7 @@ public PageBlobsUpdateSequenceNumberHeaders setXMsRequestId(String xMsRequestId) /** * Get the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @return the xMsClientRequestId value. */ public String getXMsClientRequestId() { @@ -199,7 +203,7 @@ public String getXMsClientRequestId() { /** * Set the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @param xMsClientRequestId the xMsClientRequestId value to set. * @return the PageBlobsUpdateSequenceNumberHeaders object itself. */ @@ -210,7 +214,7 @@ public PageBlobsUpdateSequenceNumberHeaders setXMsClientRequestId(String xMsClie /** * Get the date property: The Date property. - * + * * @return the date value. */ public OffsetDateTime getDate() { @@ -222,7 +226,7 @@ public OffsetDateTime getDate() { /** * Set the date property: The Date property. - * + * * @param date the date value to set. * @return the PageBlobsUpdateSequenceNumberHeaders object itself. */ diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/PageBlobsUploadPagesFromURLHeaders.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/PageBlobsUploadPagesFromURLHeaders.java index f136b86b3644..506ca96f52b4 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/PageBlobsUploadPagesFromURLHeaders.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/PageBlobsUploadPagesFromURLHeaders.java @@ -4,19 +4,18 @@ package com.azure.v2.storage.blob.models; -import com.azure.v2.core.annotation.Fluent; -import com.azure.v2.core.util.CoreUtils; -import io.clientcore.core.util.DateTimeRfc1123; +import io.clientcore.core.annotations.Metadata; +import io.clientcore.core.annotations.TypeConditions; import io.clientcore.core.http.models.HttpHeaderName; import io.clientcore.core.http.models.HttpHeaders; - +import io.clientcore.core.utils.DateTimeRfc1123; import java.time.OffsetDateTime; import java.util.Base64; /** * The PageBlobsUploadPagesFromURLHeaders model. */ -@Fluent +@Metadata(conditions = { TypeConditions.FLUENT }) public final class PageBlobsUploadPagesFromURLHeaders { /* * The x-ms-version property. @@ -83,6 +82,8 @@ public final class PageBlobsUploadPagesFromURLHeaders { private static final HttpHeaderName X_MS_ENCRYPTION_KEY_SHA256 = HttpHeaderName.fromString("x-ms-encryption-key-sha256"); + private static final HttpHeaderName X_MS_REQUEST_ID = HttpHeaderName.fromString("x-ms-request-id"); + private static final HttpHeaderName X_MS_REQUEST_SERVER_ENCRYPTED = HttpHeaderName.fromString("x-ms-request-server-encrypted"); @@ -91,7 +92,7 @@ public final class PageBlobsUploadPagesFromURLHeaders { // 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) { @@ -110,7 +111,7 @@ public PageBlobsUploadPagesFromURLHeaders(HttpHeaders rawHeaders) { this.lastModified = new DateTimeRfc1123(lastModified); } this.xMsEncryptionKeySha256 = rawHeaders.getValue(X_MS_ENCRYPTION_KEY_SHA256); - this.xMsRequestId = rawHeaders.getValue(HttpHeaderName.fromString("x-ms-request-id")); + this.xMsRequestId = rawHeaders.getValue(X_MS_REQUEST_ID); String xMsRequestServerEncrypted = rawHeaders.getValue(X_MS_REQUEST_SERVER_ENCRYPTED); if (xMsRequestServerEncrypted != null) { this.xMsRequestServerEncrypted = Boolean.parseBoolean(xMsRequestServerEncrypted); @@ -128,7 +129,7 @@ public PageBlobsUploadPagesFromURLHeaders(HttpHeaders rawHeaders) { /** * Get the xMsVersion property: The x-ms-version property. - * + * * @return the xMsVersion value. */ public String getXMsVersion() { @@ -137,7 +138,7 @@ public String getXMsVersion() { /** * Set the xMsVersion property: The x-ms-version property. - * + * * @param xMsVersion the xMsVersion value to set. * @return the PageBlobsUploadPagesFromURLHeaders object itself. */ @@ -148,7 +149,7 @@ public PageBlobsUploadPagesFromURLHeaders setXMsVersion(String xMsVersion) { /** * Get the eTag property: The ETag property. - * + * * @return the eTag value. */ public String getETag() { @@ -157,7 +158,7 @@ public String getETag() { /** * Set the eTag property: The ETag property. - * + * * @param eTag the eTag value to set. * @return the PageBlobsUploadPagesFromURLHeaders object itself. */ @@ -168,27 +169,27 @@ public PageBlobsUploadPagesFromURLHeaders setETag(String eTag) { /** * Get the xMsContentCrc64 property: The x-ms-content-crc64 property. - * + * * @return the xMsContentCrc64 value. */ public byte[] getXMsContentCrc64() { - return CoreUtils.clone(this.xMsContentCrc64); + return this.xMsContentCrc64; } /** * Set the xMsContentCrc64 property: The x-ms-content-crc64 property. - * + * * @param xMsContentCrc64 the xMsContentCrc64 value to set. * @return the PageBlobsUploadPagesFromURLHeaders object itself. */ public PageBlobsUploadPagesFromURLHeaders setXMsContentCrc64(byte[] xMsContentCrc64) { - this.xMsContentCrc64 = CoreUtils.clone(xMsContentCrc64); + this.xMsContentCrc64 = xMsContentCrc64; return this; } /** * Get the xMsBlobSequenceNumber property: The x-ms-blob-sequence-number property. - * + * * @return the xMsBlobSequenceNumber value. */ public Long getXMsBlobSequenceNumber() { @@ -197,7 +198,7 @@ public Long getXMsBlobSequenceNumber() { /** * Set the xMsBlobSequenceNumber property: The x-ms-blob-sequence-number property. - * + * * @param xMsBlobSequenceNumber the xMsBlobSequenceNumber value to set. * @return the PageBlobsUploadPagesFromURLHeaders object itself. */ @@ -208,7 +209,7 @@ public PageBlobsUploadPagesFromURLHeaders setXMsBlobSequenceNumber(Long xMsBlobS /** * Get the lastModified property: The Last-Modified property. - * + * * @return the lastModified value. */ public OffsetDateTime getLastModified() { @@ -220,7 +221,7 @@ public OffsetDateTime getLastModified() { /** * Set the lastModified property: The Last-Modified property. - * + * * @param lastModified the lastModified value to set. * @return the PageBlobsUploadPagesFromURLHeaders object itself. */ @@ -235,7 +236,7 @@ public PageBlobsUploadPagesFromURLHeaders setLastModified(OffsetDateTime lastMod /** * Get the xMsEncryptionKeySha256 property: The x-ms-encryption-key-sha256 property. - * + * * @return the xMsEncryptionKeySha256 value. */ public String getXMsEncryptionKeySha256() { @@ -244,7 +245,7 @@ public String getXMsEncryptionKeySha256() { /** * Set the xMsEncryptionKeySha256 property: The x-ms-encryption-key-sha256 property. - * + * * @param xMsEncryptionKeySha256 the xMsEncryptionKeySha256 value to set. * @return the PageBlobsUploadPagesFromURLHeaders object itself. */ @@ -255,7 +256,7 @@ public PageBlobsUploadPagesFromURLHeaders setXMsEncryptionKeySha256(String xMsEn /** * Get the xMsRequestId property: The x-ms-request-id property. - * + * * @return the xMsRequestId value. */ public String getXMsRequestId() { @@ -264,7 +265,7 @@ public String getXMsRequestId() { /** * Set the xMsRequestId property: The x-ms-request-id property. - * + * * @param xMsRequestId the xMsRequestId value to set. * @return the PageBlobsUploadPagesFromURLHeaders object itself. */ @@ -275,7 +276,7 @@ public PageBlobsUploadPagesFromURLHeaders setXMsRequestId(String xMsRequestId) { /** * Get the xMsRequestServerEncrypted property: The x-ms-request-server-encrypted property. - * + * * @return the xMsRequestServerEncrypted value. */ public Boolean isXMsRequestServerEncrypted() { @@ -284,7 +285,7 @@ public Boolean isXMsRequestServerEncrypted() { /** * Set the xMsRequestServerEncrypted property: The x-ms-request-server-encrypted property. - * + * * @param xMsRequestServerEncrypted the xMsRequestServerEncrypted value to set. * @return the PageBlobsUploadPagesFromURLHeaders object itself. */ @@ -295,7 +296,7 @@ public PageBlobsUploadPagesFromURLHeaders setXMsRequestServerEncrypted(Boolean x /** * Get the date property: The Date property. - * + * * @return the date value. */ public OffsetDateTime getDate() { @@ -307,7 +308,7 @@ public OffsetDateTime getDate() { /** * Set the date property: The Date property. - * + * * @param date the date value to set. * @return the PageBlobsUploadPagesFromURLHeaders object itself. */ @@ -322,27 +323,27 @@ public PageBlobsUploadPagesFromURLHeaders setDate(OffsetDateTime date) { /** * Get the contentMD5 property: The Content-MD5 property. - * + * * @return the contentMD5 value. */ public byte[] getContentMD5() { - return CoreUtils.clone(this.contentMD5); + return this.contentMD5; } /** * Set the contentMD5 property: The Content-MD5 property. - * + * * @param contentMD5 the contentMD5 value to set. * @return the PageBlobsUploadPagesFromURLHeaders object itself. */ public PageBlobsUploadPagesFromURLHeaders setContentMD5(byte[] contentMD5) { - this.contentMD5 = CoreUtils.clone(contentMD5); + this.contentMD5 = contentMD5; return this; } /** * Get the xMsEncryptionScope property: The x-ms-encryption-scope property. - * + * * @return the xMsEncryptionScope value. */ public String getXMsEncryptionScope() { @@ -351,7 +352,7 @@ public String getXMsEncryptionScope() { /** * Set the xMsEncryptionScope property: The x-ms-encryption-scope property. - * + * * @param xMsEncryptionScope the xMsEncryptionScope value to set. * @return the PageBlobsUploadPagesFromURLHeaders object itself. */ diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/PageBlobsUploadPagesHeaders.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/PageBlobsUploadPagesHeaders.java index 1cc291e4a7f7..d810a4648c8c 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/PageBlobsUploadPagesHeaders.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/PageBlobsUploadPagesHeaders.java @@ -4,19 +4,18 @@ package com.azure.v2.storage.blob.models; -import com.azure.v2.core.annotation.Fluent; -import com.azure.v2.core.util.CoreUtils; -import io.clientcore.core.util.DateTimeRfc1123; +import io.clientcore.core.annotations.Metadata; +import io.clientcore.core.annotations.TypeConditions; import io.clientcore.core.http.models.HttpHeaderName; import io.clientcore.core.http.models.HttpHeaders; - +import io.clientcore.core.utils.DateTimeRfc1123; import java.time.OffsetDateTime; import java.util.Base64; /** * The PageBlobsUploadPagesHeaders model. */ -@Fluent +@Metadata(conditions = { TypeConditions.FLUENT }) public final class PageBlobsUploadPagesHeaders { /* * The x-ms-version property. @@ -98,12 +97,16 @@ public final class PageBlobsUploadPagesHeaders { private static final HttpHeaderName X_MS_REQUEST_SERVER_ENCRYPTED = HttpHeaderName.fromString("x-ms-request-server-encrypted"); + private static final HttpHeaderName X_MS_REQUEST_ID = HttpHeaderName.fromString("x-ms-request-id"); + + private static final HttpHeaderName X_MS_CLIENT_REQUEST_ID = HttpHeaderName.fromString("x-ms-client-request-id"); + private static final HttpHeaderName X_MS_ENCRYPTION_SCOPE = HttpHeaderName.fromString("x-ms-encryption-scope"); // HttpHeaders containing the raw property values. /** * Creates an instance of PageBlobsUploadPagesHeaders class. - * + * * @param rawHeaders The raw HttpHeaders that will be used to create the property values. */ public PageBlobsUploadPagesHeaders(HttpHeaders rawHeaders) { @@ -135,14 +138,14 @@ public PageBlobsUploadPagesHeaders(HttpHeaders rawHeaders) { this.contentMD5 = Base64.getDecoder().decode(contentMD5); } this.eTag = rawHeaders.getValue(HttpHeaderName.ETAG); - this.xMsRequestId = rawHeaders.getValue(HttpHeaderName.fromString("x-ms-request-id")); - this.xMsClientRequestId = rawHeaders.getValue(HttpHeaderName.fromString("x-ms-client-request-id")); + this.xMsRequestId = rawHeaders.getValue(X_MS_REQUEST_ID); + this.xMsClientRequestId = rawHeaders.getValue(X_MS_CLIENT_REQUEST_ID); this.xMsEncryptionScope = rawHeaders.getValue(X_MS_ENCRYPTION_SCOPE); } /** * Get the xMsVersion property: The x-ms-version property. - * + * * @return the xMsVersion value. */ public String getXMsVersion() { @@ -151,7 +154,7 @@ public String getXMsVersion() { /** * Set the xMsVersion property: The x-ms-version property. - * + * * @param xMsVersion the xMsVersion value to set. * @return the PageBlobsUploadPagesHeaders object itself. */ @@ -162,27 +165,27 @@ public PageBlobsUploadPagesHeaders setXMsVersion(String xMsVersion) { /** * Get the xMsContentCrc64 property: The x-ms-content-crc64 property. - * + * * @return the xMsContentCrc64 value. */ public byte[] getXMsContentCrc64() { - return CoreUtils.clone(this.xMsContentCrc64); + return this.xMsContentCrc64; } /** * Set the xMsContentCrc64 property: The x-ms-content-crc64 property. - * + * * @param xMsContentCrc64 the xMsContentCrc64 value to set. * @return the PageBlobsUploadPagesHeaders object itself. */ public PageBlobsUploadPagesHeaders setXMsContentCrc64(byte[] xMsContentCrc64) { - this.xMsContentCrc64 = CoreUtils.clone(xMsContentCrc64); + this.xMsContentCrc64 = xMsContentCrc64; return this; } /** * Get the xMsBlobSequenceNumber property: The x-ms-blob-sequence-number property. - * + * * @return the xMsBlobSequenceNumber value. */ public Long getXMsBlobSequenceNumber() { @@ -191,7 +194,7 @@ public Long getXMsBlobSequenceNumber() { /** * Set the xMsBlobSequenceNumber property: The x-ms-blob-sequence-number property. - * + * * @param xMsBlobSequenceNumber the xMsBlobSequenceNumber value to set. * @return the PageBlobsUploadPagesHeaders object itself. */ @@ -202,7 +205,7 @@ public PageBlobsUploadPagesHeaders setXMsBlobSequenceNumber(Long xMsBlobSequence /** * Get the lastModified property: The Last-Modified property. - * + * * @return the lastModified value. */ public OffsetDateTime getLastModified() { @@ -214,7 +217,7 @@ public OffsetDateTime getLastModified() { /** * Set the lastModified property: The Last-Modified property. - * + * * @param lastModified the lastModified value to set. * @return the PageBlobsUploadPagesHeaders object itself. */ @@ -229,7 +232,7 @@ public PageBlobsUploadPagesHeaders setLastModified(OffsetDateTime lastModified) /** * Get the xMsEncryptionKeySha256 property: The x-ms-encryption-key-sha256 property. - * + * * @return the xMsEncryptionKeySha256 value. */ public String getXMsEncryptionKeySha256() { @@ -238,7 +241,7 @@ public String getXMsEncryptionKeySha256() { /** * Set the xMsEncryptionKeySha256 property: The x-ms-encryption-key-sha256 property. - * + * * @param xMsEncryptionKeySha256 the xMsEncryptionKeySha256 value to set. * @return the PageBlobsUploadPagesHeaders object itself. */ @@ -249,7 +252,7 @@ public PageBlobsUploadPagesHeaders setXMsEncryptionKeySha256(String xMsEncryptio /** * Get the xMsStructuredBody property: The x-ms-structured-body property. - * + * * @return the xMsStructuredBody value. */ public String getXMsStructuredBody() { @@ -258,7 +261,7 @@ public String getXMsStructuredBody() { /** * Set the xMsStructuredBody property: The x-ms-structured-body property. - * + * * @param xMsStructuredBody the xMsStructuredBody value to set. * @return the PageBlobsUploadPagesHeaders object itself. */ @@ -269,7 +272,7 @@ public PageBlobsUploadPagesHeaders setXMsStructuredBody(String xMsStructuredBody /** * Get the xMsRequestServerEncrypted property: The x-ms-request-server-encrypted property. - * + * * @return the xMsRequestServerEncrypted value. */ public Boolean isXMsRequestServerEncrypted() { @@ -278,7 +281,7 @@ public Boolean isXMsRequestServerEncrypted() { /** * Set the xMsRequestServerEncrypted property: The x-ms-request-server-encrypted property. - * + * * @param xMsRequestServerEncrypted the xMsRequestServerEncrypted value to set. * @return the PageBlobsUploadPagesHeaders object itself. */ @@ -289,7 +292,7 @@ public PageBlobsUploadPagesHeaders setXMsRequestServerEncrypted(Boolean xMsReque /** * Get the date property: The Date property. - * + * * @return the date value. */ public OffsetDateTime getDate() { @@ -301,7 +304,7 @@ public OffsetDateTime getDate() { /** * Set the date property: The Date property. - * + * * @param date the date value to set. * @return the PageBlobsUploadPagesHeaders object itself. */ @@ -316,27 +319,27 @@ public PageBlobsUploadPagesHeaders setDate(OffsetDateTime date) { /** * Get the contentMD5 property: The Content-MD5 property. - * + * * @return the contentMD5 value. */ public byte[] getContentMD5() { - return CoreUtils.clone(this.contentMD5); + return this.contentMD5; } /** * Set the contentMD5 property: The Content-MD5 property. - * + * * @param contentMD5 the contentMD5 value to set. * @return the PageBlobsUploadPagesHeaders object itself. */ public PageBlobsUploadPagesHeaders setContentMD5(byte[] contentMD5) { - this.contentMD5 = CoreUtils.clone(contentMD5); + this.contentMD5 = contentMD5; return this; } /** * Get the eTag property: The ETag property. - * + * * @return the eTag value. */ public String getETag() { @@ -345,7 +348,7 @@ public String getETag() { /** * Set the eTag property: The ETag property. - * + * * @param eTag the eTag value to set. * @return the PageBlobsUploadPagesHeaders object itself. */ @@ -356,7 +359,7 @@ public PageBlobsUploadPagesHeaders setETag(String eTag) { /** * Get the xMsRequestId property: The x-ms-request-id property. - * + * * @return the xMsRequestId value. */ public String getXMsRequestId() { @@ -365,7 +368,7 @@ public String getXMsRequestId() { /** * Set the xMsRequestId property: The x-ms-request-id property. - * + * * @param xMsRequestId the xMsRequestId value to set. * @return the PageBlobsUploadPagesHeaders object itself. */ @@ -376,7 +379,7 @@ public PageBlobsUploadPagesHeaders setXMsRequestId(String xMsRequestId) { /** * Get the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @return the xMsClientRequestId value. */ public String getXMsClientRequestId() { @@ -385,7 +388,7 @@ public String getXMsClientRequestId() { /** * Set the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @param xMsClientRequestId the xMsClientRequestId value to set. * @return the PageBlobsUploadPagesHeaders object itself. */ @@ -396,7 +399,7 @@ public PageBlobsUploadPagesHeaders setXMsClientRequestId(String xMsClientRequest /** * Get the xMsEncryptionScope property: The x-ms-encryption-scope property. - * + * * @return the xMsEncryptionScope value. */ public String getXMsEncryptionScope() { @@ -405,7 +408,7 @@ public String getXMsEncryptionScope() { /** * Set the xMsEncryptionScope property: The x-ms-encryption-scope property. - * + * * @param xMsEncryptionScope the xMsEncryptionScope value to set. * @return the PageBlobsUploadPagesHeaders object itself. */ diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/PageList.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/PageList.java index f482409d4e96..2dc07d1cd558 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/PageList.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/PageList.java @@ -4,8 +4,8 @@ package com.azure.v2.storage.blob.models; -import com.azure.v2.core.annotation.Fluent; -import com.azure.v2.core.util.CoreUtils; +import io.clientcore.core.annotations.Metadata; +import io.clientcore.core.annotations.TypeConditions; import io.clientcore.core.serialization.xml.XmlReader; import io.clientcore.core.serialization.xml.XmlSerializable; import io.clientcore.core.serialization.xml.XmlToken; @@ -18,7 +18,7 @@ /** * the list of pages. */ -@Fluent +@Metadata(conditions = { TypeConditions.FLUENT }) public final class PageList implements XmlSerializable { /* * The PageRange property. @@ -43,7 +43,7 @@ public PageList() { /** * Get the pageRange property: The PageRange property. - * + * * @return the pageRange value. */ public List getPageRange() { @@ -52,7 +52,7 @@ public List getPageRange() { /** * Set the pageRange property: The PageRange property. - * + * * @param pageRange the pageRange value to set. * @return the PageList object itself. */ @@ -63,7 +63,7 @@ public PageList setPageRange(List pageRange) { /** * Get the clearRange property: The ClearRange property. - * + * * @return the clearRange value. */ public List getClearRange() { @@ -72,7 +72,7 @@ public List getClearRange() { /** * Set the clearRange property: The ClearRange property. - * + * * @param clearRange the clearRange value to set. * @return the PageList object itself. */ @@ -83,7 +83,7 @@ public PageList setClearRange(List clearRange) { /** * Get the nextMarker property: The NextMarker property. - * + * * @return the nextMarker value. */ public String getNextMarker() { @@ -92,7 +92,7 @@ public String getNextMarker() { /** * Set the nextMarker property: The NextMarker property. - * + * * @param nextMarker the nextMarker value to set. * @return the PageList object itself. */ @@ -108,7 +108,7 @@ public XmlWriter toXml(XmlWriter xmlWriter) throws XMLStreamException { @Override public XmlWriter toXml(XmlWriter xmlWriter, String rootElementName) throws XMLStreamException { - rootElementName = CoreUtils.isNullOrEmpty(rootElementName) ? "PageList" : rootElementName; + rootElementName = rootElementName == null || rootElementName.isEmpty() ? "PageList" : rootElementName; xmlWriter.writeStartElement(rootElementName); if (this.pageRange != null) { for (PageRange element : this.pageRange) { @@ -126,7 +126,7 @@ public XmlWriter toXml(XmlWriter xmlWriter, String rootElementName) throws XMLSt /** * Reads an instance of PageList from the XmlReader. - * + * * @param xmlReader The XmlReader being read. * @return An instance of PageList if the XmlReader was pointing to an instance of it, or null if it was pointing to * XML null. @@ -138,7 +138,7 @@ public static PageList fromXml(XmlReader xmlReader) throws XMLStreamException { /** * Reads an instance of PageList from the XmlReader. - * + * * @param xmlReader The XmlReader being read. * @param rootElementName Optional root element name to override the default defined by the model. Used to support * cases where the model can deserialize from different root element names. @@ -147,7 +147,8 @@ public static PageList fromXml(XmlReader xmlReader) throws XMLStreamException { * @throws XMLStreamException If an error occurs while reading the PageList. */ public static PageList fromXml(XmlReader xmlReader, String rootElementName) throws XMLStreamException { - String finalRootElementName = CoreUtils.isNullOrEmpty(rootElementName) ? "PageList" : rootElementName; + String finalRootElementName + = rootElementName == null || rootElementName.isEmpty() ? "PageList" : rootElementName; return xmlReader.readObject(finalRootElementName, reader -> { PageList deserializedPageList = new PageList(); while (reader.nextElement() != XmlToken.END_ELEMENT) { diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/PageRange.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/PageRange.java index 3d55e6cfeaf3..991d9fb4e81e 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/PageRange.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/PageRange.java @@ -4,8 +4,8 @@ package com.azure.v2.storage.blob.models; -import com.azure.v2.core.annotation.Fluent; -import com.azure.v2.core.util.CoreUtils; +import io.clientcore.core.annotations.Metadata; +import io.clientcore.core.annotations.TypeConditions; import io.clientcore.core.serialization.xml.XmlReader; import io.clientcore.core.serialization.xml.XmlSerializable; import io.clientcore.core.serialization.xml.XmlToken; @@ -16,7 +16,7 @@ /** * The PageRange model. */ -@Fluent +@Metadata(conditions = { TypeConditions.FLUENT }) public final class PageRange implements XmlSerializable { /* * The Start property. @@ -36,7 +36,7 @@ public PageRange() { /** * Get the start property: The Start property. - * + * * @return the start value. */ public long getStart() { @@ -45,7 +45,7 @@ public long getStart() { /** * Set the start property: The Start property. - * + * * @param start the start value to set. * @return the PageRange object itself. */ @@ -56,7 +56,7 @@ public PageRange setStart(long start) { /** * Get the end property: The End property. - * + * * @return the end value. */ public long getEnd() { @@ -65,7 +65,7 @@ public long getEnd() { /** * Set the end property: The End property. - * + * * @param end the end value to set. * @return the PageRange object itself. */ @@ -81,7 +81,7 @@ public XmlWriter toXml(XmlWriter xmlWriter) throws XMLStreamException { @Override public XmlWriter toXml(XmlWriter xmlWriter, String rootElementName) throws XMLStreamException { - rootElementName = CoreUtils.isNullOrEmpty(rootElementName) ? "PageRange" : rootElementName; + rootElementName = rootElementName == null || rootElementName.isEmpty() ? "PageRange" : rootElementName; xmlWriter.writeStartElement(rootElementName); xmlWriter.writeLongElement("Start", this.start); xmlWriter.writeLongElement("End", this.end); @@ -90,7 +90,7 @@ 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. @@ -102,7 +102,7 @@ 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. @@ -111,7 +111,8 @@ public static PageRange fromXml(XmlReader xmlReader) throws XMLStreamException { * @throws XMLStreamException If an error occurs while reading the PageRange. */ public static PageRange fromXml(XmlReader xmlReader, String rootElementName) throws XMLStreamException { - String finalRootElementName = CoreUtils.isNullOrEmpty(rootElementName) ? "PageRange" : rootElementName; + String finalRootElementName + = rootElementName == null || rootElementName.isEmpty() ? "PageRange" : rootElementName; return xmlReader.readObject(finalRootElementName, reader -> { PageRange deserializedPageRange = new PageRange(); while (reader.nextElement() != XmlToken.END_ELEMENT) { diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/PremiumPageBlobAccessTier.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/PremiumPageBlobAccessTier.java index 02c44b45f0ae..9d3d8be3eddd 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/PremiumPageBlobAccessTier.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/PremiumPageBlobAccessTier.java @@ -4,9 +4,13 @@ package com.azure.v2.storage.blob.models; -import io.clientcore.core.util.ExpandableEnum; +import io.clientcore.core.utils.ExpandableEnum; +import java.util.ArrayList; +import java.util.Collection; import java.util.Map; +import java.util.Objects; import java.util.concurrent.ConcurrentHashMap; +import java.util.function.Function; /** * Defines values for PremiumPageBlobAccessTier. @@ -14,96 +18,114 @@ public final class PremiumPageBlobAccessTier implements ExpandableEnum { private static final Map VALUES = new ConcurrentHashMap<>(); + private static final Function NEW_INSTANCE = PremiumPageBlobAccessTier::new; + /** * Static value P4 for PremiumPageBlobAccessTier. */ - public static final PremiumPageBlobAccessTier P4 = fromString("P4"); + public static final PremiumPageBlobAccessTier P4 = fromValue("P4"); /** * Static value P6 for PremiumPageBlobAccessTier. */ - public static final PremiumPageBlobAccessTier P6 = fromString("P6"); + public static final PremiumPageBlobAccessTier P6 = fromValue("P6"); /** * Static value P10 for PremiumPageBlobAccessTier. */ - public static final PremiumPageBlobAccessTier P10 = fromString("P10"); + public static final PremiumPageBlobAccessTier P10 = fromValue("P10"); /** * Static value P15 for PremiumPageBlobAccessTier. */ - public static final PremiumPageBlobAccessTier P15 = fromString("P15"); + public static final PremiumPageBlobAccessTier P15 = fromValue("P15"); /** * Static value P20 for PremiumPageBlobAccessTier. */ - public static final PremiumPageBlobAccessTier P20 = fromString("P20"); + public static final PremiumPageBlobAccessTier P20 = fromValue("P20"); /** * Static value P30 for PremiumPageBlobAccessTier. */ - public static final PremiumPageBlobAccessTier P30 = fromString("P30"); + public static final PremiumPageBlobAccessTier P30 = fromValue("P30"); /** * Static value P40 for PremiumPageBlobAccessTier. */ - public static final PremiumPageBlobAccessTier P40 = fromString("P40"); + public static final PremiumPageBlobAccessTier P40 = fromValue("P40"); /** * Static value P50 for PremiumPageBlobAccessTier. */ - public static final PremiumPageBlobAccessTier P50 = fromString("P50"); + public static final PremiumPageBlobAccessTier P50 = fromValue("P50"); /** * Static value P60 for PremiumPageBlobAccessTier. */ - public static final PremiumPageBlobAccessTier P60 = fromString("P60"); + public static final PremiumPageBlobAccessTier P60 = fromValue("P60"); /** * Static value P70 for PremiumPageBlobAccessTier. */ - public static final PremiumPageBlobAccessTier P70 = fromString("P70"); + public static final PremiumPageBlobAccessTier P70 = fromValue("P70"); /** * Static value P80 for PremiumPageBlobAccessTier. */ - public static final PremiumPageBlobAccessTier P80 = fromString("P80"); + public static final PremiumPageBlobAccessTier P80 = fromValue("P80"); - private final String name; + private final String value; - private PremiumPageBlobAccessTier(String name) { - this.name = name; + private PremiumPageBlobAccessTier(String value) { + this.value = value; } /** * Creates or finds a PremiumPageBlobAccessTier. - * - * @param name a name to look for. + * + * @param value a value to look for. * @return the corresponding PremiumPageBlobAccessTier. + * @throws IllegalArgumentException if value is null. */ - public static PremiumPageBlobAccessTier fromString(String name) { - if (name == null) { - return null; - } - PremiumPageBlobAccessTier value = VALUES.get(name); - if (value != null) { - return value; + public static PremiumPageBlobAccessTier fromValue(String value) { + if (value == null) { + throw new IllegalArgumentException("'value' cannot be null."); } - return VALUES.computeIfAbsent(name, key -> new PremiumPageBlobAccessTier(key)); + return VALUES.computeIfAbsent(value, NEW_INSTANCE); + } + + /** + * Gets known PremiumPageBlobAccessTier values. + * + * @return Known PremiumPageBlobAccessTier values. + */ + public static Collection values() { + return new ArrayList<>(VALUES.values()); } /** * Gets the value of the PremiumPageBlobAccessTier instance. - * + * * @return the value of the PremiumPageBlobAccessTier instance. */ @Override public String getValue() { - return this.name; + return this.value; } @Override public String toString() { - return name; + return Objects.toString(this.value); + } + + @Override + public boolean equals(Object obj) { + return this == obj; + } + + @Override + public int hashCode() { + return Objects.hashCode(this.value); } } diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/PublicAccessType.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/PublicAccessType.java index 594696d59943..a814cd11495f 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/PublicAccessType.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/PublicAccessType.java @@ -4,9 +4,13 @@ package com.azure.v2.storage.blob.models; -import io.clientcore.core.util.ExpandableEnum; +import io.clientcore.core.utils.ExpandableEnum; +import java.util.ArrayList; +import java.util.Collection; import java.util.Map; +import java.util.Objects; import java.util.concurrent.ConcurrentHashMap; +import java.util.function.Function; /** * Defines values for PublicAccessType. @@ -14,51 +18,69 @@ public final class PublicAccessType implements ExpandableEnum { private static final Map VALUES = new ConcurrentHashMap<>(); + private static final Function NEW_INSTANCE = PublicAccessType::new; + /** * Static value container for PublicAccessType. */ - public static final PublicAccessType CONTAINER = fromString("container"); + public static final PublicAccessType CONTAINER = fromValue("container"); /** * Static value blob for PublicAccessType. */ - public static final PublicAccessType BLOB = fromString("blob"); + public static final PublicAccessType BLOB = fromValue("blob"); - private final String name; + private final String value; - private PublicAccessType(String name) { - this.name = name; + private PublicAccessType(String value) { + this.value = value; } /** * Creates or finds a PublicAccessType. - * - * @param name a name to look for. + * + * @param value a value to look for. * @return the corresponding PublicAccessType. + * @throws IllegalArgumentException if value is null. */ - public static PublicAccessType fromString(String name) { - if (name == null) { - return null; - } - PublicAccessType value = VALUES.get(name); - if (value != null) { - return value; + public static PublicAccessType fromValue(String value) { + if (value == null) { + throw new IllegalArgumentException("'value' cannot be null."); } - return VALUES.computeIfAbsent(name, key -> new PublicAccessType(key)); + return VALUES.computeIfAbsent(value, NEW_INSTANCE); + } + + /** + * Gets known PublicAccessType values. + * + * @return Known PublicAccessType values. + */ + public static Collection values() { + return new ArrayList<>(VALUES.values()); } /** * Gets the value of the PublicAccessType instance. - * + * * @return the value of the PublicAccessType instance. */ @Override public String getValue() { - return this.name; + return this.value; } @Override public String toString() { - return name; + return Objects.toString(this.value); + } + + @Override + public boolean equals(Object obj) { + return this == obj; + } + + @Override + public int hashCode() { + return Objects.hashCode(this.value); } } diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/QueryFormat.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/QueryFormat.java index 06fa332a9162..65328eabb98d 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/QueryFormat.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/QueryFormat.java @@ -4,8 +4,8 @@ package com.azure.v2.storage.blob.models; -import com.azure.v2.core.annotation.Fluent; -import com.azure.v2.core.util.CoreUtils; +import io.clientcore.core.annotations.Metadata; +import io.clientcore.core.annotations.TypeConditions; import io.clientcore.core.serialization.xml.XmlReader; import io.clientcore.core.serialization.xml.XmlSerializable; import io.clientcore.core.serialization.xml.XmlToken; @@ -16,7 +16,7 @@ /** * The QueryFormat model. */ -@Fluent +@Metadata(conditions = { TypeConditions.FLUENT }) public final class QueryFormat implements XmlSerializable { /* * The quick query format type. @@ -51,7 +51,7 @@ public QueryFormat() { /** * Get the type property: The quick query format type. - * + * * @return the type value. */ public QueryFormatType getType() { @@ -60,7 +60,7 @@ public QueryFormatType getType() { /** * Set the type property: The quick query format type. - * + * * @param type the type value to set. * @return the QueryFormat object itself. */ @@ -72,7 +72,7 @@ public QueryFormat setType(QueryFormatType type) { /** * Get the delimitedTextConfiguration property: Groups the settings used for interpreting the blob data if the blob * is delimited text formatted. - * + * * @return the delimitedTextConfiguration value. */ public DelimitedTextConfiguration getDelimitedTextConfiguration() { @@ -82,7 +82,7 @@ public DelimitedTextConfiguration getDelimitedTextConfiguration() { /** * Set the delimitedTextConfiguration property: Groups the settings used for interpreting the blob data if the blob * is delimited text formatted. - * + * * @param delimitedTextConfiguration the delimitedTextConfiguration value to set. * @return the QueryFormat object itself. */ @@ -93,7 +93,7 @@ public QueryFormat setDelimitedTextConfiguration(DelimitedTextConfiguration deli /** * Get the jsonTextConfiguration property: json text configuration. - * + * * @return the jsonTextConfiguration value. */ public JsonTextConfiguration getJsonTextConfiguration() { @@ -102,7 +102,7 @@ public JsonTextConfiguration getJsonTextConfiguration() { /** * Set the jsonTextConfiguration property: json text configuration. - * + * * @param jsonTextConfiguration the jsonTextConfiguration value to set. * @return the QueryFormat object itself. */ @@ -114,7 +114,7 @@ public QueryFormat setJsonTextConfiguration(JsonTextConfiguration jsonTextConfig /** * Get the arrowConfiguration property: Groups the settings used for formatting the response if the response should * be Arrow formatted. - * + * * @return the arrowConfiguration value. */ public ArrowConfiguration getArrowConfiguration() { @@ -124,7 +124,7 @@ public ArrowConfiguration getArrowConfiguration() { /** * Set the arrowConfiguration property: Groups the settings used for formatting the response if the response should * be Arrow formatted. - * + * * @param arrowConfiguration the arrowConfiguration value to set. * @return the QueryFormat object itself. */ @@ -135,7 +135,7 @@ public QueryFormat setArrowConfiguration(ArrowConfiguration arrowConfiguration) /** * Get the parquetTextConfiguration property: parquet configuration. - * + * * @return the parquetTextConfiguration value. */ public Object getParquetTextConfiguration() { @@ -144,7 +144,7 @@ public Object getParquetTextConfiguration() { /** * Set the parquetTextConfiguration property: parquet configuration. - * + * * @param parquetTextConfiguration the parquetTextConfiguration value to set. * @return the QueryFormat object itself. */ @@ -160,7 +160,7 @@ public XmlWriter toXml(XmlWriter xmlWriter) throws XMLStreamException { @Override public XmlWriter toXml(XmlWriter xmlWriter, String rootElementName) throws XMLStreamException { - rootElementName = CoreUtils.isNullOrEmpty(rootElementName) ? "QueryFormat" : rootElementName; + rootElementName = rootElementName == null || rootElementName.isEmpty() ? "QueryFormat" : rootElementName; xmlWriter.writeStartElement(rootElementName); xmlWriter.writeStringElement("Type", this.type == null ? null : this.type.toString()); xmlWriter.writeXml(this.delimitedTextConfiguration, "DelimitedTextConfiguration"); @@ -172,7 +172,7 @@ public XmlWriter toXml(XmlWriter xmlWriter, String rootElementName) throws XMLSt /** * Reads an instance of QueryFormat from the XmlReader. - * + * * @param xmlReader The XmlReader being read. * @return An instance of QueryFormat if the XmlReader was pointing to an instance of it, or null if it was pointing * to XML null. @@ -184,7 +184,7 @@ public static QueryFormat fromXml(XmlReader xmlReader) throws XMLStreamException /** * Reads an instance of QueryFormat from the XmlReader. - * + * * @param xmlReader The XmlReader being read. * @param rootElementName Optional root element name to override the default defined by the model. Used to support * cases where the model can deserialize from different root element names. @@ -193,7 +193,8 @@ public static QueryFormat fromXml(XmlReader xmlReader) throws XMLStreamException * @throws XMLStreamException If an error occurs while reading the QueryFormat. */ public static QueryFormat fromXml(XmlReader xmlReader, String rootElementName) throws XMLStreamException { - String finalRootElementName = CoreUtils.isNullOrEmpty(rootElementName) ? "QueryFormat" : rootElementName; + String finalRootElementName + = rootElementName == null || rootElementName.isEmpty() ? "QueryFormat" : rootElementName; return xmlReader.readObject(finalRootElementName, reader -> { QueryFormat deserializedQueryFormat = new QueryFormat(); while (reader.nextElement() != XmlToken.END_ELEMENT) { diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/QueryFormatType.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/QueryFormatType.java index 601bbc6f1de7..2f223abde826 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/QueryFormatType.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/QueryFormatType.java @@ -39,7 +39,7 @@ public enum QueryFormatType { /** * Parses a serialized value to a QueryFormatType instance. - * + * * @param value the serialized value to parse. * @return the parsed QueryFormatType object, or null if unable to parse. */ diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/QueryRequest.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/QueryRequest.java index ce29f48f6232..56190cd82d86 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/QueryRequest.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/QueryRequest.java @@ -4,8 +4,8 @@ package com.azure.v2.storage.blob.models; -import com.azure.v2.core.annotation.Fluent; -import com.azure.v2.core.util.CoreUtils; +import io.clientcore.core.annotations.Metadata; +import io.clientcore.core.annotations.TypeConditions; import io.clientcore.core.serialization.xml.XmlReader; import io.clientcore.core.serialization.xml.XmlSerializable; import io.clientcore.core.serialization.xml.XmlToken; @@ -16,12 +16,12 @@ /** * Groups the set of query request settings. */ -@Fluent +@Metadata(conditions = { TypeConditions.FLUENT }) public final class QueryRequest implements XmlSerializable { /* * Required. The type of the provided query expression. */ - private String queryType = "SQL"; + private final String queryType = "SQL"; /* * The query expression in SQL. The maximum size of the query expression is 256KiB. @@ -46,27 +46,16 @@ public QueryRequest() { /** * Get the queryType property: Required. The type of the provided query expression. - * + * * @return the queryType value. */ public String getQueryType() { return this.queryType; } - /** - * 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; - } - /** * Get the expression property: The query expression in SQL. The maximum size of the query expression is 256KiB. - * + * * @return the expression value. */ public String getExpression() { @@ -75,7 +64,7 @@ public String getExpression() { /** * Set the expression property: The query expression in SQL. The maximum size of the query expression is 256KiB. - * + * * @param expression the expression value to set. * @return the QueryRequest object itself. */ @@ -86,7 +75,7 @@ public QueryRequest setExpression(String expression) { /** * Get the inputSerialization property: The InputSerialization property. - * + * * @return the inputSerialization value. */ public QuerySerialization getInputSerialization() { @@ -95,7 +84,7 @@ public QuerySerialization getInputSerialization() { /** * Set the inputSerialization property: The InputSerialization property. - * + * * @param inputSerialization the inputSerialization value to set. * @return the QueryRequest object itself. */ @@ -106,7 +95,7 @@ public QueryRequest setInputSerialization(QuerySerialization inputSerialization) /** * Get the outputSerialization property: The OutputSerialization property. - * + * * @return the outputSerialization value. */ public QuerySerialization getOutputSerialization() { @@ -115,7 +104,7 @@ public QuerySerialization getOutputSerialization() { /** * Set the outputSerialization property: The OutputSerialization property. - * + * * @param outputSerialization the outputSerialization value to set. * @return the QueryRequest object itself. */ @@ -131,7 +120,7 @@ public XmlWriter toXml(XmlWriter xmlWriter) throws XMLStreamException { @Override public XmlWriter toXml(XmlWriter xmlWriter, String rootElementName) throws XMLStreamException { - rootElementName = CoreUtils.isNullOrEmpty(rootElementName) ? "QueryRequest" : rootElementName; + rootElementName = rootElementName == null || rootElementName.isEmpty() ? "QueryRequest" : rootElementName; xmlWriter.writeStartElement(rootElementName); xmlWriter.writeStringElement("QueryType", this.queryType); xmlWriter.writeStringElement("Expression", this.expression); @@ -142,7 +131,7 @@ 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. @@ -154,7 +143,7 @@ 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. @@ -163,15 +152,14 @@ public static QueryRequest fromXml(XmlReader xmlReader) throws XMLStreamExceptio * @throws XMLStreamException If an error occurs while reading the QueryRequest. */ public static QueryRequest fromXml(XmlReader xmlReader, String rootElementName) throws XMLStreamException { - String finalRootElementName = CoreUtils.isNullOrEmpty(rootElementName) ? "QueryRequest" : rootElementName; + String finalRootElementName + = rootElementName == null || rootElementName.isEmpty() ? "QueryRequest" : rootElementName; return xmlReader.readObject(finalRootElementName, reader -> { QueryRequest deserializedQueryRequest = new QueryRequest(); while (reader.nextElement() != XmlToken.END_ELEMENT) { QName elementName = reader.getElementName(); - if ("QueryType".equals(elementName.getLocalPart())) { - deserializedQueryRequest.queryType = reader.getStringElement(); - } else if ("Expression".equals(elementName.getLocalPart())) { + if ("Expression".equals(elementName.getLocalPart())) { deserializedQueryRequest.expression = reader.getStringElement(); } else if ("InputSerialization".equals(elementName.getLocalPart())) { deserializedQueryRequest.inputSerialization diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/QuerySerialization.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/QuerySerialization.java index e22d78d6adf5..040a1ecda0f5 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/QuerySerialization.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/QuerySerialization.java @@ -4,8 +4,8 @@ package com.azure.v2.storage.blob.models; -import com.azure.v2.core.annotation.Fluent; -import com.azure.v2.core.util.CoreUtils; +import io.clientcore.core.annotations.Metadata; +import io.clientcore.core.annotations.TypeConditions; import io.clientcore.core.serialization.xml.XmlReader; import io.clientcore.core.serialization.xml.XmlSerializable; import io.clientcore.core.serialization.xml.XmlToken; @@ -16,7 +16,7 @@ /** * The QuerySerialization model. */ -@Fluent +@Metadata(conditions = { TypeConditions.FLUENT }) public final class QuerySerialization implements XmlSerializable { /* * The Format property. @@ -31,7 +31,7 @@ public QuerySerialization() { /** * Get the format property: The Format property. - * + * * @return the format value. */ public QueryFormat getFormat() { @@ -40,7 +40,7 @@ public QueryFormat getFormat() { /** * Set the format property: The Format property. - * + * * @param format the format value to set. * @return the QuerySerialization object itself. */ @@ -56,7 +56,7 @@ public XmlWriter toXml(XmlWriter xmlWriter) throws XMLStreamException { @Override public XmlWriter toXml(XmlWriter xmlWriter, String rootElementName) throws XMLStreamException { - rootElementName = CoreUtils.isNullOrEmpty(rootElementName) ? "QuerySerialization" : rootElementName; + rootElementName = rootElementName == null || rootElementName.isEmpty() ? "QuerySerialization" : rootElementName; xmlWriter.writeStartElement(rootElementName); xmlWriter.writeXml(this.format, "Format"); return xmlWriter.writeEndElement(); @@ -64,7 +64,7 @@ public XmlWriter toXml(XmlWriter xmlWriter, String rootElementName) throws XMLSt /** * Reads an instance of QuerySerialization from the XmlReader. - * + * * @param xmlReader The XmlReader being read. * @return An instance of QuerySerialization if the XmlReader was pointing to an instance of it, or null if it was * pointing to XML null. @@ -76,7 +76,7 @@ public static QuerySerialization fromXml(XmlReader xmlReader) throws XMLStreamEx /** * Reads an instance of QuerySerialization from the XmlReader. - * + * * @param xmlReader The XmlReader being read. * @param rootElementName Optional root element name to override the default defined by the model. Used to support * cases where the model can deserialize from different root element names. @@ -85,7 +85,8 @@ public static QuerySerialization fromXml(XmlReader xmlReader) throws XMLStreamEx * @throws XMLStreamException If an error occurs while reading the QuerySerialization. */ public static QuerySerialization fromXml(XmlReader xmlReader, String rootElementName) throws XMLStreamException { - String finalRootElementName = CoreUtils.isNullOrEmpty(rootElementName) ? "QuerySerialization" : rootElementName; + String finalRootElementName + = rootElementName == null || rootElementName.isEmpty() ? "QuerySerialization" : rootElementName; return xmlReader.readObject(finalRootElementName, reader -> { QuerySerialization deserializedQuerySerialization = new QuerySerialization(); while (reader.nextElement() != XmlToken.END_ELEMENT) { diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/RehydratePriority.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/RehydratePriority.java index 29e9d7967b8d..013f73d60240 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/RehydratePriority.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/RehydratePriority.java @@ -4,9 +4,13 @@ package com.azure.v2.storage.blob.models; -import io.clientcore.core.util.ExpandableEnum; +import io.clientcore.core.utils.ExpandableEnum; +import java.util.ArrayList; +import java.util.Collection; import java.util.Map; +import java.util.Objects; import java.util.concurrent.ConcurrentHashMap; +import java.util.function.Function; /** * If an object is in rehydrate pending state then this header is returned with priority of rehydrate. Valid values are @@ -15,51 +19,69 @@ public final class RehydratePriority implements ExpandableEnum { private static final Map VALUES = new ConcurrentHashMap<>(); + private static final Function NEW_INSTANCE = RehydratePriority::new; + /** * Static value High for RehydratePriority. */ - public static final RehydratePriority HIGH = fromString("High"); + public static final RehydratePriority HIGH = fromValue("High"); /** * Static value Standard for RehydratePriority. */ - public static final RehydratePriority STANDARD = fromString("Standard"); + public static final RehydratePriority STANDARD = fromValue("Standard"); - private final String name; + private final String value; - private RehydratePriority(String name) { - this.name = name; + private RehydratePriority(String value) { + this.value = value; } /** * Creates or finds a RehydratePriority. - * - * @param name a name to look for. + * + * @param value a value to look for. * @return the corresponding RehydratePriority. + * @throws IllegalArgumentException if value is null. */ - public static RehydratePriority fromString(String name) { - if (name == null) { - return null; - } - RehydratePriority value = VALUES.get(name); - if (value != null) { - return value; + public static RehydratePriority fromValue(String value) { + if (value == null) { + throw new IllegalArgumentException("'value' cannot be null."); } - return VALUES.computeIfAbsent(name, key -> new RehydratePriority(key)); + return VALUES.computeIfAbsent(value, NEW_INSTANCE); + } + + /** + * Gets known RehydratePriority values. + * + * @return Known RehydratePriority values. + */ + public static Collection values() { + return new ArrayList<>(VALUES.values()); } /** * Gets the value of the RehydratePriority instance. - * + * * @return the value of the RehydratePriority instance. */ @Override public String getValue() { - return this.name; + return this.value; } @Override public String toString() { - return name; + return Objects.toString(this.value); + } + + @Override + public boolean equals(Object obj) { + return this == obj; + } + + @Override + public int hashCode() { + return Objects.hashCode(this.value); } } diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/SequenceNumberActionType.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/SequenceNumberActionType.java index b965e4cad121..fa214119b30c 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/SequenceNumberActionType.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/SequenceNumberActionType.java @@ -34,7 +34,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-v2/src/main/java/com/azure/v2/storage/blob/models/ServicesFilterBlobsHeaders.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ServicesFilterBlobsHeaders.java index c8004e38d0bb..dc4c6642d576 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ServicesFilterBlobsHeaders.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ServicesFilterBlobsHeaders.java @@ -4,17 +4,17 @@ package com.azure.v2.storage.blob.models; -import com.azure.v2.core.annotation.Fluent; -import io.clientcore.core.util.DateTimeRfc1123; +import io.clientcore.core.annotations.Metadata; +import io.clientcore.core.annotations.TypeConditions; import io.clientcore.core.http.models.HttpHeaderName; import io.clientcore.core.http.models.HttpHeaders; - +import io.clientcore.core.utils.DateTimeRfc1123; import java.time.OffsetDateTime; /** * The ServicesFilterBlobsHeaders model. */ -@Fluent +@Metadata(conditions = { TypeConditions.FLUENT }) public final class ServicesFilterBlobsHeaders { /* * The x-ms-version property. @@ -38,16 +38,20 @@ public final class ServicesFilterBlobsHeaders { private static final HttpHeaderName X_MS_VERSION = HttpHeaderName.fromString("x-ms-version"); + private static final HttpHeaderName X_MS_REQUEST_ID = HttpHeaderName.fromString("x-ms-request-id"); + + private static final HttpHeaderName X_MS_CLIENT_REQUEST_ID = HttpHeaderName.fromString("x-ms-client-request-id"); + // HttpHeaders containing the raw property values. /** * Creates an instance of ServicesFilterBlobsHeaders class. - * + * * @param rawHeaders The raw HttpHeaders that will be used to create the property values. */ public ServicesFilterBlobsHeaders(HttpHeaders rawHeaders) { this.xMsVersion = rawHeaders.getValue(X_MS_VERSION); - this.xMsRequestId = rawHeaders.getValue(HttpHeaderName.fromString("x-ms-request-id")); - this.xMsClientRequestId = rawHeaders.getValue(HttpHeaderName.fromString("x-ms-client-request-id")); + this.xMsRequestId = rawHeaders.getValue(X_MS_REQUEST_ID); + this.xMsClientRequestId = rawHeaders.getValue(X_MS_CLIENT_REQUEST_ID); String date = rawHeaders.getValue(HttpHeaderName.DATE); if (date != null) { this.date = new DateTimeRfc1123(date); @@ -56,7 +60,7 @@ public ServicesFilterBlobsHeaders(HttpHeaders rawHeaders) { /** * Get the xMsVersion property: The x-ms-version property. - * + * * @return the xMsVersion value. */ public String getXMsVersion() { @@ -65,7 +69,7 @@ public String getXMsVersion() { /** * Set the xMsVersion property: The x-ms-version property. - * + * * @param xMsVersion the xMsVersion value to set. * @return the ServicesFilterBlobsHeaders object itself. */ @@ -76,7 +80,7 @@ public ServicesFilterBlobsHeaders setXMsVersion(String xMsVersion) { /** * Get the xMsRequestId property: The x-ms-request-id property. - * + * * @return the xMsRequestId value. */ public String getXMsRequestId() { @@ -85,7 +89,7 @@ public String getXMsRequestId() { /** * Set the xMsRequestId property: The x-ms-request-id property. - * + * * @param xMsRequestId the xMsRequestId value to set. * @return the ServicesFilterBlobsHeaders object itself. */ @@ -96,7 +100,7 @@ public ServicesFilterBlobsHeaders setXMsRequestId(String xMsRequestId) { /** * Get the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @return the xMsClientRequestId value. */ public String getXMsClientRequestId() { @@ -105,7 +109,7 @@ public String getXMsClientRequestId() { /** * Set the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @param xMsClientRequestId the xMsClientRequestId value to set. * @return the ServicesFilterBlobsHeaders object itself. */ @@ -116,7 +120,7 @@ public ServicesFilterBlobsHeaders setXMsClientRequestId(String xMsClientRequestI /** * Get the date property: The Date property. - * + * * @return the date value. */ public OffsetDateTime getDate() { @@ -128,7 +132,7 @@ public OffsetDateTime getDate() { /** * Set the date property: The Date property. - * + * * @param date the date value to set. * @return the ServicesFilterBlobsHeaders object itself. */ diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ServicesGetAccountInfoHeaders.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ServicesGetAccountInfoHeaders.java index f86de2d04353..a9702f036e04 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ServicesGetAccountInfoHeaders.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ServicesGetAccountInfoHeaders.java @@ -4,17 +4,17 @@ package com.azure.v2.storage.blob.models; -import com.azure.v2.core.annotation.Fluent; -import io.clientcore.core.util.DateTimeRfc1123; +import io.clientcore.core.annotations.Metadata; +import io.clientcore.core.annotations.TypeConditions; import io.clientcore.core.http.models.HttpHeaderName; import io.clientcore.core.http.models.HttpHeaders; - +import io.clientcore.core.utils.DateTimeRfc1123; import java.time.OffsetDateTime; /** * The ServicesGetAccountInfoHeaders model. */ -@Fluent +@Metadata(conditions = { TypeConditions.FLUENT }) public final class ServicesGetAccountInfoHeaders { /* * The x-ms-version property. @@ -59,10 +59,14 @@ public final class ServicesGetAccountInfoHeaders { private static final HttpHeaderName X_MS_SKU_NAME = HttpHeaderName.fromString("x-ms-sku-name"); + private static final HttpHeaderName X_MS_REQUEST_ID = HttpHeaderName.fromString("x-ms-request-id"); + + private static final HttpHeaderName X_MS_CLIENT_REQUEST_ID = HttpHeaderName.fromString("x-ms-client-request-id"); + // HttpHeaders containing the raw property values. /** * Creates an instance of ServicesGetAccountInfoHeaders class. - * + * * @param rawHeaders The raw HttpHeaders that will be used to create the property values. */ public ServicesGetAccountInfoHeaders(HttpHeaders rawHeaders) { @@ -79,8 +83,8 @@ public ServicesGetAccountInfoHeaders(HttpHeaders rawHeaders) { if (xMsSkuName != null) { this.xMsSkuName = SkuName.fromString(xMsSkuName); } - this.xMsRequestId = rawHeaders.getValue(HttpHeaderName.fromString("x-ms-request-id")); - this.xMsClientRequestId = rawHeaders.getValue(HttpHeaderName.fromString("x-ms-client-request-id")); + this.xMsRequestId = rawHeaders.getValue(X_MS_REQUEST_ID); + this.xMsClientRequestId = rawHeaders.getValue(X_MS_CLIENT_REQUEST_ID); String date = rawHeaders.getValue(HttpHeaderName.DATE); if (date != null) { this.date = new DateTimeRfc1123(date); @@ -89,7 +93,7 @@ public ServicesGetAccountInfoHeaders(HttpHeaders rawHeaders) { /** * Get the xMsVersion property: The x-ms-version property. - * + * * @return the xMsVersion value. */ public String getXMsVersion() { @@ -98,7 +102,7 @@ public String getXMsVersion() { /** * Set the xMsVersion property: The x-ms-version property. - * + * * @param xMsVersion the xMsVersion value to set. * @return the ServicesGetAccountInfoHeaders object itself. */ @@ -109,7 +113,7 @@ public ServicesGetAccountInfoHeaders setXMsVersion(String xMsVersion) { /** * Get the xMsAccountKind property: The x-ms-account-kind property. - * + * * @return the xMsAccountKind value. */ public AccountKind getXMsAccountKind() { @@ -118,7 +122,7 @@ public AccountKind getXMsAccountKind() { /** * Set the xMsAccountKind property: The x-ms-account-kind property. - * + * * @param xMsAccountKind the xMsAccountKind value to set. * @return the ServicesGetAccountInfoHeaders object itself. */ @@ -129,7 +133,7 @@ public ServicesGetAccountInfoHeaders setXMsAccountKind(AccountKind xMsAccountKin /** * Get the xMsIsHnsEnabled property: The x-ms-is-hns-enabled property. - * + * * @return the xMsIsHnsEnabled value. */ public Boolean isXMsIsHnsEnabled() { @@ -138,7 +142,7 @@ public Boolean isXMsIsHnsEnabled() { /** * Set the xMsIsHnsEnabled property: The x-ms-is-hns-enabled property. - * + * * @param xMsIsHnsEnabled the xMsIsHnsEnabled value to set. * @return the ServicesGetAccountInfoHeaders object itself. */ @@ -149,7 +153,7 @@ public ServicesGetAccountInfoHeaders setXMsIsHnsEnabled(Boolean xMsIsHnsEnabled) /** * Get the xMsSkuName property: The x-ms-sku-name property. - * + * * @return the xMsSkuName value. */ public SkuName getXMsSkuName() { @@ -158,7 +162,7 @@ public SkuName getXMsSkuName() { /** * Set the xMsSkuName property: The x-ms-sku-name property. - * + * * @param xMsSkuName the xMsSkuName value to set. * @return the ServicesGetAccountInfoHeaders object itself. */ @@ -169,7 +173,7 @@ public ServicesGetAccountInfoHeaders setXMsSkuName(SkuName xMsSkuName) { /** * Get the xMsRequestId property: The x-ms-request-id property. - * + * * @return the xMsRequestId value. */ public String getXMsRequestId() { @@ -178,7 +182,7 @@ public String getXMsRequestId() { /** * Set the xMsRequestId property: The x-ms-request-id property. - * + * * @param xMsRequestId the xMsRequestId value to set. * @return the ServicesGetAccountInfoHeaders object itself. */ @@ -189,7 +193,7 @@ public ServicesGetAccountInfoHeaders setXMsRequestId(String xMsRequestId) { /** * Get the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @return the xMsClientRequestId value. */ public String getXMsClientRequestId() { @@ -198,7 +202,7 @@ public String getXMsClientRequestId() { /** * Set the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @param xMsClientRequestId the xMsClientRequestId value to set. * @return the ServicesGetAccountInfoHeaders object itself. */ @@ -209,7 +213,7 @@ public ServicesGetAccountInfoHeaders setXMsClientRequestId(String xMsClientReque /** * Get the date property: The Date property. - * + * * @return the date value. */ public OffsetDateTime getDate() { @@ -221,7 +225,7 @@ public OffsetDateTime getDate() { /** * Set the date property: The Date property. - * + * * @param date the date value to set. * @return the ServicesGetAccountInfoHeaders object itself. */ diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ServicesGetPropertiesHeaders.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ServicesGetPropertiesHeaders.java index 067033ee40a7..f7072f065c35 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ServicesGetPropertiesHeaders.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ServicesGetPropertiesHeaders.java @@ -4,14 +4,15 @@ package com.azure.v2.storage.blob.models; -import com.azure.v2.core.annotation.Fluent; +import io.clientcore.core.annotations.Metadata; +import io.clientcore.core.annotations.TypeConditions; import io.clientcore.core.http.models.HttpHeaderName; import io.clientcore.core.http.models.HttpHeaders; /** * The ServicesGetPropertiesHeaders model. */ -@Fluent +@Metadata(conditions = { TypeConditions.FLUENT }) public final class ServicesGetPropertiesHeaders { /* * The x-ms-version property. @@ -30,21 +31,25 @@ public final class ServicesGetPropertiesHeaders { private static final HttpHeaderName X_MS_VERSION = HttpHeaderName.fromString("x-ms-version"); + private static final HttpHeaderName X_MS_REQUEST_ID = HttpHeaderName.fromString("x-ms-request-id"); + + private static final HttpHeaderName X_MS_CLIENT_REQUEST_ID = HttpHeaderName.fromString("x-ms-client-request-id"); + // HttpHeaders containing the raw property values. /** * Creates an instance of ServicesGetPropertiesHeaders class. - * + * * @param rawHeaders The raw HttpHeaders that will be used to create the property values. */ public ServicesGetPropertiesHeaders(HttpHeaders rawHeaders) { this.xMsVersion = rawHeaders.getValue(X_MS_VERSION); - this.xMsRequestId = rawHeaders.getValue(HttpHeaderName.fromString("x-ms-request-id")); - this.xMsClientRequestId = rawHeaders.getValue(HttpHeaderName.fromString("x-ms-client-request-id")); + this.xMsRequestId = rawHeaders.getValue(X_MS_REQUEST_ID); + this.xMsClientRequestId = rawHeaders.getValue(X_MS_CLIENT_REQUEST_ID); } /** * Get the xMsVersion property: The x-ms-version property. - * + * * @return the xMsVersion value. */ public String getXMsVersion() { @@ -53,7 +58,7 @@ public String getXMsVersion() { /** * Set the xMsVersion property: The x-ms-version property. - * + * * @param xMsVersion the xMsVersion value to set. * @return the ServicesGetPropertiesHeaders object itself. */ @@ -64,7 +69,7 @@ public ServicesGetPropertiesHeaders setXMsVersion(String xMsVersion) { /** * Get the xMsRequestId property: The x-ms-request-id property. - * + * * @return the xMsRequestId value. */ public String getXMsRequestId() { @@ -73,7 +78,7 @@ public String getXMsRequestId() { /** * Set the xMsRequestId property: The x-ms-request-id property. - * + * * @param xMsRequestId the xMsRequestId value to set. * @return the ServicesGetPropertiesHeaders object itself. */ @@ -84,7 +89,7 @@ public ServicesGetPropertiesHeaders setXMsRequestId(String xMsRequestId) { /** * Get the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @return the xMsClientRequestId value. */ public String getXMsClientRequestId() { @@ -93,7 +98,7 @@ public String getXMsClientRequestId() { /** * Set the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @param xMsClientRequestId the xMsClientRequestId value to set. * @return the ServicesGetPropertiesHeaders object itself. */ diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ServicesGetStatisticsHeaders.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ServicesGetStatisticsHeaders.java index 5f6fe015df55..1e620bcce2b6 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ServicesGetStatisticsHeaders.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ServicesGetStatisticsHeaders.java @@ -4,17 +4,17 @@ package com.azure.v2.storage.blob.models; -import com.azure.v2.core.annotation.Fluent; -import io.clientcore.core.util.DateTimeRfc1123; +import io.clientcore.core.annotations.Metadata; +import io.clientcore.core.annotations.TypeConditions; import io.clientcore.core.http.models.HttpHeaderName; import io.clientcore.core.http.models.HttpHeaders; - +import io.clientcore.core.utils.DateTimeRfc1123; import java.time.OffsetDateTime; /** * The ServicesGetStatisticsHeaders model. */ -@Fluent +@Metadata(conditions = { TypeConditions.FLUENT }) public final class ServicesGetStatisticsHeaders { /* * The x-ms-version property. @@ -38,16 +38,20 @@ public final class ServicesGetStatisticsHeaders { private static final HttpHeaderName X_MS_VERSION = HttpHeaderName.fromString("x-ms-version"); + private static final HttpHeaderName X_MS_REQUEST_ID = HttpHeaderName.fromString("x-ms-request-id"); + + private static final HttpHeaderName X_MS_CLIENT_REQUEST_ID = HttpHeaderName.fromString("x-ms-client-request-id"); + // HttpHeaders containing the raw property values. /** * Creates an instance of ServicesGetStatisticsHeaders class. - * + * * @param rawHeaders The raw HttpHeaders that will be used to create the property values. */ public ServicesGetStatisticsHeaders(HttpHeaders rawHeaders) { this.xMsVersion = rawHeaders.getValue(X_MS_VERSION); - this.xMsRequestId = rawHeaders.getValue(HttpHeaderName.fromString("x-ms-request-id")); - this.xMsClientRequestId = rawHeaders.getValue(HttpHeaderName.fromString("x-ms-client-request-id")); + this.xMsRequestId = rawHeaders.getValue(X_MS_REQUEST_ID); + this.xMsClientRequestId = rawHeaders.getValue(X_MS_CLIENT_REQUEST_ID); String date = rawHeaders.getValue(HttpHeaderName.DATE); if (date != null) { this.date = new DateTimeRfc1123(date); @@ -56,7 +60,7 @@ public ServicesGetStatisticsHeaders(HttpHeaders rawHeaders) { /** * Get the xMsVersion property: The x-ms-version property. - * + * * @return the xMsVersion value. */ public String getXMsVersion() { @@ -65,7 +69,7 @@ public String getXMsVersion() { /** * Set the xMsVersion property: The x-ms-version property. - * + * * @param xMsVersion the xMsVersion value to set. * @return the ServicesGetStatisticsHeaders object itself. */ @@ -76,7 +80,7 @@ public ServicesGetStatisticsHeaders setXMsVersion(String xMsVersion) { /** * Get the xMsRequestId property: The x-ms-request-id property. - * + * * @return the xMsRequestId value. */ public String getXMsRequestId() { @@ -85,7 +89,7 @@ public String getXMsRequestId() { /** * Set the xMsRequestId property: The x-ms-request-id property. - * + * * @param xMsRequestId the xMsRequestId value to set. * @return the ServicesGetStatisticsHeaders object itself. */ @@ -96,7 +100,7 @@ public ServicesGetStatisticsHeaders setXMsRequestId(String xMsRequestId) { /** * Get the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @return the xMsClientRequestId value. */ public String getXMsClientRequestId() { @@ -105,7 +109,7 @@ public String getXMsClientRequestId() { /** * Set the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @param xMsClientRequestId the xMsClientRequestId value to set. * @return the ServicesGetStatisticsHeaders object itself. */ @@ -116,7 +120,7 @@ public ServicesGetStatisticsHeaders setXMsClientRequestId(String xMsClientReques /** * Get the date property: The Date property. - * + * * @return the date value. */ public OffsetDateTime getDate() { @@ -128,7 +132,7 @@ public OffsetDateTime getDate() { /** * Set the date property: The Date property. - * + * * @param date the date value to set. * @return the ServicesGetStatisticsHeaders object itself. */ diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ServicesGetUserDelegationKeyHeaders.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ServicesGetUserDelegationKeyHeaders.java index 578f8b508715..999ff3e3c379 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ServicesGetUserDelegationKeyHeaders.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ServicesGetUserDelegationKeyHeaders.java @@ -4,17 +4,17 @@ package com.azure.v2.storage.blob.models; -import com.azure.v2.core.annotation.Fluent; -import io.clientcore.core.util.DateTimeRfc1123; +import io.clientcore.core.annotations.Metadata; +import io.clientcore.core.annotations.TypeConditions; import io.clientcore.core.http.models.HttpHeaderName; import io.clientcore.core.http.models.HttpHeaders; - +import io.clientcore.core.utils.DateTimeRfc1123; import java.time.OffsetDateTime; /** * The ServicesGetUserDelegationKeyHeaders model. */ -@Fluent +@Metadata(conditions = { TypeConditions.FLUENT }) public final class ServicesGetUserDelegationKeyHeaders { /* * The x-ms-version property. @@ -38,16 +38,20 @@ public final class ServicesGetUserDelegationKeyHeaders { private static final HttpHeaderName X_MS_VERSION = HttpHeaderName.fromString("x-ms-version"); + private static final HttpHeaderName X_MS_REQUEST_ID = HttpHeaderName.fromString("x-ms-request-id"); + + private static final HttpHeaderName X_MS_CLIENT_REQUEST_ID = HttpHeaderName.fromString("x-ms-client-request-id"); + // HttpHeaders containing the raw property values. /** * Creates an instance of ServicesGetUserDelegationKeyHeaders class. - * + * * @param rawHeaders The raw HttpHeaders that will be used to create the property values. */ public ServicesGetUserDelegationKeyHeaders(HttpHeaders rawHeaders) { this.xMsVersion = rawHeaders.getValue(X_MS_VERSION); - this.xMsRequestId = rawHeaders.getValue(HttpHeaderName.fromString("x-ms-request-id")); - this.xMsClientRequestId = rawHeaders.getValue(HttpHeaderName.fromString("x-ms-client-request-id")); + this.xMsRequestId = rawHeaders.getValue(X_MS_REQUEST_ID); + this.xMsClientRequestId = rawHeaders.getValue(X_MS_CLIENT_REQUEST_ID); String date = rawHeaders.getValue(HttpHeaderName.DATE); if (date != null) { this.date = new DateTimeRfc1123(date); @@ -56,7 +60,7 @@ public ServicesGetUserDelegationKeyHeaders(HttpHeaders rawHeaders) { /** * Get the xMsVersion property: The x-ms-version property. - * + * * @return the xMsVersion value. */ public String getXMsVersion() { @@ -65,7 +69,7 @@ public String getXMsVersion() { /** * Set the xMsVersion property: The x-ms-version property. - * + * * @param xMsVersion the xMsVersion value to set. * @return the ServicesGetUserDelegationKeyHeaders object itself. */ @@ -76,7 +80,7 @@ public ServicesGetUserDelegationKeyHeaders setXMsVersion(String xMsVersion) { /** * Get the xMsRequestId property: The x-ms-request-id property. - * + * * @return the xMsRequestId value. */ public String getXMsRequestId() { @@ -85,7 +89,7 @@ public String getXMsRequestId() { /** * Set the xMsRequestId property: The x-ms-request-id property. - * + * * @param xMsRequestId the xMsRequestId value to set. * @return the ServicesGetUserDelegationKeyHeaders object itself. */ @@ -96,7 +100,7 @@ public ServicesGetUserDelegationKeyHeaders setXMsRequestId(String xMsRequestId) /** * Get the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @return the xMsClientRequestId value. */ public String getXMsClientRequestId() { @@ -105,7 +109,7 @@ public String getXMsClientRequestId() { /** * Set the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @param xMsClientRequestId the xMsClientRequestId value to set. * @return the ServicesGetUserDelegationKeyHeaders object itself. */ @@ -116,7 +120,7 @@ public ServicesGetUserDelegationKeyHeaders setXMsClientRequestId(String xMsClien /** * Get the date property: The Date property. - * + * * @return the date value. */ public OffsetDateTime getDate() { @@ -128,7 +132,7 @@ public OffsetDateTime getDate() { /** * Set the date property: The Date property. - * + * * @param date the date value to set. * @return the ServicesGetUserDelegationKeyHeaders object itself. */ diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ServicesListBlobContainersSegmentHeaders.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ServicesListBlobContainersSegmentHeaders.java index d02f28c3090e..0401957a3080 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ServicesListBlobContainersSegmentHeaders.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ServicesListBlobContainersSegmentHeaders.java @@ -4,14 +4,15 @@ package com.azure.v2.storage.blob.models; -import com.azure.v2.core.annotation.Fluent; +import io.clientcore.core.annotations.Metadata; +import io.clientcore.core.annotations.TypeConditions; import io.clientcore.core.http.models.HttpHeaderName; import io.clientcore.core.http.models.HttpHeaders; /** * The ServicesListBlobContainersSegmentHeaders model. */ -@Fluent +@Metadata(conditions = { TypeConditions.FLUENT }) public final class ServicesListBlobContainersSegmentHeaders { /* * The x-ms-version property. @@ -30,21 +31,25 @@ public final class ServicesListBlobContainersSegmentHeaders { private static final HttpHeaderName X_MS_VERSION = HttpHeaderName.fromString("x-ms-version"); + private static final HttpHeaderName X_MS_REQUEST_ID = HttpHeaderName.fromString("x-ms-request-id"); + + private static final HttpHeaderName X_MS_CLIENT_REQUEST_ID = HttpHeaderName.fromString("x-ms-client-request-id"); + // HttpHeaders containing the raw property values. /** * Creates an instance of ServicesListBlobContainersSegmentHeaders class. - * + * * @param rawHeaders The raw HttpHeaders that will be used to create the property values. */ public ServicesListBlobContainersSegmentHeaders(HttpHeaders rawHeaders) { this.xMsVersion = rawHeaders.getValue(X_MS_VERSION); - this.xMsRequestId = rawHeaders.getValue(HttpHeaderName.fromString("x-ms-request-id")); - this.xMsClientRequestId = rawHeaders.getValue(HttpHeaderName.fromString("x-ms-client-request-id")); + this.xMsRequestId = rawHeaders.getValue(X_MS_REQUEST_ID); + this.xMsClientRequestId = rawHeaders.getValue(X_MS_CLIENT_REQUEST_ID); } /** * Get the xMsVersion property: The x-ms-version property. - * + * * @return the xMsVersion value. */ public String getXMsVersion() { @@ -53,7 +58,7 @@ public String getXMsVersion() { /** * Set the xMsVersion property: The x-ms-version property. - * + * * @param xMsVersion the xMsVersion value to set. * @return the ServicesListBlobContainersSegmentHeaders object itself. */ @@ -64,7 +69,7 @@ public ServicesListBlobContainersSegmentHeaders setXMsVersion(String xMsVersion) /** * Get the xMsRequestId property: The x-ms-request-id property. - * + * * @return the xMsRequestId value. */ public String getXMsRequestId() { @@ -73,7 +78,7 @@ public String getXMsRequestId() { /** * Set the xMsRequestId property: The x-ms-request-id property. - * + * * @param xMsRequestId the xMsRequestId value to set. * @return the ServicesListBlobContainersSegmentHeaders object itself. */ @@ -84,7 +89,7 @@ public ServicesListBlobContainersSegmentHeaders setXMsRequestId(String xMsReques /** * Get the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @return the xMsClientRequestId value. */ public String getXMsClientRequestId() { @@ -93,7 +98,7 @@ public String getXMsClientRequestId() { /** * Set the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @param xMsClientRequestId the xMsClientRequestId value to set. * @return the ServicesListBlobContainersSegmentHeaders object itself. */ diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ServicesListBlobContainersSegmentNextHeaders.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ServicesListBlobContainersSegmentNextHeaders.java index 8983a50b2357..098aad4593be 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ServicesListBlobContainersSegmentNextHeaders.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ServicesListBlobContainersSegmentNextHeaders.java @@ -4,14 +4,15 @@ package com.azure.v2.storage.blob.models; -import com.azure.v2.core.annotation.Fluent; +import io.clientcore.core.annotations.Metadata; +import io.clientcore.core.annotations.TypeConditions; import io.clientcore.core.http.models.HttpHeaderName; import io.clientcore.core.http.models.HttpHeaders; /** * The ServicesListBlobContainersSegmentNextHeaders model. */ -@Fluent +@Metadata(conditions = { TypeConditions.FLUENT }) public final class ServicesListBlobContainersSegmentNextHeaders { /* * The x-ms-version property. @@ -30,21 +31,25 @@ public final class ServicesListBlobContainersSegmentNextHeaders { private static final HttpHeaderName X_MS_VERSION = HttpHeaderName.fromString("x-ms-version"); + private static final HttpHeaderName X_MS_REQUEST_ID = HttpHeaderName.fromString("x-ms-request-id"); + + private static final HttpHeaderName X_MS_CLIENT_REQUEST_ID = HttpHeaderName.fromString("x-ms-client-request-id"); + // HttpHeaders containing the raw property values. /** * Creates an instance of ServicesListBlobContainersSegmentNextHeaders class. - * + * * @param rawHeaders The raw HttpHeaders that will be used to create the property values. */ public ServicesListBlobContainersSegmentNextHeaders(HttpHeaders rawHeaders) { this.xMsVersion = rawHeaders.getValue(X_MS_VERSION); - this.xMsRequestId = rawHeaders.getValue(HttpHeaderName.fromString("x-ms-request-id")); - this.xMsClientRequestId = rawHeaders.getValue(HttpHeaderName.fromString("x-ms-client-request-id")); + this.xMsRequestId = rawHeaders.getValue(X_MS_REQUEST_ID); + this.xMsClientRequestId = rawHeaders.getValue(X_MS_CLIENT_REQUEST_ID); } /** * Get the xMsVersion property: The x-ms-version property. - * + * * @return the xMsVersion value. */ public String getXMsVersion() { @@ -53,7 +58,7 @@ public String getXMsVersion() { /** * Set the xMsVersion property: The x-ms-version property. - * + * * @param xMsVersion the xMsVersion value to set. * @return the ServicesListBlobContainersSegmentNextHeaders object itself. */ @@ -64,7 +69,7 @@ public ServicesListBlobContainersSegmentNextHeaders setXMsVersion(String xMsVers /** * Get the xMsRequestId property: The x-ms-request-id property. - * + * * @return the xMsRequestId value. */ public String getXMsRequestId() { @@ -73,7 +78,7 @@ public String getXMsRequestId() { /** * Set the xMsRequestId property: The x-ms-request-id property. - * + * * @param xMsRequestId the xMsRequestId value to set. * @return the ServicesListBlobContainersSegmentNextHeaders object itself. */ @@ -84,7 +89,7 @@ public ServicesListBlobContainersSegmentNextHeaders setXMsRequestId(String xMsRe /** * Get the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @return the xMsClientRequestId value. */ public String getXMsClientRequestId() { @@ -93,7 +98,7 @@ public String getXMsClientRequestId() { /** * Set the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @param xMsClientRequestId the xMsClientRequestId value to set. * @return the ServicesListBlobContainersSegmentNextHeaders object itself. */ diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ServicesSetPropertiesHeaders.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ServicesSetPropertiesHeaders.java index 8a503d03d45f..70405645f9bf 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ServicesSetPropertiesHeaders.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ServicesSetPropertiesHeaders.java @@ -4,14 +4,15 @@ package com.azure.v2.storage.blob.models; -import com.azure.v2.core.annotation.Fluent; +import io.clientcore.core.annotations.Metadata; +import io.clientcore.core.annotations.TypeConditions; import io.clientcore.core.http.models.HttpHeaderName; import io.clientcore.core.http.models.HttpHeaders; /** * The ServicesSetPropertiesHeaders model. */ -@Fluent +@Metadata(conditions = { TypeConditions.FLUENT }) public final class ServicesSetPropertiesHeaders { /* * The x-ms-version property. @@ -30,21 +31,25 @@ public final class ServicesSetPropertiesHeaders { private static final HttpHeaderName X_MS_VERSION = HttpHeaderName.fromString("x-ms-version"); + private static final HttpHeaderName X_MS_REQUEST_ID = HttpHeaderName.fromString("x-ms-request-id"); + + private static final HttpHeaderName X_MS_CLIENT_REQUEST_ID = HttpHeaderName.fromString("x-ms-client-request-id"); + // HttpHeaders containing the raw property values. /** * Creates an instance of ServicesSetPropertiesHeaders class. - * + * * @param rawHeaders The raw HttpHeaders that will be used to create the property values. */ public ServicesSetPropertiesHeaders(HttpHeaders rawHeaders) { this.xMsVersion = rawHeaders.getValue(X_MS_VERSION); - this.xMsRequestId = rawHeaders.getValue(HttpHeaderName.fromString("x-ms-request-id")); - this.xMsClientRequestId = rawHeaders.getValue(HttpHeaderName.fromString("x-ms-client-request-id")); + this.xMsRequestId = rawHeaders.getValue(X_MS_REQUEST_ID); + this.xMsClientRequestId = rawHeaders.getValue(X_MS_CLIENT_REQUEST_ID); } /** * Get the xMsVersion property: The x-ms-version property. - * + * * @return the xMsVersion value. */ public String getXMsVersion() { @@ -53,7 +58,7 @@ public String getXMsVersion() { /** * Set the xMsVersion property: The x-ms-version property. - * + * * @param xMsVersion the xMsVersion value to set. * @return the ServicesSetPropertiesHeaders object itself. */ @@ -64,7 +69,7 @@ public ServicesSetPropertiesHeaders setXMsVersion(String xMsVersion) { /** * Get the xMsRequestId property: The x-ms-request-id property. - * + * * @return the xMsRequestId value. */ public String getXMsRequestId() { @@ -73,7 +78,7 @@ public String getXMsRequestId() { /** * Set the xMsRequestId property: The x-ms-request-id property. - * + * * @param xMsRequestId the xMsRequestId value to set. * @return the ServicesSetPropertiesHeaders object itself. */ @@ -84,7 +89,7 @@ public ServicesSetPropertiesHeaders setXMsRequestId(String xMsRequestId) { /** * Get the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @return the xMsClientRequestId value. */ public String getXMsClientRequestId() { @@ -93,7 +98,7 @@ public String getXMsClientRequestId() { /** * Set the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @param xMsClientRequestId the xMsClientRequestId value to set. * @return the ServicesSetPropertiesHeaders object itself. */ diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ServicesSubmitBatchHeaders.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ServicesSubmitBatchHeaders.java index bf2782228145..962179a12113 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ServicesSubmitBatchHeaders.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/ServicesSubmitBatchHeaders.java @@ -4,14 +4,15 @@ package com.azure.v2.storage.blob.models; -import com.azure.v2.core.annotation.Fluent; +import io.clientcore.core.annotations.Metadata; +import io.clientcore.core.annotations.TypeConditions; import io.clientcore.core.http.models.HttpHeaderName; import io.clientcore.core.http.models.HttpHeaders; /** * The ServicesSubmitBatchHeaders model. */ -@Fluent +@Metadata(conditions = { TypeConditions.FLUENT }) public final class ServicesSubmitBatchHeaders { /* * The x-ms-version property. @@ -30,21 +31,23 @@ public final class ServicesSubmitBatchHeaders { private static final HttpHeaderName X_MS_VERSION = HttpHeaderName.fromString("x-ms-version"); + private static final HttpHeaderName X_MS_REQUEST_ID = HttpHeaderName.fromString("x-ms-request-id"); + // HttpHeaders containing the raw property values. /** * Creates an instance of ServicesSubmitBatchHeaders class. - * + * * @param rawHeaders The raw HttpHeaders that will be used to create the property values. */ public ServicesSubmitBatchHeaders(HttpHeaders rawHeaders) { this.xMsVersion = rawHeaders.getValue(X_MS_VERSION); - this.xMsRequestId = rawHeaders.getValue(HttpHeaderName.fromString("x-ms-request-id")); + this.xMsRequestId = rawHeaders.getValue(X_MS_REQUEST_ID); this.contentType = rawHeaders.getValue(HttpHeaderName.CONTENT_TYPE); } /** * Get the xMsVersion property: The x-ms-version property. - * + * * @return the xMsVersion value. */ public String getXMsVersion() { @@ -53,7 +56,7 @@ public String getXMsVersion() { /** * Set the xMsVersion property: The x-ms-version property. - * + * * @param xMsVersion the xMsVersion value to set. * @return the ServicesSubmitBatchHeaders object itself. */ @@ -64,7 +67,7 @@ public ServicesSubmitBatchHeaders setXMsVersion(String xMsVersion) { /** * Get the xMsRequestId property: The x-ms-request-id property. - * + * * @return the xMsRequestId value. */ public String getXMsRequestId() { @@ -73,7 +76,7 @@ public String getXMsRequestId() { /** * Set the xMsRequestId property: The x-ms-request-id property. - * + * * @param xMsRequestId the xMsRequestId value to set. * @return the ServicesSubmitBatchHeaders object itself. */ @@ -84,7 +87,7 @@ public ServicesSubmitBatchHeaders setXMsRequestId(String xMsRequestId) { /** * Get the contentType property: The Content-Type property. - * + * * @return the contentType value. */ public String getContentType() { @@ -93,7 +96,7 @@ public String getContentType() { /** * Set the contentType property: The Content-Type property. - * + * * @param contentType the contentType value to set. * @return the ServicesSubmitBatchHeaders object itself. */ diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/SkuName.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/SkuName.java index 13ce34eddbf0..1f236b296ed4 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/SkuName.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/SkuName.java @@ -44,7 +44,7 @@ public enum SkuName { /** * Parses a serialized value to a SkuName instance. - * + * * @param value the serialized value to parse. * @return the parsed SkuName object, or null if unable to parse. */ diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/StaticWebsite.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/StaticWebsite.java index f5eeab543bdd..c282a2cc1261 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/StaticWebsite.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/StaticWebsite.java @@ -4,8 +4,8 @@ package com.azure.v2.storage.blob.models; -import com.azure.v2.core.annotation.Fluent; -import com.azure.v2.core.util.CoreUtils; +import io.clientcore.core.annotations.Metadata; +import io.clientcore.core.annotations.TypeConditions; import io.clientcore.core.serialization.xml.XmlReader; import io.clientcore.core.serialization.xml.XmlSerializable; import io.clientcore.core.serialization.xml.XmlToken; @@ -16,7 +16,7 @@ /** * The properties that enable an account to host a static website. */ -@Fluent +@Metadata(conditions = { TypeConditions.FLUENT }) public final class StaticWebsite implements XmlSerializable { /* * Indicates whether this account is hosting a static website @@ -46,7 +46,7 @@ public StaticWebsite() { /** * Get the enabled property: Indicates whether this account is hosting a static website. - * + * * @return the enabled value. */ public boolean isEnabled() { @@ -55,7 +55,7 @@ public boolean isEnabled() { /** * Set the enabled property: Indicates whether this account is hosting a static website. - * + * * @param enabled the enabled value to set. * @return the StaticWebsite object itself. */ @@ -66,7 +66,7 @@ public StaticWebsite setEnabled(boolean enabled) { /** * Get the indexDocument property: The default name of the index page under each directory. - * + * * @return the indexDocument value. */ public String getIndexDocument() { @@ -75,7 +75,7 @@ public String getIndexDocument() { /** * Set the indexDocument property: The default name of the index page under each directory. - * + * * @param indexDocument the indexDocument value to set. * @return the StaticWebsite object itself. */ @@ -86,7 +86,7 @@ public StaticWebsite setIndexDocument(String indexDocument) { /** * Get the errorDocument404Path property: The absolute path of the custom 404 page. - * + * * @return the errorDocument404Path value. */ public String getErrorDocument404Path() { @@ -95,7 +95,7 @@ public String getErrorDocument404Path() { /** * Set the errorDocument404Path property: The absolute path of the custom 404 page. - * + * * @param errorDocument404Path the errorDocument404Path value to set. * @return the StaticWebsite object itself. */ @@ -106,7 +106,7 @@ public StaticWebsite setErrorDocument404Path(String errorDocument404Path) { /** * Get the defaultIndexDocumentPath property: Absolute path of the default index page. - * + * * @return the defaultIndexDocumentPath value. */ public String getDefaultIndexDocumentPath() { @@ -115,7 +115,7 @@ public String getDefaultIndexDocumentPath() { /** * Set the defaultIndexDocumentPath property: Absolute path of the default index page. - * + * * @param defaultIndexDocumentPath the defaultIndexDocumentPath value to set. * @return the StaticWebsite object itself. */ @@ -131,7 +131,7 @@ public XmlWriter toXml(XmlWriter xmlWriter) throws XMLStreamException { @Override public XmlWriter toXml(XmlWriter xmlWriter, String rootElementName) throws XMLStreamException { - rootElementName = CoreUtils.isNullOrEmpty(rootElementName) ? "StaticWebsite" : rootElementName; + rootElementName = rootElementName == null || rootElementName.isEmpty() ? "StaticWebsite" : rootElementName; xmlWriter.writeStartElement(rootElementName); xmlWriter.writeBooleanElement("Enabled", this.enabled); xmlWriter.writeStringElement("IndexDocument", this.indexDocument); @@ -142,7 +142,7 @@ 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. @@ -154,7 +154,7 @@ 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. @@ -163,7 +163,8 @@ public static StaticWebsite fromXml(XmlReader xmlReader) throws XMLStreamExcepti * @throws XMLStreamException If an error occurs while reading the StaticWebsite. */ public static StaticWebsite fromXml(XmlReader xmlReader, String rootElementName) throws XMLStreamException { - String finalRootElementName = CoreUtils.isNullOrEmpty(rootElementName) ? "StaticWebsite" : rootElementName; + String finalRootElementName + = rootElementName == null || rootElementName.isEmpty() ? "StaticWebsite" : rootElementName; return xmlReader.readObject(finalRootElementName, reader -> { StaticWebsite deserializedStaticWebsite = new StaticWebsite(); while (reader.nextElement() != XmlToken.END_ELEMENT) { diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/StorageError.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/StorageError.java index 29766cdbd0d3..79fb49590239 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/StorageError.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/StorageError.java @@ -4,8 +4,8 @@ package com.azure.v2.storage.blob.models; -import com.azure.v2.core.annotation.Fluent; -import com.azure.v2.core.util.CoreUtils; +import io.clientcore.core.annotations.Metadata; +import io.clientcore.core.annotations.TypeConditions; import io.clientcore.core.serialization.xml.XmlReader; import io.clientcore.core.serialization.xml.XmlSerializable; import io.clientcore.core.serialization.xml.XmlToken; @@ -16,7 +16,7 @@ /** * The StorageError model. */ -@Fluent +@Metadata(conditions = { TypeConditions.FLUENT }) public final class StorageError implements XmlSerializable { /* * The Message property. @@ -31,7 +31,7 @@ public StorageError() { /** * Get the message property: The Message property. - * + * * @return the message value. */ public String getMessage() { @@ -40,7 +40,7 @@ public String getMessage() { /** * Set the message property: The Message property. - * + * * @param message the message value to set. * @return the StorageError object itself. */ @@ -56,7 +56,7 @@ public XmlWriter toXml(XmlWriter xmlWriter) throws XMLStreamException { @Override public XmlWriter toXml(XmlWriter xmlWriter, String rootElementName) throws XMLStreamException { - rootElementName = CoreUtils.isNullOrEmpty(rootElementName) ? "StorageError" : rootElementName; + rootElementName = rootElementName == null || rootElementName.isEmpty() ? "StorageError" : rootElementName; xmlWriter.writeStartElement(rootElementName); xmlWriter.writeStringElement("Message", this.message); return xmlWriter.writeEndElement(); @@ -64,7 +64,7 @@ public XmlWriter toXml(XmlWriter xmlWriter, String rootElementName) throws XMLSt /** * 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. @@ -76,7 +76,7 @@ public static StorageError fromXml(XmlReader xmlReader) throws XMLStreamExceptio /** * 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. @@ -85,7 +85,8 @@ public static StorageError fromXml(XmlReader xmlReader) throws XMLStreamExceptio * @throws XMLStreamException If an error occurs while reading the StorageError. */ public static StorageError fromXml(XmlReader xmlReader, String rootElementName) throws XMLStreamException { - String finalRootElementName = CoreUtils.isNullOrEmpty(rootElementName) ? "StorageError" : rootElementName; + String finalRootElementName + = rootElementName == null || rootElementName.isEmpty() ? "StorageError" : rootElementName; return xmlReader.readObject(finalRootElementName, reader -> { StorageError deserializedStorageError = new StorageError(); while (reader.nextElement() != XmlToken.END_ELEMENT) { diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/StorageErrorException.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/StorageErrorException.java index 4a4eeb18bb3a..9d0ae0be1e28 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/StorageErrorException.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/StorageErrorException.java @@ -4,8 +4,7 @@ package com.azure.v2.storage.blob.models; -import io.clientcore.core.http.exception.HttpExceptionType; -import io.clientcore.core.http.exception.HttpResponseException; +import io.clientcore.core.http.exceptions.HttpResponseException; import io.clientcore.core.http.models.Response; /** @@ -14,23 +13,23 @@ public final class StorageErrorException extends HttpResponseException { /** * Initializes a new instance of the StorageErrorException class. - * + * * @param message the exception message or the response content if a message is not available. * @param response the HTTP response. */ public StorageErrorException(String message, Response response) { - super(message, response, HttpExceptionType.fromString(""), null); + super(message, response, null); } /** * Initializes a new instance of the StorageErrorException class. - * + * * @param message the exception message or the response content if a message is not available. * @param response the HTTP response. * @param value the deserialized response value. */ public StorageErrorException(String message, Response response, StorageError value) { - super(message, response, HttpExceptionType.fromString(""), value); + super(message, response, value); } /** diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/UserDelegationKey.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/UserDelegationKey.java index 5f1ee21232c8..7f8a7c619a27 100644 --- a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/UserDelegationKey.java +++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/models/UserDelegationKey.java @@ -4,8 +4,8 @@ package com.azure.v2.storage.blob.models; -import com.azure.v2.core.annotation.Fluent; -import com.azure.v2.core.util.CoreUtils; +import io.clientcore.core.annotations.Metadata; +import io.clientcore.core.annotations.TypeConditions; import io.clientcore.core.serialization.xml.XmlReader; import io.clientcore.core.serialization.xml.XmlSerializable; import io.clientcore.core.serialization.xml.XmlToken; @@ -18,7 +18,7 @@ /** * A user delegation key. */ -@Fluent +@Metadata(conditions = { TypeConditions.FLUENT }) public final class UserDelegationKey implements XmlSerializable { /* * The Azure Active Directory object ID in GUID format. @@ -63,7 +63,7 @@ public UserDelegationKey() { /** * Get the signedObjectId property: The Azure Active Directory object ID in GUID format. - * + * * @return the signedObjectId value. */ public String getSignedObjectId() { @@ -72,7 +72,7 @@ public String getSignedObjectId() { /** * Set the signedObjectId property: The Azure Active Directory object ID in GUID format. - * + * * @param signedObjectId the signedObjectId value to set. * @return the UserDelegationKey object itself. */ @@ -83,7 +83,7 @@ public UserDelegationKey setSignedObjectId(String signedObjectId) { /** * Get the signedTenantId property: The Azure Active Directory tenant ID in GUID format. - * + * * @return the signedTenantId value. */ public String getSignedTenantId() { @@ -92,7 +92,7 @@ public String getSignedTenantId() { /** * Set the signedTenantId property: The Azure Active Directory tenant ID in GUID format. - * + * * @param signedTenantId the signedTenantId value to set. * @return the UserDelegationKey object itself. */ @@ -103,7 +103,7 @@ public UserDelegationKey setSignedTenantId(String signedTenantId) { /** * Get the signedStart property: The date-time the key is active. - * + * * @return the signedStart value. */ public OffsetDateTime getSignedStart() { @@ -112,7 +112,7 @@ public OffsetDateTime getSignedStart() { /** * Set the signedStart property: The date-time the key is active. - * + * * @param signedStart the signedStart value to set. * @return the UserDelegationKey object itself. */ @@ -123,7 +123,7 @@ public UserDelegationKey setSignedStart(OffsetDateTime signedStart) { /** * Get the signedExpiry property: The date-time the key expires. - * + * * @return the signedExpiry value. */ public OffsetDateTime getSignedExpiry() { @@ -132,7 +132,7 @@ public OffsetDateTime getSignedExpiry() { /** * Set the signedExpiry property: The date-time the key expires. - * + * * @param signedExpiry the signedExpiry value to set. * @return the UserDelegationKey object itself. */ @@ -143,7 +143,7 @@ public UserDelegationKey setSignedExpiry(OffsetDateTime signedExpiry) { /** * Get the signedService property: Abbreviation of the Azure Storage service that accepts the key. - * + * * @return the signedService value. */ public String getSignedService() { @@ -152,7 +152,7 @@ public String getSignedService() { /** * Set the signedService property: Abbreviation of the Azure Storage service that accepts the key. - * + * * @param signedService the signedService value to set. * @return the UserDelegationKey object itself. */ @@ -163,7 +163,7 @@ public UserDelegationKey setSignedService(String signedService) { /** * Get the signedVersion property: The service version that created the key. - * + * * @return the signedVersion value. */ public String getSignedVersion() { @@ -172,7 +172,7 @@ public String getSignedVersion() { /** * Set the signedVersion property: The service version that created the key. - * + * * @param signedVersion the signedVersion value to set. * @return the UserDelegationKey object itself. */ @@ -183,7 +183,7 @@ public UserDelegationKey setSignedVersion(String signedVersion) { /** * Get the value property: The key as a base64 string. - * + * * @return the value value. */ public String getValue() { @@ -192,7 +192,7 @@ public String getValue() { /** * Set the value property: The key as a base64 string. - * + * * @param value the value value to set. * @return the UserDelegationKey object itself. */ @@ -208,7 +208,7 @@ public XmlWriter toXml(XmlWriter xmlWriter) throws XMLStreamException { @Override public XmlWriter toXml(XmlWriter xmlWriter, String rootElementName) throws XMLStreamException { - rootElementName = CoreUtils.isNullOrEmpty(rootElementName) ? "UserDelegationKey" : rootElementName; + rootElementName = rootElementName == null || rootElementName.isEmpty() ? "UserDelegationKey" : rootElementName; xmlWriter.writeStartElement(rootElementName); xmlWriter.writeStringElement("SignedOid", this.signedObjectId); xmlWriter.writeStringElement("SignedTid", this.signedTenantId); @@ -224,7 +224,7 @@ 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. @@ -236,7 +236,7 @@ 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. @@ -245,7 +245,8 @@ public static UserDelegationKey fromXml(XmlReader xmlReader) throws XMLStreamExc * @throws XMLStreamException If an error occurs while reading the UserDelegationKey. */ public static UserDelegationKey fromXml(XmlReader xmlReader, String rootElementName) throws XMLStreamException { - String finalRootElementName = CoreUtils.isNullOrEmpty(rootElementName) ? "UserDelegationKey" : rootElementName; + String finalRootElementName + = rootElementName == null || rootElementName.isEmpty() ? "UserDelegationKey" : rootElementName; return xmlReader.readObject(finalRootElementName, reader -> { UserDelegationKey deserializedUserDelegationKey = new UserDelegationKey(); while (reader.nextElement() != XmlToken.END_ELEMENT) { @@ -257,10 +258,10 @@ public static UserDelegationKey fromXml(XmlReader xmlReader, String rootElementN deserializedUserDelegationKey.signedTenantId = reader.getStringElement(); } else if ("SignedStart".equals(elementName.getLocalPart())) { deserializedUserDelegationKey.signedStart - = reader.getNullableElement(dateString -> CoreUtils.parseBestOffsetDateTime(dateString)); + = reader.getNullableElement(dateString -> OffsetDateTime.parse(dateString)); } else if ("SignedExpiry".equals(elementName.getLocalPart())) { deserializedUserDelegationKey.signedExpiry - = reader.getNullableElement(dateString -> CoreUtils.parseBestOffsetDateTime(dateString)); + = reader.getNullableElement(dateString -> OffsetDateTime.parse(dateString)); } else if ("SignedService".equals(elementName.getLocalPart())) { deserializedUserDelegationKey.signedService = reader.getStringElement(); } else if ("SignedVersion".equals(elementName.getLocalPart())) { diff --git a/sdk/storage/azure-storage-blob-v2/src/test/java/com/azure/v2/storage/blob/BlockBlobClientTest.java b/sdk/storage/azure-storage-blob-v2/src/test/java/com/azure/v2/storage/blob/BlockBlobClientTest.java index 9e1c9a7e2406..361f65328c60 100644 --- a/sdk/storage/azure-storage-blob-v2/src/test/java/com/azure/v2/storage/blob/BlockBlobClientTest.java +++ b/sdk/storage/azure-storage-blob-v2/src/test/java/com/azure/v2/storage/blob/BlockBlobClientTest.java @@ -1,6 +1,6 @@ package com.azure.v2.storage.blob; -import io.clientcore.core.util.binarydata.BinaryData; +import io.clientcore.core.models.binarydata.BinaryData; import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; @@ -9,9 +9,7 @@ public class BlockBlobClientTest { @Test @Disabled public void testUpload() { - BlockBlobClient blockBlobClient = new AzureBlobStorageBuilder().url( - "https://srnagarstorage.blob.core.windows.net/?sv=2022-11-02&ss=bfqt&srt=sco&sp=rwdlacupiytfx&se=2024-12-23T03:55:26Z&st=2024-12-12T19:55:26Z&spr=https&sig=7Dj0MbP2z9bnXRQdoohMtCKsfzXYfUKrRTfboiRZ%2Bv8%3D") - .buildBlockBlobClient(); + BlockBlobClient blockBlobClient = new AzureBlobStorageBuilder().url("").buildBlockBlobClient(); String content = "Hello World!"; blockBlobClient.upload("testcontainer", "upload.txt", content.length(), BinaryData.fromString(content), null, diff --git a/sdk/storage/azure-storage-blob-v2/swagger/autorest.md b/sdk/storage/azure-storage-blob-v2/swagger/autorest.md index bde1e57b3552..138069712174 100644 --- a/sdk/storage/azure-storage-blob-v2/swagger/autorest.md +++ b/sdk/storage/azure-storage-blob-v2/swagger/autorest.md @@ -4,7 +4,7 @@ use: '@autorest/java@4.1.39' input-file: https://raw.githubusercontent.com/Azure/azure-rest-api-specs/refs/heads/feature/storage/stg96base2/specification/storage/data-plane/Microsoft.BlobStorage/stable/2025-01-05/blob.json java: true -output-folder: . +output-folder: ../ namespace: com.azure.v2.storage.blob service-interface-as-public: true license-header: MICROSOFT_MIT_SMALL @@ -18,6 +18,8 @@ stream-style-serialization: true customization-class: src/main/java/StorageCustomization.java generate-sync-async-clients: true sync-methods: sync-only +flavor: azurev2 +disable-typed-headers-methods: true ``` ### /{containerName}/{blob} From f364c2474f851f861d6d512a43f68db064932f45 Mon Sep 17 00:00:00 2001 From: Srikanta Date: Tue, 18 Feb 2025 10:27:46 -0800 Subject: [PATCH 08/26] revert group id --- sdk/core/azure-core-v2/README.md | 2 +- sdk/core/azure-core-v2/pom.xml | 4 ++-- sdk/parents/azure-client-sdk-parent-v2/pom.xml | 1 - 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/sdk/core/azure-core-v2/README.md b/sdk/core/azure-core-v2/README.md index e0cd67fb110b..75710a8034a9 100644 --- a/sdk/core/azure-core-v2/README.md +++ b/sdk/core/azure-core-v2/README.md @@ -20,7 +20,7 @@ add the direct dependency to your project as follows. [//]: # ({x-version-update-start;com.azure.v2:azure-core-v2;current}) ```xml - com.azure.v2 + com.azure azure-core-v2 1.0.0-beta.1 diff --git a/sdk/core/azure-core-v2/pom.xml b/sdk/core/azure-core-v2/pom.xml index 6b994ca90726..519e0c3796fa 100644 --- a/sdk/core/azure-core-v2/pom.xml +++ b/sdk/core/azure-core-v2/pom.xml @@ -12,10 +12,10 @@ ../../parents/azure-client-sdk-parent-v2 - com.azure.v2 + com.azure azure-core-v2 jar - 1.0.0-beta.1 + 1.0.0-beta.1 Microsoft Azure Java Core V2 Library This package contains core types for Azure Java V2 clients. diff --git a/sdk/parents/azure-client-sdk-parent-v2/pom.xml b/sdk/parents/azure-client-sdk-parent-v2/pom.xml index 5ca50497f4f9..62b58b64085b 100644 --- a/sdk/parents/azure-client-sdk-parent-v2/pom.xml +++ b/sdk/parents/azure-client-sdk-parent-v2/pom.xml @@ -611,7 +611,6 @@ com.azure:* - com.azure.v2:* com.azure.resourcemanager:* com.azure.spring:* io.clientcore:* From 536631a4d60ce09d8423c43202c19532ec77b298 Mon Sep 17 00:00:00 2001 From: Srikanta Date: Tue, 18 Feb 2025 10:29:08 -0800 Subject: [PATCH 09/26] update readme --- sdk/core/azure-core-v2/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sdk/core/azure-core-v2/README.md b/sdk/core/azure-core-v2/README.md index 75710a8034a9..ab22faedf5ed 100644 --- a/sdk/core/azure-core-v2/README.md +++ b/sdk/core/azure-core-v2/README.md @@ -17,7 +17,7 @@ Azure Core V2 provides shared primitives, abstractions, and helpers for modern J If you want to take dependency on a particular version of the library that is not present in the BOM, add the direct dependency to your project as follows. -[//]: # ({x-version-update-start;com.azure.v2:azure-core-v2;current}) +[//]: # ({x-version-update-start;com.azure:azure-core-v2;current}) ```xml com.azure From 4d7ae1da190e7685947b48ba46dee7dbaa18317f Mon Sep 17 00:00:00 2001 From: vcolin7 Date: Wed, 12 Feb 2025 00:15:17 -0800 Subject: [PATCH 10/26] Added azure-storage-stress-v2 module. --- sdk/storage/azure-storage-stress-v2/pom.xml | 70 ++++ .../azure/v2/storage/stress/ContentInfo.java | 77 +++++ .../stress/ContentMismatchException.java | 7 + .../v2/storage/stress/CrcInputStream.java | 202 ++++++++++++ .../v2/storage/stress/CrcOutputStream.java | 42 +++ .../stress/FaultInjectingHttpPolicy.java | 150 +++++++++ .../stress/FaultInjectionProbabilities.java | 175 ++++++++++ .../storage/stress/RepeatingInputStream.java | 117 +++++++ .../storage/stress/StorageStressOptions.java | 51 +++ .../v2/storage/stress/TelemetryHelper.java | 301 ++++++++++++++++++ .../src/main/resources/logback.xml | 23 ++ sdk/storage/pom.xml | 1 + 12 files changed, 1216 insertions(+) create mode 100644 sdk/storage/azure-storage-stress-v2/pom.xml create mode 100644 sdk/storage/azure-storage-stress-v2/src/main/java/com/azure/v2/storage/stress/ContentInfo.java create mode 100644 sdk/storage/azure-storage-stress-v2/src/main/java/com/azure/v2/storage/stress/ContentMismatchException.java create mode 100644 sdk/storage/azure-storage-stress-v2/src/main/java/com/azure/v2/storage/stress/CrcInputStream.java create mode 100644 sdk/storage/azure-storage-stress-v2/src/main/java/com/azure/v2/storage/stress/CrcOutputStream.java create mode 100644 sdk/storage/azure-storage-stress-v2/src/main/java/com/azure/v2/storage/stress/FaultInjectingHttpPolicy.java create mode 100644 sdk/storage/azure-storage-stress-v2/src/main/java/com/azure/v2/storage/stress/FaultInjectionProbabilities.java create mode 100644 sdk/storage/azure-storage-stress-v2/src/main/java/com/azure/v2/storage/stress/RepeatingInputStream.java create mode 100644 sdk/storage/azure-storage-stress-v2/src/main/java/com/azure/v2/storage/stress/StorageStressOptions.java create mode 100644 sdk/storage/azure-storage-stress-v2/src/main/java/com/azure/v2/storage/stress/TelemetryHelper.java create mode 100644 sdk/storage/azure-storage-stress-v2/src/main/resources/logback.xml diff --git a/sdk/storage/azure-storage-stress-v2/pom.xml b/sdk/storage/azure-storage-stress-v2/pom.xml new file mode 100644 index 000000000000..17dce71273e4 --- /dev/null +++ b/sdk/storage/azure-storage-stress-v2/pom.xml @@ -0,0 +1,70 @@ + + + 4.0.0 + + com.azure.v2 + azure-storage-stress-v2 + jar + 1.0.0-beta.1 + + + UTF-8 + UTF-8 + + + 1.8 + 1.8 + + + - + + + + + ch.qos.logback + logback-classic + 1.3.14 + + + com.azure.v2 + azure-core-v2 + 1.0.0-beta.1 + + + com.azure + perf-test-core + 1.0.0-beta.1 + + + + + com.azure + azure-monitor-opentelemetry-autoconfigure + 1.0.0-beta.2 + + + io.opentelemetry.instrumentation + opentelemetry-runtime-telemetry-java8 + 2.12.0-alpha + + + io.opentelemetry.instrumentation + opentelemetry-logback-appender-1.0 + 2.12.0-alpha + + + com.azure + azure-core-metrics-opentelemetry + 1.0.0-beta.26 + + + + com.azure + azure-core-tracing-opentelemetry + 1.0.0-beta.53 + + + + diff --git a/sdk/storage/azure-storage-stress-v2/src/main/java/com/azure/v2/storage/stress/ContentInfo.java b/sdk/storage/azure-storage-stress-v2/src/main/java/com/azure/v2/storage/stress/ContentInfo.java new file mode 100644 index 000000000000..62de9fc22d43 --- /dev/null +++ b/sdk/storage/azure-storage-stress-v2/src/main/java/com/azure/v2/storage/stress/ContentInfo.java @@ -0,0 +1,77 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.v2.storage.stress; + +import io.clientcore.core.util.binarydata.BinaryData; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; + +import java.nio.ByteBuffer; +import java.util.concurrent.atomic.AtomicLong; +import java.util.zip.CRC32; + +public class ContentInfo { + private final long length; + private final long crc; + private final ByteBuffer head; + + ContentInfo(long crc, long length, ByteBuffer head) { + this.crc = crc; + this.length = length; + this.head = head; + } + + // Helper method to update the CRC, length, and head + private static void processBuffer(ByteBuffer bb, CRC32 crc, AtomicLong length, ByteBuffer head) { + int remaining = bb.remaining(); + length.getAndAdd(remaining); + + if (head.hasRemaining()) { + int toRead = Math.min(head.remaining(), remaining); + byte[] temp = new byte[toRead]; + // Read bytes from bb into temp + bb.get(temp, 0, toRead); + head.put(temp); + } + + // Rewind the buffer to update CRC with all data + bb.rewind(); + byte[] crcTemp = new byte[bb.remaining()]; + bb.get(crcTemp); + crc.update(crcTemp, 0, crcTemp.length); + } + + public static Mono fromFluxByteBuffer(Flux data) { + AtomicLong length = new AtomicLong(0); + CRC32 crc = new CRC32(); + ByteBuffer head = ByteBuffer.allocate(1024); + + return data + .doOnNext(bb -> processBuffer(bb.duplicate(), crc, length, head)) + .then(Mono.fromCallable(() -> new ContentInfo(crc.getValue(), length.get(), (ByteBuffer) head.flip()))); + } + + public static ContentInfo fromBinaryData(BinaryData data) { + ByteBuffer bb = data.toByteBuffer(); + AtomicLong length = new AtomicLong(0); + CRC32 crc = new CRC32(); + ByteBuffer head = ByteBuffer.allocate(1024); + + processBuffer(bb, crc, length, head); + + return new ContentInfo(crc.getValue(), length.get(), (ByteBuffer) head.flip()); + } + + public long getLength() { + return length; + } + + public long getCrc() { + return crc; + } + + public ByteBuffer getHead() { + return head; + } +} diff --git a/sdk/storage/azure-storage-stress-v2/src/main/java/com/azure/v2/storage/stress/ContentMismatchException.java b/sdk/storage/azure-storage-stress-v2/src/main/java/com/azure/v2/storage/stress/ContentMismatchException.java new file mode 100644 index 000000000000..4302e35f820c --- /dev/null +++ b/sdk/storage/azure-storage-stress-v2/src/main/java/com/azure/v2/storage/stress/ContentMismatchException.java @@ -0,0 +1,7 @@ +package com.azure.v2.storage.stress; + +public class ContentMismatchException extends RuntimeException { + public ContentMismatchException() { + super("crc mismatch"); + } +} diff --git a/sdk/storage/azure-storage-stress-v2/src/main/java/com/azure/v2/storage/stress/CrcInputStream.java b/sdk/storage/azure-storage-stress-v2/src/main/java/com/azure/v2/storage/stress/CrcInputStream.java new file mode 100644 index 000000000000..cd7ffaf8d085 --- /dev/null +++ b/sdk/storage/azure-storage-stress-v2/src/main/java/com/azure/v2/storage/stress/CrcInputStream.java @@ -0,0 +1,202 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.v2.storage.stress; + +import com.azure.core.exception.UnexpectedLengthException; +import com.azure.core.util.FluxUtil; +import io.clientcore.core.instrumentation.logging.ClientLogger; +import io.clientcore.core.util.binarydata.BinaryData; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; +import reactor.core.publisher.Sinks; + +import java.io.IOException; +import java.io.InputStream; +import java.io.UncheckedIOException; +import java.nio.ByteBuffer; +import java.util.zip.CRC32; + +public class CrcInputStream extends InputStream { + private final static com.azure.core.util.logging.ClientLogger OLD_LOGGER = + new com.azure.core.util.logging.ClientLogger(CrcInputStream.class); + private final static ClientLogger LOGGER = new ClientLogger(CrcInputStream.class); + private final Sinks.One sink = Sinks.one(); + private final InputStream inputStream; + private final CRC32 crc = new CRC32(); + private final ByteBuffer head = ByteBuffer.allocate(1024); + private final boolean markSupported; + private long markPosition = -1; + private long length = 0; + private long size; + + public CrcInputStream(BinaryData source, long size) { + this.inputStream = new RepeatingInputStream(source, size); + this.markSupported = true; + this.size = size; + } + + public CrcInputStream(InputStream source) { + this.inputStream = source; + this.markSupported = source.markSupported(); + } + + @Override + public synchronized int read() throws IOException { + int b = inputStream.read(); + if (b >= 0) { + crc.update(b); + if (head.hasRemaining()) { + head.put((byte) b); + } + length++; + } else { + sink.emitValue(new ContentInfo(crc.getValue(), length, head), Sinks.EmitFailureHandler.FAIL_FAST); + } + return b; + } + + @Override + public synchronized int read(byte buf[], int off, int len) throws IOException { + int read = inputStream.read(buf, off, len); + if (read >= 0) { + length += read; + crc.update(buf, off, read); + if (head.hasRemaining()) { + head.put(buf, off, Math.min(read, head.remaining())); + } + } else { + sink.emitValue(new ContentInfo(crc.getValue(), length, head), Sinks.EmitFailureHandler.FAIL_FAST); + } + return read; + } + + @Override + public synchronized void mark(int readLimit) { + if (markSupported) { + inputStream.mark(readLimit); + markPosition = length; + } + } + + @Override + public synchronized void reset() throws IOException { + if (markPosition != -1) { + inputStream.reset(); + length = markPosition; // Reset length to markPosition + crc.reset(); // Reset CRC32 to recalculate from the markPosition + head.clear(); // Clear the head buffer + } else { + throw new IOException("Mark/reset not supported or mark not set"); + } + } + + @Override + public boolean markSupported() { + return markSupported; + } + + public Mono getContentInfo() { + return sink.asMono(); + } + + @Override + public void close() { + try { + inputStream.close(); + } catch (IOException e) { + throw LOGGER.logThrowableAsError(new UncheckedIOException(e)); + } + } + + public Flux convertStreamToByteBuffer() { + int blockSize = 4 * 1024 * 1024; + inputStream.mark(Integer.MAX_VALUE); + + if (size == 0) { + try { + if (inputStream.read() != -1) { + long totalLength = 1 + inputStream.available(); + return FluxUtil.fluxError(OLD_LOGGER, new UnexpectedLengthException(String.format( + "Request body emitted %d bytes, more than the expected %d bytes.", totalLength, size), + totalLength, size)); + } + } catch (IOException e) { + return FluxUtil.fluxError(OLD_LOGGER, new UncheckedIOException(e)); + } + } + + return Flux.defer(() -> { + /* + * If the request needs to be retried, the flux will be resubscribed to. The stream and counter must be + * reset in order to correctly return the same data again. + */ + try { + inputStream.reset(); + } catch (IOException e) { + return FluxUtil.fluxError(OLD_LOGGER, new UncheckedIOException(e)); + } + + final long[] currentTotalLength = new long[1]; + return Flux.generate(() -> inputStream, (is, sink) -> { + long pos = currentTotalLength[0]; + + long count = (pos + blockSize) > size ? (size - pos) : blockSize; + byte[] cache = new byte[(int) count]; + + int numOfBytes = 0; + int offset = 0; + // Revise the casting if the max allowed network data transmission is over 2G. + int len = (int) count; + + while (numOfBytes != -1 && offset < count) { + try { + numOfBytes = inputStream.read(cache, offset, len); + if (numOfBytes != -1) { + offset += numOfBytes; + len -= numOfBytes; + currentTotalLength[0] += numOfBytes; + } + } catch (IOException e) { + sink.error(e); + return is; + } + } + + if (numOfBytes == -1 && currentTotalLength[0] < size) { + sink.error(LOGGER.logThrowableAsError(new UnexpectedLengthException(String.format( + "Request body emitted %d bytes, less than the expected %d bytes.", + currentTotalLength[0], size), currentTotalLength[0], size))); + return is; + } + + // Validate that stream isn't longer. + if (currentTotalLength[0] >= size) { + try { + if (inputStream.read() != -1) { + long totalLength = 1 + currentTotalLength[0] + inputStream.available(); + sink.error(LOGGER.logThrowableAsError(new UnexpectedLengthException( + String.format("Request body emitted %d bytes, more than the expected %d bytes.", + totalLength, size), totalLength, size))); + return is; + } else if (currentTotalLength[0] > size) { + sink.error(LOGGER.logThrowableAsError(new IllegalStateException( + String.format("Read more data than was requested. Size of data read: %d. Size of data" + + " requested: %d", currentTotalLength[0], size)))); + return is; + } + } catch (IOException e) { + sink.error(LOGGER.logThrowableAsError(new RuntimeException("I/O errors occurred", e))); + return is; + } + } + + sink.next(ByteBuffer.wrap(cache, 0, offset)); + if (currentTotalLength[0] == size) { + sink.complete(); + } + return is; + }); + }); + } +} diff --git a/sdk/storage/azure-storage-stress-v2/src/main/java/com/azure/v2/storage/stress/CrcOutputStream.java b/sdk/storage/azure-storage-stress-v2/src/main/java/com/azure/v2/storage/stress/CrcOutputStream.java new file mode 100644 index 000000000000..e648f1510c6c --- /dev/null +++ b/sdk/storage/azure-storage-stress-v2/src/main/java/com/azure/v2/storage/stress/CrcOutputStream.java @@ -0,0 +1,42 @@ +package com.azure.v2.storage.stress; + +import reactor.core.publisher.Mono; +import reactor.core.publisher.Sinks; + +import java.io.IOException; +import java.io.OutputStream; +import java.nio.ByteBuffer; +import java.util.zip.CRC32; + +public class CrcOutputStream extends OutputStream { + private final Sinks.One sink = Sinks.one(); + private final CRC32 crc = new CRC32(); + private long length = 0; + private final ByteBuffer head = ByteBuffer.allocate(1024); + @Override + public synchronized void write(int b) { + crc.update(b); + if (head.hasRemaining()) { + head.put((byte)b); + } + length ++; + } + + public synchronized void write(byte buf[], int off, int len) { + crc.update(buf, off, len); + if (head.hasRemaining()) { + head.put(buf, off, Math.min(len, head.remaining())); + } + length += len; + } + + @Override + public void close() throws IOException { + sink.emitValue(new ContentInfo(crc.getValue(), length, head), Sinks.EmitFailureHandler.FAIL_FAST); + super.close(); + } + + public Mono getContentInfo() { + return sink.asMono(); + } +} diff --git a/sdk/storage/azure-storage-stress-v2/src/main/java/com/azure/v2/storage/stress/FaultInjectingHttpPolicy.java b/sdk/storage/azure-storage-stress-v2/src/main/java/com/azure/v2/storage/stress/FaultInjectingHttpPolicy.java new file mode 100644 index 000000000000..5ccc12c3c913 --- /dev/null +++ b/sdk/storage/azure-storage-stress-v2/src/main/java/com/azure/v2/storage/stress/FaultInjectingHttpPolicy.java @@ -0,0 +1,150 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.v2.storage.stress; + +import io.clientcore.core.http.models.HttpHeaderName; +import io.clientcore.core.http.models.HttpRequest; +import io.clientcore.core.http.models.HttpResponse; +import io.clientcore.core.http.models.Response; +import io.clientcore.core.http.pipeline.HttpPipelineNextPolicy; +import io.clientcore.core.http.pipeline.HttpPipelinePolicy; +import io.clientcore.core.instrumentation.logging.ClientLogger; +import io.clientcore.core.util.UriBuilder; +import reactor.util.function.Tuple2; +import reactor.util.function.Tuples; + +import java.net.URI; +import java.net.URISyntaxException; +import java.util.ArrayList; +import java.util.List; + +public class FaultInjectingHttpPolicy implements HttpPipelinePolicy { + private static final ClientLogger LOGGER = new ClientLogger(FaultInjectingHttpPolicy.class); + private static final HttpHeaderName TRACEPARENT_HEADER = HttpHeaderName.fromString("traceparent"); + private static final HttpHeaderName UPSTREAM_URI_HEADER = HttpHeaderName.fromString("X-Upstream-Base-Uri"); + private static final HttpHeaderName HTTP_FAULT_INJECTOR_RESPONSE_HEADER = HttpHeaderName.fromString("x-ms-faultinjector-response-option"); + private static final HttpHeaderName SERVER_REQUEST_ID_HEADER = HttpHeaderName.fromString("x-ms-request-id"); + private static final HttpHeaderName X_MS_CLIENT_REQUEST_ID = HttpHeaderName.fromString("x-ms-client-request-id"); + + private final boolean https; + private final List> probabilities; + + public FaultInjectingHttpPolicy(boolean https, FaultInjectionProbabilities probabilities, boolean isUploadFaultsEnabled) { + this.https = https; + this.probabilities = new ArrayList<>(); + + if (isUploadFaultsEnabled) { + addRequestFaultedProbabilities(probabilities); + } else { + addResponseFaultedProbabilities(probabilities); + } + } + + // May remove later since this is for local debugging only. + private static void logResponse(String faultType, HttpRequest request, HttpResponse response) { + LOGGER.atInfo() + .addKeyValue(HTTP_FAULT_INJECTOR_RESPONSE_HEADER.getCaseInsensitiveName(), faultType) + .addKeyValue(X_MS_CLIENT_REQUEST_ID.getCaseInsensitiveName(), request.getHeaders().getValue(X_MS_CLIENT_REQUEST_ID)) + .addKeyValue(SERVER_REQUEST_ID_HEADER.getCaseInsensitiveName(), response == null ? null : response.getHeaders().getValue(SERVER_REQUEST_ID_HEADER)) + .addKeyValue(TRACEPARENT_HEADER.getCaseInsensitiveName(), request.getHeaders().getValue(TRACEPARENT_HEADER)) + .addKeyValue("responseCode", response == null ? null : response.getStatusCode()) + .log("HTTP response with fault injection"); + } + + private URI rewriteUrl(URI originalUrl) { + try { + return UriBuilder.parse(originalUrl) + .setScheme(https ? "https" : "http") + .setHost("localhost") + .setPort(https ? 7778 : 7777) + .toUri(); + } catch (URISyntaxException e) { + throw new RuntimeException(e); + } + } + + private String faultInjectorHandling() { + double random = Math.random(); + double sum = 0d; + + for (Tuple2 tup : probabilities) { + if (random < sum + tup.getT1()) { + return tup.getT2(); + } + + sum += tup.getT1(); + } + + return "f"; + } + + @Override + public Response process(HttpRequest request, HttpPipelineNextPolicy next) { + URI originalUrl = request.getUri(); + + String faultType = injectFault(request); + try { + logResponse(faultType, request, null); + + return cleanup(next.process(), originalUrl); + } catch (Exception e) { + logResponse(faultType, request, null); + + throw e; + } + } + + private String injectFault(HttpRequest request) { + URI originalUrl = request.getUri(); + + request.getHeaders().set(UPSTREAM_URI_HEADER, originalUrl.toString()); + request.setUri(rewriteUrl(originalUrl)); + + String faultType = faultInjectorHandling(); + + request.getHeaders().set(HTTP_FAULT_INJECTOR_RESPONSE_HEADER, faultType); + + return faultType; + } + + private Response cleanup(Response response, URI originalUri) { + response.getRequest().setUri(originalUri); + response.getRequest().getHeaders().remove(UPSTREAM_URI_HEADER); + + return response; + } + + private void addRequestFaultedProbabilities(FaultInjectionProbabilities probabilities) { + // pq: Partial Request (full headers, 50% of body), then wait indefinitely + // pqc: Partial Request (full headers, 50% of body), then close (TCP FIN) + // pqa: Partial Request (full headers, 50% of body), then abort (TCP RST) + // nq: No Request, then wait indefinitely + // nqc: No Request, then close (TCP FIN) + // nqa: No Request, then abort (TCP RST) + this.probabilities.add(Tuples.of(probabilities.getPartialRequestIndefinite(), "pq")); + this.probabilities.add(Tuples.of(probabilities.getPartialRequestClose(), "pqc")); + this.probabilities.add(Tuples.of(probabilities.getPartialRequestAbort(), "pqa")); + this.probabilities.add(Tuples.of(probabilities.getNoRequestIndefinite(), "nq")); + this.probabilities.add(Tuples.of(probabilities.getNoRequestClose(), "nqc")); + this.probabilities.add(Tuples.of(probabilities.getNoRequestAbort(), "nqa")); + } + + private void addResponseFaultedProbabilities(FaultInjectionProbabilities probabilities) { + // f: Full response + // p: Partial Response (full headers, 50% of body), then wait indefinitely + // pc: Partial Response (full headers, 50% of body), then close (TCP FIN) + // pa: Partial Response (full headers, 50% of body), then abort (TCP RST) + // pn: Partial Response (full headers, 50% of body), then finish normally + // n: No response, then wait indefinitely + // nc: No response, then close (TCP FIN) + // na: No response, then abort (TCP RST) + this.probabilities.add(Tuples.of(probabilities.getPartialResponseIndefinite(), "p")); + this.probabilities.add(Tuples.of(probabilities.getPartialResponseClose(), "pc")); + this.probabilities.add(Tuples.of(probabilities.getPartialResponseAbort(), "pa")); + this.probabilities.add(Tuples.of(probabilities.getPartialResponseFinishNormal(), "pn")); + this.probabilities.add(Tuples.of(probabilities.getNoResponseIndefinite(), "n")); + this.probabilities.add(Tuples.of(probabilities.getNoResponseClose(), "nc")); + this.probabilities.add(Tuples.of(probabilities.getNoResponseAbort(), "na")); + } +} diff --git a/sdk/storage/azure-storage-stress-v2/src/main/java/com/azure/v2/storage/stress/FaultInjectionProbabilities.java b/sdk/storage/azure-storage-stress-v2/src/main/java/com/azure/v2/storage/stress/FaultInjectionProbabilities.java new file mode 100644 index 000000000000..8d1f36e29c24 --- /dev/null +++ b/sdk/storage/azure-storage-stress-v2/src/main/java/com/azure/v2/storage/stress/FaultInjectionProbabilities.java @@ -0,0 +1,175 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.v2.storage.stress; + +public class FaultInjectionProbabilities { + // f: Full response + // p: Partial Response (full headers, 50% of body), then wait indefinitely + // pc: Partial Response (full headers, 50% of body), then close (TCP FIN) + // pa: Partial Response (full headers, 50% of body), then abort (TCP RST) + // pn: Partial Response (full headers, 50% of body), then finish normally + // n: No response, then wait indefinitely + // nc: No response, then close (TCP FIN) + // na: No response, then abort (TCP RST) + private double noResponseIndefinite; + private double noResponseClose; + private double noResponseAbort; + private double partialResponseIndefinite; + private double partialResponseClose; + private double partialResponseAbort; + private double partialResponseFinishNormal; + // pq: Partial Request (full headers, 50% of body), then wait indefinitely + // pqc: Partial Request (full headers, 50% of body), then close (TCP FIN) + // pqa: Partial Request (full headers, 50% of body), then abort (TCP RST) + // nq: No Request, then wait indefinitely + // nqc: No Request, then close (TCP FIN) + // nqa: No Request, then abort (TCP RST) + private double partialRequestIndefinite; + private double partialRequestClose; + private double partialRequestAbort; + private double noRequestIndefinite; + private double noRequestClose; + private double noRequestAbort; + + private double getExistingSum() { + return noResponseIndefinite + noResponseClose + noResponseAbort + partialResponseIndefinite + + partialResponseClose + partialResponseAbort + partialResponseFinishNormal; + } + private void validateProbabilityChange(double netChange) { + double newSum = getExistingSum() + netChange; + if (newSum > 1d) { + throw new IllegalStateException(String.format("Probability sum cannot exceed 1. Got %4f.", newSum)); + } + } + + public double getNoResponseIndefinite() { + return noResponseIndefinite; + } + + public FaultInjectionProbabilities setNoResponseIndefinite(double noResponseIndefinite) { + validateProbabilityChange(noResponseIndefinite - this.noResponseIndefinite); + this.noResponseIndefinite = noResponseIndefinite; + return this; + } + + public double getNoResponseClose() { + return noResponseClose; + } + + public FaultInjectionProbabilities setNoResponseClose(double noResponseClose) { + validateProbabilityChange(noResponseClose - this.noResponseClose); + this.noResponseClose = noResponseClose; + return this; + } + + public double getNoResponseAbort() { + return noResponseAbort; + } + + public FaultInjectionProbabilities setNoResponseAbort(double noResponseAbort) { + validateProbabilityChange(noResponseAbort - this.noResponseAbort); + this.noResponseAbort = noResponseAbort; + return this; + } + + public double getPartialResponseIndefinite() { + return partialResponseIndefinite; + } + + public FaultInjectionProbabilities setPartialResponseIndefinite(double partialResponseIndefinite) { + validateProbabilityChange(partialResponseIndefinite - this.partialResponseIndefinite); + this.partialResponseIndefinite = partialResponseIndefinite; + return this; + } + + public double getPartialResponseClose() { + return partialResponseClose; + } + + public FaultInjectionProbabilities setPartialResponseClose(double partialResponseClose) { + validateProbabilityChange(partialResponseClose - this.partialResponseClose); + this.partialResponseClose = partialResponseClose; + return this; + } + + public double getPartialResponseAbort() { + return partialResponseAbort; + } + + public FaultInjectionProbabilities setPartialResponseAbort(double partialResponseAbort) { + validateProbabilityChange(partialResponseAbort - this.partialResponseAbort); + this.partialResponseAbort = partialResponseAbort; + return this; + } + + public double getPartialResponseFinishNormal() { + return partialResponseFinishNormal; + } + + public FaultInjectionProbabilities setPartialResponseFinishNormal(double partialResponseFinishNormal) { + validateProbabilityChange(partialResponseFinishNormal - this.partialResponseFinishNormal); + this.partialResponseFinishNormal = partialResponseFinishNormal; + return this; + } + + public double getPartialRequestIndefinite() { + return partialRequestIndefinite; + } + + public FaultInjectionProbabilities setPartialRequestIndefinite(double partialRequestIndefinite) { + validateProbabilityChange(partialRequestIndefinite - this.partialRequestIndefinite); + this.partialRequestIndefinite = partialRequestIndefinite; + return this; + } + + public double getPartialRequestClose() { + return partialRequestClose; + } + + public FaultInjectionProbabilities setPartialRequestClose(double partialRequestClose) { + validateProbabilityChange(partialRequestClose - this.partialRequestClose); + this.partialRequestClose = partialRequestClose; + return this; + } + + public double getPartialRequestAbort() { + return partialRequestAbort; + } + + public FaultInjectionProbabilities setPartialRequestAbort(double partialRequestAbort) { + validateProbabilityChange(partialRequestAbort - this.partialRequestAbort); + this.partialRequestAbort = partialRequestAbort; + return this; + } + + public double getNoRequestIndefinite() { + return noRequestIndefinite; + } + + public FaultInjectionProbabilities setNoRequestIndefinite(double noRequestIndefinite) { + validateProbabilityChange(noRequestIndefinite - this.noRequestIndefinite); + this.noRequestIndefinite = noRequestIndefinite; + return this; + } + + public double getNoRequestClose() { + return noRequestClose; + } + + public FaultInjectionProbabilities setNoRequestClose(double noRequestClose) { + validateProbabilityChange(noRequestClose - this.noRequestClose); + this.noRequestClose = noRequestClose; + return this; + } + + public double getNoRequestAbort() { + return noRequestAbort; + } + + public FaultInjectionProbabilities setNoRequestAbort(double noRequestAbort) { + validateProbabilityChange(noRequestAbort - this.noRequestAbort); + this.noRequestAbort = noRequestAbort; + return this; + } +} diff --git a/sdk/storage/azure-storage-stress-v2/src/main/java/com/azure/v2/storage/stress/RepeatingInputStream.java b/sdk/storage/azure-storage-stress-v2/src/main/java/com/azure/v2/storage/stress/RepeatingInputStream.java new file mode 100644 index 000000000000..41ae17a6813a --- /dev/null +++ b/sdk/storage/azure-storage-stress-v2/src/main/java/com/azure/v2/storage/stress/RepeatingInputStream.java @@ -0,0 +1,117 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.v2.storage.stress; + +import io.clientcore.core.util.binarydata.BinaryData; + +import java.io.IOException; +import java.io.InputStream; +import java.util.Random; + +/** + * Represents a repeating input stream with mark support enabled. + */ +public class RepeatingInputStream extends InputStream { + private static final byte[] RANDOM_BYTES; + private final long size; + + private long mark = 0; + private long readLimit = Long.MAX_VALUE; + private long pos = 0; + private final byte[] source; + static { + int randomLength = Integer.parseInt(System.getProperty("azure.core.perf.test.data.buffer.size", "1048576")); // 1MB default; + + Random random = new Random(0); + RANDOM_BYTES = new byte[randomLength]; + random.nextBytes(RANDOM_BYTES); + } + + /** + * Creates an Instance of the repeating input stream. + * @param size the size of the stream. + */ + public RepeatingInputStream(long size) { + this.size = size; + this.source = RANDOM_BYTES; + } + + /** + * Creates an instance of the stream which repeats the given buffer. + * @param source the buffer to repeat. Must be relatively small and fit into memory. + * @param size the size of the stream. + */ + public RepeatingInputStream(BinaryData source, long size) { + this.size = size; + this.source = source.toBytes(); + } + + @Override + public synchronized int read() { + return (pos < size) ? getByte(pos) : -1; + } + + @Override + public synchronized int read(byte[] b) { + return read(b, 0, b.length); + } + + @Override + public synchronized int read(byte[] b, int off, int len) { + if (pos >= size || pos >= readLimit) { + return -1; + } + + int posSrc = (int) (pos % source.length); + int readCount = Math.min(len, source.length - posSrc); + + long remainingDest = this.size - this.pos; + if (remainingDest < readCount) { + readCount = (int) remainingDest; + } + System.arraycopy(source, posSrc, b, off, readCount); + pos += readCount; + + return readCount; + } + + @Override + public synchronized void mark(int readLimit) { + this.readLimit = readLimit; + this.mark = this.pos; + } + + /** + * Same as {@link #mark(int)} but takes long. + * @param readLimit read limit. + */ + public synchronized void mark(long readLimit) { + this.readLimit = readLimit; + this.mark = this.pos; + } + + @Override + public boolean markSupported() { + return true; + } + + @Override + public synchronized void reset() { + this.pos = this.mark; + } + + @Override + public int available() throws IOException { + long remaining = this.size - this.pos; + if (remaining > Integer.MAX_VALUE) { + return Integer.MAX_VALUE; + } else { + return (int) remaining; + } + } + + private int getByte(long pos) { + return source[(int) (pos % source.length)] & 0xFF; + } +} diff --git a/sdk/storage/azure-storage-stress-v2/src/main/java/com/azure/v2/storage/stress/StorageStressOptions.java b/sdk/storage/azure-storage-stress-v2/src/main/java/com/azure/v2/storage/stress/StorageStressOptions.java new file mode 100644 index 000000000000..87caaef61d05 --- /dev/null +++ b/sdk/storage/azure-storage-stress-v2/src/main/java/com/azure/v2/storage/stress/StorageStressOptions.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.v2.storage.stress; + +import com.azure.perf.test.core.PerfStressOptions; +import com.beust.jcommander.Parameter; +import io.clientcore.core.util.configuration.Configuration; + +public class StorageStressOptions extends PerfStressOptions { + @Parameter(names = { "--downloadFaults" }, description = "Enable fault injection for downloads") + private boolean enableFaultInjectionDownloads = false; + @Parameter(names = { "--uploadFaults" }, description = "Enable fault injection for uploads") + private boolean enableFaultInjectionUploads = false; + @Parameter(names = { "--endpoint"}, description = "Storage endpoint string") + private String endpointString = Configuration.getGlobalConfiguration().get("STORAGE_ENDPOINT_STRING"); + @Parameter(names = { "--pbEndpoint"}, description = "Page Blob Storage endpoint string") + private String pageBlobEndpointString = Configuration.getGlobalConfiguration().get("PAGE_BLOB_STORAGE_ENDPOINT_STRING"); + @Parameter(names = { "--maxConcurrency" }, description = "Max concurrency of ParallelTransferOptions") + private int maxConcurrency = 1; + + public boolean isFaultInjectionEnabledForDownloads() { + return enableFaultInjectionDownloads; + } + + /** + * If fault injection is enabled, this flag will be used to determine if the request should be faulted. + * If fault injection is not enabled, this flag will be ignored. + * True: The request will be faulted. False: The response will be faulted. Default is false. + * @return whether the request is faulted. + */ + public boolean isFaultInjectionEnabledForUploads() { + return enableFaultInjectionUploads; + } + + public String getEndpointString() { + return endpointString; + } + + public String getPageBlobEndpointString() { + return pageBlobEndpointString; + } + + /** + * Get the max concurrency of ParallelTransferOptions. + * @return the max concurrency of ParallelTransferOptions. + */ + public int getMaxConcurrency() { + return maxConcurrency; + } +} diff --git a/sdk/storage/azure-storage-stress-v2/src/main/java/com/azure/v2/storage/stress/TelemetryHelper.java b/sdk/storage/azure-storage-stress-v2/src/main/java/com/azure/v2/storage/stress/TelemetryHelper.java new file mode 100644 index 000000000000..54a39f6ef7a9 --- /dev/null +++ b/sdk/storage/azure-storage-stress-v2/src/main/java/com/azure/v2/storage/stress/TelemetryHelper.java @@ -0,0 +1,301 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.v2.storage.stress; + +import com.azure.monitor.opentelemetry.autoconfigure.AzureMonitorAutoConfigure; +import io.clientcore.core.instrumentation.logging.ClientLogger; +import io.netty.channel.unix.Errors; +import io.opentelemetry.api.OpenTelemetry; +import io.opentelemetry.api.common.AttributeKey; +import io.opentelemetry.api.common.Attributes; +import io.opentelemetry.api.metrics.DoubleHistogram; +import io.opentelemetry.api.metrics.Meter; +import io.opentelemetry.api.trace.Span; +import io.opentelemetry.api.trace.SpanKind; +import io.opentelemetry.api.trace.StatusCode; +import io.opentelemetry.api.trace.Tracer; +import io.opentelemetry.context.Context; +import io.opentelemetry.context.Scope; +import io.opentelemetry.instrumentation.logback.appender.v1_0.OpenTelemetryAppender; +import io.opentelemetry.instrumentation.runtimemetrics.java8.Classes; +import io.opentelemetry.instrumentation.runtimemetrics.java8.Cpu; +import io.opentelemetry.instrumentation.runtimemetrics.java8.GarbageCollector; +import io.opentelemetry.instrumentation.runtimemetrics.java8.MemoryPools; +import io.opentelemetry.instrumentation.runtimemetrics.java8.Threads; +import io.opentelemetry.sdk.autoconfigure.AutoConfiguredOpenTelemetrySdk; +import io.opentelemetry.sdk.autoconfigure.AutoConfiguredOpenTelemetrySdkBuilder; +import io.opentelemetry.sdk.trace.data.LinkData; +import io.opentelemetry.sdk.trace.samplers.Sampler; +import io.opentelemetry.sdk.trace.samplers.SamplingResult; +import reactor.core.Exceptions; +import reactor.core.publisher.Mono; +import reactor.core.scheduler.Schedulers; + +import java.time.Instant; +import java.util.List; +import java.util.concurrent.TimeoutException; +import java.util.concurrent.atomic.AtomicLong; +import java.util.function.Function; + +/** + * Telemetry helper is used to monitor test execution and record stats. + */ +public class TelemetryHelper { + private final Tracer tracer; + private final ClientLogger logger; + private static final AttributeKey SCENARIO_NAME_ATTRIBUTE = AttributeKey.stringKey("scenario_name"); + private static final AttributeKey ERROR_TYPE_ATTRIBUTE = AttributeKey.stringKey("error.type"); + private static final AttributeKey SAMPLE_IN_ATTRIBUTE = AttributeKey.booleanKey("sample.in"); + private static final OpenTelemetry OTEL; + private final String scenarioName; + private final Meter meter; + private final DoubleHistogram runDuration; + private final Attributes commonAttributes; + private final Attributes canceledAttributes; + private final String packageType; + + private final AtomicLong successfulRuns = new AtomicLong(); + private final AtomicLong failedRuns = new AtomicLong(); + + static { + // enables micrometer metrics from Reactor schedulers allowing to monitor thread pool usage and starvation + Schedulers.enableMetrics(); + OTEL = init(); + } + + /** + * Creates an instance of telemetry helper. + * @param scenarioClass the scenario class + */ + public TelemetryHelper(Class scenarioClass) { + this.scenarioName = scenarioClass.getName(); + this.tracer = OTEL.getTracer(scenarioName); + this.meter = OTEL.getMeter(scenarioName); + this.logger = new ClientLogger(scenarioName); + this.runDuration = meter.histogramBuilder("test.run.duration") + .setUnit("s") + .build(); + this.commonAttributes = Attributes.of(SCENARIO_NAME_ATTRIBUTE, scenarioName); + this.canceledAttributes = Attributes.of(SCENARIO_NAME_ATTRIBUTE, scenarioName, ERROR_TYPE_ATTRIBUTE, "cancelled"); + this.packageType = scenarioClass.getPackage().toString(); + } + + /** + * Initializes telemetry helper: sets up Azure Monitor exporter, enables JVM metrics collection. + */ + public static OpenTelemetry init() { + if (OTEL != null) { + return OTEL; + } + + System.setProperty("otel.java.global-autoconfigure.enabled", "true"); + + AutoConfiguredOpenTelemetrySdkBuilder sdkBuilder = AutoConfiguredOpenTelemetrySdk.builder(); + String applicationInsightsConnectionString = System.getenv("APPLICATIONINSIGHTS_CONNECTION_STRING"); + if (applicationInsightsConnectionString == null) { + System.setProperty("otel.traces.exporter", "none"); + System.setProperty("otel.metrics.exporter", "none"); + System.setProperty("otel.logs.exporter", "none"); + } else { + AzureMonitorAutoConfigure.customize(sdkBuilder, applicationInsightsConnectionString); + } + + OpenTelemetry otel = sdkBuilder + .addSamplerCustomizer((sampler, props) -> new Sampler() { + @Override + public SamplingResult shouldSample(Context parentContext, String traceId, String name, SpanKind spanKind, Attributes attributes, List parentLinks) { + if (Boolean.TRUE.equals(attributes.get(SAMPLE_IN_ATTRIBUTE))) { + return SamplingResult.recordAndSample(); + } + return sampler.shouldSample(parentContext, traceId, name, spanKind, attributes, parentLinks); + } + + @Override + public String getDescription() { + return sampler.getDescription(); + } + }) + .setResultAsGlobal() + .build() + .getOpenTelemetrySdk(); + Classes.registerObservers(otel); + Cpu.registerObservers(otel); + MemoryPools.registerObservers(otel); + Threads.registerObservers(otel); + GarbageCollector.registerObservers(otel); + OpenTelemetryAppender.install(otel); + return otel; + } + + /** + * Instruments a runnable: records runnable duration along with the status (success, error, cancellation), + * @param oneRun the runnable to instrument + */ + @SuppressWarnings("try") + public void instrumentRun(ThrowingFunction oneRun) { + Instant start = Instant.now(); + Span span = tracer.spanBuilder("run").startSpan(); + try (Scope s = span.makeCurrent()) { + com.azure.core.util.Context ctx = new com.azure.core.util.Context(com.azure.core.util.tracing.Tracer.PARENT_TRACE_CONTEXT_KEY, io.opentelemetry.context.Context.current()); + oneRun.run(ctx); + trackSuccess(start, span); + } catch (Throwable e) { + if (e.getMessage().contains("Timeout on blocking read") || e instanceof InterruptedException || e instanceof TimeoutException) { + trackCancellation(start, span); + } else { + trackFailure(start, e, span); + } + } + } + + /** + * Instruments a Mono: records mono duration along with the status (success, error, cancellation), + * @param runAsync the mono to instrument + * @return the instrumented mono + */ + @SuppressWarnings("try") + public Mono instrumentRunAsync(Function> runAsync) { + return Mono.defer(() -> { + Instant start = Instant.now(); + Span span = tracer.spanBuilder("runAsync").startSpan(); + try (Scope s = span.makeCurrent()) { + com.azure.core.util.Context ctx = new com.azure.core.util.Context(com.azure.core.util.tracing.Tracer.PARENT_TRACE_CONTEXT_KEY, io.opentelemetry.context.Context.current()); + return runAsync.apply(ctx).doOnError(e -> trackFailure(start, e, span)) + .doOnCancel(() -> trackCancellation(start, span)) + .doOnSuccess(v -> trackSuccess(start, span)) + .contextWrite(reactor.util.context.Context.of(com.azure.core.util.tracing.Tracer.PARENT_TRACE_CONTEXT_KEY, io.opentelemetry.context.Context.current())); + } + }); + } + + private void trackSuccess(Instant start, Span span) { + logger.atVerbose() + .addKeyValue("traceId", span.getSpanContext().getTraceId()) + .addKeyValue("status", "success") + .log("run ended"); + + runDuration.record(getDuration(start), commonAttributes); + successfulRuns.incrementAndGet(); + span.end(); + logger.atInfo().log("track success"); + } + + private void trackCancellation(Instant start, Span span) { + logger.atWarning() + .addKeyValue("error.type", "cancelled") + .log("run ended"); + + runDuration.record(getDuration(start), canceledAttributes); + span.setAttribute(ERROR_TYPE_ATTRIBUTE, "cancelled"); + span.setStatus(StatusCode.ERROR); + span.end(); + } + + private void trackFailure(Instant start, Throwable e, Span span) { + Throwable unwrapped = Exceptions.unwrap(e); + + // Check if the unwrapped exception is a RuntimeException + // Check if the message contains "NativeIoException" or TimeoutException and the unwrapped exception is not + // already a NativeIoException/TimeoutException + if (unwrapped instanceof RuntimeException) { + String message = unwrapped.getMessage(); + if (message.contains("NativeIoException")) { + unwrapped = new io.netty.channel.unix.Errors.NativeIoException("recvAddress", Errors.ERRNO_ECONNRESET_NEGATIVE); + } else if (message.contains("TimeoutException")) { + unwrapped = new TimeoutException(message); + } + } + + span.recordException(unwrapped); + span.setAttribute(ERROR_TYPE_ATTRIBUTE, unwrapped.getClass().getName()); + span.setStatus(StatusCode.ERROR, unwrapped.getMessage()); + + String errorType = unwrapped.getClass().getName(); + logger.atError() + .addKeyValue("error.type", errorType) + // due to sampling, most of the logs are available in console/file share' + // without trace context. + // The only way to correlate them is to explicitly log traceId/ + .addKeyValue("traceId", span.getSpanContext().getTraceId()) + .log("run ended", unwrapped); + + Attributes attributes = Attributes.of(SCENARIO_NAME_ATTRIBUTE, scenarioName, ERROR_TYPE_ATTRIBUTE, errorType); + runDuration.record(getDuration(start), attributes); + failedRuns.incrementAndGet(); + logger.atInfo().log("track failure"); + span.end(); + } + + /** + * Records an event representing the start of a test along with test options. + * @param options test parameters + */ + public void recordStart(StorageStressOptions options) { + Span before = startSampledInSpan("before run"); + before.setAttribute(AttributeKey.longKey("durationSec"), options.getDuration()); + before.setAttribute(AttributeKey.stringKey("scenarioName"), scenarioName); + before.setAttribute(AttributeKey.longKey("concurrency"), options.getParallel()); + before.setAttribute(AttributeKey.stringKey("storagePackageVersion"), this.packageType); + before.setAttribute(AttributeKey.booleanKey("sync"), options.isSync()); + before.setAttribute(AttributeKey.longKey("payloadSize"), options.getSize()); + before.setAttribute(AttributeKey.stringKey("hostname"), System.getenv().get("HOSTNAME")); + before.setAttribute(AttributeKey.booleanKey("faultInjectionForDownloads"), options.isFaultInjectionEnabledForDownloads()); + before.setAttribute(AttributeKey.booleanKey("faultInjectionForUploads"), options.isFaultInjectionEnabledForUploads()); + before.setAttribute(AttributeKey.stringKey("httpClientProvider"), options.getHttpClient().toString()); + before.setAttribute(AttributeKey.stringKey("jreVersion"), System.getProperty("java.version")); + before.setAttribute(AttributeKey.stringKey("jreVendor"), System.getProperty("java.vendor")); + before.end(); + + // be sure to remove logging afterwards + logger.atInfo() + .addKeyValue("duration", options.getDuration()) + .addKeyValue("payloadSize", options.getSize()) + .addKeyValue("concurrency", options.getParallel()) + .addKeyValue("faultInjectionForDownloads", options.isFaultInjectionEnabledForDownloads()) + .addKeyValue("faultInjectionForUploads", options.isFaultInjectionEnabledForUploads()) + .addKeyValue("storagePackageVersion", this.packageType) + .addKeyValue("sync", options.isSync()) + .addKeyValue("scenarioName", scenarioName) + .log("starting test"); + logger.atInfo().log("starting test"); + } + + /** + * Records an event representing the end of the test. + * @param startTime the start time of the test + */ + public void recordEnd(Instant startTime) { + Span after = startSampledInSpan("after run"); + after.setAttribute(AttributeKey.longKey("succeeded"), successfulRuns.get()); + after.setAttribute(AttributeKey.longKey("failed"), failedRuns.get()); + after.setAttribute(AttributeKey.longKey("durationMs"), Instant.now().toEpochMilli() - startTime.toEpochMilli()); + after.end(); + + // be sure to remove logging afterwards + logger.atInfo() + .addKeyValue("scenarioName", scenarioName) + .addKeyValue("succeeded", successfulRuns.get()) + .addKeyValue("failed", failedRuns.get()) + .log("test finished"); + } + + + private Span startSampledInSpan(String name) { + return tracer.spanBuilder(name) + // guarantee that we have before/after spans sampled in + // and record duration/result of the test + .setAttribute(SAMPLE_IN_ATTRIBUTE, true) + .startSpan(); + } + + private static double getDuration(Instant start) { + return Math.max(0d, Instant.now().toEpochMilli() - start.toEpochMilli()) / 1000d; + } + + @FunctionalInterface + public interface ThrowingFunction { + void run(com.azure.core.util.Context context) throws Exception; + } + +} diff --git a/sdk/storage/azure-storage-stress-v2/src/main/resources/logback.xml b/sdk/storage/azure-storage-stress-v2/src/main/resources/logback.xml new file mode 100644 index 000000000000..e01c5f8d6715 --- /dev/null +++ b/sdk/storage/azure-storage-stress-v2/src/main/resources/logback.xml @@ -0,0 +1,23 @@ + + + + + %d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n + + + + + + + + + + + + + # this is the category used by HTTP logging policy, add more/adjust as needed + + + + diff --git a/sdk/storage/pom.xml b/sdk/storage/pom.xml index bacfe64eaca0..626196dfc903 100644 --- a/sdk/storage/pom.xml +++ b/sdk/storage/pom.xml @@ -27,5 +27,6 @@ azure-storage-blob-v2 + azure-storage-stress-v2 From e4500b47283e11066dc608ddd89dd5f59c611562 Mon Sep 17 00:00:00 2001 From: vcolin7 Date: Wed, 12 Feb 2025 00:15:30 -0800 Subject: [PATCH 11/26] Added azure-storage-blob-stress-v2 module. --- .../azure-storage-blob-stress-v2/.helmignore | 1 + .../azure-storage-blob-stress-v2/Chart.yaml | 14 + .../azure-storage-blob-stress-v2/Dockerfile | 41 +++ .../azure-storage-blob-stress-v2/README.md | 229 ++++++++++++ .../azure-storage-blob-stress-v2/pom.xml | 137 ++++++++ .../scenarios-matrix.yaml | 325 ++++++++++++++++++ .../scripts/fault-injector.sh | 4 + .../scripts/stress-run.sh | 4 + .../com/azure/v2/storage/blob/stress/App.java | 31 ++ .../blob/stress/AppendBlobOutputStream.java | 76 ++++ .../v2/storage/blob/stress/AppendBlock.java | 68 ++++ .../storage/blob/stress/BlobScenarioBase.java | 143 ++++++++ .../blob/stress/BlockBlobOutputStream.java | 77 +++++ .../storage/blob/stress/BlockBlobUpload.java | 61 ++++ .../storage/blob/stress/CommitBlockList.java | 85 +++++ .../storage/blob/stress/DownloadContent.java | 59 ++++ .../storage/blob/stress/DownloadStream.java | 58 ++++ .../storage/blob/stress/DownloadToFile.java | 98 ++++++ .../storage/blob/stress/OpenInputStream.java | 65 ++++ .../stress/OpenSeekableByteChannelRead.java | 66 ++++ .../stress/OpenSeekableByteChannelWrite.java | 78 +++++ .../blob/stress/PageBlobOutputStream.java | 100 ++++++ .../blob/stress/PageBlobScenarioBase.java | 141 ++++++++ .../v2/storage/blob/stress/StageBlock.java | 85 +++++ .../azure/v2/storage/blob/stress/Upload.java | 67 ++++ .../storage/blob/stress/UploadFromFile.java | 129 +++++++ .../v2/storage/blob/stress/UploadPages.java | 76 ++++ .../v2/storage/blob/stress/package-info.java | 4 + .../blob/stress/utils/OriginalContent.java | 119 +++++++ .../src/main/resources/logback.xml | 27 ++ .../stress-test-resources.bicep | 30 ++ .../templates/stress-test-job.yaml | 70 ++++ .../workbook/test-workbook.json | 286 +++++++++++++++ sdk/storage/pom.xml | 1 + 34 files changed, 2855 insertions(+) create mode 100644 sdk/storage/azure-storage-blob-stress-v2/.helmignore create mode 100644 sdk/storage/azure-storage-blob-stress-v2/Chart.yaml create mode 100644 sdk/storage/azure-storage-blob-stress-v2/Dockerfile create mode 100644 sdk/storage/azure-storage-blob-stress-v2/README.md create mode 100644 sdk/storage/azure-storage-blob-stress-v2/pom.xml create mode 100644 sdk/storage/azure-storage-blob-stress-v2/scenarios-matrix.yaml create mode 100644 sdk/storage/azure-storage-blob-stress-v2/scripts/fault-injector.sh create mode 100644 sdk/storage/azure-storage-blob-stress-v2/scripts/stress-run.sh create mode 100644 sdk/storage/azure-storage-blob-stress-v2/src/main/java/com/azure/v2/storage/blob/stress/App.java create mode 100644 sdk/storage/azure-storage-blob-stress-v2/src/main/java/com/azure/v2/storage/blob/stress/AppendBlobOutputStream.java create mode 100644 sdk/storage/azure-storage-blob-stress-v2/src/main/java/com/azure/v2/storage/blob/stress/AppendBlock.java create mode 100644 sdk/storage/azure-storage-blob-stress-v2/src/main/java/com/azure/v2/storage/blob/stress/BlobScenarioBase.java create mode 100644 sdk/storage/azure-storage-blob-stress-v2/src/main/java/com/azure/v2/storage/blob/stress/BlockBlobOutputStream.java create mode 100644 sdk/storage/azure-storage-blob-stress-v2/src/main/java/com/azure/v2/storage/blob/stress/BlockBlobUpload.java create mode 100644 sdk/storage/azure-storage-blob-stress-v2/src/main/java/com/azure/v2/storage/blob/stress/CommitBlockList.java create mode 100644 sdk/storage/azure-storage-blob-stress-v2/src/main/java/com/azure/v2/storage/blob/stress/DownloadContent.java create mode 100644 sdk/storage/azure-storage-blob-stress-v2/src/main/java/com/azure/v2/storage/blob/stress/DownloadStream.java create mode 100644 sdk/storage/azure-storage-blob-stress-v2/src/main/java/com/azure/v2/storage/blob/stress/DownloadToFile.java create mode 100644 sdk/storage/azure-storage-blob-stress-v2/src/main/java/com/azure/v2/storage/blob/stress/OpenInputStream.java create mode 100644 sdk/storage/azure-storage-blob-stress-v2/src/main/java/com/azure/v2/storage/blob/stress/OpenSeekableByteChannelRead.java create mode 100644 sdk/storage/azure-storage-blob-stress-v2/src/main/java/com/azure/v2/storage/blob/stress/OpenSeekableByteChannelWrite.java create mode 100644 sdk/storage/azure-storage-blob-stress-v2/src/main/java/com/azure/v2/storage/blob/stress/PageBlobOutputStream.java create mode 100644 sdk/storage/azure-storage-blob-stress-v2/src/main/java/com/azure/v2/storage/blob/stress/PageBlobScenarioBase.java create mode 100644 sdk/storage/azure-storage-blob-stress-v2/src/main/java/com/azure/v2/storage/blob/stress/StageBlock.java create mode 100644 sdk/storage/azure-storage-blob-stress-v2/src/main/java/com/azure/v2/storage/blob/stress/Upload.java create mode 100644 sdk/storage/azure-storage-blob-stress-v2/src/main/java/com/azure/v2/storage/blob/stress/UploadFromFile.java create mode 100644 sdk/storage/azure-storage-blob-stress-v2/src/main/java/com/azure/v2/storage/blob/stress/UploadPages.java create mode 100644 sdk/storage/azure-storage-blob-stress-v2/src/main/java/com/azure/v2/storage/blob/stress/package-info.java create mode 100644 sdk/storage/azure-storage-blob-stress-v2/src/main/java/com/azure/v2/storage/blob/stress/utils/OriginalContent.java create mode 100644 sdk/storage/azure-storage-blob-stress-v2/src/main/resources/logback.xml create mode 100644 sdk/storage/azure-storage-blob-stress-v2/stress-test-resources.bicep create mode 100644 sdk/storage/azure-storage-blob-stress-v2/templates/stress-test-job.yaml create mode 100644 sdk/storage/azure-storage-blob-stress-v2/workbook/test-workbook.json diff --git a/sdk/storage/azure-storage-blob-stress-v2/.helmignore b/sdk/storage/azure-storage-blob-stress-v2/.helmignore new file mode 100644 index 000000000000..2f7896d1d136 --- /dev/null +++ b/sdk/storage/azure-storage-blob-stress-v2/.helmignore @@ -0,0 +1 @@ +target/ diff --git a/sdk/storage/azure-storage-blob-stress-v2/Chart.yaml b/sdk/storage/azure-storage-blob-stress-v2/Chart.yaml new file mode 100644 index 000000000000..8b1496577535 --- /dev/null +++ b/sdk/storage/azure-storage-blob-stress-v2/Chart.yaml @@ -0,0 +1,14 @@ +apiVersion: v2 +name: java-storage-blob-v2 +description: Stress tests for Java Blob Storage +version: 0.1.1 +appVersion: v0.1 +annotations: + stressTest: 'true' # enable auto-discovery of this test via `find-all-stress-packages.ps1` + namespace: 'java' + # CI override to deploy to storage test environment + environment: 'storage' +dependencies: +- name: stress-test-addons + version: ~0.3.0 + repository: "@stress-test-charts" diff --git a/sdk/storage/azure-storage-blob-stress-v2/Dockerfile b/sdk/storage/azure-storage-blob-stress-v2/Dockerfile new file mode 100644 index 000000000000..4c7e14b09f44 --- /dev/null +++ b/sdk/storage/azure-storage-blob-stress-v2/Dockerfile @@ -0,0 +1,41 @@ +ARG REGISTRY="azsdkengsys.azurecr.io" +FROM ${REGISTRY}/java/jdk-mariner-mvn:jdk11-latest AS builder + +RUN yum -y update + +# Add necessary files to the image +RUN mkdir /stress +WORKDIR /stress +ADD ./sdk/storage /stress/sdk/storage +ADD ./sdk/tools /stress/sdk/tools +ADD ./eng /stress/eng +ADD ./common /stress/common +ADD ./sdk/parents /stress/sdk/parents + +# Build storage and stress tests +ARG SKIP_CHECKS="-Dcheckstyle.skip -Dgpg.skip -Dmaven.javadoc.skip -Drevapi.skip -Dspotbugs.skip -Djacoco.skip -DskipTests -Dcodesnippet.skip -Dspotless.skip -Denforcer.skip" +RUN --mount=type=cache,target=/root/.m2 \ + mvn -f /stress/eng/code-quality-reports/pom.xml clean install && \ + mvn -f /stress/sdk/parents/azure-perf-test-parent/pom.xml clean install ${SKIP_CHECKS} && \ + mvn -f /stress/common/perf-test-core/pom.xml clean install ${SKIP_CHECKS} && \ + mvn -f /stress/sdk/parents/azure-perf-test-parent/pom.xml clean install ${SKIP_CHECKS} && \ + mvn -f /stress/sdk/tools/pom.xml clean install ${SKIP_CHECKS} && \ + mvn -f /stress/sdk/storage/azure-storage-common/pom.xml clean install ${SKIP_CHECKS} && \ + mvn -f /stress/sdk/storage/azure-storage-internal-avro/pom.xml clean install ${SKIP_CHECKS} && \ + mvn -f /stress/sdk/storage/azure-storage-blob-v2/pom.xml clean install ${SKIP_CHECKS} && \ + mvn -f /stress/sdk/storage/azure-storage-stress-v2/pom.xml clean install ${SKIP_CHECKS} && \ + mvn -f /stress/sdk/storage/azure-storage-blob-stress-v2/pom.xml clean install ${SKIP_CHECKS} + +FROM mcr.microsoft.com/openjdk/jdk:21-mariner + +RUN yum -y update + +# Required for `ps` command to find and stop the fault injector process +RUN yum install -y procps + +# Copy target files from builder image +WORKDIR /app +COPY --from=builder /stress/sdk/storage/azure-storage-blob-stress-v2/target . + +# This is never executed (since job yaml overrides it) +ENTRYPOINT ["bash"] diff --git a/sdk/storage/azure-storage-blob-stress-v2/README.md b/sdk/storage/azure-storage-blob-stress-v2/README.md new file mode 100644 index 000000000000..a65558b9aabe --- /dev/null +++ b/sdk/storage/azure-storage-blob-stress-v2/README.md @@ -0,0 +1,229 @@ +# Azure Blob Storage V2 Stress Tests + +Represents stress tests for Azure Storage Blob V2 client library. + +## Running tests in stress infra + +Check out [Azure SDK Stress Test Wiki][azure_sdk_stress_test] for general information about stress tests. + +### Prerequisites + +- [Java Development Kit (JDK)][jdk_link], version 8 or later. +- [Maven][maven] +- [Docker][docker] +- [Kubectl][kubectl] +- [Helm][helm] +- [Azure CLI][azure_cli] +- [Powershell 7.0+][powershell] + +### Deploy Stress Test + +cd into `azure-sdk-for-java` root folder and run command to deploy the package to cluster: + +```shell +.\eng\common\scripts\stress-testing\deploy-stress-tests.ps1 -SearchDirectory .\sdk\storage +``` + +### Check Status + +Only the most frequently used commands are listed below. See [Deploying A Stress Test][deploy_stress_test] for more details. + +List deployed packages: + +```shell +helm list -n +``` + +the namespace usually matches your username. + +Get stress test pods and status: + +```shell +kubectl get pods -n +``` + +Get stress test pod logs: + +```shell +kubectl logs -n +# Note that we may define multiple containers (for example, `fault-injector` and `main`) +kubectl logs -n -c +``` + +If stress test pod is in `Error` status, check logs from init container: + +```shell +kubectl logs -n -c init-azure-deployer +``` + +If above command output is empty, there may have been startup failures: + +```shell +kubectl describe pod -n +``` + +Stop and remove deployed package: + +```shell +helm uninstall -n +``` + +### Fault injection + +## Running tests locally + +You can also run stress tests locally with or without fault-injection. +To run test locally: +1. Build `azure-storage-blob-stress-v2` jar file. For example, you can do it with: + ```powershell + cd .\sdk\storage + mvn clean install -pl .\azure-storage-stress-v2\,.\azure-storage-blob-stress-v2 + ``` + As a result, you should have fat jar in `azure-storage-blob-stress-v2\target\azure-storage-blob-stress-v2-1.0.0-beta.1-jar-with-dependencies.jar` +2. Configure environment: + - Set `STORAGE_CONNECTION_STRING`environment variable (connection string to storage account). You may also provide it with `--cs` command line option + - Configure Application Insights: + - Set `APPLICATIONINSIGHTS_CONNECTION_STRING` (connection string to application insights). You may also provide it in any other + way mentioned in the [Enable Application Insights steps][enable_application_insights] + - Set `APPLICATIONINSIGHTS_ROLE_NAME` to `storage-{ random string }` (for example, `storage-foobar`). +3. Run the test, for example, with: + ```powershell + java -javaagent:path\to\applicationinsights-agent.jar ` + -jar .\azure-storage-blob-stress-v2\target\azure-storage-blob-stress-v2-1.0.0-beta.1-jar-with-dependencies.jar ` + downloadtofile --duration 10 --size 1024 --parallel 2 --warmup 0 + ``` + +### Running locally with fault-injection + +If you want to run test with fault-injection locally, you'd need to run fault-injector first: + +1. Install [HTTP fault-injector][http-fault-injector] tool: + ```powershell + dotnet tool install azure.sdk.tools.httpfaultinjector --global --prerelease --add-source https://pkgs.dev.azure.com/azure-sdk/public/_packaging/azure-sdk-for-net/nuget/v3/index.json + ``` + It uses .NET 6, so you might need to install it first. + + You might also need to trust development certificates: + ```powershell + dotnet dev-certs https --trust + ``` +2. Run fault-injector: + ```powershell + http-fault-injector + ``` +3. Then you can run stress test with `--faults` option: + ```powershell + java -javaagent:path\to\applicationinsights-agent.jar ` + -jar .\azure-storage-blob-stress-v2\target\azure-storage-blob-stress-v2-1.0.0-beta.1-jar-with-dependencies.jar ` + downloadtofile --duration 10 --size 1024 --parallel 2 --warmup 0 --faults + ``` + +### Checking test results + +To get a super-quick idea about test results, look for a log record that looks like this: + +```log +14:49:05.219 [main] INFO c.a.s.blob.stress.DownloadToFile - {"az.sdk.message":"test finished","scenarioName":"com.azure.v2.storage.blob.stress.DownloadToFile", + "succeeded":468,"failed":0} +``` + +After the stress test is deployed on the cluster, we can monitor the progress on the Application Insights resource inside the stress test resource group. +There are several dashboards within the stress test resource group that we can use to monitor the AKS pod and stress test status. + +#### Stress Test Dashboard + +General-purpose stress test dashboard is available at https://aka.ms/azsdk/stress/dashboard. It shows: +- Pod status events +- CPU and memory utilization of the stress test pods +- Container logs and events + +Stress test dashboard does not know about local stress test runs. + +#### Application Insights + +Application Insights agent brings rich monitoring experience including: +- resource utilization metrics (CPU, memory, GC, threads, etc.) +- live metrics, performance overview, etc +- distributed tracing and dependency calls (HTTP, Azure SDK calls) +- exceptions and logs +- profiling in production + +Application Insights is useful to: +- monitor and compare throughput and latency across runs +- investigate issues and find bottlenecks + +Application Insights is available for local runs (as long as you provide `-javaagent` option and make sure connection string is configured). + +##### Stress test workbook + +Storage stress test workbook is available [here][storage-workbook] and allows to pick a specific run and see it's summary: +1. Key test parameters +2. Throughput and latency charts +3. Failed operations including their status and fault injected (if any) +4. CPU and memory usage +5. Errors/warnings and exceptions in logs + +The workbook relies on tests to emit: +- certain logs in a specific format produced by [TelemetryHelper][telemetry-helper] class +- certain spans produced in [BlobScenarioBase][blob-scenario-base] class. +- report cloud role name that follows `storage-{runId}` pattern. + Make sure to set `APPLICATIONINSIGHTS_ROLE_NAME` environment variable accordingly to make sure run appears on the dashboard. + +_Note: some failures are expected and there is no clear 'success' criteria for the stress test_ + +Here are a few things that clearly indicate an issue: +- Content mismatch - they can be detected in following ways: + - workbook shows that some operations has failed with `content mismatch` status + - you see error logs like `{"az.sdk.message":"mismatched crc"...}`. Such logs have some additional context to investigate (content length, first 1024 bytes of it). +- Throughput is noticeably lower than for previous runs with the similar parameters. This would normally correlate with latency being higher than usual. +- CPU/memory consumption is noticeably higher than for previous runs with the similar parameters + +### Logging + +We use [logback.xml][logback_xml] to configure the logging. By default, the stress test run on cluster will output +`INFO` level log which you may adjust based on your needs. + +The [storage workbook](#stress-test-workbook) needs `com.azure.v2.storage.blob.stress` and `com.azure.v2.storage.stress` to stay at the `INFO` level. + +You may also control the verbosity of logs that go to Application Insights - see [Application Insights logging configuration][application-insights-logging] for more details. + +See also [Logging in Azure SDK][logging-azure-sdk] for more details. + +## Key concepts + +### Project Structure + +See [Layout][stress_test_layout] section for details. + +Below is the current structure of project: +``` +. +├── src/ # Test code +├── templates/ # A directory of helm templates that will generate Kubernetes manifest files. +├── Chart.yaml # A YAML file containing information about the helm chart and its dependencies +├── scenarios-matrix.yaml # A YAML file containing configuration and custom values for stress test(s) +├── Dockerfile # A Dockerfile for building the stress test image +├── stress-test-resources.bicep # An Azure Bicep for deploying stress test azure resources +├── pom.xml +└── README.md +``` + + +[azure_sdk_stress_test]: https://aka.ms/azsdk/stress +[jdk_link]: https://learn.microsoft.com/java/azure/jdk/?view=azure-java-stable +[maven]: https://maven.apache.org/ +[docker]: https://docs.docker.com/get-docker/ +[kubectl]: https://kubernetes.io/docs/tasks/tools/#kubectl +[helm]: https://helm.sh/docs/intro/install/ +[azure_cli]: https://learn.microsoft.com/cli/azure/install-azure-cli +[powershell]: https://learn.microsoft.com/powershell/scripting/install/installing-powershell?view=powershell-7 +[enable_application_insights]: https://learn.microsoft.com/azure/azure-monitor/app/opentelemetry-enable?tabs=java#enable-azure-monitor-application-insights#enable-azure-monitor-application-insights +[logback_xml]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/servicebus/azure-messaging-servicebus-stress/src/main/resources/logback.xml +[deploy_stress_test]: https://github.com/Azure/azure-sdk-tools/blob/main/tools/stress-cluster/chaos/README.md#deploying-a-stress-test +[stress_test_layout]: https://github.com/Azure/azure-sdk-tools/blob/main/tools/stress-cluster/chaos/README.md#layout +[http-fault-injector]: https://github.com/Azure/azure-sdk-tools/tree/main/tools/http-fault-injector +[telemtery-helper]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/storage/azure-storage-stress-v2/src/main/java/com/azure/v2/storage/stress/TelemetryHelper.java +[blob-scenario-base]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/storage/azure-storage-blob-stress-v2/src/main/java/com/azure/v2/storage/blob/stress/BlobScenarioBase.java +[storage-workbook]: https://ms.portal.azure.com/#blade/AppInsightsExtension/UsageNotebookBlade/ComponentId/%2Fsubscriptions%2Ffaa080af-c1d8-40ad-9cce-e1a450ca5b57%2FresourceGroups%2Frg-stress-cluster-pg%2Fproviders%2FMicrosoft.Insights%2Fcomponents%2Fstress-pg-ai-s7b6dif73rup6/ConfigurationId/%2Fsubscriptions%2Ffaa080af-c1d8-40ad-9cce-e1a450ca5b57%2Fresourcegroups%2Frg-stress-cluster-pg%2Fproviders%2Fmicrosoft.insights%2Fworkbooks%2Fa6fc3414-4c15-4651-8517-6f74cbe0d0fe/Type/workbook/WorkbookTemplateName/Storage%20stress%20tests +[application-insights-logging]: https://learn.microsoft.com/azure/azure-monitor/app/java-standalone-config#autocollected-logging +[logging-azure-sdk]: https://github.com/Azure/azure-sdk-for-java/wiki/Logging-in-Azure-SDK diff --git a/sdk/storage/azure-storage-blob-stress-v2/pom.xml b/sdk/storage/azure-storage-blob-stress-v2/pom.xml new file mode 100644 index 000000000000..7dd1f0c3a519 --- /dev/null +++ b/sdk/storage/azure-storage-blob-stress-v2/pom.xml @@ -0,0 +1,137 @@ + + + 4.0.0 + + com.azure.v2 + azure-storage-blob-stress-v2 + jar + 1.0.0-beta.1 + + + UTF-8 + UTF-8 + + + 1.8 + 1.8 + + + - + + + + + ch.qos.logback + logback-classic + 1.3.14 + + + com.azure + azure-core + 1.55.0 + + + com.azure + azure-core-http-netty + 1.15.8 + + + com.azure + azure-storage-blob + 12.30.0-beta.1 + + + com.azure + azure-storage-stress + 1.0.0-beta.1 + + + + + + + + com.azure + azure-monitor-opentelemetry-autoconfigure + 1.0.0-beta.2 + + + io.opentelemetry.instrumentation + opentelemetry-runtime-telemetry-java8 + 2.12.0-alpha + + + io.opentelemetry.instrumentation + opentelemetry-logback-appender-1.0 + 2.12.0-alpha + + + + com.azure + azure-core-tracing-opentelemetry + 1.0.0-beta.53 + + + com.azure + azure-identity + 1.13.1 + compile + + + + + + + org.apache.maven.plugins + maven-shade-plugin + 3.6.0 + + + package + + shade + + + ${project.artifactId}-${project.version}-jar-with-dependencies + + + + com.azure.v2.storage.blob.stress.App + + + + + + + *:* + + META-INF/*.SF + META-INF/*.DSA + META-INF/*.RSA + + + + + + + + + + + diff --git a/sdk/storage/azure-storage-blob-stress-v2/scenarios-matrix.yaml b/sdk/storage/azure-storage-blob-stress-v2/scenarios-matrix.yaml new file mode 100644 index 000000000000..3a8920a67b35 --- /dev/null +++ b/sdk/storage/azure-storage-blob-stress-v2/scenarios-matrix.yaml @@ -0,0 +1,325 @@ +matrix: + scenarios: + # this test downloads 1KB (1024 bytes), small file, no chunking + downloadfilesmall: + testScenario: downloadtofile + sync: true + sizeBytes: 1024 + downloadFaults: true + durationMin: 25 + imageBuildDir: "../../.." + + # this test downloads 1KB (1024 bytes), small file, no chunking with async client + downloadfileasync: + testScenario: downloadtofile + sync: false + sizeBytes: 1024 + downloadFaults: true + durationMin: 25 + imageBuildDir: "../../.." + + # this test downloads 50MB (1024 * 1024 * 50), large file requiring multiple requests + downloadfilelarge: + testScenario: downloadtofile + sync: true + sizeBytes: "52428800" + downloadFaults: true + durationMin: 60 + imageBuildDir: "../../.." + + # this test downloads 1KB (1024 bytes), small stream, no chunking + downloadstreamsmall: + testScenario: downloadstream + sync: true + sizeBytes: 1024 + downloadFaults: true + durationMin: 25 + imageBuildDir: "../../.." + + # this test downloads 1KB (1024 bytes), small stream, no chunking with async client + downloadstreamasync: + testScenario: downloadstream + sync: false + sizeBytes: 1024 + downloadFaults: true + durationMin: 25 + imageBuildDir: "../../.." + + # this test downloads 50MB (1024 * 1024 * 50), requiring multiple requests + downloadstreamlarge: + testScenario: downloadstream + sync: true + sizeBytes: "52428800" + downloadFaults: true + durationMin: 60 + imageBuildDir: "../../.." + + # this test downloads 1KB (1024 bytes), small content, no chunking + downloadcontentsmall: + testScenario: downloadcontent + sync: true + sizeBytes: 1024 + downloadFaults: true + durationMin: 25 + imageBuildDir: "../../.." + + # this test downloads 50MB (1024 * 1024 * 50), large content requiring multiple requests + downloadcontentlarge: + testScenario: downloadcontent + sync: true + sizeBytes: "52428800" + downloadFaults: true + durationMin: 60 + imageBuildDir: "../../.." + + # this test downloads 1KB (1024 bytes) to open input stream, no chunking + inputstreamsmall: + testScenario: openinputstream + sync: true + sizeBytes: 1024 + downloadFaults: true + durationMin: 25 + imageBuildDir: "../../.." + + # this test downloads 50MB (1024 * 1024 * 50) to open input stream requiring multiple requests + inputstreamlarge: + testScenario: openinputstream + sync: true + sizeBytes: "52428800" + downloadFaults: true + durationMin: 60 + imageBuildDir: "../../.." + + # this test downloads 1KB (1024 bytes) to seekablebytechannel, no chunking + bytechannelreadsmall: + testScenario: openseekablebytechannelread + sync: true + sizeBytes: 1024 + downloadFaults: true + durationMin: 25 + imageBuildDir: "../../.." + + # this test downloads 50MB (1024 * 1024 * 50) to seekablebytechannel requiring multiple requests + bytechannelreadlarge: + testScenario: openseekablebytechannelread + sync: true + sizeBytes: "52428800" + downloadFaults: true + durationMin: 60 + imageBuildDir: "../../.." + + # this test uploads 1KB (1024 bytes) to append blob, no chunking + appendblocksmall: + testScenario: appendblock + sync: true + sizeBytes: 1024 + uploadFaults: true + durationMin: 25 + imageBuildDir: "../../.." + + # this test uploads 1KB (1024 bytes) to append blob, no chunking + appendblockasync: + testScenario: appendblock + sync: false + sizeBytes: 1024 + uploadFaults: true + durationMin: 25 + imageBuildDir: "../../.." + + # this test uploads 25MB (1024 * 1024 * 25) to append blob requiring multiple requests + appendblocklarge: + testScenario: appendblock + sync: true + sizeBytes: "26214400" + uploadFaults: true + durationMin: 30 + imageBuildDir: "../../.." + + # this test uploads 1KB (1024 bytes) to append blob output stream, no chunking + appendoutputstreamsmall: + testScenario: appendbloboutputstream + sync: true + sizeBytes: 1024 + uploadFaults: true + durationMin: 25 + imageBuildDir: "../../.." + + # this test uploads 10KB (1024 * 10) to append blob output stream, no chunking + appendoutputstreamlarge: + testScenario: appendbloboutputstream + sync: true + sizeBytes: "10240" + uploadFaults: true + durationMin: 60 + imageBuildDir: "../../.." + + # this test uploads 1KB (1024 bytes) to block blob upload, no chunking + blockblobuploadsmall: + testScenario: blockblobupload + sync: true + sizeBytes: 1024 + uploadFaults: true + durationMin: 25 + imageBuildDir: "../../.." + + # this test uploads 25MB (1024 * 1024 * 50) to block blob upload, no chunking + blockblobuploadlarge: + testScenario: blockblobupload + sync: true + sizeBytes: "26214400" + uploadFaults: true + durationMin: 60 + imageBuildDir: "../../.." + + # this test uploads 1KB (1024 bytes) to block blob output stream, no chunking + blockoutputstreamsmall: + testScenario: blockbloboutputstream + sync: true + sizeBytes: 1024 + uploadFaults: true + durationMin: 25 + imageBuildDir: "../../.." + + # this test uploads 25MB (1024 * 1024 * 25) to block blob output stream, no chunking + blockoutputstreamlarge: + testScenario: blockbloboutputstream + sync: true + sizeBytes: "26214400" + uploadFaults: true + durationMin: 60 + imageBuildDir: "../../.." + + # this test uploads 1KB (1024 bytes) to block blob commit block list, no chunking + commitblocklistsmall: + testScenario: commitblocklist + sync: true + sizeBytes: 1024 + uploadFaults: true + durationMin: 25 + imageBuildDir: "../../.." + + # this test uploads 25MB (1024 * 1024 * 25) to block blob commit block list, no chunking + commitblocklistlarge: + testScenario: commitblocklist + sync: true + sizeBytes: "26214400" + uploadFaults: true + durationMin: 60 + imageBuildDir: "../../.." + + # this test uploads 1KB (1024 bytes) to block blob open seekable byte channel write, no chunking + bytechannelwritesmall: + testScenario: openseekablebytechannelwrite + sync: true + sizeBytes: 1024 + uploadFaults: true + durationMin: 10 + imageBuildDir: "../../.." + + # this test uploads 50MB (1024 * 1024 * 50) to block blob open seekable byte channel write, no chunking + bytechannelwritelarge: + testScenario: openseekablebytechannelwrite + sync: true + sizeBytes: "52428800" + uploadFaults: true + durationMin: 60 + imageBuildDir: "../../.." + + # this test uploads 1KB (1024 bytes) to block blob stage block, no chunking + stageblocksmall: + testScenario: stageblock + sync: true + sizeBytes: 1024 + uploadFaults: true + durationMin: 25 + imageBuildDir: "../../.." + + # this test uploads 25MB (1024 * 1024 * 25) to block blob stage block, requiring multiple requests + stageblocklarge: + testScenario: stageblock + sync: true + sizeBytes: "26214400" + uploadFaults: true + durationMin: 60 + imageBuildDir: "../../.." + + # this test uploads 1KB (1024 bytes) to page blob output stream, no chunking + pageoutputstreamsmall: + testScenario: pagebloboutputstream + sync: true + sizeBytes: 1024 + uploadFaults: true + durationMin: 25 + imageBuildDir: "../../.." + + # this test uploads 10KB (1024 * 10) to page blob output stream, requiring multiple requests + pageoutputstreamlarge: + testScenario: pagebloboutputstream + sync: true + sizeBytes: "10240" + uploadFaults: true + durationMin: 60 + imageBuildDir: "../../.." + + # this test uploads 1KB (1024 bytes) to page blob upload pages, no chunking + uploadpagessmall: + testScenario: uploadpages + sync: true + sizeBytes: 1024 + uploadFaults: true + durationMin: 25 + imageBuildDir: "../../.." + + # this test uploads 4MB (1024 * 1024 * 4) to page blob upload pages, requiring multiple requests + uploadpageslarge: + testScenario: uploadpages + sync: true + sizeBytes: "4194304" + uploadFaults: true + durationMin: 60 + imageBuildDir: "../../.." + + # this test uploads 1KB (1024 bytes) to blob, no chunking + uploadsmall: + testScenario: upload + sync: true + sizeBytes: 1024 + uploadFaults: true + durationMin: 25 + imageBuildDir: "../../.." + + # this test uploads 1KB (1024 bytes) to blob, no chunking + uploadasyncsmall: + testScenario: upload + sync: false + sizeBytes: 1024 + uploadFaults: true + durationMin: 25 + imageBuildDir: "../../.." + + # this test uploads 4MB (1024 * 1024 * 4) to blob, requiring multiple requests + uploadlarge: + testScenario: upload + sync: true + sizeBytes: "52428800" + uploadFaults: true + durationMin: 60 + imageBuildDir: "../../.." + + # this test uploads 1KB (1024 bytes) to blob from file, no chunking + uploadfromfilesmall: + testScenario: uploadfromfile + sync: true + sizeBytes: 1024 + uploadFaults: true + durationMin: 25 + imageBuildDir: "../../.." + + # this test uploads 50MB (1024 * 1024 * 50) to blob from file, requiring multiple requests + uploadfromfilelarge: + testScenario: uploadfromfile + sync: true + sizeBytes: "52428800" + uploadFaults: true + durationMin: 60 + imageBuildDir: "../../.." diff --git a/sdk/storage/azure-storage-blob-stress-v2/scripts/fault-injector.sh b/sdk/storage/azure-storage-blob-stress-v2/scripts/fault-injector.sh new file mode 100644 index 000000000000..ed834fc131d6 --- /dev/null +++ b/sdk/storage/azure-storage-blob-stress-v2/scripts/fault-injector.sh @@ -0,0 +1,4 @@ +#!/bin/sh +set -ex; +dotnet dev-certs https --export-path /mnt/outputs/dev-cert.pfx; +/root/.dotnet/tools/http-fault-injector; diff --git a/sdk/storage/azure-storage-blob-stress-v2/scripts/stress-run.sh b/sdk/storage/azure-storage-blob-stress-v2/scripts/stress-run.sh new file mode 100644 index 000000000000..20a7669c46e9 --- /dev/null +++ b/sdk/storage/azure-storage-blob-stress-v2/scripts/stress-run.sh @@ -0,0 +1,4 @@ +#!/bin/sh +set -ex; +set -exa; +keytool -import -alias test -file /mnt/outputs/dev-cert.pfx -keystore ${JAVA_HOME}/lib/security/cacerts -noprompt -keypass changeit -storepass changeit; diff --git a/sdk/storage/azure-storage-blob-stress-v2/src/main/java/com/azure/v2/storage/blob/stress/App.java b/sdk/storage/azure-storage-blob-stress-v2/src/main/java/com/azure/v2/storage/blob/stress/App.java new file mode 100644 index 000000000000..f4dca68ee485 --- /dev/null +++ b/sdk/storage/azure-storage-blob-stress-v2/src/main/java/com/azure/v2/storage/blob/stress/App.java @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.v2.storage.blob.stress; + +import com.azure.perf.test.core.PerfStressProgram; +import com.azure.storage.stress.TelemetryHelper; + +public class App { + public static void main(String[] args) { + TelemetryHelper.init(); + PerfStressProgram.run(new Class[]{ + AppendBlock.class, + AppendBlobOutputStream.class, + BlockBlobOutputStream.class, + BlockBlobUpload.class, + CommitBlockList.class, + DownloadToFile.class, + DownloadStream.class, + DownloadContent.class, + OpenInputStream.class, + OpenSeekableByteChannelRead.class, + OpenSeekableByteChannelWrite.class, + PageBlobOutputStream.class, + StageBlock.class, + Upload.class, + UploadFromFile.class, + UploadPages.class, + }, args); + } +} diff --git a/sdk/storage/azure-storage-blob-stress-v2/src/main/java/com/azure/v2/storage/blob/stress/AppendBlobOutputStream.java b/sdk/storage/azure-storage-blob-stress-v2/src/main/java/com/azure/v2/storage/blob/stress/AppendBlobOutputStream.java new file mode 100644 index 000000000000..3bd14eb108c3 --- /dev/null +++ b/sdk/storage/azure-storage-blob-stress-v2/src/main/java/com/azure/v2/storage/blob/stress/AppendBlobOutputStream.java @@ -0,0 +1,76 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.v2.storage.blob.stress; + +import com.azure.core.util.Context; +import com.azure.core.util.logging.ClientLogger; +import com.azure.storage.blob.BlobAsyncClient; +import com.azure.storage.blob.BlobClient; +import com.azure.storage.blob.specialized.AppendBlobClient; +import com.azure.storage.blob.specialized.BlobOutputStream; +import com.azure.storage.stress.CrcInputStream; +import com.azure.storage.stress.StorageStressOptions; +import com.azure.v2.storage.blob.stress.utils.OriginalContent; +import reactor.core.publisher.Mono; + +import java.io.IOException; + +import static com.azure.core.util.FluxUtil.monoError; + +public class AppendBlobOutputStream extends BlobScenarioBase { + private static final ClientLogger LOGGER = new ClientLogger(BlockBlobOutputStream.class); + private final OriginalContent originalContent = new OriginalContent(); + private final BlobClient syncClient; + private final BlobAsyncClient asyncNoFaultClient; + // this blob is used to perform normal upload in the setup phase + private final BlobAsyncClient tempSetupBlobClient; + + public AppendBlobOutputStream(StorageStressOptions options) { + super(options); + String blobName = generateBlobName(); + String tempBlobName = generateBlobName(); + + this.asyncNoFaultClient = getAsyncContainerClientNoFault().getBlobAsyncClient(blobName); + this.syncClient = getSyncContainerClient().getBlobClient(blobName); + this.tempSetupBlobClient = getAsyncContainerClientNoFault().getBlobAsyncClient(tempBlobName); + } + + @Override + protected void runInternal(Context span) throws IOException { + AppendBlobClient appendBlobClient = syncClient.getAppendBlobClient(); + + try (CrcInputStream inputStream = new CrcInputStream(originalContent.getBlobContentHead(), options.getSize()); + BlobOutputStream outputStream = appendBlobClient.getBlobOutputStream(true)) { + byte[] buffer = new byte[4096]; // Define a buffer + int bytesRead; + + // Read from the inputStream and write to the blobOutputStream + while ((bytesRead = inputStream.read(buffer)) != -1) { + outputStream.write(buffer, 0, bytesRead); + } + + // Ensure to close the blobOutputStream to flush any remaining data and finalize the blob. + outputStream.close(); + originalContent.checkMatch(inputStream.getContentInfo(), span).block(); + } + } + + @Override + protected Mono runInternalAsync(Context span) { + return monoError(LOGGER, new RuntimeException("getBlobOutputStream() does not exist on the async client")); + } + + @Override + public Mono setupAsync() { + return super.setupAsync() + .then(asyncNoFaultClient.getAppendBlobAsyncClient().create()) + .then(originalContent.setupBlob(tempSetupBlobClient, options.getSize())); + } + + @Override + public Mono cleanupAsync() { + return asyncNoFaultClient.delete() + .then(super.cleanupAsync()); + } +} diff --git a/sdk/storage/azure-storage-blob-stress-v2/src/main/java/com/azure/v2/storage/blob/stress/AppendBlock.java b/sdk/storage/azure-storage-blob-stress-v2/src/main/java/com/azure/v2/storage/blob/stress/AppendBlock.java new file mode 100644 index 000000000000..6cbefdb56fc9 --- /dev/null +++ b/sdk/storage/azure-storage-blob-stress-v2/src/main/java/com/azure/v2/storage/blob/stress/AppendBlock.java @@ -0,0 +1,68 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.v2.storage.blob.stress; + +import com.azure.core.util.Context; +import com.azure.storage.blob.BlobAsyncClient; +import com.azure.storage.blob.BlobClient; +import com.azure.storage.blob.specialized.AppendBlobAsyncClient; +import com.azure.storage.blob.specialized.AppendBlobClient; +import com.azure.storage.stress.CrcInputStream; +import com.azure.storage.stress.StorageStressOptions; +import com.azure.v2.storage.blob.stress.utils.OriginalContent; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; + +import java.nio.ByteBuffer; + +public class AppendBlock extends BlobScenarioBase { + private final OriginalContent originalContent = new OriginalContent(); + private final BlobClient syncClient; + private final BlobAsyncClient asyncClient; + private final BlobAsyncClient asyncNoFaultClient; + // this blob is used to perform normal upload in the setup phase + private final BlobAsyncClient tempSetupBlobClient; + + public AppendBlock(StorageStressOptions options) { + super(options); + String blobName = generateBlobName(); + String tempBlobName = generateBlobName(); + + this.asyncNoFaultClient = getAsyncContainerClientNoFault().getBlobAsyncClient(blobName); + this.syncClient = getSyncContainerClient().getBlobClient(blobName); + this.asyncClient = getAsyncContainerClient().getBlobAsyncClient(blobName); + this.tempSetupBlobClient = getAsyncContainerClientNoFault().getBlobAsyncClient(tempBlobName); + } + + @Override + protected void runInternal(Context span) { + try (CrcInputStream inputStream = new CrcInputStream(originalContent.getBlobContentHead(), options.getSize())) { + AppendBlobClient appendBlobClient = syncClient.getAppendBlobClient(); + appendBlobClient.appendBlockWithResponse(inputStream, options.getSize(), null, null, null, span); + originalContent.checkMatch(inputStream.getContentInfo(), span).block(); + } + } + + @Override + protected Mono runInternalAsync(Context span) { + AppendBlobAsyncClient appendBlobAsyncClient = asyncClient.getAppendBlobAsyncClient(); + Flux byteBufferFlux = new CrcInputStream(originalContent.getBlobContentHead(), options.getSize()) + .convertStreamToByteBuffer(); + return appendBlobAsyncClient.appendBlock(byteBufferFlux, options.getSize()) + .then(originalContent.checkMatch(byteBufferFlux, span)); + } + + @Override + public Mono setupAsync() { + return super.setupAsync().then(asyncNoFaultClient.getAppendBlobAsyncClient().create()) + .then(originalContent.setupBlob(tempSetupBlobClient, options.getSize())); + } + + @Override + public Mono cleanupAsync() { + return asyncNoFaultClient.getAppendBlobAsyncClient().delete() + .then(tempSetupBlobClient.delete()) + .then(super.cleanupAsync()); + } +} diff --git a/sdk/storage/azure-storage-blob-stress-v2/src/main/java/com/azure/v2/storage/blob/stress/BlobScenarioBase.java b/sdk/storage/azure-storage-blob-stress-v2/src/main/java/com/azure/v2/storage/blob/stress/BlobScenarioBase.java new file mode 100644 index 000000000000..753039e07428 --- /dev/null +++ b/sdk/storage/azure-storage-blob-stress-v2/src/main/java/com/azure/v2/storage/blob/stress/BlobScenarioBase.java @@ -0,0 +1,143 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.v2.storage.blob.stress; + +import com.azure.core.http.policy.HttpLogDetailLevel; +import com.azure.core.http.policy.HttpLogOptions; +import com.azure.core.util.Context; +import com.azure.identity.DefaultAzureCredential; +import com.azure.identity.DefaultAzureCredentialBuilder; +import com.azure.perf.test.core.PerfStressTest; +import com.azure.storage.blob.BlobContainerAsyncClient; +import com.azure.storage.blob.BlobContainerClient; +import com.azure.storage.blob.BlobServiceAsyncClient; +import com.azure.storage.blob.BlobServiceClient; +import com.azure.storage.blob.BlobServiceClientBuilder; +import com.azure.storage.stress.FaultInjectingHttpPolicy; +import com.azure.storage.stress.FaultInjectionProbabilities; +import com.azure.storage.stress.StorageStressOptions; +import com.azure.storage.stress.TelemetryHelper; +import reactor.core.publisher.Mono; + +import java.time.Instant; +import java.util.UUID; + +public abstract class BlobScenarioBase extends PerfStressTest { + private static final String CONTAINER_NAME = "stress-" + UUID.randomUUID(); + protected final TelemetryHelper telemetryHelper = new TelemetryHelper(this.getClass()); + private final BlobContainerClient syncContainerClient; + private final BlobContainerAsyncClient asyncContainerClient; + private final BlobContainerAsyncClient asyncNoFaultContainerClient; + private final BlobContainerClient syncNoFaultContainerClient; + private Instant startTime; + + public BlobScenarioBase(TOptions options) { + super(options); + + DefaultAzureCredential defaultAzureCredential = new DefaultAzureCredentialBuilder().build(); + String endpoint = options.getEndpointString(); + + BlobServiceClientBuilder clientBuilder = new BlobServiceClientBuilder() + .credential(defaultAzureCredential) + .endpoint(endpoint) + .httpLogOptions(getLogOptions()); + + BlobServiceAsyncClient asyncNoFaultClient = clientBuilder.buildAsyncClient(); + BlobServiceClient syncNoFaultClient = clientBuilder.buildClient(); + + if (options.isFaultInjectionEnabledForDownloads()) { + clientBuilder.addPolicy(new FaultInjectingHttpPolicy(true, getFaultProbabilities(), false)); + } else if (options.isFaultInjectionEnabledForUploads()) { + clientBuilder.addPolicy(new FaultInjectingHttpPolicy(true, getFaultProbabilities(), true)); + } + + BlobServiceClient syncClient = clientBuilder.buildClient(); + BlobServiceAsyncClient asyncClient = clientBuilder.buildAsyncClient(); + asyncNoFaultContainerClient = asyncNoFaultClient.getBlobContainerAsyncClient(CONTAINER_NAME); + syncNoFaultContainerClient = syncNoFaultClient.getBlobContainerClient(CONTAINER_NAME); + syncContainerClient = syncClient.getBlobContainerClient(CONTAINER_NAME); + asyncContainerClient = asyncClient.getBlobContainerAsyncClient(CONTAINER_NAME); + } + + @Override + public Mono globalSetupAsync() { + startTime = Instant.now(); + telemetryHelper.recordStart(options); + return super.globalSetupAsync() + .then(asyncNoFaultContainerClient.createIfNotExists()) + .then(); + } + + @Override + public Mono globalCleanupAsync() { + telemetryHelper.recordEnd(startTime); + return asyncNoFaultContainerClient.deleteIfExists() + .then(super.globalCleanupAsync()); + } + + @SuppressWarnings("try") + @Override + public void run() { + telemetryHelper.instrumentRun(ctx -> runInternal(ctx)); + } + + @SuppressWarnings("try") + @Override + public Mono runAsync() { + return telemetryHelper.instrumentRunAsync(ctx -> runInternalAsync(ctx)) + .onErrorResume(e -> Mono.empty()); + } + + protected abstract void runInternal(Context context) throws Exception; + protected abstract Mono runInternalAsync(Context context); + + protected BlobContainerClient getSyncContainerClient() { + return syncContainerClient; + } + + protected BlobContainerAsyncClient getAsyncContainerClient() { + return asyncContainerClient; + } + + protected BlobContainerAsyncClient getAsyncContainerClientNoFault() { + return asyncNoFaultContainerClient; + } + + protected BlobContainerClient getSyncContainerClientNoFault() { + return syncNoFaultContainerClient; + } + + + protected String generateBlobName() { + return "blob-" + UUID.randomUUID(); + } + + protected static HttpLogOptions getLogOptions() { + return new HttpLogOptions() + .setLogLevel(HttpLogDetailLevel.HEADERS) + .addAllowedHeaderName("x-ms-faultinjector-response-option") + .addAllowedHeaderName("Content-Range") + .addAllowedHeaderName("Accept-Ranges") + .addAllowedHeaderName("x-ms-blob-content-md5") + .addAllowedHeaderName("x-ms-error-code") + .addAllowedHeaderName("x-ms-range"); + } + + protected static FaultInjectionProbabilities getFaultProbabilities() { + return new FaultInjectionProbabilities() + .setNoResponseIndefinite(0.003D) + .setNoResponseClose(0.004D) + .setNoResponseAbort(0.003D) + .setPartialResponseIndefinite(0.06) + .setPartialResponseClose(0.06) + .setPartialResponseAbort(0.06) + .setPartialResponseFinishNormal(0.06) + .setNoRequestIndefinite(0.003D) + .setNoRequestClose(0.004D) + .setNoRequestAbort(0.003D) + .setPartialRequestIndefinite(0.06) + .setPartialRequestClose(0.06) + .setPartialRequestAbort(0.06); + } +} diff --git a/sdk/storage/azure-storage-blob-stress-v2/src/main/java/com/azure/v2/storage/blob/stress/BlockBlobOutputStream.java b/sdk/storage/azure-storage-blob-stress-v2/src/main/java/com/azure/v2/storage/blob/stress/BlockBlobOutputStream.java new file mode 100644 index 000000000000..1707f53ca791 --- /dev/null +++ b/sdk/storage/azure-storage-blob-stress-v2/src/main/java/com/azure/v2/storage/blob/stress/BlockBlobOutputStream.java @@ -0,0 +1,77 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.v2.storage.blob.stress; + +import com.azure.core.util.Context; +import com.azure.core.util.logging.ClientLogger; +import com.azure.storage.blob.BlobAsyncClient; +import com.azure.storage.blob.BlobClient; +import com.azure.storage.blob.models.ParallelTransferOptions; +import com.azure.storage.blob.options.BlockBlobOutputStreamOptions; +import com.azure.storage.blob.specialized.BlobOutputStream; +import com.azure.storage.blob.specialized.BlockBlobClient; +import com.azure.storage.stress.CrcInputStream; +import com.azure.storage.stress.StorageStressOptions; +import com.azure.v2.storage.blob.stress.utils.OriginalContent; +import reactor.core.publisher.Mono; + +import java.io.IOException; + +import static com.azure.core.util.FluxUtil.monoError; + +public class BlockBlobOutputStream extends BlobScenarioBase { + private static final ClientLogger LOGGER = new ClientLogger(BlockBlobOutputStream.class); + private final OriginalContent originalContent = new OriginalContent(); + private final BlobClient syncClient; + private final BlobAsyncClient asyncNoFaultClient; + private final ParallelTransferOptions parallelTransferOptions; + + public BlockBlobOutputStream(StorageStressOptions options) { + super(options); + String blobName = generateBlobName(); + this.asyncNoFaultClient = getAsyncContainerClientNoFault().getBlobAsyncClient(blobName); + this.syncClient = getSyncContainerClient().getBlobClient(blobName); + this.parallelTransferOptions = new ParallelTransferOptions().setMaxConcurrency(options.getMaxConcurrency()); + } + + @Override + protected void runInternal(Context span) throws IOException { + BlockBlobClient blockBlobClient = syncClient.getBlockBlobClient(); + BlockBlobOutputStreamOptions blockBlobOutputStreamOptions = new BlockBlobOutputStreamOptions() + .setParallelTransferOptions(parallelTransferOptions); + + try (CrcInputStream inputStream = new CrcInputStream(originalContent.getBlobContentHead(), options.getSize()); + BlobOutputStream outputStream = blockBlobClient.getBlobOutputStream(blockBlobOutputStreamOptions, span)) { + byte[] buffer = new byte[4096]; // Define a buffer + int bytesRead; + + // Read from the inputStream and write to the blobOutputStream + while ((bytesRead = inputStream.read(buffer)) != -1) { + outputStream.write(buffer, 0, bytesRead); + } + + // Ensure to close the blobOutputStream to flush any remaining data and finalize the blob. + outputStream.close(); + originalContent.checkMatch(inputStream.getContentInfo(), span).block(); + } + } + + @Override + protected Mono runInternalAsync(Context span) { + return monoError(LOGGER, new RuntimeException("getBlobOutputStream() does not exist on the async client")); + } + + + @Override + public Mono setupAsync() { + return super.setupAsync().then(originalContent.setupBlob(asyncNoFaultClient, options.getSize())); + } + + @Override + public Mono cleanupAsync() { + return asyncNoFaultClient.delete() + .then(super.cleanupAsync()); + } + +} diff --git a/sdk/storage/azure-storage-blob-stress-v2/src/main/java/com/azure/v2/storage/blob/stress/BlockBlobUpload.java b/sdk/storage/azure-storage-blob-stress-v2/src/main/java/com/azure/v2/storage/blob/stress/BlockBlobUpload.java new file mode 100644 index 000000000000..b292ab775c82 --- /dev/null +++ b/sdk/storage/azure-storage-blob-stress-v2/src/main/java/com/azure/v2/storage/blob/stress/BlockBlobUpload.java @@ -0,0 +1,61 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.v2.storage.blob.stress; + +import com.azure.core.util.Context; +import com.azure.storage.blob.BlobAsyncClient; +import com.azure.storage.blob.BlobClient; +import com.azure.storage.blob.specialized.BlockBlobAsyncClient; +import com.azure.storage.blob.specialized.BlockBlobClient; +import com.azure.storage.stress.CrcInputStream; +import com.azure.storage.stress.StorageStressOptions; +import com.azure.v2.storage.blob.stress.utils.OriginalContent; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; + +import java.nio.ByteBuffer; + +public class BlockBlobUpload extends BlobScenarioBase { + private final OriginalContent originalContent = new OriginalContent(); + private final BlobClient syncClient; + private final BlobAsyncClient asyncClient; + private final BlobAsyncClient asyncNoFaultClient; + + public BlockBlobUpload(StorageStressOptions options) { + super(options); + String blobName = generateBlobName(); + this.asyncNoFaultClient = getAsyncContainerClientNoFault().getBlobAsyncClient(blobName); + this.syncClient = getSyncContainerClient().getBlobClient(blobName); + this.asyncClient = getAsyncContainerClient().getBlobAsyncClient(blobName); + } + + @Override + protected void runInternal(Context span) { + BlockBlobClient blockBlobClient = syncClient.getBlockBlobClient(); + try (CrcInputStream inputStream = new CrcInputStream(originalContent.getBlobContentHead(), options.getSize())) { + blockBlobClient.upload(inputStream, options.getSize(), true); + originalContent.checkMatch(inputStream.getContentInfo(), span).block(); + } + } + + @Override + protected Mono runInternalAsync(Context span) { + Flux byteBufferFlux = new CrcInputStream(originalContent.getBlobContentHead(), options.getSize()) + .convertStreamToByteBuffer(); + BlockBlobAsyncClient blockBlobAsyncClient = asyncClient.getBlockBlobAsyncClient(); + return blockBlobAsyncClient.upload(byteBufferFlux, options.getSize(), true) + .then(originalContent.checkMatch(byteBufferFlux, span)); + } + + @Override + public Mono setupAsync() { + return super.setupAsync().then(originalContent.setupBlob(asyncNoFaultClient, options.getSize())); + } + + @Override + public Mono cleanupAsync() { + return asyncNoFaultClient.delete() + .then(super.cleanupAsync()); + } +} diff --git a/sdk/storage/azure-storage-blob-stress-v2/src/main/java/com/azure/v2/storage/blob/stress/CommitBlockList.java b/sdk/storage/azure-storage-blob-stress-v2/src/main/java/com/azure/v2/storage/blob/stress/CommitBlockList.java new file mode 100644 index 000000000000..c858e064cb63 --- /dev/null +++ b/sdk/storage/azure-storage-blob-stress-v2/src/main/java/com/azure/v2/storage/blob/stress/CommitBlockList.java @@ -0,0 +1,85 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.v2.storage.blob.stress; + +import com.azure.core.util.Context; +import com.azure.core.util.CoreUtils; +import com.azure.storage.blob.BlobAsyncClient; +import com.azure.storage.blob.BlobClient; +import com.azure.storage.blob.options.BlockBlobCommitBlockListOptions; +import com.azure.storage.blob.specialized.BlockBlobAsyncClient; +import com.azure.storage.blob.specialized.BlockBlobClient; +import com.azure.storage.stress.CrcInputStream; +import com.azure.storage.stress.StorageStressOptions; +import com.azure.v2.storage.blob.stress.utils.OriginalContent; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; + +import java.nio.ByteBuffer; +import java.nio.charset.StandardCharsets; +import java.util.Base64; +import java.util.Collections; + +public class CommitBlockList extends BlobScenarioBase { + private final OriginalContent originalContent = new OriginalContent(); + private final BlobClient syncClient; + private final BlobAsyncClient asyncClient; + private final BlobClient syncNoFaultClient; + private final BlobAsyncClient asyncNoFaultClient; + + public CommitBlockList(StorageStressOptions options) { + super(options); + String blobName = generateBlobName(); + this.syncNoFaultClient = getSyncContainerClientNoFault().getBlobClient(blobName); + this.asyncNoFaultClient = getAsyncContainerClientNoFault().getBlobAsyncClient(blobName); + this.syncClient = getSyncContainerClient().getBlobClient(blobName); + this.asyncClient = getAsyncContainerClient().getBlobAsyncClient(blobName); + } + + @Override + protected void runInternal(Context span) throws Exception { + BlockBlobClient blockBlobClient = syncClient.getBlockBlobClient(); + BlockBlobClient blockBlobClientNoFault = syncNoFaultClient.getBlockBlobClient(); + String blockId = Base64.getEncoder().encodeToString(CoreUtils.randomUuid().toString() + .getBytes(StandardCharsets.UTF_8)); + try (CrcInputStream inputStream = new CrcInputStream(originalContent.getBlobContentHead(), options.getSize())) { + // First perform non-faulted stage block to send data to the service + blockBlobClientNoFault.stageBlockWithResponse(blockId, inputStream, options.getSize(), null, null, null, + span); + // Then perform faulted commit block list to commit the block + blockBlobClient.commitBlockListWithResponse( + new BlockBlobCommitBlockListOptions(Collections.singletonList(blockId)), null, span); + // Confirm the CRC matches for the uploaded input stream + originalContent.checkMatch(inputStream.getContentInfo(), span).block(); + } + } + + @Override + protected Mono runInternalAsync(Context span) { + BlockBlobAsyncClient blockBlobAsyncClient = asyncClient.getBlockBlobAsyncClient(); + BlockBlobAsyncClient blockBlobAsyncClientNoFault = asyncNoFaultClient.getBlockBlobAsyncClient(); + String blockId = Base64.getEncoder().encodeToString(CoreUtils.randomUuid().toString() + .getBytes(StandardCharsets.UTF_8)); + Flux byteBufferFlux = new CrcInputStream(originalContent.getBlobContentHead(), options.getSize()) + .convertStreamToByteBuffer(); + // First perform non-faulted stage block to send data to the service + return blockBlobAsyncClientNoFault.stageBlockWithResponse(blockId, byteBufferFlux, options.getSize(), null, null) + // Then perform faulted commit block list to commit the block + .then(blockBlobAsyncClient.commitBlockListWithResponse( + new BlockBlobCommitBlockListOptions(Collections.singletonList(blockId)))) + // Confirm the CRC matches for the uploaded byte buffer flux + .then(originalContent.checkMatch(byteBufferFlux, span)); + } + + @Override + public Mono setupAsync() { + return super.setupAsync().then(originalContent.setupBlob(asyncNoFaultClient, options.getSize())); + } + + @Override + public Mono cleanupAsync() { + return asyncNoFaultClient.delete() + .then(super.cleanupAsync()); + } +} diff --git a/sdk/storage/azure-storage-blob-stress-v2/src/main/java/com/azure/v2/storage/blob/stress/DownloadContent.java b/sdk/storage/azure-storage-blob-stress-v2/src/main/java/com/azure/v2/storage/blob/stress/DownloadContent.java new file mode 100644 index 000000000000..9e6a0114cb1d --- /dev/null +++ b/sdk/storage/azure-storage-blob-stress-v2/src/main/java/com/azure/v2/storage/blob/stress/DownloadContent.java @@ -0,0 +1,59 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.v2.storage.blob.stress; + +import com.azure.core.http.HttpHeaderName; +import com.azure.core.util.BinaryData; +import com.azure.core.util.Context; +import com.azure.storage.blob.BlobAsyncClient; +import com.azure.storage.blob.BlobClient; +import com.azure.storage.stress.StorageStressOptions; +import com.azure.v2.storage.blob.stress.utils.OriginalContent; +import reactor.core.publisher.Mono; + +public class DownloadContent extends BlobScenarioBase { + private final OriginalContent originalContent = new OriginalContent(); + private final BlobClient syncClient; + private final BlobAsyncClient asyncClient; + private final BlobAsyncClient asyncNoFaultClient; + + public DownloadContent(StorageStressOptions options) { + super(options); + String blobName = generateBlobName(); + this.asyncNoFaultClient = getAsyncContainerClientNoFault().getBlobAsyncClient(blobName); + this.syncClient = getSyncContainerClient().getBlobClient(blobName); + this.asyncClient = getAsyncContainerClient().getBlobAsyncClient(blobName); + } + + @Override + protected void runInternal(Context span) { + originalContent.checkMatch(syncClient.downloadContent(), span).block(); + } + + @Override + protected Mono runInternalAsync(Context span) { + // TODO return downloadContent once it stops buffering + + return asyncClient.downloadStreamWithResponse(null, null, null, false) + .flatMap(response -> { + long contentLength = Long.valueOf(response.getHeaders().getValue(HttpHeaderName.CONTENT_LENGTH)); + return BinaryData.fromFlux(response.getValue(), contentLength, false); + }) + .flatMap(bd -> originalContent.checkMatch(bd, span)); + } + + @Override + public Mono setupAsync() { + // setup is called for each instance of scenario. Number of instances equals options.getParallel() + // so we're setting up options.getParallel() blobs to scale beyond service limits for 1 blob. + return super.setupAsync() + .then(originalContent.setupBlob(asyncNoFaultClient, options.getSize())); + } + + @Override + public Mono cleanupAsync() { + return asyncNoFaultClient.deleteIfExists() + .then(super.cleanupAsync()); + } +} diff --git a/sdk/storage/azure-storage-blob-stress-v2/src/main/java/com/azure/v2/storage/blob/stress/DownloadStream.java b/sdk/storage/azure-storage-blob-stress-v2/src/main/java/com/azure/v2/storage/blob/stress/DownloadStream.java new file mode 100644 index 000000000000..adec0c8cb16b --- /dev/null +++ b/sdk/storage/azure-storage-blob-stress-v2/src/main/java/com/azure/v2/storage/blob/stress/DownloadStream.java @@ -0,0 +1,58 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.v2.storage.blob.stress; + +import com.azure.core.util.Context; +import com.azure.storage.blob.BlobAsyncClient; +import com.azure.storage.blob.BlobClient; +import com.azure.storage.stress.CrcOutputStream; +import com.azure.storage.stress.StorageStressOptions; +import com.azure.v2.storage.blob.stress.utils.OriginalContent; +import reactor.core.publisher.Mono; + +import java.io.IOException; + +public class DownloadStream extends BlobScenarioBase { + private final OriginalContent originalContent = new OriginalContent(); + private final BlobClient syncClient; + private final BlobAsyncClient asyncClient; + private final BlobAsyncClient asyncNoFaultClient; + + public DownloadStream(StorageStressOptions options) { + super(options); + String blobName = generateBlobName(); + this.asyncNoFaultClient = getAsyncContainerClientNoFault().getBlobAsyncClient(blobName); + this.syncClient = getSyncContainerClient().getBlobClient(blobName); + this.asyncClient = getAsyncContainerClient().getBlobAsyncClient(blobName); + } + + @Override + protected void runInternal(Context span) throws IOException { + try (CrcOutputStream outputStream = new CrcOutputStream()) { + syncClient.downloadStreamWithResponse(outputStream, null, null, null, false, null, span); + outputStream.close(); + originalContent.checkMatch(outputStream.getContentInfo(), span).block(); + } + } + + @Override + protected Mono runInternalAsync(Context span) { + return asyncClient.downloadStreamWithResponse(null, null, null, false) + .flatMap(response -> originalContent.checkMatch(response.getValue(), span)); + } + + @Override + public Mono setupAsync() { + // setup is called for each instance of scenario. Number of instances equals options.getParallel() + // so we're setting up options.getParallel() blobs to scale beyond service limits for 1 blob. + return super.setupAsync() + .then(originalContent.setupBlob(asyncNoFaultClient, options.getSize())); + } + + @Override + public Mono cleanupAsync() { + return asyncNoFaultClient.deleteIfExists() + .then(super.cleanupAsync()); + } +} diff --git a/sdk/storage/azure-storage-blob-stress-v2/src/main/java/com/azure/v2/storage/blob/stress/DownloadToFile.java b/sdk/storage/azure-storage-blob-stress-v2/src/main/java/com/azure/v2/storage/blob/stress/DownloadToFile.java new file mode 100644 index 000000000000..b904185c1296 --- /dev/null +++ b/sdk/storage/azure-storage-blob-stress-v2/src/main/java/com/azure/v2/storage/blob/stress/DownloadToFile.java @@ -0,0 +1,98 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.v2.storage.blob.stress; + +import com.azure.core.util.BinaryData; +import com.azure.core.util.Context; +import com.azure.core.util.logging.ClientLogger; +import com.azure.storage.blob.BlobAsyncClient; +import com.azure.storage.blob.BlobClient; +import com.azure.storage.blob.options.BlobDownloadToFileOptions; +import com.azure.storage.common.ParallelTransferOptions; +import com.azure.storage.stress.StorageStressOptions; +import com.azure.v2.storage.blob.stress.utils.OriginalContent; +import reactor.core.publisher.Mono; + +import java.io.IOException; +import java.io.UncheckedIOException; +import java.nio.file.Files; +import java.nio.file.Path; +import java.time.Duration; +import java.util.UUID; + +public class DownloadToFile extends BlobScenarioBase { + private static final ClientLogger LOGGER = new ClientLogger(DownloadToFile.class); + private final Path directoryPath; + private final OriginalContent originalContent = new OriginalContent(); + private final BlobClient syncClient; + private final BlobAsyncClient asyncClient; + private final BlobAsyncClient asyncNoFaultClient; + private final ParallelTransferOptions parallelTransferOptions; + + public DownloadToFile(StorageStressOptions options) { + super(options); + this.directoryPath = getTempPath("test"); + String blobName = generateBlobName(); + this.asyncNoFaultClient = getAsyncContainerClientNoFault().getBlobAsyncClient(blobName); + this.syncClient = getSyncContainerClient().getBlobClient(blobName); + this.asyncClient = getAsyncContainerClient().getBlobAsyncClient(blobName); + this.parallelTransferOptions = new ParallelTransferOptions().setMaxConcurrency(options.getMaxConcurrency()); + } + + @Override + protected void runInternal(Context span) { + Path downloadPath = directoryPath.resolve(UUID.randomUUID() + ".txt"); + BlobDownloadToFileOptions blobOptions = new BlobDownloadToFileOptions(downloadPath.toString()) + .setParallelTransferOptions(parallelTransferOptions); + + try { + syncClient.downloadToFileWithResponse(blobOptions, Duration.ofSeconds(options.getDuration()), span); + originalContent.checkMatch(BinaryData.fromFile(downloadPath), span).block(); + } finally { + deleteFile(downloadPath); + } + } + + @Override + protected Mono runInternalAsync(Context span) { + return Mono.using( + () -> directoryPath.resolve(UUID.randomUUID() + ".txt"), + path -> asyncClient.downloadToFileWithResponse( + new BlobDownloadToFileOptions(path.toString()).setParallelTransferOptions(parallelTransferOptions)) + .flatMap(ignored -> originalContent.checkMatch(BinaryData.fromFile(path), span)), + DownloadToFile::deleteFile); + } + + private static void deleteFile(Path path) { + try { + path.toFile().delete(); + } catch (Throwable e) { + LOGGER.atError() + .addKeyValue("path", path) + .log("failed to delete file", e); + } + } + + @Override + public Mono setupAsync() { + // setup is called for each instance of scenario. Number of instances equals options.getParallel() + // so we're setting up options.getParallel() blobs to scale beyond service limits for 1 blob. + return super.setupAsync() + .then(originalContent.setupBlob(asyncNoFaultClient, options.getSize())); + } + + @Override + public Mono cleanupAsync() { + return asyncNoFaultClient.deleteIfExists() + .then(super.cleanupAsync()); + } + + private Path getTempPath(String prefix) { + try { + return Files.createTempDirectory(prefix); + } catch (IOException e) { + throw LOGGER.logExceptionAsError(new UncheckedIOException(e)); + } + } +} diff --git a/sdk/storage/azure-storage-blob-stress-v2/src/main/java/com/azure/v2/storage/blob/stress/OpenInputStream.java b/sdk/storage/azure-storage-blob-stress-v2/src/main/java/com/azure/v2/storage/blob/stress/OpenInputStream.java new file mode 100644 index 000000000000..cb385f620f96 --- /dev/null +++ b/sdk/storage/azure-storage-blob-stress-v2/src/main/java/com/azure/v2/storage/blob/stress/OpenInputStream.java @@ -0,0 +1,65 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.v2.storage.blob.stress; + +import com.azure.core.util.Context; +import com.azure.core.util.logging.ClientLogger; +import com.azure.storage.blob.BlobAsyncClient; +import com.azure.storage.blob.BlobClient; +import com.azure.storage.stress.CrcInputStream; +import com.azure.storage.stress.StorageStressOptions; +import com.azure.v2.storage.blob.stress.utils.OriginalContent; +import reactor.core.publisher.Mono; + +import java.io.IOException; +import java.io.InputStream; + +import static com.azure.core.util.FluxUtil.monoError; + +public class OpenInputStream extends BlobScenarioBase { + private static final ClientLogger LOGGER = new ClientLogger(OpenInputStream.class); + private final OriginalContent originalContent = new OriginalContent(); + private final BlobClient syncClient; + private final BlobAsyncClient asyncNoFaultClient; + + + public OpenInputStream(StorageStressOptions options) { + super(options); + String blobName = generateBlobName(); + this.syncClient = getSyncContainerClient().getBlobClient(blobName); + this.asyncNoFaultClient = getAsyncContainerClientNoFault().getBlobAsyncClient(blobName); + } + + @Override + protected void runInternal(Context span) throws IOException { + try (InputStream stream = syncClient.openInputStream()) { + try (CrcInputStream crcStream = new CrcInputStream(stream)) { + byte[] buffer = new byte[8192]; + while (crcStream.read(buffer) != -1) { + // do nothing + } + originalContent.checkMatch(crcStream.getContentInfo(), span).block(); + } + } + } + + @Override + protected Mono runInternalAsync(Context context) { + return monoError(LOGGER, new RuntimeException("openInputStream() does not exist on the async client")); + } + + @Override + public Mono setupAsync() { + // setup is called for each instance of scenario. Number of instances equals options.getParallel() + // so we're setting up options.getParallel() blobs to scale beyond service limits for 1 blob. + return super.setupAsync() + .then(originalContent.setupBlob(asyncNoFaultClient, options.getSize())); + } + + @Override + public Mono cleanupAsync() { + return asyncNoFaultClient.deleteIfExists() + .then(super.cleanupAsync()); + } +} diff --git a/sdk/storage/azure-storage-blob-stress-v2/src/main/java/com/azure/v2/storage/blob/stress/OpenSeekableByteChannelRead.java b/sdk/storage/azure-storage-blob-stress-v2/src/main/java/com/azure/v2/storage/blob/stress/OpenSeekableByteChannelRead.java new file mode 100644 index 000000000000..9047e72e672f --- /dev/null +++ b/sdk/storage/azure-storage-blob-stress-v2/src/main/java/com/azure/v2/storage/blob/stress/OpenSeekableByteChannelRead.java @@ -0,0 +1,66 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.v2.storage.blob.stress; + +import com.azure.core.util.Context; +import com.azure.core.util.logging.ClientLogger; +import com.azure.storage.blob.BlobAsyncClient; +import com.azure.storage.blob.BlobClient; +import com.azure.storage.blob.models.BlobSeekableByteChannelReadResult; +import com.azure.storage.blob.options.BlobSeekableByteChannelReadOptions; +import com.azure.storage.stress.CrcInputStream; +import com.azure.storage.stress.StorageStressOptions; +import com.azure.v2.storage.blob.stress.utils.OriginalContent; +import reactor.core.publisher.Mono; + +import java.io.IOException; +import java.nio.channels.Channels; + +import static com.azure.core.util.FluxUtil.monoError; + +public class OpenSeekableByteChannelRead extends BlobScenarioBase { + private static final ClientLogger LOGGER = new ClientLogger(OpenSeekableByteChannelRead.class); + private final OriginalContent originalContent = new OriginalContent(); + private final BlobClient syncClient; + private final BlobAsyncClient asyncNoFaultClient; + + public OpenSeekableByteChannelRead(StorageStressOptions options) { + super(options); + String blobName = generateBlobName(); + this.asyncNoFaultClient = getAsyncContainerClientNoFault().getBlobAsyncClient(blobName); + this.syncClient = getSyncContainerClient().getBlobClient(blobName); + } + + @Override + protected void runInternal(Context span) throws IOException { + BlobSeekableByteChannelReadResult result = syncClient.openSeekableByteChannelRead( + new BlobSeekableByteChannelReadOptions(), span); + try (CrcInputStream crcStream = new CrcInputStream(Channels.newInputStream(result.getChannel()))) { + byte[] buffer = new byte[8192]; + while (crcStream.read(buffer) != -1) { + // do nothing + } + originalContent.checkMatch(crcStream.getContentInfo(), span).block(); + } + } + + @Override + protected Mono runInternalAsync(Context span) { + return monoError(LOGGER, new RuntimeException("openSeekableByteChannelRead() does not exist on the async client")); + } + + @Override + public Mono setupAsync() { + // setup is called for each instance of scenario. Number of instances equals options.getParallel() + // so we're setting up options.getParallel() blobs to scale beyond service limits for 1 blob. + return super.setupAsync() + .then(originalContent.setupBlob(asyncNoFaultClient, options.getSize())); + } + + @Override + public Mono cleanupAsync() { + return asyncNoFaultClient.deleteIfExists() + .then(super.cleanupAsync()); + } +} diff --git a/sdk/storage/azure-storage-blob-stress-v2/src/main/java/com/azure/v2/storage/blob/stress/OpenSeekableByteChannelWrite.java b/sdk/storage/azure-storage-blob-stress-v2/src/main/java/com/azure/v2/storage/blob/stress/OpenSeekableByteChannelWrite.java new file mode 100644 index 000000000000..f47d7d2114e7 --- /dev/null +++ b/sdk/storage/azure-storage-blob-stress-v2/src/main/java/com/azure/v2/storage/blob/stress/OpenSeekableByteChannelWrite.java @@ -0,0 +1,78 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.v2.storage.blob.stress; + +import com.azure.core.util.Context; +import com.azure.core.util.logging.ClientLogger; +import com.azure.storage.blob.BlobAsyncClient; +import com.azure.storage.blob.BlobClient; +import com.azure.storage.blob.options.BlockBlobSeekableByteChannelWriteOptions; +import com.azure.storage.blob.specialized.BlockBlobClient; +import com.azure.storage.common.implementation.StorageSeekableByteChannel; +import com.azure.storage.stress.CrcInputStream; +import com.azure.storage.stress.StorageStressOptions; +import com.azure.v2.storage.blob.stress.utils.OriginalContent; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; + +import java.io.IOException; +import java.nio.ByteBuffer; + +import static com.azure.core.util.FluxUtil.monoError; +import static com.azure.storage.blob.options.BlockBlobSeekableByteChannelWriteOptions.WriteMode.OVERWRITE; + +public class OpenSeekableByteChannelWrite extends BlobScenarioBase { + private static final ClientLogger LOGGER = new ClientLogger(OpenSeekableByteChannelWrite.class); + private final OriginalContent originalContent = new OriginalContent(); + private final BlobClient syncClient; + private final BlobAsyncClient asyncNoFaultClient; + + public OpenSeekableByteChannelWrite(StorageStressOptions options) { + super(options); + String blobName = generateBlobName(); + this.syncClient = getSyncContainerClient().getBlobClient(blobName); + this.asyncNoFaultClient = getAsyncContainerClientNoFault().getBlobAsyncClient(blobName); + } + + @Override + protected void runInternal(Context span) throws IOException { + BlockBlobClient blockBlobClient = syncClient.getBlockBlobClient(); + Flux byteBufferFlux = new CrcInputStream(originalContent.getBlobContentHead(), options.getSize()) + .convertStreamToByteBuffer(); + + try (StorageSeekableByteChannel channel = (StorageSeekableByteChannel) blockBlobClient.openSeekableByteChannelWrite( + new BlockBlobSeekableByteChannelWriteOptions(OVERWRITE))) { + // Perform buffered write upload to the blob + Mono writeOperation = byteBufferFlux + .doOnNext(buffer -> { + try { + // This will write each chunk as it comes + channel.write(buffer); + } catch (IOException e) { + throw LOGGER.logExceptionAsError(new RuntimeException(e)); + } + }).then(); + // Trigger the operation and wait for completion + writeOperation.block(); + channel.getWriteBehavior().commit(options.getSize()); + } + // Check if the blob content matches the original content + originalContent.checkMatch(byteBufferFlux, span).block(); + } + + @Override + protected Mono runInternalAsync(Context span) { + return monoError(LOGGER, new RuntimeException("OpenSeekableByteChannelWrite() does not exist on the async client")); + } + + @Override + public Mono setupAsync() { + return super.setupAsync().then(originalContent.setupBlob(asyncNoFaultClient, options.getSize())); + } + + @Override + public Mono cleanupAsync() { + return asyncNoFaultClient.deleteIfExists().then(super.cleanupAsync()); + } +} diff --git a/sdk/storage/azure-storage-blob-stress-v2/src/main/java/com/azure/v2/storage/blob/stress/PageBlobOutputStream.java b/sdk/storage/azure-storage-blob-stress-v2/src/main/java/com/azure/v2/storage/blob/stress/PageBlobOutputStream.java new file mode 100644 index 000000000000..6851f1fd0287 --- /dev/null +++ b/sdk/storage/azure-storage-blob-stress-v2/src/main/java/com/azure/v2/storage/blob/stress/PageBlobOutputStream.java @@ -0,0 +1,100 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.v2.storage.blob.stress; + +import com.azure.core.util.Context; +import com.azure.core.util.logging.ClientLogger; +import com.azure.storage.blob.BlobAsyncClient; +import com.azure.storage.blob.BlobClient; +import com.azure.storage.blob.models.PageRange; +import com.azure.storage.blob.specialized.BlobOutputStream; +import com.azure.storage.blob.specialized.PageBlobAsyncClient; +import com.azure.storage.blob.specialized.PageBlobClient; +import com.azure.storage.stress.CrcInputStream; +import com.azure.storage.stress.StorageStressOptions; +import com.azure.v2.storage.blob.stress.utils.OriginalContent; +import reactor.core.publisher.Mono; + +import java.io.ByteArrayOutputStream; +import java.io.IOException; + +import static com.azure.core.util.FluxUtil.monoError; + +public class PageBlobOutputStream extends PageBlobScenarioBase { + private static final ClientLogger LOGGER = new ClientLogger(BlockBlobOutputStream.class); + private final OriginalContent originalContent = new OriginalContent(); + private final BlobClient syncClient; + private final BlobAsyncClient asyncNoFaultClient; + // this blob is used to perform normal upload in the setup phase + private final PageBlobAsyncClient tempSetupPageBlobClient; + + public PageBlobOutputStream(StorageStressOptions options) { + super(options); + String blobName = generateBlobName(); + String tempBlobName = generateBlobName(); + + this.syncClient = getSyncContainerClient().getBlobClient(blobName); + this.asyncNoFaultClient = getAsyncContainerClientNoFault().getBlobAsyncClient(blobName); + BlobAsyncClient tempSetupBlobClient = getAsyncContainerClientNoFault().getBlobAsyncClient(tempBlobName); + this.tempSetupPageBlobClient = tempSetupBlobClient.getPageBlobAsyncClient(); + } + + @Override + protected void runInternal(Context span) throws IOException { + PageBlobClient pageBlobClient = syncClient.getPageBlobClient(); + + try (CrcInputStream inputStream = new CrcInputStream(originalContent.getBlobContentHead(), options.getSize()); + BlobOutputStream outputStream = pageBlobClient.getBlobOutputStream(new PageRange().setStart(0) + .setEnd(options.getSize() - 1))) { + ByteArrayOutputStream bufferStream = new ByteArrayOutputStream(); + byte[] buffer = new byte[512]; // Use 512-byte blocks for Page Blob + int bytesRead; + + // Read from the inputStream and write to the blobOutputStream in 512-byte chunks + while ((bytesRead = inputStream.read(buffer)) != -1) { + if (bytesRead < buffer.length) { + // If bytesRead is less than 512, store in a temporary buffer + bufferStream.write(buffer, 0, bytesRead); + // Check if the bufferStream has reached or exceeded 512 bytes + if (bufferStream.size() >= buffer.length) { + byte[] toWrite = bufferStream.toByteArray(); + int length = toWrite.length - (toWrite.length % buffer.length); + outputStream.write(toWrite, 0, length); + bufferStream.reset(); + // Keep the remainder in the bufferStream + bufferStream.write(toWrite, length, (toWrite.length % buffer.length)); + } + } else { + // If bytesRead is exactly 512, write directly + outputStream.write(buffer, 0, bytesRead); + } + } + + // Ensure to close the blobOutputStream to flush any remaining data and finalize the blob. + outputStream.close(); + originalContent.checkMatch(inputStream.getContentInfo(), span).block(); + } + } + + @Override + protected Mono runInternalAsync(Context span) { + return monoError(LOGGER, new RuntimeException("getBlobOutputStream() does not exist on the async client")); + } + + + @Override + public Mono setupAsync() { + return super.setupAsync() + .then(asyncNoFaultClient.getPageBlobAsyncClient().create(options.getSize())) + .then(tempSetupPageBlobClient.create(options.getSize())) + .then(originalContent.setupPageBlob(tempSetupPageBlobClient, options.getSize())); + } + + @Override + public Mono cleanupAsync() { + return asyncNoFaultClient.getPageBlobAsyncClient().delete() + .then(tempSetupPageBlobClient.delete()) + .then(super.cleanupAsync()); + } +} diff --git a/sdk/storage/azure-storage-blob-stress-v2/src/main/java/com/azure/v2/storage/blob/stress/PageBlobScenarioBase.java b/sdk/storage/azure-storage-blob-stress-v2/src/main/java/com/azure/v2/storage/blob/stress/PageBlobScenarioBase.java new file mode 100644 index 000000000000..ebd1ec8cb4d4 --- /dev/null +++ b/sdk/storage/azure-storage-blob-stress-v2/src/main/java/com/azure/v2/storage/blob/stress/PageBlobScenarioBase.java @@ -0,0 +1,141 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.v2.storage.blob.stress; + +import com.azure.core.http.policy.HttpLogDetailLevel; +import com.azure.core.http.policy.HttpLogOptions; +import com.azure.core.util.Context; +import com.azure.identity.DefaultAzureCredential; +import com.azure.identity.DefaultAzureCredentialBuilder; +import com.azure.perf.test.core.PerfStressTest; +import com.azure.storage.blob.BlobContainerAsyncClient; +import com.azure.storage.blob.BlobContainerClient; +import com.azure.storage.blob.BlobServiceAsyncClient; +import com.azure.storage.blob.BlobServiceClient; +import com.azure.storage.blob.BlobServiceClientBuilder; +import com.azure.storage.stress.FaultInjectingHttpPolicy; +import com.azure.storage.stress.FaultInjectionProbabilities; +import com.azure.storage.stress.StorageStressOptions; +import com.azure.storage.stress.TelemetryHelper; +import reactor.core.publisher.Mono; + +import java.time.Instant; +import java.util.UUID; + +public abstract class PageBlobScenarioBase extends PerfStressTest { + private static final String CONTAINER_NAME = "stress-" + UUID.randomUUID(); + protected final TelemetryHelper telemetryHelper = new TelemetryHelper(this.getClass()); + private final BlobServiceClient noFaultServiceClient; + private final BlobContainerClient syncContainerClient; + private final BlobContainerAsyncClient asyncContainerClient; + private final BlobContainerAsyncClient asyncNoFaultContainerClient; + private Instant startTime; + + public PageBlobScenarioBase(TOptions options) { + super(options); + + DefaultAzureCredential defaultAzureCredential = new DefaultAzureCredentialBuilder().build(); + String endpoint = options.getPageBlobEndpointString(); + + BlobServiceClientBuilder clientBuilder = new BlobServiceClientBuilder() + .credential(defaultAzureCredential) + .endpoint(endpoint) + .httpLogOptions(getLogOptions()); + + BlobServiceAsyncClient asyncNoFaultClient = clientBuilder.buildAsyncClient(); + noFaultServiceClient = clientBuilder.buildClient(); + + if (options.isFaultInjectionEnabledForDownloads()) { + clientBuilder.addPolicy(new FaultInjectingHttpPolicy(true, getFaultProbabilities(), false)); + } else if (options.isFaultInjectionEnabledForUploads()) { + clientBuilder.addPolicy(new FaultInjectingHttpPolicy(true, getFaultProbabilities(), true)); + } + + BlobServiceClient syncClient = clientBuilder.buildClient(); + BlobServiceAsyncClient asyncClient = clientBuilder.buildAsyncClient(); + asyncNoFaultContainerClient = asyncNoFaultClient.getBlobContainerAsyncClient(CONTAINER_NAME); + syncContainerClient = syncClient.getBlobContainerClient(CONTAINER_NAME); + asyncContainerClient = asyncClient.getBlobContainerAsyncClient(CONTAINER_NAME); + } + + @Override + public Mono globalSetupAsync() { + startTime = Instant.now(); + telemetryHelper.recordStart(options); + return super.globalSetupAsync() + .then(asyncNoFaultContainerClient.createIfNotExists()) + .then(); + } + + @Override + public Mono globalCleanupAsync() { + telemetryHelper.recordEnd(startTime); + return asyncNoFaultContainerClient.deleteIfExists() + .then(super.globalCleanupAsync()); + } + + @SuppressWarnings("try") + @Override + public void run() { + telemetryHelper.instrumentRun(ctx -> runInternal(ctx)); + } + + @SuppressWarnings("try") + @Override + public Mono runAsync() { + return telemetryHelper.instrumentRunAsync(ctx -> runInternalAsync(ctx)) + .onErrorResume(e -> Mono.empty()); + } + + protected abstract void runInternal(Context context) throws Exception; + protected abstract Mono runInternalAsync(Context context); + + protected BlobContainerClient getSyncContainerClient() { + return syncContainerClient; + } + + protected BlobContainerAsyncClient getAsyncContainerClient() { + return asyncContainerClient; + } + + protected BlobContainerAsyncClient getAsyncContainerClientNoFault() { + return asyncNoFaultContainerClient; + } + + protected BlobContainerClient getSyncContainerClientNoFault() { + return noFaultServiceClient.getBlobContainerClient(CONTAINER_NAME); + } + + protected String generateBlobName() { + return "blob-" + UUID.randomUUID(); + } + + private static HttpLogOptions getLogOptions() { + return new HttpLogOptions() + .setLogLevel(HttpLogDetailLevel.HEADERS) + .addAllowedHeaderName("x-ms-faultinjector-response-option") + .addAllowedHeaderName("Content-Range") + .addAllowedHeaderName("Accept-Ranges") + .addAllowedHeaderName("x-ms-blob-content-md5") + .addAllowedHeaderName("x-ms-error-code") + .addAllowedHeaderName("x-ms-range"); + } + + private static FaultInjectionProbabilities getFaultProbabilities() { + return new FaultInjectionProbabilities() + .setNoResponseIndefinite(0.003D) + .setNoResponseClose(0.004D) + .setNoResponseAbort(0.003D) + .setPartialResponseIndefinite(0.06) + .setPartialResponseClose(0.06) + .setPartialResponseAbort(0.06) + .setPartialResponseFinishNormal(0.06) + .setNoRequestIndefinite(0.003D) + .setNoRequestClose(0.004D) + .setNoRequestAbort(0.003D) + .setPartialRequestIndefinite(0.06) + .setPartialRequestClose(0.06) + .setPartialRequestAbort(0.06); + } +} diff --git a/sdk/storage/azure-storage-blob-stress-v2/src/main/java/com/azure/v2/storage/blob/stress/StageBlock.java b/sdk/storage/azure-storage-blob-stress-v2/src/main/java/com/azure/v2/storage/blob/stress/StageBlock.java new file mode 100644 index 000000000000..5a28e766c615 --- /dev/null +++ b/sdk/storage/azure-storage-blob-stress-v2/src/main/java/com/azure/v2/storage/blob/stress/StageBlock.java @@ -0,0 +1,85 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.v2.storage.blob.stress; + +import com.azure.core.util.Context; +import com.azure.core.util.CoreUtils; +import com.azure.storage.blob.BlobAsyncClient; +import com.azure.storage.blob.BlobClient; +import com.azure.storage.blob.options.BlockBlobCommitBlockListOptions; +import com.azure.storage.blob.specialized.BlockBlobAsyncClient; +import com.azure.storage.blob.specialized.BlockBlobClient; +import com.azure.storage.stress.CrcInputStream; +import com.azure.storage.stress.StorageStressOptions; +import com.azure.v2.storage.blob.stress.utils.OriginalContent; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; + +import java.nio.ByteBuffer; +import java.nio.charset.StandardCharsets; +import java.util.Base64; +import java.util.Collections; + +public class StageBlock extends BlobScenarioBase { + private final OriginalContent originalContent = new OriginalContent(); + private final BlobClient syncClient; + private final BlobAsyncClient asyncClient; + private final BlobClient syncNoFaultClient; + private final BlobAsyncClient asyncNoFaultClient; + + public StageBlock(StorageStressOptions options) { + super(options); + String blobName = generateBlobName(); + this.syncNoFaultClient = getSyncContainerClientNoFault().getBlobClient(blobName); + this.asyncNoFaultClient = getAsyncContainerClientNoFault().getBlobAsyncClient(blobName); + this.syncClient = getSyncContainerClient().getBlobClient(blobName); + this.asyncClient = getAsyncContainerClient().getBlobAsyncClient(blobName); + } + + @Override + protected void runInternal(Context span) { + BlockBlobClient blockBlobClient = syncClient.getBlockBlobClient(); + BlockBlobClient blockBlobClientNoFault = syncNoFaultClient.getBlockBlobClient(); + String blockId = Base64.getEncoder().encodeToString(CoreUtils.randomUuid().toString() + .getBytes(StandardCharsets.UTF_8)); + try (CrcInputStream inputStream = new CrcInputStream(originalContent.getBlobContentHead(), options.getSize())) { + // First perform faulted stage block to send data to the service + blockBlobClient.stageBlockWithResponse(blockId, inputStream, options.getSize(), null, null, null, span); + // Then perform non-faulted commit block list to commit the block + blockBlobClientNoFault.commitBlockListWithResponse( + new BlockBlobCommitBlockListOptions(Collections.singletonList(blockId)), null, span); + // Confirm the CRC matches for the uploaded input stream + originalContent.checkMatch(inputStream.getContentInfo(), span).block(); + } + } + + @Override + protected Mono runInternalAsync(Context span) { + BlockBlobAsyncClient blockBlobAsyncClient = asyncClient.getBlockBlobAsyncClient(); + BlockBlobAsyncClient blockBlobAsyncClientNoFault = asyncNoFaultClient.getBlockBlobAsyncClient(); + String blockId = Base64.getEncoder().encodeToString(CoreUtils.randomUuid().toString() + .getBytes(StandardCharsets.UTF_8)); + Flux byteBufferFlux = new CrcInputStream(originalContent.getBlobContentHead(), options.getSize()) + .convertStreamToByteBuffer(); + // First perform faulted stage block to send data to the service + return blockBlobAsyncClient.stageBlockWithResponse(blockId, byteBufferFlux, options.getSize(), null, null) + // Then perform non-faulted commit block list to commit the block + .then(blockBlobAsyncClientNoFault.commitBlockListWithResponse( + new BlockBlobCommitBlockListOptions(Collections.singletonList(blockId)))) + // Confirm the CRC matches for the uploaded byte buffer flux + .then(originalContent.checkMatch(byteBufferFlux, span)); + } + + @Override + public Mono setupAsync() { + return super.setupAsync().then(originalContent.setupBlob(asyncNoFaultClient, options.getSize())); + } + + @Override + public Mono cleanupAsync() { + return asyncNoFaultClient.delete() + .then(super.cleanupAsync()); + } + +} diff --git a/sdk/storage/azure-storage-blob-stress-v2/src/main/java/com/azure/v2/storage/blob/stress/Upload.java b/sdk/storage/azure-storage-blob-stress-v2/src/main/java/com/azure/v2/storage/blob/stress/Upload.java new file mode 100644 index 000000000000..bcdefb7bedf3 --- /dev/null +++ b/sdk/storage/azure-storage-blob-stress-v2/src/main/java/com/azure/v2/storage/blob/stress/Upload.java @@ -0,0 +1,67 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.v2.storage.blob.stress; + +import com.azure.core.util.Context; +import com.azure.storage.blob.BlobAsyncClient; +import com.azure.storage.blob.BlobClient; +import com.azure.storage.blob.models.ParallelTransferOptions; +import com.azure.storage.blob.options.BlobParallelUploadOptions; +import com.azure.storage.stress.CrcInputStream; +import com.azure.storage.stress.StorageStressOptions; +import com.azure.v2.storage.blob.stress.utils.OriginalContent; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; + +import java.nio.ByteBuffer; + +public class Upload extends BlobScenarioBase { + private final OriginalContent originalContent = new OriginalContent(); + private final BlobClient syncClient; + private final BlobAsyncClient asyncClient; + private final BlobAsyncClient asyncNoFaultClient; + private final ParallelTransferOptions parallelTransferOptions; + + public Upload(StorageStressOptions options) { + super(options); + String blobName = generateBlobName(); + this.asyncNoFaultClient = getAsyncContainerClientNoFault().getBlobAsyncClient(blobName); + this.syncClient = getSyncContainerClient().getBlobClient(blobName); + this.asyncClient = getAsyncContainerClient().getBlobAsyncClient(blobName); + parallelTransferOptions = new ParallelTransferOptions() + .setMaxConcurrency(options.getMaxConcurrency()) + .setMaxSingleUploadSizeLong(4 * 1024 * 1024L); + } + + @Override + protected void runInternal(Context span) { + try (CrcInputStream inputStream = new CrcInputStream(originalContent.getBlobContentHead(), options.getSize())) { + syncClient.uploadWithResponse(new BlobParallelUploadOptions(inputStream) + .setParallelTransferOptions(parallelTransferOptions), null, span); + originalContent.checkMatch(inputStream.getContentInfo(), span).block(); + } + } + + @Override + protected Mono runInternalAsync(Context span) { + Flux byteBufferFlux = new CrcInputStream(originalContent.getBlobContentHead(), options.getSize()) + .convertStreamToByteBuffer(); + + // Using the same Flux that was used to upload the blob to check the content. + return asyncClient.uploadWithResponse(new BlobParallelUploadOptions(byteBufferFlux) + .setParallelTransferOptions(parallelTransferOptions)) + .then(originalContent.checkMatch(byteBufferFlux, span)); + } + + @Override + public Mono setupAsync() { + return super.setupAsync().then(originalContent.setupBlob(asyncNoFaultClient, options.getSize())); + } + + @Override + public Mono cleanupAsync() { + return asyncNoFaultClient.delete() + .then(super.cleanupAsync()); + } +} diff --git a/sdk/storage/azure-storage-blob-stress-v2/src/main/java/com/azure/v2/storage/blob/stress/UploadFromFile.java b/sdk/storage/azure-storage-blob-stress-v2/src/main/java/com/azure/v2/storage/blob/stress/UploadFromFile.java new file mode 100644 index 000000000000..e767c44475a9 --- /dev/null +++ b/sdk/storage/azure-storage-blob-stress-v2/src/main/java/com/azure/v2/storage/blob/stress/UploadFromFile.java @@ -0,0 +1,129 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.v2.storage.blob.stress; + +import com.azure.core.util.BinaryData; +import com.azure.core.util.Context; +import com.azure.core.util.CoreUtils; +import com.azure.core.util.logging.ClientLogger; +import com.azure.storage.blob.BlobAsyncClient; +import com.azure.storage.blob.BlobClient; +import com.azure.storage.blob.models.ParallelTransferOptions; +import com.azure.storage.blob.options.BlobDownloadToFileOptions; +import com.azure.storage.blob.options.BlobUploadFromFileOptions; +import com.azure.storage.stress.CrcInputStream; +import com.azure.storage.stress.StorageStressOptions; +import com.azure.v2.storage.blob.stress.utils.OriginalContent; +import reactor.core.publisher.Mono; + +import java.io.File; +import java.io.IOException; +import java.io.InputStream; +import java.io.UncheckedIOException; +import java.nio.file.Files; +import java.nio.file.Path; +import java.nio.file.StandardCopyOption; +import java.util.UUID; + +public class UploadFromFile extends BlobScenarioBase { + private static final ClientLogger LOGGER = new ClientLogger(UploadFromFile.class); + private final OriginalContent originalContent = new OriginalContent(); + private final BlobClient syncClient; + private final BlobAsyncClient asyncClient; + private final BlobClient syncNoFaultClient; + private final BlobAsyncClient asyncNoFaultClient; + private final ParallelTransferOptions parallelTransferOptions; + + public UploadFromFile(StorageStressOptions options) { + super(options); + String blobName = generateBlobName(); + this.asyncNoFaultClient = getAsyncContainerClientNoFault().getBlobAsyncClient(blobName); + this.syncNoFaultClient = getSyncContainerClientNoFault().getBlobClient(blobName); + this.syncClient = getSyncContainerClient().getBlobClient(blobName); + this.asyncClient = getAsyncContainerClient().getBlobAsyncClient(blobName); + this.parallelTransferOptions = new ParallelTransferOptions() + .setMaxConcurrency(options.getMaxConcurrency()) + .setMaxSingleUploadSizeLong(4 * 1024 * 1024L); + } + + @Override + protected void runInternal(Context span) { + // first upload file using faulted client + Path downloadPath = getTempPath("test"); + try (CrcInputStream inputStream = new CrcInputStream(originalContent.getBlobContentHead(), options.getSize())) { + Path uploadFilePath = generateFile(inputStream); + downloadPath = downloadPath.resolve(CoreUtils.randomUuid() + ".txt"); + syncClient.uploadFromFileWithResponse(new BlobUploadFromFileOptions(uploadFilePath.toString()) + .setParallelTransferOptions(parallelTransferOptions), null, span); + // then download file using no fault client to verify the content + syncNoFaultClient.downloadToFileWithResponse( + new BlobDownloadToFileOptions(downloadPath.toString()), null, span); + originalContent.checkMatch(BinaryData.fromFile(downloadPath), span).block(); + } finally { + deleteFile(downloadPath); + } + } + + @Override + protected Mono runInternalAsync(Context span) { + Path downloadPath = getTempPath("test"); + return Mono.using( + () -> new CrcInputStream(originalContent.getBlobContentHead(), options.getSize()), + inputStream -> { + Path uploadFilePath = generateFile(inputStream); + return Mono.using( + () -> downloadPath.resolve(UUID.randomUUID() + ".txt"), + path -> asyncClient.uploadFromFileWithResponse(new BlobUploadFromFileOptions(uploadFilePath.toString()) + .setParallelTransferOptions(parallelTransferOptions)) + .flatMap(ignored -> asyncNoFaultClient.downloadToFileWithResponse( + new BlobDownloadToFileOptions(path.toString())) + ) + .flatMap(ignored -> originalContent.checkMatch(BinaryData.fromFile(path), span)), + UploadFromFile::deleteFile); + }, + CrcInputStream::close); + } + + @Override + public Mono setupAsync() { + return super.setupAsync().then(originalContent.setupBlob(asyncNoFaultClient, options.getSize())); + } + + @Override + public Mono cleanupAsync() { + return asyncNoFaultClient.deleteIfExists() + .then(super.cleanupAsync()); + } + + + private Path getTempPath(String prefix) { + try { + return Files.createTempDirectory(prefix); + } catch (IOException e) { + throw LOGGER.logExceptionAsError(new UncheckedIOException(e)); + } + } + + private static void deleteFile(Path path) { + try { + path.toFile().delete(); + } catch (Throwable e) { + LOGGER.atError() + .addKeyValue("path", path) + .log("failed to delete file", e); + } + } + + private static Path generateFile(InputStream inputStream) { + try { + File file = Files.createTempFile(CoreUtils.randomUuid().toString(), ".txt").toFile(); + file.deleteOnExit(); + Files.copy(inputStream, file.toPath(), StandardCopyOption.REPLACE_EXISTING); + return file.toPath(); + } catch (IOException e) { + throw LOGGER.logExceptionAsError(new UncheckedIOException(e)); + } + } + +} diff --git a/sdk/storage/azure-storage-blob-stress-v2/src/main/java/com/azure/v2/storage/blob/stress/UploadPages.java b/sdk/storage/azure-storage-blob-stress-v2/src/main/java/com/azure/v2/storage/blob/stress/UploadPages.java new file mode 100644 index 000000000000..afd017e2cc10 --- /dev/null +++ b/sdk/storage/azure-storage-blob-stress-v2/src/main/java/com/azure/v2/storage/blob/stress/UploadPages.java @@ -0,0 +1,76 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.v2.storage.blob.stress; + +import com.azure.core.util.Context; +import com.azure.storage.blob.BlobAsyncClient; +import com.azure.storage.blob.BlobClient; +import com.azure.storage.blob.models.PageRange; +import com.azure.storage.blob.specialized.PageBlobAsyncClient; +import com.azure.storage.blob.specialized.PageBlobClient; +import com.azure.storage.common.Utility; +import com.azure.storage.stress.CrcInputStream; +import com.azure.storage.stress.StorageStressOptions; +import com.azure.v2.storage.blob.stress.utils.OriginalContent; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; + +import java.nio.ByteBuffer; + +public class UploadPages extends PageBlobScenarioBase { + private final OriginalContent originalContent = new OriginalContent(); + private final BlobClient syncClient; + private final BlobAsyncClient asyncClient; + private final BlobAsyncClient asyncNoFaultClient; + private final PageBlobAsyncClient tempSetupPageBlobClient; + + public UploadPages(StorageStressOptions options) { + super(options); + String blobName = generateBlobName(); + String tempBlobName = generateBlobName(); + + this.asyncNoFaultClient = getAsyncContainerClientNoFault().getBlobAsyncClient(blobName); + this.syncClient = getSyncContainerClient().getBlobClient(blobName); + this.asyncClient = getAsyncContainerClient().getBlobAsyncClient(blobName); + // this blob is used to perform normal upload in the setup phase + BlobAsyncClient tempSetupBlobClient = getAsyncContainerClientNoFault().getBlobAsyncClient(tempBlobName); + this.tempSetupPageBlobClient = tempSetupBlobClient.getPageBlobAsyncClient(); + } + + @Override + protected void runInternal(Context span) { + try (CrcInputStream inputStream = new CrcInputStream(originalContent.getBlobContentHead(), options.getSize())) { + PageBlobClient pageBlobClient = syncClient.getPageBlobClient(); + pageBlobClient.uploadPagesWithResponse(new PageRange().setStart(0).setEnd(options.getSize() - 1), + inputStream, null, null, null, span); + originalContent.checkMatch(inputStream.getContentInfo(), span).block(); + } + } + + @Override + protected Mono runInternalAsync(Context span) { + PageBlobAsyncClient pageBlobAsyncClient = asyncClient.getPageBlobAsyncClient(); + Flux byteBufferFlux = Utility.convertStreamToByteBuffer( + new CrcInputStream(originalContent.getBlobContentHead(), options.getSize()), options.getSize(), + PageBlobClient.PAGE_BYTES); + return pageBlobAsyncClient.uploadPagesWithResponse(new PageRange().setStart(0).setEnd(options.getSize() - 1), + byteBufferFlux, null, null) + .then(originalContent.checkMatch(byteBufferFlux, span)); + } + + @Override + public Mono setupAsync() { + return super.setupAsync() + .then(asyncNoFaultClient.getPageBlobAsyncClient().create(options.getSize())) + .then(tempSetupPageBlobClient.create(options.getSize())) + .then(originalContent.setupPageBlob(tempSetupPageBlobClient, options.getSize())); + } + + @Override + public Mono cleanupAsync() { + return asyncNoFaultClient.getPageBlobAsyncClient().delete() + .then(tempSetupPageBlobClient.delete()) + .then(super.cleanupAsync()); + } +} diff --git a/sdk/storage/azure-storage-blob-stress-v2/src/main/java/com/azure/v2/storage/blob/stress/package-info.java b/sdk/storage/azure-storage-blob-stress-v2/src/main/java/com/azure/v2/storage/blob/stress/package-info.java new file mode 100644 index 000000000000..34384cbb3638 --- /dev/null +++ b/sdk/storage/azure-storage-blob-stress-v2/src/main/java/com/azure/v2/storage/blob/stress/package-info.java @@ -0,0 +1,4 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.v2.storage.blob.stress; diff --git a/sdk/storage/azure-storage-blob-stress-v2/src/main/java/com/azure/v2/storage/blob/stress/utils/OriginalContent.java b/sdk/storage/azure-storage-blob-stress-v2/src/main/java/com/azure/v2/storage/blob/stress/utils/OriginalContent.java new file mode 100644 index 000000000000..1aa57ca9ba33 --- /dev/null +++ b/sdk/storage/azure-storage-blob-stress-v2/src/main/java/com/azure/v2/storage/blob/stress/utils/OriginalContent.java @@ -0,0 +1,119 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.v2.storage.blob.stress.utils; + +import com.azure.core.util.BinaryData; +import com.azure.core.util.Context; +import com.azure.core.util.logging.ClientLogger; +import com.azure.core.util.tracing.Tracer; +import com.azure.core.util.tracing.TracerProvider; +import com.azure.storage.blob.BlobAsyncClient; +import com.azure.storage.blob.models.PageRange; +import com.azure.storage.blob.models.ParallelTransferOptions; +import com.azure.storage.blob.specialized.PageBlobAsyncClient; +import com.azure.storage.stress.ContentInfo; +import com.azure.storage.stress.ContentMismatchException; +import com.azure.storage.stress.CrcInputStream; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; + +import java.nio.ByteBuffer; +import java.util.Base64; + +import static com.azure.core.util.FluxUtil.monoError; +import static com.azure.core.util.FluxUtil.toFluxByteBuffer; + +public class OriginalContent { + private final static ClientLogger LOGGER = new ClientLogger(OriginalContent.class); + private final static Tracer TRACER = TracerProvider.getDefaultProvider().createTracer("unused", null, null, null); + private static final String BLOB_CONTENT_HEAD_STRING = "Lorem ipsum dolor sit amet, consectetur adipiscing elit, " + + "sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. " + + "Pellentesque elit ullamcorper dignissim cras tincidunt lobortis feugiat vivamus. Massa sapien faucibus et molestie ac feugiat sed lectus. " + + "Sed pulvinar proin gravida hendrerit."; + + private static final BinaryData BLOB_CONTENT_HEAD = BinaryData.fromString(BLOB_CONTENT_HEAD_STRING); + private long dataChecksum = -1; + private long blobSize = 0; + + public OriginalContent() { + } + + public Mono setupBlob(BlobAsyncClient blobClient, long blobSize) { + if (dataChecksum != -1) { + throw LOGGER.logExceptionAsError(new IllegalStateException("setupBlob can't be called again")); + } + + this.blobSize = blobSize; + return Mono.using( + () -> new CrcInputStream(BLOB_CONTENT_HEAD, blobSize), + data -> blobClient + .upload(toFluxByteBuffer(data, 8192), + new ParallelTransferOptions() + .setMaxSingleUploadSizeLong(4 * 1024 * 1024L) + .setMaxConcurrency(1)) + .then(data.getContentInfo()), + CrcInputStream::close) + .map(info -> dataChecksum = info.getCrc()) + .then(); + } + + public Mono setupPageBlob(PageBlobAsyncClient blobClient, long blobSize) { + if (dataChecksum != -1) { + throw LOGGER.logExceptionAsError(new IllegalStateException("setupBlob can't be called again")); + } + + this.blobSize = blobSize; + return Mono.using( + () -> new CrcInputStream(BLOB_CONTENT_HEAD, blobSize), + data -> blobClient + .uploadPages(new PageRange().setStart(0).setEnd(blobSize - 1), toFluxByteBuffer(data, 8192)) + .then(data.getContentInfo()), + CrcInputStream::close) + .map(info -> dataChecksum = info.getCrc()) + .then(); + } + + public Mono checkMatch(BinaryData data, Context span) { + return checkMatch(data.toFluxByteBuffer(), span); + } + + public Mono checkMatch(Flux data, Context span) { + return checkMatch(ContentInfo.fromFluxByteBuffer(data), span); + } + + public Mono checkMatch(Mono contentInfo, Context span) { + if (dataChecksum == -1) { + return monoError(LOGGER, new IllegalStateException("setupBlob must complete first")); + } + return contentInfo + .flatMap(info -> { + if (info.getCrc() != dataChecksum) { + logMismatch(info.getCrc(), info.getLength(), info.getHead(), span); + return Mono.error(new ContentMismatchException()); + } + + return Mono.empty(); + }); + } + + @SuppressWarnings("try") + private void logMismatch(long actualCrc, long actualLength, ByteBuffer actualContentHead, Context span) { + try(AutoCloseable scope = TRACER.makeSpanCurrent(span)) { + // future: if mismatch, compare against original file + LOGGER.atError() + .addKeyValue("expectedCrc", dataChecksum) + .addKeyValue("actualCrc", actualCrc) + .addKeyValue("expectedLength", blobSize) + .addKeyValue("actualLength", actualLength) + .addKeyValue("actualContentHead", Base64.getEncoder().encode(actualContentHead)) + .log("mismatched crc"); + } catch (Throwable e) { + throw LOGGER.logExceptionAsError(new RuntimeException(e)); + } + } + + public BinaryData getBlobContentHead() { + return BLOB_CONTENT_HEAD; + } +} diff --git a/sdk/storage/azure-storage-blob-stress-v2/src/main/resources/logback.xml b/sdk/storage/azure-storage-blob-stress-v2/src/main/resources/logback.xml new file mode 100644 index 000000000000..6a474dec63af --- /dev/null +++ b/sdk/storage/azure-storage-blob-stress-v2/src/main/resources/logback.xml @@ -0,0 +1,27 @@ + + + + + %d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n + + + + + + + + + + + + + # this is the category used by HTTP logging policy, add more/adjust as needed + + + + + + + + diff --git a/sdk/storage/azure-storage-blob-stress-v2/stress-test-resources.bicep b/sdk/storage/azure-storage-blob-stress-v2/stress-test-resources.bicep new file mode 100644 index 000000000000..671aec65300b --- /dev/null +++ b/sdk/storage/azure-storage-blob-stress-v2/stress-test-resources.bicep @@ -0,0 +1,30 @@ +param baseName string +param endpointSuffix string = 'core.windows.net' +param location string = resourceGroup().location +param storageApiVersion string = '2022-09-01' + +var primaryAccountName = '${baseName}' +var pageBlobStorageAccountName = '${baseName}pageblob' + +resource primaryAccount 'Microsoft.Storage/storageAccounts@2022-09-01' = { + name: primaryAccountName + location: location + sku: { + name: 'Premium_LRS' + } + kind: 'BlockBlobStorage' + properties: {} +} + +resource pageBlobStorageAccount 'Microsoft.Storage/storageAccounts@2022-09-01' = { + name: pageBlobStorageAccountName + location: location + sku: { + name: 'Premium_LRS' + } + kind: 'StorageV2' + properties: {} +} + +output STORAGE_ENDPOINT_STRING string = '"https://${primaryAccountName}.blob.core.windows.net"' +output PAGE_BLOB_STORAGE_ENDPOINT_STRING string = '"https://${pageBlobStorageAccountName}.blob.core.windows.net"' diff --git a/sdk/storage/azure-storage-blob-stress-v2/templates/stress-test-job.yaml b/sdk/storage/azure-storage-blob-stress-v2/templates/stress-test-job.yaml new file mode 100644 index 000000000000..13ea8a6903f6 --- /dev/null +++ b/sdk/storage/azure-storage-blob-stress-v2/templates/stress-test-job.yaml @@ -0,0 +1,70 @@ +{{- include "stress-test-addons.deploy-job-template.from-pod" (list . "stress.deploy-example") -}} + {{- define "stress.deploy-example" -}} +metadata: + labels: + chaos: "{{ default false .Stress.chaos }}" + testInstance: "{{.Stress.Scenario}}-{{ .Stress.BaseName }}-{{ .Release.Revision }}" +spec: + nodeSelector: + sku: default + shareProcessNamespace: true + containers: + - name: fault-injector + image: azsdkengsys.azurecr.io/stress/httpfaultinjector + imagePullPolicy: Always + command: ['sh', '-c'] + args: + - | + set -ex; + dotnet dev-certs https --export-path /mnt/outputs/dev-cert.pfx; + /root/.dotnet/tools/http-fault-injector; + resources: + limits: + memory: 1Gi + cpu: "0.5" + {{- include "stress-test-addons.container-env" . | nindent 6 }} + - name: main + image: {{ .Stress.imageTag }} + command: ['sh', '-c'] + args: + - | + set -xa; + set -o pipefail; + keytool -import -alias test -file /mnt/outputs/dev-cert.pfx -keystore ${JAVA_HOME}/lib/security/cacerts -noprompt -keypass changeit -storepass changeit; + mkdir -p "$DEBUG_SHARE"; + . /mnt/outputs/.env; + export AZURE_HTTP_CLIENT_IMPLEMENTATION=com.azure.core.http.netty.NettyAsyncHttpClientProvider; + echo "setting http client implementation to $AZURE_HTTP_CLIENT_IMPLEMENTATION"; + java \ + -Dotel.service.name={{ .Release.Name }}-{{ .Stress.BaseName }} \ + -Dotel.traces.sampler=traceidratio \ + -Dotel.traces.sampler.arg=0.001 \ + -XX:InitialRAMPercentage=50 \ + -XX:MaxRAMPercentage=50 \ + -XX:+HeapDumpOnOutOfMemoryError \ + -XX:HeapDumpPath="${DEBUG_SHARE}" \ + -Dreactor.schedulers.defaultBoundedElasticSize={{ 25 }} \ + -jar /app/azure-storage-blob-stress-v2-1.0.0-beta.1-jar-with-dependencies.jar \ + {{ .Stress.testScenario }} \ + --parallel {{ default 3 .Stress.parallelRuns }} \ + --maxConcurrency {{ default 10 .Stress.maxConcurrency }} \ + --duration {{ mul 60 .Stress.durationMin }} \ + --size {{ .Stress.sizeBytes }} \ + {{ ternary "--sync" "" .Stress.sync }} \ + {{ ternary "--downloadFaults" "" (default false .Stress.downloadFaults) }} \ + {{ ternary "--uploadFaults" "" (default false .Stress.uploadFaults) }} \ + --warmup 0 \ + 2>&1 | tee -a "${DEBUG_SHARE}/{{ .Stress.testScenario }}-`date +%s`.log"; + code=$?; + echo "before the kill command"; + kill `pidof http-fault-injector`; + echo "HTTP Fault Injector killed"; + exit $code; + imagePullPolicy: Always + resources: + limits: + memory: {{ default "1Gi" .Stress.memory }} + cpu: "0.7" + {{- include "stress-test-addons.container-env" . | nindent 6 }} + +{{- end -}} diff --git a/sdk/storage/azure-storage-blob-stress-v2/workbook/test-workbook.json b/sdk/storage/azure-storage-blob-stress-v2/workbook/test-workbook.json new file mode 100644 index 000000000000..57cb75161333 --- /dev/null +++ b/sdk/storage/azure-storage-blob-stress-v2/workbook/test-workbook.json @@ -0,0 +1,286 @@ +{ + "version": "Notebook/1.0", + "items": [ + { + "type": 1, + "content": { + "json": "## Storage for Java stress testing\n\nEnter the test runId - it matches Storage resource name and is a suffix in AppInsights role name." + }, + "name": "text - 2" + }, + { + "type": 9, + "content": { + "version": "KqlParameterItem/1.0", + "parameters": [ + { + "id": "ab5bb927-f8a4-4491-8621-d300820d2ff3", + "version": "KqlParameterItem/1.0", + "name": "timeRange", + "label": "Time Range", + "type": 4, + "typeSettings": { + "selectableValues": [ + { + "durationMs": 900000 + }, + { + "durationMs": 1800000 + }, + { + "durationMs": 3600000 + }, + { + "durationMs": 14400000 + }, + { + "durationMs": 43200000 + }, + { + "durationMs": 86400000 + }, + { + "durationMs": 172800000 + }, + { + "durationMs": 259200000 + }, + { + "durationMs": 604800000 + } + ], + "allowCustom": true + }, + "value": { + "durationMs": 172800000 + } + }, + { + "id": "1b563bbe-70e0-48e6-ae33-d71d97ab8332", + "version": "KqlParameterItem/1.0", + "name": "runId", + "type": 2, + "isRequired": true, + "query": "dependencies \r\n| where timestamp >= {timeRange:start} and timestamp <= {timeRange:end}\r\n| where cloud_RoleName startswith \"java-storage\" and name == \"before run\"\r\n| extend runId = tostring(split(cloud_RoleName, \"-\")[-1])\r\n| summarize start=min(timestamp) by runId, cloud_RoleInstance \r\n| order by start desc\r\n| project runId, pod=cloud_RoleInstance", + "typeSettings": { + "additionalResourceOptions": [], + "showDefault": false + }, + "queryType": 0, + "resourceType": "microsoft.insights/components", + "value": null + } + ], + "style": "pills", + "queryType": 0, + "resourceType": "microsoft.insights/components" + }, + "customWidth": "30", + "name": "parameters - 2", + "styleSettings": { + "maxWidth": "30" + } + }, + { + "type": 3, + "content": { + "version": "KqlItem/1.0", + "query": "let runs = customMetrics \r\n| where timestamp >= {timeRange:start} and timestamp <= {timeRange:end}\r\n| where cloud_RoleName startswith \"java-storage\" \r\n| extend runId = tostring(split(cloud_RoleName, \"-\")[-1])\r\n| summarize start=min(timestamp), end=max(timestamp) by runId\r\n| project start, duration= end-start, runId;\r\nlet runSpans = dependencies\r\n| where timestamp >= {timeRange:start} and timestamp <= {timeRange:end}\r\n| where cloud_RoleName startswith \"java-storage\" and name == \"before run\"\r\n| extend runId = tostring(split(cloud_RoleName, \"-\")[-1])\r\n| extend packageVersion=coalesce(customDimensions[\"storagePackageVersion\"], \"null\")\r\n| extend scenarioName=tostring(split(coalesce(customDimensions[\"scenarioName\"], \"null\"), \".\")[-1])\r\n| extend sync=coalesce(customDimensions[\"sync\"], \"null\")\r\n| extend concurrency=coalesce(customDimensions[\"concurrency\"], \"null\")\r\n| extend payloadSize=coalesce(customDimensions[\"payloadSize\"], \"null\")\r\n| extend pod=tostring(customDimensions[\"hostname\"]);\r\nruns \r\n| join kind = innerunique runSpans on runId\r\n| project runId, start, duration, scenarioName, concurrency, payloadSize, sync, pod, packageVersion\r\n", + "size": 0, + "title": "Runs in {timeRange:label}", + "noDataMessageStyle": 5, + "queryType": 0, + "resourceType": "microsoft.insights/components", + "gridSettings": { + "sortBy": [ + { + "itemKey": "start", + "sortOrder": 2 + } + ] + }, + "sortBy": [ + { + "itemKey": "start", + "sortOrder": 2 + } + ] + }, + "customWidth": "70", + "name": "query - 8", + "styleSettings": { + "maxWidth": "100" + } + }, + { + "type": 3, + "content": { + "version": "KqlItem/1.0", + "query": "let runId = \"{runId}\";\r\nlet runDuration = customMetrics\r\n| where timestamp >= {timeRange:start} and timestamp <= {timeRange:end}\r\n| where cloud_RoleName endswith runId\r\n| where name == \"test.run.duration\"\r\n| extend errorType = tostring(customDimensions[\"error.type\"]);\r\nlet testSpans = dependencies\r\n| where timestamp >= {timeRange:start} and timestamp <= {timeRange:end}\r\n| where cloud_RoleName endswith runId;\r\nlet errors = runDuration\r\n| summarize error_by_type=toint(sum(valueCount)) by errorType\r\n| summarize test_errors=make_bag(bag_pack(errorType, error_by_type))\r\n| evaluate narrow();\r\nlet runCounter = runDuration\r\n| summarize successful_runs=sumif(valueCount, errorType == \"\"), failed_runs=sumif(valueCount, errorType != \"\")\r\n| evaluate narrow();\r\nlet actualDuration = testSpans \r\n| where name == \"after run\"\r\n| summarize actual_test_duration_in_sec = max(toreal(customDimensions[\"durationMs\"])/1000) by cloud_RoleInstance\r\n| evaluate narrow();\r\nlet avgThroughput = runDuration\r\n| summarize throughputPerMin=sum(valueCount) by bin(timestamp, 1m) // in case AppInsights ingestion drops something\r\n| summarize avg_throughtput_per_sec=round(avg(throughputPerMin/60), 2)\r\n| evaluate narrow();\r\nlet parameters = testSpans \r\n| where name == \"before run\" \r\n| project parameters=bag_remove_keys(customDimensions, dynamic(['duration', 'sample.in', 'name', 'jreVendor']))\r\n| evaluate narrow();\r\nparameters \r\n| union runCounter, actualDuration, errors, avgThroughput\r\n| project Property = Column, Value\r\n", + "size": 0, + "title": "Test summary", + "queryType": 0, + "resourceType": "microsoft.insights/components", + "gridSettings": { + "sortBy": [ + { + "itemKey": "Property", + "sortOrder": 1 + } + ] + }, + "sortBy": [ + { + "itemKey": "Property", + "sortOrder": 1 + } + ] + }, + "name": "query - 11" + }, + { + "type": 3, + "content": { + "version": "KqlItem/1.0", + "query": "customMetrics\r\n| where timestamp >= {timeRange:start} and timestamp <= {timeRange:end}\r\n| where name == \"test.run.duration\" and cloud_RoleName startswith \"java-storage\" and cloud_RoleName endswith \"{runId}\"\r\n| where customDimensions[\"error.type\"] == \"\"\r\n| summarize successful_runs=sum(valueCount) by bin(timestamp, 1m)\r\n| render timechart", + "size": 0, + "aggregation": 3, + "title": "Download rate (per minute)", + "noDataMessageStyle": 5, + "queryType": 0, + "resourceType": "microsoft.insights/components" + }, + "customWidth": "30", + "name": "query - 3", + "styleSettings": { + "maxWidth": "30", + "showBorder": true + } + }, + { + "type": 3, + "content": { + "version": "KqlItem/1.0", + "query": "customMetrics\r\n| where timestamp >= {timeRange:start} and timestamp <= {timeRange:end}\r\n| where name == \"test.run.duration\"\r\n| where cloud_RoleName startswith \"java-storage\" and cloud_RoleName endswith \"{runId}\"\r\n| where customDimensions[\"error.type\"] == \"\"\r\n| summarize avg_duration = avg(valueSum/valueCount) * 1000 by bin(timestamp, 1m)\r\n| render timechart", + "size": 0, + "aggregation": 3, + "title": "Duration (ms), average per minute, successful only", + "noDataMessageStyle": 5, + "queryType": 0, + "resourceType": "microsoft.insights/components" + }, + "customWidth": "30", + "name": "query - 5", + "styleSettings": { + "maxWidth": "30" + } + }, + { + "type": 3, + "content": { + "version": "KqlItem/1.0", + "query": "customMetrics\r\n| where timestamp >= {timeRange:start} and timestamp <= {timeRange:end}\r\n| where cloud_RoleName startswith \"java-storage\" and cloud_RoleName endswith \"{runId}\"\r\n| where name == \"test.run.duration\"\r\n| extend status = tostring(customDimensions[\"error.type\"])\r\n| where status != \"\"\r\n| summarize test_errors = sum(valueCount) by status, bin(timestamp, 1m)\r\n| render timechart", + "size": 0, + "aggregation": 3, + "title": "Error rate (per minute)", + "queryType": 0, + "resourceType": "microsoft.insights/components" + }, + "customWidth": "30", + "name": "query - 10", + "styleSettings": { + "maxWidth": "30" + } + }, + { + "type": 3, + "content": { + "version": "KqlItem/1.0", + "query": "customMetrics\r\n| where timestamp >= {timeRange:start} and timestamp <= {timeRange:end}\r\n| where cloud_RoleName startswith \"java-storage\" and cloud_RoleName endswith \"{runId}\"\r\n| where name == \"process.runtime.jvm.memory.usage\" and customDimensions[\"type\"]==\"heap\"\r\n| summarize heap_memory_used=sum(valueSum/valueCount) by bin(timestamp, 1m)\r\n| render timechart", + "size": 0, + "aggregation": 2, + "title": "Heap memory used (MB)", + "queryType": 0, + "resourceType": "microsoft.insights/components" + }, + "customWidth": "30", + "name": "query - 8", + "styleSettings": { + "maxWidth": "30" + } + }, + { + "type": 3, + "content": { + "version": "KqlItem/1.0", + "query": "customMetrics\r\n| where timestamp >= {timeRange:start} and timestamp <= {timeRange:end}\r\n| where cloud_RoleName startswith \"java-storage\" and cloud_RoleName endswith \"{runId}\"\r\n| where name == \"process.runtime.jvm.cpu.utilization\"\r\n| summarize cpu_time_percent=avg(value) * 100 by bin(timestamp, 1m)\r\n| render timechart\r\n", + "size": 0, + "aggregation": 3, + "title": "CPU %", + "queryType": 0, + "resourceType": "microsoft.insights/components" + }, + "customWidth": "30", + "name": "query - 9", + "styleSettings": { + "maxWidth": "30" + } + }, + { + "type": 3, + "content": { + "version": "KqlItem/1.0", + "query": "customMetrics\r\n| where timestamp >= {timeRange:start} and timestamp <= {timeRange:end}\r\n| where cloud_RoleName startswith \"java-storage\" and cloud_RoleName endswith \"{runId}\"\r\n| where name == \"process.runtime.jvm.threads.count\"\r\n| summarize max_thread_count=max(valueMax) by bin(timestamp, 1m)\r\n| render timechart\r\n", + "size": 0, + "aggregation": 3, + "title": "Thread count", + "queryType": 0, + "resourceType": "microsoft.insights/components" + }, + "customWidth": "15", + "name": "query - 8", + "styleSettings": { + "maxWidth": "15" + } + }, + { + "type": 3, + "content": { + "version": "KqlItem/1.0", + "query": "customMetrics\r\n| where timestamp >= {timeRange:start} and timestamp <= {timeRange:end}\r\n| where cloud_RoleName startswith \"java-storage\" and cloud_RoleName endswith \"{runId}\"\r\n| where name == \"process.runtime.jvm.gc.duration\" \r\n| extend gc_type=tostring(customDimensions[\"gc\"])\r\n| summarize gc_percentage=sum(valueSum) / 60 * 100 by gc_type, bin(timestamp, 1m)\r\n| render timechart\r\n", + "size": 0, + "aggregation": 3, + "title": "% of time spent in GC", + "queryType": 0, + "resourceType": "microsoft.insights/components" + }, + "customWidth": "15", + "name": "query - 9", + "styleSettings": { + "maxWidth": "15" + } + }, + { + "type": 3, + "content": { + "version": "KqlItem/1.0", + "query": "let runId = \"{runId}\";\r\nlet role_name=strcat(\"java-storage\", runId);\r\nlet downloads=dependencies \r\n| where timestamp >= {timeRange:start} and timestamp <= {timeRange:end}\r\n| where cloud_RoleName == role_name and (name == \"run\" or name == \"runAsync\")\r\n| project timestamp, duration, name, traceId=operation_Id, status=tostring(customDimensions[\"error.type\"]), success;\r\nlet faultInjections=traces \r\n| where timestamp >= {timeRange:start} and timestamp <= {timeRange:end}\r\n| where cloud_RoleName == role_name\r\n| where message startswith \"{\\\"az.sdk.message\"\r\n| project timestamp, logger=customDimensions[\"LoggerName\"], level=customDimensions[\"LoggingLevel\"], thread=customDimensions[\"ThreadName\"], azSdkContext=parse_json(message)\r\n| where azSdkContext[\"az.sdk.message\"] == \"HTTP request\"\r\n| extend fault = coalesce(azSdkContext[\"x-ms-faultinjector-response-option\"], \"none\")\r\n| extend traceId=tostring(split(azSdkContext[\"traceparent\"], \"-\")[1])\r\n| project fault, traceId;\r\ndownloads \r\n| join kind=leftouter faultInjections on traceId\r\n| where success == False\r\n| summarize faults = make_list(fault) by timestamp, status, duration, traceId\r\n", + "size": 0, + "title": "Examples of failed operations (survived after sampling)", + "noDataMessage": "so empty", + "queryType": 0, + "resourceType": "microsoft.insights/components", + "sortBy": [] + }, + "customWidth": "100", + "name": "query - 9", + "styleSettings": { + "maxWidth": "100" + } + } + ], + "fallbackResourceIds": [ + "/subscriptions/faa080af-c1d8-40ad-9cce-e1a450ca5b57/resourceGroups/rg-stress-cluster-pg/providers/Microsoft.Insights/components/stress-pg-ai-s7b6dif73rup6" + ], + "$schema": "https://github.com/Microsoft/Application-Insights-Workbooks/blob/master/schema/workbook.json" +} diff --git a/sdk/storage/pom.xml b/sdk/storage/pom.xml index 626196dfc903..f9e0bedc022b 100644 --- a/sdk/storage/pom.xml +++ b/sdk/storage/pom.xml @@ -27,6 +27,7 @@ azure-storage-blob-v2 + azure-storage-blob-stress-v2 azure-storage-stress-v2 From c3f3cc34f06afba345e02df00113db0ad2e091c4 Mon Sep 17 00:00:00 2001 From: vcolin7 Date: Wed, 12 Feb 2025 16:25:09 -0800 Subject: [PATCH 12/26] Added first stress tests. --- .../azure-storage-blob-stress-v2/Dockerfile | 6 +- .../azure-storage-blob-stress-v2/pom.xml | 4 +- .../scenarios-matrix.yaml | 306 ------------------ .../com/azure/v2/storage/blob/stress/App.java | 17 +- .../blob/stress/BlobScenarioBaseV2.java | 122 +++++++ .../blob/stress/DownloadContentV2.java | 52 +++ .../blob/stress/utils/OriginalContentV2.java | 105 ++++++ .../stress-test-resources.bicep | 16 +- 8 files changed, 297 insertions(+), 331 deletions(-) create mode 100644 sdk/storage/azure-storage-blob-stress-v2/src/main/java/com/azure/v2/storage/blob/stress/BlobScenarioBaseV2.java create mode 100644 sdk/storage/azure-storage-blob-stress-v2/src/main/java/com/azure/v2/storage/blob/stress/DownloadContentV2.java create mode 100644 sdk/storage/azure-storage-blob-stress-v2/src/main/java/com/azure/v2/storage/blob/stress/utils/OriginalContentV2.java diff --git a/sdk/storage/azure-storage-blob-stress-v2/Dockerfile b/sdk/storage/azure-storage-blob-stress-v2/Dockerfile index 4c7e14b09f44..12c8b3eb5d66 100644 --- a/sdk/storage/azure-storage-blob-stress-v2/Dockerfile +++ b/sdk/storage/azure-storage-blob-stress-v2/Dockerfile @@ -13,15 +13,15 @@ ADD ./common /stress/common ADD ./sdk/parents /stress/sdk/parents # Build storage and stress tests -ARG SKIP_CHECKS="-Dcheckstyle.skip -Dgpg.skip -Dmaven.javadoc.skip -Drevapi.skip -Dspotbugs.skip -Djacoco.skip -DskipTests -Dcodesnippet.skip -Dspotless.skip -Denforcer.skip" +ARG SKIP_CHECKS="-Dcheckstyle.skip -Dgpg.skip -Dmaven.javadoc.skip -Drevapi.skip -Dspotbugs.skip -Djacoco.skip -DskipTests -Dcodesnippet.skip -Dspotless.skip -Denforcer.skip" RUN --mount=type=cache,target=/root/.m2 \ mvn -f /stress/eng/code-quality-reports/pom.xml clean install && \ mvn -f /stress/sdk/parents/azure-perf-test-parent/pom.xml clean install ${SKIP_CHECKS} && \ mvn -f /stress/common/perf-test-core/pom.xml clean install ${SKIP_CHECKS} && \ mvn -f /stress/sdk/parents/azure-perf-test-parent/pom.xml clean install ${SKIP_CHECKS} && \ mvn -f /stress/sdk/tools/pom.xml clean install ${SKIP_CHECKS} && \ - mvn -f /stress/sdk/storage/azure-storage-common/pom.xml clean install ${SKIP_CHECKS} && \ - mvn -f /stress/sdk/storage/azure-storage-internal-avro/pom.xml clean install ${SKIP_CHECKS} && \ + mvn -f /stress/sdk/clientcore/core/pom.xml clean install ${SKIP_CHECKS} && \ + mvn -f /stress/sdk/core/azure-core-v2/pom.xml clean install ${SKIP_CHECKS} && \ mvn -f /stress/sdk/storage/azure-storage-blob-v2/pom.xml clean install ${SKIP_CHECKS} && \ mvn -f /stress/sdk/storage/azure-storage-stress-v2/pom.xml clean install ${SKIP_CHECKS} && \ mvn -f /stress/sdk/storage/azure-storage-blob-stress-v2/pom.xml clean install ${SKIP_CHECKS} diff --git a/sdk/storage/azure-storage-blob-stress-v2/pom.xml b/sdk/storage/azure-storage-blob-stress-v2/pom.xml index 7dd1f0c3a519..7bcf03291d6a 100644 --- a/sdk/storage/azure-storage-blob-stress-v2/pom.xml +++ b/sdk/storage/azure-storage-blob-stress-v2/pom.xml @@ -49,7 +49,7 @@ - + diff --git a/sdk/storage/azure-storage-blob-stress-v2/scenarios-matrix.yaml b/sdk/storage/azure-storage-blob-stress-v2/scenarios-matrix.yaml index 3a8920a67b35..0681875d35fd 100644 --- a/sdk/storage/azure-storage-blob-stress-v2/scenarios-matrix.yaml +++ b/sdk/storage/azure-storage-blob-stress-v2/scenarios-matrix.yaml @@ -1,59 +1,5 @@ matrix: scenarios: - # this test downloads 1KB (1024 bytes), small file, no chunking - downloadfilesmall: - testScenario: downloadtofile - sync: true - sizeBytes: 1024 - downloadFaults: true - durationMin: 25 - imageBuildDir: "../../.." - - # this test downloads 1KB (1024 bytes), small file, no chunking with async client - downloadfileasync: - testScenario: downloadtofile - sync: false - sizeBytes: 1024 - downloadFaults: true - durationMin: 25 - imageBuildDir: "../../.." - - # this test downloads 50MB (1024 * 1024 * 50), large file requiring multiple requests - downloadfilelarge: - testScenario: downloadtofile - sync: true - sizeBytes: "52428800" - downloadFaults: true - durationMin: 60 - imageBuildDir: "../../.." - - # this test downloads 1KB (1024 bytes), small stream, no chunking - downloadstreamsmall: - testScenario: downloadstream - sync: true - sizeBytes: 1024 - downloadFaults: true - durationMin: 25 - imageBuildDir: "../../.." - - # this test downloads 1KB (1024 bytes), small stream, no chunking with async client - downloadstreamasync: - testScenario: downloadstream - sync: false - sizeBytes: 1024 - downloadFaults: true - durationMin: 25 - imageBuildDir: "../../.." - - # this test downloads 50MB (1024 * 1024 * 50), requiring multiple requests - downloadstreamlarge: - testScenario: downloadstream - sync: true - sizeBytes: "52428800" - downloadFaults: true - durationMin: 60 - imageBuildDir: "../../.." - # this test downloads 1KB (1024 bytes), small content, no chunking downloadcontentsmall: testScenario: downloadcontent @@ -71,255 +17,3 @@ matrix: downloadFaults: true durationMin: 60 imageBuildDir: "../../.." - - # this test downloads 1KB (1024 bytes) to open input stream, no chunking - inputstreamsmall: - testScenario: openinputstream - sync: true - sizeBytes: 1024 - downloadFaults: true - durationMin: 25 - imageBuildDir: "../../.." - - # this test downloads 50MB (1024 * 1024 * 50) to open input stream requiring multiple requests - inputstreamlarge: - testScenario: openinputstream - sync: true - sizeBytes: "52428800" - downloadFaults: true - durationMin: 60 - imageBuildDir: "../../.." - - # this test downloads 1KB (1024 bytes) to seekablebytechannel, no chunking - bytechannelreadsmall: - testScenario: openseekablebytechannelread - sync: true - sizeBytes: 1024 - downloadFaults: true - durationMin: 25 - imageBuildDir: "../../.." - - # this test downloads 50MB (1024 * 1024 * 50) to seekablebytechannel requiring multiple requests - bytechannelreadlarge: - testScenario: openseekablebytechannelread - sync: true - sizeBytes: "52428800" - downloadFaults: true - durationMin: 60 - imageBuildDir: "../../.." - - # this test uploads 1KB (1024 bytes) to append blob, no chunking - appendblocksmall: - testScenario: appendblock - sync: true - sizeBytes: 1024 - uploadFaults: true - durationMin: 25 - imageBuildDir: "../../.." - - # this test uploads 1KB (1024 bytes) to append blob, no chunking - appendblockasync: - testScenario: appendblock - sync: false - sizeBytes: 1024 - uploadFaults: true - durationMin: 25 - imageBuildDir: "../../.." - - # this test uploads 25MB (1024 * 1024 * 25) to append blob requiring multiple requests - appendblocklarge: - testScenario: appendblock - sync: true - sizeBytes: "26214400" - uploadFaults: true - durationMin: 30 - imageBuildDir: "../../.." - - # this test uploads 1KB (1024 bytes) to append blob output stream, no chunking - appendoutputstreamsmall: - testScenario: appendbloboutputstream - sync: true - sizeBytes: 1024 - uploadFaults: true - durationMin: 25 - imageBuildDir: "../../.." - - # this test uploads 10KB (1024 * 10) to append blob output stream, no chunking - appendoutputstreamlarge: - testScenario: appendbloboutputstream - sync: true - sizeBytes: "10240" - uploadFaults: true - durationMin: 60 - imageBuildDir: "../../.." - - # this test uploads 1KB (1024 bytes) to block blob upload, no chunking - blockblobuploadsmall: - testScenario: blockblobupload - sync: true - sizeBytes: 1024 - uploadFaults: true - durationMin: 25 - imageBuildDir: "../../.." - - # this test uploads 25MB (1024 * 1024 * 50) to block blob upload, no chunking - blockblobuploadlarge: - testScenario: blockblobupload - sync: true - sizeBytes: "26214400" - uploadFaults: true - durationMin: 60 - imageBuildDir: "../../.." - - # this test uploads 1KB (1024 bytes) to block blob output stream, no chunking - blockoutputstreamsmall: - testScenario: blockbloboutputstream - sync: true - sizeBytes: 1024 - uploadFaults: true - durationMin: 25 - imageBuildDir: "../../.." - - # this test uploads 25MB (1024 * 1024 * 25) to block blob output stream, no chunking - blockoutputstreamlarge: - testScenario: blockbloboutputstream - sync: true - sizeBytes: "26214400" - uploadFaults: true - durationMin: 60 - imageBuildDir: "../../.." - - # this test uploads 1KB (1024 bytes) to block blob commit block list, no chunking - commitblocklistsmall: - testScenario: commitblocklist - sync: true - sizeBytes: 1024 - uploadFaults: true - durationMin: 25 - imageBuildDir: "../../.." - - # this test uploads 25MB (1024 * 1024 * 25) to block blob commit block list, no chunking - commitblocklistlarge: - testScenario: commitblocklist - sync: true - sizeBytes: "26214400" - uploadFaults: true - durationMin: 60 - imageBuildDir: "../../.." - - # this test uploads 1KB (1024 bytes) to block blob open seekable byte channel write, no chunking - bytechannelwritesmall: - testScenario: openseekablebytechannelwrite - sync: true - sizeBytes: 1024 - uploadFaults: true - durationMin: 10 - imageBuildDir: "../../.." - - # this test uploads 50MB (1024 * 1024 * 50) to block blob open seekable byte channel write, no chunking - bytechannelwritelarge: - testScenario: openseekablebytechannelwrite - sync: true - sizeBytes: "52428800" - uploadFaults: true - durationMin: 60 - imageBuildDir: "../../.." - - # this test uploads 1KB (1024 bytes) to block blob stage block, no chunking - stageblocksmall: - testScenario: stageblock - sync: true - sizeBytes: 1024 - uploadFaults: true - durationMin: 25 - imageBuildDir: "../../.." - - # this test uploads 25MB (1024 * 1024 * 25) to block blob stage block, requiring multiple requests - stageblocklarge: - testScenario: stageblock - sync: true - sizeBytes: "26214400" - uploadFaults: true - durationMin: 60 - imageBuildDir: "../../.." - - # this test uploads 1KB (1024 bytes) to page blob output stream, no chunking - pageoutputstreamsmall: - testScenario: pagebloboutputstream - sync: true - sizeBytes: 1024 - uploadFaults: true - durationMin: 25 - imageBuildDir: "../../.." - - # this test uploads 10KB (1024 * 10) to page blob output stream, requiring multiple requests - pageoutputstreamlarge: - testScenario: pagebloboutputstream - sync: true - sizeBytes: "10240" - uploadFaults: true - durationMin: 60 - imageBuildDir: "../../.." - - # this test uploads 1KB (1024 bytes) to page blob upload pages, no chunking - uploadpagessmall: - testScenario: uploadpages - sync: true - sizeBytes: 1024 - uploadFaults: true - durationMin: 25 - imageBuildDir: "../../.." - - # this test uploads 4MB (1024 * 1024 * 4) to page blob upload pages, requiring multiple requests - uploadpageslarge: - testScenario: uploadpages - sync: true - sizeBytes: "4194304" - uploadFaults: true - durationMin: 60 - imageBuildDir: "../../.." - - # this test uploads 1KB (1024 bytes) to blob, no chunking - uploadsmall: - testScenario: upload - sync: true - sizeBytes: 1024 - uploadFaults: true - durationMin: 25 - imageBuildDir: "../../.." - - # this test uploads 1KB (1024 bytes) to blob, no chunking - uploadasyncsmall: - testScenario: upload - sync: false - sizeBytes: 1024 - uploadFaults: true - durationMin: 25 - imageBuildDir: "../../.." - - # this test uploads 4MB (1024 * 1024 * 4) to blob, requiring multiple requests - uploadlarge: - testScenario: upload - sync: true - sizeBytes: "52428800" - uploadFaults: true - durationMin: 60 - imageBuildDir: "../../.." - - # this test uploads 1KB (1024 bytes) to blob from file, no chunking - uploadfromfilesmall: - testScenario: uploadfromfile - sync: true - sizeBytes: 1024 - uploadFaults: true - durationMin: 25 - imageBuildDir: "../../.." - - # this test uploads 50MB (1024 * 1024 * 50) to blob from file, requiring multiple requests - uploadfromfilelarge: - testScenario: uploadfromfile - sync: true - sizeBytes: "52428800" - uploadFaults: true - durationMin: 60 - imageBuildDir: "../../.." diff --git a/sdk/storage/azure-storage-blob-stress-v2/src/main/java/com/azure/v2/storage/blob/stress/App.java b/sdk/storage/azure-storage-blob-stress-v2/src/main/java/com/azure/v2/storage/blob/stress/App.java index f4dca68ee485..b31fc8a43589 100644 --- a/sdk/storage/azure-storage-blob-stress-v2/src/main/java/com/azure/v2/storage/blob/stress/App.java +++ b/sdk/storage/azure-storage-blob-stress-v2/src/main/java/com/azure/v2/storage/blob/stress/App.java @@ -10,22 +10,7 @@ public class App { public static void main(String[] args) { TelemetryHelper.init(); PerfStressProgram.run(new Class[]{ - AppendBlock.class, - AppendBlobOutputStream.class, - BlockBlobOutputStream.class, - BlockBlobUpload.class, - CommitBlockList.class, - DownloadToFile.class, - DownloadStream.class, - DownloadContent.class, - OpenInputStream.class, - OpenSeekableByteChannelRead.class, - OpenSeekableByteChannelWrite.class, - PageBlobOutputStream.class, - StageBlock.class, - Upload.class, - UploadFromFile.class, - UploadPages.class, + DownloadContentV2.class }, args); } } diff --git a/sdk/storage/azure-storage-blob-stress-v2/src/main/java/com/azure/v2/storage/blob/stress/BlobScenarioBaseV2.java b/sdk/storage/azure-storage-blob-stress-v2/src/main/java/com/azure/v2/storage/blob/stress/BlobScenarioBaseV2.java new file mode 100644 index 000000000000..cd2a378a6017 --- /dev/null +++ b/sdk/storage/azure-storage-blob-stress-v2/src/main/java/com/azure/v2/storage/blob/stress/BlobScenarioBaseV2.java @@ -0,0 +1,122 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.v2.storage.blob.stress; + +import com.azure.perf.test.core.PerfStressTest; +import com.azure.v2.storage.blob.AzureBlobStorageBuilder; +import com.azure.v2.storage.blob.ContainerClient; +import com.azure.v2.storage.stress.FaultInjectingHttpPolicy; +import com.azure.v2.storage.stress.FaultInjectionProbabilities; +import com.azure.v2.storage.stress.StorageStressOptions; +import com.azure.v2.storage.stress.TelemetryHelper; +import io.clientcore.core.http.models.HttpHeaderName; +import io.clientcore.core.http.models.HttpInstrumentationOptions; +import io.clientcore.core.util.Context; +import reactor.core.publisher.Mono; + +import java.time.Instant; +import java.util.UUID; + +public abstract class BlobScenarioBaseV2 extends PerfStressTest { + protected static final String CONTAINER_NAME = "stress-" + UUID.randomUUID(); + protected final TelemetryHelper telemetryHelper = new TelemetryHelper(this.getClass()); + private final ContainerClient syncContainerClientNoFault; + private final AzureBlobStorageBuilder storageBuilder; + private final AzureBlobStorageBuilder storageBuilderNoFault; + private Instant startTime; + + public BlobScenarioBaseV2(TOptions options) { + super(options); + + String endpoint = options.getEndpointString(); + + storageBuilderNoFault = new AzureBlobStorageBuilder() + .httpInstrumentationOptions(getInstrumentationOptions()) + .url(endpoint); + syncContainerClientNoFault = storageBuilderNoFault.buildContainerClient(); + + storageBuilder = new AzureBlobStorageBuilder() + .httpInstrumentationOptions(getInstrumentationOptions()) + .url(endpoint); + + if (options.isFaultInjectionEnabledForDownloads()) { + storageBuilder.addHttpPipelinePolicy(new FaultInjectingHttpPolicy(true, getFaultProbabilities(), false)); + } else if (options.isFaultInjectionEnabledForUploads()) { + storageBuilder.addHttpPipelinePolicy(new FaultInjectingHttpPolicy(true, getFaultProbabilities(), true)); + } + } + + @Override + public Mono globalSetupAsync() { + startTime = Instant.now(); + telemetryHelper.recordStart(options); + + return super.globalSetupAsync() + .then(Mono.fromRunnable( + () -> syncContainerClientNoFault.create(CONTAINER_NAME, null, null, null, null, null))); + } + + @Override + public Mono globalCleanupAsync() { + telemetryHelper.recordEnd(startTime); + syncContainerClientNoFault.delete(CONTAINER_NAME, null, null, null, null, null); + + return super.globalCleanupAsync(); + } + + @SuppressWarnings("try") + @Override + public void run() { + telemetryHelper.instrumentRun(context -> runInternal(Context.of(context.getValues()))); + } + + @SuppressWarnings("try") + @Override + public Mono runAsync() { + // No-op + return Mono.empty(); + } + + protected abstract void runInternal(Context context) throws Exception; + + protected AzureBlobStorageBuilder getBuilder() { + return storageBuilder; + } + + protected AzureBlobStorageBuilder getBuilderNoFault() { + return storageBuilderNoFault; + } + + protected String generateBlobName() { + return "blob-" + UUID.randomUUID(); + } + + protected static HttpInstrumentationOptions getInstrumentationOptions() { + return new HttpInstrumentationOptions() + .setHttpLogLevel(HttpInstrumentationOptions.HttpLogDetailLevel.HEADERS) + .addAllowedHeaderName(HttpHeaderName.fromString("x-ms-faultinjector-response-option")) + .addAllowedHeaderName(HttpHeaderName.CONTENT_RANGE) + .addAllowedHeaderName(HttpHeaderName.ACCEPT_RANGES) + .addAllowedHeaderName(HttpHeaderName.fromString("x-ms-blob-content-md5")) + .addAllowedHeaderName(HttpHeaderName.fromString("x-ms-error-code")) + .addAllowedHeaderName(HttpHeaderName.fromString("x-ms-range")); + } + + protected static FaultInjectionProbabilities getFaultProbabilities() { + return new FaultInjectionProbabilities() + .setNoResponseIndefinite(0.003D) + .setNoResponseClose(0.004D) + .setNoResponseAbort(0.003D) + .setPartialResponseIndefinite(0.06) + .setPartialResponseClose(0.06) + .setPartialResponseAbort(0.06) + .setPartialResponseFinishNormal(0.06) + .setNoRequestIndefinite(0.003D) + .setNoRequestClose(0.004D) + .setNoRequestAbort(0.003D) + .setPartialRequestIndefinite(0.06) + .setPartialRequestClose(0.06) + .setPartialRequestAbort(0.06); + } +} diff --git a/sdk/storage/azure-storage-blob-stress-v2/src/main/java/com/azure/v2/storage/blob/stress/DownloadContentV2.java b/sdk/storage/azure-storage-blob-stress-v2/src/main/java/com/azure/v2/storage/blob/stress/DownloadContentV2.java new file mode 100644 index 000000000000..afcbcaf615e6 --- /dev/null +++ b/sdk/storage/azure-storage-blob-stress-v2/src/main/java/com/azure/v2/storage/blob/stress/DownloadContentV2.java @@ -0,0 +1,52 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.v2.storage.blob.stress; + +import com.azure.v2.storage.blob.BlobClient; +import com.azure.v2.storage.blob.BlockBlobClient; +import com.azure.v2.storage.blob.stress.utils.OriginalContentV2; +import com.azure.v2.storage.stress.StorageStressOptions; +import io.clientcore.core.util.Context; +import io.clientcore.core.util.binarydata.BinaryData; +import reactor.core.publisher.Mono; + +public class DownloadContentV2 extends BlobScenarioBaseV2 { + private final OriginalContentV2 originalContent = new OriginalContentV2(); + private final BlobClient blobClient; + private final BlobClient blobClientNoFault; + private final BlockBlobClient blockBlobClient; + private final String blobName; + + public DownloadContentV2(StorageStressOptions options) { + super(options); + + this.blobName = generateBlobName(); + this.blobClient = getBuilder().buildBlobClient(); + this.blobClientNoFault = getBuilderNoFault().buildBlobClient(); + this.blockBlobClient = getBuilder().buildBlockBlobClient(); + } + + @Override + protected void runInternal(Context span) { + originalContent.checkMatch(BinaryData.fromStream( + blobClient.download(CONTAINER_NAME, blobName, null, null, null, null, null, null, null, null, null, null, + null, null, null, null, null)), span); + } + + @Override + public Mono setupAsync() { + // Setup is called for each instance of scenario. + return super.setupAsync() + .then(Mono.fromRunnable( + () -> originalContent.setupBlob(CONTAINER_NAME, blobName, blockBlobClient, options.getSize()))); + } + + @Override + public Mono cleanupAsync() { + blobClientNoFault.delete(CONTAINER_NAME, blobName, null, null, null, null, null, null, null, null, null, null, + null, null); + + return super.cleanupAsync(); + } +} diff --git a/sdk/storage/azure-storage-blob-stress-v2/src/main/java/com/azure/v2/storage/blob/stress/utils/OriginalContentV2.java b/sdk/storage/azure-storage-blob-stress-v2/src/main/java/com/azure/v2/storage/blob/stress/utils/OriginalContentV2.java new file mode 100644 index 000000000000..d429482276fa --- /dev/null +++ b/sdk/storage/azure-storage-blob-stress-v2/src/main/java/com/azure/v2/storage/blob/stress/utils/OriginalContentV2.java @@ -0,0 +1,105 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.v2.storage.blob.stress.utils; + +import com.azure.v2.core.util.tracing.Tracer; +import com.azure.v2.core.util.tracing.TracerProvider; +import com.azure.v2.storage.blob.BlockBlobClient; +import com.azure.v2.storage.stress.ContentInfo; +import com.azure.v2.storage.stress.ContentMismatchException; +import com.azure.v2.storage.stress.CrcInputStream; +import io.clientcore.core.instrumentation.logging.ClientLogger; +import io.clientcore.core.util.Context; +import io.clientcore.core.util.binarydata.BinaryData; + +import java.nio.ByteBuffer; +import java.util.Base64; + +public class OriginalContentV2 { + private final static ClientLogger LOGGER = new ClientLogger(OriginalContent.class); + private final static Tracer TRACER = TracerProvider.getDefaultProvider().createTracer("unused", null, null, null); + private static final String BLOB_CONTENT_HEAD_STRING = "Lorem ipsum dolor sit amet, consectetur adipiscing elit, " + + "sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. " + + "Pellentesque elit ullamcorper dignissim cras tincidunt lobortis feugiat vivamus. Massa sapien faucibus et molestie ac feugiat sed lectus. " + + "Sed pulvinar proin gravida hendrerit."; + + private static final BinaryData BLOB_CONTENT_HEAD = BinaryData.fromString(BLOB_CONTENT_HEAD_STRING); + private long dataChecksum = -1; + private long blobSize = 0; + + public OriginalContentV2() { + } + + public void setupBlob(String containerName, String blobName, BlockBlobClient blockBlobClient, long blobSize) { + if (dataChecksum != -1) { + throw LOGGER.logThrowableAsError(new IllegalStateException("setupBlob can't be called again")); + } + + this.blobSize = blobSize; + + CrcInputStream crcInputStream = new CrcInputStream(BLOB_CONTENT_HEAD, blobSize); + + blockBlobClient.upload(containerName, blobName, blobSize, BinaryData.fromStream(crcInputStream), null, null, + null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, + null); + + ContentInfo contentInfo = crcInputStream.getContentInfo().block(); + + crcInputStream.close(); + + dataChecksum = contentInfo.getCrc(); + } + + /*public Mono setupPageBlob(PageBlobAsyncClient blobClient, long blobSize) { + if (dataChecksum != -1) { + throw LOGGER.logThrowableAsError(new IllegalStateException("setupBlob can't be called again")); + } + + this.blobSize = blobSize; + return Mono.using( + () -> new CrcInputStream(BLOB_CONTENT_HEAD, blobSize), + data -> blobClient + .uploadPages(new PageRange().setStart(0).setEnd(blobSize - 1), toFluxByteBuffer(data, 8192)) + .then(data.getContentInfo()), + CrcInputStream::close) + .map(info -> dataChecksum = info.getCrc()) + .then(); + }*/ + + public void checkMatch(BinaryData data, Context span) { + checkMatch(ContentInfo.fromBinaryData(data), span); + } + + public void checkMatch(ContentInfo contentInfo, Context span) { + if (dataChecksum == -1) { + throw LOGGER.logThrowableAsError(new IllegalStateException("setupBlob must complete first")); + } + + if (contentInfo.getCrc() != dataChecksum) { + logMismatch(contentInfo.getCrc(), contentInfo.getLength(), contentInfo.getHead(), span); + + throw LOGGER.logThrowableAsError(new ContentMismatchException()); + } + } + + @SuppressWarnings("try") + private void logMismatch(long actualCrc, long actualLength, ByteBuffer actualContentHead, Context span) { + try(AutoCloseable scope = TRACER.makeSpanCurrent(span)) { + // future: if there is a mismatch, compare against the original file + LOGGER.atError() + .addKeyValue("expectedCrc", dataChecksum) + .addKeyValue("actualCrc", actualCrc) + .addKeyValue("expectedLength", blobSize) + .addKeyValue("actualLength", actualLength) + .addKeyValue("actualContentHead", Base64.getEncoder().encode(actualContentHead)) + .log("mismatched crc"); + } catch (Throwable e) { + throw LOGGER.logThrowableAsError(new RuntimeException(e)); + } + } + + public BinaryData getBlobContentHead() { + return BLOB_CONTENT_HEAD; + } +} diff --git a/sdk/storage/azure-storage-blob-stress-v2/stress-test-resources.bicep b/sdk/storage/azure-storage-blob-stress-v2/stress-test-resources.bicep index 671aec65300b..c8bd901384ab 100644 --- a/sdk/storage/azure-storage-blob-stress-v2/stress-test-resources.bicep +++ b/sdk/storage/azure-storage-blob-stress-v2/stress-test-resources.bicep @@ -16,7 +16,15 @@ resource primaryAccount 'Microsoft.Storage/storageAccounts@2022-09-01' = { properties: {} } -resource pageBlobStorageAccount 'Microsoft.Storage/storageAccounts@2022-09-01' = { + +var sasToken = primaryAccount.listAccountSas('2021-04-01', { + signedServices: 'b' + signedResourceTypes: 'c' + signedPermission: 'rwdl' + signedExpiry: '2025-12-31T23:59:59Z' +}).accountSasToken + +/*resource pageBlobStorageAccount 'Microsoft.Storage/storageAccounts@2022-09-01' = { name: pageBlobStorageAccountName location: location sku: { @@ -24,7 +32,7 @@ resource pageBlobStorageAccount 'Microsoft.Storage/storageAccounts@2022-09-01' = } kind: 'StorageV2' properties: {} -} +}*/ -output STORAGE_ENDPOINT_STRING string = '"https://${primaryAccountName}.blob.core.windows.net"' -output PAGE_BLOB_STORAGE_ENDPOINT_STRING string = '"https://${pageBlobStorageAccountName}.blob.core.windows.net"' +output STORAGE_ENDPOINT_STRING string = '"https://${primaryAccountName}.blob.core.windows.net/${sasToken}"' +output PAGE_BLOB_STORAGE_ENDPOINT_STRING string = '"https://${pageBlobStorageAccountName}.blob.core.windows.net/${sasToken}"' From aa6546ae4ee9c00d10a816a373c228a73144c5ca Mon Sep 17 00:00:00 2001 From: vcolin7 Date: Thu, 13 Feb 2025 00:04:27 -0800 Subject: [PATCH 13/26] Fixed Dockerfile --- sdk/storage/azure-storage-blob-stress-v2/Dockerfile | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sdk/storage/azure-storage-blob-stress-v2/Dockerfile b/sdk/storage/azure-storage-blob-stress-v2/Dockerfile index 12c8b3eb5d66..ec4e9988566b 100644 --- a/sdk/storage/azure-storage-blob-stress-v2/Dockerfile +++ b/sdk/storage/azure-storage-blob-stress-v2/Dockerfile @@ -6,6 +6,8 @@ RUN yum -y update # Add necessary files to the image RUN mkdir /stress WORKDIR /stress +ADD ./sdk/clientcore /stress/sdk/clientcore +ADD ./sdk/core /stress/sdk/core ADD ./sdk/storage /stress/sdk/storage ADD ./sdk/tools /stress/sdk/tools ADD ./eng /stress/eng @@ -22,6 +24,7 @@ RUN --mount=type=cache,target=/root/.m2 \ mvn -f /stress/sdk/tools/pom.xml clean install ${SKIP_CHECKS} && \ mvn -f /stress/sdk/clientcore/core/pom.xml clean install ${SKIP_CHECKS} && \ mvn -f /stress/sdk/core/azure-core-v2/pom.xml clean install ${SKIP_CHECKS} && \ + mvn -f /stress/sdk/parents/azure-client-sdk-parent-v2/pom.xml clean install ${SKIP_CHECKS} && \ mvn -f /stress/sdk/storage/azure-storage-blob-v2/pom.xml clean install ${SKIP_CHECKS} && \ mvn -f /stress/sdk/storage/azure-storage-stress-v2/pom.xml clean install ${SKIP_CHECKS} && \ mvn -f /stress/sdk/storage/azure-storage-blob-stress-v2/pom.xml clean install ${SKIP_CHECKS} From f791d9466cbc87e11a58f07d30d3ee9dcea5df14 Mon Sep 17 00:00:00 2001 From: vcolin7 Date: Tue, 18 Feb 2025 10:41:22 -0800 Subject: [PATCH 14/26] Fixed issue with ResponseConstructorsCache and ResponseBase in clientcore. --- .../http/rest/ResponseConstructorsCache.java | 4 ++++ .../java/com/azure/v2/core/http/rest/ResponseBase.java | 10 +++++----- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/sdk/clientcore/core/src/main/java/io/clientcore/core/implementation/http/rest/ResponseConstructorsCache.java b/sdk/clientcore/core/src/main/java/io/clientcore/core/implementation/http/rest/ResponseConstructorsCache.java index 09e2166389a5..a8bd4cd9abdd 100644 --- a/sdk/clientcore/core/src/main/java/io/clientcore/core/implementation/http/rest/ResponseConstructorsCache.java +++ b/sdk/clientcore/core/src/main/java/io/clientcore/core/implementation/http/rest/ResponseConstructorsCache.java @@ -115,6 +115,10 @@ public Response invoke(ReflectiveInvoker reflectiveInvoker, Response respo return constructResponse(reflectiveInvoker, FOUR_PARAM_ERROR, httpRequest, responseStatusCode, responseHeaders, bodyAsObject); + case 5: + return constructResponse(reflectiveInvoker, FOUR_PARAM_ERROR, httpRequest, responseStatusCode, + responseHeaders, bodyAsObject, null); + default: throw LOGGER.logThrowableAsError(new IllegalStateException(INVALID_PARAM_COUNT)); } diff --git a/sdk/core/azure-core-v2/src/main/java/com/azure/v2/core/http/rest/ResponseBase.java b/sdk/core/azure-core-v2/src/main/java/com/azure/v2/core/http/rest/ResponseBase.java index 415db00c5a19..a1fa6d5031ba 100644 --- a/sdk/core/azure-core-v2/src/main/java/com/azure/v2/core/http/rest/ResponseBase.java +++ b/sdk/core/azure-core-v2/src/main/java/com/azure/v2/core/http/rest/ResponseBase.java @@ -7,6 +7,7 @@ import io.clientcore.core.http.models.Response; import io.clientcore.core.util.binarydata.BinaryData; import io.clientcore.core.util.binarydata.ByteArrayBinaryData; +import io.clientcore.core.util.binarydata.InputStreamBinaryData; import io.clientcore.core.util.binarydata.StringBinaryData; import java.io.IOException; @@ -112,13 +113,12 @@ public void close() throws IOException { * @return The value type. */ public Object bodyToValue(BinaryData data) { - if (data instanceof ByteArrayBinaryData) { - ByteArrayBinaryData byteArray = (ByteArrayBinaryData) data; - return byteArray.toStream(); + if (data instanceof ByteArrayBinaryData || data instanceof InputStreamBinaryData) { + return data.toStream(); } + if (data instanceof StringBinaryData) { - StringBinaryData string = (StringBinaryData) data; - return string.toString(); + return data.toString(); } return data; From 851a584b87b57d688fee4dd584cdabcc3f20310c Mon Sep 17 00:00:00 2001 From: vcolin7 Date: Tue, 18 Feb 2025 10:42:41 -0800 Subject: [PATCH 15/26] Updated azure-storage-blob-v2 tests. --- .../azure/v2/storage/blob/BlobClientTest.java | 25 +++++++++++++------ .../v2/storage/blob/BlockBlobClientTest.java | 6 +++-- .../v2/storage/blob/ContainerClientTest.java | 8 +++--- 3 files changed, 25 insertions(+), 14 deletions(-) diff --git a/sdk/storage/azure-storage-blob-v2/src/test/java/com/azure/v2/storage/blob/BlobClientTest.java b/sdk/storage/azure-storage-blob-v2/src/test/java/com/azure/v2/storage/blob/BlobClientTest.java index 6efab7ce4d92..485b026b480a 100644 --- a/sdk/storage/azure-storage-blob-v2/src/test/java/com/azure/v2/storage/blob/BlobClientTest.java +++ b/sdk/storage/azure-storage-blob-v2/src/test/java/com/azure/v2/storage/blob/BlobClientTest.java @@ -3,24 +3,33 @@ import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; +import java.io.ByteArrayOutputStream; import java.io.IOException; import java.io.InputStream; public class BlobClientTest { - @Test - @Disabled public void testDownload() throws IOException { + BlobClient blobClient = new AzureBlobStorageBuilder() + .url("sas-url") + .buildBlobClient(); - BlobClient blobClient = new AzureBlobStorageBuilder().url("sas-url").buildBlobClient(); - - InputStream sampleText = blobClient.download("testcontainer", "sample.txt", null, null, null, null, null, null, + InputStream sampleText = blobClient.download("test-container", "upload.txt", null, null, null, null, null, null, null, null, null, null, null, null, null, null, null); - byte[] bytes = new byte[2048]; - sampleText.read(bytes); - String text = new String(bytes); + String text = new String(readAllBytes(sampleText)); System.out.println(text); + } + + public static byte[] readAllBytes(InputStream inputStream) throws IOException { + ByteArrayOutputStream buffer = new ByteArrayOutputStream(); + int nRead; + byte[] data = new byte[1024]; + + while ((nRead = inputStream.read(data, 0, data.length)) != -1) { + buffer.write(data, 0, nRead); + } + return buffer.toByteArray(); } } diff --git a/sdk/storage/azure-storage-blob-v2/src/test/java/com/azure/v2/storage/blob/BlockBlobClientTest.java b/sdk/storage/azure-storage-blob-v2/src/test/java/com/azure/v2/storage/blob/BlockBlobClientTest.java index 361f65328c60..9e1c9a7e2406 100644 --- a/sdk/storage/azure-storage-blob-v2/src/test/java/com/azure/v2/storage/blob/BlockBlobClientTest.java +++ b/sdk/storage/azure-storage-blob-v2/src/test/java/com/azure/v2/storage/blob/BlockBlobClientTest.java @@ -1,6 +1,6 @@ package com.azure.v2.storage.blob; -import io.clientcore.core.models.binarydata.BinaryData; +import io.clientcore.core.util.binarydata.BinaryData; import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; @@ -9,7 +9,9 @@ public class BlockBlobClientTest { @Test @Disabled public void testUpload() { - BlockBlobClient blockBlobClient = new AzureBlobStorageBuilder().url("").buildBlockBlobClient(); + BlockBlobClient blockBlobClient = new AzureBlobStorageBuilder().url( + "https://srnagarstorage.blob.core.windows.net/?sv=2022-11-02&ss=bfqt&srt=sco&sp=rwdlacupiytfx&se=2024-12-23T03:55:26Z&st=2024-12-12T19:55:26Z&spr=https&sig=7Dj0MbP2z9bnXRQdoohMtCKsfzXYfUKrRTfboiRZ%2Bv8%3D") + .buildBlockBlobClient(); String content = "Hello World!"; blockBlobClient.upload("testcontainer", "upload.txt", content.length(), BinaryData.fromString(content), null, diff --git a/sdk/storage/azure-storage-blob-v2/src/test/java/com/azure/v2/storage/blob/ContainerClientTest.java b/sdk/storage/azure-storage-blob-v2/src/test/java/com/azure/v2/storage/blob/ContainerClientTest.java index f206244791ce..9022be2f6d18 100644 --- a/sdk/storage/azure-storage-blob-v2/src/test/java/com/azure/v2/storage/blob/ContainerClientTest.java +++ b/sdk/storage/azure-storage-blob-v2/src/test/java/com/azure/v2/storage/blob/ContainerClientTest.java @@ -4,14 +4,14 @@ import org.junit.jupiter.api.Test; public class ContainerClientTest { - @Test @Disabled public void testContainterClient() { + ContainerClient containerClient = new AzureBlobStorageBuilder() + .url("sas-url") + .buildContainerClient(); - ContainerClient containerClient = new AzureBlobStorageBuilder().url("sas-url").buildContainerClient(); - - containerClient.create("container", null, null, null, null, null); + containerClient.create("test-container", null, null, null, null, null); // This will not work yet as xml serialization is not supported in clientcore. // Response testcontainer = containerClient.listBlobHierarchySegmentNoCustomHeadersWithResponse("testcontainer", null, null, null, null, null, null, null, null); From a6ef2041ccbd61cef13e2d0445bd1fea86f8e489 Mon Sep 17 00:00:00 2001 From: vcolin7 Date: Tue, 18 Feb 2025 10:43:34 -0800 Subject: [PATCH 16/26] Fixed more package naming issues --- .../src/main/java/com/azure/v2/storage/blob/stress/App.java | 2 +- sdk/storage/azure-storage-blob-v2/pom.xml | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/sdk/storage/azure-storage-blob-stress-v2/src/main/java/com/azure/v2/storage/blob/stress/App.java b/sdk/storage/azure-storage-blob-stress-v2/src/main/java/com/azure/v2/storage/blob/stress/App.java index b31fc8a43589..0a65741fb002 100644 --- a/sdk/storage/azure-storage-blob-stress-v2/src/main/java/com/azure/v2/storage/blob/stress/App.java +++ b/sdk/storage/azure-storage-blob-stress-v2/src/main/java/com/azure/v2/storage/blob/stress/App.java @@ -4,7 +4,7 @@ package com.azure.v2.storage.blob.stress; import com.azure.perf.test.core.PerfStressProgram; -import com.azure.storage.stress.TelemetryHelper; +import com.azure.v2.storage.stress.TelemetryHelper; public class App { public static void main(String[] args) { diff --git a/sdk/storage/azure-storage-blob-v2/pom.xml b/sdk/storage/azure-storage-blob-v2/pom.xml index febdbb3c2fcf..f3785ba0a2d4 100644 --- a/sdk/storage/azure-storage-blob-v2/pom.xml +++ b/sdk/storage/azure-storage-blob-v2/pom.xml @@ -9,7 +9,7 @@ ../../parents/azure-client-sdk-parent-v2 - com.azure + com.azure.v2 azure-storage-blob-v2 1.0.0-beta.1 @@ -57,5 +57,4 @@ test - From eea5a12bda647d41aefd43aad6d0682ea163113e Mon Sep 17 00:00:00 2001 From: vcolin7 Date: Tue, 18 Feb 2025 10:45:26 -0800 Subject: [PATCH 17/26] Fixed Docker build issues. --- sdk/storage/azure-storage-blob-stress-v2/Dockerfile | 10 ++++++---- sdk/storage/azure-storage-blob-stress-v2/pom.xml | 5 +++++ .../scenarios-matrix.yaml | 4 ++-- .../stress-test-resources.bicep | 13 +++++-------- 4 files changed, 18 insertions(+), 14 deletions(-) diff --git a/sdk/storage/azure-storage-blob-stress-v2/Dockerfile b/sdk/storage/azure-storage-blob-stress-v2/Dockerfile index ec4e9988566b..637df7b0919e 100644 --- a/sdk/storage/azure-storage-blob-stress-v2/Dockerfile +++ b/sdk/storage/azure-storage-blob-stress-v2/Dockerfile @@ -6,13 +6,13 @@ RUN yum -y update # Add necessary files to the image RUN mkdir /stress WORKDIR /stress +ADD ./common /stress/common +ADD ./eng /stress/eng ADD ./sdk/clientcore /stress/sdk/clientcore ADD ./sdk/core /stress/sdk/core +ADD ./sdk/parents /stress/sdk/parents ADD ./sdk/storage /stress/sdk/storage ADD ./sdk/tools /stress/sdk/tools -ADD ./eng /stress/eng -ADD ./common /stress/common -ADD ./sdk/parents /stress/sdk/parents # Build storage and stress tests ARG SKIP_CHECKS="-Dcheckstyle.skip -Dgpg.skip -Dmaven.javadoc.skip -Drevapi.skip -Dspotbugs.skip -Djacoco.skip -DskipTests -Dcodesnippet.skip -Dspotless.skip -Denforcer.skip" @@ -20,10 +20,12 @@ RUN --mount=type=cache,target=/root/.m2 \ mvn -f /stress/eng/code-quality-reports/pom.xml clean install && \ mvn -f /stress/sdk/parents/azure-perf-test-parent/pom.xml clean install ${SKIP_CHECKS} && \ mvn -f /stress/common/perf-test-core/pom.xml clean install ${SKIP_CHECKS} && \ - mvn -f /stress/sdk/parents/azure-perf-test-parent/pom.xml clean install ${SKIP_CHECKS} && \ mvn -f /stress/sdk/tools/pom.xml clean install ${SKIP_CHECKS} && \ mvn -f /stress/sdk/clientcore/core/pom.xml clean install ${SKIP_CHECKS} && \ + mvn -f /stress/sdk/clientcore/http-okhttp3/pom.xml clean install ${SKIP_CHECKS} && \ mvn -f /stress/sdk/core/azure-core-v2/pom.xml clean install ${SKIP_CHECKS} && \ + mvn -f /stress/sdk/storage/azure-storage-blob/pom.xml clean install ${SKIP_CHECKS} && \ + mvn -f /stress/sdk/storage/azure-storage-stress/pom.xml clean install ${SKIP_CHECKS} && \ mvn -f /stress/sdk/parents/azure-client-sdk-parent-v2/pom.xml clean install ${SKIP_CHECKS} && \ mvn -f /stress/sdk/storage/azure-storage-blob-v2/pom.xml clean install ${SKIP_CHECKS} && \ mvn -f /stress/sdk/storage/azure-storage-stress-v2/pom.xml clean install ${SKIP_CHECKS} && \ diff --git a/sdk/storage/azure-storage-blob-stress-v2/pom.xml b/sdk/storage/azure-storage-blob-stress-v2/pom.xml index 7bcf03291d6a..38acd97e5917 100644 --- a/sdk/storage/azure-storage-blob-stress-v2/pom.xml +++ b/sdk/storage/azure-storage-blob-stress-v2/pom.xml @@ -54,6 +54,11 @@ azure-core-v2 1.0.0-beta.1 + + io.clientcore + http-okhttp3 + 1.0.0-beta.1 + com.azure.v2 azure-storage-blob-v2 diff --git a/sdk/storage/azure-storage-blob-stress-v2/scenarios-matrix.yaml b/sdk/storage/azure-storage-blob-stress-v2/scenarios-matrix.yaml index 0681875d35fd..7d2d54a80e50 100644 --- a/sdk/storage/azure-storage-blob-stress-v2/scenarios-matrix.yaml +++ b/sdk/storage/azure-storage-blob-stress-v2/scenarios-matrix.yaml @@ -2,7 +2,7 @@ matrix: scenarios: # this test downloads 1KB (1024 bytes), small content, no chunking downloadcontentsmall: - testScenario: downloadcontent + testScenario: downloadcontentv2 sync: true sizeBytes: 1024 downloadFaults: true @@ -11,7 +11,7 @@ matrix: # this test downloads 50MB (1024 * 1024 * 50), large content requiring multiple requests downloadcontentlarge: - testScenario: downloadcontent + testScenario: downloadcontentv2 sync: true sizeBytes: "52428800" downloadFaults: true diff --git a/sdk/storage/azure-storage-blob-stress-v2/stress-test-resources.bicep b/sdk/storage/azure-storage-blob-stress-v2/stress-test-resources.bicep index c8bd901384ab..3253207a1382 100644 --- a/sdk/storage/azure-storage-blob-stress-v2/stress-test-resources.bicep +++ b/sdk/storage/azure-storage-blob-stress-v2/stress-test-resources.bicep @@ -1,10 +1,8 @@ param baseName string -param endpointSuffix string = 'core.windows.net' param location string = resourceGroup().location -param storageApiVersion string = '2022-09-01' -var primaryAccountName = '${baseName}' -var pageBlobStorageAccountName = '${baseName}pageblob' +var primaryAccountName = baseName +//var pageBlobStorageAccountName = '${baseName}pageblob' resource primaryAccount 'Microsoft.Storage/storageAccounts@2022-09-01' = { name: primaryAccountName @@ -16,11 +14,10 @@ resource primaryAccount 'Microsoft.Storage/storageAccounts@2022-09-01' = { properties: {} } - -var sasToken = primaryAccount.listAccountSas('2021-04-01', { +var sasToken = primaryAccount.listAccountSas('2023-05-01', { signedServices: 'b' - signedResourceTypes: 'c' - signedPermission: 'rwdl' + signedResourceTypes: 'sco' + signedPermission: 'rwdlacup' signedExpiry: '2025-12-31T23:59:59Z' }).accountSasToken From 67b5736f9c2975ef4616f2b27aec0b7544b00145 Mon Sep 17 00:00:00 2001 From: vcolin7 Date: Tue, 18 Feb 2025 11:32:09 -0800 Subject: [PATCH 18/26] Fixed issue when trying to create or delete a container more than once. --- .../blob/stress/BlobScenarioBaseV2.java | 26 ++++++++++++++++--- .../stress-test-resources.bicep | 5 ++-- 2 files changed, 25 insertions(+), 6 deletions(-) diff --git a/sdk/storage/azure-storage-blob-stress-v2/src/main/java/com/azure/v2/storage/blob/stress/BlobScenarioBaseV2.java b/sdk/storage/azure-storage-blob-stress-v2/src/main/java/com/azure/v2/storage/blob/stress/BlobScenarioBaseV2.java index cd2a378a6017..af3e1758cb09 100644 --- a/sdk/storage/azure-storage-blob-stress-v2/src/main/java/com/azure/v2/storage/blob/stress/BlobScenarioBaseV2.java +++ b/sdk/storage/azure-storage-blob-stress-v2/src/main/java/com/azure/v2/storage/blob/stress/BlobScenarioBaseV2.java @@ -3,6 +3,7 @@ package com.azure.v2.storage.blob.stress; +import com.azure.core.exception.HttpResponseException; import com.azure.perf.test.core.PerfStressTest; import com.azure.v2.storage.blob.AzureBlobStorageBuilder; import com.azure.v2.storage.blob.ContainerClient; @@ -21,9 +22,11 @@ public abstract class BlobScenarioBaseV2 extends PerfStressTest { protected static final String CONTAINER_NAME = "stress-" + UUID.randomUUID(); protected final TelemetryHelper telemetryHelper = new TelemetryHelper(this.getClass()); + private final ContainerClient syncContainerClientNoFault; private final AzureBlobStorageBuilder storageBuilder; private final AzureBlobStorageBuilder storageBuilderNoFault; + private Instant startTime; public BlobScenarioBaseV2(TOptions options) { @@ -52,15 +55,30 @@ public Mono globalSetupAsync() { startTime = Instant.now(); telemetryHelper.recordStart(options); - return super.globalSetupAsync() - .then(Mono.fromRunnable( - () -> syncContainerClientNoFault.create(CONTAINER_NAME, null, null, null, null, null))); + return super.globalSetupAsync().then(Mono.fromRunnable(() -> { + try { + syncContainerClientNoFault.create(CONTAINER_NAME, null, null, null, null, null); + } catch (HttpResponseException e) { + // If container already exists, ignore. Otherwise, throw. + if (e.getResponse().getStatusCode() != 409) { + throw e; + } + } + })); } @Override public Mono globalCleanupAsync() { telemetryHelper.recordEnd(startTime); - syncContainerClientNoFault.delete(CONTAINER_NAME, null, null, null, null, null); + + try { + syncContainerClientNoFault.delete(CONTAINER_NAME, null, null, null, null, null); + } catch (HttpResponseException e) { + // If container does not exist, ignore. Otherwise, throw. + if (e.getResponse().getStatusCode() != 404) { + throw e; + } + } return super.globalCleanupAsync(); } diff --git a/sdk/storage/azure-storage-blob-stress-v2/stress-test-resources.bicep b/sdk/storage/azure-storage-blob-stress-v2/stress-test-resources.bicep index 3253207a1382..724fa54d16af 100644 --- a/sdk/storage/azure-storage-blob-stress-v2/stress-test-resources.bicep +++ b/sdk/storage/azure-storage-blob-stress-v2/stress-test-resources.bicep @@ -1,5 +1,6 @@ param baseName string param location string = resourceGroup().location +param urlSuffix string = environment().suffixes.storage var primaryAccountName = baseName //var pageBlobStorageAccountName = '${baseName}pageblob' @@ -31,5 +32,5 @@ var sasToken = primaryAccount.listAccountSas('2023-05-01', { properties: {} }*/ -output STORAGE_ENDPOINT_STRING string = '"https://${primaryAccountName}.blob.core.windows.net/${sasToken}"' -output PAGE_BLOB_STORAGE_ENDPOINT_STRING string = '"https://${pageBlobStorageAccountName}.blob.core.windows.net/${sasToken}"' +output STORAGE_ENDPOINT_STRING string = '"https://${primaryAccountName}.blob.${urlSuffix}/?${sasToken}"' +//output PAGE_BLOB_STORAGE_ENDPOINT_STRING string = '"https://${pageBlobStorageAccountName}.blob.core.windows.net/${sasToken}"' From 60308295abc3a0b2ca536672a69ff4be1f8ff1b5 Mon Sep 17 00:00:00 2001 From: vcolin7 Date: Tue, 18 Feb 2025 16:26:31 -0800 Subject: [PATCH 19/26] Disabled fault injector. --- .../azure-storage-blob-stress-v2/scenarios-matrix.yaml | 4 ++-- .../java/com/azure/v2/storage/blob/ContainerClientTest.java | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/sdk/storage/azure-storage-blob-stress-v2/scenarios-matrix.yaml b/sdk/storage/azure-storage-blob-stress-v2/scenarios-matrix.yaml index 7d2d54a80e50..225076422203 100644 --- a/sdk/storage/azure-storage-blob-stress-v2/scenarios-matrix.yaml +++ b/sdk/storage/azure-storage-blob-stress-v2/scenarios-matrix.yaml @@ -5,7 +5,7 @@ matrix: testScenario: downloadcontentv2 sync: true sizeBytes: 1024 - downloadFaults: true + downloadFaults: false durationMin: 25 imageBuildDir: "../../.." @@ -14,6 +14,6 @@ matrix: testScenario: downloadcontentv2 sync: true sizeBytes: "52428800" - downloadFaults: true + downloadFaults: false durationMin: 60 imageBuildDir: "../../.." diff --git a/sdk/storage/azure-storage-blob-v2/src/test/java/com/azure/v2/storage/blob/ContainerClientTest.java b/sdk/storage/azure-storage-blob-v2/src/test/java/com/azure/v2/storage/blob/ContainerClientTest.java index 9022be2f6d18..5fbe51d5cae7 100644 --- a/sdk/storage/azure-storage-blob-v2/src/test/java/com/azure/v2/storage/blob/ContainerClientTest.java +++ b/sdk/storage/azure-storage-blob-v2/src/test/java/com/azure/v2/storage/blob/ContainerClientTest.java @@ -6,7 +6,7 @@ public class ContainerClientTest { @Test @Disabled - public void testContainterClient() { + public void testContainerClient() { ContainerClient containerClient = new AzureBlobStorageBuilder() .url("sas-url") .buildContainerClient(); From f534fd6f7999be159288efe1360f32dbe6900603 Mon Sep 17 00:00:00 2001 From: vcolin7 Date: Tue, 4 Mar 2025 12:19:29 -0800 Subject: [PATCH 20/26] Updated BlockBlobClientTest after rebase. --- .../com/azure/v2/storage/blob/BlockBlobClientTest.java | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/sdk/storage/azure-storage-blob-v2/src/test/java/com/azure/v2/storage/blob/BlockBlobClientTest.java b/sdk/storage/azure-storage-blob-v2/src/test/java/com/azure/v2/storage/blob/BlockBlobClientTest.java index 9e1c9a7e2406..9661b5aea6ba 100644 --- a/sdk/storage/azure-storage-blob-v2/src/test/java/com/azure/v2/storage/blob/BlockBlobClientTest.java +++ b/sdk/storage/azure-storage-blob-v2/src/test/java/com/azure/v2/storage/blob/BlockBlobClientTest.java @@ -1,22 +1,20 @@ package com.azure.v2.storage.blob; -import io.clientcore.core.util.binarydata.BinaryData; +import io.clientcore.core.models.binarydata.BinaryData; import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; public class BlockBlobClientTest { - @Test @Disabled public void testUpload() { - BlockBlobClient blockBlobClient = new AzureBlobStorageBuilder().url( - "https://srnagarstorage.blob.core.windows.net/?sv=2022-11-02&ss=bfqt&srt=sco&sp=rwdlacupiytfx&se=2024-12-23T03:55:26Z&st=2024-12-12T19:55:26Z&spr=https&sig=7Dj0MbP2z9bnXRQdoohMtCKsfzXYfUKrRTfboiRZ%2Bv8%3D") + BlockBlobClient blockBlobClient = new AzureBlobStorageBuilder() + .url("sas-url") .buildBlockBlobClient(); String content = "Hello World!"; - blockBlobClient.upload("testcontainer", "upload.txt", content.length(), BinaryData.fromString(content), null, + blockBlobClient.upload("test-container", "upload.txt", content.length(), BinaryData.fromString(content), null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null); - } } From ea14440e77957ac8acf764614ef18c86b5b312ee Mon Sep 17 00:00:00 2001 From: vcolin7 Date: Tue, 4 Mar 2025 12:29:44 -0800 Subject: [PATCH 21/26] Added TODO comment in ResponseConstructorsCache --- .../implementation/http/rest/ResponseConstructorsCache.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sdk/clientcore/core/src/main/java/io/clientcore/core/implementation/http/rest/ResponseConstructorsCache.java b/sdk/clientcore/core/src/main/java/io/clientcore/core/implementation/http/rest/ResponseConstructorsCache.java index a8bd4cd9abdd..ba50baf9efcf 100644 --- a/sdk/clientcore/core/src/main/java/io/clientcore/core/implementation/http/rest/ResponseConstructorsCache.java +++ b/sdk/clientcore/core/src/main/java/io/clientcore/core/implementation/http/rest/ResponseConstructorsCache.java @@ -106,6 +106,9 @@ public Response invoke(ReflectiveInvoker reflectiveInvoker, Response respo final HttpHeaders responseHeaders = response.getHeaders(); final int paramCount = reflectiveInvoker.getParameterCount(); + + // TODO: Determine if we want to limit the number of parameters. For now, 3 and 4 are the default supported by + // clientcore, but 5 needed to be added to support deserialized headers in client libraries. (vcolin7) switch (paramCount) { case 3: return constructResponse(reflectiveInvoker, THREE_PARAM_ERROR, httpRequest, responseStatusCode, From aa32fe71247520301078631db9591a2f012ac769 Mon Sep 17 00:00:00 2001 From: vcolin7 Date: Tue, 4 Mar 2025 15:19:37 -0800 Subject: [PATCH 22/26] Grabbed the latest http-okhttp3 changes from main. Set core version to dependency instead of current. --- sdk/clientcore/http-okhttp3/CHANGELOG.md | 8 ++- sdk/clientcore/http-okhttp3/pom.xml | 8 +-- .../http-okhttp3/spotbugs-exclude.xml | 6 +- .../http/okhttp3/OkHttpHttpClient.java | 32 ++++++----- .../http/okhttp3/OkHttpHttpClientBuilder.java | 12 ++-- .../implementation/OkHttpFileRequestBody.java | 2 +- .../OkHttpInputStreamRequestBody.java | 2 +- .../implementation/OkHttpResponse.java | 4 +- .../OkHttpStreamableRequestBody.java | 2 +- .../OkHttpToCoreHttpHeadersWrapper.java | 16 ------ .../implementation/ProxyAuthenticator.java | 17 +++--- .../okhttp3/OkHttpHttpClientBuilderTests.java | 57 +++++++++++-------- .../OkHttpHttpClientProviderTests.java | 2 +- .../http/okhttp3/OkHttpHttpClientTests.java | 12 ++-- .../io/clientcore/http/okhttp3/TestUtils.java | 2 +- .../OkHttpFileRequestBodyTest.java | 2 +- .../ProxyAuthenticatorTests.java | 8 +-- 17 files changed, 100 insertions(+), 92 deletions(-) diff --git a/sdk/clientcore/http-okhttp3/CHANGELOG.md b/sdk/clientcore/http-okhttp3/CHANGELOG.md index 4144f75694a0..1d2f20305e24 100644 --- a/sdk/clientcore/http-okhttp3/CHANGELOG.md +++ b/sdk/clientcore/http-okhttp3/CHANGELOG.md @@ -1,3 +1,9 @@ # Release History -## 1.0.0-beta.1 (Unreleased) +## 1.0.0-beta.1 (2025-02-14) + +### Features Added + +- Initial release. Please see the README and wiki for more information. + This package contains core types for building Java client libraries for accessing web services. + diff --git a/sdk/clientcore/http-okhttp3/pom.xml b/sdk/clientcore/http-okhttp3/pom.xml index 5a12fca52c2d..1feb170284fe 100644 --- a/sdk/clientcore/http-okhttp3/pom.xml +++ b/sdk/clientcore/http-okhttp3/pom.xml @@ -43,7 +43,7 @@ --add-exports io.clientcore.core/io.clientcore.core.implementation.http=ALL-UNNAMED --add-exports io.clientcore.core/io.clientcore.core.implementation.http.serializer=ALL-UNNAMED - --add-exports io.clientcore.core/io.clientcore.core.implementation.util=ALL-UNNAMED + --add-exports io.clientcore.core/io.clientcore.core.implementation.utils=ALL-UNNAMED --add-opens io.clientcore.http.okhttp3/io.clientcore.http.okhttp3=ALL-UNNAMED --add-opens io.clientcore.http.okhttp3/io.clientcore.http.okhttp3.implementation=ALL-UNNAMED @@ -55,7 +55,7 @@ io.clientcore.core.annotation,io.clientcore.core.credential,io.clientcore.core.http,io.clientcore.core.http.annotation,io.clientcore.core.http.client, io.clientcore.core.http.exception,io.clientcore.core.http.models,io.clientcore.core.http.pipeline,io.clientcore.core.implementation, - io.clientcore.core.implementation*,io.clientcore.core.models,io.clientcore.core.util,io.clientcore.core.util* + io.clientcore.core.implementation*,io.clientcore.core.models,io.clientcore.core.utils,io.clientcore.core.util* @@ -63,7 +63,7 @@ io.clientcore core - 1.0.0-beta.4 + 1.0.0-beta.5 com.squareup.okio @@ -86,7 +86,7 @@ io.clientcore core - 1.0.0-beta.4 + 1.0.0-beta.5 test-jar test diff --git a/sdk/clientcore/http-okhttp3/spotbugs-exclude.xml b/sdk/clientcore/http-okhttp3/spotbugs-exclude.xml index 6b03df0b01cc..423ce0df234a 100644 --- a/sdk/clientcore/http-okhttp3/spotbugs-exclude.xml +++ b/sdk/clientcore/http-okhttp3/spotbugs-exclude.xml @@ -11,7 +11,11 @@ - + + + + + diff --git a/sdk/clientcore/http-okhttp3/src/main/java/io/clientcore/http/okhttp3/OkHttpHttpClient.java b/sdk/clientcore/http-okhttp3/src/main/java/io/clientcore/http/okhttp3/OkHttpHttpClient.java index ce3fb8f92283..4a3174262ece 100644 --- a/sdk/clientcore/http-okhttp3/src/main/java/io/clientcore/http/okhttp3/OkHttpHttpClient.java +++ b/sdk/clientcore/http-okhttp3/src/main/java/io/clientcore/http/okhttp3/OkHttpHttpClient.java @@ -4,7 +4,6 @@ package io.clientcore.http.okhttp3; import io.clientcore.core.http.client.HttpClient; -import io.clientcore.core.http.models.HttpHeader; import io.clientcore.core.http.models.HttpHeaderName; import io.clientcore.core.http.models.HttpHeaders; import io.clientcore.core.http.models.HttpMethod; @@ -14,11 +13,11 @@ import io.clientcore.core.http.models.ResponseBodyMode; import io.clientcore.core.http.models.ServerSentEventListener; import io.clientcore.core.instrumentation.logging.ClientLogger; -import io.clientcore.core.util.ServerSentEventUtils; -import io.clientcore.core.util.ServerSentResult; -import io.clientcore.core.util.binarydata.BinaryData; -import io.clientcore.core.util.binarydata.FileBinaryData; -import io.clientcore.core.util.binarydata.InputStreamBinaryData; +import io.clientcore.core.utils.ServerSentEventUtils; +import io.clientcore.core.utils.ServerSentResult; +import io.clientcore.core.models.binarydata.BinaryData; +import io.clientcore.core.models.binarydata.FileBinaryData; +import io.clientcore.core.models.binarydata.InputStreamBinaryData; import io.clientcore.http.okhttp3.implementation.OkHttpFileRequestBody; import io.clientcore.http.okhttp3.implementation.OkHttpInputStreamRequestBody; import io.clientcore.http.okhttp3.implementation.OkHttpResponse; @@ -31,14 +30,13 @@ import java.io.IOException; -import static io.clientcore.core.http.models.ContentType.APPLICATION_OCTET_STREAM; import static io.clientcore.core.http.models.HttpHeaderName.CONTENT_TYPE; import static io.clientcore.core.http.models.HttpMethod.HEAD; import static io.clientcore.core.http.models.ResponseBodyMode.BUFFER; import static io.clientcore.core.http.models.ResponseBodyMode.IGNORE; import static io.clientcore.core.http.models.ResponseBodyMode.STREAM; -import static io.clientcore.core.util.ServerSentEventUtils.processTextEventStream; -import static io.clientcore.core.util.ServerSentEventUtils.attemptRetry; +import static io.clientcore.core.utils.ServerSentEventUtils.attemptRetry; +import static io.clientcore.core.utils.ServerSentEventUtils.processTextEventStream; /** * HttpClient implementation for OkHttp. @@ -47,6 +45,13 @@ class OkHttpHttpClient implements HttpClient { private static final ClientLogger LOGGER = new ClientLogger(OkHttpHttpClient.class); private static final byte[] EMPTY_BODY = new byte[0]; private static final RequestBody EMPTY_REQUEST_BODY = RequestBody.create(EMPTY_BODY); + + /** + * Error message for when no {@link ServerSentEventListener} is attached to the {@link HttpRequest}. + */ + private static final String NO_LISTENER_ERROR_MESSAGE + = "No ServerSentEventListener attached to HttpRequest to handle the text/event-stream response"; + final OkHttpClient httpClient; OkHttpHttpClient(OkHttpClient httpClient) { @@ -72,11 +77,11 @@ private okhttp3.Request toOkHttpRequest(HttpRequest request) { Request.Builder requestBuilder = new Request.Builder().url(request.getUri().toString()); if (request.getHeaders() != null) { - for (HttpHeader hdr : request.getHeaders()) { + request.getHeaders().stream().forEach(hdr -> { // OkHttp allows for headers with multiple values, but it treats them as separate headers, // therefore, we must call rb.addHeader for each value, using the same key for all of them hdr.getValues().forEach(value -> requestBuilder.addHeader(hdr.getName().toString(), value)); - } + }); } if (request.getHttpMethod() == HttpMethod.GET) { @@ -158,7 +163,7 @@ private Response toResponse(HttpRequest request, okhttp3.Response response) t return this.send(request); } } else { - throw LOGGER.logThrowableAsError(new RuntimeException(ServerSentEventUtils.NO_LISTENER_ERROR_MESSAGE)); + throw LOGGER.logThrowableAsError(new RuntimeException(NO_LISTENER_ERROR_MESSAGE)); } } @@ -235,7 +240,8 @@ private ResponseBodyMode determineResponseBodyMode(HttpRequest request, Headers if (request.getHttpMethod() == HEAD) { return IGNORE; } else if (contentType != null - && (APPLICATION_OCTET_STREAM.regionMatches(true, 0, contentType, 0, APPLICATION_OCTET_STREAM.length()))) { + && ("application/octet-stream".regionMatches(true, 0, contentType, 0, + "application/octet-stream".length()))) { return STREAM; } else { diff --git a/sdk/clientcore/http-okhttp3/src/main/java/io/clientcore/http/okhttp3/OkHttpHttpClientBuilder.java b/sdk/clientcore/http-okhttp3/src/main/java/io/clientcore/http/okhttp3/OkHttpHttpClientBuilder.java index 0735f8eadf90..2dde61c50353 100644 --- a/sdk/clientcore/http-okhttp3/src/main/java/io/clientcore/http/okhttp3/OkHttpHttpClientBuilder.java +++ b/sdk/clientcore/http-okhttp3/src/main/java/io/clientcore/http/okhttp3/OkHttpHttpClientBuilder.java @@ -6,9 +6,9 @@ import io.clientcore.core.http.client.HttpClient; import io.clientcore.core.http.models.ProxyOptions; import io.clientcore.core.instrumentation.logging.ClientLogger; -import io.clientcore.core.util.SharedExecutorService; -import io.clientcore.core.util.auth.ChallengeHandler; -import io.clientcore.core.util.configuration.Configuration; +import io.clientcore.core.utils.SharedExecutorService; +import io.clientcore.core.utils.ChallengeHandler; +import io.clientcore.core.utils.configuration.Configuration; import io.clientcore.http.okhttp3.implementation.OkHttpProxySelector; import io.clientcore.http.okhttp3.implementation.ProxyAuthenticator; import okhttp3.ConnectionPool; @@ -137,7 +137,7 @@ public OkHttpHttpClientBuilder dispatcher(Dispatcher dispatcher) { * The connection timeout begins once the request attempts to connect to the remote host and finishes once the * connection is resolved. *

- * If {@code connectTimeout} is null either {@link Configuration#PROPERTY_REQUEST_CONNECT_TIMEOUT} or a + * If {@code connectTimeout} is null either {@link Configuration#REQUEST_CONNECT_TIMEOUT_IN_MS} or a * 10-second timeout will be used, if it is a {@link Duration} less than or equal to zero then no timeout will be * applied. When applying the timeout the greatest of one millisecond and the value of {@code connectTimeout} will * be used. @@ -188,7 +188,7 @@ public OkHttpHttpClientBuilder callTimeout(Duration callTimeout) { * timeout triggers periodically but won't fire its operation if another read operation has completed between when * the timeout is triggered and completes. *

- * If {@code readTimeout} is null or {@link Configuration#PROPERTY_REQUEST_READ_TIMEOUT} or a 60-second + * If {@code readTimeout} is null or {@link Configuration#REQUEST_READ_TIMEOUT_IN_MS} or a 60-second * timeout will be used, if it is a {@link Duration} less than or equal to zero then no timeout period will be * applied to response read. When applying the timeout the greatest of one millisecond and the value of {@code * readTimeout} will be used. @@ -212,7 +212,7 @@ public OkHttpHttpClientBuilder readTimeout(Duration readTimeout) { * write tracker will update when each operation completes and the outbound buffer will be periodically checked to * determine if it is still draining. *

- * If {@code writeTimeout} is null either {@link Configuration#PROPERTY_REQUEST_WRITE_TIMEOUT} or a 60-second + * If {@code writeTimeout} is null either {@link Configuration#REQUEST_WRITE_TIMEOUT_IN_MS} or a 60-second * timeout will be used, if it is a {@link Duration} less than or equal to zero then no write timeout will be * applied. When applying the timeout the greatest of one millisecond and the value of {@code writeTimeout} will be * used. diff --git a/sdk/clientcore/http-okhttp3/src/main/java/io/clientcore/http/okhttp3/implementation/OkHttpFileRequestBody.java b/sdk/clientcore/http-okhttp3/src/main/java/io/clientcore/http/okhttp3/implementation/OkHttpFileRequestBody.java index b604eeb56290..e5f1be744b0a 100644 --- a/sdk/clientcore/http-okhttp3/src/main/java/io/clientcore/http/okhttp3/implementation/OkHttpFileRequestBody.java +++ b/sdk/clientcore/http-okhttp3/src/main/java/io/clientcore/http/okhttp3/implementation/OkHttpFileRequestBody.java @@ -3,7 +3,7 @@ package io.clientcore.http.okhttp3.implementation; -import io.clientcore.core.util.binarydata.FileBinaryData; +import io.clientcore.core.models.binarydata.FileBinaryData; import okhttp3.MediaType; import okio.BufferedSink; diff --git a/sdk/clientcore/http-okhttp3/src/main/java/io/clientcore/http/okhttp3/implementation/OkHttpInputStreamRequestBody.java b/sdk/clientcore/http-okhttp3/src/main/java/io/clientcore/http/okhttp3/implementation/OkHttpInputStreamRequestBody.java index 5e657ba966dc..7d1c6613a8ef 100644 --- a/sdk/clientcore/http-okhttp3/src/main/java/io/clientcore/http/okhttp3/implementation/OkHttpInputStreamRequestBody.java +++ b/sdk/clientcore/http-okhttp3/src/main/java/io/clientcore/http/okhttp3/implementation/OkHttpInputStreamRequestBody.java @@ -4,7 +4,7 @@ package io.clientcore.http.okhttp3.implementation; import io.clientcore.core.instrumentation.logging.ClientLogger; -import io.clientcore.core.util.binarydata.InputStreamBinaryData; +import io.clientcore.core.models.binarydata.InputStreamBinaryData; import okhttp3.MediaType; import okio.BufferedSink; import okio.Okio; diff --git a/sdk/clientcore/http-okhttp3/src/main/java/io/clientcore/http/okhttp3/implementation/OkHttpResponse.java b/sdk/clientcore/http-okhttp3/src/main/java/io/clientcore/http/okhttp3/implementation/OkHttpResponse.java index 448671434022..9b22378c3a10 100644 --- a/sdk/clientcore/http-okhttp3/src/main/java/io/clientcore/http/okhttp3/implementation/OkHttpResponse.java +++ b/sdk/clientcore/http-okhttp3/src/main/java/io/clientcore/http/okhttp3/implementation/OkHttpResponse.java @@ -6,8 +6,8 @@ import io.clientcore.core.http.models.HttpHeaderName; import io.clientcore.core.http.models.HttpHeaders; import io.clientcore.core.http.models.HttpRequest; -import io.clientcore.core.http.models.HttpResponse; -import io.clientcore.core.util.binarydata.BinaryData; +import io.clientcore.core.implementation.http.HttpResponse; +import io.clientcore.core.models.binarydata.BinaryData; import okhttp3.Headers; import okhttp3.ResponseBody; diff --git a/sdk/clientcore/http-okhttp3/src/main/java/io/clientcore/http/okhttp3/implementation/OkHttpStreamableRequestBody.java b/sdk/clientcore/http-okhttp3/src/main/java/io/clientcore/http/okhttp3/implementation/OkHttpStreamableRequestBody.java index 2ce64dbd557f..e000ca5d991a 100644 --- a/sdk/clientcore/http-okhttp3/src/main/java/io/clientcore/http/okhttp3/implementation/OkHttpStreamableRequestBody.java +++ b/sdk/clientcore/http-okhttp3/src/main/java/io/clientcore/http/okhttp3/implementation/OkHttpStreamableRequestBody.java @@ -3,7 +3,7 @@ package io.clientcore.http.okhttp3.implementation; -import io.clientcore.core.util.binarydata.BinaryData; +import io.clientcore.core.models.binarydata.BinaryData; import okhttp3.MediaType; import okhttp3.RequestBody; diff --git a/sdk/clientcore/http-okhttp3/src/main/java/io/clientcore/http/okhttp3/implementation/OkHttpToCoreHttpHeadersWrapper.java b/sdk/clientcore/http-okhttp3/src/main/java/io/clientcore/http/okhttp3/implementation/OkHttpToCoreHttpHeadersWrapper.java index efac19f07d44..09b26ade0133 100644 --- a/sdk/clientcore/http-okhttp3/src/main/java/io/clientcore/http/okhttp3/implementation/OkHttpToCoreHttpHeadersWrapper.java +++ b/sdk/clientcore/http-okhttp3/src/main/java/io/clientcore/http/okhttp3/implementation/OkHttpToCoreHttpHeadersWrapper.java @@ -9,9 +9,7 @@ import io.clientcore.core.http.models.Response; import okhttp3.Headers; -import java.util.Iterator; import java.util.List; -import java.util.Map; import java.util.stream.Stream; /** @@ -113,20 +111,6 @@ public List getValues(HttpHeaderName name) { return coreHeaders.getValues(name); } - @Override - public Map toMap() { - convertIfNeeded(); - - return coreHeaders.toMap(); - } - - @Override - public Iterator iterator() { - convertIfNeeded(); - - return coreHeaders.iterator(); - } - @Override public Stream stream() { convertIfNeeded(); diff --git a/sdk/clientcore/http-okhttp3/src/main/java/io/clientcore/http/okhttp3/implementation/ProxyAuthenticator.java b/sdk/clientcore/http-okhttp3/src/main/java/io/clientcore/http/okhttp3/implementation/ProxyAuthenticator.java index 0fbc68e8b4d4..e0f932f9f4f4 100644 --- a/sdk/clientcore/http-okhttp3/src/main/java/io/clientcore/http/okhttp3/implementation/ProxyAuthenticator.java +++ b/sdk/clientcore/http-okhttp3/src/main/java/io/clientcore/http/okhttp3/implementation/ProxyAuthenticator.java @@ -6,11 +6,10 @@ import io.clientcore.core.http.models.HttpHeaderName; import io.clientcore.core.http.models.HttpMethod; import io.clientcore.core.http.models.HttpRequest; -import io.clientcore.core.http.models.HttpResponse; import io.clientcore.core.instrumentation.logging.ClientLogger; -import io.clientcore.core.util.auth.AuthUtils; -import io.clientcore.core.util.auth.ChallengeHandler; -import io.clientcore.core.util.binarydata.BinaryData; +import io.clientcore.core.models.binarydata.BinaryData; +import io.clientcore.core.utils.AuthUtils; +import io.clientcore.core.utils.ChallengeHandler; import okhttp3.Authenticator; import okhttp3.Interceptor; import okhttp3.Request; @@ -41,7 +40,7 @@ public final class ProxyAuthenticator implements Authenticator { /* * Proxies use 'CONNECT' as the HTTP method. */ - private static final String PROXY_METHOD = HttpMethod.CONNECT.name(); + private static final HttpMethod PROXY_METHOD = HttpMethod.CONNECT; /* * Proxies are always the root path. @@ -106,9 +105,9 @@ public Request authenticate(Route route, Response response) { } Request.Builder requestBuilder = response.request().newBuilder(); - HttpRequest httpRequest = new HttpRequest(HttpMethod.valueOf(PROXY_METHOD), PROXY_URI_PATH); - HttpResponse httpResponse = new HttpResponse<>(httpRequest, response.code(), - OkHttpResponse.fromOkHttpHeaders(response.headers()), NO_BODY); + HttpRequest httpRequest = new HttpRequest().setMethod(PROXY_METHOD).setUri(PROXY_URI_PATH); + io.clientcore.core.http.models.Response httpResponse = io.clientcore.core.http.models.Response + .create(httpRequest, response.code(), OkHttpResponse.fromOkHttpHeaders(response.headers()), NO_BODY); String authorizationHeader; // Replace nonce value in the PROXY_AUTHENTICATE header with the updated nonce ConcurrentHashMap lastChallengeMap = proxyInterceptor.getLastChallenge(); @@ -194,7 +193,7 @@ public Response intercept(Chain chain) throws IOException { String proxyAuthenticationInfoHeader = response.header(PROXY_AUTHENTICATION_INFO); - if (!AuthUtils.isNullOrEmpty(proxyAuthenticationInfoHeader)) { + if (proxyAuthenticationInfoHeader != null && !proxyAuthenticationInfoHeader.isEmpty()) { Map authenticationInfoPieces = AuthUtils.parseAuthenticationOrAuthorizationHeader(proxyAuthenticationInfoHeader); Map authorizationPieces = AuthUtils.parseAuthenticationOrAuthorizationHeader( diff --git a/sdk/clientcore/http-okhttp3/src/test/java/io/clientcore/http/okhttp3/OkHttpHttpClientBuilderTests.java b/sdk/clientcore/http-okhttp3/src/test/java/io/clientcore/http/okhttp3/OkHttpHttpClientBuilderTests.java index fa3e42805d86..cc83b3e8202e 100644 --- a/sdk/clientcore/http-okhttp3/src/test/java/io/clientcore/http/okhttp3/OkHttpHttpClientBuilderTests.java +++ b/sdk/clientcore/http-okhttp3/src/test/java/io/clientcore/http/okhttp3/OkHttpHttpClientBuilderTests.java @@ -10,10 +10,10 @@ import io.clientcore.core.http.models.Response; import io.clientcore.core.shared.LocalTestServer; import io.clientcore.core.shared.TestConfigurationSource; -import io.clientcore.core.util.SharedExecutorService; -import io.clientcore.core.util.configuration.Configuration; -import io.clientcore.core.util.configuration.ConfigurationBuilder; -import io.clientcore.core.util.configuration.ConfigurationSource; +import io.clientcore.core.utils.SharedExecutorService; +import io.clientcore.core.utils.configuration.Configuration; +import io.clientcore.core.utils.configuration.ConfigurationBuilder; +import io.clientcore.core.utils.configuration.ConfigurationSource; import okhttp3.Call; import okhttp3.ConnectionPool; import okhttp3.Dispatcher; @@ -129,7 +129,8 @@ public void buildClientWithExistingClient() throws IOException { .build(); HttpClient client = new OkHttpHttpClientBuilder(existingClient).build(); - try (Response response = client.send(new HttpRequest(HttpMethod.GET, cookieValidatorUri))) { + try (Response response + = client.send(new HttpRequest().setMethod(HttpMethod.GET).setUri(cookieValidatorUri))) { assertEquals(200, response.getStatusCode()); } } @@ -152,7 +153,8 @@ public void addNetworkInterceptor() throws IOException { = chain -> chain.proceed(chain.request().newBuilder().addHeader("Cookie", "test=success").build()); HttpClient client = new OkHttpHttpClientBuilder().addNetworkInterceptor(testInterceptor).build(); - try (Response response = client.send(new HttpRequest(HttpMethod.GET, cookieValidatorUri))) { + try (Response response + = client.send(new HttpRequest().setMethod(HttpMethod.GET).setUri(cookieValidatorUri))) { assertEquals(200, response.getStatusCode()); } } @@ -179,7 +181,8 @@ public void setNetworkInterceptors() throws IOException { .networkInterceptors(Collections.singletonList(goodCookieSetter)) .build(); - try (Response response = client.send(new HttpRequest(HttpMethod.GET, cookieValidatorUri))) { + try (Response response + = client.send(new HttpRequest().setMethod(HttpMethod.GET).setUri(cookieValidatorUri))) { assertEquals(200, response.getStatusCode()); } } @@ -208,7 +211,7 @@ public void buildWithConnectionTimeout() throws IOException { .connectionTimeout(Duration.ofSeconds(3600)) .build(); - try (Response response = client.send(new HttpRequest(HttpMethod.GET, defaultUri))) { + try (Response response = client.send(new HttpRequest().setMethod(HttpMethod.GET).setUri(defaultUri))) { assertEquals(200, response.getStatusCode()); } } @@ -217,7 +220,7 @@ public void buildWithConnectionTimeout() throws IOException { public void buildWithFollowRedirectSetToTrue() throws IOException { HttpClient client = new OkHttpHttpClientBuilder().followRedirects(true).build(); - try (Response response = client.send(new HttpRequest(HttpMethod.GET, redirectUri))) { + try (Response response = client.send(new HttpRequest().setMethod(HttpMethod.GET).setUri(redirectUri))) { assertEquals(200, response.getStatusCode()); } } @@ -226,7 +229,7 @@ public void buildWithFollowRedirectSetToTrue() throws IOException { public void buildWithFollowRedirectSetToFalse() throws IOException { HttpClient client = new OkHttpHttpClientBuilder().followRedirects(false).build(); - try (Response response = client.send(new HttpRequest(HttpMethod.GET, redirectUri))) { + try (Response response = client.send(new HttpRequest().setMethod(HttpMethod.GET).setUri(redirectUri))) { assertEquals(307, response.getStatusCode()); } } @@ -235,7 +238,7 @@ public void buildWithFollowRedirectSetToFalse() throws IOException { public void buildWithFollowRedirectDefault() throws IOException { HttpClient client = new OkHttpHttpClientBuilder().build(); - try (Response response = client.send(new HttpRequest(HttpMethod.GET, redirectUri))) { + try (Response response = client.send(new HttpRequest().setMethod(HttpMethod.GET).setUri(redirectUri))) { assertEquals(307, response.getStatusCode()); } } @@ -255,7 +258,7 @@ public void buildWithReadTimeout() throws IOException { .readTimeout(Duration.ofSeconds(3600)) .build(); - try (Response response = client.send(new HttpRequest(HttpMethod.GET, defaultUri))) { + try (Response response = client.send(new HttpRequest().setMethod(HttpMethod.GET).setUri(defaultUri))) { assertEquals(200, response.getStatusCode()); } } @@ -274,7 +277,7 @@ public void buildWithCallTimeout() throws IOException { .callTimeout(Duration.ofSeconds(3600)) .build(); - try (Response response = client.send(new HttpRequest(HttpMethod.GET, defaultUri))) { + try (Response response = client.send(new HttpRequest().setMethod(HttpMethod.GET).setUri(defaultUri))) { assertEquals(200, response.getStatusCode()); } } @@ -302,7 +305,7 @@ public void buildWithDefaultTimeouts() throws IOException { }; HttpClient client = new OkHttpHttpClientBuilder().addNetworkInterceptor(validatorInterceptor).build(); - try (Response response = client.send(new HttpRequest(HttpMethod.GET, defaultUri))) { + try (Response response = client.send(new HttpRequest().setMethod(HttpMethod.GET).setUri(defaultUri))) { assertEquals(200, response.getStatusCode()); } } @@ -315,7 +318,7 @@ public void buildWithConnectionPool() throws IOException { ConnectionPool connectionPool = new ConnectionPool(); HttpClient client = new OkHttpHttpClientBuilder().connectionPool(connectionPool).build(); - try (Response response = client.send(new HttpRequest(HttpMethod.GET, defaultUri))) { + try (Response response = client.send(new HttpRequest().setMethod(HttpMethod.GET).setUri(defaultUri))) { assertEquals(200, response.getStatusCode()); assertEquals(1, connectionPool.connectionCount()); } @@ -350,7 +353,8 @@ public void buildWithDispatcher() { dispatcher.cancelAll(); }, 1000, TimeUnit.MILLISECONDS); - assertThrows(IOException.class, () -> client.send(new HttpRequest(HttpMethod.GET, dispatcherUri)).close()); + assertThrows(IOException.class, + () -> client.send(new HttpRequest().setMethod(HttpMethod.GET).setUri(dispatcherUri)).close()); } /** @@ -371,7 +375,8 @@ public void buildWithProxy(boolean shouldHaveProxy, Proxy.Type proxyType, ProxyO OkHttpClient validatorClient = okHttpClientWithProxyValidation(shouldHaveProxy, proxyType); HttpClient client = new OkHttpHttpClientBuilder(validatorClient).proxy(proxyOptions).build(); - assertThrows(RuntimeException.class, () -> client.send(new HttpRequest(HttpMethod.GET, requestUri)).close(), + assertThrows(RuntimeException.class, + () -> client.send(new HttpRequest().setMethod(HttpMethod.GET).setUri(requestUri)).close(), TestEventListenerValidator.EXPECTED_EXCEPTION_MESSAGE); } @@ -451,7 +456,8 @@ public void buildWithEnvConfigurationProxy(boolean shouldHaveProxy, Configuratio OkHttpClient validatorClient = okHttpClientWithProxyValidation(shouldHaveProxy, Proxy.Type.HTTP); HttpClient client = new OkHttpHttpClientBuilder(validatorClient).configuration(configuration).build(); - assertThrows(Throwable.class, () -> client.send(new HttpRequest(HttpMethod.GET, requestUri)).close(), + assertThrows(Throwable.class, + () -> client.send(new HttpRequest().setMethod(HttpMethod.GET).setUri(requestUri)).close(), TestEventListenerValidator.EXPECTED_EXCEPTION_MESSAGE); } @@ -463,7 +469,8 @@ public void buildWithExplicitConfigurationProxySupplier(boolean shouldHaveProxy, HttpClient client = new OkHttpHttpClientBuilder(validatorClient).configuration(configuration).build(); - assertThrows(Throwable.class, () -> client.send(new HttpRequest(HttpMethod.GET, requestUri)).close(), + assertThrows(Throwable.class, + () -> client.send(new HttpRequest().setMethod(HttpMethod.GET).setUri(requestUri)).close(), TestEventListenerValidator.EXPECTED_EXCEPTION_MESSAGE); } @@ -481,7 +488,7 @@ private static Stream buildWithEnvConfigurationProxySupplier() { defaultUri)); Configuration simpleEnvProxy = new ConfigurationBuilder(EMPTY_SOURCE, EMPTY_SOURCE, - new TestConfigurationSource().put(Configuration.PROPERTY_HTTP_PROXY, "http://localhost:12345") + new TestConfigurationSource().put(Configuration.HTTP_PROXY, "http://localhost:12345") .put(JAVA_SYSTEM_PROXY_PREREQUISITE, "true")).build(); arguments.add(Arguments.of(true, simpleEnvProxy, defaultUri)); @@ -496,7 +503,7 @@ private static Stream buildWithEnvConfigurationProxySupplier() { arguments.add(Arguments.of(true, javaProxyWithAuthentication, defaultUri)); Configuration envProxyWithAuthentication = new ConfigurationBuilder(EMPTY_SOURCE, EMPTY_SOURCE, - new TestConfigurationSource().put(Configuration.PROPERTY_HTTP_PROXY, "http://1:1@localhost:12345") + new TestConfigurationSource().put(Configuration.HTTP_PROXY, "http://1:1@localhost:12345") .put(JAVA_SYSTEM_PROXY_PREREQUISITE, "true")).build(); arguments.add(Arguments.of(true, envProxyWithAuthentication, defaultUri)); @@ -520,8 +527,8 @@ private static Stream buildWithEnvConfigurationProxySupplier() { Supplier javaNonProxyHostsSupplier = () -> baseJavaProxyConfigurationSupplier.get().put(JAVA_NON_PROXY_HOSTS, rawJavaNonProxyHosts); Supplier envNonProxyHostsSupplier - = () -> new TestConfigurationSource().put(Configuration.PROPERTY_HTTP_PROXY, "http://localhost:12345") - .put(Configuration.PROPERTY_NO_PROXY, rawEnvNonProxyHosts) + = () -> new TestConfigurationSource().put(Configuration.HTTP_PROXY, "http://localhost:12345") + .put(Configuration.NO_PROXY, rawEnvNonProxyHosts) .put(JAVA_SYSTEM_PROXY_PREREQUISITE, "true"); List> nonProxyHostsSuppliers = Arrays.asList(javaNonProxyHostsSupplier, envNonProxyHostsSupplier); @@ -546,8 +553,8 @@ private static Stream buildWithEnvConfigurationProxySupplier() { Supplier authenticatedJavaNonProxyHostsSupplier = () -> javaNonProxyHostsSupplier.get().put(JAVA_HTTP_PROXY_USER, "1").put(JAVA_HTTP_PROXY_PASSWORD, "1"); Supplier authenticatedEnvNonProxyHostsSupplier - = () -> new TestConfigurationSource().put(Configuration.PROPERTY_HTTP_PROXY, "http://1:1@localhost:12345") - .put(Configuration.PROPERTY_NO_PROXY, rawEnvNonProxyHosts) + = () -> new TestConfigurationSource().put(Configuration.HTTP_PROXY, "http://1:1@localhost:12345") + .put(Configuration.NO_PROXY, rawEnvNonProxyHosts) .put(JAVA_SYSTEM_PROXY_PREREQUISITE, "true"); List> authenticatedNonProxyHostsSuppliers = Arrays.asList(authenticatedJavaNonProxyHostsSupplier, authenticatedEnvNonProxyHostsSupplier); diff --git a/sdk/clientcore/http-okhttp3/src/test/java/io/clientcore/http/okhttp3/OkHttpHttpClientProviderTests.java b/sdk/clientcore/http-okhttp3/src/test/java/io/clientcore/http/okhttp3/OkHttpHttpClientProviderTests.java index 97a6c5a45b65..945553ddbe4b 100644 --- a/sdk/clientcore/http-okhttp3/src/test/java/io/clientcore/http/okhttp3/OkHttpHttpClientProviderTests.java +++ b/sdk/clientcore/http-okhttp3/src/test/java/io/clientcore/http/okhttp3/OkHttpHttpClientProviderTests.java @@ -4,7 +4,7 @@ package io.clientcore.http.okhttp3; import io.clientcore.core.http.models.ProxyOptions; -import io.clientcore.core.util.configuration.Configuration; +import io.clientcore.core.utils.configuration.Configuration; import org.junit.jupiter.api.Test; import java.net.ProxySelector; diff --git a/sdk/clientcore/http-okhttp3/src/test/java/io/clientcore/http/okhttp3/OkHttpHttpClientTests.java b/sdk/clientcore/http-okhttp3/src/test/java/io/clientcore/http/okhttp3/OkHttpHttpClientTests.java index e6b3bf86845a..c7e671197b2c 100644 --- a/sdk/clientcore/http-okhttp3/src/test/java/io/clientcore/http/okhttp3/OkHttpHttpClientTests.java +++ b/sdk/clientcore/http-okhttp3/src/test/java/io/clientcore/http/okhttp3/OkHttpHttpClientTests.java @@ -110,7 +110,7 @@ public void testFlowableResponseLongBodyAsByteArrayAsync() throws IOException { @Test public void testServerShutsDownSocketShouldPushErrorToContentFlowable() { HttpClient client = new OkHttpHttpClientProvider().getSharedInstance(); - HttpRequest request = new HttpRequest(HttpMethod.GET, uri(server, "/connectionClose")); + HttpRequest request = new HttpRequest().setMethod(HttpMethod.GET).setUri(uri(server, "/connectionClose")); assertThrows(IOException.class, () -> client.send(request).getBody().toBytes()); } @@ -151,8 +151,9 @@ public void validateHeadersReturnAsIs() throws IOException { HttpHeaders headers = new HttpHeaders().set(singleValueHeaderName, singleValueHeaderValue) .set(multiValueHeaderName, multiValueHeaderValue); - try (Response response = client - .send(new HttpRequest(HttpMethod.GET, uri(server, RETURN_HEADERS_AS_IS_PATH)).setHeaders(headers))) { + try (Response response = client.send(new HttpRequest().setMethod(HttpMethod.GET) + .setUri(uri(server, RETURN_HEADERS_AS_IS_PATH)) + .setHeaders(headers))) { assertEquals(200, response.getStatusCode()); @@ -182,7 +183,8 @@ public void testCustomSslSocketFactory() throws IOException, GeneralSecurityExce .hostnameVerifier((hostname, session) -> true) .build(); - try (Response response = httpClient.send(new HttpRequest(HttpMethod.GET, httpsUri(server, "/short")))) { + try (Response response + = httpClient.send(new HttpRequest().setMethod(HttpMethod.GET).setUri(httpsUri(server, "/short")))) { TestUtils.assertArraysEqual(SHORT_BODY, response.getBody().toBytes()); } } @@ -224,7 +226,7 @@ private static void checkBodyReceived(byte[] expectedBody, String path) throws I } private static Response doRequest(HttpClient client, String path) throws IOException { - HttpRequest request = new HttpRequest(HttpMethod.GET, uri(server, path)); + HttpRequest request = new HttpRequest().setMethod(HttpMethod.GET).setUri(uri(server, path)); return client.send(request); } diff --git a/sdk/clientcore/http-okhttp3/src/test/java/io/clientcore/http/okhttp3/TestUtils.java b/sdk/clientcore/http-okhttp3/src/test/java/io/clientcore/http/okhttp3/TestUtils.java index 621b79eecc0d..14b391ed01ed 100644 --- a/sdk/clientcore/http-okhttp3/src/test/java/io/clientcore/http/okhttp3/TestUtils.java +++ b/sdk/clientcore/http-okhttp3/src/test/java/io/clientcore/http/okhttp3/TestUtils.java @@ -28,7 +28,7 @@ public static Dispatcher createQuietDispatcher(Class expect // Most tests will only run a single network call, so it's fine to use a single thread executor that won't // allow for concurrent requests. return new Dispatcher(Executors.newSingleThreadExecutor(r -> { - Thread thread = new Thread(r, "AzureQuietDispatch-" + QUIET_DISPATCHER_THREAD.getAndIncrement()); + Thread thread = new Thread(r, "ClientCoreQuietDispatch-" + QUIET_DISPATCHER_THREAD.getAndIncrement()); thread.setUncaughtExceptionHandler((t, e) -> { if (e.getClass() == expectedErrorType && e.getMessage() != null diff --git a/sdk/clientcore/http-okhttp3/src/test/java/io/clientcore/http/okhttp3/implementation/OkHttpFileRequestBodyTest.java b/sdk/clientcore/http-okhttp3/src/test/java/io/clientcore/http/okhttp3/implementation/OkHttpFileRequestBodyTest.java index b915773ebabf..e29399e422fa 100644 --- a/sdk/clientcore/http-okhttp3/src/test/java/io/clientcore/http/okhttp3/implementation/OkHttpFileRequestBodyTest.java +++ b/sdk/clientcore/http-okhttp3/src/test/java/io/clientcore/http/okhttp3/implementation/OkHttpFileRequestBodyTest.java @@ -3,7 +3,7 @@ package io.clientcore.http.okhttp3.implementation; -import io.clientcore.core.util.binarydata.FileBinaryData; +import io.clientcore.core.models.binarydata.FileBinaryData; import okio.Buffer; import okio.BufferedSink; import okio.ByteString; diff --git a/sdk/clientcore/http-okhttp3/src/test/java/io/clientcore/http/okhttp3/implementation/ProxyAuthenticatorTests.java b/sdk/clientcore/http-okhttp3/src/test/java/io/clientcore/http/okhttp3/implementation/ProxyAuthenticatorTests.java index 001d7ecb3e7c..ca08a5e8b6c3 100644 --- a/sdk/clientcore/http-okhttp3/src/test/java/io/clientcore/http/okhttp3/implementation/ProxyAuthenticatorTests.java +++ b/sdk/clientcore/http-okhttp3/src/test/java/io/clientcore/http/okhttp3/implementation/ProxyAuthenticatorTests.java @@ -3,10 +3,10 @@ package io.clientcore.http.okhttp3.implementation; -import io.clientcore.core.util.auth.BasicChallengeHandler; -import io.clientcore.core.util.auth.AuthUtils; -import io.clientcore.core.util.auth.ChallengeHandler; -import io.clientcore.core.util.auth.DigestChallengeHandler; +import io.clientcore.core.utils.BasicChallengeHandler; +import io.clientcore.core.utils.AuthUtils; +import io.clientcore.core.utils.ChallengeHandler; +import io.clientcore.core.utils.DigestChallengeHandler; import okhttp3.Address; import okhttp3.Authenticator; import okhttp3.ConnectionSpec; From 6b334a432f8628d9c56591a55c7131c33b5a1cc0 Mon Sep 17 00:00:00 2001 From: vcolin7 Date: Tue, 4 Mar 2025 15:45:37 -0800 Subject: [PATCH 23/26] Updated azure-core-v2 to use the most recently released clientcore --- sdk/core/azure-core-v2/pom.xml | 8 ++++++- .../com/azure/v2/core/annotation/Host.java | 2 +- .../core/annotation/ReturnValueWireType.java | 4 ++-- .../core/credential/AzureKeyCredential.java | 2 +- .../BasicAuthenticationCredential.java | 2 +- .../exception/ResourceExistsException.java | 2 +- .../exception/ResourceModifiedException.java | 2 +- .../exception/ResourceNotFoundException.java | 2 +- .../exception/TooManyRedirectsException.java | 2 +- .../v2/core/http/policy/AddDatePolicy.java | 8 +------ .../policy/AddHeadersFromContextPolicy.java | 8 +------ .../v2/core/http/policy/AddHeadersPolicy.java | 6 ------ .../BearerTokenAuthenticationPolicy.java | 2 +- .../v2/core/http/policy/CookiePolicy.java | 21 ++++++++----------- .../policy/HttpRequestLoggingContext.java | 2 +- .../policy/HttpResponseLoggingContext.java | 2 +- .../v2/core/http/policy/RequestIdPolicy.java | 6 ------ .../v2/core/http/policy/UserAgentPolicy.java | 10 ++------- .../v2/core/http/rest/PagedResponseBase.java | 2 +- .../azure/v2/core/http/rest/ResponseBase.java | 8 +++---- .../core/implementation/AccessTokenCache.java | 13 +++++++----- .../implementation/http/UrlSanitizer.java | 2 +- .../util/EnvironmentConfiguration.java | 10 ++++----- .../com/azure/v2/core/util/CoreUtils.java | 4 ++-- .../azure/v2/core/util/MetricsOptions.java | 6 +++--- .../azure/v2/core/util/TracingOptions.java | 6 +++--- .../com/azure/v2/core/util/UserAgentUtil.java | 2 +- .../v2/core/util/metrics/DoubleHistogram.java | 2 +- .../v2/core/util/metrics/LongCounter.java | 2 +- .../azure/v2/core/util/metrics/NoopMeter.java | 2 +- .../v2/core/util/tracing/NoopTracer.java | 2 +- .../core/util/tracing/StartSpanOptions.java | 2 +- .../azure/v2/core/util/tracing/Tracer.java | 2 +- .../v2/core/util/tracing/TracerProxy.java | 2 +- .../v2/core/util/tracing/TracingLink.java | 2 +- .../com/azure/v2/core/util/tracing/Utils.java | 2 +- 36 files changed, 69 insertions(+), 93 deletions(-) diff --git a/sdk/core/azure-core-v2/pom.xml b/sdk/core/azure-core-v2/pom.xml index 519e0c3796fa..820054b92522 100644 --- a/sdk/core/azure-core-v2/pom.xml +++ b/sdk/core/azure-core-v2/pom.xml @@ -75,7 +75,7 @@ io.clientcore core - 1.0.0-beta.4 + 1.0.0-beta.5 @@ -114,6 +114,12 @@ 1.37 test + + com.azure + azure-core + 1.56.0-beta.1 + compile + diff --git a/sdk/core/azure-core-v2/src/main/java/com/azure/v2/core/annotation/Host.java b/sdk/core/azure-core-v2/src/main/java/com/azure/v2/core/annotation/Host.java index a4857acedbf8..3fd41f33245c 100644 --- a/sdk/core/azure-core-v2/src/main/java/com/azure/v2/core/annotation/Host.java +++ b/sdk/core/azure-core-v2/src/main/java/com/azure/v2/core/annotation/Host.java @@ -3,7 +3,7 @@ package com.azure.v2.core.annotation; -import io.clientcore.core.http.annotation.HostParam; +import io.clientcore.core.http.annotations.HostParam; import java.lang.annotation.Retention; import java.lang.annotation.Target; diff --git a/sdk/core/azure-core-v2/src/main/java/com/azure/v2/core/annotation/ReturnValueWireType.java b/sdk/core/azure-core-v2/src/main/java/com/azure/v2/core/annotation/ReturnValueWireType.java index 39a0d9037ca8..fa31e8456e5f 100644 --- a/sdk/core/azure-core-v2/src/main/java/com/azure/v2/core/annotation/ReturnValueWireType.java +++ b/sdk/core/azure-core-v2/src/main/java/com/azure/v2/core/annotation/ReturnValueWireType.java @@ -4,8 +4,8 @@ package com.azure.v2.core.annotation; import com.azure.v2.core.http.rest.Page; -import io.clientcore.core.util.Base64Uri; -import io.clientcore.core.util.DateTimeRfc1123; +import io.clientcore.core.utils.Base64Uri; +import io.clientcore.core.utils.DateTimeRfc1123; import java.lang.annotation.Retention; import java.lang.annotation.Target; diff --git a/sdk/core/azure-core-v2/src/main/java/com/azure/v2/core/credential/AzureKeyCredential.java b/sdk/core/azure-core-v2/src/main/java/com/azure/v2/core/credential/AzureKeyCredential.java index 09622bf02daa..c7b0b091441e 100644 --- a/sdk/core/azure-core-v2/src/main/java/com/azure/v2/core/credential/AzureKeyCredential.java +++ b/sdk/core/azure-core-v2/src/main/java/com/azure/v2/core/credential/AzureKeyCredential.java @@ -3,7 +3,7 @@ package com.azure.v2.core.credential; -import io.clientcore.core.credential.KeyCredential; +import io.clientcore.core.credentials.KeyCredential; /** *

diff --git a/sdk/core/azure-core-v2/src/main/java/com/azure/v2/core/credential/BasicAuthenticationCredential.java b/sdk/core/azure-core-v2/src/main/java/com/azure/v2/core/credential/BasicAuthenticationCredential.java index 6e0421a647ef..6fb9386ea762 100644 --- a/sdk/core/azure-core-v2/src/main/java/com/azure/v2/core/credential/BasicAuthenticationCredential.java +++ b/sdk/core/azure-core-v2/src/main/java/com/azure/v2/core/credential/BasicAuthenticationCredential.java @@ -3,7 +3,7 @@ package com.azure.v2.core.credential; -import io.clientcore.core.util.Base64Util; +import io.clientcore.core.utils.Base64Util; import java.nio.charset.StandardCharsets; import java.time.OffsetDateTime; diff --git a/sdk/core/azure-core-v2/src/main/java/com/azure/v2/core/exception/ResourceExistsException.java b/sdk/core/azure-core-v2/src/main/java/com/azure/v2/core/exception/ResourceExistsException.java index ac7f72367fef..50575a5b9201 100644 --- a/sdk/core/azure-core-v2/src/main/java/com/azure/v2/core/exception/ResourceExistsException.java +++ b/sdk/core/azure-core-v2/src/main/java/com/azure/v2/core/exception/ResourceExistsException.java @@ -3,8 +3,8 @@ package com.azure.v2.core.exception; -import io.clientcore.core.http.models.HttpResponse; import io.clientcore.core.http.models.Response; +import io.clientcore.core.implementation.http.HttpResponse; /** *

The {@code ResourceExistsException} represents an exception thrown when an HTTP request attempts to create a diff --git a/sdk/core/azure-core-v2/src/main/java/com/azure/v2/core/exception/ResourceModifiedException.java b/sdk/core/azure-core-v2/src/main/java/com/azure/v2/core/exception/ResourceModifiedException.java index e183d40c7d20..8345a4452be5 100644 --- a/sdk/core/azure-core-v2/src/main/java/com/azure/v2/core/exception/ResourceModifiedException.java +++ b/sdk/core/azure-core-v2/src/main/java/com/azure/v2/core/exception/ResourceModifiedException.java @@ -3,8 +3,8 @@ package com.azure.v2.core.exception; -import io.clientcore.core.http.models.HttpResponse; import io.clientcore.core.http.models.Response; +import io.clientcore.core.implementation.http.HttpResponse; /** *

The {@code ResourceModifiedException} represents an exception thrown when an HTTP request attempts to modify a diff --git a/sdk/core/azure-core-v2/src/main/java/com/azure/v2/core/exception/ResourceNotFoundException.java b/sdk/core/azure-core-v2/src/main/java/com/azure/v2/core/exception/ResourceNotFoundException.java index bd71737a6736..3335dd229a70 100644 --- a/sdk/core/azure-core-v2/src/main/java/com/azure/v2/core/exception/ResourceNotFoundException.java +++ b/sdk/core/azure-core-v2/src/main/java/com/azure/v2/core/exception/ResourceNotFoundException.java @@ -3,8 +3,8 @@ package com.azure.v2.core.exception; -import io.clientcore.core.http.models.HttpResponse; import io.clientcore.core.http.models.Response; +import io.clientcore.core.implementation.http.HttpResponse; /** *

The {@code ResourceNotFoundException} represents an exception thrown when an HTTP request attempts to access a diff --git a/sdk/core/azure-core-v2/src/main/java/com/azure/v2/core/exception/TooManyRedirectsException.java b/sdk/core/azure-core-v2/src/main/java/com/azure/v2/core/exception/TooManyRedirectsException.java index 67ac7ba172f0..2de9d7d84591 100644 --- a/sdk/core/azure-core-v2/src/main/java/com/azure/v2/core/exception/TooManyRedirectsException.java +++ b/sdk/core/azure-core-v2/src/main/java/com/azure/v2/core/exception/TooManyRedirectsException.java @@ -3,8 +3,8 @@ package com.azure.v2.core.exception; -import io.clientcore.core.http.models.HttpResponse; import io.clientcore.core.http.models.Response; +import io.clientcore.core.implementation.http.HttpResponse; /** *

The {@code TooManyRedirectsException} represents an exception thrown when an HTTP request has reached the diff --git a/sdk/core/azure-core-v2/src/main/java/com/azure/v2/core/http/policy/AddDatePolicy.java b/sdk/core/azure-core-v2/src/main/java/com/azure/v2/core/http/policy/AddDatePolicy.java index 1a996fceb0d8..1b0fb4aaf635 100644 --- a/sdk/core/azure-core-v2/src/main/java/com/azure/v2/core/http/policy/AddDatePolicy.java +++ b/sdk/core/azure-core-v2/src/main/java/com/azure/v2/core/http/policy/AddDatePolicy.java @@ -8,9 +8,8 @@ import io.clientcore.core.http.models.Response; import io.clientcore.core.http.pipeline.HttpPipeline; import io.clientcore.core.http.pipeline.HttpPipelineNextPolicy; -import io.clientcore.core.http.pipeline.HttpPipelineOrder; import io.clientcore.core.http.pipeline.HttpPipelinePolicy; -import io.clientcore.core.util.DateTimeRfc1123; +import io.clientcore.core.utils.DateTimeRfc1123; import java.time.OffsetDateTime; import java.time.ZoneOffset; @@ -51,9 +50,4 @@ public Response process(HttpRequest httpRequest, HttpPipelineNextPolicy next) setDate(httpRequest); return next.process(); } - - @Override - public final HttpPipelineOrder getOrder() { - return HttpPipelineOrder.BETWEEN_RETRY_AND_AUTHENTICATION; - } } diff --git a/sdk/core/azure-core-v2/src/main/java/com/azure/v2/core/http/policy/AddHeadersFromContextPolicy.java b/sdk/core/azure-core-v2/src/main/java/com/azure/v2/core/http/policy/AddHeadersFromContextPolicy.java index 21805fca63f0..0c2e1904b830 100644 --- a/sdk/core/azure-core-v2/src/main/java/com/azure/v2/core/http/policy/AddHeadersFromContextPolicy.java +++ b/sdk/core/azure-core-v2/src/main/java/com/azure/v2/core/http/policy/AddHeadersFromContextPolicy.java @@ -3,14 +3,13 @@ package com.azure.v2.core.http.policy; -import io.clientcore.core.http.pipeline.HttpPipelineOrder; -import io.clientcore.core.util.Context; import io.clientcore.core.http.models.HttpHeaders; import io.clientcore.core.http.models.HttpRequest; import io.clientcore.core.http.models.Response; import io.clientcore.core.http.pipeline.HttpPipeline; import io.clientcore.core.http.pipeline.HttpPipelineNextPolicy; import io.clientcore.core.http.pipeline.HttpPipelinePolicy; +import io.clientcore.core.utils.Context; /** * The pipeline policy that override or add {@link HttpHeaders} in {@link HttpRequest} by reading values from @@ -69,9 +68,4 @@ public Response process(HttpRequest httpRequest, HttpPipelineNextPolicy next) addHeadersFromContext(httpRequest); return next.process(); } - - @Override - public final HttpPipelineOrder getOrder() { - return HttpPipelineOrder.BETWEEN_RETRY_AND_AUTHENTICATION; - } } diff --git a/sdk/core/azure-core-v2/src/main/java/com/azure/v2/core/http/policy/AddHeadersPolicy.java b/sdk/core/azure-core-v2/src/main/java/com/azure/v2/core/http/policy/AddHeadersPolicy.java index df4544e50bb8..2b74f7ce3a7e 100644 --- a/sdk/core/azure-core-v2/src/main/java/com/azure/v2/core/http/policy/AddHeadersPolicy.java +++ b/sdk/core/azure-core-v2/src/main/java/com/azure/v2/core/http/policy/AddHeadersPolicy.java @@ -8,7 +8,6 @@ import io.clientcore.core.http.models.Response; import io.clientcore.core.http.pipeline.HttpPipeline; import io.clientcore.core.http.pipeline.HttpPipelineNextPolicy; -import io.clientcore.core.http.pipeline.HttpPipelineOrder; import io.clientcore.core.http.pipeline.HttpPipelinePolicy; /** @@ -56,9 +55,4 @@ public Response process(HttpRequest httpRequest, HttpPipelineNextPolicy next) return next.process(); } - - @Override - public final HttpPipelineOrder getOrder() { - return HttpPipelineOrder.BETWEEN_RETRY_AND_AUTHENTICATION; - } } diff --git a/sdk/core/azure-core-v2/src/main/java/com/azure/v2/core/http/policy/BearerTokenAuthenticationPolicy.java b/sdk/core/azure-core-v2/src/main/java/com/azure/v2/core/http/policy/BearerTokenAuthenticationPolicy.java index 97249f4b867f..ccb73277f5b4 100644 --- a/sdk/core/azure-core-v2/src/main/java/com/azure/v2/core/http/policy/BearerTokenAuthenticationPolicy.java +++ b/sdk/core/azure-core-v2/src/main/java/com/azure/v2/core/http/policy/BearerTokenAuthenticationPolicy.java @@ -109,7 +109,7 @@ public Response process(HttpRequest httpRequest, HttpPipelineNextPolicy next) throw LOGGER.logThrowableAsError( new RuntimeException("token credentials require a URL using the HTTPS protocol scheme")); } - HttpPipelineNextPolicy nextPolicy = next.clone(); + HttpPipelineNextPolicy nextPolicy = next.copy(); authorizeRequestSync(httpRequest); Response httpResponse = next.process(); diff --git a/sdk/core/azure-core-v2/src/main/java/com/azure/v2/core/http/policy/CookiePolicy.java b/sdk/core/azure-core-v2/src/main/java/com/azure/v2/core/http/policy/CookiePolicy.java index 82c66d0e4ddd..c6ceb6954fc7 100644 --- a/sdk/core/azure-core-v2/src/main/java/com/azure/v2/core/http/policy/CookiePolicy.java +++ b/sdk/core/azure-core-v2/src/main/java/com/azure/v2/core/http/policy/CookiePolicy.java @@ -9,7 +9,6 @@ import io.clientcore.core.http.models.Response; import io.clientcore.core.http.pipeline.HttpPipeline; import io.clientcore.core.http.pipeline.HttpPipelineNextPolicy; -import io.clientcore.core.http.pipeline.HttpPipelineOrder; import io.clientcore.core.http.pipeline.HttpPipelinePolicy; import io.clientcore.core.instrumentation.logging.ClientLogger; @@ -60,11 +59,12 @@ private static void beforeRequest(HttpRequest httpRequest, CookieHandler cookies final URI uri = httpRequest.getUri(); Map> cookieHeaders = new HashMap<>(); - for (HttpHeader header : httpRequest.getHeaders()) { - cookieHeaders.put(String.valueOf(header.getName()), header.getValues()); - } + + httpRequest.getHeaders().stream() + .forEach(header -> cookieHeaders.put(String.valueOf(header.getName()), header.getValues())); Map> requestCookies = cookies.get(uri, cookieHeaders); + for (Map.Entry> entry : requestCookies.entrySet()) { httpRequest.getHeaders().set(HttpHeaderName.fromString(entry.getKey()), entry.getValue()); } @@ -75,15 +75,17 @@ private static void beforeRequest(HttpRequest httpRequest, CookieHandler cookies private static Response afterResponse(HttpRequest httpRequest, Response response, CookieHandler cookies) { Map> responseHeaders = new HashMap<>(); - for (HttpHeader header : response.getHeaders()) { - responseHeaders.put(String.valueOf(header.getName()), header.getValues()); - } + + response.getHeaders().stream() + .forEach(header -> responseHeaders.put(String.valueOf(header.getName()), header.getValues())); + try { final URI uri = httpRequest.getUri(); cookies.put(uri, responseHeaders); } catch (IOException e) { throw LOGGER.logThrowableAsError(new RuntimeException(e)); } + return response; } @@ -93,9 +95,4 @@ public Response process(HttpRequest httpRequest, HttpPipelineNextPolicy next) return afterResponse(httpRequest, next.process(), cookies); } - - @Override - public final HttpPipelineOrder getOrder() { - return HttpPipelineOrder.BETWEEN_RETRY_AND_AUTHENTICATION; - } } diff --git a/sdk/core/azure-core-v2/src/main/java/com/azure/v2/core/http/policy/HttpRequestLoggingContext.java b/sdk/core/azure-core-v2/src/main/java/com/azure/v2/core/http/policy/HttpRequestLoggingContext.java index 1c018de3dea4..1f57ae6c0487 100644 --- a/sdk/core/azure-core-v2/src/main/java/com/azure/v2/core/http/policy/HttpRequestLoggingContext.java +++ b/sdk/core/azure-core-v2/src/main/java/com/azure/v2/core/http/policy/HttpRequestLoggingContext.java @@ -5,7 +5,7 @@ import io.clientcore.core.http.models.HttpRequest; import io.clientcore.core.http.pipeline.HttpPipelinePolicy; -import io.clientcore.core.util.Context; +import io.clientcore.core.utils.Context; /** * The {@code HttpRequestLoggingContext} class provides contextual information available during HTTP request logging. diff --git a/sdk/core/azure-core-v2/src/main/java/com/azure/v2/core/http/policy/HttpResponseLoggingContext.java b/sdk/core/azure-core-v2/src/main/java/com/azure/v2/core/http/policy/HttpResponseLoggingContext.java index e2e4fb378478..16353abd6013 100644 --- a/sdk/core/azure-core-v2/src/main/java/com/azure/v2/core/http/policy/HttpResponseLoggingContext.java +++ b/sdk/core/azure-core-v2/src/main/java/com/azure/v2/core/http/policy/HttpResponseLoggingContext.java @@ -5,7 +5,7 @@ import io.clientcore.core.http.models.Response; import io.clientcore.core.http.pipeline.HttpPipelinePolicy; -import io.clientcore.core.util.Context; +import io.clientcore.core.utils.Context; import java.time.Duration; diff --git a/sdk/core/azure-core-v2/src/main/java/com/azure/v2/core/http/policy/RequestIdPolicy.java b/sdk/core/azure-core-v2/src/main/java/com/azure/v2/core/http/policy/RequestIdPolicy.java index ea8f655e5af0..e538d4a9ff7d 100644 --- a/sdk/core/azure-core-v2/src/main/java/com/azure/v2/core/http/policy/RequestIdPolicy.java +++ b/sdk/core/azure-core-v2/src/main/java/com/azure/v2/core/http/policy/RequestIdPolicy.java @@ -10,7 +10,6 @@ import io.clientcore.core.http.models.Response; import io.clientcore.core.http.pipeline.HttpPipeline; import io.clientcore.core.http.pipeline.HttpPipelineNextPolicy; -import io.clientcore.core.http.pipeline.HttpPipelineOrder; import io.clientcore.core.http.pipeline.HttpPipelinePolicy; import java.util.Objects; @@ -71,9 +70,4 @@ public Response process(HttpRequest httpRequest, HttpPipelineNextPolicy next) setRequestIdHeader(httpRequest, requestIdHeaderName); return next.process(); } - - @Override - public final HttpPipelineOrder getOrder() { - return HttpPipelineOrder.BEFORE_REDIRECT; - } } diff --git a/sdk/core/azure-core-v2/src/main/java/com/azure/v2/core/http/policy/UserAgentPolicy.java b/sdk/core/azure-core-v2/src/main/java/com/azure/v2/core/http/policy/UserAgentPolicy.java index dabf4c1001a8..2c82294e6995 100644 --- a/sdk/core/azure-core-v2/src/main/java/com/azure/v2/core/http/policy/UserAgentPolicy.java +++ b/sdk/core/azure-core-v2/src/main/java/com/azure/v2/core/http/policy/UserAgentPolicy.java @@ -3,8 +3,6 @@ package com.azure.v2.core.http.policy; -import io.clientcore.core.http.pipeline.HttpPipelineOrder; -import io.clientcore.core.util.configuration.Configuration; import com.azure.v2.core.util.CoreUtils; import com.azure.v2.core.util.ServiceVersion; import com.azure.v2.core.util.UserAgentUtil; @@ -14,7 +12,8 @@ import io.clientcore.core.http.pipeline.HttpPipeline; import io.clientcore.core.http.pipeline.HttpPipelineNextPolicy; import io.clientcore.core.http.pipeline.HttpPipelinePolicy; -import io.clientcore.core.util.Context; +import io.clientcore.core.utils.Context; +import io.clientcore.core.utils.configuration.Configuration; /** * The {@code UserAgentPolicy} class is an implementation of the {@link HttpPipelinePolicy} interface. This policy is @@ -128,9 +127,4 @@ public Response process(HttpRequest httpRequest, HttpPipelineNextPolicy next) return next.process(); } - - @Override - public final HttpPipelineOrder getOrder() { - return HttpPipelineOrder.BEFORE_REDIRECT; - } } diff --git a/sdk/core/azure-core-v2/src/main/java/com/azure/v2/core/http/rest/PagedResponseBase.java b/sdk/core/azure-core-v2/src/main/java/com/azure/v2/core/http/rest/PagedResponseBase.java index a6b9831bd881..036e802ac96f 100644 --- a/sdk/core/azure-core-v2/src/main/java/com/azure/v2/core/http/rest/PagedResponseBase.java +++ b/sdk/core/azure-core-v2/src/main/java/com/azure/v2/core/http/rest/PagedResponseBase.java @@ -6,8 +6,8 @@ import io.clientcore.core.http.models.HttpHeaders; import io.clientcore.core.http.models.HttpRequest; import com.azure.v2.core.util.IterableStream; +import io.clientcore.core.models.binarydata.BinaryData; -import io.clientcore.core.util.binarydata.BinaryData; import java.util.List; /** diff --git a/sdk/core/azure-core-v2/src/main/java/com/azure/v2/core/http/rest/ResponseBase.java b/sdk/core/azure-core-v2/src/main/java/com/azure/v2/core/http/rest/ResponseBase.java index a1fa6d5031ba..ae2c6945d683 100644 --- a/sdk/core/azure-core-v2/src/main/java/com/azure/v2/core/http/rest/ResponseBase.java +++ b/sdk/core/azure-core-v2/src/main/java/com/azure/v2/core/http/rest/ResponseBase.java @@ -5,10 +5,10 @@ import io.clientcore.core.http.models.HttpHeaders; import io.clientcore.core.http.models.HttpRequest; import io.clientcore.core.http.models.Response; -import io.clientcore.core.util.binarydata.BinaryData; -import io.clientcore.core.util.binarydata.ByteArrayBinaryData; -import io.clientcore.core.util.binarydata.InputStreamBinaryData; -import io.clientcore.core.util.binarydata.StringBinaryData; +import io.clientcore.core.models.binarydata.BinaryData; +import io.clientcore.core.models.binarydata.ByteArrayBinaryData; +import io.clientcore.core.models.binarydata.InputStreamBinaryData; +import io.clientcore.core.models.binarydata.StringBinaryData; import java.io.IOException; diff --git a/sdk/core/azure-core-v2/src/main/java/com/azure/v2/core/implementation/AccessTokenCache.java b/sdk/core/azure-core-v2/src/main/java/com/azure/v2/core/implementation/AccessTokenCache.java index 1a0dc3b94022..1dd0bd5b338a 100644 --- a/sdk/core/azure-core-v2/src/main/java/com/azure/v2/core/implementation/AccessTokenCache.java +++ b/sdk/core/azure-core-v2/src/main/java/com/azure/v2/core/implementation/AccessTokenCache.java @@ -7,6 +7,9 @@ import com.azure.v2.core.credential.TokenCredential; import com.azure.v2.core.credential.TokenRequestContext; import io.clientcore.core.instrumentation.logging.ClientLogger; +import io.clientcore.core.instrumentation.logging.LogLevel; +import io.clientcore.core.instrumentation.logging.LoggingEvent; + import java.time.Duration; import java.time.OffsetDateTime; import java.util.Objects; @@ -117,7 +120,7 @@ private Supplier retrieveTokenSync(TokenRequestContext tokenRequest try { if (tokenRefresh != null) { AccessToken token = tokenRefresh.get(); - buildTokenRefreshLog(ClientLogger.LogLevel.INFORMATIONAL, cachedToken, now) + buildTokenRefreshLog(LogLevel.INFORMATIONAL, cachedToken, now) .log("Acquired a new access token."); OffsetDateTime nextTokenRefreshTime = OffsetDateTime.now().plus(REFRESH_DELAY); AccessTokenCacheInfo updatedInfo = new AccessTokenCacheInfo(token, nextTokenRefreshTime); @@ -127,7 +130,7 @@ private Supplier retrieveTokenSync(TokenRequestContext tokenRequest return fallback; } } catch (Throwable error) { - buildTokenRefreshLog(ClientLogger.LogLevel.ERROR, cachedToken, now) + buildTokenRefreshLog(LogLevel.ERROR, cachedToken, now) .log("Failed to acquire a new access token.", error); OffsetDateTime nextTokenRefreshTime = OffsetDateTime.now(); AccessTokenCacheInfo updatedInfo = new AccessTokenCacheInfo(cachedToken, nextTokenRefreshTime); @@ -150,9 +153,9 @@ private boolean checkIfForceRefreshRequired(TokenRequestContext tokenRequestCont && this.tokenRequestContext.getScopes().equals(tokenRequestContext.getScopes())); } - private static ClientLogger.LoggingEvent buildTokenRefreshLog(ClientLogger.LogLevel level, AccessToken cache, - OffsetDateTime now) { - ClientLogger.LoggingEvent logBuilder = LOGGER.atLevel(level); + private static LoggingEvent buildTokenRefreshLog(LogLevel level, AccessToken cache, + OffsetDateTime now) { + LoggingEvent logBuilder = LOGGER.atLevel(level); if (cache == null || !LOGGER.canLogAtLevel(level)) { return logBuilder; } diff --git a/sdk/core/azure-core-v2/src/main/java/com/azure/v2/core/implementation/http/UrlSanitizer.java b/sdk/core/azure-core-v2/src/main/java/com/azure/v2/core/implementation/http/UrlSanitizer.java index 799991ff4288..b9fbb4cc8658 100644 --- a/sdk/core/azure-core-v2/src/main/java/com/azure/v2/core/implementation/http/UrlSanitizer.java +++ b/sdk/core/azure-core-v2/src/main/java/com/azure/v2/core/implementation/http/UrlSanitizer.java @@ -4,7 +4,7 @@ package com.azure.v2.core.implementation.http; import com.azure.v2.core.util.CoreUtils; -import io.clientcore.core.util.UriBuilder; +import io.clientcore.core.utils.UriBuilder; import java.net.URI; import java.util.Collection; diff --git a/sdk/core/azure-core-v2/src/main/java/com/azure/v2/core/implementation/util/EnvironmentConfiguration.java b/sdk/core/azure-core-v2/src/main/java/com/azure/v2/core/implementation/util/EnvironmentConfiguration.java index b05171a17a78..646cf9f72e80 100644 --- a/sdk/core/azure-core-v2/src/main/java/com/azure/v2/core/implementation/util/EnvironmentConfiguration.java +++ b/sdk/core/azure-core-v2/src/main/java/com/azure/v2/core/implementation/util/EnvironmentConfiguration.java @@ -3,9 +3,9 @@ package com.azure.v2.core.implementation.util; -import io.clientcore.core.util.configuration.Configuration; +import io.clientcore.core.utils.configuration.Configuration; +import io.clientcore.core.utils.configuration.ConfigurationSource; -import io.clientcore.core.util.configuration.ConfigurationSource; import java.util.Arrays; import java.util.Collections; import java.util.HashMap; @@ -24,8 +24,8 @@ public class EnvironmentConfiguration { /* * Configurations that are loaded into the global configuration store when the application starts. */ - private static final List DEFAULT_CONFIGURATIONS = Arrays.asList(Configuration.PROPERTY_HTTP_PROXY, - Configuration.PROPERTY_HTTPS_PROXY, Configuration.PROPERTY_NO_PROXY); + private static final List DEFAULT_CONFIGURATIONS = Arrays.asList(Configuration.HTTP_PROXY, + Configuration.HTTPS_PROXY, Configuration.NO_PROXY); //Configuration.PROPERTY_IDENTITY_HEADER, Configuration.PROPERTY_IDENTITY_ENDPOINT, Configuration.PROPERTY_MSI_ENDPOINT, //Configuration.PROPERTY_MSI_SECRET, Configuration.PROPERTY_AZURE_SUBSCRIPTION_ID, //Configuration.PROPERTY_AZURE_USERNAME, Configuration.PROPERTY_AZURE_PASSWORD, @@ -71,7 +71,7 @@ public EnvironmentConfiguration(EnvironmentConfiguration original) { * @param environmentConfigurationSource mocked environment configuration source. */ public EnvironmentConfiguration(ConfigurationSource systemPropertiesConfigurationSource, - ConfigurationSource environmentConfigurationSource) { + ConfigurationSource environmentConfigurationSource) { this.explicitConfigurations = new ConcurrentHashMap<>(); if (environmentConfigurationSource == null) { diff --git a/sdk/core/azure-core-v2/src/main/java/com/azure/v2/core/util/CoreUtils.java b/sdk/core/azure-core-v2/src/main/java/com/azure/v2/core/util/CoreUtils.java index 748b3267eb71..613b552c7f04 100644 --- a/sdk/core/azure-core-v2/src/main/java/com/azure/v2/core/util/CoreUtils.java +++ b/sdk/core/azure-core-v2/src/main/java/com/azure/v2/core/util/CoreUtils.java @@ -4,7 +4,7 @@ package com.azure.v2.core.util; import io.clientcore.core.instrumentation.logging.ClientLogger; -import io.clientcore.core.util.configuration.Configuration; +import io.clientcore.core.utils.configuration.Configuration; import java.io.IOException; import java.io.InputStream; @@ -207,7 +207,7 @@ public static Map getProperties(String propertiesFileName) { * @return Either the environment configured default timeout, {@code defaultTimeoutMillis}, or 0. */ public static Duration getDefaultTimeoutFromEnvironment(Configuration configuration, String timeoutPropertyName, - Duration defaultTimeout, ClientLogger logger) { + Duration defaultTimeout, ClientLogger logger) { String environmentTimeout = configuration.get(timeoutPropertyName); // Environment wasn't configured with the timeout property. diff --git a/sdk/core/azure-core-v2/src/main/java/com/azure/v2/core/util/MetricsOptions.java b/sdk/core/azure-core-v2/src/main/java/com/azure/v2/core/util/MetricsOptions.java index 3490f27be243..160131175930 100644 --- a/sdk/core/azure-core-v2/src/main/java/com/azure/v2/core/util/MetricsOptions.java +++ b/sdk/core/azure-core-v2/src/main/java/com/azure/v2/core/util/MetricsOptions.java @@ -5,9 +5,9 @@ import com.azure.v2.core.util.metrics.Meter; import com.azure.v2.core.util.metrics.MeterProvider; -import io.clientcore.core.util.configuration.Configuration; -import io.clientcore.core.util.configuration.ConfigurationProperty; -import io.clientcore.core.util.configuration.ConfigurationPropertyBuilder; +import io.clientcore.core.utils.configuration.Configuration; +import io.clientcore.core.utils.configuration.ConfigurationProperty; +import io.clientcore.core.utils.configuration.ConfigurationPropertyBuilder; import static com.azure.v2.core.util.TracingOptions.getClassByName; diff --git a/sdk/core/azure-core-v2/src/main/java/com/azure/v2/core/util/TracingOptions.java b/sdk/core/azure-core-v2/src/main/java/com/azure/v2/core/util/TracingOptions.java index 45f8dc5c0a5c..966cc164f4a6 100644 --- a/sdk/core/azure-core-v2/src/main/java/com/azure/v2/core/util/TracingOptions.java +++ b/sdk/core/azure-core-v2/src/main/java/com/azure/v2/core/util/TracingOptions.java @@ -6,9 +6,9 @@ import com.azure.v2.core.util.tracing.Tracer; import com.azure.v2.core.util.tracing.TracerProvider; import io.clientcore.core.instrumentation.logging.ClientLogger; -import io.clientcore.core.util.configuration.Configuration; -import io.clientcore.core.util.configuration.ConfigurationProperty; -import io.clientcore.core.util.configuration.ConfigurationPropertyBuilder; +import io.clientcore.core.utils.configuration.Configuration; +import io.clientcore.core.utils.configuration.ConfigurationProperty; +import io.clientcore.core.utils.configuration.ConfigurationPropertyBuilder; import java.util.Objects; import java.util.Set; diff --git a/sdk/core/azure-core-v2/src/main/java/com/azure/v2/core/util/UserAgentUtil.java b/sdk/core/azure-core-v2/src/main/java/com/azure/v2/core/util/UserAgentUtil.java index 911e0f079976..7532f23b3124 100644 --- a/sdk/core/azure-core-v2/src/main/java/com/azure/v2/core/util/UserAgentUtil.java +++ b/sdk/core/azure-core-v2/src/main/java/com/azure/v2/core/util/UserAgentUtil.java @@ -3,7 +3,7 @@ package com.azure.v2.core.util; -import io.clientcore.core.util.configuration.Configuration; +import io.clientcore.core.utils.configuration.Configuration; /** * Utility for building user agent string for Azure client libraries as specified in the diff --git a/sdk/core/azure-core-v2/src/main/java/com/azure/v2/core/util/metrics/DoubleHistogram.java b/sdk/core/azure-core-v2/src/main/java/com/azure/v2/core/util/metrics/DoubleHistogram.java index e9fbadda7655..83e78784847c 100644 --- a/sdk/core/azure-core-v2/src/main/java/com/azure/v2/core/util/metrics/DoubleHistogram.java +++ b/sdk/core/azure-core-v2/src/main/java/com/azure/v2/core/util/metrics/DoubleHistogram.java @@ -3,8 +3,8 @@ package com.azure.v2.core.util.metrics; -import io.clientcore.core.util.Context; import com.azure.v2.core.util.TelemetryAttributes; +import io.clientcore.core.utils.Context; /** A histogram instrument that records {@code long} values. */ public interface DoubleHistogram { diff --git a/sdk/core/azure-core-v2/src/main/java/com/azure/v2/core/util/metrics/LongCounter.java b/sdk/core/azure-core-v2/src/main/java/com/azure/v2/core/util/metrics/LongCounter.java index 43e531ead891..17e5a6fc5624 100644 --- a/sdk/core/azure-core-v2/src/main/java/com/azure/v2/core/util/metrics/LongCounter.java +++ b/sdk/core/azure-core-v2/src/main/java/com/azure/v2/core/util/metrics/LongCounter.java @@ -3,8 +3,8 @@ package com.azure.v2.core.util.metrics; -import io.clientcore.core.util.Context; import com.azure.v2.core.util.TelemetryAttributes; +import io.clientcore.core.utils.Context; /** * A counter instrument that records {@code long} values. diff --git a/sdk/core/azure-core-v2/src/main/java/com/azure/v2/core/util/metrics/NoopMeter.java b/sdk/core/azure-core-v2/src/main/java/com/azure/v2/core/util/metrics/NoopMeter.java index 95bac460da08..349b0ec92b83 100644 --- a/sdk/core/azure-core-v2/src/main/java/com/azure/v2/core/util/metrics/NoopMeter.java +++ b/sdk/core/azure-core-v2/src/main/java/com/azure/v2/core/util/metrics/NoopMeter.java @@ -3,8 +3,8 @@ package com.azure.v2.core.util.metrics; -import io.clientcore.core.util.Context; import com.azure.v2.core.util.TelemetryAttributes; +import io.clientcore.core.utils.Context; import java.util.Map; import java.util.Objects; diff --git a/sdk/core/azure-core-v2/src/main/java/com/azure/v2/core/util/tracing/NoopTracer.java b/sdk/core/azure-core-v2/src/main/java/com/azure/v2/core/util/tracing/NoopTracer.java index a11fe0f887ae..811ea5db7c8d 100644 --- a/sdk/core/azure-core-v2/src/main/java/com/azure/v2/core/util/tracing/NoopTracer.java +++ b/sdk/core/azure-core-v2/src/main/java/com/azure/v2/core/util/tracing/NoopTracer.java @@ -3,7 +3,7 @@ package com.azure.v2.core.util.tracing; -import io.clientcore.core.util.Context; +import io.clientcore.core.utils.Context; import java.util.Objects; diff --git a/sdk/core/azure-core-v2/src/main/java/com/azure/v2/core/util/tracing/StartSpanOptions.java b/sdk/core/azure-core-v2/src/main/java/com/azure/v2/core/util/tracing/StartSpanOptions.java index ad16f4d636fe..594e98b497dd 100644 --- a/sdk/core/azure-core-v2/src/main/java/com/azure/v2/core/util/tracing/StartSpanOptions.java +++ b/sdk/core/azure-core-v2/src/main/java/com/azure/v2/core/util/tracing/StartSpanOptions.java @@ -3,7 +3,7 @@ package com.azure.v2.core.util.tracing; import com.azure.v2.core.annotation.Fluent; -import io.clientcore.core.util.Context; +import io.clientcore.core.utils.Context; import java.time.Instant; import java.util.ArrayList; diff --git a/sdk/core/azure-core-v2/src/main/java/com/azure/v2/core/util/tracing/Tracer.java b/sdk/core/azure-core-v2/src/main/java/com/azure/v2/core/util/tracing/Tracer.java index 26fc7094635c..5b3e9925f927 100644 --- a/sdk/core/azure-core-v2/src/main/java/com/azure/v2/core/util/tracing/Tracer.java +++ b/sdk/core/azure-core-v2/src/main/java/com/azure/v2/core/util/tracing/Tracer.java @@ -3,8 +3,8 @@ package com.azure.v2.core.util.tracing; -import io.clientcore.core.util.Context; import com.azure.v2.core.util.TracingOptions; +import io.clientcore.core.utils.Context; import java.time.Instant; import java.time.OffsetDateTime; diff --git a/sdk/core/azure-core-v2/src/main/java/com/azure/v2/core/util/tracing/TracerProxy.java b/sdk/core/azure-core-v2/src/main/java/com/azure/v2/core/util/tracing/TracerProxy.java index dd924276efea..5fcaf0213512 100644 --- a/sdk/core/azure-core-v2/src/main/java/com/azure/v2/core/util/tracing/TracerProxy.java +++ b/sdk/core/azure-core-v2/src/main/java/com/azure/v2/core/util/tracing/TracerProxy.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. package com.azure.v2.core.util.tracing; -import io.clientcore.core.util.Context; +import io.clientcore.core.utils.Context; /** * This class provides a means for all client libraries to augment the context information they have received from an diff --git a/sdk/core/azure-core-v2/src/main/java/com/azure/v2/core/util/tracing/TracingLink.java b/sdk/core/azure-core-v2/src/main/java/com/azure/v2/core/util/tracing/TracingLink.java index 5935801d4fb1..da41924429dc 100644 --- a/sdk/core/azure-core-v2/src/main/java/com/azure/v2/core/util/tracing/TracingLink.java +++ b/sdk/core/azure-core-v2/src/main/java/com/azure/v2/core/util/tracing/TracingLink.java @@ -4,7 +4,7 @@ package com.azure.v2.core.util.tracing; import com.azure.v2.core.annotation.Immutable; -import io.clientcore.core.util.Context; +import io.clientcore.core.utils.Context; import java.util.Map; diff --git a/sdk/core/azure-core-v2/src/main/java/com/azure/v2/core/util/tracing/Utils.java b/sdk/core/azure-core-v2/src/main/java/com/azure/v2/core/util/tracing/Utils.java index e9d5a609c56f..d3ad6bc44986 100644 --- a/sdk/core/azure-core-v2/src/main/java/com/azure/v2/core/util/tracing/Utils.java +++ b/sdk/core/azure-core-v2/src/main/java/com/azure/v2/core/util/tracing/Utils.java @@ -3,8 +3,8 @@ package com.azure.v2.core.util.tracing; -import io.clientcore.core.util.Context; import io.clientcore.core.instrumentation.logging.ClientLogger; +import io.clientcore.core.utils.Context; import static com.azure.v2.core.util.tracing.Tracer.ENTITY_PATH_KEY; import static com.azure.v2.core.util.tracing.Tracer.HOST_NAME_KEY; From f8aa582f69378bfc9f38aff4e88db28fba38d2e8 Mon Sep 17 00:00:00 2001 From: vcolin7 Date: Tue, 4 Mar 2025 16:05:31 -0800 Subject: [PATCH 24/26] Fixed the groupId for azure-storage-blob-v2 and added tags to other dependencies. --- sdk/storage/azure-storage-blob-stress-v2/pom.xml | 10 +++++----- sdk/storage/azure-storage-blob-v2/pom.xml | 6 +++--- sdk/storage/azure-storage-stress-v2/pom.xml | 4 ++-- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/sdk/storage/azure-storage-blob-stress-v2/pom.xml b/sdk/storage/azure-storage-blob-stress-v2/pom.xml index 38acd97e5917..694458b08fa2 100644 --- a/sdk/storage/azure-storage-blob-stress-v2/pom.xml +++ b/sdk/storage/azure-storage-blob-stress-v2/pom.xml @@ -50,19 +50,19 @@ - com.azure.v2 + com.azure azure-core-v2 - 1.0.0-beta.1 + 1.0.0-beta.1 io.clientcore http-okhttp3 - 1.0.0-beta.1 + 1.0.0-beta.1 - com.azure.v2 + com.azure azure-storage-blob-v2 - 1.0.0-beta.1 + 1.0.0-beta.1 com.azure.v2 diff --git a/sdk/storage/azure-storage-blob-v2/pom.xml b/sdk/storage/azure-storage-blob-v2/pom.xml index f3785ba0a2d4..74b8420b9338 100644 --- a/sdk/storage/azure-storage-blob-v2/pom.xml +++ b/sdk/storage/azure-storage-blob-v2/pom.xml @@ -9,7 +9,7 @@ ../../parents/azure-client-sdk-parent-v2 - com.azure.v2 + com.azure azure-storage-blob-v2 1.0.0-beta.1 @@ -31,12 +31,12 @@ io.clientcore core - 1.0.0-beta.5 + 1.0.0-beta.5 com.azure azure-core-v2 - 1.0.0-beta.1 + 1.0.0-beta.1 org.junit.jupiter diff --git a/sdk/storage/azure-storage-stress-v2/pom.xml b/sdk/storage/azure-storage-stress-v2/pom.xml index 17dce71273e4..c5e78540333b 100644 --- a/sdk/storage/azure-storage-stress-v2/pom.xml +++ b/sdk/storage/azure-storage-stress-v2/pom.xml @@ -28,9 +28,9 @@ 1.3.14 - com.azure.v2 + com.azure azure-core-v2 - 1.0.0-beta.1 + 1.0.0-beta.1 com.azure From 2a72f92b91cc344d1fe4323dfe3c4da61fe4d155 Mon Sep 17 00:00:00 2001 From: vcolin7 Date: Tue, 4 Mar 2025 16:06:25 -0800 Subject: [PATCH 25/26] Updated azure-storage-stress-v2 and azure-storage-blob-stress-v2 to use the latest release of clientcore. --- .../azure/v2/storage/blob/stress/BlobScenarioBaseV2.java | 6 +++--- .../com/azure/v2/storage/blob/stress/DownloadContentV2.java | 4 ++-- .../v2/storage/blob/stress/utils/OriginalContentV2.java | 4 ++-- .../main/java/com/azure/v2/storage/stress/ContentInfo.java | 2 +- .../java/com/azure/v2/storage/stress/CrcInputStream.java | 2 +- .../azure/v2/storage/stress/FaultInjectingHttpPolicy.java | 4 ++-- .../com/azure/v2/storage/stress/RepeatingInputStream.java | 2 +- .../com/azure/v2/storage/stress/StorageStressOptions.java | 2 +- 8 files changed, 13 insertions(+), 13 deletions(-) diff --git a/sdk/storage/azure-storage-blob-stress-v2/src/main/java/com/azure/v2/storage/blob/stress/BlobScenarioBaseV2.java b/sdk/storage/azure-storage-blob-stress-v2/src/main/java/com/azure/v2/storage/blob/stress/BlobScenarioBaseV2.java index af3e1758cb09..a6e432e5808b 100644 --- a/sdk/storage/azure-storage-blob-stress-v2/src/main/java/com/azure/v2/storage/blob/stress/BlobScenarioBaseV2.java +++ b/sdk/storage/azure-storage-blob-stress-v2/src/main/java/com/azure/v2/storage/blob/stress/BlobScenarioBaseV2.java @@ -12,8 +12,8 @@ import com.azure.v2.storage.stress.StorageStressOptions; import com.azure.v2.storage.stress.TelemetryHelper; import io.clientcore.core.http.models.HttpHeaderName; -import io.clientcore.core.http.models.HttpInstrumentationOptions; -import io.clientcore.core.util.Context; +import io.clientcore.core.http.pipeline.HttpInstrumentationOptions; +import io.clientcore.core.utils.Context; import reactor.core.publisher.Mono; import java.time.Instant; @@ -112,7 +112,7 @@ protected String generateBlobName() { protected static HttpInstrumentationOptions getInstrumentationOptions() { return new HttpInstrumentationOptions() - .setHttpLogLevel(HttpInstrumentationOptions.HttpLogDetailLevel.HEADERS) + .setHttpLogLevel(HttpInstrumentationOptions.HttpLogLevel.HEADERS) .addAllowedHeaderName(HttpHeaderName.fromString("x-ms-faultinjector-response-option")) .addAllowedHeaderName(HttpHeaderName.CONTENT_RANGE) .addAllowedHeaderName(HttpHeaderName.ACCEPT_RANGES) diff --git a/sdk/storage/azure-storage-blob-stress-v2/src/main/java/com/azure/v2/storage/blob/stress/DownloadContentV2.java b/sdk/storage/azure-storage-blob-stress-v2/src/main/java/com/azure/v2/storage/blob/stress/DownloadContentV2.java index afcbcaf615e6..338748c64207 100644 --- a/sdk/storage/azure-storage-blob-stress-v2/src/main/java/com/azure/v2/storage/blob/stress/DownloadContentV2.java +++ b/sdk/storage/azure-storage-blob-stress-v2/src/main/java/com/azure/v2/storage/blob/stress/DownloadContentV2.java @@ -7,8 +7,8 @@ import com.azure.v2.storage.blob.BlockBlobClient; import com.azure.v2.storage.blob.stress.utils.OriginalContentV2; import com.azure.v2.storage.stress.StorageStressOptions; -import io.clientcore.core.util.Context; -import io.clientcore.core.util.binarydata.BinaryData; +import io.clientcore.core.models.binarydata.BinaryData; +import io.clientcore.core.utils.Context; import reactor.core.publisher.Mono; public class DownloadContentV2 extends BlobScenarioBaseV2 { diff --git a/sdk/storage/azure-storage-blob-stress-v2/src/main/java/com/azure/v2/storage/blob/stress/utils/OriginalContentV2.java b/sdk/storage/azure-storage-blob-stress-v2/src/main/java/com/azure/v2/storage/blob/stress/utils/OriginalContentV2.java index d429482276fa..d961b1daeec3 100644 --- a/sdk/storage/azure-storage-blob-stress-v2/src/main/java/com/azure/v2/storage/blob/stress/utils/OriginalContentV2.java +++ b/sdk/storage/azure-storage-blob-stress-v2/src/main/java/com/azure/v2/storage/blob/stress/utils/OriginalContentV2.java @@ -10,8 +10,8 @@ import com.azure.v2.storage.stress.ContentMismatchException; import com.azure.v2.storage.stress.CrcInputStream; import io.clientcore.core.instrumentation.logging.ClientLogger; -import io.clientcore.core.util.Context; -import io.clientcore.core.util.binarydata.BinaryData; +import io.clientcore.core.models.binarydata.BinaryData; +import io.clientcore.core.utils.Context; import java.nio.ByteBuffer; import java.util.Base64; diff --git a/sdk/storage/azure-storage-stress-v2/src/main/java/com/azure/v2/storage/stress/ContentInfo.java b/sdk/storage/azure-storage-stress-v2/src/main/java/com/azure/v2/storage/stress/ContentInfo.java index 62de9fc22d43..442b675e2736 100644 --- a/sdk/storage/azure-storage-stress-v2/src/main/java/com/azure/v2/storage/stress/ContentInfo.java +++ b/sdk/storage/azure-storage-stress-v2/src/main/java/com/azure/v2/storage/stress/ContentInfo.java @@ -3,7 +3,7 @@ package com.azure.v2.storage.stress; -import io.clientcore.core.util.binarydata.BinaryData; +import io.clientcore.core.models.binarydata.BinaryData; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; diff --git a/sdk/storage/azure-storage-stress-v2/src/main/java/com/azure/v2/storage/stress/CrcInputStream.java b/sdk/storage/azure-storage-stress-v2/src/main/java/com/azure/v2/storage/stress/CrcInputStream.java index cd7ffaf8d085..2447be41fe89 100644 --- a/sdk/storage/azure-storage-stress-v2/src/main/java/com/azure/v2/storage/stress/CrcInputStream.java +++ b/sdk/storage/azure-storage-stress-v2/src/main/java/com/azure/v2/storage/stress/CrcInputStream.java @@ -6,7 +6,7 @@ import com.azure.core.exception.UnexpectedLengthException; import com.azure.core.util.FluxUtil; import io.clientcore.core.instrumentation.logging.ClientLogger; -import io.clientcore.core.util.binarydata.BinaryData; +import io.clientcore.core.models.binarydata.BinaryData; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; import reactor.core.publisher.Sinks; diff --git a/sdk/storage/azure-storage-stress-v2/src/main/java/com/azure/v2/storage/stress/FaultInjectingHttpPolicy.java b/sdk/storage/azure-storage-stress-v2/src/main/java/com/azure/v2/storage/stress/FaultInjectingHttpPolicy.java index 5ccc12c3c913..efa99a648319 100644 --- a/sdk/storage/azure-storage-stress-v2/src/main/java/com/azure/v2/storage/stress/FaultInjectingHttpPolicy.java +++ b/sdk/storage/azure-storage-stress-v2/src/main/java/com/azure/v2/storage/stress/FaultInjectingHttpPolicy.java @@ -5,12 +5,12 @@ import io.clientcore.core.http.models.HttpHeaderName; import io.clientcore.core.http.models.HttpRequest; -import io.clientcore.core.http.models.HttpResponse; import io.clientcore.core.http.models.Response; import io.clientcore.core.http.pipeline.HttpPipelineNextPolicy; import io.clientcore.core.http.pipeline.HttpPipelinePolicy; +import io.clientcore.core.implementation.http.HttpResponse; import io.clientcore.core.instrumentation.logging.ClientLogger; -import io.clientcore.core.util.UriBuilder; +import io.clientcore.core.utils.UriBuilder; import reactor.util.function.Tuple2; import reactor.util.function.Tuples; diff --git a/sdk/storage/azure-storage-stress-v2/src/main/java/com/azure/v2/storage/stress/RepeatingInputStream.java b/sdk/storage/azure-storage-stress-v2/src/main/java/com/azure/v2/storage/stress/RepeatingInputStream.java index 41ae17a6813a..8dc90578c2b9 100644 --- a/sdk/storage/azure-storage-stress-v2/src/main/java/com/azure/v2/storage/stress/RepeatingInputStream.java +++ b/sdk/storage/azure-storage-stress-v2/src/main/java/com/azure/v2/storage/stress/RepeatingInputStream.java @@ -3,7 +3,7 @@ package com.azure.v2.storage.stress; -import io.clientcore.core.util.binarydata.BinaryData; +import io.clientcore.core.models.binarydata.BinaryData; import java.io.IOException; import java.io.InputStream; diff --git a/sdk/storage/azure-storage-stress-v2/src/main/java/com/azure/v2/storage/stress/StorageStressOptions.java b/sdk/storage/azure-storage-stress-v2/src/main/java/com/azure/v2/storage/stress/StorageStressOptions.java index 87caaef61d05..991cf99d7e13 100644 --- a/sdk/storage/azure-storage-stress-v2/src/main/java/com/azure/v2/storage/stress/StorageStressOptions.java +++ b/sdk/storage/azure-storage-stress-v2/src/main/java/com/azure/v2/storage/stress/StorageStressOptions.java @@ -5,7 +5,7 @@ import com.azure.perf.test.core.PerfStressOptions; import com.beust.jcommander.Parameter; -import io.clientcore.core.util.configuration.Configuration; +import io.clientcore.core.utils.configuration.Configuration; public class StorageStressOptions extends PerfStressOptions { @Parameter(names = { "--downloadFaults" }, description = "Enable fault injection for downloads") From df7e6f1b0d55b16dc31851da975e8357c709ddc7 Mon Sep 17 00:00:00 2001 From: vcolin7 Date: Tue, 4 Mar 2025 17:43:27 -0800 Subject: [PATCH 26/26] Updated Dockerfile --- sdk/storage/azure-storage-blob-stress-v2/Dockerfile | 1 - 1 file changed, 1 deletion(-) diff --git a/sdk/storage/azure-storage-blob-stress-v2/Dockerfile b/sdk/storage/azure-storage-blob-stress-v2/Dockerfile index 637df7b0919e..ecc03058326f 100644 --- a/sdk/storage/azure-storage-blob-stress-v2/Dockerfile +++ b/sdk/storage/azure-storage-blob-stress-v2/Dockerfile @@ -21,7 +21,6 @@ RUN --mount=type=cache,target=/root/.m2 \ mvn -f /stress/sdk/parents/azure-perf-test-parent/pom.xml clean install ${SKIP_CHECKS} && \ mvn -f /stress/common/perf-test-core/pom.xml clean install ${SKIP_CHECKS} && \ mvn -f /stress/sdk/tools/pom.xml clean install ${SKIP_CHECKS} && \ - mvn -f /stress/sdk/clientcore/core/pom.xml clean install ${SKIP_CHECKS} && \ mvn -f /stress/sdk/clientcore/http-okhttp3/pom.xml clean install ${SKIP_CHECKS} && \ mvn -f /stress/sdk/core/azure-core-v2/pom.xml clean install ${SKIP_CHECKS} && \ mvn -f /stress/sdk/storage/azure-storage-blob/pom.xml clean install ${SKIP_CHECKS} && \