From 8456f53705d098aa6eb279b514150379e935b5b6 Mon Sep 17 00:00:00 2001 From: gapra Date: Tue, 18 May 2021 15:56:25 -0700 Subject: [PATCH 1/3] Updated to latest version of blob swagger, ability to generated off autorest v4.0.28 --- .../blob/implementation/AppendBlobsImpl.java | 32 +- .../AzureBlobStorageImplBuilder.java | 2 +- .../blob/implementation/BlobsImpl.java | 266 ++++- .../blob/implementation/BlockBlobsImpl.java | 56 +- .../blob/implementation/ContainersImpl.java | 82 +- .../blob/implementation/PageBlobsImpl.java | 57 +- .../blob/implementation/ServicesImpl.java | 37 +- .../models/BlobImmutabilityPolicyMode.java | 50 + .../models/BlobItemPropertiesInternal.java | 85 ++ .../BlobsDeleteImmutabilityPolicyHeaders.java | 127 ++ ...BlobsDeleteImmutabilityPolicyResponse.java | 31 + .../models/BlobsDownloadHeaders.java | 85 ++ .../models/BlobsGetPropertiesHeaders.java | 1020 +++++++++-------- .../BlobsSetImmutabilityPolicyHeaders.java | 188 +++ .../BlobsSetImmutabilityPolicyResponse.java | 30 + .../models/BlobsSetLegalHoldHeaders.java | 153 +++ .../models/BlobsSetLegalHoldResponse.java | 26 + .../ContainersGetPropertiesHeaders.java | 29 + .../models/BlobContainerEncryptionScope.java | 7 +- .../models/BlobContainerItemProperties.java | 29 + .../storage/blob/models/BlobErrorCode.java | 4 + .../storage/blob/models/BlobHttpHeaders.java | 1 + .../blob/models/BlobServiceProperties.java | 5 +- .../azure/storage/blob/models/CpkInfo.java | 1 + .../blob/models/ListBlobsIncludeItem.java | 8 +- .../azure-storage-blob/swagger/README.md | 2 +- .../azure-storage-blob/swagger/pom.xml | 2 +- .../BlobStorageCustomization.java | 3 +- 28 files changed, 1818 insertions(+), 600 deletions(-) create mode 100644 sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobImmutabilityPolicyMode.java create mode 100644 sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobsDeleteImmutabilityPolicyHeaders.java create mode 100644 sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobsDeleteImmutabilityPolicyResponse.java create mode 100644 sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobsSetImmutabilityPolicyHeaders.java create mode 100644 sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobsSetImmutabilityPolicyResponse.java create mode 100644 sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobsSetLegalHoldHeaders.java create mode 100644 sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobsSetLegalHoldResponse.java diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/AppendBlobsImpl.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/AppendBlobsImpl.java index 9c2cd6534773..4759bf6ac67d 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/AppendBlobsImpl.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/AppendBlobsImpl.java @@ -24,6 +24,7 @@ import com.azure.storage.blob.implementation.models.AppendBlobsAppendBlockResponse; import com.azure.storage.blob.implementation.models.AppendBlobsCreateResponse; import com.azure.storage.blob.implementation.models.AppendBlobsSealResponse; +import com.azure.storage.blob.implementation.models.BlobImmutabilityPolicyMode; import com.azure.storage.blob.implementation.models.EncryptionScope; import com.azure.storage.blob.implementation.models.StorageErrorException; import com.azure.storage.blob.models.BlobHttpHeaders; @@ -63,8 +64,8 @@ public final class AppendBlobsImpl { @ServiceInterface(name = "AzureBlobStorageAppe") public interface AppendBlobsService { @Put("/{containerName}/{blob}") - @ExpectedResponses({201}) @UnexpectedResponseExceptionType(com.azure.storage.blob.models.BlobStorageException.class) + @ExpectedResponses({201}) Mono create( @HostParam("url") String url, @HeaderParam("x-ms-blob-type") String blobType, @@ -92,14 +93,18 @@ Mono create( @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, @HeaderParam("x-ms-tags") String blobTagsString, + @HeaderParam("x-ms-immutability-policy-until-date") DateTimeRfc1123 immutabilityPolicyExpiry, + @HeaderParam("x-ms-immutability-policy-mode") BlobImmutabilityPolicyMode immutabilityPolicyMode, + @HeaderParam("x-ms-legal-hold") Boolean legalHold, @HeaderParam("Accept") String accept, Context context); @Put("/{containerName}/{blob}") @ExpectedResponses({201}) - @UnexpectedResponseExceptionType(com.azure.storage.blob.models.BlobStorageException.class) Mono appendBlock( - @HostParam("url") String url, + @UnexpectedResponseExceptionType(com.azure.storage.blob.models.BlobStorageException.class) + @HostParam("url") + String url, @QueryParam("comp") String comp, @PathParam("containerName") String containerName, @PathParam("blob") String blob, @@ -127,9 +132,10 @@ Mono appendBlock( @Put("/{containerName}/{blob}") @ExpectedResponses({201}) - @UnexpectedResponseExceptionType(com.azure.storage.blob.models.BlobStorageException.class) Mono appendBlockFromUrl( - @HostParam("url") String url, + @UnexpectedResponseExceptionType(com.azure.storage.blob.models.BlobStorageException.class) + @HostParam("url") + String url, @QueryParam("comp") String comp, @PathParam("containerName") String containerName, @PathParam("blob") String blob, @@ -163,9 +169,10 @@ Mono appendBlockFromUrl( @Put("/{containerName}/{blob}") @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(com.azure.storage.blob.models.BlobStorageException.class) Mono seal( - @HostParam("url") String url, + @UnexpectedResponseExceptionType(com.azure.storage.blob.models.BlobStorageException.class) + @HostParam("url") + String url, @QueryParam("comp") String comp, @PathParam("containerName") String containerName, @PathParam("blob") String blob, @@ -208,6 +215,9 @@ Mono seal( * @param requestId Provides a 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 encryptionScope Parameter group. @@ -232,6 +242,9 @@ public Mono createWithResponseAsync( String ifTags, String requestId, String blobTagsString, + OffsetDateTime immutabilityPolicyExpiry, + BlobImmutabilityPolicyMode immutabilityPolicyMode, + Boolean legalHold, BlobHttpHeaders blobHttpHeaders, CpkInfo cpkInfo, EncryptionScope encryptionScope, @@ -293,6 +306,8 @@ public Mono createWithResponseAsync( ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); DateTimeRfc1123 ifUnmodifiedSinceConverted = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); + DateTimeRfc1123 immutabilityPolicyExpiryConverted = + immutabilityPolicyExpiry == null ? null : new DateTimeRfc1123(immutabilityPolicyExpiry); return service.create( this.client.getUrl(), blobType, @@ -320,6 +335,9 @@ public Mono createWithResponseAsync( this.client.getVersion(), requestId, blobTagsString, + immutabilityPolicyExpiryConverted, + immutabilityPolicyMode, + legalHold, accept, context); } diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/AzureBlobStorageImplBuilder.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/AzureBlobStorageImplBuilder.java index 7b13a035a324..000608645518 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/AzureBlobStorageImplBuilder.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/AzureBlobStorageImplBuilder.java @@ -208,7 +208,7 @@ public AzureBlobStorageImplBuilder addPolicy(HttpPipelinePolicy customPolicy) { */ public AzureBlobStorageImpl buildClient() { if (version == null) { - this.version = "2020-08-04"; + this.version = "2020-10-02"; } if (pipeline == null) { this.pipeline = createHttpPipeline(); diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/BlobsImpl.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/BlobsImpl.java index 20524fc11ee5..81c56f9a050b 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/BlobsImpl.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/BlobsImpl.java @@ -28,6 +28,7 @@ import com.azure.core.util.DateTimeRfc1123; import com.azure.storage.blob.implementation.models.BlobDeleteType; import com.azure.storage.blob.implementation.models.BlobExpiryOptions; +import com.azure.storage.blob.implementation.models.BlobImmutabilityPolicyMode; import com.azure.storage.blob.implementation.models.BlobTags; import com.azure.storage.blob.implementation.models.BlobsAbortCopyFromURLResponse; import com.azure.storage.blob.implementation.models.BlobsAcquireLeaseResponse; @@ -35,6 +36,7 @@ import com.azure.storage.blob.implementation.models.BlobsChangeLeaseResponse; import com.azure.storage.blob.implementation.models.BlobsCopyFromURLResponse; import com.azure.storage.blob.implementation.models.BlobsCreateSnapshotResponse; +import com.azure.storage.blob.implementation.models.BlobsDeleteImmutabilityPolicyResponse; import com.azure.storage.blob.implementation.models.BlobsDeleteResponse; import com.azure.storage.blob.implementation.models.BlobsGetAccessControlResponse; import com.azure.storage.blob.implementation.models.BlobsGetAccountInfoResponse; @@ -46,6 +48,8 @@ import com.azure.storage.blob.implementation.models.BlobsSetAccessControlResponse; import com.azure.storage.blob.implementation.models.BlobsSetExpiryResponse; import com.azure.storage.blob.implementation.models.BlobsSetHttpHeadersResponse; +import com.azure.storage.blob.implementation.models.BlobsSetImmutabilityPolicyResponse; +import com.azure.storage.blob.implementation.models.BlobsSetLegalHoldResponse; import com.azure.storage.blob.implementation.models.BlobsSetMetadataResponse; import com.azure.storage.blob.implementation.models.BlobsSetTagsResponse; import com.azure.storage.blob.implementation.models.BlobsSetTierResponse; @@ -94,8 +98,8 @@ public final class BlobsImpl { @ServiceInterface(name = "AzureBlobStorageBlob") public interface BlobsService { @Get("/{containerName}/{blob}") - @ExpectedResponses({200, 206}) @UnexpectedResponseExceptionType(com.azure.storage.blob.models.BlobStorageException.class) + @ExpectedResponses({200, 206}) Mono download( @HostParam("url") String url, @PathParam("containerName") String containerName, @@ -122,9 +126,10 @@ Mono download( @Head("/{containerName}/{blob}") @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(com.azure.storage.blob.models.BlobStorageException.class) Mono getProperties( - @HostParam("url") String url, + @UnexpectedResponseExceptionType(com.azure.storage.blob.models.BlobStorageException.class) + @HostParam("url") + String url, @PathParam("containerName") String containerName, @PathParam("blob") String blob, @QueryParam("snapshot") String snapshot, @@ -146,9 +151,10 @@ Mono getProperties( @Delete("/{containerName}/{blob}") @ExpectedResponses({202}) - @UnexpectedResponseExceptionType(com.azure.storage.blob.models.BlobStorageException.class) Mono delete( - @HostParam("url") String url, + @UnexpectedResponseExceptionType(com.azure.storage.blob.models.BlobStorageException.class) + @HostParam("url") + String url, @PathParam("containerName") String containerName, @PathParam("blob") String blob, @QueryParam("snapshot") String snapshot, @@ -244,9 +250,10 @@ Mono rename( @Put("/{containerName}/{blob}") @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(com.azure.storage.blob.models.BlobStorageException.class) Mono undelete( - @HostParam("url") String url, + @UnexpectedResponseExceptionType(com.azure.storage.blob.models.BlobStorageException.class) + @HostParam("url") + String url, @QueryParam("comp") String comp, @PathParam("containerName") String containerName, @PathParam("blob") String blob, @@ -258,9 +265,10 @@ Mono undelete( @Put("/{containerName}/{blob}") @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(com.azure.storage.blob.models.BlobStorageException.class) Mono setExpiry( - @HostParam("url") String url, + @UnexpectedResponseExceptionType(com.azure.storage.blob.models.BlobStorageException.class) + @HostParam("url") + String url, @QueryParam("comp") String comp, @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-version") String version, @@ -272,9 +280,10 @@ Mono setExpiry( @Put("/{containerName}/{blob}") @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(com.azure.storage.blob.models.BlobStorageException.class) Mono setHttpHeaders( - @HostParam("url") String url, + @UnexpectedResponseExceptionType(com.azure.storage.blob.models.BlobStorageException.class) + @HostParam("url") + String url, @QueryParam("comp") String comp, @PathParam("containerName") String containerName, @PathParam("blob") String blob, @@ -298,10 +307,51 @@ Mono setHttpHeaders( @Put("/{containerName}/{blob}") @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(com.azure.storage.blob.models.BlobStorageException.class) - Mono setMetadata( + @UnexpectedResponseExceptionType(StorageErrorException.class) + Mono setImmutabilityPolicy( + @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, + @HeaderParam("If-Unmodified-Since") DateTimeRfc1123 ifUnmodifiedSince, + @HeaderParam("x-ms-immutability-policy-until-date") DateTimeRfc1123 immutabilityPolicyExpiry, + @HeaderParam("x-ms-immutability-policy-mode") BlobImmutabilityPolicyMode immutabilityPolicyMode, + @HeaderParam("Accept") String accept, + Context context); + + @Delete("/{containerName}/{blob}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(StorageErrorException.class) + Mono deleteImmutabilityPolicy( + @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, + @HeaderParam("Accept") String accept, + Context context); + + @Put("/{containerName}/{blob}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(StorageErrorException.class) + Mono setLegalHold( @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, + @HeaderParam("x-ms-legal-hold") boolean legalHold, + @HeaderParam("Accept") String accept, + Context context); + + @Put("/{containerName}/{blob}") + @ExpectedResponses({200}) + Mono setMetadata( + @UnexpectedResponseExceptionType(com.azure.storage.blob.models.BlobStorageException.class) + @HostParam("url") + String url, + @QueryParam("comp") String comp, @PathParam("containerName") String containerName, @PathParam("blob") String blob, @QueryParam("timeout") Integer timeout, @@ -323,9 +373,10 @@ Mono setMetadata( @Put("/{containerName}/{blob}") @ExpectedResponses({201}) - @UnexpectedResponseExceptionType(com.azure.storage.blob.models.BlobStorageException.class) Mono acquireLease( - @HostParam("url") String url, + @UnexpectedResponseExceptionType(com.azure.storage.blob.models.BlobStorageException.class) + @HostParam("url") + String url, @QueryParam("comp") String comp, @HeaderParam("x-ms-lease-action") String action, @PathParam("containerName") String containerName, @@ -345,9 +396,10 @@ Mono acquireLease( @Put("/{containerName}/{blob}") @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(com.azure.storage.blob.models.BlobStorageException.class) Mono releaseLease( - @HostParam("url") String url, + @UnexpectedResponseExceptionType(com.azure.storage.blob.models.BlobStorageException.class) + @HostParam("url") + String url, @QueryParam("comp") String comp, @HeaderParam("x-ms-lease-action") String action, @PathParam("containerName") String containerName, @@ -367,9 +419,10 @@ Mono releaseLease( @Put("/{containerName}/{blob}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(com.azure.storage.blob.models.BlobStorageException.class) - @UnexpectedResponseExceptionType(com.azure.storage.blob.models.BlobStorageException.class) Mono renewLease( - @HostParam("url") String url, + @UnexpectedResponseExceptionType(com.azure.storage.blob.models.BlobStorageException.class) + @HostParam("url") + String url, @QueryParam("comp") String comp, @HeaderParam("x-ms-lease-action") String action, @PathParam("containerName") String containerName, @@ -389,9 +442,10 @@ Mono renewLease( @Put("/{containerName}/{blob}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(com.azure.storage.blob.models.BlobStorageException.class) - @UnexpectedResponseExceptionType(com.azure.storage.blob.models.BlobStorageException.class) Mono changeLease( - @HostParam("url") String url, + @UnexpectedResponseExceptionType(com.azure.storage.blob.models.BlobStorageException.class) + @HostParam("url") + String url, @QueryParam("comp") String comp, @HeaderParam("x-ms-lease-action") String action, @PathParam("containerName") String containerName, @@ -411,9 +465,10 @@ Mono changeLease( @Put("/{containerName}/{blob}") @ExpectedResponses({202}) - @UnexpectedResponseExceptionType(com.azure.storage.blob.models.BlobStorageException.class) Mono breakLease( - @HostParam("url") String url, + @UnexpectedResponseExceptionType(com.azure.storage.blob.models.BlobStorageException.class) + @HostParam("url") + String url, @QueryParam("comp") String comp, @HeaderParam("x-ms-lease-action") String action, @PathParam("containerName") String containerName, @@ -432,9 +487,10 @@ Mono breakLease( @Put("/{containerName}/{blob}") @ExpectedResponses({201}) - @UnexpectedResponseExceptionType(com.azure.storage.blob.models.BlobStorageException.class) Mono createSnapshot( - @HostParam("url") String url, + @UnexpectedResponseExceptionType(com.azure.storage.blob.models.BlobStorageException.class) + @HostParam("url") + String url, @QueryParam("comp") String comp, @PathParam("containerName") String containerName, @PathParam("blob") String blob, @@ -457,9 +513,10 @@ Mono createSnapshot( @Put("/{containerName}/{blob}") @ExpectedResponses({202}) - @UnexpectedResponseExceptionType(com.azure.storage.blob.models.BlobStorageException.class) Mono startCopyFromURL( - @HostParam("url") String url, + @UnexpectedResponseExceptionType(com.azure.storage.blob.models.BlobStorageException.class) + @HostParam("url") + String url, @PathParam("containerName") String containerName, @PathParam("blob") String blob, @QueryParam("timeout") Integer timeout, @@ -482,14 +539,18 @@ Mono startCopyFromURL( @HeaderParam("x-ms-client-request-id") String requestId, @HeaderParam("x-ms-tags") String blobTagsString, @HeaderParam("x-ms-seal-blob") Boolean sealBlob, + @HeaderParam("x-ms-immutability-policy-until-date") DateTimeRfc1123 immutabilityPolicyExpiry, + @HeaderParam("x-ms-immutability-policy-mode") BlobImmutabilityPolicyMode immutabilityPolicyMode, + @HeaderParam("x-ms-legal-hold") Boolean legalHold, @HeaderParam("Accept") String accept, Context context); @Put("/{containerName}/{blob}") @ExpectedResponses({202}) - @UnexpectedResponseExceptionType(com.azure.storage.blob.models.BlobStorageException.class) Mono copyFromURL( - @HostParam("url") String url, + @UnexpectedResponseExceptionType(com.azure.storage.blob.models.BlobStorageException.class) + @HostParam("url") + String url, @HeaderParam("x-ms-requires-sync") String xMsRequiresSync, @PathParam("containerName") String containerName, @PathParam("blob") String blob, @@ -511,14 +572,18 @@ Mono copyFromURL( @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("Accept") String accept, Context context); @Put("/{containerName}/{blob}") @ExpectedResponses({204}) - @UnexpectedResponseExceptionType(com.azure.storage.blob.models.BlobStorageException.class) Mono abortCopyFromURL( - @HostParam("url") String url, + @UnexpectedResponseExceptionType(com.azure.storage.blob.models.BlobStorageException.class) + @HostParam("url") + String url, @QueryParam("comp") String comp, @HeaderParam("x-ms-copy-action") String copyActionAbortConstant, @PathParam("containerName") String containerName, @@ -533,9 +598,10 @@ Mono abortCopyFromURL( @Put("/{containerName}/{blob}") @ExpectedResponses({200, 202}) - @UnexpectedResponseExceptionType(com.azure.storage.blob.models.BlobStorageException.class) Mono setTier( - @HostParam("url") String url, + @UnexpectedResponseExceptionType(com.azure.storage.blob.models.BlobStorageException.class) + @HostParam("url") + String url, @QueryParam("comp") String comp, @PathParam("containerName") String containerName, @PathParam("blob") String blob, @@ -553,9 +619,10 @@ Mono setTier( @Get("/{containerName}/{blob}") @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(com.azure.storage.blob.models.BlobStorageException.class) Mono getAccountInfo( - @HostParam("url") String url, + @UnexpectedResponseExceptionType(com.azure.storage.blob.models.BlobStorageException.class) + @HostParam("url") + String url, @QueryParam("restype") String restype, @QueryParam("comp") String comp, @PathParam("containerName") String containerName, @@ -566,9 +633,10 @@ Mono getAccountInfo( @Post("/{containerName}/{blob}") @ExpectedResponses({200, 206}) - @UnexpectedResponseExceptionType(com.azure.storage.blob.models.BlobStorageException.class) Mono query( - @HostParam("url") String url, + @UnexpectedResponseExceptionType(com.azure.storage.blob.models.BlobStorageException.class) + @HostParam("url") + String url, @QueryParam("comp") String comp, @PathParam("containerName") String containerName, @PathParam("blob") String blob, @@ -591,9 +659,10 @@ Mono query( @Get("/{containerName}/{blob}") @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(com.azure.storage.blob.models.BlobStorageException.class) Mono getTags( - @HostParam("url") String url, + @UnexpectedResponseExceptionType(com.azure.storage.blob.models.BlobStorageException.class) + @HostParam("url") + String url, @QueryParam("comp") String comp, @PathParam("containerName") String containerName, @PathParam("blob") String blob, @@ -609,9 +678,10 @@ Mono getTags( @Put("/{containerName}/{blob}") @ExpectedResponses({204}) - @UnexpectedResponseExceptionType(com.azure.storage.blob.models.BlobStorageException.class) Mono setTags( - @HostParam("url") String url, + @UnexpectedResponseExceptionType(com.azure.storage.blob.models.BlobStorageException.class) + @HostParam("url") + String url, @QueryParam("comp") String comp, @PathParam("containerName") String containerName, @PathParam("blob") String blob, @@ -1342,6 +1412,98 @@ public Mono setHttpHeadersWithResponseAsync( context); } + /** + * The Set Immutability Policy operation sets the immutability policy 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 ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since + * the specified date/time. + * @param immutabilityPolicyExpiry Specifies the date time when the blobs immutability policy is set to expire. + * @param immutabilityPolicyMode Specifies the immutability policy mode to set on the blob. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws StorageErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono setImmutabilityPolicyWithResponseAsync( + Integer timeout, + String requestId, + OffsetDateTime ifUnmodifiedSince, + OffsetDateTime immutabilityPolicyExpiry, + BlobImmutabilityPolicyMode immutabilityPolicyMode, + Context context) { + final String comp = "immutabilityPolicies"; + final String accept = "application/xml"; + DateTimeRfc1123 ifUnmodifiedSinceConverted = + ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); + DateTimeRfc1123 immutabilityPolicyExpiryConverted = + immutabilityPolicyExpiry == null ? null : new DateTimeRfc1123(immutabilityPolicyExpiry); + return service.setImmutabilityPolicy( + this.client.getUrl(), + comp, + timeout, + this.client.getVersion(), + requestId, + ifUnmodifiedSinceConverted, + immutabilityPolicyExpiryConverted, + immutabilityPolicyMode, + accept, + context); + } + + /** + * The Delete Immutability Policy operation deletes the immutability policy on the blob. + * + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws StorageErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono deleteImmutabilityPolicyWithResponseAsync( + Integer timeout, String requestId, Context context) { + final String comp = "immutabilityPolicies"; + final String accept = "application/xml"; + return service.deleteImmutabilityPolicy( + this.client.getUrl(), comp, timeout, this.client.getVersion(), requestId, accept, context); + } + + /** + * The Set Legal Hold operation sets a legal hold on the blob. + * + * @param legalHold Specified if a legal hold should be set on the blob. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws StorageErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono setLegalHoldWithResponseAsync( + boolean legalHold, Integer timeout, String requestId, Context context) { + final String comp = "legalhold"; + final String accept = "application/xml"; + return service.setLegalHold( + this.client.getUrl(), comp, timeout, this.client.getVersion(), requestId, legalHold, accept, context); + } + /** * The Set Blob Metadata operation sets user-defined metadata for the specified blob as one or more name-value * pairs. @@ -1907,6 +2069,9 @@ public Mono createSnapshotWithResponseAsync( * 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. @@ -1936,6 +2101,9 @@ public Mono startCopyFromURLWithResponseAsync( String requestId, String blobTagsString, Boolean sealBlob, + OffsetDateTime immutabilityPolicyExpiry, + BlobImmutabilityPolicyMode immutabilityPolicyMode, + Boolean legalHold, Context context) { final String accept = "application/xml"; DateTimeRfc1123 sourceIfModifiedSinceConverted = @@ -1946,6 +2114,8 @@ public Mono startCopyFromURLWithResponseAsync( ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); DateTimeRfc1123 ifUnmodifiedSinceConverted = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); + DateTimeRfc1123 immutabilityPolicyExpiryConverted = + immutabilityPolicyExpiry == null ? null : new DateTimeRfc1123(immutabilityPolicyExpiry); return service.startCopyFromURL( this.client.getUrl(), containerName, @@ -1970,6 +2140,9 @@ public Mono startCopyFromURLWithResponseAsync( requestId, blobTagsString, sealBlob, + immutabilityPolicyExpiryConverted, + immutabilityPolicyMode, + legalHold, accept, context); } @@ -2011,6 +2184,9 @@ public Mono startCopyFromURLWithResponseAsync( * 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 context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws StorageErrorException thrown if the request is rejected by server. @@ -2038,6 +2214,9 @@ public Mono copyFromURLWithResponseAsync( String requestId, byte[] sourceContentMD5, String blobTagsString, + OffsetDateTime immutabilityPolicyExpiry, + BlobImmutabilityPolicyMode immutabilityPolicyMode, + Boolean legalHold, Context context) { final String xMsRequiresSync = "true"; final String accept = "application/xml"; @@ -2050,6 +2229,8 @@ public Mono copyFromURLWithResponseAsync( DateTimeRfc1123 ifUnmodifiedSinceConverted = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); String sourceContentMD5Converted = Base64Util.encodeToString(sourceContentMD5); + DateTimeRfc1123 immutabilityPolicyExpiryConverted = + immutabilityPolicyExpiry == null ? null : new DateTimeRfc1123(immutabilityPolicyExpiry); return service.copyFromURL( this.client.getUrl(), xMsRequiresSync, @@ -2073,6 +2254,9 @@ public Mono copyFromURLWithResponseAsync( requestId, sourceContentMD5Converted, blobTagsString, + immutabilityPolicyExpiryConverted, + immutabilityPolicyMode, + legalHold, accept, context); } diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/BlockBlobsImpl.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/BlockBlobsImpl.java index 0b5b653819f3..a8403157b0aa 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/BlockBlobsImpl.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/BlockBlobsImpl.java @@ -21,6 +21,7 @@ import com.azure.core.util.Base64Util; import com.azure.core.util.Context; import com.azure.core.util.DateTimeRfc1123; +import com.azure.storage.blob.implementation.models.BlobImmutabilityPolicyMode; import com.azure.storage.blob.implementation.models.BlockBlobsCommitBlockListResponse; import com.azure.storage.blob.implementation.models.BlockBlobsGetBlockListResponse; import com.azure.storage.blob.implementation.models.BlockBlobsPutBlobFromUrlResponse; @@ -69,8 +70,8 @@ public final class BlockBlobsImpl { @ServiceInterface(name = "AzureBlobStorageBloc") public interface BlockBlobsService { @Put("/{containerName}/{blob}") - @ExpectedResponses({201}) @UnexpectedResponseExceptionType(com.azure.storage.blob.models.BlobStorageException.class) + @ExpectedResponses({201}) Mono upload( @HostParam("url") String url, @HeaderParam("x-ms-blob-type") String blobType, @@ -100,15 +101,19 @@ Mono upload( @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/octet-stream") Flux body, @HeaderParam("Accept") String accept, Context context); @Put("/{containerName}/{blob}") @ExpectedResponses({201}) - @UnexpectedResponseExceptionType(com.azure.storage.blob.models.BlobStorageException.class) Mono putBlobFromUrl( - @HostParam("url") String url, + @UnexpectedResponseExceptionType(com.azure.storage.blob.models.BlobStorageException.class) + @HostParam("url") + String url, @HeaderParam("x-ms-blob-type") String blobType, @PathParam("containerName") String containerName, @PathParam("blob") String blob, @@ -149,9 +154,10 @@ Mono putBlobFromUrl( @Put("/{containerName}/{blob}") @ExpectedResponses({201}) - @UnexpectedResponseExceptionType(com.azure.storage.blob.models.BlobStorageException.class) Mono stageBlock( - @HostParam("url") String url, + @UnexpectedResponseExceptionType(com.azure.storage.blob.models.BlobStorageException.class) + @HostParam("url") + String url, @QueryParam("comp") String comp, @PathParam("containerName") String containerName, @PathParam("blob") String blob, @@ -173,9 +179,10 @@ Mono stageBlock( @Put("/{containerName}/{blob}") @ExpectedResponses({201}) - @UnexpectedResponseExceptionType(com.azure.storage.blob.models.BlobStorageException.class) Mono stageBlockFromURL( - @HostParam("url") String url, + @UnexpectedResponseExceptionType(com.azure.storage.blob.models.BlobStorageException.class) + @HostParam("url") + String url, @QueryParam("comp") String comp, @PathParam("containerName") String containerName, @PathParam("blob") String blob, @@ -202,9 +209,10 @@ Mono stageBlockFromURL( @Put("/{containerName}/{blob}") @ExpectedResponses({201}) - @UnexpectedResponseExceptionType(com.azure.storage.blob.models.BlobStorageException.class) Mono commitBlockList( - @HostParam("url") String url, + @UnexpectedResponseExceptionType(com.azure.storage.blob.models.BlobStorageException.class) + @HostParam("url") + String url, @QueryParam("comp") String comp, @PathParam("containerName") String containerName, @PathParam("blob") String blob, @@ -232,15 +240,19 @@ Mono commitBlockList( @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, @HeaderParam("x-ms-tags") String blobTagsString, + @HeaderParam("x-ms-immutability-policy-until-date") DateTimeRfc1123 immutabilityPolicyExpiry, + @HeaderParam("x-ms-immutability-policy-mode") BlobImmutabilityPolicyMode immutabilityPolicyMode, + @HeaderParam("x-ms-legal-hold") Boolean legalHold, @BodyParam("application/xml") BlockLookupList blocks, @HeaderParam("Accept") String accept, Context context); @Get("/{containerName}/{blob}") @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(com.azure.storage.blob.models.BlobStorageException.class) Mono getBlockList( - @HostParam("url") String url, + @UnexpectedResponseExceptionType(com.azure.storage.blob.models.BlobStorageException.class) + @HostParam("url") + String url, @QueryParam("comp") String comp, @PathParam("containerName") String containerName, @PathParam("blob") String blob, @@ -287,6 +299,9 @@ Mono getBlockList( * @param requestId Provides a 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 encryptionScope Parameter group. @@ -314,6 +329,9 @@ public Mono uploadWithResponseAsync( String ifTags, String requestId, String blobTagsString, + OffsetDateTime immutabilityPolicyExpiry, + BlobImmutabilityPolicyMode immutabilityPolicyMode, + Boolean legalHold, BlobHttpHeaders blobHttpHeaders, CpkInfo cpkInfo, EncryptionScope encryptionScope, @@ -376,6 +394,8 @@ public Mono uploadWithResponseAsync( ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); DateTimeRfc1123 ifUnmodifiedSinceConverted = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); + DateTimeRfc1123 immutabilityPolicyExpiryConverted = + immutabilityPolicyExpiry == null ? null : new DateTimeRfc1123(immutabilityPolicyExpiry); return service.upload( this.client.getUrl(), blobType, @@ -405,6 +425,9 @@ public Mono uploadWithResponseAsync( this.client.getVersion(), requestId, blobTagsString, + immutabilityPolicyExpiryConverted, + immutabilityPolicyMode, + legalHold, body, accept, context); @@ -828,6 +851,9 @@ public Mono stageBlockFromURLWithResponseAs * @param requestId Provides a 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 encryptionScope Parameter group. @@ -855,6 +881,9 @@ public Mono commitBlockListWithResponseAsync( String ifTags, String requestId, String blobTagsString, + OffsetDateTime immutabilityPolicyExpiry, + BlobImmutabilityPolicyMode immutabilityPolicyMode, + Boolean legalHold, BlobHttpHeaders blobHttpHeaders, CpkInfo cpkInfo, EncryptionScope encryptionScope, @@ -918,6 +947,8 @@ public Mono commitBlockListWithResponseAsync( ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); DateTimeRfc1123 ifUnmodifiedSinceConverted = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); + DateTimeRfc1123 immutabilityPolicyExpiryConverted = + immutabilityPolicyExpiry == null ? null : new DateTimeRfc1123(immutabilityPolicyExpiry); return service.commitBlockList( this.client.getUrl(), comp, @@ -947,6 +978,9 @@ public Mono commitBlockListWithResponseAsync( this.client.getVersion(), requestId, blobTagsString, + immutabilityPolicyExpiryConverted, + immutabilityPolicyMode, + legalHold, blocks, accept, context); diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/ContainersImpl.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/ContainersImpl.java index 1f28c0a3cda5..18040af5b7ef 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/ContainersImpl.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/ContainersImpl.java @@ -80,8 +80,8 @@ public final class ContainersImpl { @ServiceInterface(name = "AzureBlobStorageCont") public interface ContainersService { @Put("/{containerName}") - @ExpectedResponses({201}) @UnexpectedResponseExceptionType(com.azure.storage.blob.models.BlobStorageException.class) + @ExpectedResponses({201}) Mono create( @HostParam("url") String url, @QueryParam("restype") String restype, @@ -98,9 +98,10 @@ Mono create( @Get("/{containerName}") @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(com.azure.storage.blob.models.BlobStorageException.class) Mono getProperties( - @HostParam("url") String url, + @UnexpectedResponseExceptionType(com.azure.storage.blob.models.BlobStorageException.class) + @HostParam("url") + String url, @QueryParam("restype") String restype, @PathParam("containerName") String containerName, @QueryParam("timeout") Integer timeout, @@ -112,9 +113,10 @@ Mono getProperties( @Delete("/{containerName}") @ExpectedResponses({202}) - @UnexpectedResponseExceptionType(com.azure.storage.blob.models.BlobStorageException.class) Mono delete( - @HostParam("url") String url, + @UnexpectedResponseExceptionType(com.azure.storage.blob.models.BlobStorageException.class) + @HostParam("url") + String url, @QueryParam("restype") String restype, @PathParam("containerName") String containerName, @QueryParam("timeout") Integer timeout, @@ -128,9 +130,10 @@ Mono delete( @Put("/{containerName}") @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(com.azure.storage.blob.models.BlobStorageException.class) Mono setMetadata( - @HostParam("url") String url, + @UnexpectedResponseExceptionType(com.azure.storage.blob.models.BlobStorageException.class) + @HostParam("url") + String url, @QueryParam("restype") String restype, @QueryParam("comp") String comp, @PathParam("containerName") String containerName, @@ -145,9 +148,10 @@ Mono setMetadata( @Get("/{containerName}") @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(com.azure.storage.blob.models.BlobStorageException.class) Mono getAccessPolicy( - @HostParam("url") String url, + @UnexpectedResponseExceptionType(com.azure.storage.blob.models.BlobStorageException.class) + @HostParam("url") + String url, @QueryParam("restype") String restype, @QueryParam("comp") String comp, @PathParam("containerName") String containerName, @@ -160,9 +164,10 @@ Mono getAccessPolicy( @Put("/{containerName}") @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(com.azure.storage.blob.models.BlobStorageException.class) Mono setAccessPolicy( - @HostParam("url") String url, + @UnexpectedResponseExceptionType(com.azure.storage.blob.models.BlobStorageException.class) + @HostParam("url") + String url, @QueryParam("restype") String restype, @QueryParam("comp") String comp, @PathParam("containerName") String containerName, @@ -179,9 +184,10 @@ Mono setAccessPolicy( @Put("/{containerName}") @ExpectedResponses({201}) - @UnexpectedResponseExceptionType(com.azure.storage.blob.models.BlobStorageException.class) Mono restore( - @HostParam("url") String url, + @UnexpectedResponseExceptionType(com.azure.storage.blob.models.BlobStorageException.class) + @HostParam("url") + String url, @QueryParam("restype") String restype, @QueryParam("comp") String comp, @PathParam("containerName") String containerName, @@ -195,9 +201,10 @@ Mono restore( @Put("/{containerName}") @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(com.azure.storage.blob.models.BlobStorageException.class) Mono rename( - @HostParam("url") String url, + @UnexpectedResponseExceptionType(com.azure.storage.blob.models.BlobStorageException.class) + @HostParam("url") + String url, @QueryParam("restype") String restype, @QueryParam("comp") String comp, @PathParam("containerName") String containerName, @@ -211,9 +218,10 @@ Mono rename( @Post("/{containerName}") @ExpectedResponses({202}) - @UnexpectedResponseExceptionType(com.azure.storage.blob.models.BlobStorageException.class) Mono submitBatch( - @HostParam("url") String url, + @UnexpectedResponseExceptionType(com.azure.storage.blob.models.BlobStorageException.class) + @HostParam("url") + String url, @QueryParam("restype") String restype, @QueryParam("comp") String comp, @PathParam("containerName") String containerName, @@ -228,9 +236,10 @@ Mono submitBatch( @Put("/{containerName}") @ExpectedResponses({201}) - @UnexpectedResponseExceptionType(com.azure.storage.blob.models.BlobStorageException.class) Mono acquireLease( - @HostParam("url") String url, + @UnexpectedResponseExceptionType(com.azure.storage.blob.models.BlobStorageException.class) + @HostParam("url") + String url, @QueryParam("comp") String comp, @QueryParam("restype") String restype, @HeaderParam("x-ms-lease-action") String action, @@ -247,9 +256,10 @@ Mono acquireLease( @Put("/{containerName}") @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(com.azure.storage.blob.models.BlobStorageException.class) Mono releaseLease( - @HostParam("url") String url, + @UnexpectedResponseExceptionType(com.azure.storage.blob.models.BlobStorageException.class) + @HostParam("url") + String url, @QueryParam("comp") String comp, @QueryParam("restype") String restype, @HeaderParam("x-ms-lease-action") String action, @@ -265,9 +275,10 @@ Mono releaseLease( @Put("/{containerName}") @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(com.azure.storage.blob.models.BlobStorageException.class) Mono renewLease( - @HostParam("url") String url, + @UnexpectedResponseExceptionType(com.azure.storage.blob.models.BlobStorageException.class) + @HostParam("url") + String url, @QueryParam("comp") String comp, @QueryParam("restype") String restype, @HeaderParam("x-ms-lease-action") String action, @@ -283,9 +294,10 @@ Mono renewLease( @Put("/{containerName}") @ExpectedResponses({202}) - @UnexpectedResponseExceptionType(com.azure.storage.blob.models.BlobStorageException.class) Mono breakLease( - @HostParam("url") String url, + @UnexpectedResponseExceptionType(com.azure.storage.blob.models.BlobStorageException.class) + @HostParam("url") + String url, @QueryParam("comp") String comp, @QueryParam("restype") String restype, @HeaderParam("x-ms-lease-action") String action, @@ -301,9 +313,10 @@ Mono breakLease( @Put("/{containerName}") @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(com.azure.storage.blob.models.BlobStorageException.class) Mono changeLease( - @HostParam("url") String url, + @UnexpectedResponseExceptionType(com.azure.storage.blob.models.BlobStorageException.class) + @HostParam("url") + String url, @QueryParam("comp") String comp, @QueryParam("restype") String restype, @HeaderParam("x-ms-lease-action") String action, @@ -320,9 +333,10 @@ Mono changeLease( @Get("/{containerName}") @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(com.azure.storage.blob.models.BlobStorageException.class) Mono listBlobFlatSegment( - @HostParam("url") String url, + @UnexpectedResponseExceptionType(com.azure.storage.blob.models.BlobStorageException.class) + @HostParam("url") + String url, @QueryParam("restype") String restype, @QueryParam("comp") String comp, @PathParam("containerName") String containerName, @@ -338,9 +352,10 @@ Mono listBlobFlatSegment( @Get("/{containerName}") @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(com.azure.storage.blob.models.BlobStorageException.class) Mono listBlobHierarchySegment( - @HostParam("url") String url, + @UnexpectedResponseExceptionType(com.azure.storage.blob.models.BlobStorageException.class) + @HostParam("url") + String url, @QueryParam("restype") String restype, @QueryParam("comp") String comp, @PathParam("containerName") String containerName, @@ -357,9 +372,10 @@ Mono listBlobHierarchySegment( @Get("/{containerName}") @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(com.azure.storage.blob.models.BlobStorageException.class) Mono getAccountInfo( - @HostParam("url") String url, + @UnexpectedResponseExceptionType(com.azure.storage.blob.models.BlobStorageException.class) + @HostParam("url") + String url, @QueryParam("restype") String restype, @QueryParam("comp") String comp, @PathParam("containerName") String containerName, diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/PageBlobsImpl.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/PageBlobsImpl.java index f59aaa7d6ef9..8d7eee3d0ba9 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/PageBlobsImpl.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/PageBlobsImpl.java @@ -21,6 +21,7 @@ import com.azure.core.util.Base64Util; import com.azure.core.util.Context; import com.azure.core.util.DateTimeRfc1123; +import com.azure.storage.blob.implementation.models.BlobImmutabilityPolicyMode; import com.azure.storage.blob.implementation.models.EncryptionScope; import com.azure.storage.blob.implementation.models.PageBlobsClearPagesResponse; import com.azure.storage.blob.implementation.models.PageBlobsCopyIncrementalResponse; @@ -71,8 +72,8 @@ public final class PageBlobsImpl { @ServiceInterface(name = "AzureBlobStoragePage") public interface PageBlobsService { @Put("/{containerName}/{blob}") - @ExpectedResponses({201}) @UnexpectedResponseExceptionType(com.azure.storage.blob.models.BlobStorageException.class) + @ExpectedResponses({201}) Mono create( @HostParam("url") String url, @HeaderParam("x-ms-blob-type") String blobType, @@ -103,14 +104,18 @@ Mono create( @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, @HeaderParam("x-ms-tags") String blobTagsString, + @HeaderParam("x-ms-immutability-policy-until-date") DateTimeRfc1123 immutabilityPolicyExpiry, + @HeaderParam("x-ms-immutability-policy-mode") BlobImmutabilityPolicyMode immutabilityPolicyMode, + @HeaderParam("x-ms-legal-hold") Boolean legalHold, @HeaderParam("Accept") String accept, Context context); @Put("/{containerName}/{blob}") @ExpectedResponses({201}) - @UnexpectedResponseExceptionType(com.azure.storage.blob.models.BlobStorageException.class) Mono uploadPages( - @HostParam("url") String url, + @UnexpectedResponseExceptionType(com.azure.storage.blob.models.BlobStorageException.class) + @HostParam("url") + String url, @QueryParam("comp") String comp, @HeaderParam("x-ms-page-write") String pageWrite, @PathParam("containerName") String containerName, @@ -141,9 +146,10 @@ Mono uploadPages( @Put("/{containerName}/{blob}") @ExpectedResponses({201}) - @UnexpectedResponseExceptionType(com.azure.storage.blob.models.BlobStorageException.class) Mono clearPages( - @HostParam("url") String url, + @UnexpectedResponseExceptionType(com.azure.storage.blob.models.BlobStorageException.class) + @HostParam("url") + String url, @QueryParam("comp") String comp, @HeaderParam("x-ms-page-write") String pageWrite, @PathParam("containerName") String containerName, @@ -171,9 +177,10 @@ Mono clearPages( @Put("/{containerName}/{blob}") @ExpectedResponses({201}) - @UnexpectedResponseExceptionType(com.azure.storage.blob.models.BlobStorageException.class) Mono uploadPagesFromURL( - @HostParam("url") String url, + @UnexpectedResponseExceptionType(com.azure.storage.blob.models.BlobStorageException.class) + @HostParam("url") + String url, @QueryParam("comp") String comp, @HeaderParam("x-ms-page-write") String pageWrite, @PathParam("containerName") String containerName, @@ -209,9 +216,10 @@ Mono uploadPagesFromURL( @Get("/{containerName}/{blob}") @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(com.azure.storage.blob.models.BlobStorageException.class) Mono getPageRanges( - @HostParam("url") String url, + @UnexpectedResponseExceptionType(com.azure.storage.blob.models.BlobStorageException.class) + @HostParam("url") + String url, @QueryParam("comp") String comp, @PathParam("containerName") String containerName, @PathParam("blob") String blob, @@ -231,9 +239,10 @@ Mono getPageRanges( @Get("/{containerName}/{blob}") @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(com.azure.storage.blob.models.BlobStorageException.class) Mono getPageRangesDiff( - @HostParam("url") String url, + @UnexpectedResponseExceptionType(com.azure.storage.blob.models.BlobStorageException.class) + @HostParam("url") + String url, @QueryParam("comp") String comp, @PathParam("containerName") String containerName, @PathParam("blob") String blob, @@ -255,9 +264,10 @@ Mono getPageRangesDiff( @Put("/{containerName}/{blob}") @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(com.azure.storage.blob.models.BlobStorageException.class) Mono resize( - @HostParam("url") String url, + @UnexpectedResponseExceptionType(com.azure.storage.blob.models.BlobStorageException.class) + @HostParam("url") + String url, @QueryParam("comp") String comp, @PathParam("containerName") String containerName, @PathParam("blob") String blob, @@ -280,9 +290,10 @@ Mono resize( @Put("/{containerName}/{blob}") @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(com.azure.storage.blob.models.BlobStorageException.class) Mono updateSequenceNumber( - @HostParam("url") String url, + @UnexpectedResponseExceptionType(com.azure.storage.blob.models.BlobStorageException.class) + @HostParam("url") + String url, @QueryParam("comp") String comp, @PathParam("containerName") String containerName, @PathParam("blob") String blob, @@ -302,9 +313,10 @@ Mono updateSequenceNumber( @Put("/{containerName}/{blob}") @ExpectedResponses({202}) - @UnexpectedResponseExceptionType(com.azure.storage.blob.models.BlobStorageException.class) Mono copyIncremental( - @HostParam("url") String url, + @UnexpectedResponseExceptionType(com.azure.storage.blob.models.BlobStorageException.class) + @HostParam("url") + String url, @QueryParam("comp") String comp, @PathParam("containerName") String containerName, @PathParam("blob") String blob, @@ -352,6 +364,9 @@ Mono copyIncremental( * @param requestId Provides a 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 encryptionScope Parameter group. @@ -379,6 +394,9 @@ public Mono createWithResponseAsync( Long blobSequenceNumber, String requestId, String blobTagsString, + OffsetDateTime immutabilityPolicyExpiry, + BlobImmutabilityPolicyMode immutabilityPolicyMode, + Boolean legalHold, BlobHttpHeaders blobHttpHeaders, CpkInfo cpkInfo, EncryptionScope encryptionScope, @@ -440,6 +458,8 @@ public Mono createWithResponseAsync( ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); DateTimeRfc1123 ifUnmodifiedSinceConverted = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); + DateTimeRfc1123 immutabilityPolicyExpiryConverted = + immutabilityPolicyExpiry == null ? null : new DateTimeRfc1123(immutabilityPolicyExpiry); return service.create( this.client.getUrl(), blobType, @@ -470,6 +490,9 @@ public Mono createWithResponseAsync( this.client.getVersion(), requestId, blobTagsString, + immutabilityPolicyExpiryConverted, + immutabilityPolicyMode, + legalHold, accept, context); } diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/ServicesImpl.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/ServicesImpl.java index 7d1e449d2f8a..39ae673d4373 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/ServicesImpl.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/ServicesImpl.java @@ -69,8 +69,8 @@ public final class ServicesImpl { @ServiceInterface(name = "AzureBlobStorageServ") public interface ServicesService { @Put("/") - @ExpectedResponses({202}) @UnexpectedResponseExceptionType(com.azure.storage.blob.models.BlobStorageException.class) + @ExpectedResponses({202}) Mono setProperties( @HostParam("url") String url, @QueryParam("restype") String restype, @@ -84,9 +84,10 @@ Mono setProperties( @Get("/") @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(com.azure.storage.blob.models.BlobStorageException.class) Mono getProperties( - @HostParam("url") String url, + @UnexpectedResponseExceptionType(com.azure.storage.blob.models.BlobStorageException.class) + @HostParam("url") + String url, @QueryParam("restype") String restype, @QueryParam("comp") String comp, @QueryParam("timeout") Integer timeout, @@ -97,9 +98,10 @@ Mono getProperties( @Get("/") @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(com.azure.storage.blob.models.BlobStorageException.class) Mono getStatistics( - @HostParam("url") String url, + @UnexpectedResponseExceptionType(com.azure.storage.blob.models.BlobStorageException.class) + @HostParam("url") + String url, @QueryParam("restype") String restype, @QueryParam("comp") String comp, @QueryParam("timeout") Integer timeout, @@ -110,9 +112,10 @@ Mono getStatistics( @Get("/") @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(com.azure.storage.blob.models.BlobStorageException.class) Mono listBlobContainersSegment( - @HostParam("url") String url, + @UnexpectedResponseExceptionType(com.azure.storage.blob.models.BlobStorageException.class) + @HostParam("url") + String url, @QueryParam("comp") String comp, @QueryParam("prefix") String prefix, @QueryParam("marker") String marker, @@ -126,9 +129,10 @@ Mono listBlobContainersSegment( @Post("/") @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(com.azure.storage.blob.models.BlobStorageException.class) Mono getUserDelegationKey( - @HostParam("url") String url, + @UnexpectedResponseExceptionType(com.azure.storage.blob.models.BlobStorageException.class) + @HostParam("url") + String url, @QueryParam("restype") String restype, @QueryParam("comp") String comp, @QueryParam("timeout") Integer timeout, @@ -140,9 +144,10 @@ Mono getUserDelegationKey( @Get("/") @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(com.azure.storage.blob.models.BlobStorageException.class) Mono getAccountInfo( - @HostParam("url") String url, + @UnexpectedResponseExceptionType(com.azure.storage.blob.models.BlobStorageException.class) + @HostParam("url") + String url, @QueryParam("restype") String restype, @QueryParam("comp") String comp, @HeaderParam("x-ms-version") String version, @@ -151,9 +156,10 @@ Mono getAccountInfo( @Post("/") @ExpectedResponses({202}) - @UnexpectedResponseExceptionType(com.azure.storage.blob.models.BlobStorageException.class) Mono submitBatch( - @HostParam("url") String url, + @UnexpectedResponseExceptionType(com.azure.storage.blob.models.BlobStorageException.class) + @HostParam("url") + String url, @QueryParam("comp") String comp, @HeaderParam("Content-Length") long contentLength, @HeaderParam("Content-Type") String multipartContentType, @@ -166,9 +172,10 @@ Mono submitBatch( @Get("/") @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(com.azure.storage.blob.models.BlobStorageException.class) Mono filterBlobs( - @HostParam("url") String url, + @UnexpectedResponseExceptionType(com.azure.storage.blob.models.BlobStorageException.class) + @HostParam("url") + String url, @QueryParam("comp") String comp, @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-version") String version, diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobImmutabilityPolicyMode.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobImmutabilityPolicyMode.java new file mode 100644 index 000000000000..4c483833f7ac --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobImmutabilityPolicyMode.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.implementation.models; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** Defines values for BlobImmutabilityPolicyMode. */ +public enum BlobImmutabilityPolicyMode { + /** Enum value Unlocked. */ + UNLOCKED("Unlocked"), + + /** Enum value Locked. */ + LOCKED("Locked"), + + /** Enum value Mutable. */ + MUTABLE("Mutable"); + + /** 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. + */ + @JsonCreator + public static BlobImmutabilityPolicyMode fromString(String value) { + BlobImmutabilityPolicyMode[] items = BlobImmutabilityPolicyMode.values(); + for (BlobImmutabilityPolicyMode item : items) { + if (item.toString().equalsIgnoreCase(value)) { + return item; + } + } + return null; + } + + @JsonValue + @Override + public String toString() { + return this.value; + } +} diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobItemPropertiesInternal.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobItemPropertiesInternal.java index 25f3ddd92417..446e4a682d1a 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobItemPropertiesInternal.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobItemPropertiesInternal.java @@ -246,6 +246,24 @@ public final class BlobItemPropertiesInternal { @JsonProperty(value = "LastAccessTime") private DateTimeRfc1123 lastAccessedOn; + /* + * The ImmutabilityPolicyUntilDate property. + */ + @JsonProperty(value = "ImmutabilityPolicyUntilDate") + private DateTimeRfc1123 immutabilityPolicyExpiresOn; + + /* + * The ImmutabilityPolicyMode property. + */ + @JsonProperty(value = "ImmutabilityPolicyMode") + private BlobImmutabilityPolicyMode immutabilityPolicyMode; + + /* + * The LegalHold property. + */ + @JsonProperty(value = "LegalHold") + private Boolean legalHold; + /** * Get the creationTime property: The Creation-Time property. * @@ -1036,4 +1054,71 @@ public BlobItemPropertiesInternal setLastAccessedOn(OffsetDateTime lastAccessedO } 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; + } } diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobsDeleteImmutabilityPolicyHeaders.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobsDeleteImmutabilityPolicyHeaders.java new file mode 100644 index 000000000000..260bde889bbe --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobsDeleteImmutabilityPolicyHeaders.java @@ -0,0 +1,127 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.storage.blob.implementation.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.DateTimeRfc1123; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; +import java.time.OffsetDateTime; + +/** The BlobsDeleteImmutabilityPolicyHeaders model. */ +@JacksonXmlRootElement(localName = "null") +@Fluent +public final class BlobsDeleteImmutabilityPolicyHeaders { + /* + * The x-ms-version property. + */ + @JsonProperty(value = "x-ms-version") + private String xMsVersion; + + /* + * The x-ms-request-id property. + */ + @JsonProperty(value = "x-ms-request-id") + private String xMsRequestId; + + /* + * The x-ms-client-request-id property. + */ + @JsonProperty(value = "x-ms-client-request-id") + private String xMsClientRequestId; + + /* + * The Date property. + */ + @JsonProperty(value = "Date") + private DateTimeRfc1123 dateProperty; + + /** + * Get the xMsVersion property: The x-ms-version property. + * + * @return the xMsVersion value. + */ + public String getXMsVersion() { + return this.xMsVersion; + } + + /** + * Set the xMsVersion property: The x-ms-version property. + * + * @param xMsVersion the xMsVersion value to set. + * @return the 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 dateProperty property: The Date property. + * + * @return the dateProperty value. + */ + public OffsetDateTime getDateProperty() { + if (this.dateProperty == null) { + return null; + } + return this.dateProperty.getDateTime(); + } + + /** + * Set the dateProperty property: The Date property. + * + * @param dateProperty the dateProperty value to set. + * @return the BlobsDeleteImmutabilityPolicyHeaders object itself. + */ + public BlobsDeleteImmutabilityPolicyHeaders setDateProperty(OffsetDateTime dateProperty) { + if (dateProperty == null) { + this.dateProperty = null; + } else { + this.dateProperty = new DateTimeRfc1123(dateProperty); + } + return this; + } +} diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobsDeleteImmutabilityPolicyResponse.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobsDeleteImmutabilityPolicyResponse.java new file mode 100644 index 000000000000..2da244a7869d --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobsDeleteImmutabilityPolicyResponse.java @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.storage.blob.implementation.models; + +import com.azure.core.http.HttpHeaders; +import com.azure.core.http.HttpRequest; +import com.azure.core.http.rest.ResponseBase; + +/** Contains all response data for the deleteImmutabilityPolicy operation. */ +public final class BlobsDeleteImmutabilityPolicyResponse + extends ResponseBase { + /** + * Creates an instance of BlobsDeleteImmutabilityPolicyResponse. + * + * @param request the request which resulted in this BlobsDeleteImmutabilityPolicyResponse. + * @param statusCode the status code of the HTTP response. + * @param rawHeaders the raw headers of the HTTP response. + * @param value the deserialized value of the HTTP response. + * @param headers the deserialized headers of the HTTP response. + */ + public BlobsDeleteImmutabilityPolicyResponse( + HttpRequest request, + int statusCode, + HttpHeaders rawHeaders, + Void value, + BlobsDeleteImmutabilityPolicyHeaders headers) { + super(request, statusCode, rawHeaders, value, headers); + } +} diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobsDownloadHeaders.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobsDownloadHeaders.java index 7babca01ac0b..980336772d05 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobsDownloadHeaders.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobsDownloadHeaders.java @@ -82,6 +82,12 @@ public final class BlobsDownloadHeaders { @JsonProperty(value = "x-ms-blob-type") private BlobType xMsBlobType; + /* + * The x-ms-immutability-policy-mode property. + */ + @JsonProperty(value = "x-ms-immutability-policy-mode") + private String xMsImmutabilityPolicyMode; + /* * The Content-Encoding property. */ @@ -142,6 +148,12 @@ public final class BlobsDownloadHeaders { @JsonProperty(value = "x-ms-copy-source") private String xMsCopySource; + /* + * The x-ms-immutability-policy-until-date property. + */ + @JsonProperty(value = "x-ms-immutability-policy-until-date") + private DateTimeRfc1123 xMsImmutabilityPolicyUntilDate; + /* * The x-ms-content-crc64 property. */ @@ -178,6 +190,12 @@ public final class BlobsDownloadHeaders { @HeaderCollection("x-ms-meta-") private Map xMsMeta; + /* + * The x-ms-legal-hold property. + */ + @JsonProperty(value = "x-ms-legal-hold") + private Boolean xMsLegalHold; + /* * The Date property. */ @@ -469,6 +487,26 @@ public BlobsDownloadHeaders setXMsBlobType(BlobType 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 contentEncoding property: The Content-Encoding property. * @@ -676,6 +714,33 @@ public BlobsDownloadHeaders setXMsCopySource(String 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. * @@ -796,6 +861,26 @@ public BlobsDownloadHeaders setXMsMeta(Map 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 dateProperty property: The Date property. * diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobsGetPropertiesHeaders.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobsGetPropertiesHeaders.java index 687ae2ab7b38..671d3c8a9e5a 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobsGetPropertiesHeaders.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobsGetPropertiesHeaders.java @@ -34,12 +34,6 @@ public final class BlobsGetPropertiesHeaders { @JsonProperty(value = "x-ms-lease-status") private LeaseStatusType xMsLeaseStatus; - /* - * The x-ms-tag-count property. - */ - @JsonProperty(value = "x-ms-tag-count") - private Long xMsTagCount; - /* * The x-ms-copy-destination-snapshot property. */ @@ -58,12 +52,6 @@ public final class BlobsGetPropertiesHeaders { @JsonProperty(value = "x-ms-blob-sealed") private Boolean xMsBlobSealed; - /* - * The Last-Modified property. - */ - @JsonProperty(value = "Last-Modified") - private DateTimeRfc1123 lastModified; - /* * The x-ms-version-id property. */ @@ -88,30 +76,12 @@ public final class BlobsGetPropertiesHeaders { @JsonProperty(value = "x-ms-blob-type") private BlobType xMsBlobType; - /* - * The x-ms-access-tier-inferred property. - */ - @JsonProperty(value = "x-ms-access-tier-inferred") - private Boolean xMsAccessTierInferred; - - /* - * The x-ms-access-tier property. - */ - @JsonProperty(value = "x-ms-access-tier") - private String xMsAccessTier; - /* * The Content-Encoding property. */ @JsonProperty(value = "Content-Encoding") private String contentEncoding; - /* - * The x-ms-copy-status-description property. - */ - @JsonProperty(value = "x-ms-copy-status-description") - private String xMsCopyStatusDescription; - /* * The x-ms-creation-time property. */ @@ -130,6 +100,132 @@ public final class BlobsGetPropertiesHeaders { @JsonProperty(value = "x-ms-lease-duration") private LeaseDurationType xMsLeaseDuration; + /* + * The x-ms-version property. + */ + @JsonProperty(value = "x-ms-version") + private String xMsVersion; + + /* + * The x-ms-copy-id property. + */ + @JsonProperty(value = "x-ms-copy-id") + private String xMsCopyId; + + /* + * The x-ms-immutability-policy-until-date property. + */ + @JsonProperty(value = "x-ms-immutability-policy-until-date") + private DateTimeRfc1123 xMsImmutabilityPolicyUntilDate; + + /* + * The x-ms-blob-sequence-number property. + */ + @JsonProperty(value = "x-ms-blob-sequence-number") + private Long xMsBlobSequenceNumber; + + /* + * The x-ms-blob-committed-block-count property. + */ + @JsonProperty(value = "x-ms-blob-committed-block-count") + private Integer xMsBlobCommittedBlockCount; + + /* + * The x-ms-legal-hold property. + */ + @JsonProperty(value = "x-ms-legal-hold") + private Boolean xMsLegalHold; + + /* + * The Content-MD5 property. + */ + @JsonProperty(value = "Content-MD5") + private byte[] contentMD5; + + /* + * The x-ms-or-policy-id property. + */ + @JsonProperty(value = "x-ms-or-policy-id") + private String xMsOrPolicyId; + + /* + * The Cache-Control property. + */ + @JsonProperty(value = "Cache-Control") + private String cacheControl; + + /* + * The ETag property. + */ + @JsonProperty(value = "ETag") + private String eTag; + + /* + * The Content-Disposition property. + */ + @JsonProperty(value = "Content-Disposition") + private String contentDisposition; + + /* + * The Content-Language property. + */ + @JsonProperty(value = "Content-Language") + private String contentLanguage; + + /* + * The x-ms-client-request-id property. + */ + @JsonProperty(value = "x-ms-client-request-id") + private String xMsClientRequestId; + + /* + * The x-ms-or- property. + */ + @HeaderCollection("x-ms-or-") + private Map xMsOr; + + /* + * The x-ms-encryption-scope property. + */ + @JsonProperty(value = "x-ms-encryption-scope") + private String xMsEncryptionScope; + + /* + * The x-ms-tag-count property. + */ + @JsonProperty(value = "x-ms-tag-count") + private Long xMsTagCount; + + /* + * The Last-Modified property. + */ + @JsonProperty(value = "Last-Modified") + private DateTimeRfc1123 lastModified; + + /* + * The x-ms-access-tier-inferred property. + */ + @JsonProperty(value = "x-ms-access-tier-inferred") + private Boolean xMsAccessTierInferred; + + /* + * The x-ms-immutability-policy-mode property. + */ + @JsonProperty(value = "x-ms-immutability-policy-mode") + private BlobImmutabilityPolicyMode xMsImmutabilityPolicyMode; + + /* + * The x-ms-access-tier property. + */ + @JsonProperty(value = "x-ms-access-tier") + private String xMsAccessTier; + + /* + * The x-ms-copy-status-description property. + */ + @JsonProperty(value = "x-ms-copy-status-description") + private String xMsCopyStatusDescription; + /* * The Content-Length property. */ @@ -154,42 +250,18 @@ public final class BlobsGetPropertiesHeaders { @JsonProperty(value = "x-ms-last-access-time") private DateTimeRfc1123 xMsLastAccessTime; - /* - * The x-ms-version property. - */ - @JsonProperty(value = "x-ms-version") - private String xMsVersion; - - /* - * The x-ms-copy-id property. - */ - @JsonProperty(value = "x-ms-copy-id") - private String xMsCopyId; - /* * The x-ms-copy-source property. */ @JsonProperty(value = "x-ms-copy-source") private String xMsCopySource; - /* - * The x-ms-blob-sequence-number property. - */ - @JsonProperty(value = "x-ms-blob-sequence-number") - private Long xMsBlobSequenceNumber; - /* * The x-ms-copy-progress property. */ @JsonProperty(value = "x-ms-copy-progress") private String xMsCopyProgress; - /* - * The x-ms-blob-committed-block-count property. - */ - @JsonProperty(value = "x-ms-blob-committed-block-count") - private Integer xMsBlobCommittedBlockCount; - /* * The x-ms-meta- property. */ @@ -208,12 +280,6 @@ public final class BlobsGetPropertiesHeaders { @JsonProperty(value = "x-ms-expiry-time") private DateTimeRfc1123 xMsExpiryTime; - /* - * The Content-MD5 property. - */ - @JsonProperty(value = "Content-MD5") - private byte[] contentMD5; - /* * The x-ms-copy-completion-time property. */ @@ -232,36 +298,12 @@ public final class BlobsGetPropertiesHeaders { @JsonProperty(value = "x-ms-server-encrypted") private Boolean xMsServerEncrypted; - /* - * The x-ms-or-policy-id property. - */ - @JsonProperty(value = "x-ms-or-policy-id") - private String xMsOrPolicyId; - /* * The x-ms-rehydrate-priority property. */ @JsonProperty(value = "x-ms-rehydrate-priority") private String xMsRehydratePriority; - /* - * The Cache-Control property. - */ - @JsonProperty(value = "Cache-Control") - private String cacheControl; - - /* - * The ETag property. - */ - @JsonProperty(value = "ETag") - private String eTag; - - /* - * The Content-Disposition property. - */ - @JsonProperty(value = "Content-Disposition") - private String contentDisposition; - /* * The x-ms-copy-status property. */ @@ -274,30 +316,6 @@ public final class BlobsGetPropertiesHeaders { @JsonProperty(value = "x-ms-archive-status") private String xMsArchiveStatus; - /* - * The Content-Language property. - */ - @JsonProperty(value = "Content-Language") - private String contentLanguage; - - /* - * The x-ms-client-request-id property. - */ - @JsonProperty(value = "x-ms-client-request-id") - private String xMsClientRequestId; - - /* - * The x-ms-or- property. - */ - @HeaderCollection("x-ms-or-") - private Map xMsOr; - - /* - * The x-ms-encryption-scope property. - */ - @JsonProperty(value = "x-ms-encryption-scope") - private String xMsEncryptionScope; - /** * Get the xMsIsCurrentVersion property: The x-ms-is-current-version property. * @@ -338,26 +356,6 @@ public BlobsGetPropertiesHeaders setXMsLeaseStatus(LeaseStatusType xMsLeaseStatu 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 xMsCopyDestinationSnapshot property: The x-ms-copy-destination-snapshot property. * @@ -419,39 +417,12 @@ public BlobsGetPropertiesHeaders setXMsBlobSealed(Boolean xMsBlobSealed) { } /** - * Get the lastModified property: The Last-Modified property. + * Get the xMsVersionId property: The x-ms-version-id property. * - * @return the lastModified value. + * @return the xMsVersionId 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 xMsVersionId property: The x-ms-version-id property. - * - * @return the xMsVersionId value. - */ - public String getXMsVersionId() { - return this.xMsVersionId; + public String getXMsVersionId() { + return this.xMsVersionId; } /** @@ -532,46 +503,6 @@ public BlobsGetPropertiesHeaders setXMsBlobType(BlobType xMsBlobType) { 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 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 contentEncoding property: The Content-Encoding property. * @@ -592,26 +523,6 @@ public BlobsGetPropertiesHeaders setContentEncoding(String 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 BlobsGetPropertiesHeaders object itself. - */ - public BlobsGetPropertiesHeaders setXMsCopyStatusDescription(String xMsCopyStatusDescription) { - this.xMsCopyStatusDescription = xMsCopyStatusDescription; - return this; - } - /** * Get the xMsCreationTime property: The x-ms-creation-time property. * @@ -680,590 +591,765 @@ public BlobsGetPropertiesHeaders setXMsLeaseDuration(LeaseDurationType xMsLeaseD } /** - * Get the contentLength property: The Content-Length property. + * Get the xMsVersion property: The x-ms-version property. * - * @return the contentLength value. + * @return the xMsVersion value. */ - public Long getContentLength() { - return this.contentLength; + public String getXMsVersion() { + return this.xMsVersion; } /** - * Set the contentLength property: The Content-Length property. + * Set the xMsVersion property: The x-ms-version property. * - * @param contentLength the contentLength value to set. + * @param xMsVersion the xMsVersion value to set. * @return the BlobsGetPropertiesHeaders object itself. */ - public BlobsGetPropertiesHeaders setContentLength(Long contentLength) { - this.contentLength = contentLength; + public BlobsGetPropertiesHeaders setXMsVersion(String xMsVersion) { + this.xMsVersion = xMsVersion; return this; } /** - * Get the xMsRequestId property: The x-ms-request-id property. + * Get the xMsCopyId property: The x-ms-copy-id property. * - * @return the xMsRequestId value. + * @return the xMsCopyId value. */ - public String getXMsRequestId() { - return this.xMsRequestId; + public String getXMsCopyId() { + return this.xMsCopyId; } /** - * Set the xMsRequestId property: The x-ms-request-id property. + * Set the xMsCopyId property: The x-ms-copy-id property. * - * @param xMsRequestId the xMsRequestId value to set. + * @param xMsCopyId the xMsCopyId value to set. * @return the BlobsGetPropertiesHeaders object itself. */ - public BlobsGetPropertiesHeaders setXMsRequestId(String xMsRequestId) { - this.xMsRequestId = xMsRequestId; + public BlobsGetPropertiesHeaders setXMsCopyId(String xMsCopyId) { + this.xMsCopyId = xMsCopyId; return this; } /** - * Get the contentType property: The Content-Type property. + * Get the xMsImmutabilityPolicyUntilDate property: The x-ms-immutability-policy-until-date property. * - * @return the contentType value. + * @return the xMsImmutabilityPolicyUntilDate value. */ - public String getContentType() { - return this.contentType; + public OffsetDateTime getXMsImmutabilityPolicyUntilDate() { + if (this.xMsImmutabilityPolicyUntilDate == null) { + return null; + } + return this.xMsImmutabilityPolicyUntilDate.getDateTime(); } /** - * Set the contentType property: The Content-Type property. + * Set the xMsImmutabilityPolicyUntilDate property: The x-ms-immutability-policy-until-date property. * - * @param contentType the contentType value to set. + * @param xMsImmutabilityPolicyUntilDate the xMsImmutabilityPolicyUntilDate value to set. * @return the BlobsGetPropertiesHeaders object itself. */ - public BlobsGetPropertiesHeaders setContentType(String contentType) { - this.contentType = contentType; + public BlobsGetPropertiesHeaders setXMsImmutabilityPolicyUntilDate(OffsetDateTime xMsImmutabilityPolicyUntilDate) { + if (xMsImmutabilityPolicyUntilDate == null) { + this.xMsImmutabilityPolicyUntilDate = null; + } else { + this.xMsImmutabilityPolicyUntilDate = new DateTimeRfc1123(xMsImmutabilityPolicyUntilDate); + } return this; } /** - * Get the xMsLastAccessTime property: The x-ms-last-access-time property. + * Get the xMsBlobSequenceNumber property: The x-ms-blob-sequence-number property. * - * @return the xMsLastAccessTime value. + * @return the xMsBlobSequenceNumber value. */ - public OffsetDateTime getXMsLastAccessTime() { - if (this.xMsLastAccessTime == null) { - return null; - } - return this.xMsLastAccessTime.getDateTime(); + public Long getXMsBlobSequenceNumber() { + return this.xMsBlobSequenceNumber; } /** - * Set the xMsLastAccessTime property: The x-ms-last-access-time property. + * Set the xMsBlobSequenceNumber property: The x-ms-blob-sequence-number property. * - * @param xMsLastAccessTime the xMsLastAccessTime value to set. + * @param xMsBlobSequenceNumber the xMsBlobSequenceNumber 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); - } + public BlobsGetPropertiesHeaders setXMsBlobSequenceNumber(Long xMsBlobSequenceNumber) { + this.xMsBlobSequenceNumber = xMsBlobSequenceNumber; return this; } /** - * Get the xMsVersion property: The x-ms-version property. + * Get the xMsBlobCommittedBlockCount property: The x-ms-blob-committed-block-count property. * - * @return the xMsVersion value. + * @return the xMsBlobCommittedBlockCount value. */ - public String getXMsVersion() { - return this.xMsVersion; + public Integer getXMsBlobCommittedBlockCount() { + return this.xMsBlobCommittedBlockCount; } /** - * Set the xMsVersion property: The x-ms-version property. + * Set the xMsBlobCommittedBlockCount property: The x-ms-blob-committed-block-count property. * - * @param xMsVersion the xMsVersion value to set. + * @param xMsBlobCommittedBlockCount the xMsBlobCommittedBlockCount value to set. * @return the BlobsGetPropertiesHeaders object itself. */ - public BlobsGetPropertiesHeaders setXMsVersion(String xMsVersion) { - this.xMsVersion = xMsVersion; + public BlobsGetPropertiesHeaders setXMsBlobCommittedBlockCount(Integer xMsBlobCommittedBlockCount) { + this.xMsBlobCommittedBlockCount = xMsBlobCommittedBlockCount; return this; } /** - * Get the xMsCopyId property: The x-ms-copy-id property. + * Get the xMsLegalHold property: The x-ms-legal-hold property. * - * @return the xMsCopyId value. + * @return the xMsLegalHold value. */ - public String getXMsCopyId() { - return this.xMsCopyId; + public Boolean isXMsLegalHold() { + return this.xMsLegalHold; } /** - * Set the xMsCopyId property: The x-ms-copy-id property. + * Set the xMsLegalHold property: The x-ms-legal-hold property. * - * @param xMsCopyId the xMsCopyId value to set. + * @param xMsLegalHold the xMsLegalHold value to set. * @return the BlobsGetPropertiesHeaders object itself. */ - public BlobsGetPropertiesHeaders setXMsCopyId(String xMsCopyId) { - this.xMsCopyId = xMsCopyId; + public BlobsGetPropertiesHeaders setXMsLegalHold(Boolean xMsLegalHold) { + this.xMsLegalHold = xMsLegalHold; return this; } /** - * Get the xMsCopySource property: The x-ms-copy-source property. + * Get the contentMD5 property: The Content-MD5 property. * - * @return the xMsCopySource value. + * @return the contentMD5 value. */ - public String getXMsCopySource() { - return this.xMsCopySource; + public byte[] getContentMD5() { + return CoreUtils.clone(this.contentMD5); } /** - * Set the xMsCopySource property: The x-ms-copy-source property. + * Set the contentMD5 property: The Content-MD5 property. * - * @param xMsCopySource the xMsCopySource value to set. + * @param contentMD5 the contentMD5 value to set. * @return the BlobsGetPropertiesHeaders object itself. */ - public BlobsGetPropertiesHeaders setXMsCopySource(String xMsCopySource) { - this.xMsCopySource = xMsCopySource; + public BlobsGetPropertiesHeaders setContentMD5(byte[] contentMD5) { + this.contentMD5 = CoreUtils.clone(contentMD5); return this; } /** - * Get the xMsBlobSequenceNumber property: The x-ms-blob-sequence-number property. + * Get the xMsOrPolicyId property: The x-ms-or-policy-id property. * - * @return the xMsBlobSequenceNumber value. + * @return the xMsOrPolicyId value. */ - public Long getXMsBlobSequenceNumber() { - return this.xMsBlobSequenceNumber; + public String getXMsOrPolicyId() { + return this.xMsOrPolicyId; } /** - * Set the xMsBlobSequenceNumber property: The x-ms-blob-sequence-number property. + * Set the xMsOrPolicyId property: The x-ms-or-policy-id property. * - * @param xMsBlobSequenceNumber the xMsBlobSequenceNumber value to set. + * @param xMsOrPolicyId the xMsOrPolicyId value to set. * @return the BlobsGetPropertiesHeaders object itself. */ - public BlobsGetPropertiesHeaders setXMsBlobSequenceNumber(Long xMsBlobSequenceNumber) { - this.xMsBlobSequenceNumber = xMsBlobSequenceNumber; + public BlobsGetPropertiesHeaders setXMsOrPolicyId(String xMsOrPolicyId) { + this.xMsOrPolicyId = xMsOrPolicyId; return this; } /** - * Get the xMsCopyProgress property: The x-ms-copy-progress property. + * Get the cacheControl property: The Cache-Control property. * - * @return the xMsCopyProgress value. + * @return the cacheControl value. */ - public String getXMsCopyProgress() { - return this.xMsCopyProgress; + public String getCacheControl() { + return this.cacheControl; } /** - * Set the xMsCopyProgress property: The x-ms-copy-progress property. + * Set the cacheControl property: The Cache-Control property. * - * @param xMsCopyProgress the xMsCopyProgress value to set. + * @param cacheControl the cacheControl value to set. * @return the BlobsGetPropertiesHeaders object itself. */ - public BlobsGetPropertiesHeaders setXMsCopyProgress(String xMsCopyProgress) { - this.xMsCopyProgress = xMsCopyProgress; + public BlobsGetPropertiesHeaders setCacheControl(String cacheControl) { + this.cacheControl = cacheControl; return this; } /** - * Get the xMsBlobCommittedBlockCount property: The x-ms-blob-committed-block-count property. + * Get the eTag property: The ETag property. * - * @return the xMsBlobCommittedBlockCount value. + * @return the eTag value. */ - public Integer getXMsBlobCommittedBlockCount() { - return this.xMsBlobCommittedBlockCount; + public String getETag() { + return this.eTag; } /** - * Set the xMsBlobCommittedBlockCount property: The x-ms-blob-committed-block-count property. + * Set the eTag property: The ETag property. * - * @param xMsBlobCommittedBlockCount the xMsBlobCommittedBlockCount value to set. + * @param eTag the eTag value to set. * @return the BlobsGetPropertiesHeaders object itself. */ - public BlobsGetPropertiesHeaders setXMsBlobCommittedBlockCount(Integer xMsBlobCommittedBlockCount) { - this.xMsBlobCommittedBlockCount = xMsBlobCommittedBlockCount; + public BlobsGetPropertiesHeaders setETag(String eTag) { + this.eTag = eTag; return this; } /** - * Get the xMsMeta property: The x-ms-meta- property. + * Get the contentDisposition property: The Content-Disposition property. * - * @return the xMsMeta value. + * @return the contentDisposition value. */ - public Map getXMsMeta() { - return this.xMsMeta; + public String getContentDisposition() { + return this.contentDisposition; } /** - * Set the xMsMeta property: The x-ms-meta- property. + * Set the contentDisposition property: The Content-Disposition property. * - * @param xMsMeta the xMsMeta value to set. + * @param contentDisposition the contentDisposition value to set. * @return the BlobsGetPropertiesHeaders object itself. */ - public BlobsGetPropertiesHeaders setXMsMeta(Map xMsMeta) { - this.xMsMeta = xMsMeta; + public BlobsGetPropertiesHeaders setContentDisposition(String contentDisposition) { + this.contentDisposition = contentDisposition; return this; } /** - * Get the dateProperty property: The Date property. + * Get the contentLanguage property: The Content-Language property. * - * @return the dateProperty value. + * @return the contentLanguage value. */ - public OffsetDateTime getDateProperty() { - if (this.dateProperty == null) { - return null; - } - return this.dateProperty.getDateTime(); + public String getContentLanguage() { + return this.contentLanguage; } /** - * Set the dateProperty property: The Date property. + * Set the contentLanguage property: The Content-Language property. * - * @param dateProperty the dateProperty value to set. + * @param contentLanguage the contentLanguage value to set. * @return the BlobsGetPropertiesHeaders object itself. */ - public BlobsGetPropertiesHeaders setDateProperty(OffsetDateTime dateProperty) { - if (dateProperty == null) { - this.dateProperty = null; - } else { - this.dateProperty = new DateTimeRfc1123(dateProperty); - } + public BlobsGetPropertiesHeaders setContentLanguage(String contentLanguage) { + this.contentLanguage = contentLanguage; return this; } /** - * Get the xMsExpiryTime property: The x-ms-expiry-time property. + * Get the xMsClientRequestId property: The x-ms-client-request-id property. * - * @return the xMsExpiryTime value. + * @return the xMsClientRequestId value. */ - public OffsetDateTime getXMsExpiryTime() { - if (this.xMsExpiryTime == null) { - return null; - } - return this.xMsExpiryTime.getDateTime(); + public String getXMsClientRequestId() { + return this.xMsClientRequestId; } /** - * Set the xMsExpiryTime property: The x-ms-expiry-time property. + * Set the xMsClientRequestId property: The x-ms-client-request-id property. * - * @param xMsExpiryTime the xMsExpiryTime value to set. + * @param xMsClientRequestId the xMsClientRequestId 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); - } + public BlobsGetPropertiesHeaders setXMsClientRequestId(String xMsClientRequestId) { + this.xMsClientRequestId = xMsClientRequestId; return this; } /** - * Get the contentMD5 property: The Content-MD5 property. + * Get the xMsOr property: The x-ms-or- property. * - * @return the contentMD5 value. + * @return the xMsOr value. */ - public byte[] getContentMD5() { - return CoreUtils.clone(this.contentMD5); + public Map getXMsOr() { + return this.xMsOr; } /** - * Set the contentMD5 property: The Content-MD5 property. + * Set the xMsOr property: The x-ms-or- property. * - * @param contentMD5 the contentMD5 value to set. + * @param xMsOr the xMsOr value to set. * @return the BlobsGetPropertiesHeaders object itself. */ - public BlobsGetPropertiesHeaders setContentMD5(byte[] contentMD5) { - this.contentMD5 = CoreUtils.clone(contentMD5); + public BlobsGetPropertiesHeaders setXMsOr(Map xMsOr) { + this.xMsOr = xMsOr; return this; } /** - * Get the xMsCopyCompletionTime property: The x-ms-copy-completion-time property. + * Get the xMsEncryptionScope property: The x-ms-encryption-scope property. * - * @return the xMsCopyCompletionTime value. + * @return the xMsEncryptionScope value. */ - public OffsetDateTime getXMsCopyCompletionTime() { - if (this.xMsCopyCompletionTime == null) { + 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.xMsCopyCompletionTime.getDateTime(); + return this.lastModified.getDateTime(); } /** - * Set the xMsCopyCompletionTime property: The x-ms-copy-completion-time property. + * Set the lastModified property: The Last-Modified property. * - * @param xMsCopyCompletionTime the xMsCopyCompletionTime value to set. + * @param lastModified the lastModified value to set. * @return the BlobsGetPropertiesHeaders object itself. */ - public BlobsGetPropertiesHeaders setXMsCopyCompletionTime(OffsetDateTime xMsCopyCompletionTime) { - if (xMsCopyCompletionTime == null) { - this.xMsCopyCompletionTime = null; + public BlobsGetPropertiesHeaders setLastModified(OffsetDateTime lastModified) { + if (lastModified == null) { + this.lastModified = null; } else { - this.xMsCopyCompletionTime = new DateTimeRfc1123(xMsCopyCompletionTime); + this.lastModified = new DateTimeRfc1123(lastModified); } return this; } /** - * Get the acceptRanges property: The Accept-Ranges property. + * Get the xMsAccessTierInferred property: The x-ms-access-tier-inferred property. * - * @return the acceptRanges value. + * @return the xMsAccessTierInferred value. */ - public String getAcceptRanges() { - return this.acceptRanges; + public Boolean isXMsAccessTierInferred() { + return this.xMsAccessTierInferred; } /** - * Set the acceptRanges property: The Accept-Ranges property. + * Set the xMsAccessTierInferred property: The x-ms-access-tier-inferred property. * - * @param acceptRanges the acceptRanges value to set. + * @param xMsAccessTierInferred the xMsAccessTierInferred value to set. * @return the BlobsGetPropertiesHeaders object itself. */ - public BlobsGetPropertiesHeaders setAcceptRanges(String acceptRanges) { - this.acceptRanges = acceptRanges; + public BlobsGetPropertiesHeaders setXMsAccessTierInferred(Boolean xMsAccessTierInferred) { + this.xMsAccessTierInferred = xMsAccessTierInferred; return this; } /** - * Get the xMsServerEncrypted property: The x-ms-server-encrypted property. + * Get the xMsImmutabilityPolicyMode property: The x-ms-immutability-policy-mode property. * - * @return the xMsServerEncrypted value. + * @return the xMsImmutabilityPolicyMode value. */ - public Boolean isXMsServerEncrypted() { - return this.xMsServerEncrypted; + public BlobImmutabilityPolicyMode getXMsImmutabilityPolicyMode() { + return this.xMsImmutabilityPolicyMode; } /** - * Set the xMsServerEncrypted property: The x-ms-server-encrypted property. + * Set the xMsImmutabilityPolicyMode property: The x-ms-immutability-policy-mode property. * - * @param xMsServerEncrypted the xMsServerEncrypted value to set. + * @param xMsImmutabilityPolicyMode the xMsImmutabilityPolicyMode value to set. * @return the BlobsGetPropertiesHeaders object itself. */ - public BlobsGetPropertiesHeaders setXMsServerEncrypted(Boolean xMsServerEncrypted) { - this.xMsServerEncrypted = xMsServerEncrypted; + public BlobsGetPropertiesHeaders setXMsImmutabilityPolicyMode( + BlobImmutabilityPolicyMode xMsImmutabilityPolicyMode) { + this.xMsImmutabilityPolicyMode = xMsImmutabilityPolicyMode; return this; } /** - * Get the xMsOrPolicyId property: The x-ms-or-policy-id property. + * Get the xMsAccessTier property: The x-ms-access-tier property. * - * @return the xMsOrPolicyId value. + * @return the xMsAccessTier value. */ - public String getXMsOrPolicyId() { - return this.xMsOrPolicyId; + public String getXMsAccessTier() { + return this.xMsAccessTier; } /** - * Set the xMsOrPolicyId property: The x-ms-or-policy-id property. + * Set the xMsAccessTier property: The x-ms-access-tier property. * - * @param xMsOrPolicyId the xMsOrPolicyId value to set. + * @param xMsAccessTier the xMsAccessTier value to set. * @return the BlobsGetPropertiesHeaders object itself. */ - public BlobsGetPropertiesHeaders setXMsOrPolicyId(String xMsOrPolicyId) { - this.xMsOrPolicyId = xMsOrPolicyId; + public BlobsGetPropertiesHeaders setXMsAccessTier(String xMsAccessTier) { + this.xMsAccessTier = xMsAccessTier; return this; } /** - * Get the xMsRehydratePriority property: The x-ms-rehydrate-priority property. + * Get the xMsCopyStatusDescription property: The x-ms-copy-status-description property. * - * @return the xMsRehydratePriority value. + * @return the xMsCopyStatusDescription value. */ - public String getXMsRehydratePriority() { - return this.xMsRehydratePriority; + public String getXMsCopyStatusDescription() { + return this.xMsCopyStatusDescription; } /** - * Set the xMsRehydratePriority property: The x-ms-rehydrate-priority property. + * Set the xMsCopyStatusDescription property: The x-ms-copy-status-description property. * - * @param xMsRehydratePriority the xMsRehydratePriority value to set. + * @param xMsCopyStatusDescription the xMsCopyStatusDescription value to set. * @return the BlobsGetPropertiesHeaders object itself. */ - public BlobsGetPropertiesHeaders setXMsRehydratePriority(String xMsRehydratePriority) { - this.xMsRehydratePriority = xMsRehydratePriority; + public BlobsGetPropertiesHeaders setXMsCopyStatusDescription(String xMsCopyStatusDescription) { + this.xMsCopyStatusDescription = xMsCopyStatusDescription; return this; } /** - * Get the cacheControl property: The Cache-Control property. + * Get the contentLength property: The Content-Length property. * - * @return the cacheControl value. + * @return the contentLength value. */ - public String getCacheControl() { - return this.cacheControl; + public Long getContentLength() { + return this.contentLength; } /** - * Set the cacheControl property: The Cache-Control property. + * Set the contentLength property: The Content-Length property. * - * @param cacheControl the cacheControl value to set. + * @param contentLength the contentLength value to set. * @return the BlobsGetPropertiesHeaders object itself. */ - public BlobsGetPropertiesHeaders setCacheControl(String cacheControl) { - this.cacheControl = cacheControl; + public BlobsGetPropertiesHeaders setContentLength(Long contentLength) { + this.contentLength = contentLength; return this; } /** - * Get the eTag property: The ETag property. + * Get the xMsRequestId property: The x-ms-request-id property. * - * @return the eTag value. + * @return the xMsRequestId value. */ - public String getETag() { - return this.eTag; + public String getXMsRequestId() { + return this.xMsRequestId; } /** - * Set the eTag property: The ETag property. + * Set the xMsRequestId property: The x-ms-request-id property. * - * @param eTag the eTag value to set. + * @param xMsRequestId the xMsRequestId value to set. * @return the BlobsGetPropertiesHeaders object itself. */ - public BlobsGetPropertiesHeaders setETag(String eTag) { - this.eTag = eTag; + public BlobsGetPropertiesHeaders setXMsRequestId(String xMsRequestId) { + this.xMsRequestId = xMsRequestId; return this; } /** - * Get the contentDisposition property: The Content-Disposition property. + * Get the contentType property: The Content-Type property. * - * @return the contentDisposition value. + * @return the contentType value. */ - public String getContentDisposition() { - return this.contentDisposition; + public String getContentType() { + return this.contentType; } /** - * Set the contentDisposition property: The Content-Disposition property. + * Set the contentType property: The Content-Type property. * - * @param contentDisposition the contentDisposition value to set. + * @param contentType the contentType value to set. * @return the BlobsGetPropertiesHeaders object itself. */ - public BlobsGetPropertiesHeaders setContentDisposition(String contentDisposition) { - this.contentDisposition = contentDisposition; + public BlobsGetPropertiesHeaders setContentType(String contentType) { + this.contentType = contentType; return this; } /** - * Get the xMsCopyStatus property: The x-ms-copy-status property. + * Get the xMsLastAccessTime property: The x-ms-last-access-time property. * - * @return the xMsCopyStatus value. + * @return the xMsLastAccessTime value. */ - public CopyStatusType getXMsCopyStatus() { - return this.xMsCopyStatus; + public OffsetDateTime getXMsLastAccessTime() { + if (this.xMsLastAccessTime == null) { + return null; + } + return this.xMsLastAccessTime.getDateTime(); } /** - * Set the xMsCopyStatus property: The x-ms-copy-status property. + * Set the xMsLastAccessTime property: The x-ms-last-access-time property. * - * @param xMsCopyStatus the xMsCopyStatus value to set. + * @param xMsLastAccessTime the xMsLastAccessTime value to set. * @return the BlobsGetPropertiesHeaders object itself. */ - public BlobsGetPropertiesHeaders setXMsCopyStatus(CopyStatusType xMsCopyStatus) { - this.xMsCopyStatus = xMsCopyStatus; + public BlobsGetPropertiesHeaders setXMsLastAccessTime(OffsetDateTime xMsLastAccessTime) { + if (xMsLastAccessTime == null) { + this.xMsLastAccessTime = null; + } else { + this.xMsLastAccessTime = new DateTimeRfc1123(xMsLastAccessTime); + } return this; } /** - * Get the xMsArchiveStatus property: The x-ms-archive-status property. + * Get the xMsCopySource property: The x-ms-copy-source property. * - * @return the xMsArchiveStatus value. + * @return the xMsCopySource value. */ - public String getXMsArchiveStatus() { - return this.xMsArchiveStatus; + public String getXMsCopySource() { + return this.xMsCopySource; } /** - * Set the xMsArchiveStatus property: The x-ms-archive-status property. + * Set the xMsCopySource property: The x-ms-copy-source property. * - * @param xMsArchiveStatus the xMsArchiveStatus value to set. + * @param xMsCopySource the xMsCopySource value to set. * @return the BlobsGetPropertiesHeaders object itself. */ - public BlobsGetPropertiesHeaders setXMsArchiveStatus(String xMsArchiveStatus) { - this.xMsArchiveStatus = xMsArchiveStatus; + public BlobsGetPropertiesHeaders setXMsCopySource(String xMsCopySource) { + this.xMsCopySource = xMsCopySource; return this; } /** - * Get the contentLanguage property: The Content-Language property. + * Get the xMsCopyProgress property: The x-ms-copy-progress property. * - * @return the contentLanguage value. + * @return the xMsCopyProgress value. */ - public String getContentLanguage() { - return this.contentLanguage; + public String getXMsCopyProgress() { + return this.xMsCopyProgress; } /** - * Set the contentLanguage property: The Content-Language property. + * Set the xMsCopyProgress property: The x-ms-copy-progress property. * - * @param contentLanguage the contentLanguage value to set. + * @param xMsCopyProgress the xMsCopyProgress value to set. * @return the BlobsGetPropertiesHeaders object itself. */ - public BlobsGetPropertiesHeaders setContentLanguage(String contentLanguage) { - this.contentLanguage = contentLanguage; + public BlobsGetPropertiesHeaders setXMsCopyProgress(String xMsCopyProgress) { + this.xMsCopyProgress = xMsCopyProgress; return this; } /** - * Get the xMsClientRequestId property: The x-ms-client-request-id property. + * Get the xMsMeta property: The x-ms-meta- property. * - * @return the xMsClientRequestId value. + * @return the xMsMeta value. */ - public String getXMsClientRequestId() { - return this.xMsClientRequestId; + public Map getXMsMeta() { + return this.xMsMeta; } /** - * Set the xMsClientRequestId property: The x-ms-client-request-id property. + * Set the xMsMeta property: The x-ms-meta- property. * - * @param xMsClientRequestId the xMsClientRequestId value to set. + * @param xMsMeta the xMsMeta value to set. * @return the BlobsGetPropertiesHeaders object itself. */ - public BlobsGetPropertiesHeaders setXMsClientRequestId(String xMsClientRequestId) { - this.xMsClientRequestId = xMsClientRequestId; + public BlobsGetPropertiesHeaders setXMsMeta(Map xMsMeta) { + this.xMsMeta = xMsMeta; return this; } /** - * Get the xMsOr property: The x-ms-or- property. + * Get the dateProperty property: The Date property. * - * @return the xMsOr value. + * @return the dateProperty value. */ - public Map getXMsOr() { - return this.xMsOr; + public OffsetDateTime getDateProperty() { + if (this.dateProperty == null) { + return null; + } + return this.dateProperty.getDateTime(); } /** - * Set the xMsOr property: The x-ms-or- property. + * Set the dateProperty property: The Date property. * - * @param xMsOr the xMsOr value to set. + * @param dateProperty the dateProperty value to set. * @return the BlobsGetPropertiesHeaders object itself. */ - public BlobsGetPropertiesHeaders setXMsOr(Map xMsOr) { - this.xMsOr = xMsOr; + public BlobsGetPropertiesHeaders setDateProperty(OffsetDateTime dateProperty) { + if (dateProperty == null) { + this.dateProperty = null; + } else { + this.dateProperty = new DateTimeRfc1123(dateProperty); + } return this; } /** - * Get the xMsEncryptionScope property: The x-ms-encryption-scope property. + * Get the xMsExpiryTime property: The x-ms-expiry-time property. * - * @return the xMsEncryptionScope value. + * @return the xMsExpiryTime value. */ - public String getXMsEncryptionScope() { - return this.xMsEncryptionScope; + public OffsetDateTime getXMsExpiryTime() { + if (this.xMsExpiryTime == null) { + return null; + } + return this.xMsExpiryTime.getDateTime(); } /** - * Set the xMsEncryptionScope property: The x-ms-encryption-scope property. + * Set the xMsExpiryTime property: The x-ms-expiry-time property. * - * @param xMsEncryptionScope the xMsEncryptionScope value to set. + * @param xMsExpiryTime the xMsExpiryTime value to set. * @return the BlobsGetPropertiesHeaders object itself. */ - public BlobsGetPropertiesHeaders setXMsEncryptionScope(String xMsEncryptionScope) { - this.xMsEncryptionScope = xMsEncryptionScope; + 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/src/main/java/com/azure/storage/blob/implementation/models/BlobsSetImmutabilityPolicyHeaders.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobsSetImmutabilityPolicyHeaders.java new file mode 100644 index 000000000000..74eb4099d88f --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobsSetImmutabilityPolicyHeaders.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.implementation.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.DateTimeRfc1123; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; +import java.time.OffsetDateTime; + +/** The BlobsSetImmutabilityPolicyHeaders model. */ +@JacksonXmlRootElement(localName = "null") +@Fluent +public final class BlobsSetImmutabilityPolicyHeaders { + /* + * The x-ms-immutability-policy-mode property. + */ + @JsonProperty(value = "x-ms-immutability-policy-mode") + private BlobImmutabilityPolicyMode xMsImmutabilityPolicyMode; + + /* + * The x-ms-version property. + */ + @JsonProperty(value = "x-ms-version") + private String xMsVersion; + + /* + * The x-ms-immutability-policy-until-date property. + */ + @JsonProperty(value = "x-ms-immutability-policy-until-date") + private DateTimeRfc1123 xMsImmutabilityPolicyUntilDate; + + /* + * The x-ms-request-id property. + */ + @JsonProperty(value = "x-ms-request-id") + private String xMsRequestId; + + /* + * The x-ms-client-request-id property. + */ + @JsonProperty(value = "x-ms-client-request-id") + private String xMsClientRequestId; + + /* + * The Date property. + */ + @JsonProperty(value = "Date") + private DateTimeRfc1123 dateProperty; + + /** + * 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 dateProperty property: The Date property. + * + * @return the dateProperty value. + */ + public OffsetDateTime getDateProperty() { + if (this.dateProperty == null) { + return null; + } + return this.dateProperty.getDateTime(); + } + + /** + * Set the dateProperty property: The Date property. + * + * @param dateProperty the dateProperty value to set. + * @return the BlobsSetImmutabilityPolicyHeaders object itself. + */ + public BlobsSetImmutabilityPolicyHeaders setDateProperty(OffsetDateTime dateProperty) { + if (dateProperty == null) { + this.dateProperty = null; + } else { + this.dateProperty = new DateTimeRfc1123(dateProperty); + } + return this; + } +} diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobsSetImmutabilityPolicyResponse.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobsSetImmutabilityPolicyResponse.java new file mode 100644 index 000000000000..20ac86d899b3 --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobsSetImmutabilityPolicyResponse.java @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.storage.blob.implementation.models; + +import com.azure.core.http.HttpHeaders; +import com.azure.core.http.HttpRequest; +import com.azure.core.http.rest.ResponseBase; + +/** Contains all response data for the setImmutabilityPolicy operation. */ +public final class BlobsSetImmutabilityPolicyResponse extends ResponseBase { + /** + * Creates an instance of BlobsSetImmutabilityPolicyResponse. + * + * @param request the request which resulted in this BlobsSetImmutabilityPolicyResponse. + * @param statusCode the status code of the HTTP response. + * @param rawHeaders the raw headers of the HTTP response. + * @param value the deserialized value of the HTTP response. + * @param headers the deserialized headers of the HTTP response. + */ + public BlobsSetImmutabilityPolicyResponse( + HttpRequest request, + int statusCode, + HttpHeaders rawHeaders, + Void value, + BlobsSetImmutabilityPolicyHeaders headers) { + super(request, statusCode, rawHeaders, value, headers); + } +} diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobsSetLegalHoldHeaders.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobsSetLegalHoldHeaders.java new file mode 100644 index 000000000000..89535bbe873d --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobsSetLegalHoldHeaders.java @@ -0,0 +1,153 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.storage.blob.implementation.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.DateTimeRfc1123; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; +import java.time.OffsetDateTime; + +/** The BlobsSetLegalHoldHeaders model. */ +@JacksonXmlRootElement(localName = "null") +@Fluent +public final class BlobsSetLegalHoldHeaders { + /* + * The x-ms-version property. + */ + @JsonProperty(value = "x-ms-version") + private String xMsVersion; + + /* + * The x-ms-request-id property. + */ + @JsonProperty(value = "x-ms-request-id") + private String xMsRequestId; + + /* + * The x-ms-legal-hold property. + */ + @JsonProperty(value = "x-ms-legal-hold") + private Boolean xMsLegalHold; + + /* + * The x-ms-client-request-id property. + */ + @JsonProperty(value = "x-ms-client-request-id") + private String xMsClientRequestId; + + /* + * The Date property. + */ + @JsonProperty(value = "Date") + private DateTimeRfc1123 dateProperty; + + /** + * Get the xMsVersion property: The x-ms-version property. + * + * @return the xMsVersion value. + */ + public String getXMsVersion() { + return this.xMsVersion; + } + + /** + * Set the xMsVersion property: The x-ms-version property. + * + * @param xMsVersion the xMsVersion value to set. + * @return the 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 dateProperty property: The Date property. + * + * @return the dateProperty value. + */ + public OffsetDateTime getDateProperty() { + if (this.dateProperty == null) { + return null; + } + return this.dateProperty.getDateTime(); + } + + /** + * Set the dateProperty property: The Date property. + * + * @param dateProperty the dateProperty value to set. + * @return the BlobsSetLegalHoldHeaders object itself. + */ + public BlobsSetLegalHoldHeaders setDateProperty(OffsetDateTime dateProperty) { + if (dateProperty == null) { + this.dateProperty = null; + } else { + this.dateProperty = new DateTimeRfc1123(dateProperty); + } + return this; + } +} diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobsSetLegalHoldResponse.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobsSetLegalHoldResponse.java new file mode 100644 index 000000000000..ec2b956fde42 --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobsSetLegalHoldResponse.java @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.storage.blob.implementation.models; + +import com.azure.core.http.HttpHeaders; +import com.azure.core.http.HttpRequest; +import com.azure.core.http.rest.ResponseBase; + +/** Contains all response data for the setLegalHold operation. */ +public final class BlobsSetLegalHoldResponse extends ResponseBase { + /** + * Creates an instance of BlobsSetLegalHoldResponse. + * + * @param request the request which resulted in this BlobsSetLegalHoldResponse. + * @param statusCode the status code of the HTTP response. + * @param rawHeaders the raw headers of the HTTP response. + * @param value the deserialized value of the HTTP response. + * @param headers the deserialized headers of the HTTP response. + */ + public BlobsSetLegalHoldResponse( + HttpRequest request, int statusCode, HttpHeaders rawHeaders, Void value, BlobsSetLegalHoldHeaders headers) { + super(request, statusCode, rawHeaders, value, headers); + } +} diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ContainersGetPropertiesHeaders.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ContainersGetPropertiesHeaders.java index f83c5a9cf40a..53e1398f6958 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ContainersGetPropertiesHeaders.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ContainersGetPropertiesHeaders.java @@ -32,6 +32,12 @@ public final class ContainersGetPropertiesHeaders { @JsonProperty(value = "x-ms-version") private String xMsVersion; + /* + * The x-ms-immutable-storage-with-versioning-enabled property. + */ + @JsonProperty(value = "x-ms-immutable-storage-with-versioning-enabled") + private Boolean xMsImmutableStorageWithVersioningEnabled; + /* * The x-ms-lease-state property. */ @@ -150,6 +156,29 @@ public ContainersGetPropertiesHeaders setXMsVersion(String 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. * diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobContainerEncryptionScope.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobContainerEncryptionScope.java index 496d445ad98f..51a544abcaa6 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobContainerEncryptionScope.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobContainerEncryptionScope.java @@ -9,6 +9,7 @@ import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; /** Parameter group. */ +@JacksonXmlRootElement(localName = "BlobContainerEncryptionScope") @Fluent @JacksonXmlRootElement(localName = "blob-container-encryption-scope") public final class BlobContainerEncryptionScope { @@ -16,17 +17,19 @@ 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. */ - @JsonProperty(value = "defaultEncryptionScope") private String defaultEncryptionScope; + @JsonProperty(value = "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. */ - @JsonProperty(value = "encryptionScopeOverridePrevented") private Boolean encryptionScopeOverridePrevented; + @JsonProperty(value = "encryptionScopeOverridePrevented") + /** * 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. diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobContainerItemProperties.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobContainerItemProperties.java index 3be9beca9300..8ee9941b2f2d 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobContainerItemProperties.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobContainerItemProperties.java @@ -86,6 +86,12 @@ public final class BlobContainerItemProperties { @JsonProperty(value = "RemainingRetentionDays") private Integer remainingRetentionDays; + /* + * Indicates if version level worm is enabled on this container. + */ + @JsonProperty(value = "ImmutableStorageWithVersioningEnabled") + private Boolean isImmutableStorageWithVersioningEnabled; + /** * Get the lastModified property: The Last-Modified property. * @@ -340,4 +346,27 @@ public BlobContainerItemProperties setRemainingRetentionDays(Integer remainingRe 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; + } } diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobErrorCode.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobErrorCode.java index 943167b15cc8..c4122d396697 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobErrorCode.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobErrorCode.java @@ -156,6 +156,10 @@ public final class BlobErrorCode extends ExpandableStringEnum { 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"); diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobHttpHeaders.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobHttpHeaders.java index 9eb5911dc6e9..20e524034dbd 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobHttpHeaders.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobHttpHeaders.java @@ -10,6 +10,7 @@ import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; /** Parameter group. */ +@JacksonXmlRootElement(localName = "BlobHttpHeaders") @Fluent @JacksonXmlRootElement(localName = "blob-http-headers") public final class BlobHttpHeaders { diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobServiceProperties.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobServiceProperties.java index 3a0ceff99890..8017e59a8815 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobServiceProperties.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobServiceProperties.java @@ -33,9 +33,9 @@ public final class BlobServiceProperties { * a summary of request statistics grouped by API in hour or minute * aggregates for blobs */ - @JsonProperty(value = "MinuteMetrics") private BlobMetrics minuteMetrics; + @JsonProperty(value = "MinuteMetrics") private static final class CorsWrapper { @JacksonXmlProperty(localName = "CorsRule") private final List items; @@ -64,9 +64,10 @@ private CorsWrapper(@JacksonXmlProperty(localName = "CorsRule") List com.azure.tools azure-autorest-customization - 1.0.0-beta.2 + 1.0.0-beta.4 junit diff --git a/sdk/storage/azure-storage-blob/swagger/src/main/java/com/azure/storage/blob/customization/BlobStorageCustomization.java b/sdk/storage/azure-storage-blob/swagger/src/main/java/com/azure/storage/blob/customization/BlobStorageCustomization.java index ee81f7e2e0ca..ac1d1d00e59a 100644 --- a/sdk/storage/azure-storage-blob/swagger/src/main/java/com/azure/storage/blob/customization/BlobStorageCustomization.java +++ b/sdk/storage/azure-storage-blob/swagger/src/main/java/com/azure/storage/blob/customization/BlobStorageCustomization.java @@ -9,13 +9,14 @@ import com.azure.autorest.customization.MethodCustomization; import com.azure.autorest.customization.PackageCustomization; import com.azure.autorest.customization.PropertyCustomization; +import org.slf4j.Logger; /** * Customization class for Blob Storage. */ public class BlobStorageCustomization extends Customization { @Override - public void customize(LibraryCustomization customization) { + public void customize(LibraryCustomization customization, Logger logger) { PackageCustomization impl = customization.getPackage("com.azure.storage.blob.implementation"); From 2abe1bc39edabf40c3f625690b4b8cf1cda4028e Mon Sep 17 00:00:00 2001 From: gapra Date: Tue, 18 May 2021 16:51:26 -0700 Subject: [PATCH 2/3] generated with old version instead --- .../blob/implementation/AppendBlobsImpl.java | 17 ++- .../blob/implementation/BlobsImpl.java | 102 +++++++----------- .../blob/implementation/BlockBlobsImpl.java | 27 ++--- .../blob/implementation/ContainersImpl.java | 82 ++++++-------- .../blob/implementation/PageBlobsImpl.java | 42 +++----- .../blob/implementation/ServicesImpl.java | 37 +++---- .../models/BlobContainerEncryptionScope.java | 7 +- .../storage/blob/models/BlobHttpHeaders.java | 1 - .../blob/models/BlobServiceProperties.java | 5 +- .../azure/storage/blob/models/CpkInfo.java | 1 - .../specialized/AppendBlobAsyncClient.java | 4 +- .../blob/specialized/BlobAsyncClientBase.java | 4 +- .../specialized/BlockBlobAsyncClient.java | 8 +- .../blob/specialized/PageBlobAsyncClient.java | 2 +- .../azure-storage-blob/swagger/pom.xml | 2 +- .../BlobStorageCustomization.java | 3 +- 16 files changed, 139 insertions(+), 205 deletions(-) diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/AppendBlobsImpl.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/AppendBlobsImpl.java index 4759bf6ac67d..0f5b9bea4d58 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/AppendBlobsImpl.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/AppendBlobsImpl.java @@ -64,8 +64,8 @@ public final class AppendBlobsImpl { @ServiceInterface(name = "AzureBlobStorageAppe") public interface AppendBlobsService { @Put("/{containerName}/{blob}") - @UnexpectedResponseExceptionType(com.azure.storage.blob.models.BlobStorageException.class) @ExpectedResponses({201}) + @UnexpectedResponseExceptionType(com.azure.storage.blob.models.BlobStorageException.class) Mono create( @HostParam("url") String url, @HeaderParam("x-ms-blob-type") String blobType, @@ -101,10 +101,9 @@ Mono create( @Put("/{containerName}/{blob}") @ExpectedResponses({201}) + @UnexpectedResponseExceptionType(com.azure.storage.blob.models.BlobStorageException.class) Mono appendBlock( - @UnexpectedResponseExceptionType(com.azure.storage.blob.models.BlobStorageException.class) - @HostParam("url") - String url, + @HostParam("url") String url, @QueryParam("comp") String comp, @PathParam("containerName") String containerName, @PathParam("blob") String blob, @@ -132,10 +131,9 @@ Mono appendBlock( @Put("/{containerName}/{blob}") @ExpectedResponses({201}) + @UnexpectedResponseExceptionType(com.azure.storage.blob.models.BlobStorageException.class) Mono appendBlockFromUrl( - @UnexpectedResponseExceptionType(com.azure.storage.blob.models.BlobStorageException.class) - @HostParam("url") - String url, + @HostParam("url") String url, @QueryParam("comp") String comp, @PathParam("containerName") String containerName, @PathParam("blob") String blob, @@ -169,10 +167,9 @@ Mono appendBlockFromUrl( @Put("/{containerName}/{blob}") @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(com.azure.storage.blob.models.BlobStorageException.class) Mono seal( - @UnexpectedResponseExceptionType(com.azure.storage.blob.models.BlobStorageException.class) - @HostParam("url") - String url, + @HostParam("url") String url, @QueryParam("comp") String comp, @PathParam("containerName") String containerName, @PathParam("blob") String blob, diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/BlobsImpl.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/BlobsImpl.java index 81c56f9a050b..23133e3b561c 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/BlobsImpl.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/BlobsImpl.java @@ -98,8 +98,8 @@ public final class BlobsImpl { @ServiceInterface(name = "AzureBlobStorageBlob") public interface BlobsService { @Get("/{containerName}/{blob}") - @UnexpectedResponseExceptionType(com.azure.storage.blob.models.BlobStorageException.class) @ExpectedResponses({200, 206}) + @UnexpectedResponseExceptionType(com.azure.storage.blob.models.BlobStorageException.class) Mono download( @HostParam("url") String url, @PathParam("containerName") String containerName, @@ -126,10 +126,9 @@ Mono download( @Head("/{containerName}/{blob}") @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(com.azure.storage.blob.models.BlobStorageException.class) Mono getProperties( - @UnexpectedResponseExceptionType(com.azure.storage.blob.models.BlobStorageException.class) - @HostParam("url") - String url, + @HostParam("url") String url, @PathParam("containerName") String containerName, @PathParam("blob") String blob, @QueryParam("snapshot") String snapshot, @@ -151,10 +150,9 @@ Mono getProperties( @Delete("/{containerName}/{blob}") @ExpectedResponses({202}) + @UnexpectedResponseExceptionType(com.azure.storage.blob.models.BlobStorageException.class) Mono delete( - @UnexpectedResponseExceptionType(com.azure.storage.blob.models.BlobStorageException.class) - @HostParam("url") - String url, + @HostParam("url") String url, @PathParam("containerName") String containerName, @PathParam("blob") String blob, @QueryParam("snapshot") String snapshot, @@ -250,10 +248,9 @@ Mono rename( @Put("/{containerName}/{blob}") @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(com.azure.storage.blob.models.BlobStorageException.class) Mono undelete( - @UnexpectedResponseExceptionType(com.azure.storage.blob.models.BlobStorageException.class) - @HostParam("url") - String url, + @HostParam("url") String url, @QueryParam("comp") String comp, @PathParam("containerName") String containerName, @PathParam("blob") String blob, @@ -265,10 +262,9 @@ Mono undelete( @Put("/{containerName}/{blob}") @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(com.azure.storage.blob.models.BlobStorageException.class) Mono setExpiry( - @UnexpectedResponseExceptionType(com.azure.storage.blob.models.BlobStorageException.class) - @HostParam("url") - String url, + @HostParam("url") String url, @QueryParam("comp") String comp, @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-version") String version, @@ -280,10 +276,9 @@ Mono setExpiry( @Put("/{containerName}/{blob}") @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(com.azure.storage.blob.models.BlobStorageException.class) Mono setHttpHeaders( - @UnexpectedResponseExceptionType(com.azure.storage.blob.models.BlobStorageException.class) - @HostParam("url") - String url, + @HostParam("url") String url, @QueryParam("comp") String comp, @PathParam("containerName") String containerName, @PathParam("blob") String blob, @@ -347,10 +342,9 @@ Mono setLegalHold( @Put("/{containerName}/{blob}") @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(com.azure.storage.blob.models.BlobStorageException.class) Mono setMetadata( - @UnexpectedResponseExceptionType(com.azure.storage.blob.models.BlobStorageException.class) - @HostParam("url") - String url, + @HostParam("url") String url, @QueryParam("comp") String comp, @PathParam("containerName") String containerName, @PathParam("blob") String blob, @@ -373,10 +367,9 @@ Mono setMetadata( @Put("/{containerName}/{blob}") @ExpectedResponses({201}) + @UnexpectedResponseExceptionType(com.azure.storage.blob.models.BlobStorageException.class) Mono acquireLease( - @UnexpectedResponseExceptionType(com.azure.storage.blob.models.BlobStorageException.class) - @HostParam("url") - String url, + @HostParam("url") String url, @QueryParam("comp") String comp, @HeaderParam("x-ms-lease-action") String action, @PathParam("containerName") String containerName, @@ -396,10 +389,9 @@ Mono acquireLease( @Put("/{containerName}/{blob}") @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(com.azure.storage.blob.models.BlobStorageException.class) Mono releaseLease( - @UnexpectedResponseExceptionType(com.azure.storage.blob.models.BlobStorageException.class) - @HostParam("url") - String url, + @HostParam("url") String url, @QueryParam("comp") String comp, @HeaderParam("x-ms-lease-action") String action, @PathParam("containerName") String containerName, @@ -419,10 +411,9 @@ Mono releaseLease( @Put("/{containerName}/{blob}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(com.azure.storage.blob.models.BlobStorageException.class) + @UnexpectedResponseExceptionType(com.azure.storage.blob.models.BlobStorageException.class) Mono renewLease( - @UnexpectedResponseExceptionType(com.azure.storage.blob.models.BlobStorageException.class) - @HostParam("url") - String url, + @HostParam("url") String url, @QueryParam("comp") String comp, @HeaderParam("x-ms-lease-action") String action, @PathParam("containerName") String containerName, @@ -442,10 +433,9 @@ Mono renewLease( @Put("/{containerName}/{blob}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(com.azure.storage.blob.models.BlobStorageException.class) + @UnexpectedResponseExceptionType(com.azure.storage.blob.models.BlobStorageException.class) Mono changeLease( - @UnexpectedResponseExceptionType(com.azure.storage.blob.models.BlobStorageException.class) - @HostParam("url") - String url, + @HostParam("url") String url, @QueryParam("comp") String comp, @HeaderParam("x-ms-lease-action") String action, @PathParam("containerName") String containerName, @@ -465,10 +455,9 @@ Mono changeLease( @Put("/{containerName}/{blob}") @ExpectedResponses({202}) + @UnexpectedResponseExceptionType(com.azure.storage.blob.models.BlobStorageException.class) Mono breakLease( - @UnexpectedResponseExceptionType(com.azure.storage.blob.models.BlobStorageException.class) - @HostParam("url") - String url, + @HostParam("url") String url, @QueryParam("comp") String comp, @HeaderParam("x-ms-lease-action") String action, @PathParam("containerName") String containerName, @@ -487,10 +476,9 @@ Mono breakLease( @Put("/{containerName}/{blob}") @ExpectedResponses({201}) + @UnexpectedResponseExceptionType(com.azure.storage.blob.models.BlobStorageException.class) Mono createSnapshot( - @UnexpectedResponseExceptionType(com.azure.storage.blob.models.BlobStorageException.class) - @HostParam("url") - String url, + @HostParam("url") String url, @QueryParam("comp") String comp, @PathParam("containerName") String containerName, @PathParam("blob") String blob, @@ -513,10 +501,9 @@ Mono createSnapshot( @Put("/{containerName}/{blob}") @ExpectedResponses({202}) + @UnexpectedResponseExceptionType(com.azure.storage.blob.models.BlobStorageException.class) Mono startCopyFromURL( - @UnexpectedResponseExceptionType(com.azure.storage.blob.models.BlobStorageException.class) - @HostParam("url") - String url, + @HostParam("url") String url, @PathParam("containerName") String containerName, @PathParam("blob") String blob, @QueryParam("timeout") Integer timeout, @@ -547,10 +534,9 @@ Mono startCopyFromURL( @Put("/{containerName}/{blob}") @ExpectedResponses({202}) + @UnexpectedResponseExceptionType(com.azure.storage.blob.models.BlobStorageException.class) Mono copyFromURL( - @UnexpectedResponseExceptionType(com.azure.storage.blob.models.BlobStorageException.class) - @HostParam("url") - String url, + @HostParam("url") String url, @HeaderParam("x-ms-requires-sync") String xMsRequiresSync, @PathParam("containerName") String containerName, @PathParam("blob") String blob, @@ -580,10 +566,9 @@ Mono copyFromURL( @Put("/{containerName}/{blob}") @ExpectedResponses({204}) + @UnexpectedResponseExceptionType(com.azure.storage.blob.models.BlobStorageException.class) Mono abortCopyFromURL( - @UnexpectedResponseExceptionType(com.azure.storage.blob.models.BlobStorageException.class) - @HostParam("url") - String url, + @HostParam("url") String url, @QueryParam("comp") String comp, @HeaderParam("x-ms-copy-action") String copyActionAbortConstant, @PathParam("containerName") String containerName, @@ -598,10 +583,9 @@ Mono abortCopyFromURL( @Put("/{containerName}/{blob}") @ExpectedResponses({200, 202}) + @UnexpectedResponseExceptionType(com.azure.storage.blob.models.BlobStorageException.class) Mono setTier( - @UnexpectedResponseExceptionType(com.azure.storage.blob.models.BlobStorageException.class) - @HostParam("url") - String url, + @HostParam("url") String url, @QueryParam("comp") String comp, @PathParam("containerName") String containerName, @PathParam("blob") String blob, @@ -619,10 +603,9 @@ Mono setTier( @Get("/{containerName}/{blob}") @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(com.azure.storage.blob.models.BlobStorageException.class) Mono getAccountInfo( - @UnexpectedResponseExceptionType(com.azure.storage.blob.models.BlobStorageException.class) - @HostParam("url") - String url, + @HostParam("url") String url, @QueryParam("restype") String restype, @QueryParam("comp") String comp, @PathParam("containerName") String containerName, @@ -633,10 +616,9 @@ Mono getAccountInfo( @Post("/{containerName}/{blob}") @ExpectedResponses({200, 206}) + @UnexpectedResponseExceptionType(com.azure.storage.blob.models.BlobStorageException.class) Mono query( - @UnexpectedResponseExceptionType(com.azure.storage.blob.models.BlobStorageException.class) - @HostParam("url") - String url, + @HostParam("url") String url, @QueryParam("comp") String comp, @PathParam("containerName") String containerName, @PathParam("blob") String blob, @@ -659,10 +641,9 @@ Mono query( @Get("/{containerName}/{blob}") @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(com.azure.storage.blob.models.BlobStorageException.class) Mono getTags( - @UnexpectedResponseExceptionType(com.azure.storage.blob.models.BlobStorageException.class) - @HostParam("url") - String url, + @HostParam("url") String url, @QueryParam("comp") String comp, @PathParam("containerName") String containerName, @PathParam("blob") String blob, @@ -678,10 +659,9 @@ Mono getTags( @Put("/{containerName}/{blob}") @ExpectedResponses({204}) + @UnexpectedResponseExceptionType(com.azure.storage.blob.models.BlobStorageException.class) Mono setTags( - @UnexpectedResponseExceptionType(com.azure.storage.blob.models.BlobStorageException.class) - @HostParam("url") - String url, + @HostParam("url") String url, @QueryParam("comp") String comp, @PathParam("containerName") String containerName, @PathParam("blob") String blob, diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/BlockBlobsImpl.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/BlockBlobsImpl.java index a8403157b0aa..9770b1489f9f 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/BlockBlobsImpl.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/BlockBlobsImpl.java @@ -70,8 +70,8 @@ public final class BlockBlobsImpl { @ServiceInterface(name = "AzureBlobStorageBloc") public interface BlockBlobsService { @Put("/{containerName}/{blob}") - @UnexpectedResponseExceptionType(com.azure.storage.blob.models.BlobStorageException.class) @ExpectedResponses({201}) + @UnexpectedResponseExceptionType(com.azure.storage.blob.models.BlobStorageException.class) Mono upload( @HostParam("url") String url, @HeaderParam("x-ms-blob-type") String blobType, @@ -110,10 +110,9 @@ Mono upload( @Put("/{containerName}/{blob}") @ExpectedResponses({201}) + @UnexpectedResponseExceptionType(com.azure.storage.blob.models.BlobStorageException.class) Mono putBlobFromUrl( - @UnexpectedResponseExceptionType(com.azure.storage.blob.models.BlobStorageException.class) - @HostParam("url") - String url, + @HostParam("url") String url, @HeaderParam("x-ms-blob-type") String blobType, @PathParam("containerName") String containerName, @PathParam("blob") String blob, @@ -154,10 +153,9 @@ Mono putBlobFromUrl( @Put("/{containerName}/{blob}") @ExpectedResponses({201}) + @UnexpectedResponseExceptionType(com.azure.storage.blob.models.BlobStorageException.class) Mono stageBlock( - @UnexpectedResponseExceptionType(com.azure.storage.blob.models.BlobStorageException.class) - @HostParam("url") - String url, + @HostParam("url") String url, @QueryParam("comp") String comp, @PathParam("containerName") String containerName, @PathParam("blob") String blob, @@ -179,10 +177,9 @@ Mono stageBlock( @Put("/{containerName}/{blob}") @ExpectedResponses({201}) + @UnexpectedResponseExceptionType(com.azure.storage.blob.models.BlobStorageException.class) Mono stageBlockFromURL( - @UnexpectedResponseExceptionType(com.azure.storage.blob.models.BlobStorageException.class) - @HostParam("url") - String url, + @HostParam("url") String url, @QueryParam("comp") String comp, @PathParam("containerName") String containerName, @PathParam("blob") String blob, @@ -209,10 +206,9 @@ Mono stageBlockFromURL( @Put("/{containerName}/{blob}") @ExpectedResponses({201}) + @UnexpectedResponseExceptionType(com.azure.storage.blob.models.BlobStorageException.class) Mono commitBlockList( - @UnexpectedResponseExceptionType(com.azure.storage.blob.models.BlobStorageException.class) - @HostParam("url") - String url, + @HostParam("url") String url, @QueryParam("comp") String comp, @PathParam("containerName") String containerName, @PathParam("blob") String blob, @@ -249,10 +245,9 @@ Mono commitBlockList( @Get("/{containerName}/{blob}") @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(com.azure.storage.blob.models.BlobStorageException.class) Mono getBlockList( - @UnexpectedResponseExceptionType(com.azure.storage.blob.models.BlobStorageException.class) - @HostParam("url") - String url, + @HostParam("url") String url, @QueryParam("comp") String comp, @PathParam("containerName") String containerName, @PathParam("blob") String blob, diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/ContainersImpl.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/ContainersImpl.java index 18040af5b7ef..1f28c0a3cda5 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/ContainersImpl.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/ContainersImpl.java @@ -80,8 +80,8 @@ public final class ContainersImpl { @ServiceInterface(name = "AzureBlobStorageCont") public interface ContainersService { @Put("/{containerName}") - @UnexpectedResponseExceptionType(com.azure.storage.blob.models.BlobStorageException.class) @ExpectedResponses({201}) + @UnexpectedResponseExceptionType(com.azure.storage.blob.models.BlobStorageException.class) Mono create( @HostParam("url") String url, @QueryParam("restype") String restype, @@ -98,10 +98,9 @@ Mono create( @Get("/{containerName}") @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(com.azure.storage.blob.models.BlobStorageException.class) Mono getProperties( - @UnexpectedResponseExceptionType(com.azure.storage.blob.models.BlobStorageException.class) - @HostParam("url") - String url, + @HostParam("url") String url, @QueryParam("restype") String restype, @PathParam("containerName") String containerName, @QueryParam("timeout") Integer timeout, @@ -113,10 +112,9 @@ Mono getProperties( @Delete("/{containerName}") @ExpectedResponses({202}) + @UnexpectedResponseExceptionType(com.azure.storage.blob.models.BlobStorageException.class) Mono delete( - @UnexpectedResponseExceptionType(com.azure.storage.blob.models.BlobStorageException.class) - @HostParam("url") - String url, + @HostParam("url") String url, @QueryParam("restype") String restype, @PathParam("containerName") String containerName, @QueryParam("timeout") Integer timeout, @@ -130,10 +128,9 @@ Mono delete( @Put("/{containerName}") @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(com.azure.storage.blob.models.BlobStorageException.class) Mono setMetadata( - @UnexpectedResponseExceptionType(com.azure.storage.blob.models.BlobStorageException.class) - @HostParam("url") - String url, + @HostParam("url") String url, @QueryParam("restype") String restype, @QueryParam("comp") String comp, @PathParam("containerName") String containerName, @@ -148,10 +145,9 @@ Mono setMetadata( @Get("/{containerName}") @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(com.azure.storage.blob.models.BlobStorageException.class) Mono getAccessPolicy( - @UnexpectedResponseExceptionType(com.azure.storage.blob.models.BlobStorageException.class) - @HostParam("url") - String url, + @HostParam("url") String url, @QueryParam("restype") String restype, @QueryParam("comp") String comp, @PathParam("containerName") String containerName, @@ -164,10 +160,9 @@ Mono getAccessPolicy( @Put("/{containerName}") @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(com.azure.storage.blob.models.BlobStorageException.class) Mono setAccessPolicy( - @UnexpectedResponseExceptionType(com.azure.storage.blob.models.BlobStorageException.class) - @HostParam("url") - String url, + @HostParam("url") String url, @QueryParam("restype") String restype, @QueryParam("comp") String comp, @PathParam("containerName") String containerName, @@ -184,10 +179,9 @@ Mono setAccessPolicy( @Put("/{containerName}") @ExpectedResponses({201}) + @UnexpectedResponseExceptionType(com.azure.storage.blob.models.BlobStorageException.class) Mono restore( - @UnexpectedResponseExceptionType(com.azure.storage.blob.models.BlobStorageException.class) - @HostParam("url") - String url, + @HostParam("url") String url, @QueryParam("restype") String restype, @QueryParam("comp") String comp, @PathParam("containerName") String containerName, @@ -201,10 +195,9 @@ Mono restore( @Put("/{containerName}") @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(com.azure.storage.blob.models.BlobStorageException.class) Mono rename( - @UnexpectedResponseExceptionType(com.azure.storage.blob.models.BlobStorageException.class) - @HostParam("url") - String url, + @HostParam("url") String url, @QueryParam("restype") String restype, @QueryParam("comp") String comp, @PathParam("containerName") String containerName, @@ -218,10 +211,9 @@ Mono rename( @Post("/{containerName}") @ExpectedResponses({202}) + @UnexpectedResponseExceptionType(com.azure.storage.blob.models.BlobStorageException.class) Mono submitBatch( - @UnexpectedResponseExceptionType(com.azure.storage.blob.models.BlobStorageException.class) - @HostParam("url") - String url, + @HostParam("url") String url, @QueryParam("restype") String restype, @QueryParam("comp") String comp, @PathParam("containerName") String containerName, @@ -236,10 +228,9 @@ Mono submitBatch( @Put("/{containerName}") @ExpectedResponses({201}) + @UnexpectedResponseExceptionType(com.azure.storage.blob.models.BlobStorageException.class) Mono acquireLease( - @UnexpectedResponseExceptionType(com.azure.storage.blob.models.BlobStorageException.class) - @HostParam("url") - String url, + @HostParam("url") String url, @QueryParam("comp") String comp, @QueryParam("restype") String restype, @HeaderParam("x-ms-lease-action") String action, @@ -256,10 +247,9 @@ Mono acquireLease( @Put("/{containerName}") @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(com.azure.storage.blob.models.BlobStorageException.class) Mono releaseLease( - @UnexpectedResponseExceptionType(com.azure.storage.blob.models.BlobStorageException.class) - @HostParam("url") - String url, + @HostParam("url") String url, @QueryParam("comp") String comp, @QueryParam("restype") String restype, @HeaderParam("x-ms-lease-action") String action, @@ -275,10 +265,9 @@ Mono releaseLease( @Put("/{containerName}") @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(com.azure.storage.blob.models.BlobStorageException.class) Mono renewLease( - @UnexpectedResponseExceptionType(com.azure.storage.blob.models.BlobStorageException.class) - @HostParam("url") - String url, + @HostParam("url") String url, @QueryParam("comp") String comp, @QueryParam("restype") String restype, @HeaderParam("x-ms-lease-action") String action, @@ -294,10 +283,9 @@ Mono renewLease( @Put("/{containerName}") @ExpectedResponses({202}) + @UnexpectedResponseExceptionType(com.azure.storage.blob.models.BlobStorageException.class) Mono breakLease( - @UnexpectedResponseExceptionType(com.azure.storage.blob.models.BlobStorageException.class) - @HostParam("url") - String url, + @HostParam("url") String url, @QueryParam("comp") String comp, @QueryParam("restype") String restype, @HeaderParam("x-ms-lease-action") String action, @@ -313,10 +301,9 @@ Mono breakLease( @Put("/{containerName}") @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(com.azure.storage.blob.models.BlobStorageException.class) Mono changeLease( - @UnexpectedResponseExceptionType(com.azure.storage.blob.models.BlobStorageException.class) - @HostParam("url") - String url, + @HostParam("url") String url, @QueryParam("comp") String comp, @QueryParam("restype") String restype, @HeaderParam("x-ms-lease-action") String action, @@ -333,10 +320,9 @@ Mono changeLease( @Get("/{containerName}") @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(com.azure.storage.blob.models.BlobStorageException.class) Mono listBlobFlatSegment( - @UnexpectedResponseExceptionType(com.azure.storage.blob.models.BlobStorageException.class) - @HostParam("url") - String url, + @HostParam("url") String url, @QueryParam("restype") String restype, @QueryParam("comp") String comp, @PathParam("containerName") String containerName, @@ -352,10 +338,9 @@ Mono listBlobFlatSegment( @Get("/{containerName}") @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(com.azure.storage.blob.models.BlobStorageException.class) Mono listBlobHierarchySegment( - @UnexpectedResponseExceptionType(com.azure.storage.blob.models.BlobStorageException.class) - @HostParam("url") - String url, + @HostParam("url") String url, @QueryParam("restype") String restype, @QueryParam("comp") String comp, @PathParam("containerName") String containerName, @@ -372,10 +357,9 @@ Mono listBlobHierarchySegment( @Get("/{containerName}") @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(com.azure.storage.blob.models.BlobStorageException.class) Mono getAccountInfo( - @UnexpectedResponseExceptionType(com.azure.storage.blob.models.BlobStorageException.class) - @HostParam("url") - String url, + @HostParam("url") String url, @QueryParam("restype") String restype, @QueryParam("comp") String comp, @PathParam("containerName") String containerName, diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/PageBlobsImpl.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/PageBlobsImpl.java index 8d7eee3d0ba9..88dd509959c1 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/PageBlobsImpl.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/PageBlobsImpl.java @@ -72,8 +72,8 @@ public final class PageBlobsImpl { @ServiceInterface(name = "AzureBlobStoragePage") public interface PageBlobsService { @Put("/{containerName}/{blob}") - @UnexpectedResponseExceptionType(com.azure.storage.blob.models.BlobStorageException.class) @ExpectedResponses({201}) + @UnexpectedResponseExceptionType(com.azure.storage.blob.models.BlobStorageException.class) Mono create( @HostParam("url") String url, @HeaderParam("x-ms-blob-type") String blobType, @@ -112,10 +112,9 @@ Mono create( @Put("/{containerName}/{blob}") @ExpectedResponses({201}) + @UnexpectedResponseExceptionType(com.azure.storage.blob.models.BlobStorageException.class) Mono uploadPages( - @UnexpectedResponseExceptionType(com.azure.storage.blob.models.BlobStorageException.class) - @HostParam("url") - String url, + @HostParam("url") String url, @QueryParam("comp") String comp, @HeaderParam("x-ms-page-write") String pageWrite, @PathParam("containerName") String containerName, @@ -146,10 +145,9 @@ Mono uploadPages( @Put("/{containerName}/{blob}") @ExpectedResponses({201}) + @UnexpectedResponseExceptionType(com.azure.storage.blob.models.BlobStorageException.class) Mono clearPages( - @UnexpectedResponseExceptionType(com.azure.storage.blob.models.BlobStorageException.class) - @HostParam("url") - String url, + @HostParam("url") String url, @QueryParam("comp") String comp, @HeaderParam("x-ms-page-write") String pageWrite, @PathParam("containerName") String containerName, @@ -177,10 +175,9 @@ Mono clearPages( @Put("/{containerName}/{blob}") @ExpectedResponses({201}) + @UnexpectedResponseExceptionType(com.azure.storage.blob.models.BlobStorageException.class) Mono uploadPagesFromURL( - @UnexpectedResponseExceptionType(com.azure.storage.blob.models.BlobStorageException.class) - @HostParam("url") - String url, + @HostParam("url") String url, @QueryParam("comp") String comp, @HeaderParam("x-ms-page-write") String pageWrite, @PathParam("containerName") String containerName, @@ -216,10 +213,9 @@ Mono uploadPagesFromURL( @Get("/{containerName}/{blob}") @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(com.azure.storage.blob.models.BlobStorageException.class) Mono getPageRanges( - @UnexpectedResponseExceptionType(com.azure.storage.blob.models.BlobStorageException.class) - @HostParam("url") - String url, + @HostParam("url") String url, @QueryParam("comp") String comp, @PathParam("containerName") String containerName, @PathParam("blob") String blob, @@ -239,10 +235,9 @@ Mono getPageRanges( @Get("/{containerName}/{blob}") @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(com.azure.storage.blob.models.BlobStorageException.class) Mono getPageRangesDiff( - @UnexpectedResponseExceptionType(com.azure.storage.blob.models.BlobStorageException.class) - @HostParam("url") - String url, + @HostParam("url") String url, @QueryParam("comp") String comp, @PathParam("containerName") String containerName, @PathParam("blob") String blob, @@ -264,10 +259,9 @@ Mono getPageRangesDiff( @Put("/{containerName}/{blob}") @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(com.azure.storage.blob.models.BlobStorageException.class) Mono resize( - @UnexpectedResponseExceptionType(com.azure.storage.blob.models.BlobStorageException.class) - @HostParam("url") - String url, + @HostParam("url") String url, @QueryParam("comp") String comp, @PathParam("containerName") String containerName, @PathParam("blob") String blob, @@ -290,10 +284,9 @@ Mono resize( @Put("/{containerName}/{blob}") @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(com.azure.storage.blob.models.BlobStorageException.class) Mono updateSequenceNumber( - @UnexpectedResponseExceptionType(com.azure.storage.blob.models.BlobStorageException.class) - @HostParam("url") - String url, + @HostParam("url") String url, @QueryParam("comp") String comp, @PathParam("containerName") String containerName, @PathParam("blob") String blob, @@ -313,10 +306,9 @@ Mono updateSequenceNumber( @Put("/{containerName}/{blob}") @ExpectedResponses({202}) + @UnexpectedResponseExceptionType(com.azure.storage.blob.models.BlobStorageException.class) Mono copyIncremental( - @UnexpectedResponseExceptionType(com.azure.storage.blob.models.BlobStorageException.class) - @HostParam("url") - String url, + @HostParam("url") String url, @QueryParam("comp") String comp, @PathParam("containerName") String containerName, @PathParam("blob") String blob, diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/ServicesImpl.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/ServicesImpl.java index 39ae673d4373..7d1e449d2f8a 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/ServicesImpl.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/ServicesImpl.java @@ -69,8 +69,8 @@ public final class ServicesImpl { @ServiceInterface(name = "AzureBlobStorageServ") public interface ServicesService { @Put("/") - @UnexpectedResponseExceptionType(com.azure.storage.blob.models.BlobStorageException.class) @ExpectedResponses({202}) + @UnexpectedResponseExceptionType(com.azure.storage.blob.models.BlobStorageException.class) Mono setProperties( @HostParam("url") String url, @QueryParam("restype") String restype, @@ -84,10 +84,9 @@ Mono setProperties( @Get("/") @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(com.azure.storage.blob.models.BlobStorageException.class) Mono getProperties( - @UnexpectedResponseExceptionType(com.azure.storage.blob.models.BlobStorageException.class) - @HostParam("url") - String url, + @HostParam("url") String url, @QueryParam("restype") String restype, @QueryParam("comp") String comp, @QueryParam("timeout") Integer timeout, @@ -98,10 +97,9 @@ Mono getProperties( @Get("/") @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(com.azure.storage.blob.models.BlobStorageException.class) Mono getStatistics( - @UnexpectedResponseExceptionType(com.azure.storage.blob.models.BlobStorageException.class) - @HostParam("url") - String url, + @HostParam("url") String url, @QueryParam("restype") String restype, @QueryParam("comp") String comp, @QueryParam("timeout") Integer timeout, @@ -112,10 +110,9 @@ Mono getStatistics( @Get("/") @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(com.azure.storage.blob.models.BlobStorageException.class) Mono listBlobContainersSegment( - @UnexpectedResponseExceptionType(com.azure.storage.blob.models.BlobStorageException.class) - @HostParam("url") - String url, + @HostParam("url") String url, @QueryParam("comp") String comp, @QueryParam("prefix") String prefix, @QueryParam("marker") String marker, @@ -129,10 +126,9 @@ Mono listBlobContainersSegment( @Post("/") @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(com.azure.storage.blob.models.BlobStorageException.class) Mono getUserDelegationKey( - @UnexpectedResponseExceptionType(com.azure.storage.blob.models.BlobStorageException.class) - @HostParam("url") - String url, + @HostParam("url") String url, @QueryParam("restype") String restype, @QueryParam("comp") String comp, @QueryParam("timeout") Integer timeout, @@ -144,10 +140,9 @@ Mono getUserDelegationKey( @Get("/") @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(com.azure.storage.blob.models.BlobStorageException.class) Mono getAccountInfo( - @UnexpectedResponseExceptionType(com.azure.storage.blob.models.BlobStorageException.class) - @HostParam("url") - String url, + @HostParam("url") String url, @QueryParam("restype") String restype, @QueryParam("comp") String comp, @HeaderParam("x-ms-version") String version, @@ -156,10 +151,9 @@ Mono getAccountInfo( @Post("/") @ExpectedResponses({202}) + @UnexpectedResponseExceptionType(com.azure.storage.blob.models.BlobStorageException.class) Mono submitBatch( - @UnexpectedResponseExceptionType(com.azure.storage.blob.models.BlobStorageException.class) - @HostParam("url") - String url, + @HostParam("url") String url, @QueryParam("comp") String comp, @HeaderParam("Content-Length") long contentLength, @HeaderParam("Content-Type") String multipartContentType, @@ -172,10 +166,9 @@ Mono submitBatch( @Get("/") @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(com.azure.storage.blob.models.BlobStorageException.class) Mono filterBlobs( - @UnexpectedResponseExceptionType(com.azure.storage.blob.models.BlobStorageException.class) - @HostParam("url") - String url, + @HostParam("url") String url, @QueryParam("comp") String comp, @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-version") String version, diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobContainerEncryptionScope.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobContainerEncryptionScope.java index 51a544abcaa6..496d445ad98f 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobContainerEncryptionScope.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobContainerEncryptionScope.java @@ -9,7 +9,6 @@ import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; /** Parameter group. */ -@JacksonXmlRootElement(localName = "BlobContainerEncryptionScope") @Fluent @JacksonXmlRootElement(localName = "blob-container-encryption-scope") public final class BlobContainerEncryptionScope { @@ -17,18 +16,16 @@ 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; - @JsonProperty(value = "defaultEncryptionScope") + private String defaultEncryptionScope; /* * Optional. Version 2019-07-07 and newer. If true, prevents any request * from specifying a different encryption scope than the scope set on the * container. */ - private Boolean encryptionScopeOverridePrevented; - @JsonProperty(value = "encryptionScopeOverridePrevented") + private Boolean encryptionScopeOverridePrevented; /** * Get the defaultEncryptionScope property: Optional. Version 2019-07-07 and later. Specifies the default encryption diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobHttpHeaders.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobHttpHeaders.java index 20e524034dbd..9eb5911dc6e9 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobHttpHeaders.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobHttpHeaders.java @@ -10,7 +10,6 @@ import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; /** Parameter group. */ -@JacksonXmlRootElement(localName = "BlobHttpHeaders") @Fluent @JacksonXmlRootElement(localName = "blob-http-headers") public final class BlobHttpHeaders { diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobServiceProperties.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobServiceProperties.java index 8017e59a8815..3a0ceff99890 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobServiceProperties.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobServiceProperties.java @@ -33,9 +33,9 @@ public final class BlobServiceProperties { * a summary of request statistics grouped by API in hour or minute * aggregates for blobs */ + @JsonProperty(value = "MinuteMetrics") private BlobMetrics minuteMetrics; - @JsonProperty(value = "MinuteMetrics") private static final class CorsWrapper { @JacksonXmlProperty(localName = "CorsRule") private final List items; @@ -64,9 +64,8 @@ private CorsWrapper(@JacksonXmlProperty(localName = "CorsRule") List> createWithResponse(AppendBlobCreateOptions option options.getMetadata(), requestConditions.getLeaseId(), requestConditions.getIfModifiedSince(), requestConditions.getIfUnmodifiedSince(), requestConditions.getIfMatch(), requestConditions.getIfNoneMatch(), requestConditions.getTagsConditions(), null, - tagsToString(options.getTags()), options.getHeaders(), getCustomerProvidedKey(), encryptionScope, - context.addData(AZ_TRACING_NAMESPACE_KEY, STORAGE_TRACING_NAMESPACE_VALUE)) + tagsToString(options.getTags()), null, null, null, options.getHeaders(), getCustomerProvidedKey(), + encryptionScope, context.addData(AZ_TRACING_NAMESPACE_KEY, STORAGE_TRACING_NAMESPACE_VALUE)) .map(rb -> { AppendBlobsCreateHeaders hd = rb.getDeserializedHeaders(); AppendBlobItem item = new AppendBlobItem(hd.getETag(), hd.getLastModified(), hd.getContentMD5(), 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 a4c4902d264d..8a358e19ecb9 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 @@ -597,7 +597,7 @@ private Mono onStart(String sourceUrl, Map metadat destinationRequestConditions.getIfModifiedSince(), destinationRequestConditions.getIfUnmodifiedSince(), destinationRequestConditions.getIfMatch(), destinationRequestConditions.getIfNoneMatch(), destinationRequestConditions.getTagsConditions(), destinationRequestConditions.getLeaseId(), null, - tagsToString(tags), sealBlob, context)) + tagsToString(tags), sealBlob, null, null, null, context)) .map(response -> { final BlobsStartCopyFromURLHeaders headers = response.getDeserializedHeaders(); @@ -832,7 +832,7 @@ Mono> copyFromUrlWithResponse(BlobCopyFromUrlOptions options, C destRequestConditions.getIfUnmodifiedSince(), destRequestConditions.getIfMatch(), destRequestConditions.getIfNoneMatch(), destRequestConditions.getTagsConditions(), destRequestConditions.getLeaseId(), null, null, - tagsToString(options.getTags()), context) + tagsToString(options.getTags()), null, null, null, context) .map(rb -> new SimpleResponse<>(rb, rb.getDeserializedHeaders().getXMsCopyId())); } diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlockBlobAsyncClient.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlockBlobAsyncClient.java index b839c40b56ce..2d2c06b604b2 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlockBlobAsyncClient.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlockBlobAsyncClient.java @@ -267,8 +267,8 @@ Mono> uploadWithResponse(BlockBlobSimpleUploadOptions op requestConditions.getLeaseId(), options.getTier(), requestConditions.getIfModifiedSince(), requestConditions.getIfUnmodifiedSince(), requestConditions.getIfMatch(), requestConditions.getIfNoneMatch(), requestConditions.getTagsConditions(), null, - tagsToString(options.getTags()), options.getHeaders(), getCustomerProvidedKey(), encryptionScope, - context.addData(AZ_TRACING_NAMESPACE_KEY, STORAGE_TRACING_NAMESPACE_VALUE)) + tagsToString(options.getTags()), null, null, null, options.getHeaders(), getCustomerProvidedKey(), + encryptionScope, context.addData(AZ_TRACING_NAMESPACE_KEY, STORAGE_TRACING_NAMESPACE_VALUE)) .map(rb -> { BlockBlobsUploadHeaders hd = rb.getDeserializedHeaders(); BlockBlobItem item = new BlockBlobItem(hd.getETag(), hd.getLastModified(), hd.getContentMD5(), @@ -758,8 +758,8 @@ Mono> commitBlockListWithResponse(BlockBlobCommitBlockLi requestConditions.getLeaseId(), options.getTier(), requestConditions.getIfModifiedSince(), requestConditions.getIfUnmodifiedSince(), requestConditions.getIfMatch(), requestConditions.getIfNoneMatch(), requestConditions.getTagsConditions(), null, - tagsToString(options.getTags()), options.getHeaders(), getCustomerProvidedKey(), encryptionScope, - context.addData(AZ_TRACING_NAMESPACE_KEY, STORAGE_TRACING_NAMESPACE_VALUE)) + tagsToString(options.getTags()), null, null, options.getHeaders(), getCustomerProvidedKey(), + encryptionScope, context.addData(AZ_TRACING_NAMESPACE_KEY, STORAGE_TRACING_NAMESPACE_VALUE)) .map(rb -> { BlockBlobsCommitBlockListHeaders hd = rb.getDeserializedHeaders(); BlockBlobItem item = new BlockBlobItem(hd.getETag(), hd.getLastModified(), hd.getContentMD5(), diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/PageBlobAsyncClient.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/PageBlobAsyncClient.java index 8d5d69d04a5f..013f067bd9e7 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/PageBlobAsyncClient.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/PageBlobAsyncClient.java @@ -251,7 +251,7 @@ Mono> createWithResponse(PageBlobCreateOptions options, C options.getSize(), null, null, options.getMetadata(), requestConditions.getLeaseId(), requestConditions.getIfModifiedSince(), requestConditions.getIfUnmodifiedSince(), requestConditions.getIfMatch(), requestConditions.getIfNoneMatch(), requestConditions.getTagsConditions(), - options.getSequenceNumber(), null, tagsToString(options.getTags()), options.getHeaders(), + options.getSequenceNumber(), null, tagsToString(options.getTags()), null, null, null, options.getHeaders(), getCustomerProvidedKey(), encryptionScope, context.addData(AZ_TRACING_NAMESPACE_KEY, STORAGE_TRACING_NAMESPACE_VALUE)) .map(rb -> { diff --git a/sdk/storage/azure-storage-blob/swagger/pom.xml b/sdk/storage/azure-storage-blob/swagger/pom.xml index 65a8ae4ea9ae..1bc60ea8f988 100644 --- a/sdk/storage/azure-storage-blob/swagger/pom.xml +++ b/sdk/storage/azure-storage-blob/swagger/pom.xml @@ -20,7 +20,7 @@ com.azure.tools azure-autorest-customization - 1.0.0-beta.4 + 1.0.0-beta.2 junit diff --git a/sdk/storage/azure-storage-blob/swagger/src/main/java/com/azure/storage/blob/customization/BlobStorageCustomization.java b/sdk/storage/azure-storage-blob/swagger/src/main/java/com/azure/storage/blob/customization/BlobStorageCustomization.java index ac1d1d00e59a..ee81f7e2e0ca 100644 --- a/sdk/storage/azure-storage-blob/swagger/src/main/java/com/azure/storage/blob/customization/BlobStorageCustomization.java +++ b/sdk/storage/azure-storage-blob/swagger/src/main/java/com/azure/storage/blob/customization/BlobStorageCustomization.java @@ -9,14 +9,13 @@ import com.azure.autorest.customization.MethodCustomization; import com.azure.autorest.customization.PackageCustomization; import com.azure.autorest.customization.PropertyCustomization; -import org.slf4j.Logger; /** * Customization class for Blob Storage. */ public class BlobStorageCustomization extends Customization { @Override - public void customize(LibraryCustomization customization, Logger logger) { + public void customize(LibraryCustomization customization) { PackageCustomization impl = customization.getPackage("com.azure.storage.blob.implementation"); From d1940dbe9bbabd7bd413753f41aa43c41edff6a7 Mon Sep 17 00:00:00 2001 From: gapra Date: Tue, 18 May 2021 17:16:04 -0700 Subject: [PATCH 3/3] added one more null --- .../azure/storage/blob/specialized/BlockBlobAsyncClient.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlockBlobAsyncClient.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlockBlobAsyncClient.java index 2d2c06b604b2..25dd01dc286e 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlockBlobAsyncClient.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlockBlobAsyncClient.java @@ -758,7 +758,7 @@ Mono> commitBlockListWithResponse(BlockBlobCommitBlockLi requestConditions.getLeaseId(), options.getTier(), requestConditions.getIfModifiedSince(), requestConditions.getIfUnmodifiedSince(), requestConditions.getIfMatch(), requestConditions.getIfNoneMatch(), requestConditions.getTagsConditions(), null, - tagsToString(options.getTags()), null, null, options.getHeaders(), getCustomerProvidedKey(), + tagsToString(options.getTags()), null, null, null, options.getHeaders(), getCustomerProvidedKey(), encryptionScope, context.addData(AZ_TRACING_NAMESPACE_KEY, STORAGE_TRACING_NAMESPACE_VALUE)) .map(rb -> { BlockBlobsCommitBlockListHeaders hd = rb.getDeserializedHeaders();