diff --git a/eng/versioning/version_client.txt b/eng/versioning/version_client.txt
index 7a790fda547b..4feb9d34ffc8 100644
--- a/eng/versioning/version_client.txt
+++ b/eng/versioning/version_client.txt
@@ -189,6 +189,7 @@ com.azure:azure-storage-blob-batch;12.25.0;12.26.0-beta.1
com.azure:azure-storage-blob-changefeed;12.0.0-beta.27;12.0.0-beta.28
com.azure:azure-storage-blob-cryptography;12.28.0;12.29.0-beta.1
com.azure:azure-storage-blob-nio;12.0.0-beta.28;12.0.0-beta.29
+com.azure:azure-storage-blob-v2;1.0.0-beta.1;1.0.0-beta.1
com.azure:azure-storage-common;12.28.0;12.29.0-beta.1
com.azure:azure-storage-file-share;12.25.1;12.26.0-beta.1
com.azure:azure-storage-file-datalake;12.22.0;12.23.0-beta.1
diff --git a/sdk/storage/azure-storage-blob-v2/CHANGELOG.md b/sdk/storage/azure-storage-blob-v2/CHANGELOG.md
new file mode 100644
index 000000000000..13dd08af78ab
--- /dev/null
+++ b/sdk/storage/azure-storage-blob-v2/CHANGELOG.md
@@ -0,0 +1,11 @@
+# Release History
+
+## 1.0.0-beta.1 (Unreleased)
+
+### Features Added
+
+### Breaking Changes
+
+### Bugs Fixed
+
+### Other Changes
diff --git a/sdk/storage/azure-storage-blob-v2/README.md b/sdk/storage/azure-storage-blob-v2/README.md
new file mode 100644
index 000000000000..b116284e07a8
--- /dev/null
+++ b/sdk/storage/azure-storage-blob-v2/README.md
@@ -0,0 +1,15 @@
+# Azure Storage Blob client library for Java
+
+## Getting started
+
+## Key concepts
+
+## Examples
+
+## Troubleshooting
+
+## Next steps
+
+## Next steps Samples
+
+## Contributing
diff --git a/sdk/storage/azure-storage-blob-v2/pom.xml b/sdk/storage/azure-storage-blob-v2/pom.xml
new file mode 100644
index 000000000000..b98d6b1c5afb
--- /dev/null
+++ b/sdk/storage/azure-storage-blob-v2/pom.xml
@@ -0,0 +1,61 @@
+
+ 4.0.0
+
+
+ com.azure
+ azure-client-sdk-parent-v2
+ 1.0.0-beta.1
+ ../../parents/azure-client-sdk-parent-v2
+
+
+ com.azure
+ azure-storage-blob-v2
+ 1.0.0-beta.1
+
+ Microsoft Azure SDK V2 for Storage Blob
+ This package contains Microsoft Azure SDK V2 for Storage Blob.
+
+
+
+ azure-java-build-docs
+ ${site.url}/site/${project.artifactId}
+
+
+
+
+ https://github.com/Azure/azure-sdk-for-java
+
+
+
+
+ io.clientcore
+ core
+ 1.0.0-beta.6
+
+
+ com.azure
+ azure-core-v2
+ 1.0.0-beta.1
+
+
+ org.junit.jupiter
+ junit-jupiter-api
+ 5.9.3
+ test
+
+
+ org.junit.jupiter
+ junit-jupiter-engine
+ 5.9.3
+ test
+
+
+ org.junit.jupiter
+ junit-jupiter-params
+ 5.9.3
+ test
+
+
+
+
diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/AppendBlobClient.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/AppendBlobClient.java
new file mode 100644
index 000000000000..5892127bfc11
--- /dev/null
+++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/AppendBlobClient.java
@@ -0,0 +1,461 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.v2.storage.blob;
+
+import com.azure.v2.storage.blob.implementation.AppendBlobsImpl;
+import com.azure.v2.storage.blob.models.BlobHttpHeaders;
+import com.azure.v2.storage.blob.models.BlobImmutabilityPolicyMode;
+import com.azure.v2.storage.blob.models.CpkInfo;
+import com.azure.v2.storage.blob.models.EncryptionScope;
+import com.azure.v2.storage.blob.models.StorageErrorException;
+import io.clientcore.core.annotations.Metadata;
+import io.clientcore.core.annotations.ServiceClient;
+import io.clientcore.core.http.models.RequestOptions;
+import io.clientcore.core.http.models.Response;
+import io.clientcore.core.instrumentation.Instrumentation;
+import io.clientcore.core.models.binarydata.BinaryData;
+import java.time.OffsetDateTime;
+import java.util.Map;
+
+/**
+ * Initializes a new instance of the synchronous AzureBlobStorage type.
+ */
+@ServiceClient(builder = AzureBlobStorageBuilder.class)
+public final class AppendBlobClient {
+ @Metadata(generated = true)
+ private final AppendBlobsImpl serviceClient;
+
+ private final Instrumentation instrumentation;
+
+ /**
+ * Initializes an instance of AppendBlobClient class.
+ *
+ * @param serviceClient the service client implementation.
+ * @param instrumentation the instrumentation instance.
+ */
+ @Metadata(generated = true)
+ AppendBlobClient(AppendBlobsImpl serviceClient, Instrumentation instrumentation) {
+ this.serviceClient = serviceClient;
+ this.instrumentation = instrumentation;
+ }
+
+ /**
+ * The Create Append Blob operation creates a new append blob.
+ *
+ * @param containerName The container name.
+ * @param blob The blob name.
+ * @param contentLength The length of the request.
+ * @param timeout The timeout parameter is expressed in seconds. For more information, see <a
+ * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting
+ * Timeouts for Blob Service Operations.</a>.
+ * @param metadata Optional. Specifies a user-defined name-value pair associated with the blob. If no name-value
+ * pairs are specified, the operation will copy the metadata from the source blob or file to the destination blob.
+ * If one or more name-value pairs are specified, the destination blob is created with the specified metadata, and
+ * metadata is not copied from the source blob or file. Note that beginning with version 2009-09-19, metadata names
+ * must adhere to the naming rules for C# identifiers. See Naming and Referencing Containers, Blobs, and Metadata
+ * for more information.
+ * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID.
+ * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the
+ * specified date/time.
+ * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since
+ * the specified date/time.
+ * @param ifMatch Specify an ETag value to operate only on blobs with a matching value.
+ * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value.
+ * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value.
+ * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the
+ * analytics logs when storage analytics logging is enabled.
+ * @param blobTagsString Optional. Used to set blob tags in various blob operations.
+ * @param immutabilityPolicyExpiry Specifies the date time when the blobs immutability policy is set to expire.
+ * @param immutabilityPolicyMode Specifies the immutability policy mode to set on the blob.
+ * @param legalHold Specified if a legal hold should be set on the blob.
+ * @param blobHttpHeaders Parameter group.
+ * @param cpkInfo Parameter group.
+ * @param encryptionScopeParam Parameter group.
+ * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws StorageErrorException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response.
+ */
+ @Metadata(generated = true)
+ public Response createWithResponse(String containerName, String blob, long contentLength, Integer timeout,
+ Map metadata, String leaseId, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince,
+ String ifMatch, String ifNoneMatch, String ifTags, String requestId, String blobTagsString,
+ OffsetDateTime immutabilityPolicyExpiry, BlobImmutabilityPolicyMode immutabilityPolicyMode, Boolean legalHold,
+ BlobHttpHeaders blobHttpHeaders, CpkInfo cpkInfo, EncryptionScope encryptionScopeParam,
+ RequestOptions requestOptions) {
+ return this.instrumentation.instrumentWithResponse("AppendBlob_Create", requestOptions,
+ updatedOptions -> this.serviceClient.createWithResponse(containerName, blob, contentLength, timeout,
+ metadata, leaseId, ifModifiedSince, ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, requestId,
+ blobTagsString, immutabilityPolicyExpiry, immutabilityPolicyMode, legalHold, blobHttpHeaders, cpkInfo,
+ encryptionScopeParam, updatedOptions));
+ }
+
+ /**
+ * The Create Append Blob operation creates a new append blob.
+ *
+ * @param containerName The container name.
+ * @param blob The blob name.
+ * @param contentLength The length of the request.
+ * @param timeout The timeout parameter is expressed in seconds. For more information, see <a
+ * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting
+ * Timeouts for Blob Service Operations.</a>.
+ * @param metadata Optional. Specifies a user-defined name-value pair associated with the blob. If no name-value
+ * pairs are specified, the operation will copy the metadata from the source blob or file to the destination blob.
+ * If one or more name-value pairs are specified, the destination blob is created with the specified metadata, and
+ * metadata is not copied from the source blob or file. Note that beginning with version 2009-09-19, metadata names
+ * must adhere to the naming rules for C# identifiers. See Naming and Referencing Containers, Blobs, and Metadata
+ * for more information.
+ * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID.
+ * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the
+ * specified date/time.
+ * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since
+ * the specified date/time.
+ * @param ifMatch Specify an ETag value to operate only on blobs with a matching value.
+ * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value.
+ * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value.
+ * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the
+ * analytics logs when storage analytics logging is enabled.
+ * @param blobTagsString Optional. Used to set blob tags in various blob operations.
+ * @param immutabilityPolicyExpiry Specifies the date time when the blobs immutability policy is set to expire.
+ * @param immutabilityPolicyMode Specifies the immutability policy mode to set on the blob.
+ * @param legalHold Specified if a legal hold should be set on the blob.
+ * @param blobHttpHeaders Parameter group.
+ * @param cpkInfo Parameter group.
+ * @param encryptionScopeParam Parameter group.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws StorageErrorException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @Metadata(generated = true)
+ public void create(String containerName, String blob, long contentLength, Integer timeout,
+ Map metadata, String leaseId, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince,
+ String ifMatch, String ifNoneMatch, String ifTags, String requestId, String blobTagsString,
+ OffsetDateTime immutabilityPolicyExpiry, BlobImmutabilityPolicyMode immutabilityPolicyMode, Boolean legalHold,
+ BlobHttpHeaders blobHttpHeaders, CpkInfo cpkInfo, EncryptionScope encryptionScopeParam) {
+ this.instrumentation.instrument("AppendBlob_Create", null,
+ updatedOptions -> this.serviceClient.create(containerName, blob, contentLength, timeout, metadata, leaseId,
+ ifModifiedSince, ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, requestId, blobTagsString,
+ immutabilityPolicyExpiry, immutabilityPolicyMode, legalHold, blobHttpHeaders, cpkInfo,
+ encryptionScopeParam));
+ }
+
+ /**
+ * The Append Block operation commits a new block of data to the end of an existing append blob. The Append Block
+ * operation is permitted only if the blob was created with x-ms-blob-type set to AppendBlob. Append Block is
+ * supported only on version 2015-02-21 version or later.
+ *
+ * @param containerName The container name.
+ * @param blob The blob name.
+ * @param contentLength The length of the request.
+ * @param body Initial data.
+ * @param timeout The timeout parameter is expressed in seconds. For more information, see <a
+ * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting
+ * Timeouts for Blob Service Operations.</a>.
+ * @param transactionalContentMD5 Specify the transactional md5 for the body, to be validated by the service.
+ * @param transactionalContentCrc64 Specify the transactional crc64 for the body, to be validated by the service.
+ * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID.
+ * @param maxSize Optional conditional header. The max length in bytes permitted for the append blob. If the Append
+ * Block operation would cause the blob to exceed that limit or if the blob size is already greater than the value
+ * specified in this header, the request will fail with MaxBlobSizeConditionNotMet error (HTTP status code 412 -
+ * Precondition Failed).
+ * @param appendPosition Optional conditional header, used only for the Append Block operation. A number indicating
+ * the byte offset to compare. Append Block will succeed only if the append position is equal to this number. If it
+ * is not, the request will fail with the AppendPositionConditionNotMet error (HTTP status code 412 - Precondition
+ * Failed).
+ * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the
+ * specified date/time.
+ * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since
+ * the specified date/time.
+ * @param ifMatch Specify an ETag value to operate only on blobs with a matching value.
+ * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value.
+ * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value.
+ * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the
+ * analytics logs when storage analytics logging is enabled.
+ * @param structuredBodyType Required if the request body is a structured message. Specifies the message schema
+ * version and properties.
+ * @param structuredContentLength Required if the request body is a structured message. Specifies the length of the
+ * blob/file content inside the message body. Will always be smaller than Content-Length.
+ * @param cpkInfo Parameter group.
+ * @param encryptionScopeParam Parameter group.
+ * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws StorageErrorException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response.
+ */
+ @Metadata(generated = true)
+ public Response appendBlockWithResponse(String containerName, String blob, long contentLength,
+ BinaryData body, Integer timeout, byte[] transactionalContentMD5, byte[] transactionalContentCrc64,
+ String leaseId, Long maxSize, Long appendPosition, OffsetDateTime ifModifiedSince,
+ OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, String ifTags, String requestId,
+ String structuredBodyType, Long structuredContentLength, CpkInfo cpkInfo, EncryptionScope encryptionScopeParam,
+ RequestOptions requestOptions) {
+ return this.instrumentation.instrumentWithResponse("AppendBlob_AppendBlock", requestOptions,
+ updatedOptions -> this.serviceClient.appendBlockWithResponse(containerName, blob, contentLength, body,
+ timeout, transactionalContentMD5, transactionalContentCrc64, leaseId, maxSize, appendPosition,
+ ifModifiedSince, ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, requestId, structuredBodyType,
+ structuredContentLength, cpkInfo, encryptionScopeParam, updatedOptions));
+ }
+
+ /**
+ * The Append Block operation commits a new block of data to the end of an existing append blob. The Append Block
+ * operation is permitted only if the blob was created with x-ms-blob-type set to AppendBlob. Append Block is
+ * supported only on version 2015-02-21 version or later.
+ *
+ * @param containerName The container name.
+ * @param blob The blob name.
+ * @param contentLength The length of the request.
+ * @param body Initial data.
+ * @param timeout The timeout parameter is expressed in seconds. For more information, see <a
+ * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting
+ * Timeouts for Blob Service Operations.</a>.
+ * @param transactionalContentMD5 Specify the transactional md5 for the body, to be validated by the service.
+ * @param transactionalContentCrc64 Specify the transactional crc64 for the body, to be validated by the service.
+ * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID.
+ * @param maxSize Optional conditional header. The max length in bytes permitted for the append blob. If the Append
+ * Block operation would cause the blob to exceed that limit or if the blob size is already greater than the value
+ * specified in this header, the request will fail with MaxBlobSizeConditionNotMet error (HTTP status code 412 -
+ * Precondition Failed).
+ * @param appendPosition Optional conditional header, used only for the Append Block operation. A number indicating
+ * the byte offset to compare. Append Block will succeed only if the append position is equal to this number. If it
+ * is not, the request will fail with the AppendPositionConditionNotMet error (HTTP status code 412 - Precondition
+ * Failed).
+ * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the
+ * specified date/time.
+ * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since
+ * the specified date/time.
+ * @param ifMatch Specify an ETag value to operate only on blobs with a matching value.
+ * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value.
+ * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value.
+ * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the
+ * analytics logs when storage analytics logging is enabled.
+ * @param structuredBodyType Required if the request body is a structured message. Specifies the message schema
+ * version and properties.
+ * @param structuredContentLength Required if the request body is a structured message. Specifies the length of the
+ * blob/file content inside the message body. Will always be smaller than Content-Length.
+ * @param cpkInfo Parameter group.
+ * @param encryptionScopeParam Parameter group.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws StorageErrorException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @Metadata(generated = true)
+ public void appendBlock(String containerName, String blob, long contentLength, BinaryData body, Integer timeout,
+ byte[] transactionalContentMD5, byte[] transactionalContentCrc64, String leaseId, Long maxSize,
+ Long appendPosition, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch,
+ String ifNoneMatch, String ifTags, String requestId, String structuredBodyType, Long structuredContentLength,
+ CpkInfo cpkInfo, EncryptionScope encryptionScopeParam) {
+ this.instrumentation.instrument("AppendBlob_AppendBlock", null,
+ updatedOptions -> this.serviceClient.appendBlock(containerName, blob, contentLength, body, timeout,
+ transactionalContentMD5, transactionalContentCrc64, leaseId, maxSize, appendPosition, ifModifiedSince,
+ ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, requestId, structuredBodyType, structuredContentLength,
+ cpkInfo, encryptionScopeParam));
+ }
+
+ /**
+ * The Append Block operation commits a new block of data to the end of an existing append blob where the contents
+ * are read from a source url. The Append Block operation is permitted only if the blob was created with
+ * x-ms-blob-type set to AppendBlob. Append Block is supported only on version 2015-02-21 version or later.
+ *
+ * @param containerName The container name.
+ * @param blob The blob name.
+ * @param sourceUrl Specify a URL to the copy source.
+ * @param contentLength The length of the request.
+ * @param sourceRange Bytes of source data in the specified range.
+ * @param sourceContentMD5 Specify the md5 calculated for the range of bytes that must be read from the copy source.
+ * @param sourceContentcrc64 Specify the crc64 calculated for the range of bytes that must be read from the copy
+ * source.
+ * @param timeout The timeout parameter is expressed in seconds. For more information, see <a
+ * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting
+ * Timeouts for Blob Service Operations.</a>.
+ * @param transactionalContentMD5 Specify the transactional md5 for the body, to be validated by the service.
+ * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID.
+ * @param maxSize Optional conditional header. The max length in bytes permitted for the append blob. If the Append
+ * Block operation would cause the blob to exceed that limit or if the blob size is already greater than the value
+ * specified in this header, the request will fail with MaxBlobSizeConditionNotMet error (HTTP status code 412 -
+ * Precondition Failed).
+ * @param appendPosition Optional conditional header, used only for the Append Block operation. A number indicating
+ * the byte offset to compare. Append Block will succeed only if the append position is equal to this number. If it
+ * is not, the request will fail with the AppendPositionConditionNotMet error (HTTP status code 412 - Precondition
+ * Failed).
+ * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the
+ * specified date/time.
+ * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since
+ * the specified date/time.
+ * @param ifMatch Specify an ETag value to operate only on blobs with a matching value.
+ * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value.
+ * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value.
+ * @param sourceIfModifiedSince Specify this header value to operate only on a blob if it has been modified since
+ * the specified date/time.
+ * @param sourceIfUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified
+ * since the specified date/time.
+ * @param sourceIfMatch Specify an ETag value to operate only on blobs with a matching value.
+ * @param sourceIfNoneMatch Specify an ETag value to operate only on blobs without a matching value.
+ * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the
+ * analytics logs when storage analytics logging is enabled.
+ * @param copySourceAuthorization Only Bearer type is supported. Credentials should be a valid OAuth access token to
+ * copy source.
+ * @param cpkInfo Parameter group.
+ * @param encryptionScopeParam Parameter group.
+ * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws StorageErrorException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response.
+ */
+ @Metadata(generated = true)
+ public Response appendBlockFromUrlWithResponse(String containerName, String blob, String sourceUrl,
+ long contentLength, String sourceRange, byte[] sourceContentMD5, byte[] sourceContentcrc64, Integer timeout,
+ byte[] transactionalContentMD5, String leaseId, Long maxSize, Long appendPosition,
+ OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch,
+ String ifTags, OffsetDateTime sourceIfModifiedSince, OffsetDateTime sourceIfUnmodifiedSince,
+ String sourceIfMatch, String sourceIfNoneMatch, String requestId, String copySourceAuthorization,
+ CpkInfo cpkInfo, EncryptionScope encryptionScopeParam, RequestOptions requestOptions) {
+ return this.instrumentation.instrumentWithResponse("AppendBlob_AppendBlockFromUrl", requestOptions,
+ updatedOptions -> this.serviceClient.appendBlockFromUrlWithResponse(containerName, blob, sourceUrl,
+ contentLength, sourceRange, sourceContentMD5, sourceContentcrc64, timeout, transactionalContentMD5,
+ leaseId, maxSize, appendPosition, ifModifiedSince, ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags,
+ sourceIfModifiedSince, sourceIfUnmodifiedSince, sourceIfMatch, sourceIfNoneMatch, requestId,
+ copySourceAuthorization, cpkInfo, encryptionScopeParam, updatedOptions));
+ }
+
+ /**
+ * The Append Block operation commits a new block of data to the end of an existing append blob where the contents
+ * are read from a source url. The Append Block operation is permitted only if the blob was created with
+ * x-ms-blob-type set to AppendBlob. Append Block is supported only on version 2015-02-21 version or later.
+ *
+ * @param containerName The container name.
+ * @param blob The blob name.
+ * @param sourceUrl Specify a URL to the copy source.
+ * @param contentLength The length of the request.
+ * @param sourceRange Bytes of source data in the specified range.
+ * @param sourceContentMD5 Specify the md5 calculated for the range of bytes that must be read from the copy source.
+ * @param sourceContentcrc64 Specify the crc64 calculated for the range of bytes that must be read from the copy
+ * source.
+ * @param timeout The timeout parameter is expressed in seconds. For more information, see <a
+ * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting
+ * Timeouts for Blob Service Operations.</a>.
+ * @param transactionalContentMD5 Specify the transactional md5 for the body, to be validated by the service.
+ * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID.
+ * @param maxSize Optional conditional header. The max length in bytes permitted for the append blob. If the Append
+ * Block operation would cause the blob to exceed that limit or if the blob size is already greater than the value
+ * specified in this header, the request will fail with MaxBlobSizeConditionNotMet error (HTTP status code 412 -
+ * Precondition Failed).
+ * @param appendPosition Optional conditional header, used only for the Append Block operation. A number indicating
+ * the byte offset to compare. Append Block will succeed only if the append position is equal to this number. If it
+ * is not, the request will fail with the AppendPositionConditionNotMet error (HTTP status code 412 - Precondition
+ * Failed).
+ * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the
+ * specified date/time.
+ * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since
+ * the specified date/time.
+ * @param ifMatch Specify an ETag value to operate only on blobs with a matching value.
+ * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value.
+ * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value.
+ * @param sourceIfModifiedSince Specify this header value to operate only on a blob if it has been modified since
+ * the specified date/time.
+ * @param sourceIfUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified
+ * since the specified date/time.
+ * @param sourceIfMatch Specify an ETag value to operate only on blobs with a matching value.
+ * @param sourceIfNoneMatch Specify an ETag value to operate only on blobs without a matching value.
+ * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the
+ * analytics logs when storage analytics logging is enabled.
+ * @param copySourceAuthorization Only Bearer type is supported. Credentials should be a valid OAuth access token to
+ * copy source.
+ * @param cpkInfo Parameter group.
+ * @param encryptionScopeParam Parameter group.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws StorageErrorException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @Metadata(generated = true)
+ public void appendBlockFromUrl(String containerName, String blob, String sourceUrl, long contentLength,
+ String sourceRange, byte[] sourceContentMD5, byte[] sourceContentcrc64, Integer timeout,
+ byte[] transactionalContentMD5, String leaseId, Long maxSize, Long appendPosition,
+ OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch,
+ String ifTags, OffsetDateTime sourceIfModifiedSince, OffsetDateTime sourceIfUnmodifiedSince,
+ String sourceIfMatch, String sourceIfNoneMatch, String requestId, String copySourceAuthorization,
+ CpkInfo cpkInfo, EncryptionScope encryptionScopeParam) {
+ this.instrumentation.instrument("AppendBlob_AppendBlockFromUrl", null,
+ updatedOptions -> this.serviceClient.appendBlockFromUrl(containerName, blob, sourceUrl, contentLength,
+ sourceRange, sourceContentMD5, sourceContentcrc64, timeout, transactionalContentMD5, leaseId, maxSize,
+ appendPosition, ifModifiedSince, ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, sourceIfModifiedSince,
+ sourceIfUnmodifiedSince, sourceIfMatch, sourceIfNoneMatch, requestId, copySourceAuthorization, cpkInfo,
+ encryptionScopeParam));
+ }
+
+ /**
+ * The Seal operation seals the Append Blob to make it read-only. Seal is supported only on version 2019-12-12
+ * version or later.
+ *
+ * @param containerName The container name.
+ * @param blob The blob name.
+ * @param timeout The timeout parameter is expressed in seconds. For more information, see <a
+ * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting
+ * Timeouts for Blob Service Operations.</a>.
+ * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the
+ * analytics logs when storage analytics logging is enabled.
+ * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID.
+ * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the
+ * specified date/time.
+ * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since
+ * the specified date/time.
+ * @param ifMatch Specify an ETag value to operate only on blobs with a matching value.
+ * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value.
+ * @param appendPosition Optional conditional header, used only for the Append Block operation. A number indicating
+ * the byte offset to compare. Append Block will succeed only if the append position is equal to this number. If it
+ * is not, the request will fail with the AppendPositionConditionNotMet error (HTTP status code 412 - Precondition
+ * Failed).
+ * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws StorageErrorException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response.
+ */
+ @Metadata(generated = true)
+ public Response sealWithResponse(String containerName, String blob, Integer timeout, String requestId,
+ String leaseId, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch,
+ String ifNoneMatch, Long appendPosition, RequestOptions requestOptions) {
+ return this.instrumentation.instrumentWithResponse("AppendBlob_Seal", requestOptions,
+ updatedOptions -> this.serviceClient.sealWithResponse(containerName, blob, timeout, requestId, leaseId,
+ ifModifiedSince, ifUnmodifiedSince, ifMatch, ifNoneMatch, appendPosition, updatedOptions));
+ }
+
+ /**
+ * The Seal operation seals the Append Blob to make it read-only. Seal is supported only on version 2019-12-12
+ * version or later.
+ *
+ * @param containerName The container name.
+ * @param blob The blob name.
+ * @param timeout The timeout parameter is expressed in seconds. For more information, see <a
+ * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting
+ * Timeouts for Blob Service Operations.</a>.
+ * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the
+ * analytics logs when storage analytics logging is enabled.
+ * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID.
+ * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the
+ * specified date/time.
+ * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since
+ * the specified date/time.
+ * @param ifMatch Specify an ETag value to operate only on blobs with a matching value.
+ * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value.
+ * @param appendPosition Optional conditional header, used only for the Append Block operation. A number indicating
+ * the byte offset to compare. Append Block will succeed only if the append position is equal to this number. If it
+ * is not, the request will fail with the AppendPositionConditionNotMet error (HTTP status code 412 - Precondition
+ * Failed).
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws StorageErrorException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @Metadata(generated = true)
+ public void seal(String containerName, String blob, Integer timeout, String requestId, String leaseId,
+ OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch,
+ Long appendPosition) {
+ this.instrumentation.instrument("AppendBlob_Seal", null,
+ updatedOptions -> this.serviceClient.seal(containerName, blob, timeout, requestId, leaseId, ifModifiedSince,
+ ifUnmodifiedSince, ifMatch, ifNoneMatch, appendPosition));
+ }
+}
diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/AzureBlobStorageBuilder.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/AzureBlobStorageBuilder.java
new file mode 100644
index 000000000000..b81450592bc9
--- /dev/null
+++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/AzureBlobStorageBuilder.java
@@ -0,0 +1,361 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.v2.storage.blob;
+
+import com.azure.v2.storage.blob.implementation.AzureBlobStorageImpl;
+import io.clientcore.core.annotations.Metadata;
+import io.clientcore.core.annotations.ServiceClientBuilder;
+import io.clientcore.core.http.client.HttpClient;
+import io.clientcore.core.http.models.ProxyOptions;
+import io.clientcore.core.http.pipeline.HttpInstrumentationOptions;
+import io.clientcore.core.http.pipeline.HttpInstrumentationPolicy;
+import io.clientcore.core.http.pipeline.HttpPipeline;
+import io.clientcore.core.http.pipeline.HttpPipelineBuilder;
+import io.clientcore.core.http.pipeline.HttpPipelinePolicy;
+import io.clientcore.core.http.pipeline.HttpRedirectOptions;
+import io.clientcore.core.http.pipeline.HttpRedirectPolicy;
+import io.clientcore.core.http.pipeline.HttpRetryOptions;
+import io.clientcore.core.http.pipeline.HttpRetryPolicy;
+import io.clientcore.core.instrumentation.Instrumentation;
+import io.clientcore.core.instrumentation.LibraryInstrumentationOptions;
+import io.clientcore.core.traits.ConfigurationTrait;
+import io.clientcore.core.traits.HttpTrait;
+import io.clientcore.core.traits.ProxyTrait;
+import io.clientcore.core.utils.configuration.Configuration;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Objects;
+
+/**
+ * A builder for creating a new instance of the AzureBlobStorage type.
+ */
+@ServiceClientBuilder(
+ serviceClients = {
+ StorageServiceClient.class,
+ ContainerClient.class,
+ BlobClient.class,
+ PageBlobClient.class,
+ AppendBlobClient.class,
+ BlockBlobClient.class })
+public final class AzureBlobStorageBuilder implements HttpTrait,
+ ProxyTrait, ConfigurationTrait {
+ @Metadata(generated = true)
+ private static final String SDK_NAME = "name";
+
+ @Metadata(generated = true)
+ private static final String SDK_VERSION = "version";
+
+ @Metadata(generated = true)
+ private final List pipelinePolicies;
+
+ /**
+ * Create an instance of the AzureBlobStorageBuilder.
+ */
+ @Metadata(generated = true)
+ public AzureBlobStorageBuilder() {
+ this.pipelinePolicies = new ArrayList<>();
+ }
+
+ /*
+ * The HTTP pipeline to send requests through.
+ */
+ @Metadata(generated = true)
+ private HttpPipeline pipeline;
+
+ /**
+ * {@inheritDoc}.
+ */
+ @Metadata(generated = true)
+ @Override
+ public AzureBlobStorageBuilder httpPipeline(HttpPipeline pipeline) {
+ this.pipeline = pipeline;
+ return this;
+ }
+
+ /*
+ * The HTTP client used to send the request.
+ */
+ @Metadata(generated = true)
+ private HttpClient httpClient;
+
+ /**
+ * {@inheritDoc}.
+ */
+ @Metadata(generated = true)
+ @Override
+ public AzureBlobStorageBuilder httpClient(HttpClient httpClient) {
+ this.httpClient = httpClient;
+ return this;
+ }
+
+ /*
+ * The retry options to configure retry policy for failed requests.
+ */
+ @Metadata(generated = true)
+ private HttpRetryOptions retryOptions;
+
+ /**
+ * {@inheritDoc}.
+ */
+ @Metadata(generated = true)
+ @Override
+ public AzureBlobStorageBuilder httpRetryOptions(HttpRetryOptions retryOptions) {
+ this.retryOptions = retryOptions;
+ return this;
+ }
+
+ /**
+ * {@inheritDoc}.
+ */
+ @Metadata(generated = true)
+ @Override
+ public AzureBlobStorageBuilder addHttpPipelinePolicy(HttpPipelinePolicy customPolicy) {
+ Objects.requireNonNull(customPolicy, "'customPolicy' cannot be null.");
+ pipelinePolicies.add(customPolicy);
+ return this;
+ }
+
+ /*
+ * The redirect options to configure redirect policy
+ */
+ @Metadata(generated = true)
+ private HttpRedirectOptions redirectOptions;
+
+ /**
+ * {@inheritDoc}.
+ */
+ @Metadata(generated = true)
+ @Override
+ public AzureBlobStorageBuilder httpRedirectOptions(HttpRedirectOptions redirectOptions) {
+ this.redirectOptions = redirectOptions;
+ return this;
+ }
+
+ /*
+ * The instrumentation configuration for HTTP requests and responses.
+ */
+ @Metadata(generated = true)
+ private HttpInstrumentationOptions httpInstrumentationOptions;
+
+ /**
+ * {@inheritDoc}.
+ */
+ @Metadata(generated = true)
+ @Override
+ public AzureBlobStorageBuilder httpInstrumentationOptions(HttpInstrumentationOptions httpInstrumentationOptions) {
+ this.httpInstrumentationOptions = httpInstrumentationOptions;
+ return this;
+ }
+
+ /*
+ * The proxy options used during construction of the service client.
+ */
+ @Metadata(generated = true)
+ private ProxyOptions proxyOptions;
+
+ /**
+ * {@inheritDoc}.
+ */
+ @Metadata(generated = true)
+ @Override
+ public AzureBlobStorageBuilder proxyOptions(ProxyOptions proxyOptions) {
+ this.proxyOptions = proxyOptions;
+ return this;
+ }
+
+ /*
+ * The configuration store that is used during construction of the service client.
+ */
+ @Metadata(generated = true)
+ private Configuration configuration;
+
+ /**
+ * {@inheritDoc}.
+ */
+ @Metadata(generated = true)
+ @Override
+ public AzureBlobStorageBuilder configuration(Configuration configuration) {
+ this.configuration = configuration;
+ return this;
+ }
+
+ /*
+ * The URL of the service account, container, or blob that is the target of the desired operation.
+ */
+ @Metadata(generated = true)
+ private String url;
+
+ /**
+ * Sets The URL of the service account, container, or blob that is the target of the desired operation.
+ *
+ * @param url the url value.
+ * @return the AzureBlobStorageBuilder.
+ */
+ @Metadata(generated = true)
+ public AzureBlobStorageBuilder url(String url) {
+ this.url = url;
+ return this;
+ }
+
+ /*
+ * Specifies the version of the operation to use for this request.
+ */
+ @Metadata(generated = true)
+ private String version;
+
+ /**
+ * Sets Specifies the version of the operation to use for this request.
+ *
+ * @param version the version value.
+ * @return the AzureBlobStorageBuilder.
+ */
+ @Metadata(generated = true)
+ public AzureBlobStorageBuilder version(String version) {
+ this.version = version;
+ return this;
+ }
+
+ /**
+ * Builds an instance of AzureBlobStorageImpl with the provided parameters.
+ *
+ * @return an instance of AzureBlobStorageImpl.
+ */
+ @Metadata(generated = true)
+ private AzureBlobStorageImpl buildInnerClient() {
+ this.validateClient();
+
+ HttpInstrumentationOptions localHttpInstrumentationOptions = this.httpInstrumentationOptions == null
+ ? new HttpInstrumentationOptions()
+ : this.httpInstrumentationOptions;
+ LibraryInstrumentationOptions libraryInstrumentationOptions = new LibraryInstrumentationOptions("TODO");
+ Instrumentation instrumentation
+ = Instrumentation.create(localHttpInstrumentationOptions, libraryInstrumentationOptions);
+
+ HttpPipeline localPipeline = (pipeline != null) ? pipeline : createHttpPipeline();
+ String localVersion = (version != null) ? version : "2025-01-05";
+ AzureBlobStorageImpl client = new AzureBlobStorageImpl(localPipeline, this.url, localVersion, instrumentation);
+ return client;
+ }
+
+ @Metadata(generated = true)
+ private void validateClient() {
+ // This method is invoked from 'buildInnerClient'/'buildClient' method.
+ // Developer can customize this method, to validate that the necessary conditions are met for the new client.
+ Objects.requireNonNull(url, "'url' cannot be null.");
+ }
+
+ @Metadata(generated = true)
+ private HttpPipeline createHttpPipeline() {
+ Configuration buildConfiguration
+ = (configuration == null) ? Configuration.getGlobalConfiguration() : configuration;
+ HttpInstrumentationOptions localHttpInstrumentationOptions = this.httpInstrumentationOptions == null
+ ? new HttpInstrumentationOptions()
+ : this.httpInstrumentationOptions;
+ HttpPipelineBuilder httpPipelineBuilder = new HttpPipelineBuilder();
+ List policies = new ArrayList<>();
+ policies.add(redirectOptions == null ? new HttpRedirectPolicy() : new HttpRedirectPolicy(redirectOptions));
+ policies.add(retryOptions == null ? new HttpRetryPolicy() : new HttpRetryPolicy(retryOptions));
+ this.pipelinePolicies.stream().forEach(p -> policies.add(p));
+ policies.add(new HttpInstrumentationPolicy(localHttpInstrumentationOptions));
+ policies.forEach(httpPipelineBuilder::addPolicy);
+ return httpPipelineBuilder.build();
+ }
+
+ /**
+ * Builds an instance of ServiceClient class.
+ *
+ * @return an instance of ServiceClient.
+ */
+ @Metadata(generated = true)
+ public StorageServiceClient buildServiceClient() {
+ HttpInstrumentationOptions localHttpInstrumentationOptions = this.httpInstrumentationOptions == null
+ ? new HttpInstrumentationOptions()
+ : this.httpInstrumentationOptions;
+ LibraryInstrumentationOptions libraryInstrumentationOptions = new LibraryInstrumentationOptions("TODO");
+ Instrumentation instrumentation
+ = Instrumentation.create(localHttpInstrumentationOptions, libraryInstrumentationOptions);
+ return new StorageServiceClient(buildInnerClient().getServices(), instrumentation);
+ }
+
+ /**
+ * Builds an instance of ContainerClient class.
+ *
+ * @return an instance of ContainerClient.
+ */
+ @Metadata(generated = true)
+ public ContainerClient buildContainerClient() {
+ HttpInstrumentationOptions localHttpInstrumentationOptions = this.httpInstrumentationOptions == null
+ ? new HttpInstrumentationOptions()
+ : this.httpInstrumentationOptions;
+ LibraryInstrumentationOptions libraryInstrumentationOptions = new LibraryInstrumentationOptions("TODO");
+ Instrumentation instrumentation
+ = Instrumentation.create(localHttpInstrumentationOptions, libraryInstrumentationOptions);
+ return new ContainerClient(buildInnerClient().getContainers(), instrumentation);
+ }
+
+ /**
+ * Builds an instance of BlobClient class.
+ *
+ * @return an instance of BlobClient.
+ */
+ @Metadata(generated = true)
+ public BlobClient buildBlobClient() {
+ HttpInstrumentationOptions localHttpInstrumentationOptions = this.httpInstrumentationOptions == null
+ ? new HttpInstrumentationOptions()
+ : this.httpInstrumentationOptions;
+ LibraryInstrumentationOptions libraryInstrumentationOptions = new LibraryInstrumentationOptions("TODO");
+ Instrumentation instrumentation
+ = Instrumentation.create(localHttpInstrumentationOptions, libraryInstrumentationOptions);
+ return new BlobClient(buildInnerClient().getBlobs(), instrumentation);
+ }
+
+ /**
+ * Builds an instance of PageBlobClient class.
+ *
+ * @return an instance of PageBlobClient.
+ */
+ @Metadata(generated = true)
+ public PageBlobClient buildPageBlobClient() {
+ HttpInstrumentationOptions localHttpInstrumentationOptions = this.httpInstrumentationOptions == null
+ ? new HttpInstrumentationOptions()
+ : this.httpInstrumentationOptions;
+ LibraryInstrumentationOptions libraryInstrumentationOptions = new LibraryInstrumentationOptions("TODO");
+ Instrumentation instrumentation
+ = Instrumentation.create(localHttpInstrumentationOptions, libraryInstrumentationOptions);
+ return new PageBlobClient(buildInnerClient().getPageBlobs(), instrumentation);
+ }
+
+ /**
+ * Builds an instance of AppendBlobClient class.
+ *
+ * @return an instance of AppendBlobClient.
+ */
+ @Metadata(generated = true)
+ public AppendBlobClient buildAppendBlobClient() {
+ HttpInstrumentationOptions localHttpInstrumentationOptions = this.httpInstrumentationOptions == null
+ ? new HttpInstrumentationOptions()
+ : this.httpInstrumentationOptions;
+ LibraryInstrumentationOptions libraryInstrumentationOptions = new LibraryInstrumentationOptions("TODO");
+ Instrumentation instrumentation
+ = Instrumentation.create(localHttpInstrumentationOptions, libraryInstrumentationOptions);
+ return new AppendBlobClient(buildInnerClient().getAppendBlobs(), instrumentation);
+ }
+
+ /**
+ * Builds an instance of BlockBlobClient class.
+ *
+ * @return an instance of BlockBlobClient.
+ */
+ @Metadata(generated = true)
+ public BlockBlobClient buildBlockBlobClient() {
+ HttpInstrumentationOptions localHttpInstrumentationOptions = this.httpInstrumentationOptions == null
+ ? new HttpInstrumentationOptions()
+ : this.httpInstrumentationOptions;
+ LibraryInstrumentationOptions libraryInstrumentationOptions = new LibraryInstrumentationOptions("TODO");
+ Instrumentation instrumentation
+ = Instrumentation.create(localHttpInstrumentationOptions, libraryInstrumentationOptions);
+ return new BlockBlobClient(buildInnerClient().getBlockBlobs(), instrumentation);
+ }
+}
diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/BlobClient.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/BlobClient.java
new file mode 100644
index 000000000000..8ef6fdc01807
--- /dev/null
+++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/BlobClient.java
@@ -0,0 +1,1841 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.v2.storage.blob;
+
+import com.azure.v2.storage.blob.implementation.BlobsImpl;
+import com.azure.v2.storage.blob.models.AccessTier;
+import com.azure.v2.storage.blob.models.BlobCopySourceTagsMode;
+import com.azure.v2.storage.blob.models.BlobDeleteType;
+import com.azure.v2.storage.blob.models.BlobExpiryOptions;
+import com.azure.v2.storage.blob.models.BlobHttpHeaders;
+import com.azure.v2.storage.blob.models.BlobImmutabilityPolicyMode;
+import com.azure.v2.storage.blob.models.BlobTags;
+import com.azure.v2.storage.blob.models.CpkInfo;
+import com.azure.v2.storage.blob.models.DeleteSnapshotsOptionType;
+import com.azure.v2.storage.blob.models.EncryptionScope;
+import com.azure.v2.storage.blob.models.QueryRequest;
+import com.azure.v2.storage.blob.models.RehydratePriority;
+import com.azure.v2.storage.blob.models.StorageErrorException;
+import io.clientcore.core.annotations.Metadata;
+import io.clientcore.core.annotations.ServiceClient;
+import io.clientcore.core.http.models.RequestOptions;
+import io.clientcore.core.http.models.Response;
+import io.clientcore.core.instrumentation.Instrumentation;
+import java.io.InputStream;
+import java.time.OffsetDateTime;
+import java.util.Map;
+
+/**
+ * Initializes a new instance of the synchronous AzureBlobStorage type.
+ */
+@ServiceClient(builder = AzureBlobStorageBuilder.class)
+public final class BlobClient {
+ @Metadata(generated = true)
+ private final BlobsImpl serviceClient;
+
+ private final Instrumentation instrumentation;
+
+ /**
+ * Initializes an instance of BlobClient class.
+ *
+ * @param serviceClient the service client implementation.
+ * @param instrumentation the instrumentation instance.
+ */
+ @Metadata(generated = true)
+ BlobClient(BlobsImpl serviceClient, Instrumentation instrumentation) {
+ this.serviceClient = serviceClient;
+ this.instrumentation = instrumentation;
+ }
+
+ /**
+ * The Download operation reads or downloads a blob from the system, including its metadata and properties. You can
+ * also call Download to read a snapshot or version.
+ *
+ * @param containerName The container name.
+ * @param blob The blob name.
+ * @param snapshot The snapshot parameter is an opaque DateTime value that, when present, specifies the blob
+ * snapshot to retrieve. For more information on working with blob snapshots, see <a
+ * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/creating-a-snapshot-of-a-blob">Creating
+ * a Snapshot of a Blob.</a>.
+ * @param versionId The version id parameter is an opaque DateTime value that, when present, specifies the version
+ * of the blob to operate on. It's for service version 2019-10-10 and newer.
+ * @param timeout The timeout parameter is expressed in seconds. For more information, see <a
+ * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting
+ * Timeouts for Blob Service Operations.</a>.
+ * @param range Return only the bytes of the blob in the specified range.
+ * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID.
+ * @param rangeGetContentMD5 When set to true and specified together with the Range, the service returns the MD5
+ * hash for the range, as long as the range is less than or equal to 4 MB in size.
+ * @param rangeGetContentCRC64 When set to true and specified together with the Range, the service returns the CRC64
+ * hash for the range, as long as the range is less than or equal to 4 MB in size.
+ * @param structuredBodyType Specifies the response content should be returned as a structured message and specifies
+ * the message schema version and properties.
+ * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the
+ * specified date/time.
+ * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since
+ * the specified date/time.
+ * @param ifMatch Specify an ETag value to operate only on blobs with a matching value.
+ * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value.
+ * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value.
+ * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the
+ * analytics logs when storage analytics logging is enabled.
+ * @param cpkInfo Parameter group.
+ * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws StorageErrorException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response.
+ */
+ @Metadata(generated = true)
+ public Response downloadWithResponse(String containerName, String blob, String snapshot,
+ String versionId, Integer timeout, String range, String leaseId, Boolean rangeGetContentMD5,
+ Boolean rangeGetContentCRC64, String structuredBodyType, OffsetDateTime ifModifiedSince,
+ OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, String ifTags, String requestId,
+ CpkInfo cpkInfo, RequestOptions requestOptions) {
+ return this.instrumentation.instrumentWithResponse("Blob_Download", requestOptions,
+ updatedOptions -> this.serviceClient.downloadWithResponse(containerName, blob, snapshot, versionId, timeout,
+ range, leaseId, rangeGetContentMD5, rangeGetContentCRC64, structuredBodyType, ifModifiedSince,
+ ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, requestId, cpkInfo, updatedOptions));
+ }
+
+ /**
+ * The Download operation reads or downloads a blob from the system, including its metadata and properties. You can
+ * also call Download to read a snapshot or version.
+ *
+ * @param containerName The container name.
+ * @param blob The blob name.
+ * @param snapshot The snapshot parameter is an opaque DateTime value that, when present, specifies the blob
+ * snapshot to retrieve. For more information on working with blob snapshots, see <a
+ * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/creating-a-snapshot-of-a-blob">Creating
+ * a Snapshot of a Blob.</a>.
+ * @param versionId The version id parameter is an opaque DateTime value that, when present, specifies the version
+ * of the blob to operate on. It's for service version 2019-10-10 and newer.
+ * @param timeout The timeout parameter is expressed in seconds. For more information, see <a
+ * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting
+ * Timeouts for Blob Service Operations.</a>.
+ * @param range Return only the bytes of the blob in the specified range.
+ * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID.
+ * @param rangeGetContentMD5 When set to true and specified together with the Range, the service returns the MD5
+ * hash for the range, as long as the range is less than or equal to 4 MB in size.
+ * @param rangeGetContentCRC64 When set to true and specified together with the Range, the service returns the CRC64
+ * hash for the range, as long as the range is less than or equal to 4 MB in size.
+ * @param structuredBodyType Specifies the response content should be returned as a structured message and specifies
+ * the message schema version and properties.
+ * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the
+ * specified date/time.
+ * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since
+ * the specified date/time.
+ * @param ifMatch Specify an ETag value to operate only on blobs with a matching value.
+ * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value.
+ * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value.
+ * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the
+ * analytics logs when storage analytics logging is enabled.
+ * @param cpkInfo Parameter group.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws StorageErrorException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response.
+ */
+ @Metadata(generated = true)
+ public InputStream download(String containerName, String blob, String snapshot, String versionId, Integer timeout,
+ String range, String leaseId, Boolean rangeGetContentMD5, Boolean rangeGetContentCRC64,
+ String structuredBodyType, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch,
+ String ifNoneMatch, String ifTags, String requestId, CpkInfo cpkInfo) {
+ return this.instrumentation.instrumentWithResponse("Blob_Download", null,
+ updatedOptions -> this.serviceClient.download(containerName, blob, snapshot, versionId, timeout, range,
+ leaseId, rangeGetContentMD5, rangeGetContentCRC64, structuredBodyType, ifModifiedSince,
+ ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, requestId, cpkInfo));
+ }
+
+ /**
+ * The Get Properties operation returns all user-defined metadata, standard HTTP properties, and system properties
+ * for the blob. It does not return the content of the blob.
+ *
+ * @param containerName The container name.
+ * @param blob The blob name.
+ * @param snapshot The snapshot parameter is an opaque DateTime value that, when present, specifies the blob
+ * snapshot to retrieve. For more information on working with blob snapshots, see <a
+ * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/creating-a-snapshot-of-a-blob">Creating
+ * a Snapshot of a Blob.</a>.
+ * @param versionId The version id parameter is an opaque DateTime value that, when present, specifies the version
+ * of the blob to operate on. It's for service version 2019-10-10 and newer.
+ * @param timeout The timeout parameter is expressed in seconds. For more information, see <a
+ * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting
+ * Timeouts for Blob Service Operations.</a>.
+ * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID.
+ * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the
+ * specified date/time.
+ * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since
+ * the specified date/time.
+ * @param ifMatch Specify an ETag value to operate only on blobs with a matching value.
+ * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value.
+ * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value.
+ * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the
+ * analytics logs when storage analytics logging is enabled.
+ * @param cpkInfo Parameter group.
+ * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws StorageErrorException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response.
+ */
+ @Metadata(generated = true)
+ public Response getPropertiesWithResponse(String containerName, String blob, String snapshot,
+ String versionId, Integer timeout, String leaseId, OffsetDateTime ifModifiedSince,
+ OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, String ifTags, String requestId,
+ CpkInfo cpkInfo, RequestOptions requestOptions) {
+ return this.instrumentation.instrumentWithResponse("Blob_GetProperties", requestOptions,
+ updatedOptions -> this.serviceClient.getPropertiesWithResponse(containerName, blob, snapshot, versionId,
+ timeout, leaseId, ifModifiedSince, ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, requestId, cpkInfo,
+ updatedOptions));
+ }
+
+ /**
+ * The Get Properties operation returns all user-defined metadata, standard HTTP properties, and system properties
+ * for the blob. It does not return the content of the blob.
+ *
+ * @param containerName The container name.
+ * @param blob The blob name.
+ * @param snapshot The snapshot parameter is an opaque DateTime value that, when present, specifies the blob
+ * snapshot to retrieve. For more information on working with blob snapshots, see <a
+ * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/creating-a-snapshot-of-a-blob">Creating
+ * a Snapshot of a Blob.</a>.
+ * @param versionId The version id parameter is an opaque DateTime value that, when present, specifies the version
+ * of the blob to operate on. It's for service version 2019-10-10 and newer.
+ * @param timeout The timeout parameter is expressed in seconds. For more information, see <a
+ * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting
+ * Timeouts for Blob Service Operations.</a>.
+ * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID.
+ * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the
+ * specified date/time.
+ * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since
+ * the specified date/time.
+ * @param ifMatch Specify an ETag value to operate only on blobs with a matching value.
+ * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value.
+ * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value.
+ * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the
+ * analytics logs when storage analytics logging is enabled.
+ * @param cpkInfo Parameter group.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws StorageErrorException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @Metadata(generated = true)
+ public void getProperties(String containerName, String blob, String snapshot, String versionId, Integer timeout,
+ String leaseId, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch,
+ String ifNoneMatch, String ifTags, String requestId, CpkInfo cpkInfo) {
+ this.instrumentation.instrument("Blob_GetProperties", null,
+ updatedOptions -> this.serviceClient.getProperties(containerName, blob, snapshot, versionId, timeout,
+ leaseId, ifModifiedSince, ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, requestId, cpkInfo));
+ }
+
+ /**
+ * If the storage account's soft delete feature is disabled then, when a blob is deleted, it is permanently removed
+ * from the storage account. If the storage account's soft delete feature is enabled, then, when a blob is deleted,
+ * it is marked for deletion and becomes inaccessible immediately. However, the blob service retains the blob or
+ * snapshot for the number of days specified by the DeleteRetentionPolicy section of [Storage service properties]
+ * (Set-Blob-Service-Properties.md). After the specified number of days has passed, the blob's data is permanently
+ * removed from the storage account. Note that you continue to be charged for the soft-deleted blob's storage until
+ * it is permanently removed. Use the List Blobs API and specify the "include=deleted" query parameter to discover
+ * which blobs and snapshots have been soft deleted. You can then use the Undelete Blob API to restore a
+ * soft-deleted blob. All other operations on a soft-deleted blob or snapshot causes the service to return an HTTP
+ * status code of 404 (ResourceNotFound). If the storage account's automatic snapshot feature is enabled, then, when
+ * a blob is deleted, an automatic snapshot is created. The blob becomes inaccessible immediately. All other
+ * operations on the blob causes the service to return an HTTP status code of 404 (ResourceNotFound). You can access
+ * automatic snapshot using snapshot timestamp or version id. You can restore the blob by calling Put or Copy Blob
+ * API with automatic snapshot as source. Deleting automatic snapshot requires shared key or special SAS/RBAC
+ * permissions.
+ *
+ * @param containerName The container name.
+ * @param blob The blob name.
+ * @param snapshot The snapshot parameter is an opaque DateTime value that, when present, specifies the blob
+ * snapshot to retrieve. For more information on working with blob snapshots, see <a
+ * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/creating-a-snapshot-of-a-blob">Creating
+ * a Snapshot of a Blob.</a>.
+ * @param versionId The version id parameter is an opaque DateTime value that, when present, specifies the version
+ * of the blob to operate on. It's for service version 2019-10-10 and newer.
+ * @param timeout The timeout parameter is expressed in seconds. For more information, see <a
+ * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting
+ * Timeouts for Blob Service Operations.</a>.
+ * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID.
+ * @param deleteSnapshots Required if the blob has associated snapshots. Specify one of the following two options:
+ * include: Delete the base blob and all of its snapshots. only: Delete only the blob's snapshots and not the blob
+ * itself.
+ * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the
+ * specified date/time.
+ * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since
+ * the specified date/time.
+ * @param ifMatch Specify an ETag value to operate only on blobs with a matching value.
+ * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value.
+ * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value.
+ * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the
+ * analytics logs when storage analytics logging is enabled.
+ * @param blobDeleteType Optional. Only possible value is 'permanent', which specifies to permanently delete a blob
+ * if blob soft delete is enabled.
+ * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws StorageErrorException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response.
+ */
+ @Metadata(generated = true)
+ public Response deleteWithResponse(String containerName, String blob, String snapshot, String versionId,
+ Integer timeout, String leaseId, DeleteSnapshotsOptionType deleteSnapshots, OffsetDateTime ifModifiedSince,
+ OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, String ifTags, String requestId,
+ BlobDeleteType blobDeleteType, RequestOptions requestOptions) {
+ return this.instrumentation.instrumentWithResponse("Blob_Delete", requestOptions,
+ updatedOptions -> this.serviceClient.deleteWithResponse(containerName, blob, snapshot, versionId, timeout,
+ leaseId, deleteSnapshots, ifModifiedSince, ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, requestId,
+ blobDeleteType, updatedOptions));
+ }
+
+ /**
+ * If the storage account's soft delete feature is disabled then, when a blob is deleted, it is permanently removed
+ * from the storage account. If the storage account's soft delete feature is enabled, then, when a blob is deleted,
+ * it is marked for deletion and becomes inaccessible immediately. However, the blob service retains the blob or
+ * snapshot for the number of days specified by the DeleteRetentionPolicy section of [Storage service properties]
+ * (Set-Blob-Service-Properties.md). After the specified number of days has passed, the blob's data is permanently
+ * removed from the storage account. Note that you continue to be charged for the soft-deleted blob's storage until
+ * it is permanently removed. Use the List Blobs API and specify the "include=deleted" query parameter to discover
+ * which blobs and snapshots have been soft deleted. You can then use the Undelete Blob API to restore a
+ * soft-deleted blob. All other operations on a soft-deleted blob or snapshot causes the service to return an HTTP
+ * status code of 404 (ResourceNotFound). If the storage account's automatic snapshot feature is enabled, then, when
+ * a blob is deleted, an automatic snapshot is created. The blob becomes inaccessible immediately. All other
+ * operations on the blob causes the service to return an HTTP status code of 404 (ResourceNotFound). You can access
+ * automatic snapshot using snapshot timestamp or version id. You can restore the blob by calling Put or Copy Blob
+ * API with automatic snapshot as source. Deleting automatic snapshot requires shared key or special SAS/RBAC
+ * permissions.
+ *
+ * @param containerName The container name.
+ * @param blob The blob name.
+ * @param snapshot The snapshot parameter is an opaque DateTime value that, when present, specifies the blob
+ * snapshot to retrieve. For more information on working with blob snapshots, see <a
+ * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/creating-a-snapshot-of-a-blob">Creating
+ * a Snapshot of a Blob.</a>.
+ * @param versionId The version id parameter is an opaque DateTime value that, when present, specifies the version
+ * of the blob to operate on. It's for service version 2019-10-10 and newer.
+ * @param timeout The timeout parameter is expressed in seconds. For more information, see <a
+ * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting
+ * Timeouts for Blob Service Operations.</a>.
+ * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID.
+ * @param deleteSnapshots Required if the blob has associated snapshots. Specify one of the following two options:
+ * include: Delete the base blob and all of its snapshots. only: Delete only the blob's snapshots and not the blob
+ * itself.
+ * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the
+ * specified date/time.
+ * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since
+ * the specified date/time.
+ * @param ifMatch Specify an ETag value to operate only on blobs with a matching value.
+ * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value.
+ * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value.
+ * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the
+ * analytics logs when storage analytics logging is enabled.
+ * @param blobDeleteType Optional. Only possible value is 'permanent', which specifies to permanently delete a blob
+ * if blob soft delete is enabled.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws StorageErrorException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @Metadata(generated = true)
+ public void delete(String containerName, String blob, String snapshot, String versionId, Integer timeout,
+ String leaseId, DeleteSnapshotsOptionType deleteSnapshots, OffsetDateTime ifModifiedSince,
+ OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, String ifTags, String requestId,
+ BlobDeleteType blobDeleteType) {
+ this.instrumentation.instrument("Blob_Delete", null,
+ updatedOptions -> this.serviceClient.delete(containerName, blob, snapshot, versionId, timeout, leaseId,
+ deleteSnapshots, ifModifiedSince, ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, requestId,
+ blobDeleteType));
+ }
+
+ /**
+ * Undelete a blob that was previously soft deleted.
+ *
+ * @param containerName The container name.
+ * @param blob The blob name.
+ * @param timeout The timeout parameter is expressed in seconds. For more information, see <a
+ * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting
+ * Timeouts for Blob Service Operations.</a>.
+ * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the
+ * analytics logs when storage analytics logging is enabled.
+ * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws StorageErrorException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response.
+ */
+ @Metadata(generated = true)
+ public Response undeleteWithResponse(String containerName, String blob, Integer timeout, String requestId,
+ RequestOptions requestOptions) {
+ return this.instrumentation.instrumentWithResponse("Blob_Undelete", requestOptions,
+ updatedOptions -> this.serviceClient.undeleteWithResponse(containerName, blob, timeout, requestId,
+ updatedOptions));
+ }
+
+ /**
+ * Undelete a blob that was previously soft deleted.
+ *
+ * @param containerName The container name.
+ * @param blob The blob name.
+ * @param timeout The timeout parameter is expressed in seconds. For more information, see <a
+ * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting
+ * Timeouts for Blob Service Operations.</a>.
+ * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the
+ * analytics logs when storage analytics logging is enabled.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws StorageErrorException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @Metadata(generated = true)
+ public void undelete(String containerName, String blob, Integer timeout, String requestId) {
+ this.instrumentation.instrument("Blob_Undelete", null,
+ updatedOptions -> this.serviceClient.undelete(containerName, blob, timeout, requestId));
+ }
+
+ /**
+ * Sets the time a blob will expire and be deleted.
+ *
+ * @param containerName The container name.
+ * @param blob The blob name.
+ * @param expiryOptions Required. Indicates mode of the expiry time.
+ * @param timeout The timeout parameter is expressed in seconds. For more information, see <a
+ * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting
+ * Timeouts for Blob Service Operations.</a>.
+ * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the
+ * analytics logs when storage analytics logging is enabled.
+ * @param expiresOn The time to set the blob to expiry.
+ * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws StorageErrorException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response.
+ */
+ @Metadata(generated = true)
+ public Response setExpiryWithResponse(String containerName, String blob, BlobExpiryOptions expiryOptions,
+ Integer timeout, String requestId, String expiresOn, RequestOptions requestOptions) {
+ return this.instrumentation.instrumentWithResponse("Blob_SetExpiry", requestOptions,
+ updatedOptions -> this.serviceClient.setExpiryWithResponse(containerName, blob, expiryOptions, timeout,
+ requestId, expiresOn, updatedOptions));
+ }
+
+ /**
+ * Sets the time a blob will expire and be deleted.
+ *
+ * @param containerName The container name.
+ * @param blob The blob name.
+ * @param expiryOptions Required. Indicates mode of the expiry time.
+ * @param timeout The timeout parameter is expressed in seconds. For more information, see <a
+ * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting
+ * Timeouts for Blob Service Operations.</a>.
+ * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the
+ * analytics logs when storage analytics logging is enabled.
+ * @param expiresOn The time to set the blob to expiry.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws StorageErrorException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @Metadata(generated = true)
+ public void setExpiry(String containerName, String blob, BlobExpiryOptions expiryOptions, Integer timeout,
+ String requestId, String expiresOn) {
+ this.instrumentation.instrument("Blob_SetExpiry", null, updatedOptions -> this.serviceClient
+ .setExpiry(containerName, blob, expiryOptions, timeout, requestId, expiresOn));
+ }
+
+ /**
+ * The Set HTTP Headers operation sets system properties on the blob.
+ *
+ * @param containerName The container name.
+ * @param blob The blob name.
+ * @param timeout The timeout parameter is expressed in seconds. For more information, see <a
+ * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting
+ * Timeouts for Blob Service Operations.</a>.
+ * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID.
+ * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the
+ * specified date/time.
+ * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since
+ * the specified date/time.
+ * @param ifMatch Specify an ETag value to operate only on blobs with a matching value.
+ * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value.
+ * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value.
+ * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the
+ * analytics logs when storage analytics logging is enabled.
+ * @param blobHttpHeaders Parameter group.
+ * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws StorageErrorException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response.
+ */
+ @Metadata(generated = true)
+ public Response setHttpHeadersWithResponse(String containerName, String blob, Integer timeout, String leaseId,
+ OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch,
+ String ifTags, String requestId, BlobHttpHeaders blobHttpHeaders, RequestOptions requestOptions) {
+ return this.instrumentation.instrumentWithResponse("Blob_SetHTTPHeaders", requestOptions,
+ updatedOptions -> this.serviceClient.setHttpHeadersWithResponse(containerName, blob, timeout, leaseId,
+ ifModifiedSince, ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, requestId, blobHttpHeaders,
+ updatedOptions));
+ }
+
+ /**
+ * The Set HTTP Headers operation sets system properties on the blob.
+ *
+ * @param containerName The container name.
+ * @param blob The blob name.
+ * @param timeout The timeout parameter is expressed in seconds. For more information, see <a
+ * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting
+ * Timeouts for Blob Service Operations.</a>.
+ * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID.
+ * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the
+ * specified date/time.
+ * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since
+ * the specified date/time.
+ * @param ifMatch Specify an ETag value to operate only on blobs with a matching value.
+ * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value.
+ * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value.
+ * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the
+ * analytics logs when storage analytics logging is enabled.
+ * @param blobHttpHeaders Parameter group.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws StorageErrorException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @Metadata(generated = true)
+ public void setHttpHeaders(String containerName, String blob, Integer timeout, String leaseId,
+ OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch,
+ String ifTags, String requestId, BlobHttpHeaders blobHttpHeaders) {
+ this.instrumentation.instrument("Blob_SetHTTPHeaders", null,
+ updatedOptions -> this.serviceClient.setHttpHeaders(containerName, blob, timeout, leaseId, ifModifiedSince,
+ ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, requestId, blobHttpHeaders));
+ }
+
+ /**
+ * The Set Immutability Policy operation sets the immutability policy on the blob.
+ *
+ * @param containerName The container name.
+ * @param blob The blob name.
+ * @param timeout The timeout parameter is expressed in seconds. For more information, see <a
+ * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting
+ * Timeouts for Blob Service Operations.</a>.
+ * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the
+ * analytics logs when storage analytics logging is enabled.
+ * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since
+ * the specified date/time.
+ * @param immutabilityPolicyExpiry Specifies the date time when the blobs immutability policy is set to expire.
+ * @param immutabilityPolicyMode Specifies the immutability policy mode to set on the blob.
+ * @param snapshot The snapshot parameter is an opaque DateTime value that, when present, specifies the blob
+ * snapshot to retrieve. For more information on working with blob snapshots, see <a
+ * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/creating-a-snapshot-of-a-blob">Creating
+ * a Snapshot of a Blob.</a>.
+ * @param versionId The version id parameter is an opaque DateTime value that, when present, specifies the version
+ * of the blob to operate on. It's for service version 2019-10-10 and newer.
+ * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws StorageErrorException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response.
+ */
+ @Metadata(generated = true)
+ public Response setImmutabilityPolicyWithResponse(String containerName, String blob, Integer timeout,
+ String requestId, OffsetDateTime ifUnmodifiedSince, OffsetDateTime immutabilityPolicyExpiry,
+ BlobImmutabilityPolicyMode immutabilityPolicyMode, String snapshot, String versionId,
+ RequestOptions requestOptions) {
+ return this.instrumentation.instrumentWithResponse("Blob_SetImmutabilityPolicy", requestOptions,
+ updatedOptions -> this.serviceClient.setImmutabilityPolicyWithResponse(containerName, blob, timeout,
+ requestId, ifUnmodifiedSince, immutabilityPolicyExpiry, immutabilityPolicyMode, snapshot, versionId,
+ updatedOptions));
+ }
+
+ /**
+ * The Set Immutability Policy operation sets the immutability policy on the blob.
+ *
+ * @param containerName The container name.
+ * @param blob The blob name.
+ * @param timeout The timeout parameter is expressed in seconds. For more information, see <a
+ * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting
+ * Timeouts for Blob Service Operations.</a>.
+ * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the
+ * analytics logs when storage analytics logging is enabled.
+ * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since
+ * the specified date/time.
+ * @param immutabilityPolicyExpiry Specifies the date time when the blobs immutability policy is set to expire.
+ * @param immutabilityPolicyMode Specifies the immutability policy mode to set on the blob.
+ * @param snapshot The snapshot parameter is an opaque DateTime value that, when present, specifies the blob
+ * snapshot to retrieve. For more information on working with blob snapshots, see <a
+ * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/creating-a-snapshot-of-a-blob">Creating
+ * a Snapshot of a Blob.</a>.
+ * @param versionId The version id parameter is an opaque DateTime value that, when present, specifies the version
+ * of the blob to operate on. It's for service version 2019-10-10 and newer.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws StorageErrorException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @Metadata(generated = true)
+ public void setImmutabilityPolicy(String containerName, String blob, Integer timeout, String requestId,
+ OffsetDateTime ifUnmodifiedSince, OffsetDateTime immutabilityPolicyExpiry,
+ BlobImmutabilityPolicyMode immutabilityPolicyMode, String snapshot, String versionId) {
+ this.instrumentation.instrument("Blob_SetImmutabilityPolicy", null,
+ updatedOptions -> this.serviceClient.setImmutabilityPolicy(containerName, blob, timeout, requestId,
+ ifUnmodifiedSince, immutabilityPolicyExpiry, immutabilityPolicyMode, snapshot, versionId));
+ }
+
+ /**
+ * The Delete Immutability Policy operation deletes the immutability policy on the blob.
+ *
+ * @param containerName The container name.
+ * @param blob The blob name.
+ * @param timeout The timeout parameter is expressed in seconds. For more information, see <a
+ * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting
+ * Timeouts for Blob Service Operations.</a>.
+ * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the
+ * analytics logs when storage analytics logging is enabled.
+ * @param snapshot The snapshot parameter is an opaque DateTime value that, when present, specifies the blob
+ * snapshot to retrieve. For more information on working with blob snapshots, see <a
+ * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/creating-a-snapshot-of-a-blob">Creating
+ * a Snapshot of a Blob.</a>.
+ * @param versionId The version id parameter is an opaque DateTime value that, when present, specifies the version
+ * of the blob to operate on. It's for service version 2019-10-10 and newer.
+ * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws StorageErrorException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response.
+ */
+ @Metadata(generated = true)
+ public Response deleteImmutabilityPolicyWithResponse(String containerName, String blob, Integer timeout,
+ String requestId, String snapshot, String versionId, RequestOptions requestOptions) {
+ return this.instrumentation.instrumentWithResponse("Blob_DeleteImmutabilityPolicy", requestOptions,
+ updatedOptions -> this.serviceClient.deleteImmutabilityPolicyWithResponse(containerName, blob, timeout,
+ requestId, snapshot, versionId, updatedOptions));
+ }
+
+ /**
+ * The Delete Immutability Policy operation deletes the immutability policy on the blob.
+ *
+ * @param containerName The container name.
+ * @param blob The blob name.
+ * @param timeout The timeout parameter is expressed in seconds. For more information, see <a
+ * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting
+ * Timeouts for Blob Service Operations.</a>.
+ * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the
+ * analytics logs when storage analytics logging is enabled.
+ * @param snapshot The snapshot parameter is an opaque DateTime value that, when present, specifies the blob
+ * snapshot to retrieve. For more information on working with blob snapshots, see <a
+ * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/creating-a-snapshot-of-a-blob">Creating
+ * a Snapshot of a Blob.</a>.
+ * @param versionId The version id parameter is an opaque DateTime value that, when present, specifies the version
+ * of the blob to operate on. It's for service version 2019-10-10 and newer.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws StorageErrorException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @Metadata(generated = true)
+ public void deleteImmutabilityPolicy(String containerName, String blob, Integer timeout, String requestId,
+ String snapshot, String versionId) {
+ this.instrumentation.instrument("Blob_DeleteImmutabilityPolicy", null, updatedOptions -> this.serviceClient
+ .deleteImmutabilityPolicy(containerName, blob, timeout, requestId, snapshot, versionId));
+ }
+
+ /**
+ * The Set Legal Hold operation sets a legal hold on the blob.
+ *
+ * @param containerName The container name.
+ * @param blob The blob name.
+ * @param legalHold Specified if a legal hold should be set on the blob.
+ * @param timeout The timeout parameter is expressed in seconds. For more information, see <a
+ * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting
+ * Timeouts for Blob Service Operations.</a>.
+ * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the
+ * analytics logs when storage analytics logging is enabled.
+ * @param snapshot The snapshot parameter is an opaque DateTime value that, when present, specifies the blob
+ * snapshot to retrieve. For more information on working with blob snapshots, see <a
+ * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/creating-a-snapshot-of-a-blob">Creating
+ * a Snapshot of a Blob.</a>.
+ * @param versionId The version id parameter is an opaque DateTime value that, when present, specifies the version
+ * of the blob to operate on. It's for service version 2019-10-10 and newer.
+ * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws StorageErrorException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response.
+ */
+ @Metadata(generated = true)
+ public Response setLegalHoldWithResponse(String containerName, String blob, boolean legalHold,
+ Integer timeout, String requestId, String snapshot, String versionId, RequestOptions requestOptions) {
+ return this.instrumentation.instrumentWithResponse("Blob_SetLegalHold", requestOptions,
+ updatedOptions -> this.serviceClient.setLegalHoldWithResponse(containerName, blob, legalHold, timeout,
+ requestId, snapshot, versionId, updatedOptions));
+ }
+
+ /**
+ * The Set Legal Hold operation sets a legal hold on the blob.
+ *
+ * @param containerName The container name.
+ * @param blob The blob name.
+ * @param legalHold Specified if a legal hold should be set on the blob.
+ * @param timeout The timeout parameter is expressed in seconds. For more information, see <a
+ * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting
+ * Timeouts for Blob Service Operations.</a>.
+ * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the
+ * analytics logs when storage analytics logging is enabled.
+ * @param snapshot The snapshot parameter is an opaque DateTime value that, when present, specifies the blob
+ * snapshot to retrieve. For more information on working with blob snapshots, see <a
+ * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/creating-a-snapshot-of-a-blob">Creating
+ * a Snapshot of a Blob.</a>.
+ * @param versionId The version id parameter is an opaque DateTime value that, when present, specifies the version
+ * of the blob to operate on. It's for service version 2019-10-10 and newer.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws StorageErrorException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @Metadata(generated = true)
+ public void setLegalHold(String containerName, String blob, boolean legalHold, Integer timeout, String requestId,
+ String snapshot, String versionId) {
+ this.instrumentation.instrument("Blob_SetLegalHold", null, updatedOptions -> this.serviceClient
+ .setLegalHold(containerName, blob, legalHold, timeout, requestId, snapshot, versionId));
+ }
+
+ /**
+ * The Set Blob Metadata operation sets user-defined metadata for the specified blob as one or more name-value
+ * pairs.
+ *
+ * @param containerName The container name.
+ * @param blob The blob name.
+ * @param timeout The timeout parameter is expressed in seconds. For more information, see <a
+ * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting
+ * Timeouts for Blob Service Operations.</a>.
+ * @param metadata Optional. Specifies a user-defined name-value pair associated with the blob. If no name-value
+ * pairs are specified, the operation will copy the metadata from the source blob or file to the destination blob.
+ * If one or more name-value pairs are specified, the destination blob is created with the specified metadata, and
+ * metadata is not copied from the source blob or file. Note that beginning with version 2009-09-19, metadata names
+ * must adhere to the naming rules for C# identifiers. See Naming and Referencing Containers, Blobs, and Metadata
+ * for more information.
+ * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID.
+ * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the
+ * specified date/time.
+ * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since
+ * the specified date/time.
+ * @param ifMatch Specify an ETag value to operate only on blobs with a matching value.
+ * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value.
+ * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value.
+ * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the
+ * analytics logs when storage analytics logging is enabled.
+ * @param cpkInfo Parameter group.
+ * @param encryptionScopeParam Parameter group.
+ * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws StorageErrorException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response.
+ */
+ @Metadata(generated = true)
+ public Response setMetadataWithResponse(String containerName, String blob, Integer timeout,
+ Map metadata, String leaseId, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince,
+ String ifMatch, String ifNoneMatch, String ifTags, String requestId, CpkInfo cpkInfo,
+ EncryptionScope encryptionScopeParam, RequestOptions requestOptions) {
+ return this.instrumentation.instrumentWithResponse("Blob_SetMetadata", requestOptions,
+ updatedOptions -> this.serviceClient.setMetadataWithResponse(containerName, blob, timeout, metadata,
+ leaseId, ifModifiedSince, ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, requestId, cpkInfo,
+ encryptionScopeParam, updatedOptions));
+ }
+
+ /**
+ * The Set Blob Metadata operation sets user-defined metadata for the specified blob as one or more name-value
+ * pairs.
+ *
+ * @param containerName The container name.
+ * @param blob The blob name.
+ * @param timeout The timeout parameter is expressed in seconds. For more information, see <a
+ * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting
+ * Timeouts for Blob Service Operations.</a>.
+ * @param metadata Optional. Specifies a user-defined name-value pair associated with the blob. If no name-value
+ * pairs are specified, the operation will copy the metadata from the source blob or file to the destination blob.
+ * If one or more name-value pairs are specified, the destination blob is created with the specified metadata, and
+ * metadata is not copied from the source blob or file. Note that beginning with version 2009-09-19, metadata names
+ * must adhere to the naming rules for C# identifiers. See Naming and Referencing Containers, Blobs, and Metadata
+ * for more information.
+ * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID.
+ * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the
+ * specified date/time.
+ * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since
+ * the specified date/time.
+ * @param ifMatch Specify an ETag value to operate only on blobs with a matching value.
+ * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value.
+ * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value.
+ * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the
+ * analytics logs when storage analytics logging is enabled.
+ * @param cpkInfo Parameter group.
+ * @param encryptionScopeParam Parameter group.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws StorageErrorException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @Metadata(generated = true)
+ public void setMetadata(String containerName, String blob, Integer timeout, Map metadata,
+ String leaseId, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch,
+ String ifNoneMatch, String ifTags, String requestId, CpkInfo cpkInfo, EncryptionScope encryptionScopeParam) {
+ this.instrumentation.instrument("Blob_SetMetadata", null,
+ updatedOptions -> this.serviceClient.setMetadata(containerName, blob, timeout, metadata, leaseId,
+ ifModifiedSince, ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, requestId, cpkInfo,
+ encryptionScopeParam));
+ }
+
+ /**
+ * [Update] The Lease Blob operation establishes and manages a lock on a blob for write and delete operations.
+ *
+ * @param containerName The container name.
+ * @param blob The blob name.
+ * @param timeout The timeout parameter is expressed in seconds. For more information, see <a
+ * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting
+ * Timeouts for Blob Service Operations.</a>.
+ * @param duration Specifies the duration of the lease, in seconds, or negative one (-1) for a lease that never
+ * expires. A non-infinite lease can be between 15 and 60 seconds. A lease duration cannot be changed using renew or
+ * change.
+ * @param proposedLeaseId Proposed lease ID, in a GUID string format. The Blob service returns 400 (Invalid request)
+ * if the proposed lease ID is not in the correct format. See Guid Constructor (String) for a list of valid GUID
+ * string formats.
+ * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the
+ * specified date/time.
+ * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since
+ * the specified date/time.
+ * @param ifMatch Specify an ETag value to operate only on blobs with a matching value.
+ * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value.
+ * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value.
+ * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the
+ * analytics logs when storage analytics logging is enabled.
+ * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws StorageErrorException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response.
+ */
+ @Metadata(generated = true)
+ public Response acquireLeaseWithResponse(String containerName, String blob, Integer timeout, Integer duration,
+ String proposedLeaseId, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch,
+ String ifNoneMatch, String ifTags, String requestId, RequestOptions requestOptions) {
+ return this.instrumentation.instrumentWithResponse("Blob_AcquireLease", requestOptions,
+ updatedOptions -> this.serviceClient.acquireLeaseWithResponse(containerName, blob, timeout, duration,
+ proposedLeaseId, ifModifiedSince, ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, requestId,
+ updatedOptions));
+ }
+
+ /**
+ * [Update] The Lease Blob operation establishes and manages a lock on a blob for write and delete operations.
+ *
+ * @param containerName The container name.
+ * @param blob The blob name.
+ * @param timeout The timeout parameter is expressed in seconds. For more information, see <a
+ * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting
+ * Timeouts for Blob Service Operations.</a>.
+ * @param duration Specifies the duration of the lease, in seconds, or negative one (-1) for a lease that never
+ * expires. A non-infinite lease can be between 15 and 60 seconds. A lease duration cannot be changed using renew or
+ * change.
+ * @param proposedLeaseId Proposed lease ID, in a GUID string format. The Blob service returns 400 (Invalid request)
+ * if the proposed lease ID is not in the correct format. See Guid Constructor (String) for a list of valid GUID
+ * string formats.
+ * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the
+ * specified date/time.
+ * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since
+ * the specified date/time.
+ * @param ifMatch Specify an ETag value to operate only on blobs with a matching value.
+ * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value.
+ * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value.
+ * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the
+ * analytics logs when storage analytics logging is enabled.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws StorageErrorException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @Metadata(generated = true)
+ public void acquireLease(String containerName, String blob, Integer timeout, Integer duration,
+ String proposedLeaseId, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch,
+ String ifNoneMatch, String ifTags, String requestId) {
+ this.instrumentation.instrument("Blob_AcquireLease", null,
+ updatedOptions -> this.serviceClient.acquireLease(containerName, blob, timeout, duration, proposedLeaseId,
+ ifModifiedSince, ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, requestId));
+ }
+
+ /**
+ * [Update] The Lease Blob operation establishes and manages a lock on a blob for write and delete operations.
+ *
+ * @param containerName The container name.
+ * @param blob The blob name.
+ * @param leaseId Specifies the current lease ID on the resource.
+ * @param timeout The timeout parameter is expressed in seconds. For more information, see <a
+ * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting
+ * Timeouts for Blob Service Operations.</a>.
+ * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the
+ * specified date/time.
+ * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since
+ * the specified date/time.
+ * @param ifMatch Specify an ETag value to operate only on blobs with a matching value.
+ * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value.
+ * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value.
+ * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the
+ * analytics logs when storage analytics logging is enabled.
+ * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws StorageErrorException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response.
+ */
+ @Metadata(generated = true)
+ public Response releaseLeaseWithResponse(String containerName, String blob, String leaseId, Integer timeout,
+ OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch,
+ String ifTags, String requestId, RequestOptions requestOptions) {
+ return this.instrumentation.instrumentWithResponse("Blob_ReleaseLease", requestOptions,
+ updatedOptions -> this.serviceClient.releaseLeaseWithResponse(containerName, blob, leaseId, timeout,
+ ifModifiedSince, ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, requestId, updatedOptions));
+ }
+
+ /**
+ * [Update] The Lease Blob operation establishes and manages a lock on a blob for write and delete operations.
+ *
+ * @param containerName The container name.
+ * @param blob The blob name.
+ * @param leaseId Specifies the current lease ID on the resource.
+ * @param timeout The timeout parameter is expressed in seconds. For more information, see <a
+ * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting
+ * Timeouts for Blob Service Operations.</a>.
+ * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the
+ * specified date/time.
+ * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since
+ * the specified date/time.
+ * @param ifMatch Specify an ETag value to operate only on blobs with a matching value.
+ * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value.
+ * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value.
+ * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the
+ * analytics logs when storage analytics logging is enabled.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws StorageErrorException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @Metadata(generated = true)
+ public void releaseLease(String containerName, String blob, String leaseId, Integer timeout,
+ OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch,
+ String ifTags, String requestId) {
+ this.instrumentation.instrument("Blob_ReleaseLease", null,
+ updatedOptions -> this.serviceClient.releaseLease(containerName, blob, leaseId, timeout, ifModifiedSince,
+ ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, requestId));
+ }
+
+ /**
+ * [Update] The Lease Blob operation establishes and manages a lock on a blob for write and delete operations.
+ *
+ * @param containerName The container name.
+ * @param blob The blob name.
+ * @param leaseId Specifies the current lease ID on the resource.
+ * @param timeout The timeout parameter is expressed in seconds. For more information, see <a
+ * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting
+ * Timeouts for Blob Service Operations.</a>.
+ * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the
+ * specified date/time.
+ * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since
+ * the specified date/time.
+ * @param ifMatch Specify an ETag value to operate only on blobs with a matching value.
+ * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value.
+ * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value.
+ * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the
+ * analytics logs when storage analytics logging is enabled.
+ * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws StorageErrorException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response.
+ */
+ @Metadata(generated = true)
+ public Response renewLeaseWithResponse(String containerName, String blob, String leaseId, Integer timeout,
+ OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch,
+ String ifTags, String requestId, RequestOptions requestOptions) {
+ return this.instrumentation.instrumentWithResponse("Blob_RenewLease", requestOptions,
+ updatedOptions -> this.serviceClient.renewLeaseWithResponse(containerName, blob, leaseId, timeout,
+ ifModifiedSince, ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, requestId, updatedOptions));
+ }
+
+ /**
+ * [Update] The Lease Blob operation establishes and manages a lock on a blob for write and delete operations.
+ *
+ * @param containerName The container name.
+ * @param blob The blob name.
+ * @param leaseId Specifies the current lease ID on the resource.
+ * @param timeout The timeout parameter is expressed in seconds. For more information, see <a
+ * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting
+ * Timeouts for Blob Service Operations.</a>.
+ * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the
+ * specified date/time.
+ * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since
+ * the specified date/time.
+ * @param ifMatch Specify an ETag value to operate only on blobs with a matching value.
+ * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value.
+ * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value.
+ * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the
+ * analytics logs when storage analytics logging is enabled.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws StorageErrorException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @Metadata(generated = true)
+ public void renewLease(String containerName, String blob, String leaseId, Integer timeout,
+ OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch,
+ String ifTags, String requestId) {
+ this.instrumentation.instrument("Blob_RenewLease", null,
+ updatedOptions -> this.serviceClient.renewLease(containerName, blob, leaseId, timeout, ifModifiedSince,
+ ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, requestId));
+ }
+
+ /**
+ * [Update] The Lease Blob operation establishes and manages a lock on a blob for write and delete operations.
+ *
+ * @param containerName The container name.
+ * @param blob The blob name.
+ * @param leaseId Specifies the current lease ID on the resource.
+ * @param proposedLeaseId Proposed lease ID, in a GUID string format. The Blob service returns 400 (Invalid request)
+ * if the proposed lease ID is not in the correct format. See Guid Constructor (String) for a list of valid GUID
+ * string formats.
+ * @param timeout The timeout parameter is expressed in seconds. For more information, see <a
+ * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting
+ * Timeouts for Blob Service Operations.</a>.
+ * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the
+ * specified date/time.
+ * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since
+ * the specified date/time.
+ * @param ifMatch Specify an ETag value to operate only on blobs with a matching value.
+ * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value.
+ * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value.
+ * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the
+ * analytics logs when storage analytics logging is enabled.
+ * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws StorageErrorException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response.
+ */
+ @Metadata(generated = true)
+ public Response changeLeaseWithResponse(String containerName, String blob, String leaseId,
+ String proposedLeaseId, Integer timeout, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince,
+ String ifMatch, String ifNoneMatch, String ifTags, String requestId, RequestOptions requestOptions) {
+ return this.instrumentation.instrumentWithResponse("Blob_ChangeLease", requestOptions,
+ updatedOptions -> this.serviceClient.changeLeaseWithResponse(containerName, blob, leaseId, proposedLeaseId,
+ timeout, ifModifiedSince, ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, requestId, updatedOptions));
+ }
+
+ /**
+ * [Update] The Lease Blob operation establishes and manages a lock on a blob for write and delete operations.
+ *
+ * @param containerName The container name.
+ * @param blob The blob name.
+ * @param leaseId Specifies the current lease ID on the resource.
+ * @param proposedLeaseId Proposed lease ID, in a GUID string format. The Blob service returns 400 (Invalid request)
+ * if the proposed lease ID is not in the correct format. See Guid Constructor (String) for a list of valid GUID
+ * string formats.
+ * @param timeout The timeout parameter is expressed in seconds. For more information, see <a
+ * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting
+ * Timeouts for Blob Service Operations.</a>.
+ * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the
+ * specified date/time.
+ * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since
+ * the specified date/time.
+ * @param ifMatch Specify an ETag value to operate only on blobs with a matching value.
+ * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value.
+ * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value.
+ * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the
+ * analytics logs when storage analytics logging is enabled.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws StorageErrorException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @Metadata(generated = true)
+ public void changeLease(String containerName, String blob, String leaseId, String proposedLeaseId, Integer timeout,
+ OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch,
+ String ifTags, String requestId) {
+ this.instrumentation.instrument("Blob_ChangeLease", null,
+ updatedOptions -> this.serviceClient.changeLease(containerName, blob, leaseId, proposedLeaseId, timeout,
+ ifModifiedSince, ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, requestId));
+ }
+
+ /**
+ * [Update] The Lease Blob operation establishes and manages a lock on a blob for write and delete operations.
+ *
+ * @param containerName The container name.
+ * @param blob The blob name.
+ * @param timeout The timeout parameter is expressed in seconds. For more information, see <a
+ * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting
+ * Timeouts for Blob Service Operations.</a>.
+ * @param breakPeriod For a break operation, proposed duration the lease should continue before it is broken, in
+ * seconds, between 0 and 60. This break period is only used if it is shorter than the time remaining on the lease.
+ * If longer, the time remaining on the lease is used. A new lease will not be available before the break period has
+ * expired, but the lease may be held for longer than the break period. If this header does not appear with a break
+ * operation, a fixed-duration lease breaks after the remaining lease period elapses, and an infinite lease breaks
+ * immediately.
+ * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the
+ * specified date/time.
+ * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since
+ * the specified date/time.
+ * @param ifMatch Specify an ETag value to operate only on blobs with a matching value.
+ * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value.
+ * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value.
+ * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the
+ * analytics logs when storage analytics logging is enabled.
+ * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws StorageErrorException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response.
+ */
+ @Metadata(generated = true)
+ public Response breakLeaseWithResponse(String containerName, String blob, Integer timeout,
+ Integer breakPeriod, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch,
+ String ifNoneMatch, String ifTags, String requestId, RequestOptions requestOptions) {
+ return this.instrumentation.instrumentWithResponse("Blob_BreakLease", requestOptions,
+ updatedOptions -> this.serviceClient.breakLeaseWithResponse(containerName, blob, timeout, breakPeriod,
+ ifModifiedSince, ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, requestId, updatedOptions));
+ }
+
+ /**
+ * [Update] The Lease Blob operation establishes and manages a lock on a blob for write and delete operations.
+ *
+ * @param containerName The container name.
+ * @param blob The blob name.
+ * @param timeout The timeout parameter is expressed in seconds. For more information, see <a
+ * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting
+ * Timeouts for Blob Service Operations.</a>.
+ * @param breakPeriod For a break operation, proposed duration the lease should continue before it is broken, in
+ * seconds, between 0 and 60. This break period is only used if it is shorter than the time remaining on the lease.
+ * If longer, the time remaining on the lease is used. A new lease will not be available before the break period has
+ * expired, but the lease may be held for longer than the break period. If this header does not appear with a break
+ * operation, a fixed-duration lease breaks after the remaining lease period elapses, and an infinite lease breaks
+ * immediately.
+ * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the
+ * specified date/time.
+ * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since
+ * the specified date/time.
+ * @param ifMatch Specify an ETag value to operate only on blobs with a matching value.
+ * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value.
+ * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value.
+ * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the
+ * analytics logs when storage analytics logging is enabled.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws StorageErrorException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @Metadata(generated = true)
+ public void breakLease(String containerName, String blob, Integer timeout, Integer breakPeriod,
+ OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch,
+ String ifTags, String requestId) {
+ this.instrumentation.instrument("Blob_BreakLease", null,
+ updatedOptions -> this.serviceClient.breakLease(containerName, blob, timeout, breakPeriod, ifModifiedSince,
+ ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, requestId));
+ }
+
+ /**
+ * The Create Snapshot operation creates a read-only snapshot of a blob.
+ *
+ * @param containerName The container name.
+ * @param blob The blob name.
+ * @param timeout The timeout parameter is expressed in seconds. For more information, see <a
+ * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting
+ * Timeouts for Blob Service Operations.</a>.
+ * @param metadata Optional. Specifies a user-defined name-value pair associated with the blob. If no name-value
+ * pairs are specified, the operation will copy the metadata from the source blob or file to the destination blob.
+ * If one or more name-value pairs are specified, the destination blob is created with the specified metadata, and
+ * metadata is not copied from the source blob or file. Note that beginning with version 2009-09-19, metadata names
+ * must adhere to the naming rules for C# identifiers. See Naming and Referencing Containers, Blobs, and Metadata
+ * for more information.
+ * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the
+ * specified date/time.
+ * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since
+ * the specified date/time.
+ * @param ifMatch Specify an ETag value to operate only on blobs with a matching value.
+ * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value.
+ * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value.
+ * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID.
+ * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the
+ * analytics logs when storage analytics logging is enabled.
+ * @param cpkInfo Parameter group.
+ * @param encryptionScopeParam Parameter group.
+ * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws StorageErrorException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response.
+ */
+ @Metadata(generated = true)
+ public Response createSnapshotWithResponse(String containerName, String blob, Integer timeout,
+ Map metadata, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch,
+ String ifNoneMatch, String ifTags, String leaseId, String requestId, CpkInfo cpkInfo,
+ EncryptionScope encryptionScopeParam, RequestOptions requestOptions) {
+ return this.instrumentation.instrumentWithResponse("Blob_CreateSnapshot", requestOptions,
+ updatedOptions -> this.serviceClient.createSnapshotWithResponse(containerName, blob, timeout, metadata,
+ ifModifiedSince, ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, leaseId, requestId, cpkInfo,
+ encryptionScopeParam, updatedOptions));
+ }
+
+ /**
+ * The Create Snapshot operation creates a read-only snapshot of a blob.
+ *
+ * @param containerName The container name.
+ * @param blob The blob name.
+ * @param timeout The timeout parameter is expressed in seconds. For more information, see <a
+ * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting
+ * Timeouts for Blob Service Operations.</a>.
+ * @param metadata Optional. Specifies a user-defined name-value pair associated with the blob. If no name-value
+ * pairs are specified, the operation will copy the metadata from the source blob or file to the destination blob.
+ * If one or more name-value pairs are specified, the destination blob is created with the specified metadata, and
+ * metadata is not copied from the source blob or file. Note that beginning with version 2009-09-19, metadata names
+ * must adhere to the naming rules for C# identifiers. See Naming and Referencing Containers, Blobs, and Metadata
+ * for more information.
+ * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the
+ * specified date/time.
+ * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since
+ * the specified date/time.
+ * @param ifMatch Specify an ETag value to operate only on blobs with a matching value.
+ * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value.
+ * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value.
+ * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID.
+ * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the
+ * analytics logs when storage analytics logging is enabled.
+ * @param cpkInfo Parameter group.
+ * @param encryptionScopeParam Parameter group.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws StorageErrorException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @Metadata(generated = true)
+ public void createSnapshot(String containerName, String blob, Integer timeout, Map metadata,
+ OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch,
+ String ifTags, String leaseId, String requestId, CpkInfo cpkInfo, EncryptionScope encryptionScopeParam) {
+ this.instrumentation.instrument("Blob_CreateSnapshot", null,
+ updatedOptions -> this.serviceClient.createSnapshot(containerName, blob, timeout, metadata, ifModifiedSince,
+ ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, leaseId, requestId, cpkInfo, encryptionScopeParam));
+ }
+
+ /**
+ * The Start Copy From URL operation copies a blob or an internet resource to a new blob.
+ *
+ * @param containerName The container name.
+ * @param blob The blob name.
+ * @param copySource Specifies the name of the source page blob snapshot. This value is a URL of up to 2 KB in
+ * length that specifies a page blob snapshot. The value should be URL-encoded as it would appear in a request URI.
+ * The source blob must either be public or must be authenticated via a shared access signature.
+ * @param timeout The timeout parameter is expressed in seconds. For more information, see <a
+ * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting
+ * Timeouts for Blob Service Operations.</a>.
+ * @param metadata Optional. Specifies a user-defined name-value pair associated with the blob. If no name-value
+ * pairs are specified, the operation will copy the metadata from the source blob or file to the destination blob.
+ * If one or more name-value pairs are specified, the destination blob is created with the specified metadata, and
+ * metadata is not copied from the source blob or file. Note that beginning with version 2009-09-19, metadata names
+ * must adhere to the naming rules for C# identifiers. See Naming and Referencing Containers, Blobs, and Metadata
+ * for more information.
+ * @param tier Optional. Indicates the tier to be set on the blob.
+ * @param rehydratePriority Optional: Indicates the priority with which to rehydrate an archived blob.
+ * @param sourceIfModifiedSince Specify this header value to operate only on a blob if it has been modified since
+ * the specified date/time.
+ * @param sourceIfUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified
+ * since the specified date/time.
+ * @param sourceIfMatch Specify an ETag value to operate only on blobs with a matching value.
+ * @param sourceIfNoneMatch Specify an ETag value to operate only on blobs without a matching value.
+ * @param sourceIfTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value.
+ * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the
+ * specified date/time.
+ * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since
+ * the specified date/time.
+ * @param ifMatch Specify an ETag value to operate only on blobs with a matching value.
+ * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value.
+ * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value.
+ * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID.
+ * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the
+ * analytics logs when storage analytics logging is enabled.
+ * @param blobTagsString Optional. Used to set blob tags in various blob operations.
+ * @param sealBlob Overrides the sealed state of the destination blob. Service version 2019-12-12 and newer.
+ * @param immutabilityPolicyExpiry Specifies the date time when the blobs immutability policy is set to expire.
+ * @param immutabilityPolicyMode Specifies the immutability policy mode to set on the blob.
+ * @param legalHold Specified if a legal hold should be set on the blob.
+ * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws StorageErrorException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response.
+ */
+ @Metadata(generated = true)
+ public Response startCopyFromURLWithResponse(String containerName, String blob, String copySource,
+ Integer timeout, Map metadata, AccessTier tier, RehydratePriority rehydratePriority,
+ OffsetDateTime sourceIfModifiedSince, OffsetDateTime sourceIfUnmodifiedSince, String sourceIfMatch,
+ String sourceIfNoneMatch, String sourceIfTags, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince,
+ String ifMatch, String ifNoneMatch, String ifTags, String leaseId, String requestId, String blobTagsString,
+ Boolean sealBlob, OffsetDateTime immutabilityPolicyExpiry, BlobImmutabilityPolicyMode immutabilityPolicyMode,
+ Boolean legalHold, RequestOptions requestOptions) {
+ return this.instrumentation.instrumentWithResponse("Blob_StartCopyFromURL", requestOptions,
+ updatedOptions -> this.serviceClient.startCopyFromURLWithResponse(containerName, blob, copySource, timeout,
+ metadata, tier, rehydratePriority, sourceIfModifiedSince, sourceIfUnmodifiedSince, sourceIfMatch,
+ sourceIfNoneMatch, sourceIfTags, ifModifiedSince, ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags,
+ leaseId, requestId, blobTagsString, sealBlob, immutabilityPolicyExpiry, immutabilityPolicyMode,
+ legalHold, updatedOptions));
+ }
+
+ /**
+ * The Start Copy From URL operation copies a blob or an internet resource to a new blob.
+ *
+ * @param containerName The container name.
+ * @param blob The blob name.
+ * @param copySource Specifies the name of the source page blob snapshot. This value is a URL of up to 2 KB in
+ * length that specifies a page blob snapshot. The value should be URL-encoded as it would appear in a request URI.
+ * The source blob must either be public or must be authenticated via a shared access signature.
+ * @param timeout The timeout parameter is expressed in seconds. For more information, see <a
+ * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting
+ * Timeouts for Blob Service Operations.</a>.
+ * @param metadata Optional. Specifies a user-defined name-value pair associated with the blob. If no name-value
+ * pairs are specified, the operation will copy the metadata from the source blob or file to the destination blob.
+ * If one or more name-value pairs are specified, the destination blob is created with the specified metadata, and
+ * metadata is not copied from the source blob or file. Note that beginning with version 2009-09-19, metadata names
+ * must adhere to the naming rules for C# identifiers. See Naming and Referencing Containers, Blobs, and Metadata
+ * for more information.
+ * @param tier Optional. Indicates the tier to be set on the blob.
+ * @param rehydratePriority Optional: Indicates the priority with which to rehydrate an archived blob.
+ * @param sourceIfModifiedSince Specify this header value to operate only on a blob if it has been modified since
+ * the specified date/time.
+ * @param sourceIfUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified
+ * since the specified date/time.
+ * @param sourceIfMatch Specify an ETag value to operate only on blobs with a matching value.
+ * @param sourceIfNoneMatch Specify an ETag value to operate only on blobs without a matching value.
+ * @param sourceIfTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value.
+ * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the
+ * specified date/time.
+ * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since
+ * the specified date/time.
+ * @param ifMatch Specify an ETag value to operate only on blobs with a matching value.
+ * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value.
+ * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value.
+ * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID.
+ * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the
+ * analytics logs when storage analytics logging is enabled.
+ * @param blobTagsString Optional. Used to set blob tags in various blob operations.
+ * @param sealBlob Overrides the sealed state of the destination blob. Service version 2019-12-12 and newer.
+ * @param immutabilityPolicyExpiry Specifies the date time when the blobs immutability policy is set to expire.
+ * @param immutabilityPolicyMode Specifies the immutability policy mode to set on the blob.
+ * @param legalHold Specified if a legal hold should be set on the blob.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws StorageErrorException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @Metadata(generated = true)
+ public void startCopyFromURL(String containerName, String blob, String copySource, Integer timeout,
+ Map metadata, AccessTier tier, RehydratePriority rehydratePriority,
+ OffsetDateTime sourceIfModifiedSince, OffsetDateTime sourceIfUnmodifiedSince, String sourceIfMatch,
+ String sourceIfNoneMatch, String sourceIfTags, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince,
+ String ifMatch, String ifNoneMatch, String ifTags, String leaseId, String requestId, String blobTagsString,
+ Boolean sealBlob, OffsetDateTime immutabilityPolicyExpiry, BlobImmutabilityPolicyMode immutabilityPolicyMode,
+ Boolean legalHold) {
+ this.instrumentation.instrument("Blob_StartCopyFromURL", null,
+ updatedOptions -> this.serviceClient.startCopyFromURL(containerName, blob, copySource, timeout, metadata,
+ tier, rehydratePriority, sourceIfModifiedSince, sourceIfUnmodifiedSince, sourceIfMatch,
+ sourceIfNoneMatch, sourceIfTags, ifModifiedSince, ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags,
+ leaseId, requestId, blobTagsString, sealBlob, immutabilityPolicyExpiry, immutabilityPolicyMode,
+ legalHold));
+ }
+
+ /**
+ * The Copy From URL operation copies a blob or an internet resource to a new blob. It will not return a response
+ * until the copy is complete.
+ *
+ * @param containerName The container name.
+ * @param blob The blob name.
+ * @param copySource Specifies the name of the source page blob snapshot. This value is a URL of up to 2 KB in
+ * length that specifies a page blob snapshot. The value should be URL-encoded as it would appear in a request URI.
+ * The source blob must either be public or must be authenticated via a shared access signature.
+ * @param timeout The timeout parameter is expressed in seconds. For more information, see <a
+ * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting
+ * Timeouts for Blob Service Operations.</a>.
+ * @param metadata Optional. Specifies a user-defined name-value pair associated with the blob. If no name-value
+ * pairs are specified, the operation will copy the metadata from the source blob or file to the destination blob.
+ * If one or more name-value pairs are specified, the destination blob is created with the specified metadata, and
+ * metadata is not copied from the source blob or file. Note that beginning with version 2009-09-19, metadata names
+ * must adhere to the naming rules for C# identifiers. See Naming and Referencing Containers, Blobs, and Metadata
+ * for more information.
+ * @param tier Optional. Indicates the tier to be set on the blob.
+ * @param sourceIfModifiedSince Specify this header value to operate only on a blob if it has been modified since
+ * the specified date/time.
+ * @param sourceIfUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified
+ * since the specified date/time.
+ * @param sourceIfMatch Specify an ETag value to operate only on blobs with a matching value.
+ * @param sourceIfNoneMatch Specify an ETag value to operate only on blobs without a matching value.
+ * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the
+ * specified date/time.
+ * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since
+ * the specified date/time.
+ * @param ifMatch Specify an ETag value to operate only on blobs with a matching value.
+ * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value.
+ * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value.
+ * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID.
+ * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the
+ * analytics logs when storage analytics logging is enabled.
+ * @param sourceContentMD5 Specify the md5 calculated for the range of bytes that must be read from the copy source.
+ * @param blobTagsString Optional. Used to set blob tags in various blob operations.
+ * @param immutabilityPolicyExpiry Specifies the date time when the blobs immutability policy is set to expire.
+ * @param immutabilityPolicyMode Specifies the immutability policy mode to set on the blob.
+ * @param legalHold Specified if a legal hold should be set on the blob.
+ * @param copySourceAuthorization Only Bearer type is supported. Credentials should be a valid OAuth access token to
+ * copy source.
+ * @param copySourceTags Optional, default 'replace'. Indicates if source tags should be copied or replaced with the
+ * tags specified by x-ms-tags.
+ * @param encryptionScopeParam Parameter group.
+ * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws StorageErrorException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response.
+ */
+ @Metadata(generated = true)
+ public Response copyFromURLWithResponse(String containerName, String blob, String copySource, Integer timeout,
+ Map metadata, AccessTier tier, OffsetDateTime sourceIfModifiedSince,
+ OffsetDateTime sourceIfUnmodifiedSince, String sourceIfMatch, String sourceIfNoneMatch,
+ OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch,
+ String ifTags, String leaseId, String requestId, byte[] sourceContentMD5, String blobTagsString,
+ OffsetDateTime immutabilityPolicyExpiry, BlobImmutabilityPolicyMode immutabilityPolicyMode, Boolean legalHold,
+ String copySourceAuthorization, BlobCopySourceTagsMode copySourceTags, EncryptionScope encryptionScopeParam,
+ RequestOptions requestOptions) {
+ return this.instrumentation.instrumentWithResponse("Blob_CopyFromURL", requestOptions,
+ updatedOptions -> this.serviceClient.copyFromURLWithResponse(containerName, blob, copySource, timeout,
+ metadata, tier, sourceIfModifiedSince, sourceIfUnmodifiedSince, sourceIfMatch, sourceIfNoneMatch,
+ ifModifiedSince, ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, leaseId, requestId, sourceContentMD5,
+ blobTagsString, immutabilityPolicyExpiry, immutabilityPolicyMode, legalHold, copySourceAuthorization,
+ copySourceTags, encryptionScopeParam, updatedOptions));
+ }
+
+ /**
+ * The Copy From URL operation copies a blob or an internet resource to a new blob. It will not return a response
+ * until the copy is complete.
+ *
+ * @param containerName The container name.
+ * @param blob The blob name.
+ * @param copySource Specifies the name of the source page blob snapshot. This value is a URL of up to 2 KB in
+ * length that specifies a page blob snapshot. The value should be URL-encoded as it would appear in a request URI.
+ * The source blob must either be public or must be authenticated via a shared access signature.
+ * @param timeout The timeout parameter is expressed in seconds. For more information, see <a
+ * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting
+ * Timeouts for Blob Service Operations.</a>.
+ * @param metadata Optional. Specifies a user-defined name-value pair associated with the blob. If no name-value
+ * pairs are specified, the operation will copy the metadata from the source blob or file to the destination blob.
+ * If one or more name-value pairs are specified, the destination blob is created with the specified metadata, and
+ * metadata is not copied from the source blob or file. Note that beginning with version 2009-09-19, metadata names
+ * must adhere to the naming rules for C# identifiers. See Naming and Referencing Containers, Blobs, and Metadata
+ * for more information.
+ * @param tier Optional. Indicates the tier to be set on the blob.
+ * @param sourceIfModifiedSince Specify this header value to operate only on a blob if it has been modified since
+ * the specified date/time.
+ * @param sourceIfUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified
+ * since the specified date/time.
+ * @param sourceIfMatch Specify an ETag value to operate only on blobs with a matching value.
+ * @param sourceIfNoneMatch Specify an ETag value to operate only on blobs without a matching value.
+ * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the
+ * specified date/time.
+ * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since
+ * the specified date/time.
+ * @param ifMatch Specify an ETag value to operate only on blobs with a matching value.
+ * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value.
+ * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value.
+ * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID.
+ * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the
+ * analytics logs when storage analytics logging is enabled.
+ * @param sourceContentMD5 Specify the md5 calculated for the range of bytes that must be read from the copy source.
+ * @param blobTagsString Optional. Used to set blob tags in various blob operations.
+ * @param immutabilityPolicyExpiry Specifies the date time when the blobs immutability policy is set to expire.
+ * @param immutabilityPolicyMode Specifies the immutability policy mode to set on the blob.
+ * @param legalHold Specified if a legal hold should be set on the blob.
+ * @param copySourceAuthorization Only Bearer type is supported. Credentials should be a valid OAuth access token to
+ * copy source.
+ * @param copySourceTags Optional, default 'replace'. Indicates if source tags should be copied or replaced with the
+ * tags specified by x-ms-tags.
+ * @param encryptionScopeParam Parameter group.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws StorageErrorException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @Metadata(generated = true)
+ public void copyFromURL(String containerName, String blob, String copySource, Integer timeout,
+ Map metadata, AccessTier tier, OffsetDateTime sourceIfModifiedSince,
+ OffsetDateTime sourceIfUnmodifiedSince, String sourceIfMatch, String sourceIfNoneMatch,
+ OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch,
+ String ifTags, String leaseId, String requestId, byte[] sourceContentMD5, String blobTagsString,
+ OffsetDateTime immutabilityPolicyExpiry, BlobImmutabilityPolicyMode immutabilityPolicyMode, Boolean legalHold,
+ String copySourceAuthorization, BlobCopySourceTagsMode copySourceTags, EncryptionScope encryptionScopeParam) {
+ this.instrumentation.instrument("Blob_CopyFromURL", null,
+ updatedOptions -> this.serviceClient.copyFromURL(containerName, blob, copySource, timeout, metadata, tier,
+ sourceIfModifiedSince, sourceIfUnmodifiedSince, sourceIfMatch, sourceIfNoneMatch, ifModifiedSince,
+ ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, leaseId, requestId, sourceContentMD5, blobTagsString,
+ immutabilityPolicyExpiry, immutabilityPolicyMode, legalHold, copySourceAuthorization, copySourceTags,
+ encryptionScopeParam));
+ }
+
+ /**
+ * The Abort Copy From URL operation aborts a pending Copy From URL operation, and leaves a destination blob with
+ * zero length and full metadata.
+ *
+ * @param containerName The container name.
+ * @param blob The blob name.
+ * @param copyId The copy identifier provided in the x-ms-copy-id header of the original Copy Blob operation.
+ * @param timeout The timeout parameter is expressed in seconds. For more information, see <a
+ * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting
+ * Timeouts for Blob Service Operations.</a>.
+ * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID.
+ * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the
+ * analytics logs when storage analytics logging is enabled.
+ * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws StorageErrorException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response.
+ */
+ @Metadata(generated = true)
+ public Response abortCopyFromURLWithResponse(String containerName, String blob, String copyId,
+ Integer timeout, String leaseId, String requestId, RequestOptions requestOptions) {
+ return this.instrumentation.instrumentWithResponse("Blob_AbortCopyFromURL", requestOptions,
+ updatedOptions -> this.serviceClient.abortCopyFromURLWithResponse(containerName, blob, copyId, timeout,
+ leaseId, requestId, updatedOptions));
+ }
+
+ /**
+ * The Abort Copy From URL operation aborts a pending Copy From URL operation, and leaves a destination blob with
+ * zero length and full metadata.
+ *
+ * @param containerName The container name.
+ * @param blob The blob name.
+ * @param copyId The copy identifier provided in the x-ms-copy-id header of the original Copy Blob operation.
+ * @param timeout The timeout parameter is expressed in seconds. For more information, see <a
+ * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting
+ * Timeouts for Blob Service Operations.</a>.
+ * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID.
+ * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the
+ * analytics logs when storage analytics logging is enabled.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws StorageErrorException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @Metadata(generated = true)
+ public void abortCopyFromURL(String containerName, String blob, String copyId, Integer timeout, String leaseId,
+ String requestId) {
+ this.instrumentation.instrumentWithResponse("Blob_AbortCopyFromURL", null, updatedOptions -> {
+ this.serviceClient.abortCopyFromURL(containerName, blob, copyId, timeout, leaseId, requestId);
+ return null;
+ });
+ }
+
+ /**
+ * The Set Tier operation sets the tier on a blob. The operation is allowed on a page blob in a premium storage
+ * account and on a block blob in a blob storage account (locally redundant storage only). A premium page blob's
+ * tier determines the allowed size, IOPS, and bandwidth of the blob. A block blob's tier determines
+ * Hot/Cool/Archive storage type. This operation does not update the blob's ETag.
+ *
+ * @param containerName The container name.
+ * @param blob The blob name.
+ * @param tier Indicates the tier to be set on the blob.
+ * @param snapshot The snapshot parameter is an opaque DateTime value that, when present, specifies the blob
+ * snapshot to retrieve. For more information on working with blob snapshots, see <a
+ * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/creating-a-snapshot-of-a-blob">Creating
+ * a Snapshot of a Blob.</a>.
+ * @param versionId The version id parameter is an opaque DateTime value that, when present, specifies the version
+ * of the blob to operate on. It's for service version 2019-10-10 and newer.
+ * @param timeout The timeout parameter is expressed in seconds. For more information, see <a
+ * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting
+ * Timeouts for Blob Service Operations.</a>.
+ * @param rehydratePriority Optional: Indicates the priority with which to rehydrate an archived blob.
+ * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the
+ * analytics logs when storage analytics logging is enabled.
+ * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID.
+ * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value.
+ * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws StorageErrorException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response.
+ */
+ @Metadata(generated = true)
+ public Response setTierWithResponse(String containerName, String blob, AccessTier tier, String snapshot,
+ String versionId, Integer timeout, RehydratePriority rehydratePriority, String requestId, String leaseId,
+ String ifTags, RequestOptions requestOptions) {
+ return this.instrumentation.instrumentWithResponse("Blob_SetTier", requestOptions,
+ updatedOptions -> this.serviceClient.setTierWithResponse(containerName, blob, tier, snapshot, versionId,
+ timeout, rehydratePriority, requestId, leaseId, ifTags, updatedOptions));
+ }
+
+ /**
+ * The Set Tier operation sets the tier on a blob. The operation is allowed on a page blob in a premium storage
+ * account and on a block blob in a blob storage account (locally redundant storage only). A premium page blob's
+ * tier determines the allowed size, IOPS, and bandwidth of the blob. A block blob's tier determines
+ * Hot/Cool/Archive storage type. This operation does not update the blob's ETag.
+ *
+ * @param containerName The container name.
+ * @param blob The blob name.
+ * @param tier Indicates the tier to be set on the blob.
+ * @param snapshot The snapshot parameter is an opaque DateTime value that, when present, specifies the blob
+ * snapshot to retrieve. For more information on working with blob snapshots, see <a
+ * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/creating-a-snapshot-of-a-blob">Creating
+ * a Snapshot of a Blob.</a>.
+ * @param versionId The version id parameter is an opaque DateTime value that, when present, specifies the version
+ * of the blob to operate on. It's for service version 2019-10-10 and newer.
+ * @param timeout The timeout parameter is expressed in seconds. For more information, see <a
+ * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting
+ * Timeouts for Blob Service Operations.</a>.
+ * @param rehydratePriority Optional: Indicates the priority with which to rehydrate an archived blob.
+ * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the
+ * analytics logs when storage analytics logging is enabled.
+ * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID.
+ * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws StorageErrorException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @Metadata(generated = true)
+ public void setTier(String containerName, String blob, AccessTier tier, String snapshot, String versionId,
+ Integer timeout, RehydratePriority rehydratePriority, String requestId, String leaseId, String ifTags) {
+ this.instrumentation.instrument("Blob_SetTier", null,
+ updatedOptions -> this.serviceClient.setTier(containerName, blob, tier, snapshot, versionId, timeout,
+ rehydratePriority, requestId, leaseId, ifTags));
+ }
+
+ /**
+ * Returns the sku name and account kind.
+ *
+ * @param containerName The container name.
+ * @param blob The blob name.
+ * @param timeout The timeout parameter is expressed in seconds. For more information, see <a
+ * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting
+ * Timeouts for Blob Service Operations.</a>.
+ * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the
+ * analytics logs when storage analytics logging is enabled.
+ * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws StorageErrorException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response.
+ */
+ @Metadata(generated = true)
+ public Response getAccountInfoWithResponse(String containerName, String blob, Integer timeout,
+ String requestId, RequestOptions requestOptions) {
+ return this.instrumentation.instrumentWithResponse("Blob_GetAccountInfo", requestOptions,
+ updatedOptions -> this.serviceClient.getAccountInfoWithResponse(containerName, blob, timeout, requestId,
+ updatedOptions));
+ }
+
+ /**
+ * Returns the sku name and account kind.
+ *
+ * @param containerName The container name.
+ * @param blob The blob name.
+ * @param timeout The timeout parameter is expressed in seconds. For more information, see <a
+ * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting
+ * Timeouts for Blob Service Operations.</a>.
+ * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the
+ * analytics logs when storage analytics logging is enabled.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws StorageErrorException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @Metadata(generated = true)
+ public void getAccountInfo(String containerName, String blob, Integer timeout, String requestId) {
+ this.instrumentation.instrument("Blob_GetAccountInfo", null,
+ updatedOptions -> this.serviceClient.getAccountInfo(containerName, blob, timeout, requestId));
+ }
+
+ /**
+ * The Query operation enables users to select/project on blob data by providing simple query expressions.
+ *
+ * @param containerName The container name.
+ * @param blob The blob name.
+ * @param snapshot The snapshot parameter is an opaque DateTime value that, when present, specifies the blob
+ * snapshot to retrieve. For more information on working with blob snapshots, see <a
+ * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/creating-a-snapshot-of-a-blob">Creating
+ * a Snapshot of a Blob.</a>.
+ * @param timeout The timeout parameter is expressed in seconds. For more information, see <a
+ * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting
+ * Timeouts for Blob Service Operations.</a>.
+ * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID.
+ * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the
+ * specified date/time.
+ * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since
+ * the specified date/time.
+ * @param ifMatch Specify an ETag value to operate only on blobs with a matching value.
+ * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value.
+ * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value.
+ * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the
+ * analytics logs when storage analytics logging is enabled.
+ * @param queryRequest the query request.
+ * @param cpkInfo Parameter group.
+ * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws StorageErrorException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response.
+ */
+ @Metadata(generated = true)
+ public Response queryWithResponse(String containerName, String blob, String snapshot, Integer timeout,
+ String leaseId, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch,
+ String ifNoneMatch, String ifTags, String requestId, QueryRequest queryRequest, CpkInfo cpkInfo,
+ RequestOptions requestOptions) {
+ return this.instrumentation.instrumentWithResponse("Blob_Query", requestOptions,
+ updatedOptions -> this.serviceClient.queryWithResponse(containerName, blob, snapshot, timeout, leaseId,
+ ifModifiedSince, ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, requestId, queryRequest, cpkInfo,
+ updatedOptions));
+ }
+
+ /**
+ * The Query operation enables users to select/project on blob data by providing simple query expressions.
+ *
+ * @param containerName The container name.
+ * @param blob The blob name.
+ * @param snapshot The snapshot parameter is an opaque DateTime value that, when present, specifies the blob
+ * snapshot to retrieve. For more information on working with blob snapshots, see <a
+ * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/creating-a-snapshot-of-a-blob">Creating
+ * a Snapshot of a Blob.</a>.
+ * @param timeout The timeout parameter is expressed in seconds. For more information, see <a
+ * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting
+ * Timeouts for Blob Service Operations.</a>.
+ * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID.
+ * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the
+ * specified date/time.
+ * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since
+ * the specified date/time.
+ * @param ifMatch Specify an ETag value to operate only on blobs with a matching value.
+ * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value.
+ * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value.
+ * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the
+ * analytics logs when storage analytics logging is enabled.
+ * @param queryRequest the query request.
+ * @param cpkInfo Parameter group.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws StorageErrorException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response.
+ */
+ @Metadata(generated = true)
+ public InputStream query(String containerName, String blob, String snapshot, Integer timeout, String leaseId,
+ OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch,
+ String ifTags, String requestId, QueryRequest queryRequest, CpkInfo cpkInfo) {
+ return this.instrumentation.instrumentWithResponse("Blob_Query", null,
+ updatedOptions -> this.serviceClient.query(containerName, blob, snapshot, timeout, leaseId, ifModifiedSince,
+ ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, requestId, queryRequest, cpkInfo));
+ }
+
+ /**
+ * The Get Tags operation enables users to get the tags associated with a blob.
+ *
+ * @param containerName The container name.
+ * @param blob The blob name.
+ * @param timeout The timeout parameter is expressed in seconds. For more information, see <a
+ * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting
+ * Timeouts for Blob Service Operations.</a>.
+ * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the
+ * analytics logs when storage analytics logging is enabled.
+ * @param snapshot The snapshot parameter is an opaque DateTime value that, when present, specifies the blob
+ * snapshot to retrieve. For more information on working with blob snapshots, see <a
+ * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/creating-a-snapshot-of-a-blob">Creating
+ * a Snapshot of a Blob.</a>.
+ * @param versionId The version id parameter is an opaque DateTime value that, when present, specifies the version
+ * of the blob to operate on. It's for service version 2019-10-10 and newer.
+ * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value.
+ * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID.
+ * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws StorageErrorException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return blob tags.
+ */
+ @Metadata(generated = true)
+ public Response getTagsWithResponse(String containerName, String blob, Integer timeout, String requestId,
+ String snapshot, String versionId, String ifTags, String leaseId, RequestOptions requestOptions) {
+ return this.instrumentation.instrumentWithResponse("Blob_GetTags", requestOptions,
+ updatedOptions -> this.serviceClient.getTagsWithResponse(containerName, blob, timeout, requestId, snapshot,
+ versionId, ifTags, leaseId, updatedOptions));
+ }
+
+ /**
+ * The Get Tags operation enables users to get the tags associated with a blob.
+ *
+ * @param containerName The container name.
+ * @param blob The blob name.
+ * @param timeout The timeout parameter is expressed in seconds. For more information, see <a
+ * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting
+ * Timeouts for Blob Service Operations.</a>.
+ * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the
+ * analytics logs when storage analytics logging is enabled.
+ * @param snapshot The snapshot parameter is an opaque DateTime value that, when present, specifies the blob
+ * snapshot to retrieve. For more information on working with blob snapshots, see <a
+ * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/creating-a-snapshot-of-a-blob">Creating
+ * a Snapshot of a Blob.</a>.
+ * @param versionId The version id parameter is an opaque DateTime value that, when present, specifies the version
+ * of the blob to operate on. It's for service version 2019-10-10 and newer.
+ * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value.
+ * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws StorageErrorException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return blob tags.
+ */
+ @Metadata(generated = true)
+ public BlobTags getTags(String containerName, String blob, Integer timeout, String requestId, String snapshot,
+ String versionId, String ifTags, String leaseId) {
+ return this.instrumentation.instrumentWithResponse("Blob_GetTags", null, updatedOptions -> this.serviceClient
+ .getTags(containerName, blob, timeout, requestId, snapshot, versionId, ifTags, leaseId));
+ }
+
+ /**
+ * The Set Tags operation enables users to set tags on a blob.
+ *
+ * @param containerName The container name.
+ * @param blob The blob name.
+ * @param timeout The timeout parameter is expressed in seconds. For more information, see <a
+ * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting
+ * Timeouts for Blob Service Operations.</a>.
+ * @param versionId The version id parameter is an opaque DateTime value that, when present, specifies the version
+ * of the blob to operate on. It's for service version 2019-10-10 and newer.
+ * @param transactionalContentMD5 Specify the transactional md5 for the body, to be validated by the service.
+ * @param transactionalContentCrc64 Specify the transactional crc64 for the body, to be validated by the service.
+ * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the
+ * analytics logs when storage analytics logging is enabled.
+ * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value.
+ * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID.
+ * @param tags Blob tags.
+ * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws StorageErrorException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response.
+ */
+ @Metadata(generated = true)
+ public Response setTagsWithResponse(String containerName, String blob, Integer timeout, String versionId,
+ byte[] transactionalContentMD5, byte[] transactionalContentCrc64, String requestId, String ifTags,
+ String leaseId, BlobTags tags, RequestOptions requestOptions) {
+ return this.instrumentation.instrumentWithResponse("Blob_SetTags", requestOptions,
+ updatedOptions -> this.serviceClient.setTagsWithResponse(containerName, blob, timeout, versionId,
+ transactionalContentMD5, transactionalContentCrc64, requestId, ifTags, leaseId, tags, updatedOptions));
+ }
+
+ /**
+ * The Set Tags operation enables users to set tags on a blob.
+ *
+ * @param containerName The container name.
+ * @param blob The blob name.
+ * @param timeout The timeout parameter is expressed in seconds. For more information, see <a
+ * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting
+ * Timeouts for Blob Service Operations.</a>.
+ * @param versionId The version id parameter is an opaque DateTime value that, when present, specifies the version
+ * of the blob to operate on. It's for service version 2019-10-10 and newer.
+ * @param transactionalContentMD5 Specify the transactional md5 for the body, to be validated by the service.
+ * @param transactionalContentCrc64 Specify the transactional crc64 for the body, to be validated by the service.
+ * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the
+ * analytics logs when storage analytics logging is enabled.
+ * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value.
+ * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID.
+ * @param tags Blob tags.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws StorageErrorException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @Metadata(generated = true)
+ public void setTags(String containerName, String blob, Integer timeout, String versionId,
+ byte[] transactionalContentMD5, byte[] transactionalContentCrc64, String requestId, String ifTags,
+ String leaseId, BlobTags tags) {
+ this.instrumentation.instrument("Blob_SetTags", null,
+ updatedOptions -> this.serviceClient.setTags(containerName, blob, timeout, versionId,
+ transactionalContentMD5, transactionalContentCrc64, requestId, ifTags, leaseId, tags));
+ }
+}
diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/BlockBlobClient.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/BlockBlobClient.java
new file mode 100644
index 000000000000..45b74a2278ba
--- /dev/null
+++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/BlockBlobClient.java
@@ -0,0 +1,686 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.v2.storage.blob;
+
+import com.azure.v2.storage.blob.implementation.BlockBlobsImpl;
+import com.azure.v2.storage.blob.models.AccessTier;
+import com.azure.v2.storage.blob.models.BlobCopySourceTagsMode;
+import com.azure.v2.storage.blob.models.BlobHttpHeaders;
+import com.azure.v2.storage.blob.models.BlobImmutabilityPolicyMode;
+import com.azure.v2.storage.blob.models.BlockList;
+import com.azure.v2.storage.blob.models.BlockListType;
+import com.azure.v2.storage.blob.models.BlockLookupList;
+import com.azure.v2.storage.blob.models.CpkInfo;
+import com.azure.v2.storage.blob.models.EncryptionScope;
+import com.azure.v2.storage.blob.models.StorageErrorException;
+import io.clientcore.core.annotations.Metadata;
+import io.clientcore.core.annotations.ServiceClient;
+import io.clientcore.core.http.models.RequestOptions;
+import io.clientcore.core.http.models.Response;
+import io.clientcore.core.instrumentation.Instrumentation;
+import io.clientcore.core.models.binarydata.BinaryData;
+import java.time.OffsetDateTime;
+import java.util.Map;
+
+/**
+ * Initializes a new instance of the synchronous AzureBlobStorage type.
+ */
+@ServiceClient(builder = AzureBlobStorageBuilder.class)
+public final class BlockBlobClient {
+ @Metadata(generated = true)
+ private final BlockBlobsImpl serviceClient;
+
+ private final Instrumentation instrumentation;
+
+ /**
+ * Initializes an instance of BlockBlobClient class.
+ *
+ * @param serviceClient the service client implementation.
+ * @param instrumentation the instrumentation instance.
+ */
+ @Metadata(generated = true)
+ BlockBlobClient(BlockBlobsImpl serviceClient, Instrumentation instrumentation) {
+ this.serviceClient = serviceClient;
+ this.instrumentation = instrumentation;
+ }
+
+ /**
+ * The Upload Block Blob operation updates the content of an existing block blob. Updating an existing block blob
+ * overwrites any existing metadata on the blob. Partial updates are not supported with Put Blob; the content of the
+ * existing blob is overwritten with the content of the new blob. To perform a partial update of the content of a
+ * block blob, use the Put Block List operation.
+ *
+ * @param containerName The container name.
+ * @param blob The blob name.
+ * @param contentLength The length of the request.
+ * @param body Initial data.
+ * @param timeout The timeout parameter is expressed in seconds. For more information, see <a
+ * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting
+ * Timeouts for Blob Service Operations.</a>.
+ * @param transactionalContentMD5 Specify the transactional md5 for the body, to be validated by the service.
+ * @param metadata Optional. Specifies a user-defined name-value pair associated with the blob. If no name-value
+ * pairs are specified, the operation will copy the metadata from the source blob or file to the destination blob.
+ * If one or more name-value pairs are specified, the destination blob is created with the specified metadata, and
+ * metadata is not copied from the source blob or file. Note that beginning with version 2009-09-19, metadata names
+ * must adhere to the naming rules for C# identifiers. See Naming and Referencing Containers, Blobs, and Metadata
+ * for more information.
+ * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID.
+ * @param tier Optional. Indicates the tier to be set on the blob.
+ * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the
+ * specified date/time.
+ * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since
+ * the specified date/time.
+ * @param ifMatch Specify an ETag value to operate only on blobs with a matching value.
+ * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value.
+ * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value.
+ * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the
+ * analytics logs when storage analytics logging is enabled.
+ * @param blobTagsString Optional. Used to set blob tags in various blob operations.
+ * @param immutabilityPolicyExpiry Specifies the date time when the blobs immutability policy is set to expire.
+ * @param immutabilityPolicyMode Specifies the immutability policy mode to set on the blob.
+ * @param legalHold Specified if a legal hold should be set on the blob.
+ * @param transactionalContentCrc64 Specify the transactional crc64 for the body, to be validated by the service.
+ * @param structuredBodyType Required if the request body is a structured message. Specifies the message schema
+ * version and properties.
+ * @param structuredContentLength Required if the request body is a structured message. Specifies the length of the
+ * blob/file content inside the message body. Will always be smaller than Content-Length.
+ * @param blobHttpHeaders Parameter group.
+ * @param cpkInfo Parameter group.
+ * @param encryptionScopeParam Parameter group.
+ * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws StorageErrorException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response.
+ */
+ @Metadata(generated = true)
+ public Response uploadWithResponse(String containerName, String blob, long contentLength, BinaryData body,
+ Integer timeout, byte[] transactionalContentMD5, Map metadata, String leaseId, AccessTier tier,
+ OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch,
+ String ifTags, String requestId, String blobTagsString, OffsetDateTime immutabilityPolicyExpiry,
+ BlobImmutabilityPolicyMode immutabilityPolicyMode, Boolean legalHold, byte[] transactionalContentCrc64,
+ String structuredBodyType, Long structuredContentLength, BlobHttpHeaders blobHttpHeaders, CpkInfo cpkInfo,
+ EncryptionScope encryptionScopeParam, RequestOptions requestOptions) {
+ return this.instrumentation.instrumentWithResponse("BlockBlob_Upload", requestOptions,
+ updatedOptions -> this.serviceClient.uploadWithResponse(containerName, blob, contentLength, body, timeout,
+ transactionalContentMD5, metadata, leaseId, tier, ifModifiedSince, ifUnmodifiedSince, ifMatch,
+ ifNoneMatch, ifTags, requestId, blobTagsString, immutabilityPolicyExpiry, immutabilityPolicyMode,
+ legalHold, transactionalContentCrc64, structuredBodyType, structuredContentLength, blobHttpHeaders,
+ cpkInfo, encryptionScopeParam, updatedOptions));
+ }
+
+ /**
+ * The Upload Block Blob operation updates the content of an existing block blob. Updating an existing block blob
+ * overwrites any existing metadata on the blob. Partial updates are not supported with Put Blob; the content of the
+ * existing blob is overwritten with the content of the new blob. To perform a partial update of the content of a
+ * block blob, use the Put Block List operation.
+ *
+ * @param containerName The container name.
+ * @param blob The blob name.
+ * @param contentLength The length of the request.
+ * @param body Initial data.
+ * @param timeout The timeout parameter is expressed in seconds. For more information, see <a
+ * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting
+ * Timeouts for Blob Service Operations.</a>.
+ * @param transactionalContentMD5 Specify the transactional md5 for the body, to be validated by the service.
+ * @param metadata Optional. Specifies a user-defined name-value pair associated with the blob. If no name-value
+ * pairs are specified, the operation will copy the metadata from the source blob or file to the destination blob.
+ * If one or more name-value pairs are specified, the destination blob is created with the specified metadata, and
+ * metadata is not copied from the source blob or file. Note that beginning with version 2009-09-19, metadata names
+ * must adhere to the naming rules for C# identifiers. See Naming and Referencing Containers, Blobs, and Metadata
+ * for more information.
+ * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID.
+ * @param tier Optional. Indicates the tier to be set on the blob.
+ * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the
+ * specified date/time.
+ * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since
+ * the specified date/time.
+ * @param ifMatch Specify an ETag value to operate only on blobs with a matching value.
+ * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value.
+ * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value.
+ * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the
+ * analytics logs when storage analytics logging is enabled.
+ * @param blobTagsString Optional. Used to set blob tags in various blob operations.
+ * @param immutabilityPolicyExpiry Specifies the date time when the blobs immutability policy is set to expire.
+ * @param immutabilityPolicyMode Specifies the immutability policy mode to set on the blob.
+ * @param legalHold Specified if a legal hold should be set on the blob.
+ * @param transactionalContentCrc64 Specify the transactional crc64 for the body, to be validated by the service.
+ * @param structuredBodyType Required if the request body is a structured message. Specifies the message schema
+ * version and properties.
+ * @param structuredContentLength Required if the request body is a structured message. Specifies the length of the
+ * blob/file content inside the message body. Will always be smaller than Content-Length.
+ * @param blobHttpHeaders Parameter group.
+ * @param cpkInfo Parameter group.
+ * @param encryptionScopeParam Parameter group.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws StorageErrorException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @Metadata(generated = true)
+ public void upload(String containerName, String blob, long contentLength, BinaryData body, Integer timeout,
+ byte[] transactionalContentMD5, Map metadata, String leaseId, AccessTier tier,
+ OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch,
+ String ifTags, String requestId, String blobTagsString, OffsetDateTime immutabilityPolicyExpiry,
+ BlobImmutabilityPolicyMode immutabilityPolicyMode, Boolean legalHold, byte[] transactionalContentCrc64,
+ String structuredBodyType, Long structuredContentLength, BlobHttpHeaders blobHttpHeaders, CpkInfo cpkInfo,
+ EncryptionScope encryptionScopeParam) {
+ this.instrumentation.instrument("BlockBlob_Upload", null,
+ updatedOptions -> this.serviceClient.upload(containerName, blob, contentLength, body, timeout,
+ transactionalContentMD5, metadata, leaseId, tier, ifModifiedSince, ifUnmodifiedSince, ifMatch,
+ ifNoneMatch, ifTags, requestId, blobTagsString, immutabilityPolicyExpiry, immutabilityPolicyMode,
+ legalHold, transactionalContentCrc64, structuredBodyType, structuredContentLength, blobHttpHeaders,
+ cpkInfo, encryptionScopeParam));
+ }
+
+ /**
+ * The Put Blob from URL operation creates a new Block Blob where the contents of the blob are read from a given
+ * URL. This API is supported beginning with the 2020-04-08 version. Partial updates are not supported with Put Blob
+ * from URL; the content of an existing blob is overwritten with the content of the new blob. To perform partial
+ * updates to a block blob's contents using a source URL, use the Put Block from URL API in conjunction with Put
+ * Block List.
+ *
+ * @param containerName The container name.
+ * @param blob The blob name.
+ * @param contentLength The length of the request.
+ * @param copySource Specifies the name of the source page blob snapshot. This value is a URL of up to 2 KB in
+ * length that specifies a page blob snapshot. The value should be URL-encoded as it would appear in a request URI.
+ * The source blob must either be public or must be authenticated via a shared access signature.
+ * @param timeout The timeout parameter is expressed in seconds. For more information, see <a
+ * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting
+ * Timeouts for Blob Service Operations.</a>.
+ * @param transactionalContentMD5 Specify the transactional md5 for the body, to be validated by the service.
+ * @param metadata Optional. Specifies a user-defined name-value pair associated with the blob. If no name-value
+ * pairs are specified, the operation will copy the metadata from the source blob or file to the destination blob.
+ * If one or more name-value pairs are specified, the destination blob is created with the specified metadata, and
+ * metadata is not copied from the source blob or file. Note that beginning with version 2009-09-19, metadata names
+ * must adhere to the naming rules for C# identifiers. See Naming and Referencing Containers, Blobs, and Metadata
+ * for more information.
+ * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID.
+ * @param tier Optional. Indicates the tier to be set on the blob.
+ * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the
+ * specified date/time.
+ * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since
+ * the specified date/time.
+ * @param ifMatch Specify an ETag value to operate only on blobs with a matching value.
+ * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value.
+ * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value.
+ * @param sourceIfModifiedSince Specify this header value to operate only on a blob if it has been modified since
+ * the specified date/time.
+ * @param sourceIfUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified
+ * since the specified date/time.
+ * @param sourceIfMatch Specify an ETag value to operate only on blobs with a matching value.
+ * @param sourceIfNoneMatch Specify an ETag value to operate only on blobs without a matching value.
+ * @param sourceIfTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value.
+ * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the
+ * analytics logs when storage analytics logging is enabled.
+ * @param sourceContentMD5 Specify the md5 calculated for the range of bytes that must be read from the copy source.
+ * @param blobTagsString Optional. Used to set blob tags in various blob operations.
+ * @param copySourceBlobProperties Optional, default is true. Indicates if properties from the source blob should be
+ * copied.
+ * @param copySourceAuthorization Only Bearer type is supported. Credentials should be a valid OAuth access token to
+ * copy source.
+ * @param copySourceTags Optional, default 'replace'. Indicates if source tags should be copied or replaced with the
+ * tags specified by x-ms-tags.
+ * @param blobHttpHeaders Parameter group.
+ * @param cpkInfo Parameter group.
+ * @param encryptionScopeParam Parameter group.
+ * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws StorageErrorException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response.
+ */
+ @Metadata(generated = true)
+ public Response putBlobFromUrlWithResponse(String containerName, String blob, long contentLength,
+ String copySource, Integer timeout, byte[] transactionalContentMD5, Map metadata,
+ String leaseId, AccessTier tier, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince,
+ String ifMatch, String ifNoneMatch, String ifTags, OffsetDateTime sourceIfModifiedSince,
+ OffsetDateTime sourceIfUnmodifiedSince, String sourceIfMatch, String sourceIfNoneMatch, String sourceIfTags,
+ String requestId, byte[] sourceContentMD5, String blobTagsString, Boolean copySourceBlobProperties,
+ String copySourceAuthorization, BlobCopySourceTagsMode copySourceTags, BlobHttpHeaders blobHttpHeaders,
+ CpkInfo cpkInfo, EncryptionScope encryptionScopeParam, RequestOptions requestOptions) {
+ return this.instrumentation.instrumentWithResponse("BlockBlob_PutBlobFromUrl", requestOptions,
+ updatedOptions -> this.serviceClient.putBlobFromUrlWithResponse(containerName, blob, contentLength,
+ copySource, timeout, transactionalContentMD5, metadata, leaseId, tier, ifModifiedSince,
+ ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, sourceIfModifiedSince, sourceIfUnmodifiedSince,
+ sourceIfMatch, sourceIfNoneMatch, sourceIfTags, requestId, sourceContentMD5, blobTagsString,
+ copySourceBlobProperties, copySourceAuthorization, copySourceTags, blobHttpHeaders, cpkInfo,
+ encryptionScopeParam, updatedOptions));
+ }
+
+ /**
+ * The Put Blob from URL operation creates a new Block Blob where the contents of the blob are read from a given
+ * URL. This API is supported beginning with the 2020-04-08 version. Partial updates are not supported with Put Blob
+ * from URL; the content of an existing blob is overwritten with the content of the new blob. To perform partial
+ * updates to a block blob's contents using a source URL, use the Put Block from URL API in conjunction with Put
+ * Block List.
+ *
+ * @param containerName The container name.
+ * @param blob The blob name.
+ * @param contentLength The length of the request.
+ * @param copySource Specifies the name of the source page blob snapshot. This value is a URL of up to 2 KB in
+ * length that specifies a page blob snapshot. The value should be URL-encoded as it would appear in a request URI.
+ * The source blob must either be public or must be authenticated via a shared access signature.
+ * @param timeout The timeout parameter is expressed in seconds. For more information, see <a
+ * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting
+ * Timeouts for Blob Service Operations.</a>.
+ * @param transactionalContentMD5 Specify the transactional md5 for the body, to be validated by the service.
+ * @param metadata Optional. Specifies a user-defined name-value pair associated with the blob. If no name-value
+ * pairs are specified, the operation will copy the metadata from the source blob or file to the destination blob.
+ * If one or more name-value pairs are specified, the destination blob is created with the specified metadata, and
+ * metadata is not copied from the source blob or file. Note that beginning with version 2009-09-19, metadata names
+ * must adhere to the naming rules for C# identifiers. See Naming and Referencing Containers, Blobs, and Metadata
+ * for more information.
+ * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID.
+ * @param tier Optional. Indicates the tier to be set on the blob.
+ * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the
+ * specified date/time.
+ * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since
+ * the specified date/time.
+ * @param ifMatch Specify an ETag value to operate only on blobs with a matching value.
+ * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value.
+ * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value.
+ * @param sourceIfModifiedSince Specify this header value to operate only on a blob if it has been modified since
+ * the specified date/time.
+ * @param sourceIfUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified
+ * since the specified date/time.
+ * @param sourceIfMatch Specify an ETag value to operate only on blobs with a matching value.
+ * @param sourceIfNoneMatch Specify an ETag value to operate only on blobs without a matching value.
+ * @param sourceIfTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value.
+ * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the
+ * analytics logs when storage analytics logging is enabled.
+ * @param sourceContentMD5 Specify the md5 calculated for the range of bytes that must be read from the copy source.
+ * @param blobTagsString Optional. Used to set blob tags in various blob operations.
+ * @param copySourceBlobProperties Optional, default is true. Indicates if properties from the source blob should be
+ * copied.
+ * @param copySourceAuthorization Only Bearer type is supported. Credentials should be a valid OAuth access token to
+ * copy source.
+ * @param copySourceTags Optional, default 'replace'. Indicates if source tags should be copied or replaced with the
+ * tags specified by x-ms-tags.
+ * @param blobHttpHeaders Parameter group.
+ * @param cpkInfo Parameter group.
+ * @param encryptionScopeParam Parameter group.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws StorageErrorException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @Metadata(generated = true)
+ public void putBlobFromUrl(String containerName, String blob, long contentLength, String copySource,
+ Integer timeout, byte[] transactionalContentMD5, Map metadata, String leaseId, AccessTier tier,
+ OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch,
+ String ifTags, OffsetDateTime sourceIfModifiedSince, OffsetDateTime sourceIfUnmodifiedSince,
+ String sourceIfMatch, String sourceIfNoneMatch, String sourceIfTags, String requestId, byte[] sourceContentMD5,
+ String blobTagsString, Boolean copySourceBlobProperties, String copySourceAuthorization,
+ BlobCopySourceTagsMode copySourceTags, BlobHttpHeaders blobHttpHeaders, CpkInfo cpkInfo,
+ EncryptionScope encryptionScopeParam) {
+ this.instrumentation.instrument("BlockBlob_PutBlobFromUrl", null,
+ updatedOptions -> this.serviceClient.putBlobFromUrl(containerName, blob, contentLength, copySource, timeout,
+ transactionalContentMD5, metadata, leaseId, tier, ifModifiedSince, ifUnmodifiedSince, ifMatch,
+ ifNoneMatch, ifTags, sourceIfModifiedSince, sourceIfUnmodifiedSince, sourceIfMatch, sourceIfNoneMatch,
+ sourceIfTags, requestId, sourceContentMD5, blobTagsString, copySourceBlobProperties,
+ copySourceAuthorization, copySourceTags, blobHttpHeaders, cpkInfo, encryptionScopeParam));
+ }
+
+ /**
+ * The Stage Block operation creates a new block to be committed as part of a blob.
+ *
+ * @param containerName The container name.
+ * @param blob The blob name.
+ * @param blockId A valid Base64 string value that identifies the block. Prior to encoding, the string must be less
+ * than or equal to 64 bytes in size. For a given blob, the length of the value specified for the blockid parameter
+ * must be the same size for each block.
+ * @param contentLength The length of the request.
+ * @param body Initial data.
+ * @param transactionalContentMD5 Specify the transactional md5 for the body, to be validated by the service.
+ * @param transactionalContentCrc64 Specify the transactional crc64 for the body, to be validated by the service.
+ * @param timeout The timeout parameter is expressed in seconds. For more information, see <a
+ * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting
+ * Timeouts for Blob Service Operations.</a>.
+ * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID.
+ * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the
+ * analytics logs when storage analytics logging is enabled.
+ * @param structuredBodyType Required if the request body is a structured message. Specifies the message schema
+ * version and properties.
+ * @param structuredContentLength Required if the request body is a structured message. Specifies the length of the
+ * blob/file content inside the message body. Will always be smaller than Content-Length.
+ * @param cpkInfo Parameter group.
+ * @param encryptionScopeParam Parameter group.
+ * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws StorageErrorException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response.
+ */
+ @Metadata(generated = true)
+ public Response stageBlockWithResponse(String containerName, String blob, String blockId, long contentLength,
+ BinaryData body, byte[] transactionalContentMD5, byte[] transactionalContentCrc64, Integer timeout,
+ String leaseId, String requestId, String structuredBodyType, Long structuredContentLength, CpkInfo cpkInfo,
+ EncryptionScope encryptionScopeParam, RequestOptions requestOptions) {
+ return this.instrumentation.instrumentWithResponse("BlockBlob_StageBlock", requestOptions,
+ updatedOptions -> this.serviceClient.stageBlockWithResponse(containerName, blob, blockId, contentLength,
+ body, transactionalContentMD5, transactionalContentCrc64, timeout, leaseId, requestId,
+ structuredBodyType, structuredContentLength, cpkInfo, encryptionScopeParam, updatedOptions));
+ }
+
+ /**
+ * The Stage Block operation creates a new block to be committed as part of a blob.
+ *
+ * @param containerName The container name.
+ * @param blob The blob name.
+ * @param blockId A valid Base64 string value that identifies the block. Prior to encoding, the string must be less
+ * than or equal to 64 bytes in size. For a given blob, the length of the value specified for the blockid parameter
+ * must be the same size for each block.
+ * @param contentLength The length of the request.
+ * @param body Initial data.
+ * @param transactionalContentMD5 Specify the transactional md5 for the body, to be validated by the service.
+ * @param transactionalContentCrc64 Specify the transactional crc64 for the body, to be validated by the service.
+ * @param timeout The timeout parameter is expressed in seconds. For more information, see <a
+ * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting
+ * Timeouts for Blob Service Operations.</a>.
+ * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID.
+ * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the
+ * analytics logs when storage analytics logging is enabled.
+ * @param structuredBodyType Required if the request body is a structured message. Specifies the message schema
+ * version and properties.
+ * @param structuredContentLength Required if the request body is a structured message. Specifies the length of the
+ * blob/file content inside the message body. Will always be smaller than Content-Length.
+ * @param cpkInfo Parameter group.
+ * @param encryptionScopeParam Parameter group.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws StorageErrorException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @Metadata(generated = true)
+ public void stageBlock(String containerName, String blob, String blockId, long contentLength, BinaryData body,
+ byte[] transactionalContentMD5, byte[] transactionalContentCrc64, Integer timeout, String leaseId,
+ String requestId, String structuredBodyType, Long structuredContentLength, CpkInfo cpkInfo,
+ EncryptionScope encryptionScopeParam) {
+ this.instrumentation.instrument("BlockBlob_StageBlock", null,
+ updatedOptions -> this.serviceClient.stageBlock(containerName, blob, blockId, contentLength, body,
+ transactionalContentMD5, transactionalContentCrc64, timeout, leaseId, requestId, structuredBodyType,
+ structuredContentLength, cpkInfo, encryptionScopeParam));
+ }
+
+ /**
+ * The Stage Block operation creates a new block to be committed as part of a blob where the contents are read from
+ * a URL.
+ *
+ * @param containerName The container name.
+ * @param blob The blob name.
+ * @param blockId A valid Base64 string value that identifies the block. Prior to encoding, the string must be less
+ * than or equal to 64 bytes in size. For a given blob, the length of the value specified for the blockid parameter
+ * must be the same size for each block.
+ * @param contentLength The length of the request.
+ * @param sourceUrl Specify a URL to the copy source.
+ * @param sourceRange Bytes of source data in the specified range.
+ * @param sourceContentMD5 Specify the md5 calculated for the range of bytes that must be read from the copy source.
+ * @param sourceContentcrc64 Specify the crc64 calculated for the range of bytes that must be read from the copy
+ * source.
+ * @param timeout The timeout parameter is expressed in seconds. For more information, see <a
+ * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting
+ * Timeouts for Blob Service Operations.</a>.
+ * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID.
+ * @param sourceIfModifiedSince Specify this header value to operate only on a blob if it has been modified since
+ * the specified date/time.
+ * @param sourceIfUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified
+ * since the specified date/time.
+ * @param sourceIfMatch Specify an ETag value to operate only on blobs with a matching value.
+ * @param sourceIfNoneMatch Specify an ETag value to operate only on blobs without a matching value.
+ * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the
+ * analytics logs when storage analytics logging is enabled.
+ * @param copySourceAuthorization Only Bearer type is supported. Credentials should be a valid OAuth access token to
+ * copy source.
+ * @param cpkInfo Parameter group.
+ * @param encryptionScopeParam Parameter group.
+ * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws StorageErrorException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response.
+ */
+ @Metadata(generated = true)
+ public Response stageBlockFromURLWithResponse(String containerName, String blob, String blockId,
+ long contentLength, String sourceUrl, String sourceRange, byte[] sourceContentMD5, byte[] sourceContentcrc64,
+ Integer timeout, String leaseId, OffsetDateTime sourceIfModifiedSince, OffsetDateTime sourceIfUnmodifiedSince,
+ String sourceIfMatch, String sourceIfNoneMatch, String requestId, String copySourceAuthorization,
+ CpkInfo cpkInfo, EncryptionScope encryptionScopeParam, RequestOptions requestOptions) {
+ return this.instrumentation.instrumentWithResponse("BlockBlob_StageBlockFromURL", requestOptions,
+ updatedOptions -> this.serviceClient.stageBlockFromURLWithResponse(containerName, blob, blockId,
+ contentLength, sourceUrl, sourceRange, sourceContentMD5, sourceContentcrc64, timeout, leaseId,
+ sourceIfModifiedSince, sourceIfUnmodifiedSince, sourceIfMatch, sourceIfNoneMatch, requestId,
+ copySourceAuthorization, cpkInfo, encryptionScopeParam, updatedOptions));
+ }
+
+ /**
+ * The Stage Block operation creates a new block to be committed as part of a blob where the contents are read from
+ * a URL.
+ *
+ * @param containerName The container name.
+ * @param blob The blob name.
+ * @param blockId A valid Base64 string value that identifies the block. Prior to encoding, the string must be less
+ * than or equal to 64 bytes in size. For a given blob, the length of the value specified for the blockid parameter
+ * must be the same size for each block.
+ * @param contentLength The length of the request.
+ * @param sourceUrl Specify a URL to the copy source.
+ * @param sourceRange Bytes of source data in the specified range.
+ * @param sourceContentMD5 Specify the md5 calculated for the range of bytes that must be read from the copy source.
+ * @param sourceContentcrc64 Specify the crc64 calculated for the range of bytes that must be read from the copy
+ * source.
+ * @param timeout The timeout parameter is expressed in seconds. For more information, see <a
+ * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting
+ * Timeouts for Blob Service Operations.</a>.
+ * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID.
+ * @param sourceIfModifiedSince Specify this header value to operate only on a blob if it has been modified since
+ * the specified date/time.
+ * @param sourceIfUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified
+ * since the specified date/time.
+ * @param sourceIfMatch Specify an ETag value to operate only on blobs with a matching value.
+ * @param sourceIfNoneMatch Specify an ETag value to operate only on blobs without a matching value.
+ * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the
+ * analytics logs when storage analytics logging is enabled.
+ * @param copySourceAuthorization Only Bearer type is supported. Credentials should be a valid OAuth access token to
+ * copy source.
+ * @param cpkInfo Parameter group.
+ * @param encryptionScopeParam Parameter group.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws StorageErrorException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @Metadata(generated = true)
+ public void stageBlockFromURL(String containerName, String blob, String blockId, long contentLength,
+ String sourceUrl, String sourceRange, byte[] sourceContentMD5, byte[] sourceContentcrc64, Integer timeout,
+ String leaseId, OffsetDateTime sourceIfModifiedSince, OffsetDateTime sourceIfUnmodifiedSince,
+ String sourceIfMatch, String sourceIfNoneMatch, String requestId, String copySourceAuthorization,
+ CpkInfo cpkInfo, EncryptionScope encryptionScopeParam) {
+ this.instrumentation.instrument("BlockBlob_StageBlockFromURL", null,
+ updatedOptions -> this.serviceClient.stageBlockFromURL(containerName, blob, blockId, contentLength,
+ sourceUrl, sourceRange, sourceContentMD5, sourceContentcrc64, timeout, leaseId, sourceIfModifiedSince,
+ sourceIfUnmodifiedSince, sourceIfMatch, sourceIfNoneMatch, requestId, copySourceAuthorization, cpkInfo,
+ encryptionScopeParam));
+ }
+
+ /**
+ * The Commit Block List operation writes a blob by specifying the list of block IDs that make up the blob. In order
+ * to be written as part of a blob, a block must have been successfully written to the server in a prior Put Block
+ * operation. You can call Put Block List to update a blob by uploading only those blocks that have changed, then
+ * committing the new and existing blocks together. You can do this by specifying whether to commit a block from the
+ * committed block list or from the uncommitted block list, or to commit the most recently uploaded version of the
+ * block, whichever list it may belong to.
+ *
+ * @param containerName The container name.
+ * @param blob The blob name.
+ * @param blocks Blob Blocks.
+ * @param timeout The timeout parameter is expressed in seconds. For more information, see <a
+ * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting
+ * Timeouts for Blob Service Operations.</a>.
+ * @param transactionalContentMD5 Specify the transactional md5 for the body, to be validated by the service.
+ * @param transactionalContentCrc64 Specify the transactional crc64 for the body, to be validated by the service.
+ * @param metadata Optional. Specifies a user-defined name-value pair associated with the blob. If no name-value
+ * pairs are specified, the operation will copy the metadata from the source blob or file to the destination blob.
+ * If one or more name-value pairs are specified, the destination blob is created with the specified metadata, and
+ * metadata is not copied from the source blob or file. Note that beginning with version 2009-09-19, metadata names
+ * must adhere to the naming rules for C# identifiers. See Naming and Referencing Containers, Blobs, and Metadata
+ * for more information.
+ * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID.
+ * @param tier Optional. Indicates the tier to be set on the blob.
+ * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the
+ * specified date/time.
+ * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since
+ * the specified date/time.
+ * @param ifMatch Specify an ETag value to operate only on blobs with a matching value.
+ * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value.
+ * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value.
+ * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the
+ * analytics logs when storage analytics logging is enabled.
+ * @param blobTagsString Optional. Used to set blob tags in various blob operations.
+ * @param immutabilityPolicyExpiry Specifies the date time when the blobs immutability policy is set to expire.
+ * @param immutabilityPolicyMode Specifies the immutability policy mode to set on the blob.
+ * @param legalHold Specified if a legal hold should be set on the blob.
+ * @param blobHttpHeaders Parameter group.
+ * @param cpkInfo Parameter group.
+ * @param encryptionScopeParam Parameter group.
+ * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws StorageErrorException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response.
+ */
+ @Metadata(generated = true)
+ public Response commitBlockListWithResponse(String containerName, String blob, BlockLookupList blocks,
+ Integer timeout, byte[] transactionalContentMD5, byte[] transactionalContentCrc64, Map metadata,
+ String leaseId, AccessTier tier, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince,
+ String ifMatch, String ifNoneMatch, String ifTags, String requestId, String blobTagsString,
+ OffsetDateTime immutabilityPolicyExpiry, BlobImmutabilityPolicyMode immutabilityPolicyMode, Boolean legalHold,
+ BlobHttpHeaders blobHttpHeaders, CpkInfo cpkInfo, EncryptionScope encryptionScopeParam,
+ RequestOptions requestOptions) {
+ return this.instrumentation.instrumentWithResponse("BlockBlob_CommitBlockList", requestOptions,
+ updatedOptions -> this.serviceClient.commitBlockListWithResponse(containerName, blob, blocks, timeout,
+ transactionalContentMD5, transactionalContentCrc64, metadata, leaseId, tier, ifModifiedSince,
+ ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, requestId, blobTagsString, immutabilityPolicyExpiry,
+ immutabilityPolicyMode, legalHold, blobHttpHeaders, cpkInfo, encryptionScopeParam, updatedOptions));
+ }
+
+ /**
+ * The Commit Block List operation writes a blob by specifying the list of block IDs that make up the blob. In order
+ * to be written as part of a blob, a block must have been successfully written to the server in a prior Put Block
+ * operation. You can call Put Block List to update a blob by uploading only those blocks that have changed, then
+ * committing the new and existing blocks together. You can do this by specifying whether to commit a block from the
+ * committed block list or from the uncommitted block list, or to commit the most recently uploaded version of the
+ * block, whichever list it may belong to.
+ *
+ * @param containerName The container name.
+ * @param blob The blob name.
+ * @param blocks Blob Blocks.
+ * @param timeout The timeout parameter is expressed in seconds. For more information, see <a
+ * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting
+ * Timeouts for Blob Service Operations.</a>.
+ * @param transactionalContentMD5 Specify the transactional md5 for the body, to be validated by the service.
+ * @param transactionalContentCrc64 Specify the transactional crc64 for the body, to be validated by the service.
+ * @param metadata Optional. Specifies a user-defined name-value pair associated with the blob. If no name-value
+ * pairs are specified, the operation will copy the metadata from the source blob or file to the destination blob.
+ * If one or more name-value pairs are specified, the destination blob is created with the specified metadata, and
+ * metadata is not copied from the source blob or file. Note that beginning with version 2009-09-19, metadata names
+ * must adhere to the naming rules for C# identifiers. See Naming and Referencing Containers, Blobs, and Metadata
+ * for more information.
+ * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID.
+ * @param tier Optional. Indicates the tier to be set on the blob.
+ * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the
+ * specified date/time.
+ * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since
+ * the specified date/time.
+ * @param ifMatch Specify an ETag value to operate only on blobs with a matching value.
+ * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value.
+ * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value.
+ * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the
+ * analytics logs when storage analytics logging is enabled.
+ * @param blobTagsString Optional. Used to set blob tags in various blob operations.
+ * @param immutabilityPolicyExpiry Specifies the date time when the blobs immutability policy is set to expire.
+ * @param immutabilityPolicyMode Specifies the immutability policy mode to set on the blob.
+ * @param legalHold Specified if a legal hold should be set on the blob.
+ * @param blobHttpHeaders Parameter group.
+ * @param cpkInfo Parameter group.
+ * @param encryptionScopeParam Parameter group.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws StorageErrorException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @Metadata(generated = true)
+ public void commitBlockList(String containerName, String blob, BlockLookupList blocks, Integer timeout,
+ byte[] transactionalContentMD5, byte[] transactionalContentCrc64, Map metadata, String leaseId,
+ AccessTier tier, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch,
+ String ifNoneMatch, String ifTags, String requestId, String blobTagsString,
+ OffsetDateTime immutabilityPolicyExpiry, BlobImmutabilityPolicyMode immutabilityPolicyMode, Boolean legalHold,
+ BlobHttpHeaders blobHttpHeaders, CpkInfo cpkInfo, EncryptionScope encryptionScopeParam) {
+ this.instrumentation.instrument("BlockBlob_CommitBlockList", null,
+ updatedOptions -> this.serviceClient.commitBlockList(containerName, blob, blocks, timeout,
+ transactionalContentMD5, transactionalContentCrc64, metadata, leaseId, tier, ifModifiedSince,
+ ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, requestId, blobTagsString, immutabilityPolicyExpiry,
+ immutabilityPolicyMode, legalHold, blobHttpHeaders, cpkInfo, encryptionScopeParam));
+ }
+
+ /**
+ * The Get Block List operation retrieves the list of blocks that have been uploaded as part of a block blob.
+ *
+ * @param containerName The container name.
+ * @param blob The blob name.
+ * @param listType Specifies whether to return the list of committed blocks, the list of uncommitted blocks, or both
+ * lists together.
+ * @param snapshot The snapshot parameter is an opaque DateTime value that, when present, specifies the blob
+ * snapshot to retrieve. For more information on working with blob snapshots, see <a
+ * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/creating-a-snapshot-of-a-blob">Creating
+ * a Snapshot of a Blob.</a>.
+ * @param timeout The timeout parameter is expressed in seconds. For more information, see <a
+ * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting
+ * Timeouts for Blob Service Operations.</a>.
+ * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID.
+ * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value.
+ * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the
+ * analytics logs when storage analytics logging is enabled.
+ * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws StorageErrorException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response.
+ */
+ @Metadata(generated = true)
+ public Response getBlockListWithResponse(String containerName, String blob, BlockListType listType,
+ String snapshot, Integer timeout, String leaseId, String ifTags, String requestId,
+ RequestOptions requestOptions) {
+ return this.instrumentation.instrumentWithResponse("BlockBlob_GetBlockList", requestOptions,
+ updatedOptions -> this.serviceClient.getBlockListWithResponse(containerName, blob, listType, snapshot,
+ timeout, leaseId, ifTags, requestId, updatedOptions));
+ }
+
+ /**
+ * The Get Block List operation retrieves the list of blocks that have been uploaded as part of a block blob.
+ *
+ * @param containerName The container name.
+ * @param blob The blob name.
+ * @param listType Specifies whether to return the list of committed blocks, the list of uncommitted blocks, or both
+ * lists together.
+ * @param snapshot The snapshot parameter is an opaque DateTime value that, when present, specifies the blob
+ * snapshot to retrieve. For more information on working with blob snapshots, see <a
+ * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/creating-a-snapshot-of-a-blob">Creating
+ * a Snapshot of a Blob.</a>.
+ * @param timeout The timeout parameter is expressed in seconds. For more information, see <a
+ * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting
+ * Timeouts for Blob Service Operations.</a>.
+ * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID.
+ * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value.
+ * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the
+ * analytics logs when storage analytics logging is enabled.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws StorageErrorException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response.
+ */
+ @Metadata(generated = true)
+ public BlockList getBlockList(String containerName, String blob, BlockListType listType, String snapshot,
+ Integer timeout, String leaseId, String ifTags, String requestId) {
+ return this.instrumentation.instrumentWithResponse("BlockBlob_GetBlockList", null,
+ updatedOptions -> this.serviceClient.getBlockList(containerName, blob, listType, snapshot, timeout, leaseId,
+ ifTags, requestId));
+ }
+}
diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/ContainerClient.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/ContainerClient.java
new file mode 100644
index 000000000000..5f6759a83099
--- /dev/null
+++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/ContainerClient.java
@@ -0,0 +1,1108 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.v2.storage.blob;
+
+import com.azure.v2.storage.blob.implementation.ContainersImpl;
+import com.azure.v2.storage.blob.implementation.models.BlobSignedIdentifierWrapper;
+import com.azure.v2.storage.blob.models.BlobContainerEncryptionScope;
+import com.azure.v2.storage.blob.models.BlobSignedIdentifier;
+import com.azure.v2.storage.blob.models.FilterBlobSegment;
+import com.azure.v2.storage.blob.models.FilterBlobsIncludeItem;
+import com.azure.v2.storage.blob.models.ListBlobsFlatSegmentResponse;
+import com.azure.v2.storage.blob.models.ListBlobsHierarchySegmentResponse;
+import com.azure.v2.storage.blob.models.ListBlobsIncludeItem;
+import com.azure.v2.storage.blob.models.PublicAccessType;
+import com.azure.v2.storage.blob.models.StorageErrorException;
+import io.clientcore.core.annotations.Metadata;
+import io.clientcore.core.annotations.ServiceClient;
+import io.clientcore.core.http.models.RequestOptions;
+import io.clientcore.core.http.models.Response;
+import io.clientcore.core.instrumentation.Instrumentation;
+import io.clientcore.core.models.binarydata.BinaryData;
+import java.io.InputStream;
+import java.time.OffsetDateTime;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * Initializes a new instance of the synchronous AzureBlobStorage type.
+ */
+@ServiceClient(builder = AzureBlobStorageBuilder.class)
+public final class ContainerClient {
+ @Metadata(generated = true)
+ private final ContainersImpl serviceClient;
+
+ private final Instrumentation instrumentation;
+
+ /**
+ * Initializes an instance of ContainerClient class.
+ *
+ * @param serviceClient the service client implementation.
+ * @param instrumentation the instrumentation instance.
+ */
+ @Metadata(generated = true)
+ ContainerClient(ContainersImpl serviceClient, Instrumentation instrumentation) {
+ this.serviceClient = serviceClient;
+ this.instrumentation = instrumentation;
+ }
+
+ /**
+ * creates a new container under the specified account. If the container with the same name already exists, the
+ * operation fails.
+ *
+ * @param containerName The container name.
+ * @param timeout The timeout parameter is expressed in seconds. For more information, see <a
+ * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting
+ * Timeouts for Blob Service Operations.</a>.
+ * @param metadata Optional. Specifies a user-defined name-value pair associated with the blob. If no name-value
+ * pairs are specified, the operation will copy the metadata from the source blob or file to the destination blob.
+ * If one or more name-value pairs are specified, the destination blob is created with the specified metadata, and
+ * metadata is not copied from the source blob or file. Note that beginning with version 2009-09-19, metadata names
+ * must adhere to the naming rules for C# identifiers. See Naming and Referencing Containers, Blobs, and Metadata
+ * for more information.
+ * @param access Specifies whether data in the container may be accessed publicly and the level of access.
+ * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the
+ * analytics logs when storage analytics logging is enabled.
+ * @param blobContainerEncryptionScope Parameter group.
+ * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws StorageErrorException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response.
+ */
+ @Metadata(generated = true)
+ public Response createWithResponse(String containerName, Integer timeout, Map metadata,
+ PublicAccessType access, String requestId, BlobContainerEncryptionScope blobContainerEncryptionScope,
+ RequestOptions requestOptions) {
+ return this.instrumentation.instrumentWithResponse("Container_Create", requestOptions,
+ updatedOptions -> this.serviceClient.createWithResponse(containerName, timeout, metadata, access, requestId,
+ blobContainerEncryptionScope, updatedOptions));
+ }
+
+ /**
+ * creates a new container under the specified account. If the container with the same name already exists, the
+ * operation fails.
+ *
+ * @param containerName The container name.
+ * @param timeout The timeout parameter is expressed in seconds. For more information, see <a
+ * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting
+ * Timeouts for Blob Service Operations.</a>.
+ * @param metadata Optional. Specifies a user-defined name-value pair associated with the blob. If no name-value
+ * pairs are specified, the operation will copy the metadata from the source blob or file to the destination blob.
+ * If one or more name-value pairs are specified, the destination blob is created with the specified metadata, and
+ * metadata is not copied from the source blob or file. Note that beginning with version 2009-09-19, metadata names
+ * must adhere to the naming rules for C# identifiers. See Naming and Referencing Containers, Blobs, and Metadata
+ * for more information.
+ * @param access Specifies whether data in the container may be accessed publicly and the level of access.
+ * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the
+ * analytics logs when storage analytics logging is enabled.
+ * @param blobContainerEncryptionScope Parameter group.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws StorageErrorException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @Metadata(generated = true)
+ public void create(String containerName, Integer timeout, Map metadata, PublicAccessType access,
+ String requestId, BlobContainerEncryptionScope blobContainerEncryptionScope) {
+ this.instrumentation.instrument("Container_Create", null, updatedOptions -> this.serviceClient
+ .create(containerName, timeout, metadata, access, requestId, blobContainerEncryptionScope));
+ }
+
+ /**
+ * returns all user-defined metadata and system properties for the specified container. The data returned does not
+ * include the container's list of blobs.
+ *
+ * @param containerName The container name.
+ * @param timeout The timeout parameter is expressed in seconds. For more information, see <a
+ * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting
+ * Timeouts for Blob Service Operations.</a>.
+ * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID.
+ * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the
+ * analytics logs when storage analytics logging is enabled.
+ * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws StorageErrorException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response.
+ */
+ @Metadata(generated = true)
+ public Response getPropertiesWithResponse(String containerName, Integer timeout, String leaseId,
+ String requestId, RequestOptions requestOptions) {
+ return this.instrumentation.instrumentWithResponse("Container_GetProperties", requestOptions,
+ updatedOptions -> this.serviceClient.getPropertiesWithResponse(containerName, timeout, leaseId, requestId,
+ updatedOptions));
+ }
+
+ /**
+ * returns all user-defined metadata and system properties for the specified container. The data returned does not
+ * include the container's list of blobs.
+ *
+ * @param containerName The container name.
+ * @param timeout The timeout parameter is expressed in seconds. For more information, see <a
+ * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting
+ * Timeouts for Blob Service Operations.</a>.
+ * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID.
+ * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the
+ * analytics logs when storage analytics logging is enabled.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws StorageErrorException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @Metadata(generated = true)
+ public void getProperties(String containerName, Integer timeout, String leaseId, String requestId) {
+ this.instrumentation.instrument("Container_GetProperties", null,
+ updatedOptions -> this.serviceClient.getProperties(containerName, timeout, leaseId, requestId));
+ }
+
+ /**
+ * operation marks the specified container for deletion. The container and any blobs contained within it are later
+ * deleted during garbage collection.
+ *
+ * @param containerName The container name.
+ * @param timeout The timeout parameter is expressed in seconds. For more information, see <a
+ * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting
+ * Timeouts for Blob Service Operations.</a>.
+ * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID.
+ * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the
+ * specified date/time.
+ * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since
+ * the specified date/time.
+ * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the
+ * analytics logs when storage analytics logging is enabled.
+ * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws StorageErrorException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response.
+ */
+ @Metadata(generated = true)
+ public Response deleteWithResponse(String containerName, Integer timeout, String leaseId,
+ OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String requestId,
+ RequestOptions requestOptions) {
+ return this.instrumentation.instrumentWithResponse("Container_Delete", requestOptions,
+ updatedOptions -> this.serviceClient.deleteWithResponse(containerName, timeout, leaseId, ifModifiedSince,
+ ifUnmodifiedSince, requestId, updatedOptions));
+ }
+
+ /**
+ * operation marks the specified container for deletion. The container and any blobs contained within it are later
+ * deleted during garbage collection.
+ *
+ * @param containerName The container name.
+ * @param timeout The timeout parameter is expressed in seconds. For more information, see <a
+ * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting
+ * Timeouts for Blob Service Operations.</a>.
+ * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID.
+ * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the
+ * specified date/time.
+ * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since
+ * the specified date/time.
+ * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the
+ * analytics logs when storage analytics logging is enabled.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws StorageErrorException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @Metadata(generated = true)
+ public void delete(String containerName, Integer timeout, String leaseId, OffsetDateTime ifModifiedSince,
+ OffsetDateTime ifUnmodifiedSince, String requestId) {
+ this.instrumentation.instrument("Container_Delete", null, updatedOptions -> this.serviceClient
+ .delete(containerName, timeout, leaseId, ifModifiedSince, ifUnmodifiedSince, requestId));
+ }
+
+ /**
+ * operation sets one or more user-defined name-value pairs for the specified container.
+ *
+ * @param containerName The container name.
+ * @param timeout The timeout parameter is expressed in seconds. For more information, see <a
+ * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting
+ * Timeouts for Blob Service Operations.</a>.
+ * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID.
+ * @param metadata Optional. Specifies a user-defined name-value pair associated with the blob. If no name-value
+ * pairs are specified, the operation will copy the metadata from the source blob or file to the destination blob.
+ * If one or more name-value pairs are specified, the destination blob is created with the specified metadata, and
+ * metadata is not copied from the source blob or file. Note that beginning with version 2009-09-19, metadata names
+ * must adhere to the naming rules for C# identifiers. See Naming and Referencing Containers, Blobs, and Metadata
+ * for more information.
+ * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the
+ * specified date/time.
+ * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the
+ * analytics logs when storage analytics logging is enabled.
+ * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws StorageErrorException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response.
+ */
+ @Metadata(generated = true)
+ public Response setMetadataWithResponse(String containerName, Integer timeout, String leaseId,
+ Map metadata, OffsetDateTime ifModifiedSince, String requestId, RequestOptions requestOptions) {
+ return this.instrumentation.instrumentWithResponse("Container_SetMetadata", requestOptions,
+ updatedOptions -> this.serviceClient.setMetadataWithResponse(containerName, timeout, leaseId, metadata,
+ ifModifiedSince, requestId, updatedOptions));
+ }
+
+ /**
+ * operation sets one or more user-defined name-value pairs for the specified container.
+ *
+ * @param containerName The container name.
+ * @param timeout The timeout parameter is expressed in seconds. For more information, see <a
+ * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting
+ * Timeouts for Blob Service Operations.</a>.
+ * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID.
+ * @param metadata Optional. Specifies a user-defined name-value pair associated with the blob. If no name-value
+ * pairs are specified, the operation will copy the metadata from the source blob or file to the destination blob.
+ * If one or more name-value pairs are specified, the destination blob is created with the specified metadata, and
+ * metadata is not copied from the source blob or file. Note that beginning with version 2009-09-19, metadata names
+ * must adhere to the naming rules for C# identifiers. See Naming and Referencing Containers, Blobs, and Metadata
+ * for more information.
+ * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the
+ * specified date/time.
+ * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the
+ * analytics logs when storage analytics logging is enabled.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws StorageErrorException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @Metadata(generated = true)
+ public void setMetadata(String containerName, Integer timeout, String leaseId, Map metadata,
+ OffsetDateTime ifModifiedSince, String requestId) {
+ this.instrumentation.instrument("Container_SetMetadata", null, updatedOptions -> this.serviceClient
+ .setMetadata(containerName, timeout, leaseId, metadata, ifModifiedSince, requestId));
+ }
+
+ /**
+ * gets the permissions for the specified container. The permissions indicate whether container data may be accessed
+ * publicly.
+ *
+ * @param containerName The container name.
+ * @param timeout The timeout parameter is expressed in seconds. For more information, see <a
+ * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting
+ * Timeouts for Blob Service Operations.</a>.
+ * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID.
+ * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the
+ * analytics logs when storage analytics logging is enabled.
+ * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws StorageErrorException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the permissions for the specified container.
+ */
+ @Metadata(generated = true)
+ public Response getAccessPolicyWithResponse(String containerName, Integer timeout,
+ String leaseId, String requestId, RequestOptions requestOptions) {
+ return this.instrumentation.instrumentWithResponse("Container_GetAccessPolicy", requestOptions,
+ updatedOptions -> this.serviceClient.getAccessPolicyWithResponse(containerName, timeout, leaseId, requestId,
+ updatedOptions));
+ }
+
+ /**
+ * gets the permissions for the specified container. The permissions indicate whether container data may be accessed
+ * publicly.
+ *
+ * @param containerName The container name.
+ * @param timeout The timeout parameter is expressed in seconds. For more information, see <a
+ * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting
+ * Timeouts for Blob Service Operations.</a>.
+ * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID.
+ * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the
+ * analytics logs when storage analytics logging is enabled.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws StorageErrorException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the permissions for the specified container.
+ */
+ @Metadata(generated = true)
+ public BlobSignedIdentifierWrapper getAccessPolicy(String containerName, Integer timeout, String leaseId,
+ String requestId) {
+ return this.instrumentation.instrumentWithResponse("Container_GetAccessPolicy", null,
+ updatedOptions -> this.serviceClient.getAccessPolicy(containerName, timeout, leaseId, requestId));
+ }
+
+ /**
+ * sets the permissions for the specified container. The permissions indicate whether blobs in a container may be
+ * accessed publicly.
+ *
+ * @param containerName The container name.
+ * @param timeout The timeout parameter is expressed in seconds. For more information, see <a
+ * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting
+ * Timeouts for Blob Service Operations.</a>.
+ * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID.
+ * @param access Specifies whether data in the container may be accessed publicly and the level of access.
+ * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the
+ * specified date/time.
+ * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since
+ * the specified date/time.
+ * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the
+ * analytics logs when storage analytics logging is enabled.
+ * @param containerAcl the acls for the container.
+ * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws StorageErrorException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response.
+ */
+ @Metadata(generated = true)
+ public Response setAccessPolicyWithResponse(String containerName, Integer timeout, String leaseId,
+ PublicAccessType access, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String requestId,
+ List containerAcl, RequestOptions requestOptions) {
+ return this.instrumentation.instrumentWithResponse("Container_SetAccessPolicy", requestOptions,
+ updatedOptions -> this.serviceClient.setAccessPolicyWithResponse(containerName, timeout, leaseId, access,
+ ifModifiedSince, ifUnmodifiedSince, requestId, containerAcl, updatedOptions));
+ }
+
+ /**
+ * sets the permissions for the specified container. The permissions indicate whether blobs in a container may be
+ * accessed publicly.
+ *
+ * @param containerName The container name.
+ * @param timeout The timeout parameter is expressed in seconds. For more information, see <a
+ * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting
+ * Timeouts for Blob Service Operations.</a>.
+ * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID.
+ * @param access Specifies whether data in the container may be accessed publicly and the level of access.
+ * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the
+ * specified date/time.
+ * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since
+ * the specified date/time.
+ * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the
+ * analytics logs when storage analytics logging is enabled.
+ * @param containerAcl the acls for the container.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws StorageErrorException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @Metadata(generated = true)
+ public void setAccessPolicy(String containerName, Integer timeout, String leaseId, PublicAccessType access,
+ OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String requestId,
+ List containerAcl) {
+ this.instrumentation.instrument("Container_SetAccessPolicy", null,
+ updatedOptions -> this.serviceClient.setAccessPolicy(containerName, timeout, leaseId, access,
+ ifModifiedSince, ifUnmodifiedSince, requestId, containerAcl));
+ }
+
+ /**
+ * Restores a previously-deleted container.
+ *
+ * @param containerName The container name.
+ * @param timeout The timeout parameter is expressed in seconds. For more information, see <a
+ * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting
+ * Timeouts for Blob Service Operations.</a>.
+ * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the
+ * analytics logs when storage analytics logging is enabled.
+ * @param deletedContainerName Optional. Version 2019-12-12 and later. Specifies the name of the deleted container
+ * to restore.
+ * @param deletedContainerVersion Optional. Version 2019-12-12 and later. Specifies the version of the deleted
+ * container to restore.
+ * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws StorageErrorException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response.
+ */
+ @Metadata(generated = true)
+ public Response restoreWithResponse(String containerName, Integer timeout, String requestId,
+ String deletedContainerName, String deletedContainerVersion, RequestOptions requestOptions) {
+ return this.instrumentation.instrumentWithResponse("Container_Restore", requestOptions,
+ updatedOptions -> this.serviceClient.restoreWithResponse(containerName, timeout, requestId,
+ deletedContainerName, deletedContainerVersion, updatedOptions));
+ }
+
+ /**
+ * Restores a previously-deleted container.
+ *
+ * @param containerName The container name.
+ * @param timeout The timeout parameter is expressed in seconds. For more information, see <a
+ * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting
+ * Timeouts for Blob Service Operations.</a>.
+ * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the
+ * analytics logs when storage analytics logging is enabled.
+ * @param deletedContainerName Optional. Version 2019-12-12 and later. Specifies the name of the deleted container
+ * to restore.
+ * @param deletedContainerVersion Optional. Version 2019-12-12 and later. Specifies the version of the deleted
+ * container to restore.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws StorageErrorException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @Metadata(generated = true)
+ public void restore(String containerName, Integer timeout, String requestId, String deletedContainerName,
+ String deletedContainerVersion) {
+ this.instrumentation.instrument("Container_Restore", null, updatedOptions -> this.serviceClient
+ .restore(containerName, timeout, requestId, deletedContainerName, deletedContainerVersion));
+ }
+
+ /**
+ * Renames an existing container.
+ *
+ * @param containerName The container name.
+ * @param sourceContainerName Required. Specifies the name of the container to rename.
+ * @param timeout The timeout parameter is expressed in seconds. For more information, see <a
+ * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting
+ * Timeouts for Blob Service Operations.</a>.
+ * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the
+ * analytics logs when storage analytics logging is enabled.
+ * @param sourceLeaseId A lease ID for the source path. If specified, the source path must have an active lease and
+ * the lease ID must match.
+ * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws StorageErrorException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response.
+ */
+ @Metadata(generated = true)
+ public Response renameWithResponse(String containerName, String sourceContainerName, Integer timeout,
+ String requestId, String sourceLeaseId, RequestOptions requestOptions) {
+ return this.instrumentation.instrumentWithResponse("Container_Rename", requestOptions,
+ updatedOptions -> this.serviceClient.renameWithResponse(containerName, sourceContainerName, timeout,
+ requestId, sourceLeaseId, updatedOptions));
+ }
+
+ /**
+ * Renames an existing container.
+ *
+ * @param containerName The container name.
+ * @param sourceContainerName Required. Specifies the name of the container to rename.
+ * @param timeout The timeout parameter is expressed in seconds. For more information, see <a
+ * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting
+ * Timeouts for Blob Service Operations.</a>.
+ * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the
+ * analytics logs when storage analytics logging is enabled.
+ * @param sourceLeaseId A lease ID for the source path. If specified, the source path must have an active lease and
+ * the lease ID must match.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws StorageErrorException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @Metadata(generated = true)
+ public void rename(String containerName, String sourceContainerName, Integer timeout, String requestId,
+ String sourceLeaseId) {
+ this.instrumentation.instrument("Container_Rename", null, updatedOptions -> this.serviceClient
+ .rename(containerName, sourceContainerName, timeout, requestId, sourceLeaseId));
+ }
+
+ /**
+ * The Batch operation allows multiple API calls to be embedded into a single HTTP request.
+ *
+ * @param containerName The container name.
+ * @param contentLength The length of the request.
+ * @param multipartContentType Required. The value of this header must be multipart/mixed with a batch boundary.
+ * Example header value: multipart/mixed; boundary=batch_<GUID>.
+ * @param body Initial data.
+ * @param timeout The timeout parameter is expressed in seconds. For more information, see <a
+ * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting
+ * Timeouts for Blob Service Operations.</a>.
+ * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the
+ * analytics logs when storage analytics logging is enabled.
+ * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws StorageErrorException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response.
+ */
+ @Metadata(generated = true)
+ public Response submitBatchWithResponse(String containerName, long contentLength,
+ String multipartContentType, BinaryData body, Integer timeout, String requestId,
+ RequestOptions requestOptions) {
+ return this.instrumentation.instrumentWithResponse("Container_SubmitBatch", requestOptions,
+ updatedOptions -> this.serviceClient.submitBatchWithResponse(containerName, contentLength,
+ multipartContentType, body, timeout, requestId, updatedOptions));
+ }
+
+ /**
+ * The Batch operation allows multiple API calls to be embedded into a single HTTP request.
+ *
+ * @param containerName The container name.
+ * @param contentLength The length of the request.
+ * @param multipartContentType Required. The value of this header must be multipart/mixed with a batch boundary.
+ * Example header value: multipart/mixed; boundary=batch_<GUID>.
+ * @param body Initial data.
+ * @param timeout The timeout parameter is expressed in seconds. For more information, see <a
+ * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting
+ * Timeouts for Blob Service Operations.</a>.
+ * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the
+ * analytics logs when storage analytics logging is enabled.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws StorageErrorException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response.
+ */
+ @Metadata(generated = true)
+ public InputStream submitBatch(String containerName, long contentLength, String multipartContentType,
+ BinaryData body, Integer timeout, String requestId) {
+ return this.instrumentation.instrumentWithResponse("Container_SubmitBatch", null,
+ updatedOptions -> this.serviceClient.submitBatch(containerName, contentLength, multipartContentType, body,
+ timeout, requestId));
+ }
+
+ /**
+ * The Filter Blobs operation enables callers to list blobs in a container whose tags match a given search
+ * expression. Filter blobs searches within the given container.
+ *
+ * @param containerName The container name.
+ * @param timeout The timeout parameter is expressed in seconds. For more information, see <a
+ * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting
+ * Timeouts for Blob Service Operations.</a>.
+ * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the
+ * analytics logs when storage analytics logging is enabled.
+ * @param where Filters the results to return only to return only blobs whose tags match the specified expression.
+ * @param marker A string value that identifies the portion of the list of containers to be returned with the next
+ * listing operation. The operation returns the NextMarker value within the response body if the listing operation
+ * did not return all containers remaining to be listed with the current page. The NextMarker value can be used as
+ * the value for the marker parameter in a subsequent call to request the next page of list items. The marker value
+ * is opaque to the client.
+ * @param maxresults Specifies the maximum number of containers to return. If the request does not specify
+ * maxresults, or specifies a value greater than 5000, the server will return up to 5000 items. Note that if the
+ * listing operation crosses a partition boundary, then the service will return a continuation token for retrieving
+ * the remainder of the results. For this reason, it is possible that the service will return fewer results than
+ * specified by maxresults, or than the default of 5000.
+ * @param include Include this parameter to specify one or more datasets to include in the response.
+ * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws StorageErrorException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the result of a Filter Blobs API call.
+ */
+ @Metadata(generated = true)
+ public Response filterBlobsWithResponse(String containerName, Integer timeout, String requestId,
+ String where, String marker, Integer maxresults, List include,
+ RequestOptions requestOptions) {
+ return this.instrumentation.instrumentWithResponse("Container_FilterBlobs", requestOptions,
+ updatedOptions -> this.serviceClient.filterBlobsWithResponse(containerName, timeout, requestId, where,
+ marker, maxresults, include, updatedOptions));
+ }
+
+ /**
+ * The Filter Blobs operation enables callers to list blobs in a container whose tags match a given search
+ * expression. Filter blobs searches within the given container.
+ *
+ * @param containerName The container name.
+ * @param timeout The timeout parameter is expressed in seconds. For more information, see <a
+ * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting
+ * Timeouts for Blob Service Operations.</a>.
+ * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the
+ * analytics logs when storage analytics logging is enabled.
+ * @param where Filters the results to return only to return only blobs whose tags match the specified expression.
+ * @param marker A string value that identifies the portion of the list of containers to be returned with the next
+ * listing operation. The operation returns the NextMarker value within the response body if the listing operation
+ * did not return all containers remaining to be listed with the current page. The NextMarker value can be used as
+ * the value for the marker parameter in a subsequent call to request the next page of list items. The marker value
+ * is opaque to the client.
+ * @param maxresults Specifies the maximum number of containers to return. If the request does not specify
+ * maxresults, or specifies a value greater than 5000, the server will return up to 5000 items. Note that if the
+ * listing operation crosses a partition boundary, then the service will return a continuation token for retrieving
+ * the remainder of the results. For this reason, it is possible that the service will return fewer results than
+ * specified by maxresults, or than the default of 5000.
+ * @param include Include this parameter to specify one or more datasets to include in the response.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws StorageErrorException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the result of a Filter Blobs API call.
+ */
+ @Metadata(generated = true)
+ public FilterBlobSegment filterBlobs(String containerName, Integer timeout, String requestId, String where,
+ String marker, Integer maxresults, List include) {
+ return this.instrumentation.instrumentWithResponse("Container_FilterBlobs", null,
+ updatedOptions -> this.serviceClient.filterBlobs(containerName, timeout, requestId, where, marker,
+ maxresults, include));
+ }
+
+ /**
+ * [Update] establishes and manages a lock on a container for delete operations. The lock duration can be 15 to 60
+ * seconds, or can be infinite.
+ *
+ * @param containerName The container name.
+ * @param timeout The timeout parameter is expressed in seconds. For more information, see <a
+ * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting
+ * Timeouts for Blob Service Operations.</a>.
+ * @param duration Specifies the duration of the lease, in seconds, or negative one (-1) for a lease that never
+ * expires. A non-infinite lease can be between 15 and 60 seconds. A lease duration cannot be changed using renew or
+ * change.
+ * @param proposedLeaseId Proposed lease ID, in a GUID string format. The Blob service returns 400 (Invalid request)
+ * if the proposed lease ID is not in the correct format. See Guid Constructor (String) for a list of valid GUID
+ * string formats.
+ * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the
+ * specified date/time.
+ * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since
+ * the specified date/time.
+ * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the
+ * analytics logs when storage analytics logging is enabled.
+ * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws StorageErrorException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response.
+ */
+ @Metadata(generated = true)
+ public Response acquireLeaseWithResponse(String containerName, Integer timeout, Integer duration,
+ String proposedLeaseId, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String requestId,
+ RequestOptions requestOptions) {
+ return this.instrumentation.instrumentWithResponse("Container_AcquireLease", requestOptions,
+ updatedOptions -> this.serviceClient.acquireLeaseWithResponse(containerName, timeout, duration,
+ proposedLeaseId, ifModifiedSince, ifUnmodifiedSince, requestId, updatedOptions));
+ }
+
+ /**
+ * [Update] establishes and manages a lock on a container for delete operations. The lock duration can be 15 to 60
+ * seconds, or can be infinite.
+ *
+ * @param containerName The container name.
+ * @param timeout The timeout parameter is expressed in seconds. For more information, see <a
+ * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting
+ * Timeouts for Blob Service Operations.</a>.
+ * @param duration Specifies the duration of the lease, in seconds, or negative one (-1) for a lease that never
+ * expires. A non-infinite lease can be between 15 and 60 seconds. A lease duration cannot be changed using renew or
+ * change.
+ * @param proposedLeaseId Proposed lease ID, in a GUID string format. The Blob service returns 400 (Invalid request)
+ * if the proposed lease ID is not in the correct format. See Guid Constructor (String) for a list of valid GUID
+ * string formats.
+ * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the
+ * specified date/time.
+ * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since
+ * the specified date/time.
+ * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the
+ * analytics logs when storage analytics logging is enabled.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws StorageErrorException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @Metadata(generated = true)
+ public void acquireLease(String containerName, Integer timeout, Integer duration, String proposedLeaseId,
+ OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String requestId) {
+ this.instrumentation.instrument("Container_AcquireLease", null,
+ updatedOptions -> this.serviceClient.acquireLease(containerName, timeout, duration, proposedLeaseId,
+ ifModifiedSince, ifUnmodifiedSince, requestId));
+ }
+
+ /**
+ * [Update] establishes and manages a lock on a container for delete operations. The lock duration can be 15 to 60
+ * seconds, or can be infinite.
+ *
+ * @param containerName The container name.
+ * @param leaseId Specifies the current lease ID on the resource.
+ * @param timeout The timeout parameter is expressed in seconds. For more information, see <a
+ * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting
+ * Timeouts for Blob Service Operations.</a>.
+ * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the
+ * specified date/time.
+ * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since
+ * the specified date/time.
+ * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the
+ * analytics logs when storage analytics logging is enabled.
+ * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws StorageErrorException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response.
+ */
+ @Metadata(generated = true)
+ public Response releaseLeaseWithResponse(String containerName, String leaseId, Integer timeout,
+ OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String requestId,
+ RequestOptions requestOptions) {
+ return this.instrumentation.instrumentWithResponse("Container_ReleaseLease", requestOptions,
+ updatedOptions -> this.serviceClient.releaseLeaseWithResponse(containerName, leaseId, timeout,
+ ifModifiedSince, ifUnmodifiedSince, requestId, updatedOptions));
+ }
+
+ /**
+ * [Update] establishes and manages a lock on a container for delete operations. The lock duration can be 15 to 60
+ * seconds, or can be infinite.
+ *
+ * @param containerName The container name.
+ * @param leaseId Specifies the current lease ID on the resource.
+ * @param timeout The timeout parameter is expressed in seconds. For more information, see <a
+ * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting
+ * Timeouts for Blob Service Operations.</a>.
+ * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the
+ * specified date/time.
+ * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since
+ * the specified date/time.
+ * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the
+ * analytics logs when storage analytics logging is enabled.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws StorageErrorException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @Metadata(generated = true)
+ public void releaseLease(String containerName, String leaseId, Integer timeout, OffsetDateTime ifModifiedSince,
+ OffsetDateTime ifUnmodifiedSince, String requestId) {
+ this.instrumentation.instrument("Container_ReleaseLease", null, updatedOptions -> this.serviceClient
+ .releaseLease(containerName, leaseId, timeout, ifModifiedSince, ifUnmodifiedSince, requestId));
+ }
+
+ /**
+ * [Update] establishes and manages a lock on a container for delete operations. The lock duration can be 15 to 60
+ * seconds, or can be infinite.
+ *
+ * @param containerName The container name.
+ * @param leaseId Specifies the current lease ID on the resource.
+ * @param timeout The timeout parameter is expressed in seconds. For more information, see <a
+ * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting
+ * Timeouts for Blob Service Operations.</a>.
+ * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the
+ * specified date/time.
+ * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since
+ * the specified date/time.
+ * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the
+ * analytics logs when storage analytics logging is enabled.
+ * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws StorageErrorException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response.
+ */
+ @Metadata(generated = true)
+ public Response renewLeaseWithResponse(String containerName, String leaseId, Integer timeout,
+ OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String requestId,
+ RequestOptions requestOptions) {
+ return this.instrumentation.instrumentWithResponse("Container_RenewLease", requestOptions,
+ updatedOptions -> this.serviceClient.renewLeaseWithResponse(containerName, leaseId, timeout,
+ ifModifiedSince, ifUnmodifiedSince, requestId, updatedOptions));
+ }
+
+ /**
+ * [Update] establishes and manages a lock on a container for delete operations. The lock duration can be 15 to 60
+ * seconds, or can be infinite.
+ *
+ * @param containerName The container name.
+ * @param leaseId Specifies the current lease ID on the resource.
+ * @param timeout The timeout parameter is expressed in seconds. For more information, see <a
+ * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting
+ * Timeouts for Blob Service Operations.</a>.
+ * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the
+ * specified date/time.
+ * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since
+ * the specified date/time.
+ * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the
+ * analytics logs when storage analytics logging is enabled.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws StorageErrorException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @Metadata(generated = true)
+ public void renewLease(String containerName, String leaseId, Integer timeout, OffsetDateTime ifModifiedSince,
+ OffsetDateTime ifUnmodifiedSince, String requestId) {
+ this.instrumentation.instrument("Container_RenewLease", null, updatedOptions -> this.serviceClient
+ .renewLease(containerName, leaseId, timeout, ifModifiedSince, ifUnmodifiedSince, requestId));
+ }
+
+ /**
+ * [Update] establishes and manages a lock on a container for delete operations. The lock duration can be 15 to 60
+ * seconds, or can be infinite.
+ *
+ * @param containerName The container name.
+ * @param timeout The timeout parameter is expressed in seconds. For more information, see <a
+ * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting
+ * Timeouts for Blob Service Operations.</a>.
+ * @param breakPeriod For a break operation, proposed duration the lease should continue before it is broken, in
+ * seconds, between 0 and 60. This break period is only used if it is shorter than the time remaining on the lease.
+ * If longer, the time remaining on the lease is used. A new lease will not be available before the break period has
+ * expired, but the lease may be held for longer than the break period. If this header does not appear with a break
+ * operation, a fixed-duration lease breaks after the remaining lease period elapses, and an infinite lease breaks
+ * immediately.
+ * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the
+ * specified date/time.
+ * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since
+ * the specified date/time.
+ * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the
+ * analytics logs when storage analytics logging is enabled.
+ * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws StorageErrorException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response.
+ */
+ @Metadata(generated = true)
+ public Response breakLeaseWithResponse(String containerName, Integer timeout, Integer breakPeriod,
+ OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String requestId,
+ RequestOptions requestOptions) {
+ return this.instrumentation.instrumentWithResponse("Container_BreakLease", requestOptions,
+ updatedOptions -> this.serviceClient.breakLeaseWithResponse(containerName, timeout, breakPeriod,
+ ifModifiedSince, ifUnmodifiedSince, requestId, updatedOptions));
+ }
+
+ /**
+ * [Update] establishes and manages a lock on a container for delete operations. The lock duration can be 15 to 60
+ * seconds, or can be infinite.
+ *
+ * @param containerName The container name.
+ * @param timeout The timeout parameter is expressed in seconds. For more information, see <a
+ * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting
+ * Timeouts for Blob Service Operations.</a>.
+ * @param breakPeriod For a break operation, proposed duration the lease should continue before it is broken, in
+ * seconds, between 0 and 60. This break period is only used if it is shorter than the time remaining on the lease.
+ * If longer, the time remaining on the lease is used. A new lease will not be available before the break period has
+ * expired, but the lease may be held for longer than the break period. If this header does not appear with a break
+ * operation, a fixed-duration lease breaks after the remaining lease period elapses, and an infinite lease breaks
+ * immediately.
+ * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the
+ * specified date/time.
+ * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since
+ * the specified date/time.
+ * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the
+ * analytics logs when storage analytics logging is enabled.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws StorageErrorException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @Metadata(generated = true)
+ public void breakLease(String containerName, Integer timeout, Integer breakPeriod, OffsetDateTime ifModifiedSince,
+ OffsetDateTime ifUnmodifiedSince, String requestId) {
+ this.instrumentation.instrument("Container_BreakLease", null, updatedOptions -> this.serviceClient
+ .breakLease(containerName, timeout, breakPeriod, ifModifiedSince, ifUnmodifiedSince, requestId));
+ }
+
+ /**
+ * [Update] establishes and manages a lock on a container for delete operations. The lock duration can be 15 to 60
+ * seconds, or can be infinite.
+ *
+ * @param containerName The container name.
+ * @param leaseId Specifies the current lease ID on the resource.
+ * @param proposedLeaseId Proposed lease ID, in a GUID string format. The Blob service returns 400 (Invalid request)
+ * if the proposed lease ID is not in the correct format. See Guid Constructor (String) for a list of valid GUID
+ * string formats.
+ * @param timeout The timeout parameter is expressed in seconds. For more information, see <a
+ * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting
+ * Timeouts for Blob Service Operations.</a>.
+ * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the
+ * specified date/time.
+ * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since
+ * the specified date/time.
+ * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the
+ * analytics logs when storage analytics logging is enabled.
+ * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws StorageErrorException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response.
+ */
+ @Metadata(generated = true)
+ public Response changeLeaseWithResponse(String containerName, String leaseId, String proposedLeaseId,
+ Integer timeout, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String requestId,
+ RequestOptions requestOptions) {
+ return this.instrumentation.instrumentWithResponse("Container_ChangeLease", requestOptions,
+ updatedOptions -> this.serviceClient.changeLeaseWithResponse(containerName, leaseId, proposedLeaseId,
+ timeout, ifModifiedSince, ifUnmodifiedSince, requestId, updatedOptions));
+ }
+
+ /**
+ * [Update] establishes and manages a lock on a container for delete operations. The lock duration can be 15 to 60
+ * seconds, or can be infinite.
+ *
+ * @param containerName The container name.
+ * @param leaseId Specifies the current lease ID on the resource.
+ * @param proposedLeaseId Proposed lease ID, in a GUID string format. The Blob service returns 400 (Invalid request)
+ * if the proposed lease ID is not in the correct format. See Guid Constructor (String) for a list of valid GUID
+ * string formats.
+ * @param timeout The timeout parameter is expressed in seconds. For more information, see <a
+ * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting
+ * Timeouts for Blob Service Operations.</a>.
+ * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the
+ * specified date/time.
+ * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since
+ * the specified date/time.
+ * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the
+ * analytics logs when storage analytics logging is enabled.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws StorageErrorException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @Metadata(generated = true)
+ public void changeLease(String containerName, String leaseId, String proposedLeaseId, Integer timeout,
+ OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String requestId) {
+ this.instrumentation.instrument("Container_ChangeLease", null,
+ updatedOptions -> this.serviceClient.changeLease(containerName, leaseId, proposedLeaseId, timeout,
+ ifModifiedSince, ifUnmodifiedSince, requestId));
+ }
+
+ /**
+ * [Update] The List Blobs operation returns a list of the blobs under the specified container.
+ *
+ * @param containerName The container name.
+ * @param prefix Filters the results to return only containers whose name begins with the specified prefix.
+ * @param marker A string value that identifies the portion of the list of containers to be returned with the next
+ * listing operation. The operation returns the NextMarker value within the response body if the listing operation
+ * did not return all containers remaining to be listed with the current page. The NextMarker value can be used as
+ * the value for the marker parameter in a subsequent call to request the next page of list items. The marker value
+ * is opaque to the client.
+ * @param maxresults Specifies the maximum number of containers to return. If the request does not specify
+ * maxresults, or specifies a value greater than 5000, the server will return up to 5000 items. Note that if the
+ * listing operation crosses a partition boundary, then the service will return a continuation token for retrieving
+ * the remainder of the results. For this reason, it is possible that the service will return fewer results than
+ * specified by maxresults, or than the default of 5000.
+ * @param include Include this parameter to specify one or more datasets to include in the response.
+ * @param timeout The timeout parameter is expressed in seconds. For more information, see <a
+ * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting
+ * Timeouts for Blob Service Operations.</a>.
+ * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the
+ * analytics logs when storage analytics logging is enabled.
+ * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws StorageErrorException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return an enumeration of blobs.
+ */
+ @Metadata(generated = true)
+ public Response listBlobFlatSegmentWithResponse(String containerName, String prefix,
+ String marker, Integer maxresults, List include, Integer timeout, String requestId,
+ RequestOptions requestOptions) {
+ return this.instrumentation.instrumentWithResponse("Container_ListBlobFlatSegment", requestOptions,
+ updatedOptions -> this.serviceClient.listBlobFlatSegmentWithResponse(containerName, prefix, marker,
+ maxresults, include, timeout, requestId, updatedOptions));
+ }
+
+ /**
+ * [Update] The List Blobs operation returns a list of the blobs under the specified container.
+ *
+ * @param containerName The container name.
+ * @param prefix Filters the results to return only containers whose name begins with the specified prefix.
+ * @param marker A string value that identifies the portion of the list of containers to be returned with the next
+ * listing operation. The operation returns the NextMarker value within the response body if the listing operation
+ * did not return all containers remaining to be listed with the current page. The NextMarker value can be used as
+ * the value for the marker parameter in a subsequent call to request the next page of list items. The marker value
+ * is opaque to the client.
+ * @param maxresults Specifies the maximum number of containers to return. If the request does not specify
+ * maxresults, or specifies a value greater than 5000, the server will return up to 5000 items. Note that if the
+ * listing operation crosses a partition boundary, then the service will return a continuation token for retrieving
+ * the remainder of the results. For this reason, it is possible that the service will return fewer results than
+ * specified by maxresults, or than the default of 5000.
+ * @param include Include this parameter to specify one or more datasets to include in the response.
+ * @param timeout The timeout parameter is expressed in seconds. For more information, see <a
+ * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting
+ * Timeouts for Blob Service Operations.</a>.
+ * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the
+ * analytics logs when storage analytics logging is enabled.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws StorageErrorException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return an enumeration of blobs.
+ */
+ @Metadata(generated = true)
+ public ListBlobsFlatSegmentResponse listBlobFlatSegment(String containerName, String prefix, String marker,
+ Integer maxresults, List include, Integer timeout, String requestId) {
+ return this.instrumentation.instrumentWithResponse("Container_ListBlobFlatSegment", null,
+ updatedOptions -> this.serviceClient.listBlobFlatSegment(containerName, prefix, marker, maxresults, include,
+ timeout, requestId));
+ }
+
+ /**
+ * [Update] The List Blobs operation returns a list of the blobs under the specified container.
+ *
+ * @param containerName The container name.
+ * @param delimiter When the request includes this parameter, the operation returns a BlobPrefix element in the
+ * response body that acts as a placeholder for all blobs whose names begin with the same substring up to the
+ * appearance of the delimiter character. The delimiter may be a single character or a string.
+ * @param prefix Filters the results to return only containers whose name begins with the specified prefix.
+ * @param marker A string value that identifies the portion of the list of containers to be returned with the next
+ * listing operation. The operation returns the NextMarker value within the response body if the listing operation
+ * did not return all containers remaining to be listed with the current page. The NextMarker value can be used as
+ * the value for the marker parameter in a subsequent call to request the next page of list items. The marker value
+ * is opaque to the client.
+ * @param maxresults Specifies the maximum number of containers to return. If the request does not specify
+ * maxresults, or specifies a value greater than 5000, the server will return up to 5000 items. Note that if the
+ * listing operation crosses a partition boundary, then the service will return a continuation token for retrieving
+ * the remainder of the results. For this reason, it is possible that the service will return fewer results than
+ * specified by maxresults, or than the default of 5000.
+ * @param include Include this parameter to specify one or more datasets to include in the response.
+ * @param timeout The timeout parameter is expressed in seconds. For more information, see <a
+ * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting
+ * Timeouts for Blob Service Operations.</a>.
+ * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the
+ * analytics logs when storage analytics logging is enabled.
+ * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws StorageErrorException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return an enumeration of blobs.
+ */
+ @Metadata(generated = true)
+ public Response listBlobHierarchySegmentWithResponse(String containerName,
+ String delimiter, String prefix, String marker, Integer maxresults, List include,
+ Integer timeout, String requestId, RequestOptions requestOptions) {
+ return this.instrumentation.instrumentWithResponse("Container_ListBlobHierarchySegment", requestOptions,
+ updatedOptions -> this.serviceClient.listBlobHierarchySegmentWithResponse(containerName, delimiter, prefix,
+ marker, maxresults, include, timeout, requestId, updatedOptions));
+ }
+
+ /**
+ * [Update] The List Blobs operation returns a list of the blobs under the specified container.
+ *
+ * @param containerName The container name.
+ * @param delimiter When the request includes this parameter, the operation returns a BlobPrefix element in the
+ * response body that acts as a placeholder for all blobs whose names begin with the same substring up to the
+ * appearance of the delimiter character. The delimiter may be a single character or a string.
+ * @param prefix Filters the results to return only containers whose name begins with the specified prefix.
+ * @param marker A string value that identifies the portion of the list of containers to be returned with the next
+ * listing operation. The operation returns the NextMarker value within the response body if the listing operation
+ * did not return all containers remaining to be listed with the current page. The NextMarker value can be used as
+ * the value for the marker parameter in a subsequent call to request the next page of list items. The marker value
+ * is opaque to the client.
+ * @param maxresults Specifies the maximum number of containers to return. If the request does not specify
+ * maxresults, or specifies a value greater than 5000, the server will return up to 5000 items. Note that if the
+ * listing operation crosses a partition boundary, then the service will return a continuation token for retrieving
+ * the remainder of the results. For this reason, it is possible that the service will return fewer results than
+ * specified by maxresults, or than the default of 5000.
+ * @param include Include this parameter to specify one or more datasets to include in the response.
+ * @param timeout The timeout parameter is expressed in seconds. For more information, see <a
+ * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting
+ * Timeouts for Blob Service Operations.</a>.
+ * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the
+ * analytics logs when storage analytics logging is enabled.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws StorageErrorException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return an enumeration of blobs.
+ */
+ @Metadata(generated = true)
+ public ListBlobsHierarchySegmentResponse listBlobHierarchySegment(String containerName, String delimiter,
+ String prefix, String marker, Integer maxresults, List include, Integer timeout,
+ String requestId) {
+ return this.instrumentation.instrumentWithResponse("Container_ListBlobHierarchySegment", null,
+ updatedOptions -> this.serviceClient.listBlobHierarchySegment(containerName, delimiter, prefix, marker,
+ maxresults, include, timeout, requestId));
+ }
+
+ /**
+ * Returns the sku name and account kind.
+ *
+ * @param containerName The container name.
+ * @param timeout The timeout parameter is expressed in seconds. For more information, see <a
+ * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting
+ * Timeouts for Blob Service Operations.</a>.
+ * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the
+ * analytics logs when storage analytics logging is enabled.
+ * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws StorageErrorException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response.
+ */
+ @Metadata(generated = true)
+ public Response getAccountInfoWithResponse(String containerName, Integer timeout, String requestId,
+ RequestOptions requestOptions) {
+ return this.instrumentation.instrumentWithResponse("Container_GetAccountInfo", requestOptions,
+ updatedOptions -> this.serviceClient.getAccountInfoWithResponse(containerName, timeout, requestId,
+ updatedOptions));
+ }
+
+ /**
+ * Returns the sku name and account kind.
+ *
+ * @param containerName The container name.
+ * @param timeout The timeout parameter is expressed in seconds. For more information, see <a
+ * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting
+ * Timeouts for Blob Service Operations.</a>.
+ * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the
+ * analytics logs when storage analytics logging is enabled.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws StorageErrorException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @Metadata(generated = true)
+ public void getAccountInfo(String containerName, Integer timeout, String requestId) {
+ this.instrumentation.instrument("Container_GetAccountInfo", null,
+ updatedOptions -> this.serviceClient.getAccountInfo(containerName, timeout, requestId));
+ }
+}
diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/PageBlobClient.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/PageBlobClient.java
new file mode 100644
index 000000000000..3937801da120
--- /dev/null
+++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/PageBlobClient.java
@@ -0,0 +1,930 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.v2.storage.blob;
+
+import com.azure.v2.storage.blob.implementation.PageBlobsImpl;
+import com.azure.v2.storage.blob.models.BlobHttpHeaders;
+import com.azure.v2.storage.blob.models.BlobImmutabilityPolicyMode;
+import com.azure.v2.storage.blob.models.CpkInfo;
+import com.azure.v2.storage.blob.models.EncryptionScope;
+import com.azure.v2.storage.blob.models.PageList;
+import com.azure.v2.storage.blob.models.PremiumPageBlobAccessTier;
+import com.azure.v2.storage.blob.models.SequenceNumberActionType;
+import com.azure.v2.storage.blob.models.StorageErrorException;
+import io.clientcore.core.annotations.Metadata;
+import io.clientcore.core.annotations.ServiceClient;
+import io.clientcore.core.http.models.RequestOptions;
+import io.clientcore.core.http.models.Response;
+import io.clientcore.core.instrumentation.Instrumentation;
+import io.clientcore.core.models.binarydata.BinaryData;
+import java.time.OffsetDateTime;
+import java.util.Map;
+
+/**
+ * Initializes a new instance of the synchronous AzureBlobStorage type.
+ */
+@ServiceClient(builder = AzureBlobStorageBuilder.class)
+public final class PageBlobClient {
+ @Metadata(generated = true)
+ private final PageBlobsImpl serviceClient;
+
+ private final Instrumentation instrumentation;
+
+ /**
+ * Initializes an instance of PageBlobClient class.
+ *
+ * @param serviceClient the service client implementation.
+ * @param instrumentation the instrumentation instance.
+ */
+ @Metadata(generated = true)
+ PageBlobClient(PageBlobsImpl serviceClient, Instrumentation instrumentation) {
+ this.serviceClient = serviceClient;
+ this.instrumentation = instrumentation;
+ }
+
+ /**
+ * The Create operation creates a new page blob.
+ *
+ * @param containerName The container name.
+ * @param blob The blob name.
+ * @param contentLength The length of the request.
+ * @param blobContentLength This header specifies the maximum size for the page blob, up to 1 TB. The page blob size
+ * must be aligned to a 512-byte boundary.
+ * @param timeout The timeout parameter is expressed in seconds. For more information, see <a
+ * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting
+ * Timeouts for Blob Service Operations.</a>.
+ * @param tier Optional. Indicates the tier to be set on the page blob.
+ * @param metadata Optional. Specifies a user-defined name-value pair associated with the blob. If no name-value
+ * pairs are specified, the operation will copy the metadata from the source blob or file to the destination blob.
+ * If one or more name-value pairs are specified, the destination blob is created with the specified metadata, and
+ * metadata is not copied from the source blob or file. Note that beginning with version 2009-09-19, metadata names
+ * must adhere to the naming rules for C# identifiers. See Naming and Referencing Containers, Blobs, and Metadata
+ * for more information.
+ * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID.
+ * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the
+ * specified date/time.
+ * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since
+ * the specified date/time.
+ * @param ifMatch Specify an ETag value to operate only on blobs with a matching value.
+ * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value.
+ * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value.
+ * @param blobSequenceNumber Set for page blobs only. The sequence number is a user-controlled value that you can
+ * use to track requests. The value of the sequence number must be between 0 and 2^63 - 1.
+ * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the
+ * analytics logs when storage analytics logging is enabled.
+ * @param blobTagsString Optional. Used to set blob tags in various blob operations.
+ * @param immutabilityPolicyExpiry Specifies the date time when the blobs immutability policy is set to expire.
+ * @param immutabilityPolicyMode Specifies the immutability policy mode to set on the blob.
+ * @param legalHold Specified if a legal hold should be set on the blob.
+ * @param blobHttpHeaders Parameter group.
+ * @param cpkInfo Parameter group.
+ * @param encryptionScopeParam Parameter group.
+ * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws StorageErrorException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response.
+ */
+ @Metadata(generated = true)
+ public Response createWithResponse(String containerName, String blob, long contentLength,
+ long blobContentLength, Integer timeout, PremiumPageBlobAccessTier tier, Map metadata,
+ String leaseId, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch,
+ String ifNoneMatch, String ifTags, Long blobSequenceNumber, String requestId, String blobTagsString,
+ OffsetDateTime immutabilityPolicyExpiry, BlobImmutabilityPolicyMode immutabilityPolicyMode, Boolean legalHold,
+ BlobHttpHeaders blobHttpHeaders, CpkInfo cpkInfo, EncryptionScope encryptionScopeParam,
+ RequestOptions requestOptions) {
+ return this.instrumentation.instrumentWithResponse("PageBlob_Create", requestOptions,
+ updatedOptions -> this.serviceClient.createWithResponse(containerName, blob, contentLength,
+ blobContentLength, timeout, tier, metadata, leaseId, ifModifiedSince, ifUnmodifiedSince, ifMatch,
+ ifNoneMatch, ifTags, blobSequenceNumber, requestId, blobTagsString, immutabilityPolicyExpiry,
+ immutabilityPolicyMode, legalHold, blobHttpHeaders, cpkInfo, encryptionScopeParam, updatedOptions));
+ }
+
+ /**
+ * The Create operation creates a new page blob.
+ *
+ * @param containerName The container name.
+ * @param blob The blob name.
+ * @param contentLength The length of the request.
+ * @param blobContentLength This header specifies the maximum size for the page blob, up to 1 TB. The page blob size
+ * must be aligned to a 512-byte boundary.
+ * @param timeout The timeout parameter is expressed in seconds. For more information, see <a
+ * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting
+ * Timeouts for Blob Service Operations.</a>.
+ * @param tier Optional. Indicates the tier to be set on the page blob.
+ * @param metadata Optional. Specifies a user-defined name-value pair associated with the blob. If no name-value
+ * pairs are specified, the operation will copy the metadata from the source blob or file to the destination blob.
+ * If one or more name-value pairs are specified, the destination blob is created with the specified metadata, and
+ * metadata is not copied from the source blob or file. Note that beginning with version 2009-09-19, metadata names
+ * must adhere to the naming rules for C# identifiers. See Naming and Referencing Containers, Blobs, and Metadata
+ * for more information.
+ * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID.
+ * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the
+ * specified date/time.
+ * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since
+ * the specified date/time.
+ * @param ifMatch Specify an ETag value to operate only on blobs with a matching value.
+ * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value.
+ * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value.
+ * @param blobSequenceNumber Set for page blobs only. The sequence number is a user-controlled value that you can
+ * use to track requests. The value of the sequence number must be between 0 and 2^63 - 1.
+ * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the
+ * analytics logs when storage analytics logging is enabled.
+ * @param blobTagsString Optional. Used to set blob tags in various blob operations.
+ * @param immutabilityPolicyExpiry Specifies the date time when the blobs immutability policy is set to expire.
+ * @param immutabilityPolicyMode Specifies the immutability policy mode to set on the blob.
+ * @param legalHold Specified if a legal hold should be set on the blob.
+ * @param blobHttpHeaders Parameter group.
+ * @param cpkInfo Parameter group.
+ * @param encryptionScopeParam Parameter group.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws StorageErrorException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @Metadata(generated = true)
+ public void create(String containerName, String blob, long contentLength, long blobContentLength, Integer timeout,
+ PremiumPageBlobAccessTier tier, Map metadata, String leaseId, OffsetDateTime ifModifiedSince,
+ OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, String ifTags, Long blobSequenceNumber,
+ String requestId, String blobTagsString, OffsetDateTime immutabilityPolicyExpiry,
+ BlobImmutabilityPolicyMode immutabilityPolicyMode, Boolean legalHold, BlobHttpHeaders blobHttpHeaders,
+ CpkInfo cpkInfo, EncryptionScope encryptionScopeParam) {
+ this.instrumentation.instrument("PageBlob_Create", null,
+ updatedOptions -> this.serviceClient.create(containerName, blob, contentLength, blobContentLength, timeout,
+ tier, metadata, leaseId, ifModifiedSince, ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags,
+ blobSequenceNumber, requestId, blobTagsString, immutabilityPolicyExpiry, immutabilityPolicyMode,
+ legalHold, blobHttpHeaders, cpkInfo, encryptionScopeParam));
+ }
+
+ /**
+ * The Upload Pages operation writes a range of pages to a page blob.
+ *
+ * @param containerName The container name.
+ * @param blob The blob name.
+ * @param contentLength The length of the request.
+ * @param body Initial data.
+ * @param transactionalContentMD5 Specify the transactional md5 for the body, to be validated by the service.
+ * @param transactionalContentCrc64 Specify the transactional crc64 for the body, to be validated by the service.
+ * @param timeout The timeout parameter is expressed in seconds. For more information, see <a
+ * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting
+ * Timeouts for Blob Service Operations.</a>.
+ * @param range Return only the bytes of the blob in the specified range.
+ * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID.
+ * @param ifSequenceNumberLessThanOrEqualTo Specify this header value to operate only on a blob if it has a sequence
+ * number less than or equal to the specified.
+ * @param ifSequenceNumberLessThan Specify this header value to operate only on a blob if it has a sequence number
+ * less than the specified.
+ * @param ifSequenceNumberEqualTo Specify this header value to operate only on a blob if it has the specified
+ * sequence number.
+ * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the
+ * specified date/time.
+ * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since
+ * the specified date/time.
+ * @param ifMatch Specify an ETag value to operate only on blobs with a matching value.
+ * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value.
+ * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value.
+ * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the
+ * analytics logs when storage analytics logging is enabled.
+ * @param structuredBodyType Required if the request body is a structured message. Specifies the message schema
+ * version and properties.
+ * @param structuredContentLength Required if the request body is a structured message. Specifies the length of the
+ * blob/file content inside the message body. Will always be smaller than Content-Length.
+ * @param cpkInfo Parameter group.
+ * @param encryptionScopeParam Parameter group.
+ * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws StorageErrorException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response.
+ */
+ @Metadata(generated = true)
+ public Response uploadPagesWithResponse(String containerName, String blob, long contentLength,
+ BinaryData body, byte[] transactionalContentMD5, byte[] transactionalContentCrc64, Integer timeout,
+ String range, String leaseId, Long ifSequenceNumberLessThanOrEqualTo, Long ifSequenceNumberLessThan,
+ Long ifSequenceNumberEqualTo, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch,
+ String ifNoneMatch, String ifTags, String requestId, String structuredBodyType, Long structuredContentLength,
+ CpkInfo cpkInfo, EncryptionScope encryptionScopeParam, RequestOptions requestOptions) {
+ return this.instrumentation.instrumentWithResponse("PageBlob_UploadPages", requestOptions,
+ updatedOptions -> this.serviceClient.uploadPagesWithResponse(containerName, blob, contentLength, body,
+ transactionalContentMD5, transactionalContentCrc64, timeout, range, leaseId,
+ ifSequenceNumberLessThanOrEqualTo, ifSequenceNumberLessThan, ifSequenceNumberEqualTo, ifModifiedSince,
+ ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, requestId, structuredBodyType, structuredContentLength,
+ cpkInfo, encryptionScopeParam, updatedOptions));
+ }
+
+ /**
+ * The Upload Pages operation writes a range of pages to a page blob.
+ *
+ * @param containerName The container name.
+ * @param blob The blob name.
+ * @param contentLength The length of the request.
+ * @param body Initial data.
+ * @param transactionalContentMD5 Specify the transactional md5 for the body, to be validated by the service.
+ * @param transactionalContentCrc64 Specify the transactional crc64 for the body, to be validated by the service.
+ * @param timeout The timeout parameter is expressed in seconds. For more information, see <a
+ * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting
+ * Timeouts for Blob Service Operations.</a>.
+ * @param range Return only the bytes of the blob in the specified range.
+ * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID.
+ * @param ifSequenceNumberLessThanOrEqualTo Specify this header value to operate only on a blob if it has a sequence
+ * number less than or equal to the specified.
+ * @param ifSequenceNumberLessThan Specify this header value to operate only on a blob if it has a sequence number
+ * less than the specified.
+ * @param ifSequenceNumberEqualTo Specify this header value to operate only on a blob if it has the specified
+ * sequence number.
+ * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the
+ * specified date/time.
+ * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since
+ * the specified date/time.
+ * @param ifMatch Specify an ETag value to operate only on blobs with a matching value.
+ * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value.
+ * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value.
+ * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the
+ * analytics logs when storage analytics logging is enabled.
+ * @param structuredBodyType Required if the request body is a structured message. Specifies the message schema
+ * version and properties.
+ * @param structuredContentLength Required if the request body is a structured message. Specifies the length of the
+ * blob/file content inside the message body. Will always be smaller than Content-Length.
+ * @param cpkInfo Parameter group.
+ * @param encryptionScopeParam Parameter group.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws StorageErrorException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @Metadata(generated = true)
+ public void uploadPages(String containerName, String blob, long contentLength, BinaryData body,
+ byte[] transactionalContentMD5, byte[] transactionalContentCrc64, Integer timeout, String range, String leaseId,
+ Long ifSequenceNumberLessThanOrEqualTo, Long ifSequenceNumberLessThan, Long ifSequenceNumberEqualTo,
+ OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch,
+ String ifTags, String requestId, String structuredBodyType, Long structuredContentLength, CpkInfo cpkInfo,
+ EncryptionScope encryptionScopeParam) {
+ this.instrumentation.instrument("PageBlob_UploadPages", null,
+ updatedOptions -> this.serviceClient.uploadPages(containerName, blob, contentLength, body,
+ transactionalContentMD5, transactionalContentCrc64, timeout, range, leaseId,
+ ifSequenceNumberLessThanOrEqualTo, ifSequenceNumberLessThan, ifSequenceNumberEqualTo, ifModifiedSince,
+ ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, requestId, structuredBodyType, structuredContentLength,
+ cpkInfo, encryptionScopeParam));
+ }
+
+ /**
+ * The Clear Pages operation clears a set of pages from a page blob.
+ *
+ * @param containerName The container name.
+ * @param blob The blob name.
+ * @param contentLength The length of the request.
+ * @param timeout The timeout parameter is expressed in seconds. For more information, see <a
+ * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting
+ * Timeouts for Blob Service Operations.</a>.
+ * @param range Return only the bytes of the blob in the specified range.
+ * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID.
+ * @param ifSequenceNumberLessThanOrEqualTo Specify this header value to operate only on a blob if it has a sequence
+ * number less than or equal to the specified.
+ * @param ifSequenceNumberLessThan Specify this header value to operate only on a blob if it has a sequence number
+ * less than the specified.
+ * @param ifSequenceNumberEqualTo Specify this header value to operate only on a blob if it has the specified
+ * sequence number.
+ * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the
+ * specified date/time.
+ * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since
+ * the specified date/time.
+ * @param ifMatch Specify an ETag value to operate only on blobs with a matching value.
+ * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value.
+ * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value.
+ * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the
+ * analytics logs when storage analytics logging is enabled.
+ * @param cpkInfo Parameter group.
+ * @param encryptionScopeParam Parameter group.
+ * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws StorageErrorException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response.
+ */
+ @Metadata(generated = true)
+ public Response clearPagesWithResponse(String containerName, String blob, long contentLength, Integer timeout,
+ String range, String leaseId, Long ifSequenceNumberLessThanOrEqualTo, Long ifSequenceNumberLessThan,
+ Long ifSequenceNumberEqualTo, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch,
+ String ifNoneMatch, String ifTags, String requestId, CpkInfo cpkInfo, EncryptionScope encryptionScopeParam,
+ RequestOptions requestOptions) {
+ return this.instrumentation.instrumentWithResponse("PageBlob_ClearPages", requestOptions,
+ updatedOptions -> this.serviceClient.clearPagesWithResponse(containerName, blob, contentLength, timeout,
+ range, leaseId, ifSequenceNumberLessThanOrEqualTo, ifSequenceNumberLessThan, ifSequenceNumberEqualTo,
+ ifModifiedSince, ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, requestId, cpkInfo,
+ encryptionScopeParam, updatedOptions));
+ }
+
+ /**
+ * The Clear Pages operation clears a set of pages from a page blob.
+ *
+ * @param containerName The container name.
+ * @param blob The blob name.
+ * @param contentLength The length of the request.
+ * @param timeout The timeout parameter is expressed in seconds. For more information, see <a
+ * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting
+ * Timeouts for Blob Service Operations.</a>.
+ * @param range Return only the bytes of the blob in the specified range.
+ * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID.
+ * @param ifSequenceNumberLessThanOrEqualTo Specify this header value to operate only on a blob if it has a sequence
+ * number less than or equal to the specified.
+ * @param ifSequenceNumberLessThan Specify this header value to operate only on a blob if it has a sequence number
+ * less than the specified.
+ * @param ifSequenceNumberEqualTo Specify this header value to operate only on a blob if it has the specified
+ * sequence number.
+ * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the
+ * specified date/time.
+ * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since
+ * the specified date/time.
+ * @param ifMatch Specify an ETag value to operate only on blobs with a matching value.
+ * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value.
+ * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value.
+ * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the
+ * analytics logs when storage analytics logging is enabled.
+ * @param cpkInfo Parameter group.
+ * @param encryptionScopeParam Parameter group.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws StorageErrorException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @Metadata(generated = true)
+ public void clearPages(String containerName, String blob, long contentLength, Integer timeout, String range,
+ String leaseId, Long ifSequenceNumberLessThanOrEqualTo, Long ifSequenceNumberLessThan,
+ Long ifSequenceNumberEqualTo, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch,
+ String ifNoneMatch, String ifTags, String requestId, CpkInfo cpkInfo, EncryptionScope encryptionScopeParam) {
+ this.instrumentation.instrument("PageBlob_ClearPages", null,
+ updatedOptions -> this.serviceClient.clearPages(containerName, blob, contentLength, timeout, range, leaseId,
+ ifSequenceNumberLessThanOrEqualTo, ifSequenceNumberLessThan, ifSequenceNumberEqualTo, ifModifiedSince,
+ ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, requestId, cpkInfo, encryptionScopeParam));
+ }
+
+ /**
+ * The Upload Pages operation writes a range of pages to a page blob where the contents are read from a URL.
+ *
+ * @param containerName The container name.
+ * @param blob The blob name.
+ * @param sourceUrl Specify a URL to the copy source.
+ * @param sourceRange Bytes of source data in the specified range. The length of this range should match the
+ * ContentLength header and x-ms-range/Range destination range header.
+ * @param contentLength The length of the request.
+ * @param range The range of bytes to which the source range would be written. The range should be 512 aligned and
+ * range-end is required.
+ * @param sourceContentMD5 Specify the md5 calculated for the range of bytes that must be read from the copy source.
+ * @param sourceContentcrc64 Specify the crc64 calculated for the range of bytes that must be read from the copy
+ * source.
+ * @param timeout The timeout parameter is expressed in seconds. For more information, see <a
+ * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting
+ * Timeouts for Blob Service Operations.</a>.
+ * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID.
+ * @param ifSequenceNumberLessThanOrEqualTo Specify this header value to operate only on a blob if it has a sequence
+ * number less than or equal to the specified.
+ * @param ifSequenceNumberLessThan Specify this header value to operate only on a blob if it has a sequence number
+ * less than the specified.
+ * @param ifSequenceNumberEqualTo Specify this header value to operate only on a blob if it has the specified
+ * sequence number.
+ * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the
+ * specified date/time.
+ * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since
+ * the specified date/time.
+ * @param ifMatch Specify an ETag value to operate only on blobs with a matching value.
+ * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value.
+ * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value.
+ * @param sourceIfModifiedSince Specify this header value to operate only on a blob if it has been modified since
+ * the specified date/time.
+ * @param sourceIfUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified
+ * since the specified date/time.
+ * @param sourceIfMatch Specify an ETag value to operate only on blobs with a matching value.
+ * @param sourceIfNoneMatch Specify an ETag value to operate only on blobs without a matching value.
+ * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the
+ * analytics logs when storage analytics logging is enabled.
+ * @param copySourceAuthorization Only Bearer type is supported. Credentials should be a valid OAuth access token to
+ * copy source.
+ * @param cpkInfo Parameter group.
+ * @param encryptionScopeParam Parameter group.
+ * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws StorageErrorException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response.
+ */
+ @Metadata(generated = true)
+ public Response uploadPagesFromURLWithResponse(String containerName, String blob, String sourceUrl,
+ String sourceRange, long contentLength, String range, byte[] sourceContentMD5, byte[] sourceContentcrc64,
+ Integer timeout, String leaseId, Long ifSequenceNumberLessThanOrEqualTo, Long ifSequenceNumberLessThan,
+ Long ifSequenceNumberEqualTo, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch,
+ String ifNoneMatch, String ifTags, OffsetDateTime sourceIfModifiedSince, OffsetDateTime sourceIfUnmodifiedSince,
+ String sourceIfMatch, String sourceIfNoneMatch, String requestId, String copySourceAuthorization,
+ CpkInfo cpkInfo, EncryptionScope encryptionScopeParam, RequestOptions requestOptions) {
+ return this.instrumentation.instrumentWithResponse("PageBlob_UploadPagesFromURL", requestOptions,
+ updatedOptions -> this.serviceClient.uploadPagesFromURLWithResponse(containerName, blob, sourceUrl,
+ sourceRange, contentLength, range, sourceContentMD5, sourceContentcrc64, timeout, leaseId,
+ ifSequenceNumberLessThanOrEqualTo, ifSequenceNumberLessThan, ifSequenceNumberEqualTo, ifModifiedSince,
+ ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, sourceIfModifiedSince, sourceIfUnmodifiedSince,
+ sourceIfMatch, sourceIfNoneMatch, requestId, copySourceAuthorization, cpkInfo, encryptionScopeParam,
+ updatedOptions));
+ }
+
+ /**
+ * The Upload Pages operation writes a range of pages to a page blob where the contents are read from a URL.
+ *
+ * @param containerName The container name.
+ * @param blob The blob name.
+ * @param sourceUrl Specify a URL to the copy source.
+ * @param sourceRange Bytes of source data in the specified range. The length of this range should match the
+ * ContentLength header and x-ms-range/Range destination range header.
+ * @param contentLength The length of the request.
+ * @param range The range of bytes to which the source range would be written. The range should be 512 aligned and
+ * range-end is required.
+ * @param sourceContentMD5 Specify the md5 calculated for the range of bytes that must be read from the copy source.
+ * @param sourceContentcrc64 Specify the crc64 calculated for the range of bytes that must be read from the copy
+ * source.
+ * @param timeout The timeout parameter is expressed in seconds. For more information, see <a
+ * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting
+ * Timeouts for Blob Service Operations.</a>.
+ * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID.
+ * @param ifSequenceNumberLessThanOrEqualTo Specify this header value to operate only on a blob if it has a sequence
+ * number less than or equal to the specified.
+ * @param ifSequenceNumberLessThan Specify this header value to operate only on a blob if it has a sequence number
+ * less than the specified.
+ * @param ifSequenceNumberEqualTo Specify this header value to operate only on a blob if it has the specified
+ * sequence number.
+ * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the
+ * specified date/time.
+ * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since
+ * the specified date/time.
+ * @param ifMatch Specify an ETag value to operate only on blobs with a matching value.
+ * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value.
+ * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value.
+ * @param sourceIfModifiedSince Specify this header value to operate only on a blob if it has been modified since
+ * the specified date/time.
+ * @param sourceIfUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified
+ * since the specified date/time.
+ * @param sourceIfMatch Specify an ETag value to operate only on blobs with a matching value.
+ * @param sourceIfNoneMatch Specify an ETag value to operate only on blobs without a matching value.
+ * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the
+ * analytics logs when storage analytics logging is enabled.
+ * @param copySourceAuthorization Only Bearer type is supported. Credentials should be a valid OAuth access token to
+ * copy source.
+ * @param cpkInfo Parameter group.
+ * @param encryptionScopeParam Parameter group.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws StorageErrorException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @Metadata(generated = true)
+ public void uploadPagesFromURL(String containerName, String blob, String sourceUrl, String sourceRange,
+ long contentLength, String range, byte[] sourceContentMD5, byte[] sourceContentcrc64, Integer timeout,
+ String leaseId, Long ifSequenceNumberLessThanOrEqualTo, Long ifSequenceNumberLessThan,
+ Long ifSequenceNumberEqualTo, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch,
+ String ifNoneMatch, String ifTags, OffsetDateTime sourceIfModifiedSince, OffsetDateTime sourceIfUnmodifiedSince,
+ String sourceIfMatch, String sourceIfNoneMatch, String requestId, String copySourceAuthorization,
+ CpkInfo cpkInfo, EncryptionScope encryptionScopeParam) {
+ this.instrumentation.instrument("PageBlob_UploadPagesFromURL", null,
+ updatedOptions -> this.serviceClient.uploadPagesFromURL(containerName, blob, sourceUrl, sourceRange,
+ contentLength, range, sourceContentMD5, sourceContentcrc64, timeout, leaseId,
+ ifSequenceNumberLessThanOrEqualTo, ifSequenceNumberLessThan, ifSequenceNumberEqualTo, ifModifiedSince,
+ ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, sourceIfModifiedSince, sourceIfUnmodifiedSince,
+ sourceIfMatch, sourceIfNoneMatch, requestId, copySourceAuthorization, cpkInfo, encryptionScopeParam));
+ }
+
+ /**
+ * The Get Page Ranges operation returns the list of valid page ranges for a page blob, version or snapshot of a
+ * page blob.
+ *
+ * @param containerName The container name.
+ * @param blob The blob name.
+ * @param snapshot The snapshot parameter is an opaque DateTime value that, when present, specifies the blob
+ * snapshot to retrieve. For more information on working with blob snapshots, see <a
+ * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/creating-a-snapshot-of-a-blob">Creating
+ * a Snapshot of a Blob.</a>.
+ * @param timeout The timeout parameter is expressed in seconds. For more information, see <a
+ * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting
+ * Timeouts for Blob Service Operations.</a>.
+ * @param range Return only the bytes of the blob in the specified range.
+ * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID.
+ * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the
+ * specified date/time.
+ * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since
+ * the specified date/time.
+ * @param ifMatch Specify an ETag value to operate only on blobs with a matching value.
+ * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value.
+ * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value.
+ * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the
+ * analytics logs when storage analytics logging is enabled.
+ * @param marker A string value that identifies the portion of the list of containers to be returned with the next
+ * listing operation. The operation returns the NextMarker value within the response body if the listing operation
+ * did not return all containers remaining to be listed with the current page. The NextMarker value can be used as
+ * the value for the marker parameter in a subsequent call to request the next page of list items. The marker value
+ * is opaque to the client.
+ * @param maxresults Specifies the maximum number of containers to return. If the request does not specify
+ * maxresults, or specifies a value greater than 5000, the server will return up to 5000 items. Note that if the
+ * listing operation crosses a partition boundary, then the service will return a continuation token for retrieving
+ * the remainder of the results. For this reason, it is possible that the service will return fewer results than
+ * specified by maxresults, or than the default of 5000.
+ * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws StorageErrorException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the list of pages.
+ */
+ @Metadata(generated = true)
+ public Response getPageRangesWithResponse(String containerName, String blob, String snapshot,
+ Integer timeout, String range, String leaseId, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince,
+ String ifMatch, String ifNoneMatch, String ifTags, String requestId, String marker, Integer maxresults,
+ RequestOptions requestOptions) {
+ return this.instrumentation.instrumentWithResponse("PageBlob_GetPageRanges", requestOptions,
+ updatedOptions -> this.serviceClient.getPageRangesWithResponse(containerName, blob, snapshot, timeout,
+ range, leaseId, ifModifiedSince, ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, requestId, marker,
+ maxresults, updatedOptions));
+ }
+
+ /**
+ * The Get Page Ranges operation returns the list of valid page ranges for a page blob, version or snapshot of a
+ * page blob.
+ *
+ * @param containerName The container name.
+ * @param blob The blob name.
+ * @param snapshot The snapshot parameter is an opaque DateTime value that, when present, specifies the blob
+ * snapshot to retrieve. For more information on working with blob snapshots, see <a
+ * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/creating-a-snapshot-of-a-blob">Creating
+ * a Snapshot of a Blob.</a>.
+ * @param timeout The timeout parameter is expressed in seconds. For more information, see <a
+ * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting
+ * Timeouts for Blob Service Operations.</a>.
+ * @param range Return only the bytes of the blob in the specified range.
+ * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID.
+ * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the
+ * specified date/time.
+ * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since
+ * the specified date/time.
+ * @param ifMatch Specify an ETag value to operate only on blobs with a matching value.
+ * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value.
+ * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value.
+ * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the
+ * analytics logs when storage analytics logging is enabled.
+ * @param marker A string value that identifies the portion of the list of containers to be returned with the next
+ * listing operation. The operation returns the NextMarker value within the response body if the listing operation
+ * did not return all containers remaining to be listed with the current page. The NextMarker value can be used as
+ * the value for the marker parameter in a subsequent call to request the next page of list items. The marker value
+ * is opaque to the client.
+ * @param maxresults Specifies the maximum number of containers to return. If the request does not specify
+ * maxresults, or specifies a value greater than 5000, the server will return up to 5000 items. Note that if the
+ * listing operation crosses a partition boundary, then the service will return a continuation token for retrieving
+ * the remainder of the results. For this reason, it is possible that the service will return fewer results than
+ * specified by maxresults, or than the default of 5000.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws StorageErrorException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the list of pages.
+ */
+ @Metadata(generated = true)
+ public PageList getPageRanges(String containerName, String blob, String snapshot, Integer timeout, String range,
+ String leaseId, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch,
+ String ifNoneMatch, String ifTags, String requestId, String marker, Integer maxresults) {
+ return this.instrumentation.instrumentWithResponse("PageBlob_GetPageRanges", null,
+ updatedOptions -> this.serviceClient.getPageRanges(containerName, blob, snapshot, timeout, range, leaseId,
+ ifModifiedSince, ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, requestId, marker, maxresults));
+ }
+
+ /**
+ * [Update] The Get Page Ranges Diff operation returns the list of valid page ranges for a page blob that were
+ * changed between target blob and previous snapshot or version.
+ *
+ * @param containerName The container name.
+ * @param blob The blob name.
+ * @param snapshot The snapshot parameter is an opaque DateTime value that, when present, specifies the blob
+ * snapshot to retrieve. For more information on working with blob snapshots, see <a
+ * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/creating-a-snapshot-of-a-blob">Creating
+ * a Snapshot of a Blob.</a>.
+ * @param timeout The timeout parameter is expressed in seconds. For more information, see <a
+ * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting
+ * Timeouts for Blob Service Operations.</a>.
+ * @param prevsnapshot Optional in version 2015-07-08 and newer. The prevsnapshot parameter is a DateTime value that
+ * specifies that the response will contain only pages that were changed between target blob and previous snapshot.
+ * Changed pages include both updated and cleared pages. The target blob may be a snapshot, as long as the snapshot
+ * specified by prevsnapshot is the older of the two. Note that incremental snapshots are currently supported only
+ * for blobs created on or after January 1, 2016.
+ * @param prevSnapshotUrl Optional. This header is only supported in service versions 2019-04-19 and after and
+ * specifies the URL of a previous snapshot of the target blob. The response will only contain pages that were
+ * changed between the target blob and its previous snapshot.
+ * @param range Return only the bytes of the blob in the specified range.
+ * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID.
+ * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the
+ * specified date/time.
+ * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since
+ * the specified date/time.
+ * @param ifMatch Specify an ETag value to operate only on blobs with a matching value.
+ * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value.
+ * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value.
+ * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the
+ * analytics logs when storage analytics logging is enabled.
+ * @param marker A string value that identifies the portion of the list of containers to be returned with the next
+ * listing operation. The operation returns the NextMarker value within the response body if the listing operation
+ * did not return all containers remaining to be listed with the current page. The NextMarker value can be used as
+ * the value for the marker parameter in a subsequent call to request the next page of list items. The marker value
+ * is opaque to the client.
+ * @param maxresults Specifies the maximum number of containers to return. If the request does not specify
+ * maxresults, or specifies a value greater than 5000, the server will return up to 5000 items. Note that if the
+ * listing operation crosses a partition boundary, then the service will return a continuation token for retrieving
+ * the remainder of the results. For this reason, it is possible that the service will return fewer results than
+ * specified by maxresults, or than the default of 5000.
+ * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws StorageErrorException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the list of pages.
+ */
+ @Metadata(generated = true)
+ public Response getPageRangesDiffWithResponse(String containerName, String blob, String snapshot,
+ Integer timeout, String prevsnapshot, String prevSnapshotUrl, String range, String leaseId,
+ OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch,
+ String ifTags, String requestId, String marker, Integer maxresults, RequestOptions requestOptions) {
+ return this.instrumentation.instrumentWithResponse("PageBlob_GetPageRangesDiff", requestOptions,
+ updatedOptions -> this.serviceClient.getPageRangesDiffWithResponse(containerName, blob, snapshot, timeout,
+ prevsnapshot, prevSnapshotUrl, range, leaseId, ifModifiedSince, ifUnmodifiedSince, ifMatch, ifNoneMatch,
+ ifTags, requestId, marker, maxresults, updatedOptions));
+ }
+
+ /**
+ * [Update] The Get Page Ranges Diff operation returns the list of valid page ranges for a page blob that were
+ * changed between target blob and previous snapshot or version.
+ *
+ * @param containerName The container name.
+ * @param blob The blob name.
+ * @param snapshot The snapshot parameter is an opaque DateTime value that, when present, specifies the blob
+ * snapshot to retrieve. For more information on working with blob snapshots, see <a
+ * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/creating-a-snapshot-of-a-blob">Creating
+ * a Snapshot of a Blob.</a>.
+ * @param timeout The timeout parameter is expressed in seconds. For more information, see <a
+ * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting
+ * Timeouts for Blob Service Operations.</a>.
+ * @param prevsnapshot Optional in version 2015-07-08 and newer. The prevsnapshot parameter is a DateTime value that
+ * specifies that the response will contain only pages that were changed between target blob and previous snapshot.
+ * Changed pages include both updated and cleared pages. The target blob may be a snapshot, as long as the snapshot
+ * specified by prevsnapshot is the older of the two. Note that incremental snapshots are currently supported only
+ * for blobs created on or after January 1, 2016.
+ * @param prevSnapshotUrl Optional. This header is only supported in service versions 2019-04-19 and after and
+ * specifies the URL of a previous snapshot of the target blob. The response will only contain pages that were
+ * changed between the target blob and its previous snapshot.
+ * @param range Return only the bytes of the blob in the specified range.
+ * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID.
+ * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the
+ * specified date/time.
+ * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since
+ * the specified date/time.
+ * @param ifMatch Specify an ETag value to operate only on blobs with a matching value.
+ * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value.
+ * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value.
+ * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the
+ * analytics logs when storage analytics logging is enabled.
+ * @param marker A string value that identifies the portion of the list of containers to be returned with the next
+ * listing operation. The operation returns the NextMarker value within the response body if the listing operation
+ * did not return all containers remaining to be listed with the current page. The NextMarker value can be used as
+ * the value for the marker parameter in a subsequent call to request the next page of list items. The marker value
+ * is opaque to the client.
+ * @param maxresults Specifies the maximum number of containers to return. If the request does not specify
+ * maxresults, or specifies a value greater than 5000, the server will return up to 5000 items. Note that if the
+ * listing operation crosses a partition boundary, then the service will return a continuation token for retrieving
+ * the remainder of the results. For this reason, it is possible that the service will return fewer results than
+ * specified by maxresults, or than the default of 5000.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws StorageErrorException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the list of pages.
+ */
+ @Metadata(generated = true)
+ public PageList getPageRangesDiff(String containerName, String blob, String snapshot, Integer timeout,
+ String prevsnapshot, String prevSnapshotUrl, String range, String leaseId, OffsetDateTime ifModifiedSince,
+ OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, String ifTags, String requestId,
+ String marker, Integer maxresults) {
+ return this.instrumentation.instrumentWithResponse("PageBlob_GetPageRangesDiff", null,
+ updatedOptions -> this.serviceClient.getPageRangesDiff(containerName, blob, snapshot, timeout, prevsnapshot,
+ prevSnapshotUrl, range, leaseId, ifModifiedSince, ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags,
+ requestId, marker, maxresults));
+ }
+
+ /**
+ * Resize the Blob.
+ *
+ * @param containerName The container name.
+ * @param blob The blob name.
+ * @param blobContentLength This header specifies the maximum size for the page blob, up to 1 TB. The page blob size
+ * must be aligned to a 512-byte boundary.
+ * @param timeout The timeout parameter is expressed in seconds. For more information, see <a
+ * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting
+ * Timeouts for Blob Service Operations.</a>.
+ * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID.
+ * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the
+ * specified date/time.
+ * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since
+ * the specified date/time.
+ * @param ifMatch Specify an ETag value to operate only on blobs with a matching value.
+ * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value.
+ * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value.
+ * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the
+ * analytics logs when storage analytics logging is enabled.
+ * @param cpkInfo Parameter group.
+ * @param encryptionScopeParam Parameter group.
+ * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws StorageErrorException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response.
+ */
+ @Metadata(generated = true)
+ public Response resizeWithResponse(String containerName, String blob, long blobContentLength, Integer timeout,
+ String leaseId, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch,
+ String ifNoneMatch, String ifTags, String requestId, CpkInfo cpkInfo, EncryptionScope encryptionScopeParam,
+ RequestOptions requestOptions) {
+ return this.instrumentation.instrumentWithResponse("PageBlob_Resize", requestOptions,
+ updatedOptions -> this.serviceClient.resizeWithResponse(containerName, blob, blobContentLength, timeout,
+ leaseId, ifModifiedSince, ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, requestId, cpkInfo,
+ encryptionScopeParam, updatedOptions));
+ }
+
+ /**
+ * Resize the Blob.
+ *
+ * @param containerName The container name.
+ * @param blob The blob name.
+ * @param blobContentLength This header specifies the maximum size for the page blob, up to 1 TB. The page blob size
+ * must be aligned to a 512-byte boundary.
+ * @param timeout The timeout parameter is expressed in seconds. For more information, see <a
+ * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting
+ * Timeouts for Blob Service Operations.</a>.
+ * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID.
+ * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the
+ * specified date/time.
+ * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since
+ * the specified date/time.
+ * @param ifMatch Specify an ETag value to operate only on blobs with a matching value.
+ * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value.
+ * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value.
+ * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the
+ * analytics logs when storage analytics logging is enabled.
+ * @param cpkInfo Parameter group.
+ * @param encryptionScopeParam Parameter group.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws StorageErrorException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @Metadata(generated = true)
+ public void resize(String containerName, String blob, long blobContentLength, Integer timeout, String leaseId,
+ OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch,
+ String ifTags, String requestId, CpkInfo cpkInfo, EncryptionScope encryptionScopeParam) {
+ this.instrumentation.instrument("PageBlob_Resize", null,
+ updatedOptions -> this.serviceClient.resize(containerName, blob, blobContentLength, timeout, leaseId,
+ ifModifiedSince, ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, requestId, cpkInfo,
+ encryptionScopeParam));
+ }
+
+ /**
+ * Update the sequence number of the blob.
+ *
+ * @param containerName The container name.
+ * @param blob The blob name.
+ * @param sequenceNumberAction Required if the x-ms-blob-sequence-number header is set for the request. This
+ * property applies to page blobs only. This property indicates how the service should modify the blob's sequence
+ * number.
+ * @param timeout The timeout parameter is expressed in seconds. For more information, see <a
+ * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting
+ * Timeouts for Blob Service Operations.</a>.
+ * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID.
+ * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the
+ * specified date/time.
+ * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since
+ * the specified date/time.
+ * @param ifMatch Specify an ETag value to operate only on blobs with a matching value.
+ * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value.
+ * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value.
+ * @param blobSequenceNumber Set for page blobs only. The sequence number is a user-controlled value that you can
+ * use to track requests. The value of the sequence number must be between 0 and 2^63 - 1.
+ * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the
+ * analytics logs when storage analytics logging is enabled.
+ * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws StorageErrorException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response.
+ */
+ @Metadata(generated = true)
+ public Response updateSequenceNumberWithResponse(String containerName, String blob,
+ SequenceNumberActionType sequenceNumberAction, Integer timeout, String leaseId, OffsetDateTime ifModifiedSince,
+ OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, String ifTags, Long blobSequenceNumber,
+ String requestId, RequestOptions requestOptions) {
+ return this.instrumentation.instrumentWithResponse("PageBlob_UpdateSequenceNumber", requestOptions,
+ updatedOptions -> this.serviceClient.updateSequenceNumberWithResponse(containerName, blob,
+ sequenceNumberAction, timeout, leaseId, ifModifiedSince, ifUnmodifiedSince, ifMatch, ifNoneMatch,
+ ifTags, blobSequenceNumber, requestId, updatedOptions));
+ }
+
+ /**
+ * Update the sequence number of the blob.
+ *
+ * @param containerName The container name.
+ * @param blob The blob name.
+ * @param sequenceNumberAction Required if the x-ms-blob-sequence-number header is set for the request. This
+ * property applies to page blobs only. This property indicates how the service should modify the blob's sequence
+ * number.
+ * @param timeout The timeout parameter is expressed in seconds. For more information, see <a
+ * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting
+ * Timeouts for Blob Service Operations.</a>.
+ * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID.
+ * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the
+ * specified date/time.
+ * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since
+ * the specified date/time.
+ * @param ifMatch Specify an ETag value to operate only on blobs with a matching value.
+ * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value.
+ * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value.
+ * @param blobSequenceNumber Set for page blobs only. The sequence number is a user-controlled value that you can
+ * use to track requests. The value of the sequence number must be between 0 and 2^63 - 1.
+ * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the
+ * analytics logs when storage analytics logging is enabled.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws StorageErrorException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @Metadata(generated = true)
+ public void updateSequenceNumber(String containerName, String blob, SequenceNumberActionType sequenceNumberAction,
+ Integer timeout, String leaseId, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince,
+ String ifMatch, String ifNoneMatch, String ifTags, Long blobSequenceNumber, String requestId) {
+ this.instrumentation.instrument("PageBlob_UpdateSequenceNumber", null,
+ updatedOptions -> this.serviceClient.updateSequenceNumber(containerName, blob, sequenceNumberAction,
+ timeout, leaseId, ifModifiedSince, ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, blobSequenceNumber,
+ requestId));
+ }
+
+ /**
+ * The Copy Incremental operation copies a snapshot of the source page blob to a destination page blob. The snapshot
+ * is copied such that only the differential changes between the previously copied snapshot are transferred to the
+ * destination. The copied snapshots are complete copies of the original snapshot and can be read or copied from as
+ * usual. This API is supported since REST version 2016-05-31.
+ *
+ * @param containerName The container name.
+ * @param blob The blob name.
+ * @param copySource Specifies the name of the source page blob snapshot. This value is a URL of up to 2 KB in
+ * length that specifies a page blob snapshot. The value should be URL-encoded as it would appear in a request URI.
+ * The source blob must either be public or must be authenticated via a shared access signature.
+ * @param timeout The timeout parameter is expressed in seconds. For more information, see <a
+ * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting
+ * Timeouts for Blob Service Operations.</a>.
+ * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the
+ * specified date/time.
+ * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since
+ * the specified date/time.
+ * @param ifMatch Specify an ETag value to operate only on blobs with a matching value.
+ * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value.
+ * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value.
+ * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the
+ * analytics logs when storage analytics logging is enabled.
+ * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws StorageErrorException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response.
+ */
+ @Metadata(generated = true)
+ public Response copyIncrementalWithResponse(String containerName, String blob, String copySource,
+ Integer timeout, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch,
+ String ifNoneMatch, String ifTags, String requestId, RequestOptions requestOptions) {
+ return this.instrumentation.instrumentWithResponse("PageBlob_CopyIncremental", requestOptions,
+ updatedOptions -> this.serviceClient.copyIncrementalWithResponse(containerName, blob, copySource, timeout,
+ ifModifiedSince, ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, requestId, updatedOptions));
+ }
+
+ /**
+ * The Copy Incremental operation copies a snapshot of the source page blob to a destination page blob. The snapshot
+ * is copied such that only the differential changes between the previously copied snapshot are transferred to the
+ * destination. The copied snapshots are complete copies of the original snapshot and can be read or copied from as
+ * usual. This API is supported since REST version 2016-05-31.
+ *
+ * @param containerName The container name.
+ * @param blob The blob name.
+ * @param copySource Specifies the name of the source page blob snapshot. This value is a URL of up to 2 KB in
+ * length that specifies a page blob snapshot. The value should be URL-encoded as it would appear in a request URI.
+ * The source blob must either be public or must be authenticated via a shared access signature.
+ * @param timeout The timeout parameter is expressed in seconds. For more information, see <a
+ * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting
+ * Timeouts for Blob Service Operations.</a>.
+ * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the
+ * specified date/time.
+ * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since
+ * the specified date/time.
+ * @param ifMatch Specify an ETag value to operate only on blobs with a matching value.
+ * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value.
+ * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value.
+ * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the
+ * analytics logs when storage analytics logging is enabled.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws StorageErrorException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @Metadata(generated = true)
+ public void copyIncremental(String containerName, String blob, String copySource, Integer timeout,
+ OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch,
+ String ifTags, String requestId) {
+ this.instrumentation.instrument("PageBlob_CopyIncremental", null,
+ updatedOptions -> this.serviceClient.copyIncremental(containerName, blob, copySource, timeout,
+ ifModifiedSince, ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, requestId));
+ }
+}
diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/StorageServiceClient.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/StorageServiceClient.java
new file mode 100644
index 000000000000..522104cddff0
--- /dev/null
+++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/StorageServiceClient.java
@@ -0,0 +1,454 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.v2.storage.blob;
+
+import com.azure.v2.storage.blob.implementation.ServicesImpl;
+import com.azure.v2.storage.blob.models.BlobContainerItem;
+import com.azure.v2.storage.blob.models.BlobServiceProperties;
+import com.azure.v2.storage.blob.models.BlobServiceStatistics;
+import com.azure.v2.storage.blob.models.FilterBlobSegment;
+import com.azure.v2.storage.blob.models.FilterBlobsIncludeItem;
+import com.azure.v2.storage.blob.models.KeyInfo;
+import com.azure.v2.storage.blob.models.ListBlobContainersIncludeType;
+import com.azure.v2.storage.blob.models.StorageErrorException;
+import com.azure.v2.storage.blob.models.UserDelegationKey;
+import io.clientcore.core.annotations.Metadata;
+import io.clientcore.core.annotations.ReturnType;
+import io.clientcore.core.annotations.ServiceClient;
+import io.clientcore.core.annotations.ServiceMethod;
+import io.clientcore.core.http.paging.PagedIterable;
+import io.clientcore.core.http.models.RequestOptions;
+import io.clientcore.core.http.models.Response;
+import io.clientcore.core.instrumentation.Instrumentation;
+import io.clientcore.core.models.binarydata.BinaryData;
+import java.io.InputStream;
+import java.util.List;
+
+/**
+ * Initializes a new instance of the synchronous AzureBlobStorage type.
+ */
+@ServiceClient(builder = AzureBlobStorageBuilder.class)
+public final class StorageServiceClient {
+ @Metadata(generated = true)
+ private final ServicesImpl serviceClient;
+
+ private final Instrumentation instrumentation;
+
+ /**
+ * Initializes an instance of ServiceClient class.
+ *
+ * @param serviceClient the service client implementation.
+ * @param instrumentation the instrumentation instance.
+ */
+ @Metadata(generated = true)
+ StorageServiceClient(ServicesImpl serviceClient, Instrumentation instrumentation) {
+ this.serviceClient = serviceClient;
+ this.instrumentation = instrumentation;
+ }
+
+ /**
+ * Sets properties for a storage account's Blob service endpoint, including properties for Storage Analytics and
+ * CORS (Cross-Origin Resource Sharing) rules.
+ *
+ * @param blobServiceProperties The StorageService properties.
+ * @param timeout The timeout parameter is expressed in seconds. For more information, see <a
+ * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting
+ * Timeouts for Blob Service Operations.</a>.
+ * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the
+ * analytics logs when storage analytics logging is enabled.
+ * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws StorageErrorException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response.
+ */
+ @Metadata(generated = true)
+ public Response setPropertiesWithResponse(BlobServiceProperties blobServiceProperties, Integer timeout,
+ String requestId, RequestOptions requestOptions) {
+ return this.instrumentation.instrumentWithResponse("Service_SetProperties", requestOptions,
+ updatedOptions -> this.serviceClient.setPropertiesWithResponse(blobServiceProperties, timeout, requestId,
+ updatedOptions));
+ }
+
+ /**
+ * Sets properties for a storage account's Blob service endpoint, including properties for Storage Analytics and
+ * CORS (Cross-Origin Resource Sharing) rules.
+ *
+ * @param blobServiceProperties The StorageService properties.
+ * @param timeout The timeout parameter is expressed in seconds. For more information, see <a
+ * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting
+ * Timeouts for Blob Service Operations.</a>.
+ * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the
+ * analytics logs when storage analytics logging is enabled.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws StorageErrorException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @Metadata(generated = true)
+ public void setProperties(BlobServiceProperties blobServiceProperties, Integer timeout, String requestId) {
+ this.instrumentation.instrument("Service_SetProperties", null,
+ updatedOptions -> this.serviceClient.setProperties(blobServiceProperties, timeout, requestId));
+ }
+
+ /**
+ * gets the properties of a storage account's Blob service, including properties for Storage Analytics and CORS
+ * (Cross-Origin Resource Sharing) rules.
+ *
+ * @param timeout The timeout parameter is expressed in seconds. For more information, see <a
+ * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting
+ * Timeouts for Blob Service Operations.</a>.
+ * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the
+ * analytics logs when storage analytics logging is enabled.
+ * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws StorageErrorException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the properties of a storage account's Blob service, including properties for Storage Analytics and CORS
+ * (Cross-Origin Resource Sharing) rules.
+ */
+ @Metadata(generated = true)
+ public Response getPropertiesWithResponse(Integer timeout, String requestId,
+ RequestOptions requestOptions) {
+ return this.instrumentation.instrumentWithResponse("Service_GetProperties", requestOptions,
+ updatedOptions -> this.serviceClient.getPropertiesWithResponse(timeout, requestId, updatedOptions));
+ }
+
+ /**
+ * gets the properties of a storage account's Blob service, including properties for Storage Analytics and CORS
+ * (Cross-Origin Resource Sharing) rules.
+ *
+ * @param timeout The timeout parameter is expressed in seconds. For more information, see <a
+ * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting
+ * Timeouts for Blob Service Operations.</a>.
+ * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the
+ * analytics logs when storage analytics logging is enabled.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws StorageErrorException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the properties of a storage account's Blob service, including properties for Storage Analytics and CORS
+ * (Cross-Origin Resource Sharing) rules.
+ */
+ @Metadata(generated = true)
+ public BlobServiceProperties getProperties(Integer timeout, String requestId) {
+ return this.instrumentation.instrumentWithResponse("Service_GetProperties", null,
+ updatedOptions -> this.serviceClient.getProperties(timeout, requestId));
+ }
+
+ /**
+ * Retrieves statistics related to replication for the Blob service. It is only available on the secondary location
+ * endpoint when read-access geo-redundant replication is enabled for the storage account.
+ *
+ * @param timeout The timeout parameter is expressed in seconds. For more information, see <a
+ * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting
+ * Timeouts for Blob Service Operations.</a>.
+ * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the
+ * analytics logs when storage analytics logging is enabled.
+ * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws StorageErrorException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return stats for the storage service.
+ */
+ @Metadata(generated = true)
+ public Response getStatisticsWithResponse(Integer timeout, String requestId,
+ RequestOptions requestOptions) {
+ return this.instrumentation.instrumentWithResponse("Service_GetStatistics", requestOptions,
+ updatedOptions -> this.serviceClient.getStatisticsWithResponse(timeout, requestId, updatedOptions));
+ }
+
+ /**
+ * Retrieves statistics related to replication for the Blob service. It is only available on the secondary location
+ * endpoint when read-access geo-redundant replication is enabled for the storage account.
+ *
+ * @param timeout The timeout parameter is expressed in seconds. For more information, see <a
+ * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting
+ * Timeouts for Blob Service Operations.</a>.
+ * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the
+ * analytics logs when storage analytics logging is enabled.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws StorageErrorException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return stats for the storage service.
+ */
+ @Metadata(generated = true)
+ public BlobServiceStatistics getStatistics(Integer timeout, String requestId) {
+ return this.instrumentation.instrumentWithResponse("Service_GetStatistics", null,
+ updatedOptions -> this.serviceClient.getStatistics(timeout, requestId));
+ }
+
+ /**
+ * The List Containers Segment operation returns a list of the containers under the specified account.
+ *
+ * @param prefix Filters the results to return only containers whose name begins with the specified prefix.
+ * @param marker A string value that identifies the portion of the list of containers to be returned with the next
+ * listing operation. The operation returns the NextMarker value within the response body if the listing operation
+ * did not return all containers remaining to be listed with the current page. The NextMarker value can be used as
+ * the value for the marker parameter in a subsequent call to request the next page of list items. The marker value
+ * is opaque to the client.
+ * @param maxresults Specifies the maximum number of containers to return. If the request does not specify
+ * maxresults, or specifies a value greater than 5000, the server will return up to 5000 items. Note that if the
+ * listing operation crosses a partition boundary, then the service will return a continuation token for retrieving
+ * the remainder of the results. For this reason, it is possible that the service will return fewer results than
+ * specified by maxresults, or than the default of 5000.
+ * @param listBlobContainersIncludeType Include this parameter to specify that the container's metadata be returned
+ * as part of the response body.
+ * @param timeout The timeout parameter is expressed in seconds. For more information, see <a
+ * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting
+ * Timeouts for Blob Service Operations.</a>.
+ * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the
+ * analytics logs when storage analytics logging is enabled.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws StorageErrorException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return an enumeration of containers.
+ */
+ @Metadata(generated = true)
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable listBlobContainersSegment(String prefix, String marker, Integer maxresults,
+ List listBlobContainersIncludeType, Integer timeout, String requestId) {
+ return this.serviceClient.listBlobContainersSegment(prefix, marker, maxresults, listBlobContainersIncludeType,
+ timeout, requestId);
+ }
+
+ /**
+ * The List Containers Segment operation returns a list of the containers under the specified account.
+ *
+ * @param prefix Filters the results to return only containers whose name begins with the specified prefix.
+ * @param marker A string value that identifies the portion of the list of containers to be returned with the next
+ * listing operation. The operation returns the NextMarker value within the response body if the listing operation
+ * did not return all containers remaining to be listed with the current page. The NextMarker value can be used as
+ * the value for the marker parameter in a subsequent call to request the next page of list items. The marker value
+ * is opaque to the client.
+ * @param maxresults Specifies the maximum number of containers to return. If the request does not specify
+ * maxresults, or specifies a value greater than 5000, the server will return up to 5000 items. Note that if the
+ * listing operation crosses a partition boundary, then the service will return a continuation token for retrieving
+ * the remainder of the results. For this reason, it is possible that the service will return fewer results than
+ * specified by maxresults, or than the default of 5000.
+ * @param listBlobContainersIncludeType Include this parameter to specify that the container's metadata be returned
+ * as part of the response body.
+ * @param timeout The timeout parameter is expressed in seconds. For more information, see <a
+ * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting
+ * Timeouts for Blob Service Operations.</a>.
+ * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the
+ * analytics logs when storage analytics logging is enabled.
+ * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws StorageErrorException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return an enumeration of containers.
+ */
+ @Metadata(generated = true)
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable listBlobContainersSegment(String prefix, String marker, Integer maxresults,
+ List listBlobContainersIncludeType, Integer timeout, String requestId,
+ RequestOptions requestOptions) {
+ return this.serviceClient.listBlobContainersSegment(prefix, marker, maxresults, listBlobContainersIncludeType,
+ timeout, requestId, requestOptions);
+ }
+
+ /**
+ * Retrieves a user delegation key for the Blob service. This is only a valid operation when using bearer token
+ * authentication.
+ *
+ * @param keyInfo Key information.
+ * @param timeout The timeout parameter is expressed in seconds. For more information, see <a
+ * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting
+ * Timeouts for Blob Service Operations.</a>.
+ * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the
+ * analytics logs when storage analytics logging is enabled.
+ * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws StorageErrorException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a user delegation key.
+ */
+ @Metadata(generated = true)
+ public Response getUserDelegationKeyWithResponse(KeyInfo keyInfo, Integer timeout,
+ String requestId, RequestOptions requestOptions) {
+ return this.instrumentation.instrumentWithResponse("Service_GetUserDelegationKey", requestOptions,
+ updatedOptions -> this.serviceClient.getUserDelegationKeyWithResponse(keyInfo, timeout, requestId,
+ updatedOptions));
+ }
+
+ /**
+ * Retrieves a user delegation key for the Blob service. This is only a valid operation when using bearer token
+ * authentication.
+ *
+ * @param keyInfo Key information.
+ * @param timeout The timeout parameter is expressed in seconds. For more information, see <a
+ * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting
+ * Timeouts for Blob Service Operations.</a>.
+ * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the
+ * analytics logs when storage analytics logging is enabled.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws StorageErrorException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a user delegation key.
+ */
+ @Metadata(generated = true)
+ public UserDelegationKey getUserDelegationKey(KeyInfo keyInfo, Integer timeout, String requestId) {
+ return this.instrumentation.instrumentWithResponse("Service_GetUserDelegationKey", null,
+ updatedOptions -> this.serviceClient.getUserDelegationKey(keyInfo, timeout, requestId));
+ }
+
+ /**
+ * Returns the sku name and account kind.
+ *
+ * @param timeout The timeout parameter is expressed in seconds. For more information, see <a
+ * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting
+ * Timeouts for Blob Service Operations.</a>.
+ * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the
+ * analytics logs when storage analytics logging is enabled.
+ * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws StorageErrorException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response.
+ */
+ @Metadata(generated = true)
+ public Response getAccountInfoWithResponse(Integer timeout, String requestId, RequestOptions requestOptions) {
+ return this.instrumentation.instrumentWithResponse("Service_GetAccountInfo", requestOptions,
+ updatedOptions -> this.serviceClient.getAccountInfoWithResponse(timeout, requestId, updatedOptions));
+ }
+
+ /**
+ * Returns the sku name and account kind.
+ *
+ * @param timeout The timeout parameter is expressed in seconds. For more information, see <a
+ * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting
+ * Timeouts for Blob Service Operations.</a>.
+ * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the
+ * analytics logs when storage analytics logging is enabled.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws StorageErrorException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @Metadata(generated = true)
+ public void getAccountInfo(Integer timeout, String requestId) {
+ this.instrumentation.instrument("Service_GetAccountInfo", null,
+ updatedOptions -> this.serviceClient.getAccountInfo(timeout, requestId));
+ }
+
+ /**
+ * The Batch operation allows multiple API calls to be embedded into a single HTTP request.
+ *
+ * @param contentLength The length of the request.
+ * @param multipartContentType Required. The value of this header must be multipart/mixed with a batch boundary.
+ * Example header value: multipart/mixed; boundary=batch_<GUID>.
+ * @param body Initial data.
+ * @param timeout The timeout parameter is expressed in seconds. For more information, see <a
+ * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting
+ * Timeouts for Blob Service Operations.</a>.
+ * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the
+ * analytics logs when storage analytics logging is enabled.
+ * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws StorageErrorException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response.
+ */
+ @Metadata(generated = true)
+ public Response submitBatchWithResponse(long contentLength, String multipartContentType,
+ BinaryData body, Integer timeout, String requestId, RequestOptions requestOptions) {
+ return this.instrumentation.instrumentWithResponse("Service_SubmitBatch", requestOptions,
+ updatedOptions -> this.serviceClient.submitBatchWithResponse(contentLength, multipartContentType, body,
+ timeout, requestId, updatedOptions));
+ }
+
+ /**
+ * The Batch operation allows multiple API calls to be embedded into a single HTTP request.
+ *
+ * @param contentLength The length of the request.
+ * @param multipartContentType Required. The value of this header must be multipart/mixed with a batch boundary.
+ * Example header value: multipart/mixed; boundary=batch_<GUID>.
+ * @param body Initial data.
+ * @param timeout The timeout parameter is expressed in seconds. For more information, see <a
+ * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting
+ * Timeouts for Blob Service Operations.</a>.
+ * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the
+ * analytics logs when storage analytics logging is enabled.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws StorageErrorException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response.
+ */
+ @Metadata(generated = true)
+ public InputStream submitBatch(long contentLength, String multipartContentType, BinaryData body, Integer timeout,
+ String requestId) {
+ return this.instrumentation.instrumentWithResponse("Service_SubmitBatch", null,
+ updatedOptions -> this.serviceClient.submitBatch(contentLength, multipartContentType, body, timeout,
+ requestId));
+ }
+
+ /**
+ * The Filter Blobs operation enables callers to list blobs across all containers whose tags match a given search
+ * expression. Filter blobs searches across all containers within a storage account but can be scoped within the
+ * expression to a single container.
+ *
+ * @param timeout The timeout parameter is expressed in seconds. For more information, see <a
+ * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting
+ * Timeouts for Blob Service Operations.</a>.
+ * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the
+ * analytics logs when storage analytics logging is enabled.
+ * @param where Filters the results to return only to return only blobs whose tags match the specified expression.
+ * @param marker A string value that identifies the portion of the list of containers to be returned with the next
+ * listing operation. The operation returns the NextMarker value within the response body if the listing operation
+ * did not return all containers remaining to be listed with the current page. The NextMarker value can be used as
+ * the value for the marker parameter in a subsequent call to request the next page of list items. The marker value
+ * is opaque to the client.
+ * @param maxresults Specifies the maximum number of containers to return. If the request does not specify
+ * maxresults, or specifies a value greater than 5000, the server will return up to 5000 items. Note that if the
+ * listing operation crosses a partition boundary, then the service will return a continuation token for retrieving
+ * the remainder of the results. For this reason, it is possible that the service will return fewer results than
+ * specified by maxresults, or than the default of 5000.
+ * @param include Include this parameter to specify one or more datasets to include in the response.
+ * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws StorageErrorException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the result of a Filter Blobs API call.
+ */
+ @Metadata(generated = true)
+ public Response filterBlobsWithResponse(Integer timeout, String requestId, String where,
+ String marker, Integer maxresults, List include, RequestOptions requestOptions) {
+ return this.instrumentation.instrumentWithResponse("Service_FilterBlobs", requestOptions,
+ updatedOptions -> this.serviceClient.filterBlobsWithResponse(timeout, requestId, where, marker, maxresults,
+ include, updatedOptions));
+ }
+
+ /**
+ * The Filter Blobs operation enables callers to list blobs across all containers whose tags match a given search
+ * expression. Filter blobs searches across all containers within a storage account but can be scoped within the
+ * expression to a single container.
+ *
+ * @param timeout The timeout parameter is expressed in seconds. For more information, see <a
+ * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting
+ * Timeouts for Blob Service Operations.</a>.
+ * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the
+ * analytics logs when storage analytics logging is enabled.
+ * @param where Filters the results to return only to return only blobs whose tags match the specified expression.
+ * @param marker A string value that identifies the portion of the list of containers to be returned with the next
+ * listing operation. The operation returns the NextMarker value within the response body if the listing operation
+ * did not return all containers remaining to be listed with the current page. The NextMarker value can be used as
+ * the value for the marker parameter in a subsequent call to request the next page of list items. The marker value
+ * is opaque to the client.
+ * @param maxresults Specifies the maximum number of containers to return. If the request does not specify
+ * maxresults, or specifies a value greater than 5000, the server will return up to 5000 items. Note that if the
+ * listing operation crosses a partition boundary, then the service will return a continuation token for retrieving
+ * the remainder of the results. For this reason, it is possible that the service will return fewer results than
+ * specified by maxresults, or than the default of 5000.
+ * @param include Include this parameter to specify one or more datasets to include in the response.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws StorageErrorException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the result of a Filter Blobs API call.
+ */
+ @Metadata(generated = true)
+ public FilterBlobSegment filterBlobs(Integer timeout, String requestId, String where, String marker,
+ Integer maxresults, List include) {
+ return this.instrumentation.instrumentWithResponse("Service_FilterBlobs", null,
+ updatedOptions -> this.serviceClient.filterBlobs(timeout, requestId, where, marker, maxresults, include));
+ }
+}
diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/implementation/AppendBlobsImpl.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/implementation/AppendBlobsImpl.java
new file mode 100644
index 000000000000..51f96bc2020d
--- /dev/null
+++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/implementation/AppendBlobsImpl.java
@@ -0,0 +1,763 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.v2.storage.blob.implementation;
+
+import com.azure.v2.storage.blob.models.BlobHttpHeaders;
+import com.azure.v2.storage.blob.models.BlobImmutabilityPolicyMode;
+import com.azure.v2.storage.blob.models.CpkInfo;
+import com.azure.v2.storage.blob.models.EncryptionAlgorithmType;
+import com.azure.v2.storage.blob.models.EncryptionScope;
+import com.azure.v2.storage.blob.models.StorageError;
+import io.clientcore.core.annotations.ServiceInterface;
+import io.clientcore.core.http.RestProxy;
+import io.clientcore.core.http.annotations.BodyParam;
+import io.clientcore.core.http.annotations.HeaderParam;
+import io.clientcore.core.http.annotations.HostParam;
+import io.clientcore.core.http.annotations.HttpRequestInformation;
+import io.clientcore.core.http.annotations.PathParam;
+import io.clientcore.core.http.annotations.QueryParam;
+import io.clientcore.core.http.annotations.UnexpectedResponseExceptionDetail;
+import io.clientcore.core.http.exceptions.HttpResponseException;
+import io.clientcore.core.http.models.HttpMethod;
+import io.clientcore.core.http.models.RequestOptions;
+import io.clientcore.core.http.models.Response;
+import io.clientcore.core.http.pipeline.HttpPipeline;
+import io.clientcore.core.models.binarydata.BinaryData;
+import io.clientcore.core.serialization.ObjectSerializer;
+import io.clientcore.core.utils.Base64Util;
+import io.clientcore.core.utils.DateTimeRfc1123;
+import java.lang.reflect.InvocationTargetException;
+import java.time.OffsetDateTime;
+import java.util.Map;
+
+/**
+ * An instance of this class provides access to all the operations defined in AppendBlobs.
+ */
+public final class AppendBlobsImpl {
+ /**
+ * The proxy service used to perform REST calls.
+ */
+ private final AppendBlobsService service;
+
+ /**
+ * The service client containing this operation class.
+ */
+ private final AzureBlobStorageImpl client;
+
+ /**
+ * Initializes an instance of AppendBlobsImpl.
+ *
+ * @param client the instance of the service client containing this operation class.
+ */
+ AppendBlobsImpl(AzureBlobStorageImpl client) {
+ this.service = RestProxy.create(AppendBlobsService.class, client.getHttpPipeline());
+ this.client = client;
+ }
+
+ /**
+ * The interface defining all the services for AzureBlobStorageAppendBlobs to be used by the proxy service to
+ * perform REST calls.
+ */
+ @ServiceInterface(name = "AzureBlobStorageAppe", host = "{url}")
+ public interface AppendBlobsService {
+ static AppendBlobsService getNewInstance(HttpPipeline pipeline, ObjectSerializer serializer) {
+ try {
+ Class> clazz = Class.forName("com.azure.v2.storage.blob.implementation.AppendBlobsServiceImpl");
+ return (AppendBlobsService) clazz
+ .getMethod("getNewInstance", HttpPipeline.class, ObjectSerializer.class)
+ .invoke(null, pipeline, serializer);
+ } catch (ClassNotFoundException | NoSuchMethodException | IllegalAccessException
+ | InvocationTargetException e) {
+ throw new RuntimeException(e);
+ }
+
+ }
+
+ @HttpRequestInformation(
+ method = HttpMethod.PUT,
+ path = "/{containerName}/{blob}",
+ expectedStatusCodes = { 201 })
+ @UnexpectedResponseExceptionDetail(exceptionBodyClass = StorageError.class)
+ Response create(@HostParam("url") String url, @PathParam("containerName") String containerName,
+ @PathParam("blob") String blob, @HeaderParam("x-ms-blob-type") String blobType,
+ @QueryParam("timeout") Integer timeout, @HeaderParam("Content-Length") long contentLength,
+ @HeaderParam("x-ms-blob-content-type") String contentType,
+ @HeaderParam("x-ms-blob-content-encoding") String contentEncoding,
+ @HeaderParam("x-ms-blob-content-language") String contentLanguage,
+ @HeaderParam("x-ms-blob-content-md5") String contentMd5,
+ @HeaderParam("x-ms-blob-cache-control") String cacheControl,
+ @HeaderParam("x-ms-meta-") Map metadata, @HeaderParam("x-ms-lease-id") String leaseId,
+ @HeaderParam("x-ms-blob-content-disposition") String contentDisposition,
+ @HeaderParam("x-ms-encryption-key") String encryptionKey,
+ @HeaderParam("x-ms-encryption-key-sha256") String encryptionKeySha256,
+ @HeaderParam("x-ms-encryption-algorithm") EncryptionAlgorithmType encryptionAlgorithm,
+ @HeaderParam("x-ms-encryption-scope") String encryptionScope,
+ @HeaderParam("If-Modified-Since") DateTimeRfc1123 ifModifiedSince,
+ @HeaderParam("If-Unmodified-Since") DateTimeRfc1123 ifUnmodifiedSince,
+ @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch,
+ @HeaderParam("x-ms-if-tags") String ifTags, @HeaderParam("x-ms-version") String version,
+ @HeaderParam("x-ms-client-request-id") String requestId, @HeaderParam("x-ms-tags") String blobTagsString,
+ @HeaderParam("x-ms-immutability-policy-until-date") DateTimeRfc1123 immutabilityPolicyExpiry,
+ @HeaderParam("x-ms-immutability-policy-mode") BlobImmutabilityPolicyMode immutabilityPolicyMode,
+ @HeaderParam("x-ms-legal-hold") Boolean legalHold, @HeaderParam("Accept") String accept,
+ RequestOptions requestOptions);
+
+ @HttpRequestInformation(
+ method = HttpMethod.PUT,
+ path = "/{containerName}/{blob}",
+ expectedStatusCodes = { 201 })
+ @UnexpectedResponseExceptionDetail(exceptionBodyClass = StorageError.class)
+ default void create(@HostParam("url") String url, @PathParam("containerName") String containerName,
+ @PathParam("blob") String blob, @HeaderParam("x-ms-blob-type") String blobType,
+ @HeaderParam("Content-Length") long contentLength, @HeaderParam("x-ms-version") String version,
+ @HeaderParam("Accept") String accept) {
+ create(url, containerName, blob, blobType, null, contentLength, null, null, null, null, null, null, null,
+ null, null, null, null, null, null, null, null, null, null, version, null, null, null, null, null,
+ accept, null);
+ }
+
+ @HttpRequestInformation(
+ method = HttpMethod.PUT,
+ path = "/{containerName}/{blob}",
+ expectedStatusCodes = { 201 })
+ @UnexpectedResponseExceptionDetail(exceptionBodyClass = StorageError.class)
+ Response appendBlock(@HostParam("url") String url, @PathParam("containerName") String containerName,
+ @PathParam("blob") String blob, @QueryParam("comp") String comp, @QueryParam("timeout") Integer timeout,
+ @HeaderParam("Content-Length") long contentLength,
+ @HeaderParam("Content-MD5") String transactionalContentMD5,
+ @HeaderParam("x-ms-content-crc64") String transactionalContentCrc64,
+ @HeaderParam("x-ms-lease-id") String leaseId, @HeaderParam("x-ms-blob-condition-maxsize") Long maxSize,
+ @HeaderParam("x-ms-blob-condition-appendpos") Long appendPosition,
+ @HeaderParam("x-ms-encryption-key") String encryptionKey,
+ @HeaderParam("x-ms-encryption-key-sha256") String encryptionKeySha256,
+ @HeaderParam("x-ms-encryption-algorithm") EncryptionAlgorithmType encryptionAlgorithm,
+ @HeaderParam("x-ms-encryption-scope") String encryptionScope,
+ @HeaderParam("If-Modified-Since") DateTimeRfc1123 ifModifiedSince,
+ @HeaderParam("If-Unmodified-Since") DateTimeRfc1123 ifUnmodifiedSince,
+ @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch,
+ @HeaderParam("x-ms-if-tags") String ifTags, @HeaderParam("x-ms-version") String version,
+ @HeaderParam("x-ms-client-request-id") String requestId,
+ @HeaderParam("x-ms-structured-body") String structuredBodyType,
+ @HeaderParam("x-ms-structured-content-length") Long structuredContentLength,
+ @BodyParam("application/octet-stream") BinaryData body, @HeaderParam("Accept") String accept,
+ RequestOptions requestOptions);
+
+ @HttpRequestInformation(
+ method = HttpMethod.PUT,
+ path = "/{containerName}/{blob}",
+ expectedStatusCodes = { 201 })
+ @UnexpectedResponseExceptionDetail(exceptionBodyClass = StorageError.class)
+ default void appendBlock(@HostParam("url") String url, @PathParam("containerName") String containerName,
+ @PathParam("blob") String blob, @QueryParam("comp") String comp,
+ @HeaderParam("Content-Length") long contentLength, @HeaderParam("x-ms-version") String version,
+ @BodyParam("application/octet-stream") BinaryData body, @HeaderParam("Accept") String accept) {
+ appendBlock(url, containerName, blob, comp, null, contentLength, null, null, null, null, null, null, null,
+ null, null, null, null, null, null, null, version, null, null, null, body, accept, null);
+ }
+
+ @HttpRequestInformation(
+ method = HttpMethod.PUT,
+ path = "/{containerName}/{blob}",
+ expectedStatusCodes = { 201 })
+ @UnexpectedResponseExceptionDetail(exceptionBodyClass = StorageError.class)
+ Response appendBlockFromUrl(@HostParam("url") String url,
+ @PathParam("containerName") String containerName, @PathParam("blob") String blob,
+ @QueryParam("comp") String comp, @HeaderParam("x-ms-copy-source") String sourceUrl,
+ @HeaderParam("x-ms-source-range") String sourceRange,
+ @HeaderParam("x-ms-source-content-md5") String sourceContentMD5,
+ @HeaderParam("x-ms-source-content-crc64") String sourceContentcrc64, @QueryParam("timeout") Integer timeout,
+ @HeaderParam("Content-Length") long contentLength,
+ @HeaderParam("Content-MD5") String transactionalContentMD5,
+ @HeaderParam("x-ms-encryption-key") String encryptionKey,
+ @HeaderParam("x-ms-encryption-key-sha256") String encryptionKeySha256,
+ @HeaderParam("x-ms-encryption-algorithm") EncryptionAlgorithmType encryptionAlgorithm,
+ @HeaderParam("x-ms-encryption-scope") String encryptionScope, @HeaderParam("x-ms-lease-id") String leaseId,
+ @HeaderParam("x-ms-blob-condition-maxsize") Long maxSize,
+ @HeaderParam("x-ms-blob-condition-appendpos") Long appendPosition,
+ @HeaderParam("If-Modified-Since") DateTimeRfc1123 ifModifiedSince,
+ @HeaderParam("If-Unmodified-Since") DateTimeRfc1123 ifUnmodifiedSince,
+ @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch,
+ @HeaderParam("x-ms-if-tags") String ifTags,
+ @HeaderParam("x-ms-source-if-modified-since") DateTimeRfc1123 sourceIfModifiedSince,
+ @HeaderParam("x-ms-source-if-unmodified-since") DateTimeRfc1123 sourceIfUnmodifiedSince,
+ @HeaderParam("x-ms-source-if-match") String sourceIfMatch,
+ @HeaderParam("x-ms-source-if-none-match") String sourceIfNoneMatch,
+ @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId,
+ @HeaderParam("x-ms-copy-source-authorization") String copySourceAuthorization,
+ @HeaderParam("Accept") String accept, RequestOptions requestOptions);
+
+ @HttpRequestInformation(
+ method = HttpMethod.PUT,
+ path = "/{containerName}/{blob}",
+ expectedStatusCodes = { 201 })
+ @UnexpectedResponseExceptionDetail(exceptionBodyClass = StorageError.class)
+ default void appendBlockFromUrl(@HostParam("url") String url, @PathParam("containerName") String containerName,
+ @PathParam("blob") String blob, @QueryParam("comp") String comp,
+ @HeaderParam("x-ms-copy-source") String sourceUrl, @HeaderParam("Content-Length") long contentLength,
+ @HeaderParam("x-ms-version") String version, @HeaderParam("Accept") String accept) {
+ appendBlockFromUrl(url, containerName, blob, comp, sourceUrl, null, null, null, null, contentLength, null,
+ null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, version,
+ null, null, accept, null);
+ }
+
+ @HttpRequestInformation(
+ method = HttpMethod.PUT,
+ path = "/{containerName}/{blob}",
+ expectedStatusCodes = { 200 })
+ @UnexpectedResponseExceptionDetail(exceptionBodyClass = StorageError.class)
+ Response seal(@HostParam("url") String url, @PathParam("containerName") String containerName,
+ @PathParam("blob") String blob, @QueryParam("comp") String comp, @QueryParam("timeout") Integer timeout,
+ @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId,
+ @HeaderParam("x-ms-lease-id") String leaseId,
+ @HeaderParam("If-Modified-Since") DateTimeRfc1123 ifModifiedSince,
+ @HeaderParam("If-Unmodified-Since") DateTimeRfc1123 ifUnmodifiedSince,
+ @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch,
+ @HeaderParam("x-ms-blob-condition-appendpos") Long appendPosition, @HeaderParam("Accept") String accept,
+ RequestOptions requestOptions);
+
+ @HttpRequestInformation(
+ method = HttpMethod.PUT,
+ path = "/{containerName}/{blob}",
+ expectedStatusCodes = { 200 })
+ @UnexpectedResponseExceptionDetail(exceptionBodyClass = StorageError.class)
+ default void seal(@HostParam("url") String url, @PathParam("containerName") String containerName,
+ @PathParam("blob") String blob, @QueryParam("comp") String comp,
+ @HeaderParam("x-ms-version") String version, @HeaderParam("Accept") String accept) {
+ seal(url, containerName, blob, comp, null, version, null, null, null, null, null, null, null, accept, null);
+ }
+ }
+
+ /**
+ * The Create Append Blob operation creates a new append blob.
+ *
+ * @param containerName The container name.
+ * @param blob The blob name.
+ * @param contentLength The length of the request.
+ * @param timeout The timeout parameter is expressed in seconds. For more information, see <a
+ * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting
+ * Timeouts for Blob Service Operations.</a>.
+ * @param metadata Optional. Specifies a user-defined name-value pair associated with the blob. If no name-value
+ * pairs are specified, the operation will copy the metadata from the source blob or file to the destination blob.
+ * If one or more name-value pairs are specified, the destination blob is created with the specified metadata, and
+ * metadata is not copied from the source blob or file. Note that beginning with version 2009-09-19, metadata names
+ * must adhere to the naming rules for C# identifiers. See Naming and Referencing Containers, Blobs, and Metadata
+ * for more information.
+ * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID.
+ * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the
+ * specified date/time.
+ * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since
+ * the specified date/time.
+ * @param ifMatch Specify an ETag value to operate only on blobs with a matching value.
+ * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value.
+ * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value.
+ * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the
+ * analytics logs when storage analytics logging is enabled.
+ * @param blobTagsString Optional. Used to set blob tags in various blob operations.
+ * @param immutabilityPolicyExpiry Specifies the date time when the blobs immutability policy is set to expire.
+ * @param immutabilityPolicyMode Specifies the immutability policy mode to set on the blob.
+ * @param legalHold Specified if a legal hold should be set on the blob.
+ * @param blobHttpHeaders Parameter group.
+ * @param cpkInfo Parameter group.
+ * @param encryptionScopeParam Parameter group.
+ * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the service returns an error.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response.
+ */
+ public Response createWithResponse(String containerName, String blob, long contentLength, Integer timeout,
+ Map metadata, String leaseId, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince,
+ String ifMatch, String ifNoneMatch, String ifTags, String requestId, String blobTagsString,
+ OffsetDateTime immutabilityPolicyExpiry, BlobImmutabilityPolicyMode immutabilityPolicyMode, Boolean legalHold,
+ BlobHttpHeaders blobHttpHeaders, CpkInfo cpkInfo, EncryptionScope encryptionScopeParam,
+ RequestOptions requestOptions) {
+ final String blobType = "AppendBlob";
+ final String accept = "application/xml";
+ String contentTypeInternal = null;
+ if (blobHttpHeaders != null) {
+ contentTypeInternal = blobHttpHeaders.getContentType();
+ }
+ String contentType = contentTypeInternal;
+ String contentEncodingInternal = null;
+ if (blobHttpHeaders != null) {
+ contentEncodingInternal = blobHttpHeaders.getContentEncoding();
+ }
+ String contentEncoding = contentEncodingInternal;
+ String contentLanguageInternal = null;
+ if (blobHttpHeaders != null) {
+ contentLanguageInternal = blobHttpHeaders.getContentLanguage();
+ }
+ String contentLanguage = contentLanguageInternal;
+ byte[] contentMd5Internal = null;
+ if (blobHttpHeaders != null) {
+ contentMd5Internal = blobHttpHeaders.getContentMd5();
+ }
+ byte[] contentMd5 = contentMd5Internal;
+ String cacheControlInternal = null;
+ if (blobHttpHeaders != null) {
+ cacheControlInternal = blobHttpHeaders.getCacheControl();
+ }
+ String cacheControl = cacheControlInternal;
+ String contentDispositionInternal = null;
+ if (blobHttpHeaders != null) {
+ contentDispositionInternal = blobHttpHeaders.getContentDisposition();
+ }
+ String contentDisposition = contentDispositionInternal;
+ String encryptionKeyInternal = null;
+ if (cpkInfo != null) {
+ encryptionKeyInternal = cpkInfo.getEncryptionKey();
+ }
+ String encryptionKey = encryptionKeyInternal;
+ String encryptionKeySha256Internal = null;
+ if (cpkInfo != null) {
+ encryptionKeySha256Internal = cpkInfo.getEncryptionKeySha256();
+ }
+ String encryptionKeySha256 = encryptionKeySha256Internal;
+ EncryptionAlgorithmType encryptionAlgorithmInternal = null;
+ if (cpkInfo != null) {
+ encryptionAlgorithmInternal = cpkInfo.getEncryptionAlgorithm();
+ }
+ EncryptionAlgorithmType encryptionAlgorithm = encryptionAlgorithmInternal;
+ String encryptionScopeInternal = null;
+ if (encryptionScopeParam != null) {
+ encryptionScopeInternal = encryptionScopeParam.getEncryptionScope();
+ }
+ String encryptionScope = encryptionScopeInternal;
+ String contentMd5Converted = Base64Util.encodeToString(contentMd5);
+ DateTimeRfc1123 ifModifiedSinceConverted
+ = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince);
+ DateTimeRfc1123 ifUnmodifiedSinceConverted
+ = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince);
+ DateTimeRfc1123 immutabilityPolicyExpiryConverted
+ = immutabilityPolicyExpiry == null ? null : new DateTimeRfc1123(immutabilityPolicyExpiry);
+ return service.create(this.client.getUrl(), containerName, blob, blobType, timeout, contentLength, contentType,
+ contentEncoding, contentLanguage, contentMd5Converted, cacheControl, metadata, leaseId, contentDisposition,
+ encryptionKey, encryptionKeySha256, encryptionAlgorithm, encryptionScope, ifModifiedSinceConverted,
+ ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, this.client.getVersion(), requestId,
+ blobTagsString, immutabilityPolicyExpiryConverted, immutabilityPolicyMode, legalHold, accept,
+ requestOptions);
+ }
+
+ /**
+ * The Create Append Blob operation creates a new append blob.
+ *
+ * @param containerName The container name.
+ * @param blob The blob name.
+ * @param contentLength The length of the request.
+ * @param timeout The timeout parameter is expressed in seconds. For more information, see <a
+ * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting
+ * Timeouts for Blob Service Operations.</a>.
+ * @param metadata Optional. Specifies a user-defined name-value pair associated with the blob. If no name-value
+ * pairs are specified, the operation will copy the metadata from the source blob or file to the destination blob.
+ * If one or more name-value pairs are specified, the destination blob is created with the specified metadata, and
+ * metadata is not copied from the source blob or file. Note that beginning with version 2009-09-19, metadata names
+ * must adhere to the naming rules for C# identifiers. See Naming and Referencing Containers, Blobs, and Metadata
+ * for more information.
+ * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID.
+ * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the
+ * specified date/time.
+ * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since
+ * the specified date/time.
+ * @param ifMatch Specify an ETag value to operate only on blobs with a matching value.
+ * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value.
+ * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value.
+ * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the
+ * analytics logs when storage analytics logging is enabled.
+ * @param blobTagsString Optional. Used to set blob tags in various blob operations.
+ * @param immutabilityPolicyExpiry Specifies the date time when the blobs immutability policy is set to expire.
+ * @param immutabilityPolicyMode Specifies the immutability policy mode to set on the blob.
+ * @param legalHold Specified if a legal hold should be set on the blob.
+ * @param blobHttpHeaders Parameter group.
+ * @param cpkInfo Parameter group.
+ * @param encryptionScopeParam Parameter group.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the service returns an error.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ public void create(String containerName, String blob, long contentLength, Integer timeout,
+ Map metadata, String leaseId, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince,
+ String ifMatch, String ifNoneMatch, String ifTags, String requestId, String blobTagsString,
+ OffsetDateTime immutabilityPolicyExpiry, BlobImmutabilityPolicyMode immutabilityPolicyMode, Boolean legalHold,
+ BlobHttpHeaders blobHttpHeaders, CpkInfo cpkInfo, EncryptionScope encryptionScopeParam) {
+ createWithResponse(containerName, blob, contentLength, timeout, metadata, leaseId, ifModifiedSince,
+ ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, requestId, blobTagsString, immutabilityPolicyExpiry,
+ immutabilityPolicyMode, legalHold, blobHttpHeaders, cpkInfo, encryptionScopeParam, RequestOptions.none());
+ }
+
+ /**
+ * The Append Block operation commits a new block of data to the end of an existing append blob. The Append Block
+ * operation is permitted only if the blob was created with x-ms-blob-type set to AppendBlob. Append Block is
+ * supported only on version 2015-02-21 version or later.
+ *
+ * @param containerName The container name.
+ * @param blob The blob name.
+ * @param contentLength The length of the request.
+ * @param body Initial data.
+ * @param timeout The timeout parameter is expressed in seconds. For more information, see <a
+ * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting
+ * Timeouts for Blob Service Operations.</a>.
+ * @param transactionalContentMD5 Specify the transactional md5 for the body, to be validated by the service.
+ * @param transactionalContentCrc64 Specify the transactional crc64 for the body, to be validated by the service.
+ * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID.
+ * @param maxSize Optional conditional header. The max length in bytes permitted for the append blob. If the Append
+ * Block operation would cause the blob to exceed that limit or if the blob size is already greater than the value
+ * specified in this header, the request will fail with MaxBlobSizeConditionNotMet error (HTTP status code 412 -
+ * Precondition Failed).
+ * @param appendPosition Optional conditional header, used only for the Append Block operation. A number indicating
+ * the byte offset to compare. Append Block will succeed only if the append position is equal to this number. If it
+ * is not, the request will fail with the AppendPositionConditionNotMet error (HTTP status code 412 - Precondition
+ * Failed).
+ * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the
+ * specified date/time.
+ * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since
+ * the specified date/time.
+ * @param ifMatch Specify an ETag value to operate only on blobs with a matching value.
+ * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value.
+ * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value.
+ * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the
+ * analytics logs when storage analytics logging is enabled.
+ * @param structuredBodyType Required if the request body is a structured message. Specifies the message schema
+ * version and properties.
+ * @param structuredContentLength Required if the request body is a structured message. Specifies the length of the
+ * blob/file content inside the message body. Will always be smaller than Content-Length.
+ * @param cpkInfo Parameter group.
+ * @param encryptionScopeParam Parameter group.
+ * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the service returns an error.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response.
+ */
+ public Response appendBlockWithResponse(String containerName, String blob, long contentLength,
+ BinaryData body, Integer timeout, byte[] transactionalContentMD5, byte[] transactionalContentCrc64,
+ String leaseId, Long maxSize, Long appendPosition, OffsetDateTime ifModifiedSince,
+ OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, String ifTags, String requestId,
+ String structuredBodyType, Long structuredContentLength, CpkInfo cpkInfo, EncryptionScope encryptionScopeParam,
+ RequestOptions requestOptions) {
+ final String comp = "appendblock";
+ final String accept = "application/xml";
+ String encryptionKeyInternal = null;
+ if (cpkInfo != null) {
+ encryptionKeyInternal = cpkInfo.getEncryptionKey();
+ }
+ String encryptionKey = encryptionKeyInternal;
+ String encryptionKeySha256Internal = null;
+ if (cpkInfo != null) {
+ encryptionKeySha256Internal = cpkInfo.getEncryptionKeySha256();
+ }
+ String encryptionKeySha256 = encryptionKeySha256Internal;
+ EncryptionAlgorithmType encryptionAlgorithmInternal = null;
+ if (cpkInfo != null) {
+ encryptionAlgorithmInternal = cpkInfo.getEncryptionAlgorithm();
+ }
+ EncryptionAlgorithmType encryptionAlgorithm = encryptionAlgorithmInternal;
+ String encryptionScopeInternal = null;
+ if (encryptionScopeParam != null) {
+ encryptionScopeInternal = encryptionScopeParam.getEncryptionScope();
+ }
+ String encryptionScope = encryptionScopeInternal;
+ String transactionalContentMD5Converted = Base64Util.encodeToString(transactionalContentMD5);
+ String transactionalContentCrc64Converted = Base64Util.encodeToString(transactionalContentCrc64);
+ DateTimeRfc1123 ifModifiedSinceConverted
+ = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince);
+ DateTimeRfc1123 ifUnmodifiedSinceConverted
+ = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince);
+ return service.appendBlock(this.client.getUrl(), containerName, blob, comp, timeout, contentLength,
+ transactionalContentMD5Converted, transactionalContentCrc64Converted, leaseId, maxSize, appendPosition,
+ encryptionKey, encryptionKeySha256, encryptionAlgorithm, encryptionScope, ifModifiedSinceConverted,
+ ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, this.client.getVersion(), requestId,
+ structuredBodyType, structuredContentLength, body, accept, requestOptions);
+ }
+
+ /**
+ * The Append Block operation commits a new block of data to the end of an existing append blob. The Append Block
+ * operation is permitted only if the blob was created with x-ms-blob-type set to AppendBlob. Append Block is
+ * supported only on version 2015-02-21 version or later.
+ *
+ * @param containerName The container name.
+ * @param blob The blob name.
+ * @param contentLength The length of the request.
+ * @param body Initial data.
+ * @param timeout The timeout parameter is expressed in seconds. For more information, see <a
+ * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting
+ * Timeouts for Blob Service Operations.</a>.
+ * @param transactionalContentMD5 Specify the transactional md5 for the body, to be validated by the service.
+ * @param transactionalContentCrc64 Specify the transactional crc64 for the body, to be validated by the service.
+ * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID.
+ * @param maxSize Optional conditional header. The max length in bytes permitted for the append blob. If the Append
+ * Block operation would cause the blob to exceed that limit or if the blob size is already greater than the value
+ * specified in this header, the request will fail with MaxBlobSizeConditionNotMet error (HTTP status code 412 -
+ * Precondition Failed).
+ * @param appendPosition Optional conditional header, used only for the Append Block operation. A number indicating
+ * the byte offset to compare. Append Block will succeed only if the append position is equal to this number. If it
+ * is not, the request will fail with the AppendPositionConditionNotMet error (HTTP status code 412 - Precondition
+ * Failed).
+ * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the
+ * specified date/time.
+ * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since
+ * the specified date/time.
+ * @param ifMatch Specify an ETag value to operate only on blobs with a matching value.
+ * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value.
+ * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value.
+ * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the
+ * analytics logs when storage analytics logging is enabled.
+ * @param structuredBodyType Required if the request body is a structured message. Specifies the message schema
+ * version and properties.
+ * @param structuredContentLength Required if the request body is a structured message. Specifies the length of the
+ * blob/file content inside the message body. Will always be smaller than Content-Length.
+ * @param cpkInfo Parameter group.
+ * @param encryptionScopeParam Parameter group.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the service returns an error.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ public void appendBlock(String containerName, String blob, long contentLength, BinaryData body, Integer timeout,
+ byte[] transactionalContentMD5, byte[] transactionalContentCrc64, String leaseId, Long maxSize,
+ Long appendPosition, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch,
+ String ifNoneMatch, String ifTags, String requestId, String structuredBodyType, Long structuredContentLength,
+ CpkInfo cpkInfo, EncryptionScope encryptionScopeParam) {
+ appendBlockWithResponse(containerName, blob, contentLength, body, timeout, transactionalContentMD5,
+ transactionalContentCrc64, leaseId, maxSize, appendPosition, ifModifiedSince, ifUnmodifiedSince, ifMatch,
+ ifNoneMatch, ifTags, requestId, structuredBodyType, structuredContentLength, cpkInfo, encryptionScopeParam,
+ RequestOptions.none());
+ }
+
+ /**
+ * The Append Block operation commits a new block of data to the end of an existing append blob where the contents
+ * are read from a source url. The Append Block operation is permitted only if the blob was created with
+ * x-ms-blob-type set to AppendBlob. Append Block is supported only on version 2015-02-21 version or later.
+ *
+ * @param containerName The container name.
+ * @param blob The blob name.
+ * @param sourceUrl Specify a URL to the copy source.
+ * @param contentLength The length of the request.
+ * @param sourceRange Bytes of source data in the specified range.
+ * @param sourceContentMD5 Specify the md5 calculated for the range of bytes that must be read from the copy source.
+ * @param sourceContentcrc64 Specify the crc64 calculated for the range of bytes that must be read from the copy
+ * source.
+ * @param timeout The timeout parameter is expressed in seconds. For more information, see <a
+ * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting
+ * Timeouts for Blob Service Operations.</a>.
+ * @param transactionalContentMD5 Specify the transactional md5 for the body, to be validated by the service.
+ * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID.
+ * @param maxSize Optional conditional header. The max length in bytes permitted for the append blob. If the Append
+ * Block operation would cause the blob to exceed that limit or if the blob size is already greater than the value
+ * specified in this header, the request will fail with MaxBlobSizeConditionNotMet error (HTTP status code 412 -
+ * Precondition Failed).
+ * @param appendPosition Optional conditional header, used only for the Append Block operation. A number indicating
+ * the byte offset to compare. Append Block will succeed only if the append position is equal to this number. If it
+ * is not, the request will fail with the AppendPositionConditionNotMet error (HTTP status code 412 - Precondition
+ * Failed).
+ * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the
+ * specified date/time.
+ * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since
+ * the specified date/time.
+ * @param ifMatch Specify an ETag value to operate only on blobs with a matching value.
+ * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value.
+ * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value.
+ * @param sourceIfModifiedSince Specify this header value to operate only on a blob if it has been modified since
+ * the specified date/time.
+ * @param sourceIfUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified
+ * since the specified date/time.
+ * @param sourceIfMatch Specify an ETag value to operate only on blobs with a matching value.
+ * @param sourceIfNoneMatch Specify an ETag value to operate only on blobs without a matching value.
+ * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the
+ * analytics logs when storage analytics logging is enabled.
+ * @param copySourceAuthorization Only Bearer type is supported. Credentials should be a valid OAuth access token to
+ * copy source.
+ * @param cpkInfo Parameter group.
+ * @param encryptionScopeParam Parameter group.
+ * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the service returns an error.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response.
+ */
+ public Response appendBlockFromUrlWithResponse(String containerName, String blob, String sourceUrl,
+ long contentLength, String sourceRange, byte[] sourceContentMD5, byte[] sourceContentcrc64, Integer timeout,
+ byte[] transactionalContentMD5, String leaseId, Long maxSize, Long appendPosition,
+ OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch,
+ String ifTags, OffsetDateTime sourceIfModifiedSince, OffsetDateTime sourceIfUnmodifiedSince,
+ String sourceIfMatch, String sourceIfNoneMatch, String requestId, String copySourceAuthorization,
+ CpkInfo cpkInfo, EncryptionScope encryptionScopeParam, RequestOptions requestOptions) {
+ final String comp = "appendblock";
+ final String accept = "application/xml";
+ String encryptionKeyInternal = null;
+ if (cpkInfo != null) {
+ encryptionKeyInternal = cpkInfo.getEncryptionKey();
+ }
+ String encryptionKey = encryptionKeyInternal;
+ String encryptionKeySha256Internal = null;
+ if (cpkInfo != null) {
+ encryptionKeySha256Internal = cpkInfo.getEncryptionKeySha256();
+ }
+ String encryptionKeySha256 = encryptionKeySha256Internal;
+ EncryptionAlgorithmType encryptionAlgorithmInternal = null;
+ if (cpkInfo != null) {
+ encryptionAlgorithmInternal = cpkInfo.getEncryptionAlgorithm();
+ }
+ EncryptionAlgorithmType encryptionAlgorithm = encryptionAlgorithmInternal;
+ String encryptionScopeInternal = null;
+ if (encryptionScopeParam != null) {
+ encryptionScopeInternal = encryptionScopeParam.getEncryptionScope();
+ }
+ String encryptionScope = encryptionScopeInternal;
+ String sourceContentMD5Converted = Base64Util.encodeToString(sourceContentMD5);
+ String sourceContentcrc64Converted = Base64Util.encodeToString(sourceContentcrc64);
+ String transactionalContentMD5Converted = Base64Util.encodeToString(transactionalContentMD5);
+ DateTimeRfc1123 ifModifiedSinceConverted
+ = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince);
+ DateTimeRfc1123 ifUnmodifiedSinceConverted
+ = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince);
+ DateTimeRfc1123 sourceIfModifiedSinceConverted
+ = sourceIfModifiedSince == null ? null : new DateTimeRfc1123(sourceIfModifiedSince);
+ DateTimeRfc1123 sourceIfUnmodifiedSinceConverted
+ = sourceIfUnmodifiedSince == null ? null : new DateTimeRfc1123(sourceIfUnmodifiedSince);
+ return service.appendBlockFromUrl(this.client.getUrl(), containerName, blob, comp, sourceUrl, sourceRange,
+ sourceContentMD5Converted, sourceContentcrc64Converted, timeout, contentLength,
+ transactionalContentMD5Converted, encryptionKey, encryptionKeySha256, encryptionAlgorithm, encryptionScope,
+ leaseId, maxSize, appendPosition, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch,
+ ifNoneMatch, ifTags, sourceIfModifiedSinceConverted, sourceIfUnmodifiedSinceConverted, sourceIfMatch,
+ sourceIfNoneMatch, this.client.getVersion(), requestId, copySourceAuthorization, accept, requestOptions);
+ }
+
+ /**
+ * The Append Block operation commits a new block of data to the end of an existing append blob where the contents
+ * are read from a source url. The Append Block operation is permitted only if the blob was created with
+ * x-ms-blob-type set to AppendBlob. Append Block is supported only on version 2015-02-21 version or later.
+ *
+ * @param containerName The container name.
+ * @param blob The blob name.
+ * @param sourceUrl Specify a URL to the copy source.
+ * @param contentLength The length of the request.
+ * @param sourceRange Bytes of source data in the specified range.
+ * @param sourceContentMD5 Specify the md5 calculated for the range of bytes that must be read from the copy source.
+ * @param sourceContentcrc64 Specify the crc64 calculated for the range of bytes that must be read from the copy
+ * source.
+ * @param timeout The timeout parameter is expressed in seconds. For more information, see <a
+ * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting
+ * Timeouts for Blob Service Operations.</a>.
+ * @param transactionalContentMD5 Specify the transactional md5 for the body, to be validated by the service.
+ * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID.
+ * @param maxSize Optional conditional header. The max length in bytes permitted for the append blob. If the Append
+ * Block operation would cause the blob to exceed that limit or if the blob size is already greater than the value
+ * specified in this header, the request will fail with MaxBlobSizeConditionNotMet error (HTTP status code 412 -
+ * Precondition Failed).
+ * @param appendPosition Optional conditional header, used only for the Append Block operation. A number indicating
+ * the byte offset to compare. Append Block will succeed only if the append position is equal to this number. If it
+ * is not, the request will fail with the AppendPositionConditionNotMet error (HTTP status code 412 - Precondition
+ * Failed).
+ * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the
+ * specified date/time.
+ * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since
+ * the specified date/time.
+ * @param ifMatch Specify an ETag value to operate only on blobs with a matching value.
+ * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value.
+ * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value.
+ * @param sourceIfModifiedSince Specify this header value to operate only on a blob if it has been modified since
+ * the specified date/time.
+ * @param sourceIfUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified
+ * since the specified date/time.
+ * @param sourceIfMatch Specify an ETag value to operate only on blobs with a matching value.
+ * @param sourceIfNoneMatch Specify an ETag value to operate only on blobs without a matching value.
+ * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the
+ * analytics logs when storage analytics logging is enabled.
+ * @param copySourceAuthorization Only Bearer type is supported. Credentials should be a valid OAuth access token to
+ * copy source.
+ * @param cpkInfo Parameter group.
+ * @param encryptionScopeParam Parameter group.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the service returns an error.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ public void appendBlockFromUrl(String containerName, String blob, String sourceUrl, long contentLength,
+ String sourceRange, byte[] sourceContentMD5, byte[] sourceContentcrc64, Integer timeout,
+ byte[] transactionalContentMD5, String leaseId, Long maxSize, Long appendPosition,
+ OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch,
+ String ifTags, OffsetDateTime sourceIfModifiedSince, OffsetDateTime sourceIfUnmodifiedSince,
+ String sourceIfMatch, String sourceIfNoneMatch, String requestId, String copySourceAuthorization,
+ CpkInfo cpkInfo, EncryptionScope encryptionScopeParam) {
+ appendBlockFromUrlWithResponse(containerName, blob, sourceUrl, contentLength, sourceRange, sourceContentMD5,
+ sourceContentcrc64, timeout, transactionalContentMD5, leaseId, maxSize, appendPosition, ifModifiedSince,
+ ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, sourceIfModifiedSince, sourceIfUnmodifiedSince,
+ sourceIfMatch, sourceIfNoneMatch, requestId, copySourceAuthorization, cpkInfo, encryptionScopeParam,
+ RequestOptions.none());
+ }
+
+ /**
+ * The Seal operation seals the Append Blob to make it read-only. Seal is supported only on version 2019-12-12
+ * version or later.
+ *
+ * @param containerName The container name.
+ * @param blob The blob name.
+ * @param timeout The timeout parameter is expressed in seconds. For more information, see <a
+ * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting
+ * Timeouts for Blob Service Operations.</a>.
+ * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the
+ * analytics logs when storage analytics logging is enabled.
+ * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID.
+ * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the
+ * specified date/time.
+ * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since
+ * the specified date/time.
+ * @param ifMatch Specify an ETag value to operate only on blobs with a matching value.
+ * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value.
+ * @param appendPosition Optional conditional header, used only for the Append Block operation. A number indicating
+ * the byte offset to compare. Append Block will succeed only if the append position is equal to this number. If it
+ * is not, the request will fail with the AppendPositionConditionNotMet error (HTTP status code 412 - Precondition
+ * Failed).
+ * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the service returns an error.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response.
+ */
+ public Response sealWithResponse(String containerName, String blob, Integer timeout, String requestId,
+ String leaseId, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch,
+ String ifNoneMatch, Long appendPosition, RequestOptions requestOptions) {
+ final String comp = "seal";
+ final String accept = "application/xml";
+ DateTimeRfc1123 ifModifiedSinceConverted
+ = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince);
+ DateTimeRfc1123 ifUnmodifiedSinceConverted
+ = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince);
+ return service.seal(this.client.getUrl(), containerName, blob, comp, timeout, this.client.getVersion(),
+ requestId, leaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch,
+ appendPosition, accept, requestOptions);
+ }
+
+ /**
+ * The Seal operation seals the Append Blob to make it read-only. Seal is supported only on version 2019-12-12
+ * version or later.
+ *
+ * @param containerName The container name.
+ * @param blob The blob name.
+ * @param timeout The timeout parameter is expressed in seconds. For more information, see <a
+ * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting
+ * Timeouts for Blob Service Operations.</a>.
+ * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the
+ * analytics logs when storage analytics logging is enabled.
+ * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID.
+ * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the
+ * specified date/time.
+ * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since
+ * the specified date/time.
+ * @param ifMatch Specify an ETag value to operate only on blobs with a matching value.
+ * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value.
+ * @param appendPosition Optional conditional header, used only for the Append Block operation. A number indicating
+ * the byte offset to compare. Append Block will succeed only if the append position is equal to this number. If it
+ * is not, the request will fail with the AppendPositionConditionNotMet error (HTTP status code 412 - Precondition
+ * Failed).
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the service returns an error.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ public void seal(String containerName, String blob, Integer timeout, String requestId, String leaseId,
+ OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch,
+ Long appendPosition) {
+ sealWithResponse(containerName, blob, timeout, requestId, leaseId, ifModifiedSince, ifUnmodifiedSince, ifMatch,
+ ifNoneMatch, appendPosition, RequestOptions.none());
+ }
+}
diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/implementation/AzureBlobStorageImpl.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/implementation/AzureBlobStorageImpl.java
new file mode 100644
index 000000000000..4b25d4a562c2
--- /dev/null
+++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/implementation/AzureBlobStorageImpl.java
@@ -0,0 +1,159 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.v2.storage.blob.implementation;
+
+import io.clientcore.core.http.pipeline.HttpPipeline;
+import io.clientcore.core.instrumentation.Instrumentation;
+
+/**
+ * Initializes a new instance of the AzureBlobStorage type.
+ */
+public final class AzureBlobStorageImpl {
+ /**
+ * The URL of the service account, container, or blob that is the target of the desired operation.
+ */
+ private final String url;
+
+ /**
+ * Gets The URL of the service account, container, or blob that is the target of the desired operation.
+ *
+ * @return the url value.
+ */
+ public String getUrl() {
+ return this.url;
+ }
+
+ /**
+ * Specifies the version of the operation to use for this request.
+ */
+ private final String version;
+
+ /**
+ * Gets Specifies the version of the operation to use for this request.
+ *
+ * @return the version value.
+ */
+ public String getVersion() {
+ return this.version;
+ }
+
+ /**
+ * The HTTP pipeline to send requests through.
+ */
+ private final HttpPipeline httpPipeline;
+
+ /**
+ * Gets The HTTP pipeline to send requests through.
+ *
+ * @return the httpPipeline value.
+ */
+ public HttpPipeline getHttpPipeline() {
+ return this.httpPipeline;
+ }
+
+ /**
+ * The ServicesImpl object to access its operations.
+ */
+ private final ServicesImpl services;
+
+ /**
+ * Gets the ServicesImpl object to access its operations.
+ *
+ * @return the ServicesImpl object.
+ */
+ public ServicesImpl getServices() {
+ return this.services;
+ }
+
+ /**
+ * The ContainersImpl object to access its operations.
+ */
+ private final ContainersImpl containers;
+
+ /**
+ * Gets the ContainersImpl object to access its operations.
+ *
+ * @return the ContainersImpl object.
+ */
+ public ContainersImpl getContainers() {
+ return this.containers;
+ }
+
+ /**
+ * The BlobsImpl object to access its operations.
+ */
+ private final BlobsImpl blobs;
+
+ /**
+ * Gets the BlobsImpl object to access its operations.
+ *
+ * @return the BlobsImpl object.
+ */
+ public BlobsImpl getBlobs() {
+ return this.blobs;
+ }
+
+ /**
+ * The PageBlobsImpl object to access its operations.
+ */
+ private final PageBlobsImpl pageBlobs;
+
+ /**
+ * Gets the PageBlobsImpl object to access its operations.
+ *
+ * @return the PageBlobsImpl object.
+ */
+ public PageBlobsImpl getPageBlobs() {
+ return this.pageBlobs;
+ }
+
+ /**
+ * The AppendBlobsImpl object to access its operations.
+ */
+ private final AppendBlobsImpl appendBlobs;
+
+ /**
+ * Gets the AppendBlobsImpl object to access its operations.
+ *
+ * @return the AppendBlobsImpl object.
+ */
+ public AppendBlobsImpl getAppendBlobs() {
+ return this.appendBlobs;
+ }
+
+ /**
+ * The BlockBlobsImpl object to access its operations.
+ */
+ private final BlockBlobsImpl blockBlobs;
+
+ /**
+ * Gets the BlockBlobsImpl object to access its operations.
+ *
+ * @return the BlockBlobsImpl object.
+ */
+ public BlockBlobsImpl getBlockBlobs() {
+ return this.blockBlobs;
+ }
+
+ /**
+ * Initializes an instance of AzureBlobStorage client.
+ *
+ * @param httpPipeline The HTTP pipeline to send requests through.
+ * @param url The URL of the service account, container, or blob that is the target of the desired operation.
+ * @param version Specifies the version of the operation to use for this request.
+ */
+ public AzureBlobStorageImpl(HttpPipeline httpPipeline, String url, String version,
+ Instrumentation instrumentation) {
+ this.httpPipeline = httpPipeline;
+ this.url = url;
+ this.version = version;
+ this.services = new ServicesImpl(this, instrumentation);
+ this.containers = new ContainersImpl(this);
+ this.blobs = new BlobsImpl(this);
+ this.pageBlobs = new PageBlobsImpl(this);
+ this.appendBlobs = new AppendBlobsImpl(this);
+ this.blockBlobs = new BlockBlobsImpl(this);
+ }
+}
diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/implementation/BlobsImpl.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/implementation/BlobsImpl.java
new file mode 100644
index 000000000000..83adb2f6b488
--- /dev/null
+++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/implementation/BlobsImpl.java
@@ -0,0 +1,2728 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.v2.storage.blob.implementation;
+
+import com.azure.v2.storage.blob.models.AccessTier;
+import com.azure.v2.storage.blob.models.BlobCopySourceTagsMode;
+import com.azure.v2.storage.blob.models.BlobDeleteType;
+import com.azure.v2.storage.blob.models.BlobExpiryOptions;
+import com.azure.v2.storage.blob.models.BlobHttpHeaders;
+import com.azure.v2.storage.blob.models.BlobImmutabilityPolicyMode;
+import com.azure.v2.storage.blob.models.BlobTags;
+import com.azure.v2.storage.blob.models.CpkInfo;
+import com.azure.v2.storage.blob.models.DeleteSnapshotsOptionType;
+import com.azure.v2.storage.blob.models.EncryptionAlgorithmType;
+import com.azure.v2.storage.blob.models.EncryptionScope;
+import com.azure.v2.storage.blob.models.QueryRequest;
+import com.azure.v2.storage.blob.models.RehydratePriority;
+import com.azure.v2.storage.blob.models.StorageError;
+import io.clientcore.core.annotations.ServiceInterface;
+import io.clientcore.core.http.RestProxy;
+import io.clientcore.core.http.annotations.BodyParam;
+import io.clientcore.core.http.annotations.HeaderParam;
+import io.clientcore.core.http.annotations.HostParam;
+import io.clientcore.core.http.annotations.HttpRequestInformation;
+import io.clientcore.core.http.annotations.PathParam;
+import io.clientcore.core.http.annotations.QueryParam;
+import io.clientcore.core.http.annotations.UnexpectedResponseExceptionDetail;
+import io.clientcore.core.http.exceptions.HttpResponseException;
+import io.clientcore.core.http.models.HttpMethod;
+import io.clientcore.core.http.models.RequestOptions;
+import io.clientcore.core.http.models.Response;
+import io.clientcore.core.http.pipeline.HttpPipeline;
+import io.clientcore.core.serialization.ObjectSerializer;
+import io.clientcore.core.utils.Base64Util;
+import io.clientcore.core.utils.DateTimeRfc1123;
+import java.io.InputStream;
+import java.lang.reflect.InvocationTargetException;
+import java.time.OffsetDateTime;
+import java.util.Map;
+
+/**
+ * An instance of this class provides access to all the operations defined in Blobs.
+ */
+public final class BlobsImpl {
+ /**
+ * The proxy service used to perform REST calls.
+ */
+ private final BlobsService service;
+
+ /**
+ * The service client containing this operation class.
+ */
+ private final AzureBlobStorageImpl client;
+
+ /**
+ * Initializes an instance of BlobsImpl.
+ *
+ * @param client the instance of the service client containing this operation class.
+ */
+ BlobsImpl(AzureBlobStorageImpl client) {
+ this.service = RestProxy.create(BlobsService.class, client.getHttpPipeline());
+ this.client = client;
+ }
+
+ /**
+ * The interface defining all the services for AzureBlobStorageBlobs to be used by the proxy service to perform REST
+ * calls.
+ */
+ @ServiceInterface(name = "AzureBlobStorageBlob", host = "{url}")
+ public interface BlobsService {
+ static BlobsService getNewInstance(HttpPipeline pipeline, ObjectSerializer serializer) {
+ try {
+ Class> clazz = Class.forName("com.azure.v2.storage.blob.implementation.BlobsServiceImpl");
+ return (BlobsService) clazz.getMethod("getNewInstance", HttpPipeline.class, ObjectSerializer.class)
+ .invoke(null, pipeline, serializer);
+ } catch (ClassNotFoundException | NoSuchMethodException | IllegalAccessException
+ | InvocationTargetException e) {
+ throw new RuntimeException(e);
+ }
+
+ }
+
+ @HttpRequestInformation(
+ method = HttpMethod.GET,
+ path = "/{containerName}/{blob}",
+ expectedStatusCodes = { 200, 206 })
+ @UnexpectedResponseExceptionDetail(exceptionBodyClass = StorageError.class)
+ Response download(@HostParam("url") String url, @PathParam("containerName") String containerName,
+ @PathParam("blob") String blob, @QueryParam("snapshot") String snapshot,
+ @QueryParam("versionid") String versionId, @QueryParam("timeout") Integer timeout,
+ @HeaderParam("x-ms-range") String range, @HeaderParam("x-ms-lease-id") String leaseId,
+ @HeaderParam("x-ms-range-get-content-md5") Boolean rangeGetContentMD5,
+ @HeaderParam("x-ms-range-get-content-crc64") Boolean rangeGetContentCRC64,
+ @HeaderParam("x-ms-structured-body") String structuredBodyType,
+ @HeaderParam("x-ms-encryption-key") String encryptionKey,
+ @HeaderParam("x-ms-encryption-key-sha256") String encryptionKeySha256,
+ @HeaderParam("x-ms-encryption-algorithm") EncryptionAlgorithmType encryptionAlgorithm,
+ @HeaderParam("If-Modified-Since") DateTimeRfc1123 ifModifiedSince,
+ @HeaderParam("If-Unmodified-Since") DateTimeRfc1123 ifUnmodifiedSince,
+ @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch,
+ @HeaderParam("x-ms-if-tags") String ifTags, @HeaderParam("x-ms-version") String version,
+ @HeaderParam("x-ms-client-request-id") String requestId, @HeaderParam("Accept") String accept,
+ RequestOptions requestOptions);
+
+ @HttpRequestInformation(
+ method = HttpMethod.GET,
+ path = "/{containerName}/{blob}",
+ expectedStatusCodes = { 200, 206 })
+ @UnexpectedResponseExceptionDetail(exceptionBodyClass = StorageError.class)
+ default InputStream download(@HostParam("url") String url, @PathParam("containerName") String containerName,
+ @PathParam("blob") String blob, @HeaderParam("x-ms-version") String version,
+ @HeaderParam("Accept") String accept) {
+ return download(url, containerName, blob, null, null, null, null, null, null, null, null, null, null, null,
+ null, null, null, null, null, version, null, accept, null).getValue();
+ }
+
+ @HttpRequestInformation(
+ method = HttpMethod.HEAD,
+ path = "/{containerName}/{blob}",
+ expectedStatusCodes = { 200 })
+ @UnexpectedResponseExceptionDetail(exceptionBodyClass = StorageError.class)
+ Response getProperties(@HostParam("url") String url, @PathParam("containerName") String containerName,
+ @PathParam("blob") String blob, @QueryParam("snapshot") String snapshot,
+ @QueryParam("versionid") String versionId, @QueryParam("timeout") Integer timeout,
+ @HeaderParam("x-ms-lease-id") String leaseId, @HeaderParam("x-ms-encryption-key") String encryptionKey,
+ @HeaderParam("x-ms-encryption-key-sha256") String encryptionKeySha256,
+ @HeaderParam("x-ms-encryption-algorithm") EncryptionAlgorithmType encryptionAlgorithm,
+ @HeaderParam("If-Modified-Since") DateTimeRfc1123 ifModifiedSince,
+ @HeaderParam("If-Unmodified-Since") DateTimeRfc1123 ifUnmodifiedSince,
+ @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch,
+ @HeaderParam("x-ms-if-tags") String ifTags, @HeaderParam("x-ms-version") String version,
+ @HeaderParam("x-ms-client-request-id") String requestId, @HeaderParam("Accept") String accept,
+ RequestOptions requestOptions);
+
+ @HttpRequestInformation(
+ method = HttpMethod.HEAD,
+ path = "/{containerName}/{blob}",
+ expectedStatusCodes = { 200 })
+ @UnexpectedResponseExceptionDetail(exceptionBodyClass = StorageError.class)
+ default void getProperties(@HostParam("url") String url, @PathParam("containerName") String containerName,
+ @PathParam("blob") String blob, @HeaderParam("x-ms-version") String version,
+ @HeaderParam("Accept") String accept) {
+ getProperties(url, containerName, blob, null, null, null, null, null, null, null, null, null, null, null,
+ null, version, null, accept, null);
+ }
+
+ @HttpRequestInformation(
+ method = HttpMethod.DELETE,
+ path = "/{containerName}/{blob}",
+ expectedStatusCodes = { 202 })
+ @UnexpectedResponseExceptionDetail(exceptionBodyClass = StorageError.class)
+ Response delete(@HostParam("url") String url, @PathParam("containerName") String containerName,
+ @PathParam("blob") String blob, @QueryParam("snapshot") String snapshot,
+ @QueryParam("versionid") String versionId, @QueryParam("timeout") Integer timeout,
+ @HeaderParam("x-ms-lease-id") String leaseId,
+ @HeaderParam("x-ms-delete-snapshots") DeleteSnapshotsOptionType deleteSnapshots,
+ @HeaderParam("If-Modified-Since") DateTimeRfc1123 ifModifiedSince,
+ @HeaderParam("If-Unmodified-Since") DateTimeRfc1123 ifUnmodifiedSince,
+ @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch,
+ @HeaderParam("x-ms-if-tags") String ifTags, @HeaderParam("x-ms-version") String version,
+ @HeaderParam("x-ms-client-request-id") String requestId,
+ @QueryParam("deletetype") BlobDeleteType blobDeleteType, @HeaderParam("Accept") String accept,
+ RequestOptions requestOptions);
+
+ @HttpRequestInformation(
+ method = HttpMethod.DELETE,
+ path = "/{containerName}/{blob}",
+ expectedStatusCodes = { 202 })
+ @UnexpectedResponseExceptionDetail(exceptionBodyClass = StorageError.class)
+ default void delete(@HostParam("url") String url, @PathParam("containerName") String containerName,
+ @PathParam("blob") String blob, @HeaderParam("x-ms-version") String version,
+ @HeaderParam("Accept") String accept) {
+ delete(url, containerName, blob, null, null, null, null, null, null, null, null, null, null, version, null,
+ null, accept, null);
+ }
+
+ @HttpRequestInformation(
+ method = HttpMethod.PUT,
+ path = "/{containerName}/{blob}",
+ expectedStatusCodes = { 200 })
+ @UnexpectedResponseExceptionDetail(exceptionBodyClass = StorageError.class)
+ Response undelete(@HostParam("url") String url, @PathParam("containerName") String containerName,
+ @PathParam("blob") String blob, @QueryParam("comp") String comp, @QueryParam("timeout") Integer timeout,
+ @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId,
+ @HeaderParam("Accept") String accept, RequestOptions requestOptions);
+
+ @HttpRequestInformation(
+ method = HttpMethod.PUT,
+ path = "/{containerName}/{blob}",
+ expectedStatusCodes = { 200 })
+ @UnexpectedResponseExceptionDetail(exceptionBodyClass = StorageError.class)
+ default void undelete(@HostParam("url") String url, @PathParam("containerName") String containerName,
+ @PathParam("blob") String blob, @QueryParam("comp") String comp,
+ @HeaderParam("x-ms-version") String version, @HeaderParam("Accept") String accept) {
+ undelete(url, containerName, blob, comp, null, version, null, accept, null);
+ }
+
+ @HttpRequestInformation(
+ method = HttpMethod.PUT,
+ path = "/{containerName}/{blob}",
+ expectedStatusCodes = { 200 })
+ @UnexpectedResponseExceptionDetail(exceptionBodyClass = StorageError.class)
+ Response setExpiry(@HostParam("url") String url, @PathParam("containerName") String containerName,
+ @PathParam("blob") String blob, @QueryParam("comp") String comp, @QueryParam("timeout") Integer timeout,
+ @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId,
+ @HeaderParam("x-ms-expiry-option") BlobExpiryOptions expiryOptions,
+ @HeaderParam("x-ms-expiry-time") String expiresOn, @HeaderParam("Accept") String accept,
+ RequestOptions requestOptions);
+
+ @HttpRequestInformation(
+ method = HttpMethod.PUT,
+ path = "/{containerName}/{blob}",
+ expectedStatusCodes = { 200 })
+ @UnexpectedResponseExceptionDetail(exceptionBodyClass = StorageError.class)
+ default void setExpiry(@HostParam("url") String url, @PathParam("containerName") String containerName,
+ @PathParam("blob") String blob, @QueryParam("comp") String comp,
+ @HeaderParam("x-ms-version") String version,
+ @HeaderParam("x-ms-expiry-option") BlobExpiryOptions expiryOptions, @HeaderParam("Accept") String accept) {
+ setExpiry(url, containerName, blob, comp, null, version, null, expiryOptions, null, accept, null);
+ }
+
+ @HttpRequestInformation(
+ method = HttpMethod.PUT,
+ path = "/{containerName}/{blob}",
+ expectedStatusCodes = { 200 })
+ @UnexpectedResponseExceptionDetail(exceptionBodyClass = StorageError.class)
+ Response setHttpHeaders(@HostParam("url") String url, @PathParam("containerName") String containerName,
+ @PathParam("blob") String blob, @QueryParam("comp") String comp, @QueryParam("timeout") Integer timeout,
+ @HeaderParam("x-ms-blob-cache-control") String cacheControl,
+ @HeaderParam("x-ms-blob-content-type") String contentType,
+ @HeaderParam("x-ms-blob-content-md5") String contentMd5,
+ @HeaderParam("x-ms-blob-content-encoding") String contentEncoding,
+ @HeaderParam("x-ms-blob-content-language") String contentLanguage,
+ @HeaderParam("x-ms-lease-id") String leaseId,
+ @HeaderParam("If-Modified-Since") DateTimeRfc1123 ifModifiedSince,
+ @HeaderParam("If-Unmodified-Since") DateTimeRfc1123 ifUnmodifiedSince,
+ @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch,
+ @HeaderParam("x-ms-if-tags") String ifTags,
+ @HeaderParam("x-ms-blob-content-disposition") String contentDisposition,
+ @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId,
+ @HeaderParam("Accept") String accept, RequestOptions requestOptions);
+
+ @HttpRequestInformation(
+ method = HttpMethod.PUT,
+ path = "/{containerName}/{blob}",
+ expectedStatusCodes = { 200 })
+ @UnexpectedResponseExceptionDetail(exceptionBodyClass = StorageError.class)
+ default void setHttpHeaders(@HostParam("url") String url, @PathParam("containerName") String containerName,
+ @PathParam("blob") String blob, @QueryParam("comp") String comp,
+ @HeaderParam("x-ms-version") String version, @HeaderParam("Accept") String accept) {
+ setHttpHeaders(url, containerName, blob, comp, null, null, null, null, null, null, null, null, null, null,
+ null, null, null, version, null, accept, null);
+ }
+
+ @HttpRequestInformation(
+ method = HttpMethod.PUT,
+ path = "/{containerName}/{blob}",
+ expectedStatusCodes = { 200 })
+ @UnexpectedResponseExceptionDetail(exceptionBodyClass = StorageError.class)
+ Response setImmutabilityPolicy(@HostParam("url") String url,
+ @PathParam("containerName") String containerName, @PathParam("blob") String blob,
+ @QueryParam("comp") String comp, @QueryParam("timeout") Integer timeout,
+ @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId,
+ @HeaderParam("If-Unmodified-Since") DateTimeRfc1123 ifUnmodifiedSince,
+ @HeaderParam("x-ms-immutability-policy-until-date") DateTimeRfc1123 immutabilityPolicyExpiry,
+ @HeaderParam("x-ms-immutability-policy-mode") BlobImmutabilityPolicyMode immutabilityPolicyMode,
+ @QueryParam("snapshot") String snapshot, @QueryParam("versionid") String versionId,
+ @HeaderParam("Accept") String accept, RequestOptions requestOptions);
+
+ @HttpRequestInformation(
+ method = HttpMethod.PUT,
+ path = "/{containerName}/{blob}",
+ expectedStatusCodes = { 200 })
+ @UnexpectedResponseExceptionDetail(exceptionBodyClass = StorageError.class)
+ default void setImmutabilityPolicy(@HostParam("url") String url,
+ @PathParam("containerName") String containerName, @PathParam("blob") String blob,
+ @QueryParam("comp") String comp, @HeaderParam("x-ms-version") String version,
+ @HeaderParam("Accept") String accept) {
+ setImmutabilityPolicy(url, containerName, blob, comp, null, version, null, null, null, null, null, null,
+ accept, null);
+ }
+
+ @HttpRequestInformation(
+ method = HttpMethod.DELETE,
+ path = "/{containerName}/{blob}",
+ expectedStatusCodes = { 200 })
+ @UnexpectedResponseExceptionDetail(exceptionBodyClass = StorageError.class)
+ Response deleteImmutabilityPolicy(@HostParam("url") String url,
+ @PathParam("containerName") String containerName, @PathParam("blob") String blob,
+ @QueryParam("comp") String comp, @QueryParam("timeout") Integer timeout,
+ @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId,
+ @QueryParam("snapshot") String snapshot, @QueryParam("versionid") String versionId,
+ @HeaderParam("Accept") String accept, RequestOptions requestOptions);
+
+ @HttpRequestInformation(
+ method = HttpMethod.DELETE,
+ path = "/{containerName}/{blob}",
+ expectedStatusCodes = { 200 })
+ @UnexpectedResponseExceptionDetail(exceptionBodyClass = StorageError.class)
+ default void deleteImmutabilityPolicy(@HostParam("url") String url,
+ @PathParam("containerName") String containerName, @PathParam("blob") String blob,
+ @QueryParam("comp") String comp, @HeaderParam("x-ms-version") String version,
+ @HeaderParam("Accept") String accept) {
+ deleteImmutabilityPolicy(url, containerName, blob, comp, null, version, null, null, null, accept, null);
+ }
+
+ @HttpRequestInformation(
+ method = HttpMethod.PUT,
+ path = "/{containerName}/{blob}",
+ expectedStatusCodes = { 200 })
+ @UnexpectedResponseExceptionDetail(exceptionBodyClass = StorageError.class)
+ Response setLegalHold(@HostParam("url") String url, @PathParam("containerName") String containerName,
+ @PathParam("blob") String blob, @QueryParam("comp") String comp, @QueryParam("timeout") Integer timeout,
+ @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId,
+ @HeaderParam("x-ms-legal-hold") boolean legalHold, @QueryParam("snapshot") String snapshot,
+ @QueryParam("versionid") String versionId, @HeaderParam("Accept") String accept,
+ RequestOptions requestOptions);
+
+ @HttpRequestInformation(
+ method = HttpMethod.PUT,
+ path = "/{containerName}/{blob}",
+ expectedStatusCodes = { 200 })
+ @UnexpectedResponseExceptionDetail(exceptionBodyClass = StorageError.class)
+ default void setLegalHold(@HostParam("url") String url, @PathParam("containerName") String containerName,
+ @PathParam("blob") String blob, @QueryParam("comp") String comp,
+ @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-legal-hold") boolean legalHold,
+ @HeaderParam("Accept") String accept) {
+ setLegalHold(url, containerName, blob, comp, null, version, null, legalHold, null, null, accept, null);
+ }
+
+ @HttpRequestInformation(
+ method = HttpMethod.PUT,
+ path = "/{containerName}/{blob}",
+ expectedStatusCodes = { 200 })
+ @UnexpectedResponseExceptionDetail(exceptionBodyClass = StorageError.class)
+ Response setMetadata(@HostParam("url") String url, @PathParam("containerName") String containerName,
+ @PathParam("blob") String blob, @QueryParam("comp") String comp, @QueryParam("timeout") Integer timeout,
+ @HeaderParam("x-ms-meta-") Map metadata, @HeaderParam("x-ms-lease-id") String leaseId,
+ @HeaderParam("x-ms-encryption-key") String encryptionKey,
+ @HeaderParam("x-ms-encryption-key-sha256") String encryptionKeySha256,
+ @HeaderParam("x-ms-encryption-algorithm") EncryptionAlgorithmType encryptionAlgorithm,
+ @HeaderParam("x-ms-encryption-scope") String encryptionScope,
+ @HeaderParam("If-Modified-Since") DateTimeRfc1123 ifModifiedSince,
+ @HeaderParam("If-Unmodified-Since") DateTimeRfc1123 ifUnmodifiedSince,
+ @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch,
+ @HeaderParam("x-ms-if-tags") String ifTags, @HeaderParam("x-ms-version") String version,
+ @HeaderParam("x-ms-client-request-id") String requestId, @HeaderParam("Accept") String accept,
+ RequestOptions requestOptions);
+
+ @HttpRequestInformation(
+ method = HttpMethod.PUT,
+ path = "/{containerName}/{blob}",
+ expectedStatusCodes = { 200 })
+ @UnexpectedResponseExceptionDetail(exceptionBodyClass = StorageError.class)
+ default void setMetadata(@HostParam("url") String url, @PathParam("containerName") String containerName,
+ @PathParam("blob") String blob, @QueryParam("comp") String comp,
+ @HeaderParam("x-ms-version") String version, @HeaderParam("Accept") String accept) {
+ setMetadata(url, containerName, blob, comp, null, null, null, null, null, null, null, null, null, null,
+ null, null, version, null, accept, null);
+ }
+
+ @HttpRequestInformation(
+ method = HttpMethod.PUT,
+ path = "/{containerName}/{blob}",
+ expectedStatusCodes = { 201 })
+ @UnexpectedResponseExceptionDetail(exceptionBodyClass = StorageError.class)
+ Response acquireLease(@HostParam("url") String url, @PathParam("containerName") String containerName,
+ @PathParam("blob") String blob, @QueryParam("comp") String comp,
+ @HeaderParam("x-ms-lease-action") String action, @QueryParam("timeout") Integer timeout,
+ @HeaderParam("x-ms-lease-duration") Integer duration,
+ @HeaderParam("x-ms-proposed-lease-id") String proposedLeaseId,
+ @HeaderParam("If-Modified-Since") DateTimeRfc1123 ifModifiedSince,
+ @HeaderParam("If-Unmodified-Since") DateTimeRfc1123 ifUnmodifiedSince,
+ @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch,
+ @HeaderParam("x-ms-if-tags") String ifTags, @HeaderParam("x-ms-version") String version,
+ @HeaderParam("x-ms-client-request-id") String requestId, @HeaderParam("Accept") String accept,
+ RequestOptions requestOptions);
+
+ @HttpRequestInformation(
+ method = HttpMethod.PUT,
+ path = "/{containerName}/{blob}",
+ expectedStatusCodes = { 201 })
+ @UnexpectedResponseExceptionDetail(exceptionBodyClass = StorageError.class)
+ default void acquireLease(@HostParam("url") String url, @PathParam("containerName") String containerName,
+ @PathParam("blob") String blob, @QueryParam("comp") String comp,
+ @HeaderParam("x-ms-lease-action") String action, @HeaderParam("x-ms-version") String version,
+ @HeaderParam("Accept") String accept) {
+ acquireLease(url, containerName, blob, comp, action, null, null, null, null, null, null, null, null,
+ version, null, accept, null);
+ }
+
+ @HttpRequestInformation(
+ method = HttpMethod.PUT,
+ path = "/{containerName}/{blob}",
+ expectedStatusCodes = { 200 })
+ @UnexpectedResponseExceptionDetail(exceptionBodyClass = StorageError.class)
+ Response releaseLease(@HostParam("url") String url, @PathParam("containerName") String containerName,
+ @PathParam("blob") String blob, @QueryParam("comp") String comp,
+ @HeaderParam("x-ms-lease-action") String action, @QueryParam("timeout") Integer timeout,
+ @HeaderParam("x-ms-lease-id") String leaseId,
+ @HeaderParam("If-Modified-Since") DateTimeRfc1123 ifModifiedSince,
+ @HeaderParam("If-Unmodified-Since") DateTimeRfc1123 ifUnmodifiedSince,
+ @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch,
+ @HeaderParam("x-ms-if-tags") String ifTags, @HeaderParam("x-ms-version") String version,
+ @HeaderParam("x-ms-client-request-id") String requestId, @HeaderParam("Accept") String accept,
+ RequestOptions requestOptions);
+
+ @HttpRequestInformation(
+ method = HttpMethod.PUT,
+ path = "/{containerName}/{blob}",
+ expectedStatusCodes = { 200 })
+ @UnexpectedResponseExceptionDetail(exceptionBodyClass = StorageError.class)
+ default void releaseLease(@HostParam("url") String url, @PathParam("containerName") String containerName,
+ @PathParam("blob") String blob, @QueryParam("comp") String comp,
+ @HeaderParam("x-ms-lease-action") String action, @HeaderParam("x-ms-lease-id") String leaseId,
+ @HeaderParam("x-ms-version") String version, @HeaderParam("Accept") String accept) {
+ releaseLease(url, containerName, blob, comp, action, null, leaseId, null, null, null, null, null, version,
+ null, accept, null);
+ }
+
+ @HttpRequestInformation(
+ method = HttpMethod.PUT,
+ path = "/{containerName}/{blob}",
+ expectedStatusCodes = { 200 })
+ @UnexpectedResponseExceptionDetail(exceptionBodyClass = StorageError.class)
+ Response renewLease(@HostParam("url") String url, @PathParam("containerName") String containerName,
+ @PathParam("blob") String blob, @QueryParam("comp") String comp,
+ @HeaderParam("x-ms-lease-action") String action, @QueryParam("timeout") Integer timeout,
+ @HeaderParam("x-ms-lease-id") String leaseId,
+ @HeaderParam("If-Modified-Since") DateTimeRfc1123 ifModifiedSince,
+ @HeaderParam("If-Unmodified-Since") DateTimeRfc1123 ifUnmodifiedSince,
+ @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch,
+ @HeaderParam("x-ms-if-tags") String ifTags, @HeaderParam("x-ms-version") String version,
+ @HeaderParam("x-ms-client-request-id") String requestId, @HeaderParam("Accept") String accept,
+ RequestOptions requestOptions);
+
+ @HttpRequestInformation(
+ method = HttpMethod.PUT,
+ path = "/{containerName}/{blob}",
+ expectedStatusCodes = { 200 })
+ @UnexpectedResponseExceptionDetail(exceptionBodyClass = StorageError.class)
+ default void renewLease(@HostParam("url") String url, @PathParam("containerName") String containerName,
+ @PathParam("blob") String blob, @QueryParam("comp") String comp,
+ @HeaderParam("x-ms-lease-action") String action, @HeaderParam("x-ms-lease-id") String leaseId,
+ @HeaderParam("x-ms-version") String version, @HeaderParam("Accept") String accept) {
+ renewLease(url, containerName, blob, comp, action, null, leaseId, null, null, null, null, null, version,
+ null, accept, null);
+ }
+
+ @HttpRequestInformation(
+ method = HttpMethod.PUT,
+ path = "/{containerName}/{blob}",
+ expectedStatusCodes = { 200 })
+ @UnexpectedResponseExceptionDetail(exceptionBodyClass = StorageError.class)
+ Response changeLease(@HostParam("url") String url, @PathParam("containerName") String containerName,
+ @PathParam("blob") String blob, @QueryParam("comp") String comp,
+ @HeaderParam("x-ms-lease-action") String action, @QueryParam("timeout") Integer timeout,
+ @HeaderParam("x-ms-lease-id") String leaseId, @HeaderParam("x-ms-proposed-lease-id") String proposedLeaseId,
+ @HeaderParam("If-Modified-Since") DateTimeRfc1123 ifModifiedSince,
+ @HeaderParam("If-Unmodified-Since") DateTimeRfc1123 ifUnmodifiedSince,
+ @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch,
+ @HeaderParam("x-ms-if-tags") String ifTags, @HeaderParam("x-ms-version") String version,
+ @HeaderParam("x-ms-client-request-id") String requestId, @HeaderParam("Accept") String accept,
+ RequestOptions requestOptions);
+
+ @HttpRequestInformation(
+ method = HttpMethod.PUT,
+ path = "/{containerName}/{blob}",
+ expectedStatusCodes = { 200 })
+ @UnexpectedResponseExceptionDetail(exceptionBodyClass = StorageError.class)
+ default void changeLease(@HostParam("url") String url, @PathParam("containerName") String containerName,
+ @PathParam("blob") String blob, @QueryParam("comp") String comp,
+ @HeaderParam("x-ms-lease-action") String action, @HeaderParam("x-ms-lease-id") String leaseId,
+ @HeaderParam("x-ms-proposed-lease-id") String proposedLeaseId, @HeaderParam("x-ms-version") String version,
+ @HeaderParam("Accept") String accept) {
+ changeLease(url, containerName, blob, comp, action, null, leaseId, proposedLeaseId, null, null, null, null,
+ null, version, null, accept, null);
+ }
+
+ @HttpRequestInformation(
+ method = HttpMethod.PUT,
+ path = "/{containerName}/{blob}",
+ expectedStatusCodes = { 202 })
+ @UnexpectedResponseExceptionDetail(exceptionBodyClass = StorageError.class)
+ Response breakLease(@HostParam("url") String url, @PathParam("containerName") String containerName,
+ @PathParam("blob") String blob, @QueryParam("comp") String comp,
+ @HeaderParam("x-ms-lease-action") String action, @QueryParam("timeout") Integer timeout,
+ @HeaderParam("x-ms-lease-break-period") Integer breakPeriod,
+ @HeaderParam("If-Modified-Since") DateTimeRfc1123 ifModifiedSince,
+ @HeaderParam("If-Unmodified-Since") DateTimeRfc1123 ifUnmodifiedSince,
+ @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch,
+ @HeaderParam("x-ms-if-tags") String ifTags, @HeaderParam("x-ms-version") String version,
+ @HeaderParam("x-ms-client-request-id") String requestId, @HeaderParam("Accept") String accept,
+ RequestOptions requestOptions);
+
+ @HttpRequestInformation(
+ method = HttpMethod.PUT,
+ path = "/{containerName}/{blob}",
+ expectedStatusCodes = { 202 })
+ @UnexpectedResponseExceptionDetail(exceptionBodyClass = StorageError.class)
+ default void breakLease(@HostParam("url") String url, @PathParam("containerName") String containerName,
+ @PathParam("blob") String blob, @QueryParam("comp") String comp,
+ @HeaderParam("x-ms-lease-action") String action, @HeaderParam("x-ms-version") String version,
+ @HeaderParam("Accept") String accept) {
+ breakLease(url, containerName, blob, comp, action, null, null, null, null, null, null, null, version, null,
+ accept, null);
+ }
+
+ @HttpRequestInformation(
+ method = HttpMethod.PUT,
+ path = "/{containerName}/{blob}",
+ expectedStatusCodes = { 201 })
+ @UnexpectedResponseExceptionDetail(exceptionBodyClass = StorageError.class)
+ Response createSnapshot(@HostParam("url") String url, @PathParam("containerName") String containerName,
+ @PathParam("blob") String blob, @QueryParam("comp") String comp, @QueryParam("timeout") Integer timeout,
+ @HeaderParam("x-ms-meta-") Map metadata,
+ @HeaderParam("x-ms-encryption-key") String encryptionKey,
+ @HeaderParam("x-ms-encryption-key-sha256") String encryptionKeySha256,
+ @HeaderParam("x-ms-encryption-algorithm") EncryptionAlgorithmType encryptionAlgorithm,
+ @HeaderParam("x-ms-encryption-scope") String encryptionScope,
+ @HeaderParam("If-Modified-Since") DateTimeRfc1123 ifModifiedSince,
+ @HeaderParam("If-Unmodified-Since") DateTimeRfc1123 ifUnmodifiedSince,
+ @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch,
+ @HeaderParam("x-ms-if-tags") String ifTags, @HeaderParam("x-ms-lease-id") String leaseId,
+ @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId,
+ @HeaderParam("Accept") String accept, RequestOptions requestOptions);
+
+ @HttpRequestInformation(
+ method = HttpMethod.PUT,
+ path = "/{containerName}/{blob}",
+ expectedStatusCodes = { 201 })
+ @UnexpectedResponseExceptionDetail(exceptionBodyClass = StorageError.class)
+ default void createSnapshot(@HostParam("url") String url, @PathParam("containerName") String containerName,
+ @PathParam("blob") String blob, @QueryParam("comp") String comp,
+ @HeaderParam("x-ms-version") String version, @HeaderParam("Accept") String accept) {
+ createSnapshot(url, containerName, blob, comp, null, null, null, null, null, null, null, null, null, null,
+ null, null, version, null, accept, null);
+ }
+
+ @HttpRequestInformation(
+ method = HttpMethod.PUT,
+ path = "/{containerName}/{blob}",
+ expectedStatusCodes = { 202 })
+ @UnexpectedResponseExceptionDetail(exceptionBodyClass = StorageError.class)
+ Response startCopyFromURL(@HostParam("url") String url, @PathParam("containerName") String containerName,
+ @PathParam("blob") String blob, @QueryParam("timeout") Integer timeout,
+ @HeaderParam("x-ms-meta-") Map metadata, @HeaderParam("x-ms-access-tier") AccessTier tier,
+ @HeaderParam("x-ms-rehydrate-priority") RehydratePriority rehydratePriority,
+ @HeaderParam("x-ms-source-if-modified-since") DateTimeRfc1123 sourceIfModifiedSince,
+ @HeaderParam("x-ms-source-if-unmodified-since") DateTimeRfc1123 sourceIfUnmodifiedSince,
+ @HeaderParam("x-ms-source-if-match") String sourceIfMatch,
+ @HeaderParam("x-ms-source-if-none-match") String sourceIfNoneMatch,
+ @HeaderParam("x-ms-source-if-tags") String sourceIfTags,
+ @HeaderParam("If-Modified-Since") DateTimeRfc1123 ifModifiedSince,
+ @HeaderParam("If-Unmodified-Since") DateTimeRfc1123 ifUnmodifiedSince,
+ @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch,
+ @HeaderParam("x-ms-if-tags") String ifTags, @HeaderParam("x-ms-copy-source") String copySource,
+ @HeaderParam("x-ms-lease-id") String leaseId, @HeaderParam("x-ms-version") String version,
+ @HeaderParam("x-ms-client-request-id") String requestId, @HeaderParam("x-ms-tags") String blobTagsString,
+ @HeaderParam("x-ms-seal-blob") Boolean sealBlob,
+ @HeaderParam("x-ms-immutability-policy-until-date") DateTimeRfc1123 immutabilityPolicyExpiry,
+ @HeaderParam("x-ms-immutability-policy-mode") BlobImmutabilityPolicyMode immutabilityPolicyMode,
+ @HeaderParam("x-ms-legal-hold") Boolean legalHold, @HeaderParam("Accept") String accept,
+ RequestOptions requestOptions);
+
+ @HttpRequestInformation(
+ method = HttpMethod.PUT,
+ path = "/{containerName}/{blob}",
+ expectedStatusCodes = { 202 })
+ @UnexpectedResponseExceptionDetail(exceptionBodyClass = StorageError.class)
+ default void startCopyFromURL(@HostParam("url") String url, @PathParam("containerName") String containerName,
+ @PathParam("blob") String blob, @HeaderParam("x-ms-copy-source") String copySource,
+ @HeaderParam("x-ms-version") String version, @HeaderParam("Accept") String accept) {
+ startCopyFromURL(url, containerName, blob, null, null, null, null, null, null, null, null, null, null, null,
+ null, null, null, copySource, null, version, null, null, null, null, null, null, accept, null);
+ }
+
+ @HttpRequestInformation(
+ method = HttpMethod.PUT,
+ path = "/{containerName}/{blob}",
+ expectedStatusCodes = { 202 })
+ @UnexpectedResponseExceptionDetail(exceptionBodyClass = StorageError.class)
+ Response copyFromURL(@HostParam("url") String url, @PathParam("containerName") String containerName,
+ @PathParam("blob") String blob, @HeaderParam("x-ms-requires-sync") String xMsRequiresSync,
+ @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-meta-") Map metadata,
+ @HeaderParam("x-ms-access-tier") AccessTier tier,
+ @HeaderParam("x-ms-source-if-modified-since") DateTimeRfc1123 sourceIfModifiedSince,
+ @HeaderParam("x-ms-source-if-unmodified-since") DateTimeRfc1123 sourceIfUnmodifiedSince,
+ @HeaderParam("x-ms-source-if-match") String sourceIfMatch,
+ @HeaderParam("x-ms-source-if-none-match") String sourceIfNoneMatch,
+ @HeaderParam("If-Modified-Since") DateTimeRfc1123 ifModifiedSince,
+ @HeaderParam("If-Unmodified-Since") DateTimeRfc1123 ifUnmodifiedSince,
+ @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch,
+ @HeaderParam("x-ms-if-tags") String ifTags, @HeaderParam("x-ms-copy-source") String copySource,
+ @HeaderParam("x-ms-lease-id") String leaseId, @HeaderParam("x-ms-version") String version,
+ @HeaderParam("x-ms-client-request-id") String requestId,
+ @HeaderParam("x-ms-source-content-md5") String sourceContentMD5,
+ @HeaderParam("x-ms-tags") String blobTagsString,
+ @HeaderParam("x-ms-immutability-policy-until-date") DateTimeRfc1123 immutabilityPolicyExpiry,
+ @HeaderParam("x-ms-immutability-policy-mode") BlobImmutabilityPolicyMode immutabilityPolicyMode,
+ @HeaderParam("x-ms-legal-hold") Boolean legalHold,
+ @HeaderParam("x-ms-copy-source-authorization") String copySourceAuthorization,
+ @HeaderParam("x-ms-encryption-scope") String encryptionScope,
+ @HeaderParam("x-ms-copy-source-tag-option") BlobCopySourceTagsMode copySourceTags,
+ @HeaderParam("Accept") String accept, RequestOptions requestOptions);
+
+ @HttpRequestInformation(
+ method = HttpMethod.PUT,
+ path = "/{containerName}/{blob}",
+ expectedStatusCodes = { 202 })
+ @UnexpectedResponseExceptionDetail(exceptionBodyClass = StorageError.class)
+ default void copyFromURL(@HostParam("url") String url, @PathParam("containerName") String containerName,
+ @PathParam("blob") String blob, @HeaderParam("x-ms-requires-sync") String xMsRequiresSync,
+ @HeaderParam("x-ms-copy-source") String copySource, @HeaderParam("x-ms-version") String version,
+ @HeaderParam("Accept") String accept) {
+ copyFromURL(url, containerName, blob, xMsRequiresSync, null, null, null, null, null, null, null, null, null,
+ null, null, null, copySource, null, version, null, null, null, null, null, null, null, null, null,
+ accept, null);
+ }
+
+ @HttpRequestInformation(
+ method = HttpMethod.PUT,
+ path = "/{containerName}/{blob}",
+ expectedStatusCodes = { 204 })
+ @UnexpectedResponseExceptionDetail(exceptionBodyClass = StorageError.class)
+ Response abortCopyFromURL(@HostParam("url") String url, @PathParam("containerName") String containerName,
+ @PathParam("blob") String blob, @QueryParam("comp") String comp,
+ @HeaderParam("x-ms-copy-action") String copyActionAbortConstant, @QueryParam("copyid") String copyId,
+ @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-lease-id") String leaseId,
+ @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId,
+ @HeaderParam("Accept") String accept, RequestOptions requestOptions);
+
+ @HttpRequestInformation(
+ method = HttpMethod.PUT,
+ path = "/{containerName}/{blob}",
+ expectedStatusCodes = { 204 })
+ @UnexpectedResponseExceptionDetail(exceptionBodyClass = StorageError.class)
+ default void abortCopyFromURL(@HostParam("url") String url, @PathParam("containerName") String containerName,
+ @PathParam("blob") String blob, @QueryParam("comp") String comp,
+ @HeaderParam("x-ms-copy-action") String copyActionAbortConstant, @QueryParam("copyid") String copyId,
+ @HeaderParam("x-ms-version") String version, @HeaderParam("Accept") String accept) {
+ abortCopyFromURL(url, containerName, blob, comp, copyActionAbortConstant, copyId, null, null, version, null,
+ accept, null);
+ }
+
+ @HttpRequestInformation(
+ method = HttpMethod.PUT,
+ path = "/{containerName}/{blob}",
+ expectedStatusCodes = { 200, 202 })
+ @UnexpectedResponseExceptionDetail(exceptionBodyClass = StorageError.class)
+ Response setTier(@HostParam("url") String url, @PathParam("containerName") String containerName,
+ @PathParam("blob") String blob, @QueryParam("comp") String comp, @QueryParam("snapshot") String snapshot,
+ @QueryParam("versionid") String versionId, @QueryParam("timeout") Integer timeout,
+ @HeaderParam("x-ms-access-tier") AccessTier tier,
+ @HeaderParam("x-ms-rehydrate-priority") RehydratePriority rehydratePriority,
+ @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId,
+ @HeaderParam("x-ms-lease-id") String leaseId, @HeaderParam("x-ms-if-tags") String ifTags,
+ @HeaderParam("Accept") String accept, RequestOptions requestOptions);
+
+ @HttpRequestInformation(
+ method = HttpMethod.PUT,
+ path = "/{containerName}/{blob}",
+ expectedStatusCodes = { 200, 202 })
+ @UnexpectedResponseExceptionDetail(exceptionBodyClass = StorageError.class)
+ default void setTier(@HostParam("url") String url, @PathParam("containerName") String containerName,
+ @PathParam("blob") String blob, @QueryParam("comp") String comp,
+ @HeaderParam("x-ms-access-tier") AccessTier tier, @HeaderParam("x-ms-version") String version,
+ @HeaderParam("Accept") String accept) {
+ setTier(url, containerName, blob, comp, null, null, null, tier, null, version, null, null, null, accept,
+ null);
+ }
+
+ @HttpRequestInformation(
+ method = HttpMethod.GET,
+ path = "/{containerName}/{blob}",
+ expectedStatusCodes = { 200 })
+ @UnexpectedResponseExceptionDetail(exceptionBodyClass = StorageError.class)
+ Response getAccountInfo(@HostParam("url") String url, @PathParam("containerName") String containerName,
+ @PathParam("blob") String blob, @QueryParam("restype") String restype, @QueryParam("comp") String comp,
+ @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-version") String version,
+ @HeaderParam("x-ms-client-request-id") String requestId, @HeaderParam("Accept") String accept,
+ RequestOptions requestOptions);
+
+ @HttpRequestInformation(
+ method = HttpMethod.GET,
+ path = "/{containerName}/{blob}",
+ expectedStatusCodes = { 200 })
+ @UnexpectedResponseExceptionDetail(exceptionBodyClass = StorageError.class)
+ default void getAccountInfo(@HostParam("url") String url, @PathParam("containerName") String containerName,
+ @PathParam("blob") String blob, @QueryParam("restype") String restype, @QueryParam("comp") String comp,
+ @HeaderParam("x-ms-version") String version, @HeaderParam("Accept") String accept) {
+ getAccountInfo(url, containerName, blob, restype, comp, null, version, null, accept, null);
+ }
+
+ @HttpRequestInformation(
+ method = HttpMethod.POST,
+ path = "/{containerName}/{blob}",
+ expectedStatusCodes = { 200, 206 })
+ @UnexpectedResponseExceptionDetail(exceptionBodyClass = StorageError.class)
+ Response query(@HostParam("url") String url, @PathParam("containerName") String containerName,
+ @PathParam("blob") String blob, @QueryParam("comp") String comp, @QueryParam("snapshot") String snapshot,
+ @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-lease-id") String leaseId,
+ @HeaderParam("x-ms-encryption-key") String encryptionKey,
+ @HeaderParam("x-ms-encryption-key-sha256") String encryptionKeySha256,
+ @HeaderParam("x-ms-encryption-algorithm") EncryptionAlgorithmType encryptionAlgorithm,
+ @HeaderParam("If-Modified-Since") DateTimeRfc1123 ifModifiedSince,
+ @HeaderParam("If-Unmodified-Since") DateTimeRfc1123 ifUnmodifiedSince,
+ @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch,
+ @HeaderParam("x-ms-if-tags") String ifTags, @HeaderParam("x-ms-version") String version,
+ @HeaderParam("x-ms-client-request-id") String requestId,
+ @BodyParam("application/xml") QueryRequest queryRequest, @HeaderParam("Accept") String accept,
+ RequestOptions requestOptions);
+
+ @HttpRequestInformation(
+ method = HttpMethod.POST,
+ path = "/{containerName}/{blob}",
+ expectedStatusCodes = { 200, 206 })
+ @UnexpectedResponseExceptionDetail(exceptionBodyClass = StorageError.class)
+ default InputStream query(@HostParam("url") String url, @PathParam("containerName") String containerName,
+ @PathParam("blob") String blob, @QueryParam("comp") String comp,
+ @HeaderParam("x-ms-version") String version, @HeaderParam("Accept") String accept) {
+ return query(url, containerName, blob, comp, null, null, null, null, null, null, null, null, null, null,
+ null, version, null, null, accept, null).getValue();
+ }
+
+ @HttpRequestInformation(
+ method = HttpMethod.GET,
+ path = "/{containerName}/{blob}",
+ expectedStatusCodes = { 200 })
+ @UnexpectedResponseExceptionDetail(exceptionBodyClass = StorageError.class)
+ Response getTags(@HostParam("url") String url, @PathParam("containerName") String containerName,
+ @PathParam("blob") String blob, @QueryParam("comp") String comp, @QueryParam("timeout") Integer timeout,
+ @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId,
+ @QueryParam("snapshot") String snapshot, @QueryParam("versionid") String versionId,
+ @HeaderParam("x-ms-if-tags") String ifTags, @HeaderParam("x-ms-lease-id") String leaseId,
+ @HeaderParam("Accept") String accept, RequestOptions requestOptions);
+
+ @HttpRequestInformation(
+ method = HttpMethod.GET,
+ path = "/{containerName}/{blob}",
+ expectedStatusCodes = { 200 })
+ @UnexpectedResponseExceptionDetail(exceptionBodyClass = StorageError.class)
+ default BlobTags getTags(@HostParam("url") String url, @PathParam("containerName") String containerName,
+ @PathParam("blob") String blob, @QueryParam("comp") String comp,
+ @HeaderParam("x-ms-version") String version, @HeaderParam("Accept") String accept) {
+ return getTags(url, containerName, blob, comp, null, version, null, null, null, null, null, accept, null)
+ .getValue();
+ }
+
+ @HttpRequestInformation(
+ method = HttpMethod.PUT,
+ path = "/{containerName}/{blob}",
+ expectedStatusCodes = { 204 })
+ @UnexpectedResponseExceptionDetail(exceptionBodyClass = StorageError.class)
+ Response setTags(@HostParam("url") String url, @PathParam("containerName") String containerName,
+ @PathParam("blob") String blob, @QueryParam("comp") String comp,
+ @HeaderParam("x-ms-version") String version, @QueryParam("timeout") Integer timeout,
+ @QueryParam("versionid") String versionId, @HeaderParam("Content-MD5") String transactionalContentMD5,
+ @HeaderParam("x-ms-content-crc64") String transactionalContentCrc64,
+ @HeaderParam("x-ms-client-request-id") String requestId, @HeaderParam("x-ms-if-tags") String ifTags,
+ @HeaderParam("x-ms-lease-id") String leaseId, @BodyParam("application/xml") BlobTags tags,
+ @HeaderParam("Accept") String accept, RequestOptions requestOptions);
+
+ @HttpRequestInformation(
+ method = HttpMethod.PUT,
+ path = "/{containerName}/{blob}",
+ expectedStatusCodes = { 204 })
+ @UnexpectedResponseExceptionDetail(exceptionBodyClass = StorageError.class)
+ default void setTags(@HostParam("url") String url, @PathParam("containerName") String containerName,
+ @PathParam("blob") String blob, @QueryParam("comp") String comp,
+ @HeaderParam("x-ms-version") String version, @HeaderParam("Accept") String accept) {
+ setTags(url, containerName, blob, comp, version, null, null, null, null, null, null, null, null, accept,
+ null);
+ }
+ }
+
+ /**
+ * The Download operation reads or downloads a blob from the system, including its metadata and properties. You can
+ * also call Download to read a snapshot or version.
+ *
+ * @param containerName The container name.
+ * @param blob The blob name.
+ * @param snapshot The snapshot parameter is an opaque DateTime value that, when present, specifies the blob
+ * snapshot to retrieve. For more information on working with blob snapshots, see <a
+ * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/creating-a-snapshot-of-a-blob">Creating
+ * a Snapshot of a Blob.</a>.
+ * @param versionId The version id parameter is an opaque DateTime value that, when present, specifies the version
+ * of the blob to operate on. It's for service version 2019-10-10 and newer.
+ * @param timeout The timeout parameter is expressed in seconds. For more information, see <a
+ * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting
+ * Timeouts for Blob Service Operations.</a>.
+ * @param range Return only the bytes of the blob in the specified range.
+ * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID.
+ * @param rangeGetContentMD5 When set to true and specified together with the Range, the service returns the MD5
+ * hash for the range, as long as the range is less than or equal to 4 MB in size.
+ * @param rangeGetContentCRC64 When set to true and specified together with the Range, the service returns the CRC64
+ * hash for the range, as long as the range is less than or equal to 4 MB in size.
+ * @param structuredBodyType Specifies the response content should be returned as a structured message and specifies
+ * the message schema version and properties.
+ * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the
+ * specified date/time.
+ * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since
+ * the specified date/time.
+ * @param ifMatch Specify an ETag value to operate only on blobs with a matching value.
+ * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value.
+ * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value.
+ * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the
+ * analytics logs when storage analytics logging is enabled.
+ * @param cpkInfo Parameter group.
+ * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the service returns an error.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response.
+ */
+ public Response downloadWithResponse(String containerName, String blob, String snapshot,
+ String versionId, Integer timeout, String range, String leaseId, Boolean rangeGetContentMD5,
+ Boolean rangeGetContentCRC64, String structuredBodyType, OffsetDateTime ifModifiedSince,
+ OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, String ifTags, String requestId,
+ CpkInfo cpkInfo, RequestOptions requestOptions) {
+ final String accept = "application/xml";
+ String encryptionKeyInternal = null;
+ if (cpkInfo != null) {
+ encryptionKeyInternal = cpkInfo.getEncryptionKey();
+ }
+ String encryptionKey = encryptionKeyInternal;
+ String encryptionKeySha256Internal = null;
+ if (cpkInfo != null) {
+ encryptionKeySha256Internal = cpkInfo.getEncryptionKeySha256();
+ }
+ String encryptionKeySha256 = encryptionKeySha256Internal;
+ EncryptionAlgorithmType encryptionAlgorithmInternal = null;
+ if (cpkInfo != null) {
+ encryptionAlgorithmInternal = cpkInfo.getEncryptionAlgorithm();
+ }
+ EncryptionAlgorithmType encryptionAlgorithm = encryptionAlgorithmInternal;
+ DateTimeRfc1123 ifModifiedSinceConverted
+ = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince);
+ DateTimeRfc1123 ifUnmodifiedSinceConverted
+ = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince);
+ return service.download(this.client.getUrl(), containerName, blob, snapshot, versionId, timeout, range, leaseId,
+ rangeGetContentMD5, rangeGetContentCRC64, structuredBodyType, encryptionKey, encryptionKeySha256,
+ encryptionAlgorithm, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags,
+ this.client.getVersion(), requestId, accept, requestOptions);
+ }
+
+ /**
+ * The Download operation reads or downloads a blob from the system, including its metadata and properties. You can
+ * also call Download to read a snapshot or version.
+ *
+ * @param containerName The container name.
+ * @param blob The blob name.
+ * @param snapshot The snapshot parameter is an opaque DateTime value that, when present, specifies the blob
+ * snapshot to retrieve. For more information on working with blob snapshots, see <a
+ * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/creating-a-snapshot-of-a-blob">Creating
+ * a Snapshot of a Blob.</a>.
+ * @param versionId The version id parameter is an opaque DateTime value that, when present, specifies the version
+ * of the blob to operate on. It's for service version 2019-10-10 and newer.
+ * @param timeout The timeout parameter is expressed in seconds. For more information, see <a
+ * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting
+ * Timeouts for Blob Service Operations.</a>.
+ * @param range Return only the bytes of the blob in the specified range.
+ * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID.
+ * @param rangeGetContentMD5 When set to true and specified together with the Range, the service returns the MD5
+ * hash for the range, as long as the range is less than or equal to 4 MB in size.
+ * @param rangeGetContentCRC64 When set to true and specified together with the Range, the service returns the CRC64
+ * hash for the range, as long as the range is less than or equal to 4 MB in size.
+ * @param structuredBodyType Specifies the response content should be returned as a structured message and specifies
+ * the message schema version and properties.
+ * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the
+ * specified date/time.
+ * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since
+ * the specified date/time.
+ * @param ifMatch Specify an ETag value to operate only on blobs with a matching value.
+ * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value.
+ * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value.
+ * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the
+ * analytics logs when storage analytics logging is enabled.
+ * @param cpkInfo Parameter group.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the service returns an error.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response.
+ */
+ public InputStream download(String containerName, String blob, String snapshot, String versionId, Integer timeout,
+ String range, String leaseId, Boolean rangeGetContentMD5, Boolean rangeGetContentCRC64,
+ String structuredBodyType, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch,
+ String ifNoneMatch, String ifTags, String requestId, CpkInfo cpkInfo) {
+ return downloadWithResponse(containerName, blob, snapshot, versionId, timeout, range, leaseId,
+ rangeGetContentMD5, rangeGetContentCRC64, structuredBodyType, ifModifiedSince, ifUnmodifiedSince, ifMatch,
+ ifNoneMatch, ifTags, requestId, cpkInfo, RequestOptions.none()).getValue();
+ }
+
+ /**
+ * The Get Properties operation returns all user-defined metadata, standard HTTP properties, and system properties
+ * for the blob. It does not return the content of the blob.
+ *
+ * @param containerName The container name.
+ * @param blob The blob name.
+ * @param snapshot The snapshot parameter is an opaque DateTime value that, when present, specifies the blob
+ * snapshot to retrieve. For more information on working with blob snapshots, see <a
+ * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/creating-a-snapshot-of-a-blob">Creating
+ * a Snapshot of a Blob.</a>.
+ * @param versionId The version id parameter is an opaque DateTime value that, when present, specifies the version
+ * of the blob to operate on. It's for service version 2019-10-10 and newer.
+ * @param timeout The timeout parameter is expressed in seconds. For more information, see <a
+ * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting
+ * Timeouts for Blob Service Operations.</a>.
+ * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID.
+ * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the
+ * specified date/time.
+ * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since
+ * the specified date/time.
+ * @param ifMatch Specify an ETag value to operate only on blobs with a matching value.
+ * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value.
+ * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value.
+ * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the
+ * analytics logs when storage analytics logging is enabled.
+ * @param cpkInfo Parameter group.
+ * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the service returns an error.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response.
+ */
+ public Response getPropertiesWithResponse(String containerName, String blob, String snapshot,
+ String versionId, Integer timeout, String leaseId, OffsetDateTime ifModifiedSince,
+ OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, String ifTags, String requestId,
+ CpkInfo cpkInfo, RequestOptions requestOptions) {
+ final String accept = "application/xml";
+ String encryptionKeyInternal = null;
+ if (cpkInfo != null) {
+ encryptionKeyInternal = cpkInfo.getEncryptionKey();
+ }
+ String encryptionKey = encryptionKeyInternal;
+ String encryptionKeySha256Internal = null;
+ if (cpkInfo != null) {
+ encryptionKeySha256Internal = cpkInfo.getEncryptionKeySha256();
+ }
+ String encryptionKeySha256 = encryptionKeySha256Internal;
+ EncryptionAlgorithmType encryptionAlgorithmInternal = null;
+ if (cpkInfo != null) {
+ encryptionAlgorithmInternal = cpkInfo.getEncryptionAlgorithm();
+ }
+ EncryptionAlgorithmType encryptionAlgorithm = encryptionAlgorithmInternal;
+ DateTimeRfc1123 ifModifiedSinceConverted
+ = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince);
+ DateTimeRfc1123 ifUnmodifiedSinceConverted
+ = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince);
+ return service.getProperties(this.client.getUrl(), containerName, blob, snapshot, versionId, timeout, leaseId,
+ encryptionKey, encryptionKeySha256, encryptionAlgorithm, ifModifiedSinceConverted,
+ ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, this.client.getVersion(), requestId, accept,
+ requestOptions);
+ }
+
+ /**
+ * The Get Properties operation returns all user-defined metadata, standard HTTP properties, and system properties
+ * for the blob. It does not return the content of the blob.
+ *
+ * @param containerName The container name.
+ * @param blob The blob name.
+ * @param snapshot The snapshot parameter is an opaque DateTime value that, when present, specifies the blob
+ * snapshot to retrieve. For more information on working with blob snapshots, see <a
+ * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/creating-a-snapshot-of-a-blob">Creating
+ * a Snapshot of a Blob.</a>.
+ * @param versionId The version id parameter is an opaque DateTime value that, when present, specifies the version
+ * of the blob to operate on. It's for service version 2019-10-10 and newer.
+ * @param timeout The timeout parameter is expressed in seconds. For more information, see <a
+ * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting
+ * Timeouts for Blob Service Operations.</a>.
+ * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID.
+ * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the
+ * specified date/time.
+ * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since
+ * the specified date/time.
+ * @param ifMatch Specify an ETag value to operate only on blobs with a matching value.
+ * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value.
+ * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value.
+ * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the
+ * analytics logs when storage analytics logging is enabled.
+ * @param cpkInfo Parameter group.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the service returns an error.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ public void getProperties(String containerName, String blob, String snapshot, String versionId, Integer timeout,
+ String leaseId, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch,
+ String ifNoneMatch, String ifTags, String requestId, CpkInfo cpkInfo) {
+ getPropertiesWithResponse(containerName, blob, snapshot, versionId, timeout, leaseId, ifModifiedSince,
+ ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, requestId, cpkInfo, RequestOptions.none());
+ }
+
+ /**
+ * If the storage account's soft delete feature is disabled then, when a blob is deleted, it is permanently removed
+ * from the storage account. If the storage account's soft delete feature is enabled, then, when a blob is deleted,
+ * it is marked for deletion and becomes inaccessible immediately. However, the blob service retains the blob or
+ * snapshot for the number of days specified by the DeleteRetentionPolicy section of [Storage service properties]
+ * (Set-Blob-Service-Properties.md). After the specified number of days has passed, the blob's data is permanently
+ * removed from the storage account. Note that you continue to be charged for the soft-deleted blob's storage until
+ * it is permanently removed. Use the List Blobs API and specify the "include=deleted" query parameter to discover
+ * which blobs and snapshots have been soft deleted. You can then use the Undelete Blob API to restore a
+ * soft-deleted blob. All other operations on a soft-deleted blob or snapshot causes the service to return an HTTP
+ * status code of 404 (ResourceNotFound). If the storage account's automatic snapshot feature is enabled, then, when
+ * a blob is deleted, an automatic snapshot is created. The blob becomes inaccessible immediately. All other
+ * operations on the blob causes the service to return an HTTP status code of 404 (ResourceNotFound). You can access
+ * automatic snapshot using snapshot timestamp or version id. You can restore the blob by calling Put or Copy Blob
+ * API with automatic snapshot as source. Deleting automatic snapshot requires shared key or special SAS/RBAC
+ * permissions.
+ *
+ * @param containerName The container name.
+ * @param blob The blob name.
+ * @param snapshot The snapshot parameter is an opaque DateTime value that, when present, specifies the blob
+ * snapshot to retrieve. For more information on working with blob snapshots, see <a
+ * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/creating-a-snapshot-of-a-blob">Creating
+ * a Snapshot of a Blob.</a>.
+ * @param versionId The version id parameter is an opaque DateTime value that, when present, specifies the version
+ * of the blob to operate on. It's for service version 2019-10-10 and newer.
+ * @param timeout The timeout parameter is expressed in seconds. For more information, see <a
+ * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting
+ * Timeouts for Blob Service Operations.</a>.
+ * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID.
+ * @param deleteSnapshots Required if the blob has associated snapshots. Specify one of the following two options:
+ * include: Delete the base blob and all of its snapshots. only: Delete only the blob's snapshots and not the blob
+ * itself.
+ * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the
+ * specified date/time.
+ * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since
+ * the specified date/time.
+ * @param ifMatch Specify an ETag value to operate only on blobs with a matching value.
+ * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value.
+ * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value.
+ * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the
+ * analytics logs when storage analytics logging is enabled.
+ * @param blobDeleteType Optional. Only possible value is 'permanent', which specifies to permanently delete a blob
+ * if blob soft delete is enabled.
+ * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the service returns an error.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response.
+ */
+ public Response deleteWithResponse(String containerName, String blob, String snapshot, String versionId,
+ Integer timeout, String leaseId, DeleteSnapshotsOptionType deleteSnapshots, OffsetDateTime ifModifiedSince,
+ OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, String ifTags, String requestId,
+ BlobDeleteType blobDeleteType, RequestOptions requestOptions) {
+ final String accept = "application/xml";
+ DateTimeRfc1123 ifModifiedSinceConverted
+ = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince);
+ DateTimeRfc1123 ifUnmodifiedSinceConverted
+ = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince);
+ return service.delete(this.client.getUrl(), containerName, blob, snapshot, versionId, timeout, leaseId,
+ deleteSnapshots, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags,
+ this.client.getVersion(), requestId, blobDeleteType, accept, requestOptions);
+ }
+
+ /**
+ * If the storage account's soft delete feature is disabled then, when a blob is deleted, it is permanently removed
+ * from the storage account. If the storage account's soft delete feature is enabled, then, when a blob is deleted,
+ * it is marked for deletion and becomes inaccessible immediately. However, the blob service retains the blob or
+ * snapshot for the number of days specified by the DeleteRetentionPolicy section of [Storage service properties]
+ * (Set-Blob-Service-Properties.md). After the specified number of days has passed, the blob's data is permanently
+ * removed from the storage account. Note that you continue to be charged for the soft-deleted blob's storage until
+ * it is permanently removed. Use the List Blobs API and specify the "include=deleted" query parameter to discover
+ * which blobs and snapshots have been soft deleted. You can then use the Undelete Blob API to restore a
+ * soft-deleted blob. All other operations on a soft-deleted blob or snapshot causes the service to return an HTTP
+ * status code of 404 (ResourceNotFound). If the storage account's automatic snapshot feature is enabled, then, when
+ * a blob is deleted, an automatic snapshot is created. The blob becomes inaccessible immediately. All other
+ * operations on the blob causes the service to return an HTTP status code of 404 (ResourceNotFound). You can access
+ * automatic snapshot using snapshot timestamp or version id. You can restore the blob by calling Put or Copy Blob
+ * API with automatic snapshot as source. Deleting automatic snapshot requires shared key or special SAS/RBAC
+ * permissions.
+ *
+ * @param containerName The container name.
+ * @param blob The blob name.
+ * @param snapshot The snapshot parameter is an opaque DateTime value that, when present, specifies the blob
+ * snapshot to retrieve. For more information on working with blob snapshots, see <a
+ * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/creating-a-snapshot-of-a-blob">Creating
+ * a Snapshot of a Blob.</a>.
+ * @param versionId The version id parameter is an opaque DateTime value that, when present, specifies the version
+ * of the blob to operate on. It's for service version 2019-10-10 and newer.
+ * @param timeout The timeout parameter is expressed in seconds. For more information, see <a
+ * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting
+ * Timeouts for Blob Service Operations.</a>.
+ * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID.
+ * @param deleteSnapshots Required if the blob has associated snapshots. Specify one of the following two options:
+ * include: Delete the base blob and all of its snapshots. only: Delete only the blob's snapshots and not the blob
+ * itself.
+ * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the
+ * specified date/time.
+ * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since
+ * the specified date/time.
+ * @param ifMatch Specify an ETag value to operate only on blobs with a matching value.
+ * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value.
+ * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value.
+ * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the
+ * analytics logs when storage analytics logging is enabled.
+ * @param blobDeleteType Optional. Only possible value is 'permanent', which specifies to permanently delete a blob
+ * if blob soft delete is enabled.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the service returns an error.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ public void delete(String containerName, String blob, String snapshot, String versionId, Integer timeout,
+ String leaseId, DeleteSnapshotsOptionType deleteSnapshots, OffsetDateTime ifModifiedSince,
+ OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, String ifTags, String requestId,
+ BlobDeleteType blobDeleteType) {
+ deleteWithResponse(containerName, blob, snapshot, versionId, timeout, leaseId, deleteSnapshots, ifModifiedSince,
+ ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, requestId, blobDeleteType, RequestOptions.none());
+ }
+
+ /**
+ * Undelete a blob that was previously soft deleted.
+ *
+ * @param containerName The container name.
+ * @param blob The blob name.
+ * @param timeout The timeout parameter is expressed in seconds. For more information, see <a
+ * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting
+ * Timeouts for Blob Service Operations.</a>.
+ * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the
+ * analytics logs when storage analytics logging is enabled.
+ * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the service returns an error.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response.
+ */
+ public Response undeleteWithResponse(String containerName, String blob, Integer timeout, String requestId,
+ RequestOptions requestOptions) {
+ final String comp = "undelete";
+ final String accept = "application/xml";
+ return service.undelete(this.client.getUrl(), containerName, blob, comp, timeout, this.client.getVersion(),
+ requestId, accept, requestOptions);
+ }
+
+ /**
+ * Undelete a blob that was previously soft deleted.
+ *
+ * @param containerName The container name.
+ * @param blob The blob name.
+ * @param timeout The timeout parameter is expressed in seconds. For more information, see <a
+ * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting
+ * Timeouts for Blob Service Operations.</a>.
+ * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the
+ * analytics logs when storage analytics logging is enabled.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the service returns an error.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ public void undelete(String containerName, String blob, Integer timeout, String requestId) {
+ undeleteWithResponse(containerName, blob, timeout, requestId, RequestOptions.none());
+ }
+
+ /**
+ * Sets the time a blob will expire and be deleted.
+ *
+ * @param containerName The container name.
+ * @param blob The blob name.
+ * @param expiryOptions Required. Indicates mode of the expiry time.
+ * @param timeout The timeout parameter is expressed in seconds. For more information, see <a
+ * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting
+ * Timeouts for Blob Service Operations.</a>.
+ * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the
+ * analytics logs when storage analytics logging is enabled.
+ * @param expiresOn The time to set the blob to expiry.
+ * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the service returns an error.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response.
+ */
+ public Response setExpiryWithResponse(String containerName, String blob, BlobExpiryOptions expiryOptions,
+ Integer timeout, String requestId, String expiresOn, RequestOptions requestOptions) {
+ final String comp = "expiry";
+ final String accept = "application/xml";
+ return service.setExpiry(this.client.getUrl(), containerName, blob, comp, timeout, this.client.getVersion(),
+ requestId, expiryOptions, expiresOn, accept, requestOptions);
+ }
+
+ /**
+ * Sets the time a blob will expire and be deleted.
+ *
+ * @param containerName The container name.
+ * @param blob The blob name.
+ * @param expiryOptions Required. Indicates mode of the expiry time.
+ * @param timeout The timeout parameter is expressed in seconds. For more information, see <a
+ * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting
+ * Timeouts for Blob Service Operations.</a>.
+ * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the
+ * analytics logs when storage analytics logging is enabled.
+ * @param expiresOn The time to set the blob to expiry.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the service returns an error.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ public void setExpiry(String containerName, String blob, BlobExpiryOptions expiryOptions, Integer timeout,
+ String requestId, String expiresOn) {
+ setExpiryWithResponse(containerName, blob, expiryOptions, timeout, requestId, expiresOn, RequestOptions.none());
+ }
+
+ /**
+ * The Set HTTP Headers operation sets system properties on the blob.
+ *
+ * @param containerName The container name.
+ * @param blob The blob name.
+ * @param timeout The timeout parameter is expressed in seconds. For more information, see <a
+ * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting
+ * Timeouts for Blob Service Operations.</a>.
+ * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID.
+ * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the
+ * specified date/time.
+ * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since
+ * the specified date/time.
+ * @param ifMatch Specify an ETag value to operate only on blobs with a matching value.
+ * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value.
+ * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value.
+ * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the
+ * analytics logs when storage analytics logging is enabled.
+ * @param blobHttpHeaders Parameter group.
+ * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the service returns an error.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response.
+ */
+ public Response setHttpHeadersWithResponse(String containerName, String blob, Integer timeout, String leaseId,
+ OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch,
+ String ifTags, String requestId, BlobHttpHeaders blobHttpHeaders, RequestOptions requestOptions) {
+ final String comp = "properties";
+ final String accept = "application/xml";
+ String cacheControlInternal = null;
+ if (blobHttpHeaders != null) {
+ cacheControlInternal = blobHttpHeaders.getCacheControl();
+ }
+ String cacheControl = cacheControlInternal;
+ String contentTypeInternal = null;
+ if (blobHttpHeaders != null) {
+ contentTypeInternal = blobHttpHeaders.getContentType();
+ }
+ String contentType = contentTypeInternal;
+ byte[] contentMd5Internal = null;
+ if (blobHttpHeaders != null) {
+ contentMd5Internal = blobHttpHeaders.getContentMd5();
+ }
+ byte[] contentMd5 = contentMd5Internal;
+ String contentEncodingInternal = null;
+ if (blobHttpHeaders != null) {
+ contentEncodingInternal = blobHttpHeaders.getContentEncoding();
+ }
+ String contentEncoding = contentEncodingInternal;
+ String contentLanguageInternal = null;
+ if (blobHttpHeaders != null) {
+ contentLanguageInternal = blobHttpHeaders.getContentLanguage();
+ }
+ String contentLanguage = contentLanguageInternal;
+ String contentDispositionInternal = null;
+ if (blobHttpHeaders != null) {
+ contentDispositionInternal = blobHttpHeaders.getContentDisposition();
+ }
+ String contentDisposition = contentDispositionInternal;
+ String contentMd5Converted = Base64Util.encodeToString(contentMd5);
+ DateTimeRfc1123 ifModifiedSinceConverted
+ = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince);
+ DateTimeRfc1123 ifUnmodifiedSinceConverted
+ = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince);
+ return service.setHttpHeaders(this.client.getUrl(), containerName, blob, comp, timeout, cacheControl,
+ contentType, contentMd5Converted, contentEncoding, contentLanguage, leaseId, ifModifiedSinceConverted,
+ ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, contentDisposition, this.client.getVersion(),
+ requestId, accept, requestOptions);
+ }
+
+ /**
+ * The Set HTTP Headers operation sets system properties on the blob.
+ *
+ * @param containerName The container name.
+ * @param blob The blob name.
+ * @param timeout The timeout parameter is expressed in seconds. For more information, see <a
+ * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting
+ * Timeouts for Blob Service Operations.</a>.
+ * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID.
+ * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the
+ * specified date/time.
+ * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since
+ * the specified date/time.
+ * @param ifMatch Specify an ETag value to operate only on blobs with a matching value.
+ * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value.
+ * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value.
+ * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the
+ * analytics logs when storage analytics logging is enabled.
+ * @param blobHttpHeaders Parameter group.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the service returns an error.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ public void setHttpHeaders(String containerName, String blob, Integer timeout, String leaseId,
+ OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch,
+ String ifTags, String requestId, BlobHttpHeaders blobHttpHeaders) {
+ setHttpHeadersWithResponse(containerName, blob, timeout, leaseId, ifModifiedSince, ifUnmodifiedSince, ifMatch,
+ ifNoneMatch, ifTags, requestId, blobHttpHeaders, RequestOptions.none());
+ }
+
+ /**
+ * The Set Immutability Policy operation sets the immutability policy on the blob.
+ *
+ * @param containerName The container name.
+ * @param blob The blob name.
+ * @param timeout The timeout parameter is expressed in seconds. For more information, see <a
+ * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting
+ * Timeouts for Blob Service Operations.</a>.
+ * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the
+ * analytics logs when storage analytics logging is enabled.
+ * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since
+ * the specified date/time.
+ * @param immutabilityPolicyExpiry Specifies the date time when the blobs immutability policy is set to expire.
+ * @param immutabilityPolicyMode Specifies the immutability policy mode to set on the blob.
+ * @param snapshot The snapshot parameter is an opaque DateTime value that, when present, specifies the blob
+ * snapshot to retrieve. For more information on working with blob snapshots, see <a
+ * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/creating-a-snapshot-of-a-blob">Creating
+ * a Snapshot of a Blob.</a>.
+ * @param versionId The version id parameter is an opaque DateTime value that, when present, specifies the version
+ * of the blob to operate on. It's for service version 2019-10-10 and newer.
+ * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the service returns an error.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response.
+ */
+ public Response setImmutabilityPolicyWithResponse(String containerName, String blob, Integer timeout,
+ String requestId, OffsetDateTime ifUnmodifiedSince, OffsetDateTime immutabilityPolicyExpiry,
+ BlobImmutabilityPolicyMode immutabilityPolicyMode, String snapshot, String versionId,
+ RequestOptions requestOptions) {
+ final String comp = "immutabilityPolicies";
+ final String accept = "application/xml";
+ DateTimeRfc1123 ifUnmodifiedSinceConverted
+ = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince);
+ DateTimeRfc1123 immutabilityPolicyExpiryConverted
+ = immutabilityPolicyExpiry == null ? null : new DateTimeRfc1123(immutabilityPolicyExpiry);
+ return service.setImmutabilityPolicy(this.client.getUrl(), containerName, blob, comp, timeout,
+ this.client.getVersion(), requestId, ifUnmodifiedSinceConverted, immutabilityPolicyExpiryConverted,
+ immutabilityPolicyMode, snapshot, versionId, accept, requestOptions);
+ }
+
+ /**
+ * The Set Immutability Policy operation sets the immutability policy on the blob.
+ *
+ * @param containerName The container name.
+ * @param blob The blob name.
+ * @param timeout The timeout parameter is expressed in seconds. For more information, see <a
+ * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting
+ * Timeouts for Blob Service Operations.</a>.
+ * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the
+ * analytics logs when storage analytics logging is enabled.
+ * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since
+ * the specified date/time.
+ * @param immutabilityPolicyExpiry Specifies the date time when the blobs immutability policy is set to expire.
+ * @param immutabilityPolicyMode Specifies the immutability policy mode to set on the blob.
+ * @param snapshot The snapshot parameter is an opaque DateTime value that, when present, specifies the blob
+ * snapshot to retrieve. For more information on working with blob snapshots, see <a
+ * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/creating-a-snapshot-of-a-blob">Creating
+ * a Snapshot of a Blob.</a>.
+ * @param versionId The version id parameter is an opaque DateTime value that, when present, specifies the version
+ * of the blob to operate on. It's for service version 2019-10-10 and newer.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the service returns an error.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ public void setImmutabilityPolicy(String containerName, String blob, Integer timeout, String requestId,
+ OffsetDateTime ifUnmodifiedSince, OffsetDateTime immutabilityPolicyExpiry,
+ BlobImmutabilityPolicyMode immutabilityPolicyMode, String snapshot, String versionId) {
+ setImmutabilityPolicyWithResponse(containerName, blob, timeout, requestId, ifUnmodifiedSince,
+ immutabilityPolicyExpiry, immutabilityPolicyMode, snapshot, versionId, RequestOptions.none());
+ }
+
+ /**
+ * The Delete Immutability Policy operation deletes the immutability policy on the blob.
+ *
+ * @param containerName The container name.
+ * @param blob The blob name.
+ * @param timeout The timeout parameter is expressed in seconds. For more information, see <a
+ * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting
+ * Timeouts for Blob Service Operations.</a>.
+ * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the
+ * analytics logs when storage analytics logging is enabled.
+ * @param snapshot The snapshot parameter is an opaque DateTime value that, when present, specifies the blob
+ * snapshot to retrieve. For more information on working with blob snapshots, see <a
+ * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/creating-a-snapshot-of-a-blob">Creating
+ * a Snapshot of a Blob.</a>.
+ * @param versionId The version id parameter is an opaque DateTime value that, when present, specifies the version
+ * of the blob to operate on. It's for service version 2019-10-10 and newer.
+ * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the service returns an error.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response.
+ */
+ public Response deleteImmutabilityPolicyWithResponse(String containerName, String blob, Integer timeout,
+ String requestId, String snapshot, String versionId, RequestOptions requestOptions) {
+ final String comp = "immutabilityPolicies";
+ final String accept = "application/xml";
+ return service.deleteImmutabilityPolicy(this.client.getUrl(), containerName, blob, comp, timeout,
+ this.client.getVersion(), requestId, snapshot, versionId, accept, requestOptions);
+ }
+
+ /**
+ * The Delete Immutability Policy operation deletes the immutability policy on the blob.
+ *
+ * @param containerName The container name.
+ * @param blob The blob name.
+ * @param timeout The timeout parameter is expressed in seconds. For more information, see <a
+ * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting
+ * Timeouts for Blob Service Operations.</a>.
+ * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the
+ * analytics logs when storage analytics logging is enabled.
+ * @param snapshot The snapshot parameter is an opaque DateTime value that, when present, specifies the blob
+ * snapshot to retrieve. For more information on working with blob snapshots, see <a
+ * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/creating-a-snapshot-of-a-blob">Creating
+ * a Snapshot of a Blob.</a>.
+ * @param versionId The version id parameter is an opaque DateTime value that, when present, specifies the version
+ * of the blob to operate on. It's for service version 2019-10-10 and newer.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the service returns an error.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ public void deleteImmutabilityPolicy(String containerName, String blob, Integer timeout, String requestId,
+ String snapshot, String versionId) {
+ deleteImmutabilityPolicyWithResponse(containerName, blob, timeout, requestId, snapshot, versionId,
+ RequestOptions.none());
+ }
+
+ /**
+ * The Set Legal Hold operation sets a legal hold on the blob.
+ *
+ * @param containerName The container name.
+ * @param blob The blob name.
+ * @param legalHold Specified if a legal hold should be set on the blob.
+ * @param timeout The timeout parameter is expressed in seconds. For more information, see <a
+ * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting
+ * Timeouts for Blob Service Operations.</a>.
+ * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the
+ * analytics logs when storage analytics logging is enabled.
+ * @param snapshot The snapshot parameter is an opaque DateTime value that, when present, specifies the blob
+ * snapshot to retrieve. For more information on working with blob snapshots, see <a
+ * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/creating-a-snapshot-of-a-blob">Creating
+ * a Snapshot of a Blob.</a>.
+ * @param versionId The version id parameter is an opaque DateTime value that, when present, specifies the version
+ * of the blob to operate on. It's for service version 2019-10-10 and newer.
+ * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the service returns an error.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response.
+ */
+ public Response setLegalHoldWithResponse(String containerName, String blob, boolean legalHold,
+ Integer timeout, String requestId, String snapshot, String versionId, RequestOptions requestOptions) {
+ final String comp = "legalhold";
+ final String accept = "application/xml";
+ return service.setLegalHold(this.client.getUrl(), containerName, blob, comp, timeout, this.client.getVersion(),
+ requestId, legalHold, snapshot, versionId, accept, requestOptions);
+ }
+
+ /**
+ * The Set Legal Hold operation sets a legal hold on the blob.
+ *
+ * @param containerName The container name.
+ * @param blob The blob name.
+ * @param legalHold Specified if a legal hold should be set on the blob.
+ * @param timeout The timeout parameter is expressed in seconds. For more information, see <a
+ * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting
+ * Timeouts for Blob Service Operations.</a>.
+ * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the
+ * analytics logs when storage analytics logging is enabled.
+ * @param snapshot The snapshot parameter is an opaque DateTime value that, when present, specifies the blob
+ * snapshot to retrieve. For more information on working with blob snapshots, see <a
+ * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/creating-a-snapshot-of-a-blob">Creating
+ * a Snapshot of a Blob.</a>.
+ * @param versionId The version id parameter is an opaque DateTime value that, when present, specifies the version
+ * of the blob to operate on. It's for service version 2019-10-10 and newer.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the service returns an error.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ public void setLegalHold(String containerName, String blob, boolean legalHold, Integer timeout, String requestId,
+ String snapshot, String versionId) {
+ setLegalHoldWithResponse(containerName, blob, legalHold, timeout, requestId, snapshot, versionId,
+ RequestOptions.none());
+ }
+
+ /**
+ * The Set Blob Metadata operation sets user-defined metadata for the specified blob as one or more name-value
+ * pairs.
+ *
+ * @param containerName The container name.
+ * @param blob The blob name.
+ * @param timeout The timeout parameter is expressed in seconds. For more information, see <a
+ * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting
+ * Timeouts for Blob Service Operations.</a>.
+ * @param metadata Optional. Specifies a user-defined name-value pair associated with the blob. If no name-value
+ * pairs are specified, the operation will copy the metadata from the source blob or file to the destination blob.
+ * If one or more name-value pairs are specified, the destination blob is created with the specified metadata, and
+ * metadata is not copied from the source blob or file. Note that beginning with version 2009-09-19, metadata names
+ * must adhere to the naming rules for C# identifiers. See Naming and Referencing Containers, Blobs, and Metadata
+ * for more information.
+ * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID.
+ * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the
+ * specified date/time.
+ * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since
+ * the specified date/time.
+ * @param ifMatch Specify an ETag value to operate only on blobs with a matching value.
+ * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value.
+ * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value.
+ * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the
+ * analytics logs when storage analytics logging is enabled.
+ * @param cpkInfo Parameter group.
+ * @param encryptionScopeParam Parameter group.
+ * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the service returns an error.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response.
+ */
+ public Response setMetadataWithResponse(String containerName, String blob, Integer timeout,
+ Map metadata, String leaseId, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince,
+ String ifMatch, String ifNoneMatch, String ifTags, String requestId, CpkInfo cpkInfo,
+ EncryptionScope encryptionScopeParam, RequestOptions requestOptions) {
+ final String comp = "metadata";
+ final String accept = "application/xml";
+ String encryptionKeyInternal = null;
+ if (cpkInfo != null) {
+ encryptionKeyInternal = cpkInfo.getEncryptionKey();
+ }
+ String encryptionKey = encryptionKeyInternal;
+ String encryptionKeySha256Internal = null;
+ if (cpkInfo != null) {
+ encryptionKeySha256Internal = cpkInfo.getEncryptionKeySha256();
+ }
+ String encryptionKeySha256 = encryptionKeySha256Internal;
+ EncryptionAlgorithmType encryptionAlgorithmInternal = null;
+ if (cpkInfo != null) {
+ encryptionAlgorithmInternal = cpkInfo.getEncryptionAlgorithm();
+ }
+ EncryptionAlgorithmType encryptionAlgorithm = encryptionAlgorithmInternal;
+ String encryptionScopeInternal = null;
+ if (encryptionScopeParam != null) {
+ encryptionScopeInternal = encryptionScopeParam.getEncryptionScope();
+ }
+ String encryptionScope = encryptionScopeInternal;
+ DateTimeRfc1123 ifModifiedSinceConverted
+ = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince);
+ DateTimeRfc1123 ifUnmodifiedSinceConverted
+ = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince);
+ return service.setMetadata(this.client.getUrl(), containerName, blob, comp, timeout, metadata, leaseId,
+ encryptionKey, encryptionKeySha256, encryptionAlgorithm, encryptionScope, ifModifiedSinceConverted,
+ ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, this.client.getVersion(), requestId, accept,
+ requestOptions);
+ }
+
+ /**
+ * The Set Blob Metadata operation sets user-defined metadata for the specified blob as one or more name-value
+ * pairs.
+ *
+ * @param containerName The container name.
+ * @param blob The blob name.
+ * @param timeout The timeout parameter is expressed in seconds. For more information, see <a
+ * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting
+ * Timeouts for Blob Service Operations.</a>.
+ * @param metadata Optional. Specifies a user-defined name-value pair associated with the blob. If no name-value
+ * pairs are specified, the operation will copy the metadata from the source blob or file to the destination blob.
+ * If one or more name-value pairs are specified, the destination blob is created with the specified metadata, and
+ * metadata is not copied from the source blob or file. Note that beginning with version 2009-09-19, metadata names
+ * must adhere to the naming rules for C# identifiers. See Naming and Referencing Containers, Blobs, and Metadata
+ * for more information.
+ * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID.
+ * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the
+ * specified date/time.
+ * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since
+ * the specified date/time.
+ * @param ifMatch Specify an ETag value to operate only on blobs with a matching value.
+ * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value.
+ * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value.
+ * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the
+ * analytics logs when storage analytics logging is enabled.
+ * @param cpkInfo Parameter group.
+ * @param encryptionScopeParam Parameter group.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the service returns an error.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ public void setMetadata(String containerName, String blob, Integer timeout, Map metadata,
+ String leaseId, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch,
+ String ifNoneMatch, String ifTags, String requestId, CpkInfo cpkInfo, EncryptionScope encryptionScopeParam) {
+ setMetadataWithResponse(containerName, blob, timeout, metadata, leaseId, ifModifiedSince, ifUnmodifiedSince,
+ ifMatch, ifNoneMatch, ifTags, requestId, cpkInfo, encryptionScopeParam, RequestOptions.none());
+ }
+
+ /**
+ * [Update] The Lease Blob operation establishes and manages a lock on a blob for write and delete operations.
+ *
+ * @param containerName The container name.
+ * @param blob The blob name.
+ * @param timeout The timeout parameter is expressed in seconds. For more information, see <a
+ * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting
+ * Timeouts for Blob Service Operations.</a>.
+ * @param duration Specifies the duration of the lease, in seconds, or negative one (-1) for a lease that never
+ * expires. A non-infinite lease can be between 15 and 60 seconds. A lease duration cannot be changed using renew or
+ * change.
+ * @param proposedLeaseId Proposed lease ID, in a GUID string format. The Blob service returns 400 (Invalid request)
+ * if the proposed lease ID is not in the correct format. See Guid Constructor (String) for a list of valid GUID
+ * string formats.
+ * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the
+ * specified date/time.
+ * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since
+ * the specified date/time.
+ * @param ifMatch Specify an ETag value to operate only on blobs with a matching value.
+ * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value.
+ * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value.
+ * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the
+ * analytics logs when storage analytics logging is enabled.
+ * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the service returns an error.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response.
+ */
+ public Response acquireLeaseWithResponse(String containerName, String blob, Integer timeout, Integer duration,
+ String proposedLeaseId, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch,
+ String ifNoneMatch, String ifTags, String requestId, RequestOptions requestOptions) {
+ final String comp = "lease";
+ final String action = "acquire";
+ final String accept = "application/xml";
+ DateTimeRfc1123 ifModifiedSinceConverted
+ = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince);
+ DateTimeRfc1123 ifUnmodifiedSinceConverted
+ = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince);
+ return service.acquireLease(this.client.getUrl(), containerName, blob, comp, action, timeout, duration,
+ proposedLeaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags,
+ this.client.getVersion(), requestId, accept, requestOptions);
+ }
+
+ /**
+ * [Update] The Lease Blob operation establishes and manages a lock on a blob for write and delete operations.
+ *
+ * @param containerName The container name.
+ * @param blob The blob name.
+ * @param timeout The timeout parameter is expressed in seconds. For more information, see <a
+ * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting
+ * Timeouts for Blob Service Operations.</a>.
+ * @param duration Specifies the duration of the lease, in seconds, or negative one (-1) for a lease that never
+ * expires. A non-infinite lease can be between 15 and 60 seconds. A lease duration cannot be changed using renew or
+ * change.
+ * @param proposedLeaseId Proposed lease ID, in a GUID string format. The Blob service returns 400 (Invalid request)
+ * if the proposed lease ID is not in the correct format. See Guid Constructor (String) for a list of valid GUID
+ * string formats.
+ * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the
+ * specified date/time.
+ * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since
+ * the specified date/time.
+ * @param ifMatch Specify an ETag value to operate only on blobs with a matching value.
+ * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value.
+ * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value.
+ * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the
+ * analytics logs when storage analytics logging is enabled.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the service returns an error.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ public void acquireLease(String containerName, String blob, Integer timeout, Integer duration,
+ String proposedLeaseId, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch,
+ String ifNoneMatch, String ifTags, String requestId) {
+ acquireLeaseWithResponse(containerName, blob, timeout, duration, proposedLeaseId, ifModifiedSince,
+ ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, requestId, RequestOptions.none());
+ }
+
+ /**
+ * [Update] The Lease Blob operation establishes and manages a lock on a blob for write and delete operations.
+ *
+ * @param containerName The container name.
+ * @param blob The blob name.
+ * @param leaseId Specifies the current lease ID on the resource.
+ * @param timeout The timeout parameter is expressed in seconds. For more information, see <a
+ * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting
+ * Timeouts for Blob Service Operations.</a>.
+ * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the
+ * specified date/time.
+ * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since
+ * the specified date/time.
+ * @param ifMatch Specify an ETag value to operate only on blobs with a matching value.
+ * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value.
+ * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value.
+ * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the
+ * analytics logs when storage analytics logging is enabled.
+ * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the service returns an error.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response.
+ */
+ public Response releaseLeaseWithResponse(String containerName, String blob, String leaseId, Integer timeout,
+ OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch,
+ String ifTags, String requestId, RequestOptions requestOptions) {
+ final String comp = "lease";
+ final String action = "release";
+ final String accept = "application/xml";
+ DateTimeRfc1123 ifModifiedSinceConverted
+ = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince);
+ DateTimeRfc1123 ifUnmodifiedSinceConverted
+ = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince);
+ return service.releaseLease(this.client.getUrl(), containerName, blob, comp, action, timeout, leaseId,
+ ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags,
+ this.client.getVersion(), requestId, accept, requestOptions);
+ }
+
+ /**
+ * [Update] The Lease Blob operation establishes and manages a lock on a blob for write and delete operations.
+ *
+ * @param containerName The container name.
+ * @param blob The blob name.
+ * @param leaseId Specifies the current lease ID on the resource.
+ * @param timeout The timeout parameter is expressed in seconds. For more information, see <a
+ * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting
+ * Timeouts for Blob Service Operations.</a>.
+ * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the
+ * specified date/time.
+ * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since
+ * the specified date/time.
+ * @param ifMatch Specify an ETag value to operate only on blobs with a matching value.
+ * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value.
+ * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value.
+ * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the
+ * analytics logs when storage analytics logging is enabled.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the service returns an error.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ public void releaseLease(String containerName, String blob, String leaseId, Integer timeout,
+ OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch,
+ String ifTags, String requestId) {
+ releaseLeaseWithResponse(containerName, blob, leaseId, timeout, ifModifiedSince, ifUnmodifiedSince, ifMatch,
+ ifNoneMatch, ifTags, requestId, RequestOptions.none());
+ }
+
+ /**
+ * [Update] The Lease Blob operation establishes and manages a lock on a blob for write and delete operations.
+ *
+ * @param containerName The container name.
+ * @param blob The blob name.
+ * @param leaseId Specifies the current lease ID on the resource.
+ * @param timeout The timeout parameter is expressed in seconds. For more information, see <a
+ * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting
+ * Timeouts for Blob Service Operations.</a>.
+ * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the
+ * specified date/time.
+ * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since
+ * the specified date/time.
+ * @param ifMatch Specify an ETag value to operate only on blobs with a matching value.
+ * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value.
+ * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value.
+ * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the
+ * analytics logs when storage analytics logging is enabled.
+ * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the service returns an error.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response.
+ */
+ public Response renewLeaseWithResponse(String containerName, String blob, String leaseId, Integer timeout,
+ OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch,
+ String ifTags, String requestId, RequestOptions requestOptions) {
+ final String comp = "lease";
+ final String action = "renew";
+ final String accept = "application/xml";
+ DateTimeRfc1123 ifModifiedSinceConverted
+ = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince);
+ DateTimeRfc1123 ifUnmodifiedSinceConverted
+ = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince);
+ return service.renewLease(this.client.getUrl(), containerName, blob, comp, action, timeout, leaseId,
+ ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags,
+ this.client.getVersion(), requestId, accept, requestOptions);
+ }
+
+ /**
+ * [Update] The Lease Blob operation establishes and manages a lock on a blob for write and delete operations.
+ *
+ * @param containerName The container name.
+ * @param blob The blob name.
+ * @param leaseId Specifies the current lease ID on the resource.
+ * @param timeout The timeout parameter is expressed in seconds. For more information, see <a
+ * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting
+ * Timeouts for Blob Service Operations.</a>.
+ * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the
+ * specified date/time.
+ * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since
+ * the specified date/time.
+ * @param ifMatch Specify an ETag value to operate only on blobs with a matching value.
+ * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value.
+ * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value.
+ * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the
+ * analytics logs when storage analytics logging is enabled.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the service returns an error.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ public void renewLease(String containerName, String blob, String leaseId, Integer timeout,
+ OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch,
+ String ifTags, String requestId) {
+ renewLeaseWithResponse(containerName, blob, leaseId, timeout, ifModifiedSince, ifUnmodifiedSince, ifMatch,
+ ifNoneMatch, ifTags, requestId, RequestOptions.none());
+ }
+
+ /**
+ * [Update] The Lease Blob operation establishes and manages a lock on a blob for write and delete operations.
+ *
+ * @param containerName The container name.
+ * @param blob The blob name.
+ * @param leaseId Specifies the current lease ID on the resource.
+ * @param proposedLeaseId Proposed lease ID, in a GUID string format. The Blob service returns 400 (Invalid request)
+ * if the proposed lease ID is not in the correct format. See Guid Constructor (String) for a list of valid GUID
+ * string formats.
+ * @param timeout The timeout parameter is expressed in seconds. For more information, see <a
+ * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting
+ * Timeouts for Blob Service Operations.</a>.
+ * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the
+ * specified date/time.
+ * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since
+ * the specified date/time.
+ * @param ifMatch Specify an ETag value to operate only on blobs with a matching value.
+ * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value.
+ * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value.
+ * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the
+ * analytics logs when storage analytics logging is enabled.
+ * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the service returns an error.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response.
+ */
+ public Response changeLeaseWithResponse(String containerName, String blob, String leaseId,
+ String proposedLeaseId, Integer timeout, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince,
+ String ifMatch, String ifNoneMatch, String ifTags, String requestId, RequestOptions requestOptions) {
+ final String comp = "lease";
+ final String action = "change";
+ final String accept = "application/xml";
+ DateTimeRfc1123 ifModifiedSinceConverted
+ = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince);
+ DateTimeRfc1123 ifUnmodifiedSinceConverted
+ = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince);
+ return service.changeLease(this.client.getUrl(), containerName, blob, comp, action, timeout, leaseId,
+ proposedLeaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags,
+ this.client.getVersion(), requestId, accept, requestOptions);
+ }
+
+ /**
+ * [Update] The Lease Blob operation establishes and manages a lock on a blob for write and delete operations.
+ *
+ * @param containerName The container name.
+ * @param blob The blob name.
+ * @param leaseId Specifies the current lease ID on the resource.
+ * @param proposedLeaseId Proposed lease ID, in a GUID string format. The Blob service returns 400 (Invalid request)
+ * if the proposed lease ID is not in the correct format. See Guid Constructor (String) for a list of valid GUID
+ * string formats.
+ * @param timeout The timeout parameter is expressed in seconds. For more information, see <a
+ * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting
+ * Timeouts for Blob Service Operations.</a>.
+ * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the
+ * specified date/time.
+ * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since
+ * the specified date/time.
+ * @param ifMatch Specify an ETag value to operate only on blobs with a matching value.
+ * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value.
+ * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value.
+ * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the
+ * analytics logs when storage analytics logging is enabled.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the service returns an error.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ public void changeLease(String containerName, String blob, String leaseId, String proposedLeaseId, Integer timeout,
+ OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch,
+ String ifTags, String requestId) {
+ changeLeaseWithResponse(containerName, blob, leaseId, proposedLeaseId, timeout, ifModifiedSince,
+ ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, requestId, RequestOptions.none());
+ }
+
+ /**
+ * [Update] The Lease Blob operation establishes and manages a lock on a blob for write and delete operations.
+ *
+ * @param containerName The container name.
+ * @param blob The blob name.
+ * @param timeout The timeout parameter is expressed in seconds. For more information, see <a
+ * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting
+ * Timeouts for Blob Service Operations.</a>.
+ * @param breakPeriod For a break operation, proposed duration the lease should continue before it is broken, in
+ * seconds, between 0 and 60. This break period is only used if it is shorter than the time remaining on the lease.
+ * If longer, the time remaining on the lease is used. A new lease will not be available before the break period has
+ * expired, but the lease may be held for longer than the break period. If this header does not appear with a break
+ * operation, a fixed-duration lease breaks after the remaining lease period elapses, and an infinite lease breaks
+ * immediately.
+ * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the
+ * specified date/time.
+ * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since
+ * the specified date/time.
+ * @param ifMatch Specify an ETag value to operate only on blobs with a matching value.
+ * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value.
+ * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value.
+ * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the
+ * analytics logs when storage analytics logging is enabled.
+ * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the service returns an error.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response.
+ */
+ public Response breakLeaseWithResponse(String containerName, String blob, Integer timeout,
+ Integer breakPeriod, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch,
+ String ifNoneMatch, String ifTags, String requestId, RequestOptions requestOptions) {
+ final String comp = "lease";
+ final String action = "break";
+ final String accept = "application/xml";
+ DateTimeRfc1123 ifModifiedSinceConverted
+ = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince);
+ DateTimeRfc1123 ifUnmodifiedSinceConverted
+ = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince);
+ return service.breakLease(this.client.getUrl(), containerName, blob, comp, action, timeout, breakPeriod,
+ ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags,
+ this.client.getVersion(), requestId, accept, requestOptions);
+ }
+
+ /**
+ * [Update] The Lease Blob operation establishes and manages a lock on a blob for write and delete operations.
+ *
+ * @param containerName The container name.
+ * @param blob The blob name.
+ * @param timeout The timeout parameter is expressed in seconds. For more information, see <a
+ * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting
+ * Timeouts for Blob Service Operations.</a>.
+ * @param breakPeriod For a break operation, proposed duration the lease should continue before it is broken, in
+ * seconds, between 0 and 60. This break period is only used if it is shorter than the time remaining on the lease.
+ * If longer, the time remaining on the lease is used. A new lease will not be available before the break period has
+ * expired, but the lease may be held for longer than the break period. If this header does not appear with a break
+ * operation, a fixed-duration lease breaks after the remaining lease period elapses, and an infinite lease breaks
+ * immediately.
+ * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the
+ * specified date/time.
+ * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since
+ * the specified date/time.
+ * @param ifMatch Specify an ETag value to operate only on blobs with a matching value.
+ * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value.
+ * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value.
+ * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the
+ * analytics logs when storage analytics logging is enabled.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the service returns an error.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ public void breakLease(String containerName, String blob, Integer timeout, Integer breakPeriod,
+ OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch,
+ String ifTags, String requestId) {
+ breakLeaseWithResponse(containerName, blob, timeout, breakPeriod, ifModifiedSince, ifUnmodifiedSince, ifMatch,
+ ifNoneMatch, ifTags, requestId, RequestOptions.none());
+ }
+
+ /**
+ * The Create Snapshot operation creates a read-only snapshot of a blob.
+ *
+ * @param containerName The container name.
+ * @param blob The blob name.
+ * @param timeout The timeout parameter is expressed in seconds. For more information, see <a
+ * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting
+ * Timeouts for Blob Service Operations.</a>.
+ * @param metadata Optional. Specifies a user-defined name-value pair associated with the blob. If no name-value
+ * pairs are specified, the operation will copy the metadata from the source blob or file to the destination blob.
+ * If one or more name-value pairs are specified, the destination blob is created with the specified metadata, and
+ * metadata is not copied from the source blob or file. Note that beginning with version 2009-09-19, metadata names
+ * must adhere to the naming rules for C# identifiers. See Naming and Referencing Containers, Blobs, and Metadata
+ * for more information.
+ * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the
+ * specified date/time.
+ * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since
+ * the specified date/time.
+ * @param ifMatch Specify an ETag value to operate only on blobs with a matching value.
+ * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value.
+ * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value.
+ * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID.
+ * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the
+ * analytics logs when storage analytics logging is enabled.
+ * @param cpkInfo Parameter group.
+ * @param encryptionScopeParam Parameter group.
+ * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the service returns an error.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response.
+ */
+ public Response createSnapshotWithResponse(String containerName, String blob, Integer timeout,
+ Map metadata, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch,
+ String ifNoneMatch, String ifTags, String leaseId, String requestId, CpkInfo cpkInfo,
+ EncryptionScope encryptionScopeParam, RequestOptions requestOptions) {
+ final String comp = "snapshot";
+ final String accept = "application/xml";
+ String encryptionKeyInternal = null;
+ if (cpkInfo != null) {
+ encryptionKeyInternal = cpkInfo.getEncryptionKey();
+ }
+ String encryptionKey = encryptionKeyInternal;
+ String encryptionKeySha256Internal = null;
+ if (cpkInfo != null) {
+ encryptionKeySha256Internal = cpkInfo.getEncryptionKeySha256();
+ }
+ String encryptionKeySha256 = encryptionKeySha256Internal;
+ EncryptionAlgorithmType encryptionAlgorithmInternal = null;
+ if (cpkInfo != null) {
+ encryptionAlgorithmInternal = cpkInfo.getEncryptionAlgorithm();
+ }
+ EncryptionAlgorithmType encryptionAlgorithm = encryptionAlgorithmInternal;
+ String encryptionScopeInternal = null;
+ if (encryptionScopeParam != null) {
+ encryptionScopeInternal = encryptionScopeParam.getEncryptionScope();
+ }
+ String encryptionScope = encryptionScopeInternal;
+ DateTimeRfc1123 ifModifiedSinceConverted
+ = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince);
+ DateTimeRfc1123 ifUnmodifiedSinceConverted
+ = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince);
+ return service.createSnapshot(this.client.getUrl(), containerName, blob, comp, timeout, metadata, encryptionKey,
+ encryptionKeySha256, encryptionAlgorithm, encryptionScope, ifModifiedSinceConverted,
+ ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, leaseId, this.client.getVersion(), requestId,
+ accept, requestOptions);
+ }
+
+ /**
+ * The Create Snapshot operation creates a read-only snapshot of a blob.
+ *
+ * @param containerName The container name.
+ * @param blob The blob name.
+ * @param timeout The timeout parameter is expressed in seconds. For more information, see <a
+ * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting
+ * Timeouts for Blob Service Operations.</a>.
+ * @param metadata Optional. Specifies a user-defined name-value pair associated with the blob. If no name-value
+ * pairs are specified, the operation will copy the metadata from the source blob or file to the destination blob.
+ * If one or more name-value pairs are specified, the destination blob is created with the specified metadata, and
+ * metadata is not copied from the source blob or file. Note that beginning with version 2009-09-19, metadata names
+ * must adhere to the naming rules for C# identifiers. See Naming and Referencing Containers, Blobs, and Metadata
+ * for more information.
+ * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the
+ * specified date/time.
+ * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since
+ * the specified date/time.
+ * @param ifMatch Specify an ETag value to operate only on blobs with a matching value.
+ * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value.
+ * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value.
+ * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID.
+ * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the
+ * analytics logs when storage analytics logging is enabled.
+ * @param cpkInfo Parameter group.
+ * @param encryptionScopeParam Parameter group.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the service returns an error.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ public void createSnapshot(String containerName, String blob, Integer timeout, Map metadata,
+ OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch,
+ String ifTags, String leaseId, String requestId, CpkInfo cpkInfo, EncryptionScope encryptionScopeParam) {
+ createSnapshotWithResponse(containerName, blob, timeout, metadata, ifModifiedSince, ifUnmodifiedSince, ifMatch,
+ ifNoneMatch, ifTags, leaseId, requestId, cpkInfo, encryptionScopeParam, RequestOptions.none());
+ }
+
+ /**
+ * The Start Copy From URL operation copies a blob or an internet resource to a new blob.
+ *
+ * @param containerName The container name.
+ * @param blob The blob name.
+ * @param copySource Specifies the name of the source page blob snapshot. This value is a URL of up to 2 KB in
+ * length that specifies a page blob snapshot. The value should be URL-encoded as it would appear in a request URI.
+ * The source blob must either be public or must be authenticated via a shared access signature.
+ * @param timeout The timeout parameter is expressed in seconds. For more information, see <a
+ * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting
+ * Timeouts for Blob Service Operations.</a>.
+ * @param metadata Optional. Specifies a user-defined name-value pair associated with the blob. If no name-value
+ * pairs are specified, the operation will copy the metadata from the source blob or file to the destination blob.
+ * If one or more name-value pairs are specified, the destination blob is created with the specified metadata, and
+ * metadata is not copied from the source blob or file. Note that beginning with version 2009-09-19, metadata names
+ * must adhere to the naming rules for C# identifiers. See Naming and Referencing Containers, Blobs, and Metadata
+ * for more information.
+ * @param tier Optional. Indicates the tier to be set on the blob.
+ * @param rehydratePriority Optional: Indicates the priority with which to rehydrate an archived blob.
+ * @param sourceIfModifiedSince Specify this header value to operate only on a blob if it has been modified since
+ * the specified date/time.
+ * @param sourceIfUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified
+ * since the specified date/time.
+ * @param sourceIfMatch Specify an ETag value to operate only on blobs with a matching value.
+ * @param sourceIfNoneMatch Specify an ETag value to operate only on blobs without a matching value.
+ * @param sourceIfTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value.
+ * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the
+ * specified date/time.
+ * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since
+ * the specified date/time.
+ * @param ifMatch Specify an ETag value to operate only on blobs with a matching value.
+ * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value.
+ * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value.
+ * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID.
+ * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the
+ * analytics logs when storage analytics logging is enabled.
+ * @param blobTagsString Optional. Used to set blob tags in various blob operations.
+ * @param sealBlob Overrides the sealed state of the destination blob. Service version 2019-12-12 and newer.
+ * @param immutabilityPolicyExpiry Specifies the date time when the blobs immutability policy is set to expire.
+ * @param immutabilityPolicyMode Specifies the immutability policy mode to set on the blob.
+ * @param legalHold Specified if a legal hold should be set on the blob.
+ * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the service returns an error.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response.
+ */
+ public Response startCopyFromURLWithResponse(String containerName, String blob, String copySource,
+ Integer timeout, Map metadata, AccessTier tier, RehydratePriority rehydratePriority,
+ OffsetDateTime sourceIfModifiedSince, OffsetDateTime sourceIfUnmodifiedSince, String sourceIfMatch,
+ String sourceIfNoneMatch, String sourceIfTags, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince,
+ String ifMatch, String ifNoneMatch, String ifTags, String leaseId, String requestId, String blobTagsString,
+ Boolean sealBlob, OffsetDateTime immutabilityPolicyExpiry, BlobImmutabilityPolicyMode immutabilityPolicyMode,
+ Boolean legalHold, RequestOptions requestOptions) {
+ final String accept = "application/xml";
+ DateTimeRfc1123 sourceIfModifiedSinceConverted
+ = sourceIfModifiedSince == null ? null : new DateTimeRfc1123(sourceIfModifiedSince);
+ DateTimeRfc1123 sourceIfUnmodifiedSinceConverted
+ = sourceIfUnmodifiedSince == null ? null : new DateTimeRfc1123(sourceIfUnmodifiedSince);
+ DateTimeRfc1123 ifModifiedSinceConverted
+ = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince);
+ DateTimeRfc1123 ifUnmodifiedSinceConverted
+ = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince);
+ DateTimeRfc1123 immutabilityPolicyExpiryConverted
+ = immutabilityPolicyExpiry == null ? null : new DateTimeRfc1123(immutabilityPolicyExpiry);
+ return service.startCopyFromURL(this.client.getUrl(), containerName, blob, timeout, metadata, tier,
+ rehydratePriority, sourceIfModifiedSinceConverted, sourceIfUnmodifiedSinceConverted, sourceIfMatch,
+ sourceIfNoneMatch, sourceIfTags, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch,
+ ifTags, copySource, leaseId, this.client.getVersion(), requestId, blobTagsString, sealBlob,
+ immutabilityPolicyExpiryConverted, immutabilityPolicyMode, legalHold, accept, requestOptions);
+ }
+
+ /**
+ * The Start Copy From URL operation copies a blob or an internet resource to a new blob.
+ *
+ * @param containerName The container name.
+ * @param blob The blob name.
+ * @param copySource Specifies the name of the source page blob snapshot. This value is a URL of up to 2 KB in
+ * length that specifies a page blob snapshot. The value should be URL-encoded as it would appear in a request URI.
+ * The source blob must either be public or must be authenticated via a shared access signature.
+ * @param timeout The timeout parameter is expressed in seconds. For more information, see <a
+ * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting
+ * Timeouts for Blob Service Operations.</a>.
+ * @param metadata Optional. Specifies a user-defined name-value pair associated with the blob. If no name-value
+ * pairs are specified, the operation will copy the metadata from the source blob or file to the destination blob.
+ * If one or more name-value pairs are specified, the destination blob is created with the specified metadata, and
+ * metadata is not copied from the source blob or file. Note that beginning with version 2009-09-19, metadata names
+ * must adhere to the naming rules for C# identifiers. See Naming and Referencing Containers, Blobs, and Metadata
+ * for more information.
+ * @param tier Optional. Indicates the tier to be set on the blob.
+ * @param rehydratePriority Optional: Indicates the priority with which to rehydrate an archived blob.
+ * @param sourceIfModifiedSince Specify this header value to operate only on a blob if it has been modified since
+ * the specified date/time.
+ * @param sourceIfUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified
+ * since the specified date/time.
+ * @param sourceIfMatch Specify an ETag value to operate only on blobs with a matching value.
+ * @param sourceIfNoneMatch Specify an ETag value to operate only on blobs without a matching value.
+ * @param sourceIfTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value.
+ * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the
+ * specified date/time.
+ * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since
+ * the specified date/time.
+ * @param ifMatch Specify an ETag value to operate only on blobs with a matching value.
+ * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value.
+ * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value.
+ * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID.
+ * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the
+ * analytics logs when storage analytics logging is enabled.
+ * @param blobTagsString Optional. Used to set blob tags in various blob operations.
+ * @param sealBlob Overrides the sealed state of the destination blob. Service version 2019-12-12 and newer.
+ * @param immutabilityPolicyExpiry Specifies the date time when the blobs immutability policy is set to expire.
+ * @param immutabilityPolicyMode Specifies the immutability policy mode to set on the blob.
+ * @param legalHold Specified if a legal hold should be set on the blob.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the service returns an error.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ public void startCopyFromURL(String containerName, String blob, String copySource, Integer timeout,
+ Map metadata, AccessTier tier, RehydratePriority rehydratePriority,
+ OffsetDateTime sourceIfModifiedSince, OffsetDateTime sourceIfUnmodifiedSince, String sourceIfMatch,
+ String sourceIfNoneMatch, String sourceIfTags, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince,
+ String ifMatch, String ifNoneMatch, String ifTags, String leaseId, String requestId, String blobTagsString,
+ Boolean sealBlob, OffsetDateTime immutabilityPolicyExpiry, BlobImmutabilityPolicyMode immutabilityPolicyMode,
+ Boolean legalHold) {
+ startCopyFromURLWithResponse(containerName, blob, copySource, timeout, metadata, tier, rehydratePriority,
+ sourceIfModifiedSince, sourceIfUnmodifiedSince, sourceIfMatch, sourceIfNoneMatch, sourceIfTags,
+ ifModifiedSince, ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, leaseId, requestId, blobTagsString,
+ sealBlob, immutabilityPolicyExpiry, immutabilityPolicyMode, legalHold, RequestOptions.none());
+ }
+
+ /**
+ * The Copy From URL operation copies a blob or an internet resource to a new blob. It will not return a response
+ * until the copy is complete.
+ *
+ * @param containerName The container name.
+ * @param blob The blob name.
+ * @param copySource Specifies the name of the source page blob snapshot. This value is a URL of up to 2 KB in
+ * length that specifies a page blob snapshot. The value should be URL-encoded as it would appear in a request URI.
+ * The source blob must either be public or must be authenticated via a shared access signature.
+ * @param timeout The timeout parameter is expressed in seconds. For more information, see <a
+ * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting
+ * Timeouts for Blob Service Operations.</a>.
+ * @param metadata Optional. Specifies a user-defined name-value pair associated with the blob. If no name-value
+ * pairs are specified, the operation will copy the metadata from the source blob or file to the destination blob.
+ * If one or more name-value pairs are specified, the destination blob is created with the specified metadata, and
+ * metadata is not copied from the source blob or file. Note that beginning with version 2009-09-19, metadata names
+ * must adhere to the naming rules for C# identifiers. See Naming and Referencing Containers, Blobs, and Metadata
+ * for more information.
+ * @param tier Optional. Indicates the tier to be set on the blob.
+ * @param sourceIfModifiedSince Specify this header value to operate only on a blob if it has been modified since
+ * the specified date/time.
+ * @param sourceIfUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified
+ * since the specified date/time.
+ * @param sourceIfMatch Specify an ETag value to operate only on blobs with a matching value.
+ * @param sourceIfNoneMatch Specify an ETag value to operate only on blobs without a matching value.
+ * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the
+ * specified date/time.
+ * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since
+ * the specified date/time.
+ * @param ifMatch Specify an ETag value to operate only on blobs with a matching value.
+ * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value.
+ * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value.
+ * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID.
+ * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the
+ * analytics logs when storage analytics logging is enabled.
+ * @param sourceContentMD5 Specify the md5 calculated for the range of bytes that must be read from the copy source.
+ * @param blobTagsString Optional. Used to set blob tags in various blob operations.
+ * @param immutabilityPolicyExpiry Specifies the date time when the blobs immutability policy is set to expire.
+ * @param immutabilityPolicyMode Specifies the immutability policy mode to set on the blob.
+ * @param legalHold Specified if a legal hold should be set on the blob.
+ * @param copySourceAuthorization Only Bearer type is supported. Credentials should be a valid OAuth access token to
+ * copy source.
+ * @param copySourceTags Optional, default 'replace'. Indicates if source tags should be copied or replaced with the
+ * tags specified by x-ms-tags.
+ * @param encryptionScopeParam Parameter group.
+ * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the service returns an error.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response.
+ */
+ public Response copyFromURLWithResponse(String containerName, String blob, String copySource, Integer timeout,
+ Map metadata, AccessTier tier, OffsetDateTime sourceIfModifiedSince,
+ OffsetDateTime sourceIfUnmodifiedSince, String sourceIfMatch, String sourceIfNoneMatch,
+ OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch,
+ String ifTags, String leaseId, String requestId, byte[] sourceContentMD5, String blobTagsString,
+ OffsetDateTime immutabilityPolicyExpiry, BlobImmutabilityPolicyMode immutabilityPolicyMode, Boolean legalHold,
+ String copySourceAuthorization, BlobCopySourceTagsMode copySourceTags, EncryptionScope encryptionScopeParam,
+ RequestOptions requestOptions) {
+ final String xMsRequiresSync = "true";
+ final String accept = "application/xml";
+ String encryptionScopeInternal = null;
+ if (encryptionScopeParam != null) {
+ encryptionScopeInternal = encryptionScopeParam.getEncryptionScope();
+ }
+ String encryptionScope = encryptionScopeInternal;
+ DateTimeRfc1123 sourceIfModifiedSinceConverted
+ = sourceIfModifiedSince == null ? null : new DateTimeRfc1123(sourceIfModifiedSince);
+ DateTimeRfc1123 sourceIfUnmodifiedSinceConverted
+ = sourceIfUnmodifiedSince == null ? null : new DateTimeRfc1123(sourceIfUnmodifiedSince);
+ DateTimeRfc1123 ifModifiedSinceConverted
+ = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince);
+ DateTimeRfc1123 ifUnmodifiedSinceConverted
+ = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince);
+ String sourceContentMD5Converted = Base64Util.encodeToString(sourceContentMD5);
+ DateTimeRfc1123 immutabilityPolicyExpiryConverted
+ = immutabilityPolicyExpiry == null ? null : new DateTimeRfc1123(immutabilityPolicyExpiry);
+ return service.copyFromURL(this.client.getUrl(), containerName, blob, xMsRequiresSync, timeout, metadata, tier,
+ sourceIfModifiedSinceConverted, sourceIfUnmodifiedSinceConverted, sourceIfMatch, sourceIfNoneMatch,
+ ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, copySource, leaseId,
+ this.client.getVersion(), requestId, sourceContentMD5Converted, blobTagsString,
+ immutabilityPolicyExpiryConverted, immutabilityPolicyMode, legalHold, copySourceAuthorization,
+ encryptionScope, copySourceTags, accept, requestOptions);
+ }
+
+ /**
+ * The Copy From URL operation copies a blob or an internet resource to a new blob. It will not return a response
+ * until the copy is complete.
+ *
+ * @param containerName The container name.
+ * @param blob The blob name.
+ * @param copySource Specifies the name of the source page blob snapshot. This value is a URL of up to 2 KB in
+ * length that specifies a page blob snapshot. The value should be URL-encoded as it would appear in a request URI.
+ * The source blob must either be public or must be authenticated via a shared access signature.
+ * @param timeout The timeout parameter is expressed in seconds. For more information, see <a
+ * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting
+ * Timeouts for Blob Service Operations.</a>.
+ * @param metadata Optional. Specifies a user-defined name-value pair associated with the blob. If no name-value
+ * pairs are specified, the operation will copy the metadata from the source blob or file to the destination blob.
+ * If one or more name-value pairs are specified, the destination blob is created with the specified metadata, and
+ * metadata is not copied from the source blob or file. Note that beginning with version 2009-09-19, metadata names
+ * must adhere to the naming rules for C# identifiers. See Naming and Referencing Containers, Blobs, and Metadata
+ * for more information.
+ * @param tier Optional. Indicates the tier to be set on the blob.
+ * @param sourceIfModifiedSince Specify this header value to operate only on a blob if it has been modified since
+ * the specified date/time.
+ * @param sourceIfUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified
+ * since the specified date/time.
+ * @param sourceIfMatch Specify an ETag value to operate only on blobs with a matching value.
+ * @param sourceIfNoneMatch Specify an ETag value to operate only on blobs without a matching value.
+ * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the
+ * specified date/time.
+ * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since
+ * the specified date/time.
+ * @param ifMatch Specify an ETag value to operate only on blobs with a matching value.
+ * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value.
+ * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value.
+ * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID.
+ * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the
+ * analytics logs when storage analytics logging is enabled.
+ * @param sourceContentMD5 Specify the md5 calculated for the range of bytes that must be read from the copy source.
+ * @param blobTagsString Optional. Used to set blob tags in various blob operations.
+ * @param immutabilityPolicyExpiry Specifies the date time when the blobs immutability policy is set to expire.
+ * @param immutabilityPolicyMode Specifies the immutability policy mode to set on the blob.
+ * @param legalHold Specified if a legal hold should be set on the blob.
+ * @param copySourceAuthorization Only Bearer type is supported. Credentials should be a valid OAuth access token to
+ * copy source.
+ * @param copySourceTags Optional, default 'replace'. Indicates if source tags should be copied or replaced with the
+ * tags specified by x-ms-tags.
+ * @param encryptionScopeParam Parameter group.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the service returns an error.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ public void copyFromURL(String containerName, String blob, String copySource, Integer timeout,
+ Map metadata, AccessTier tier, OffsetDateTime sourceIfModifiedSince,
+ OffsetDateTime sourceIfUnmodifiedSince, String sourceIfMatch, String sourceIfNoneMatch,
+ OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch,
+ String ifTags, String leaseId, String requestId, byte[] sourceContentMD5, String blobTagsString,
+ OffsetDateTime immutabilityPolicyExpiry, BlobImmutabilityPolicyMode immutabilityPolicyMode, Boolean legalHold,
+ String copySourceAuthorization, BlobCopySourceTagsMode copySourceTags, EncryptionScope encryptionScopeParam) {
+ copyFromURLWithResponse(containerName, blob, copySource, timeout, metadata, tier, sourceIfModifiedSince,
+ sourceIfUnmodifiedSince, sourceIfMatch, sourceIfNoneMatch, ifModifiedSince, ifUnmodifiedSince, ifMatch,
+ ifNoneMatch, ifTags, leaseId, requestId, sourceContentMD5, blobTagsString, immutabilityPolicyExpiry,
+ immutabilityPolicyMode, legalHold, copySourceAuthorization, copySourceTags, encryptionScopeParam,
+ RequestOptions.none());
+ }
+
+ /**
+ * The Abort Copy From URL operation aborts a pending Copy From URL operation, and leaves a destination blob with
+ * zero length and full metadata.
+ *
+ * @param containerName The container name.
+ * @param blob The blob name.
+ * @param copyId The copy identifier provided in the x-ms-copy-id header of the original Copy Blob operation.
+ * @param timeout The timeout parameter is expressed in seconds. For more information, see <a
+ * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting
+ * Timeouts for Blob Service Operations.</a>.
+ * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID.
+ * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the
+ * analytics logs when storage analytics logging is enabled.
+ * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the service returns an error.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response.
+ */
+ public Response abortCopyFromURLWithResponse(String containerName, String blob, String copyId,
+ Integer timeout, String leaseId, String requestId, RequestOptions requestOptions) {
+ final String comp = "copy";
+ final String copyActionAbortConstant = "abort";
+ final String accept = "application/xml";
+ return service.abortCopyFromURL(this.client.getUrl(), containerName, blob, comp, copyActionAbortConstant,
+ copyId, timeout, leaseId, this.client.getVersion(), requestId, accept, requestOptions);
+ }
+
+ /**
+ * The Abort Copy From URL operation aborts a pending Copy From URL operation, and leaves a destination blob with
+ * zero length and full metadata.
+ *
+ * @param containerName The container name.
+ * @param blob The blob name.
+ * @param copyId The copy identifier provided in the x-ms-copy-id header of the original Copy Blob operation.
+ * @param timeout The timeout parameter is expressed in seconds. For more information, see <a
+ * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting
+ * Timeouts for Blob Service Operations.</a>.
+ * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID.
+ * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the
+ * analytics logs when storage analytics logging is enabled.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the service returns an error.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ public void abortCopyFromURL(String containerName, String blob, String copyId, Integer timeout, String leaseId,
+ String requestId) {
+ abortCopyFromURLWithResponse(containerName, blob, copyId, timeout, leaseId, requestId, RequestOptions.none());
+ }
+
+ /**
+ * The Set Tier operation sets the tier on a blob. The operation is allowed on a page blob in a premium storage
+ * account and on a block blob in a blob storage account (locally redundant storage only). A premium page blob's
+ * tier determines the allowed size, IOPS, and bandwidth of the blob. A block blob's tier determines
+ * Hot/Cool/Archive storage type. This operation does not update the blob's ETag.
+ *
+ * @param containerName The container name.
+ * @param blob The blob name.
+ * @param tier Indicates the tier to be set on the blob.
+ * @param snapshot The snapshot parameter is an opaque DateTime value that, when present, specifies the blob
+ * snapshot to retrieve. For more information on working with blob snapshots, see <a
+ * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/creating-a-snapshot-of-a-blob">Creating
+ * a Snapshot of a Blob.</a>.
+ * @param versionId The version id parameter is an opaque DateTime value that, when present, specifies the version
+ * of the blob to operate on. It's for service version 2019-10-10 and newer.
+ * @param timeout The timeout parameter is expressed in seconds. For more information, see <a
+ * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting
+ * Timeouts for Blob Service Operations.</a>.
+ * @param rehydratePriority Optional: Indicates the priority with which to rehydrate an archived blob.
+ * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the
+ * analytics logs when storage analytics logging is enabled.
+ * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID.
+ * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value.
+ * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the service returns an error.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response.
+ */
+ public Response setTierWithResponse(String containerName, String blob, AccessTier tier, String snapshot,
+ String versionId, Integer timeout, RehydratePriority rehydratePriority, String requestId, String leaseId,
+ String ifTags, RequestOptions requestOptions) {
+ final String comp = "tier";
+ final String accept = "application/xml";
+ return service.setTier(this.client.getUrl(), containerName, blob, comp, snapshot, versionId, timeout, tier,
+ rehydratePriority, this.client.getVersion(), requestId, leaseId, ifTags, accept, requestOptions);
+ }
+
+ /**
+ * The Set Tier operation sets the tier on a blob. The operation is allowed on a page blob in a premium storage
+ * account and on a block blob in a blob storage account (locally redundant storage only). A premium page blob's
+ * tier determines the allowed size, IOPS, and bandwidth of the blob. A block blob's tier determines
+ * Hot/Cool/Archive storage type. This operation does not update the blob's ETag.
+ *
+ * @param containerName The container name.
+ * @param blob The blob name.
+ * @param tier Indicates the tier to be set on the blob.
+ * @param snapshot The snapshot parameter is an opaque DateTime value that, when present, specifies the blob
+ * snapshot to retrieve. For more information on working with blob snapshots, see <a
+ * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/creating-a-snapshot-of-a-blob">Creating
+ * a Snapshot of a Blob.</a>.
+ * @param versionId The version id parameter is an opaque DateTime value that, when present, specifies the version
+ * of the blob to operate on. It's for service version 2019-10-10 and newer.
+ * @param timeout The timeout parameter is expressed in seconds. For more information, see <a
+ * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting
+ * Timeouts for Blob Service Operations.</a>.
+ * @param rehydratePriority Optional: Indicates the priority with which to rehydrate an archived blob.
+ * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the
+ * analytics logs when storage analytics logging is enabled.
+ * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID.
+ * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the service returns an error.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ public void setTier(String containerName, String blob, AccessTier tier, String snapshot, String versionId,
+ Integer timeout, RehydratePriority rehydratePriority, String requestId, String leaseId, String ifTags) {
+ setTierWithResponse(containerName, blob, tier, snapshot, versionId, timeout, rehydratePriority, requestId,
+ leaseId, ifTags, RequestOptions.none());
+ }
+
+ /**
+ * Returns the sku name and account kind.
+ *
+ * @param containerName The container name.
+ * @param blob The blob name.
+ * @param timeout The timeout parameter is expressed in seconds. For more information, see <a
+ * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting
+ * Timeouts for Blob Service Operations.</a>.
+ * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the
+ * analytics logs when storage analytics logging is enabled.
+ * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the service returns an error.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response.
+ */
+ public Response getAccountInfoWithResponse(String containerName, String blob, Integer timeout,
+ String requestId, RequestOptions requestOptions) {
+ final String restype = "account";
+ final String comp = "properties";
+ final String accept = "application/xml";
+ return service.getAccountInfo(this.client.getUrl(), containerName, blob, restype, comp, timeout,
+ this.client.getVersion(), requestId, accept, requestOptions);
+ }
+
+ /**
+ * Returns the sku name and account kind.
+ *
+ * @param containerName The container name.
+ * @param blob The blob name.
+ * @param timeout The timeout parameter is expressed in seconds. For more information, see <a
+ * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting
+ * Timeouts for Blob Service Operations.</a>.
+ * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the
+ * analytics logs when storage analytics logging is enabled.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the service returns an error.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ public void getAccountInfo(String containerName, String blob, Integer timeout, String requestId) {
+ getAccountInfoWithResponse(containerName, blob, timeout, requestId, RequestOptions.none());
+ }
+
+ /**
+ * The Query operation enables users to select/project on blob data by providing simple query expressions.
+ *
+ * @param containerName The container name.
+ * @param blob The blob name.
+ * @param snapshot The snapshot parameter is an opaque DateTime value that, when present, specifies the blob
+ * snapshot to retrieve. For more information on working with blob snapshots, see <a
+ * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/creating-a-snapshot-of-a-blob">Creating
+ * a Snapshot of a Blob.</a>.
+ * @param timeout The timeout parameter is expressed in seconds. For more information, see <a
+ * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting
+ * Timeouts for Blob Service Operations.</a>.
+ * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID.
+ * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the
+ * specified date/time.
+ * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since
+ * the specified date/time.
+ * @param ifMatch Specify an ETag value to operate only on blobs with a matching value.
+ * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value.
+ * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value.
+ * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the
+ * analytics logs when storage analytics logging is enabled.
+ * @param queryRequest the query request.
+ * @param cpkInfo Parameter group.
+ * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the service returns an error.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response.
+ */
+ public Response queryWithResponse(String containerName, String blob, String snapshot, Integer timeout,
+ String leaseId, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch,
+ String ifNoneMatch, String ifTags, String requestId, QueryRequest queryRequest, CpkInfo cpkInfo,
+ RequestOptions requestOptions) {
+ final String comp = "query";
+ final String accept = "application/xml";
+ String encryptionKeyInternal = null;
+ if (cpkInfo != null) {
+ encryptionKeyInternal = cpkInfo.getEncryptionKey();
+ }
+ String encryptionKey = encryptionKeyInternal;
+ String encryptionKeySha256Internal = null;
+ if (cpkInfo != null) {
+ encryptionKeySha256Internal = cpkInfo.getEncryptionKeySha256();
+ }
+ String encryptionKeySha256 = encryptionKeySha256Internal;
+ EncryptionAlgorithmType encryptionAlgorithmInternal = null;
+ if (cpkInfo != null) {
+ encryptionAlgorithmInternal = cpkInfo.getEncryptionAlgorithm();
+ }
+ EncryptionAlgorithmType encryptionAlgorithm = encryptionAlgorithmInternal;
+ DateTimeRfc1123 ifModifiedSinceConverted
+ = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince);
+ DateTimeRfc1123 ifUnmodifiedSinceConverted
+ = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince);
+ return service.query(this.client.getUrl(), containerName, blob, comp, snapshot, timeout, leaseId, encryptionKey,
+ encryptionKeySha256, encryptionAlgorithm, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch,
+ ifNoneMatch, ifTags, this.client.getVersion(), requestId, queryRequest, accept, requestOptions);
+ }
+
+ /**
+ * The Query operation enables users to select/project on blob data by providing simple query expressions.
+ *
+ * @param containerName The container name.
+ * @param blob The blob name.
+ * @param snapshot The snapshot parameter is an opaque DateTime value that, when present, specifies the blob
+ * snapshot to retrieve. For more information on working with blob snapshots, see <a
+ * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/creating-a-snapshot-of-a-blob">Creating
+ * a Snapshot of a Blob.</a>.
+ * @param timeout The timeout parameter is expressed in seconds. For more information, see <a
+ * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting
+ * Timeouts for Blob Service Operations.</a>.
+ * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID.
+ * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the
+ * specified date/time.
+ * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since
+ * the specified date/time.
+ * @param ifMatch Specify an ETag value to operate only on blobs with a matching value.
+ * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value.
+ * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value.
+ * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the
+ * analytics logs when storage analytics logging is enabled.
+ * @param queryRequest the query request.
+ * @param cpkInfo Parameter group.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the service returns an error.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response.
+ */
+ public InputStream query(String containerName, String blob, String snapshot, Integer timeout, String leaseId,
+ OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch,
+ String ifTags, String requestId, QueryRequest queryRequest, CpkInfo cpkInfo) {
+ return queryWithResponse(containerName, blob, snapshot, timeout, leaseId, ifModifiedSince, ifUnmodifiedSince,
+ ifMatch, ifNoneMatch, ifTags, requestId, queryRequest, cpkInfo, RequestOptions.none()).getValue();
+ }
+
+ /**
+ * The Get Tags operation enables users to get the tags associated with a blob.
+ *
+ * @param containerName The container name.
+ * @param blob The blob name.
+ * @param timeout The timeout parameter is expressed in seconds. For more information, see <a
+ * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting
+ * Timeouts for Blob Service Operations.</a>.
+ * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the
+ * analytics logs when storage analytics logging is enabled.
+ * @param snapshot The snapshot parameter is an opaque DateTime value that, when present, specifies the blob
+ * snapshot to retrieve. For more information on working with blob snapshots, see <a
+ * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/creating-a-snapshot-of-a-blob">Creating
+ * a Snapshot of a Blob.</a>.
+ * @param versionId The version id parameter is an opaque DateTime value that, when present, specifies the version
+ * of the blob to operate on. It's for service version 2019-10-10 and newer.
+ * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value.
+ * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID.
+ * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the service returns an error.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return blob tags.
+ */
+ public Response getTagsWithResponse(String containerName, String blob, Integer timeout, String requestId,
+ String snapshot, String versionId, String ifTags, String leaseId, RequestOptions requestOptions) {
+ final String comp = "tags";
+ final String accept = "application/xml";
+ return service.getTags(this.client.getUrl(), containerName, blob, comp, timeout, this.client.getVersion(),
+ requestId, snapshot, versionId, ifTags, leaseId, accept, requestOptions);
+ }
+
+ /**
+ * The Get Tags operation enables users to get the tags associated with a blob.
+ *
+ * @param containerName The container name.
+ * @param blob The blob name.
+ * @param timeout The timeout parameter is expressed in seconds. For more information, see <a
+ * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting
+ * Timeouts for Blob Service Operations.</a>.
+ * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the
+ * analytics logs when storage analytics logging is enabled.
+ * @param snapshot The snapshot parameter is an opaque DateTime value that, when present, specifies the blob
+ * snapshot to retrieve. For more information on working with blob snapshots, see <a
+ * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/creating-a-snapshot-of-a-blob">Creating
+ * a Snapshot of a Blob.</a>.
+ * @param versionId The version id parameter is an opaque DateTime value that, when present, specifies the version
+ * of the blob to operate on. It's for service version 2019-10-10 and newer.
+ * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value.
+ * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the service returns an error.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return blob tags.
+ */
+ public BlobTags getTags(String containerName, String blob, Integer timeout, String requestId, String snapshot,
+ String versionId, String ifTags, String leaseId) {
+ return getTagsWithResponse(containerName, blob, timeout, requestId, snapshot, versionId, ifTags, leaseId,
+ RequestOptions.none()).getValue();
+ }
+
+ /**
+ * The Set Tags operation enables users to set tags on a blob.
+ *
+ * @param containerName The container name.
+ * @param blob The blob name.
+ * @param timeout The timeout parameter is expressed in seconds. For more information, see <a
+ * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting
+ * Timeouts for Blob Service Operations.</a>.
+ * @param versionId The version id parameter is an opaque DateTime value that, when present, specifies the version
+ * of the blob to operate on. It's for service version 2019-10-10 and newer.
+ * @param transactionalContentMD5 Specify the transactional md5 for the body, to be validated by the service.
+ * @param transactionalContentCrc64 Specify the transactional crc64 for the body, to be validated by the service.
+ * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the
+ * analytics logs when storage analytics logging is enabled.
+ * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value.
+ * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID.
+ * @param tags Blob tags.
+ * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the service returns an error.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response.
+ */
+ public Response setTagsWithResponse(String containerName, String blob, Integer timeout, String versionId,
+ byte[] transactionalContentMD5, byte[] transactionalContentCrc64, String requestId, String ifTags,
+ String leaseId, BlobTags tags, RequestOptions requestOptions) {
+ final String comp = "tags";
+ final String accept = "application/xml";
+ String transactionalContentMD5Converted = Base64Util.encodeToString(transactionalContentMD5);
+ String transactionalContentCrc64Converted = Base64Util.encodeToString(transactionalContentCrc64);
+ return service.setTags(this.client.getUrl(), containerName, blob, comp, this.client.getVersion(), timeout,
+ versionId, transactionalContentMD5Converted, transactionalContentCrc64Converted, requestId, ifTags, leaseId,
+ tags, accept, requestOptions);
+ }
+
+ /**
+ * The Set Tags operation enables users to set tags on a blob.
+ *
+ * @param containerName The container name.
+ * @param blob The blob name.
+ * @param timeout The timeout parameter is expressed in seconds. For more information, see <a
+ * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting
+ * Timeouts for Blob Service Operations.</a>.
+ * @param versionId The version id parameter is an opaque DateTime value that, when present, specifies the version
+ * of the blob to operate on. It's for service version 2019-10-10 and newer.
+ * @param transactionalContentMD5 Specify the transactional md5 for the body, to be validated by the service.
+ * @param transactionalContentCrc64 Specify the transactional crc64 for the body, to be validated by the service.
+ * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the
+ * analytics logs when storage analytics logging is enabled.
+ * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value.
+ * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID.
+ * @param tags Blob tags.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the service returns an error.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ public void setTags(String containerName, String blob, Integer timeout, String versionId,
+ byte[] transactionalContentMD5, byte[] transactionalContentCrc64, String requestId, String ifTags,
+ String leaseId, BlobTags tags) {
+ setTagsWithResponse(containerName, blob, timeout, versionId, transactionalContentMD5, transactionalContentCrc64,
+ requestId, ifTags, leaseId, tags, RequestOptions.none());
+ }
+}
diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/implementation/BlockBlobsImpl.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/implementation/BlockBlobsImpl.java
new file mode 100644
index 000000000000..092cd907a0fc
--- /dev/null
+++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/implementation/BlockBlobsImpl.java
@@ -0,0 +1,1184 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.v2.storage.blob.implementation;
+
+import com.azure.v2.storage.blob.models.AccessTier;
+import com.azure.v2.storage.blob.models.BlobCopySourceTagsMode;
+import com.azure.v2.storage.blob.models.BlobHttpHeaders;
+import com.azure.v2.storage.blob.models.BlobImmutabilityPolicyMode;
+import com.azure.v2.storage.blob.models.BlockList;
+import com.azure.v2.storage.blob.models.BlockListType;
+import com.azure.v2.storage.blob.models.BlockLookupList;
+import com.azure.v2.storage.blob.models.CpkInfo;
+import com.azure.v2.storage.blob.models.EncryptionAlgorithmType;
+import com.azure.v2.storage.blob.models.EncryptionScope;
+import com.azure.v2.storage.blob.models.StorageError;
+import io.clientcore.core.annotations.ServiceInterface;
+import io.clientcore.core.http.RestProxy;
+import io.clientcore.core.http.annotations.BodyParam;
+import io.clientcore.core.http.annotations.HeaderParam;
+import io.clientcore.core.http.annotations.HostParam;
+import io.clientcore.core.http.annotations.HttpRequestInformation;
+import io.clientcore.core.http.annotations.PathParam;
+import io.clientcore.core.http.annotations.QueryParam;
+import io.clientcore.core.http.annotations.UnexpectedResponseExceptionDetail;
+import io.clientcore.core.http.exceptions.HttpResponseException;
+import io.clientcore.core.http.models.HttpMethod;
+import io.clientcore.core.http.models.RequestOptions;
+import io.clientcore.core.http.models.Response;
+import io.clientcore.core.http.pipeline.HttpPipeline;
+import io.clientcore.core.models.binarydata.BinaryData;
+import io.clientcore.core.serialization.ObjectSerializer;
+import io.clientcore.core.utils.Base64Util;
+import io.clientcore.core.utils.DateTimeRfc1123;
+import java.lang.reflect.InvocationTargetException;
+import java.time.OffsetDateTime;
+import java.util.Map;
+
+/**
+ * An instance of this class provides access to all the operations defined in BlockBlobs.
+ */
+public final class BlockBlobsImpl {
+ /**
+ * The proxy service used to perform REST calls.
+ */
+ private final BlockBlobsService service;
+
+ /**
+ * The service client containing this operation class.
+ */
+ private final AzureBlobStorageImpl client;
+
+ /**
+ * Initializes an instance of BlockBlobsImpl.
+ *
+ * @param client the instance of the service client containing this operation class.
+ */
+ BlockBlobsImpl(AzureBlobStorageImpl client) {
+ this.service = RestProxy.create(BlockBlobsService.class, client.getHttpPipeline());
+ this.client = client;
+ }
+
+ /**
+ * The interface defining all the services for AzureBlobStorageBlockBlobs to be used by the proxy service to perform
+ * REST calls.
+ */
+ @ServiceInterface(name = "AzureBlobStorageBloc", host = "{url}")
+ public interface BlockBlobsService {
+ static BlockBlobsService getNewInstance(HttpPipeline pipeline, ObjectSerializer serializer) {
+ try {
+ Class> clazz = Class.forName("com.azure.v2.storage.blob.implementation.BlockBlobsServiceImpl");
+ return (BlockBlobsService) clazz.getMethod("getNewInstance", HttpPipeline.class, ObjectSerializer.class)
+ .invoke(null, pipeline, serializer);
+ } catch (ClassNotFoundException | NoSuchMethodException | IllegalAccessException
+ | InvocationTargetException e) {
+ throw new RuntimeException(e);
+ }
+
+ }
+
+ @HttpRequestInformation(
+ method = HttpMethod.PUT,
+ path = "/{containerName}/{blob}",
+ expectedStatusCodes = { 201 })
+ @UnexpectedResponseExceptionDetail(exceptionBodyClass = StorageError.class)
+ Response upload(@HostParam("url") String url, @PathParam("containerName") String containerName,
+ @PathParam("blob") String blob, @HeaderParam("x-ms-blob-type") String blobType,
+ @QueryParam("timeout") Integer timeout, @HeaderParam("Content-MD5") String transactionalContentMD5,
+ @HeaderParam("Content-Length") long contentLength,
+ @HeaderParam("x-ms-blob-content-type") String contentType,
+ @HeaderParam("x-ms-blob-content-encoding") String contentEncoding,
+ @HeaderParam("x-ms-blob-content-language") String contentLanguage,
+ @HeaderParam("x-ms-blob-content-md5") String contentMd5,
+ @HeaderParam("x-ms-blob-cache-control") String cacheControl,
+ @HeaderParam("x-ms-meta-") Map metadata, @HeaderParam("x-ms-lease-id") String leaseId,
+ @HeaderParam("x-ms-blob-content-disposition") String contentDisposition,
+ @HeaderParam("x-ms-encryption-key") String encryptionKey,
+ @HeaderParam("x-ms-encryption-key-sha256") String encryptionKeySha256,
+ @HeaderParam("x-ms-encryption-algorithm") EncryptionAlgorithmType encryptionAlgorithm,
+ @HeaderParam("x-ms-encryption-scope") String encryptionScope,
+ @HeaderParam("x-ms-access-tier") AccessTier tier,
+ @HeaderParam("If-Modified-Since") DateTimeRfc1123 ifModifiedSince,
+ @HeaderParam("If-Unmodified-Since") DateTimeRfc1123 ifUnmodifiedSince,
+ @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch,
+ @HeaderParam("x-ms-if-tags") String ifTags, @HeaderParam("x-ms-version") String version,
+ @HeaderParam("x-ms-client-request-id") String requestId, @HeaderParam("x-ms-tags") String blobTagsString,
+ @HeaderParam("x-ms-immutability-policy-until-date") DateTimeRfc1123 immutabilityPolicyExpiry,
+ @HeaderParam("x-ms-immutability-policy-mode") BlobImmutabilityPolicyMode immutabilityPolicyMode,
+ @HeaderParam("x-ms-legal-hold") Boolean legalHold,
+ @HeaderParam("x-ms-content-crc64") String transactionalContentCrc64,
+ @HeaderParam("x-ms-structured-body") String structuredBodyType,
+ @HeaderParam("x-ms-structured-content-length") Long structuredContentLength,
+ @BodyParam("application/octet-stream") BinaryData body, @HeaderParam("Accept") String accept,
+ RequestOptions requestOptions);
+
+ @HttpRequestInformation(
+ method = HttpMethod.PUT,
+ path = "/{containerName}/{blob}",
+ expectedStatusCodes = { 201 })
+ @UnexpectedResponseExceptionDetail(exceptionBodyClass = StorageError.class)
+ default void upload(@HostParam("url") String url, @PathParam("containerName") String containerName,
+ @PathParam("blob") String blob, @HeaderParam("x-ms-blob-type") String blobType,
+ @HeaderParam("Content-Length") long contentLength, @HeaderParam("x-ms-version") String version,
+ @BodyParam("application/octet-stream") BinaryData body, @HeaderParam("Accept") String accept) {
+ upload(url, containerName, blob, blobType, null, null, contentLength, null, null, null, null, null, null,
+ null, null, null, null, null, null, null, null, null, null, null, null, version, null, null, null, null,
+ null, null, null, null, body, accept, null);
+ }
+
+ @HttpRequestInformation(
+ method = HttpMethod.PUT,
+ path = "/{containerName}/{blob}",
+ expectedStatusCodes = { 201 })
+ @UnexpectedResponseExceptionDetail(exceptionBodyClass = StorageError.class)
+ Response putBlobFromUrl(@HostParam("url") String url, @PathParam("containerName") String containerName,
+ @PathParam("blob") String blob, @HeaderParam("x-ms-blob-type") String blobType,
+ @QueryParam("timeout") Integer timeout, @HeaderParam("Content-MD5") String transactionalContentMD5,
+ @HeaderParam("Content-Length") long contentLength,
+ @HeaderParam("x-ms-blob-content-type") String contentType,
+ @HeaderParam("x-ms-blob-content-encoding") String contentEncoding,
+ @HeaderParam("x-ms-blob-content-language") String contentLanguage,
+ @HeaderParam("x-ms-blob-content-md5") String contentMd5,
+ @HeaderParam("x-ms-blob-cache-control") String cacheControl,
+ @HeaderParam("x-ms-meta-") Map metadata, @HeaderParam("x-ms-lease-id") String leaseId,
+ @HeaderParam("x-ms-blob-content-disposition") String contentDisposition,
+ @HeaderParam("x-ms-encryption-key") String encryptionKey,
+ @HeaderParam("x-ms-encryption-key-sha256") String encryptionKeySha256,
+ @HeaderParam("x-ms-encryption-algorithm") EncryptionAlgorithmType encryptionAlgorithm,
+ @HeaderParam("x-ms-encryption-scope") String encryptionScope,
+ @HeaderParam("x-ms-access-tier") AccessTier tier,
+ @HeaderParam("If-Modified-Since") DateTimeRfc1123 ifModifiedSince,
+ @HeaderParam("If-Unmodified-Since") DateTimeRfc1123 ifUnmodifiedSince,
+ @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch,
+ @HeaderParam("x-ms-if-tags") String ifTags,
+ @HeaderParam("x-ms-source-if-modified-since") DateTimeRfc1123 sourceIfModifiedSince,
+ @HeaderParam("x-ms-source-if-unmodified-since") DateTimeRfc1123 sourceIfUnmodifiedSince,
+ @HeaderParam("x-ms-source-if-match") String sourceIfMatch,
+ @HeaderParam("x-ms-source-if-none-match") String sourceIfNoneMatch,
+ @HeaderParam("x-ms-source-if-tags") String sourceIfTags, @HeaderParam("x-ms-version") String version,
+ @HeaderParam("x-ms-client-request-id") String requestId,
+ @HeaderParam("x-ms-source-content-md5") String sourceContentMD5,
+ @HeaderParam("x-ms-tags") String blobTagsString, @HeaderParam("x-ms-copy-source") String copySource,
+ @HeaderParam("x-ms-copy-source-blob-properties") Boolean copySourceBlobProperties,
+ @HeaderParam("x-ms-copy-source-authorization") String copySourceAuthorization,
+ @HeaderParam("x-ms-copy-source-tag-option") BlobCopySourceTagsMode copySourceTags,
+ @HeaderParam("Accept") String accept, RequestOptions requestOptions);
+
+ @HttpRequestInformation(
+ method = HttpMethod.PUT,
+ path = "/{containerName}/{blob}",
+ expectedStatusCodes = { 201 })
+ @UnexpectedResponseExceptionDetail(exceptionBodyClass = StorageError.class)
+ default void putBlobFromUrl(@HostParam("url") String url, @PathParam("containerName") String containerName,
+ @PathParam("blob") String blob, @HeaderParam("x-ms-blob-type") String blobType,
+ @HeaderParam("Content-Length") long contentLength, @HeaderParam("x-ms-version") String version,
+ @HeaderParam("x-ms-copy-source") String copySource, @HeaderParam("Accept") String accept) {
+ putBlobFromUrl(url, containerName, blob, blobType, null, null, contentLength, null, null, null, null, null,
+ null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null,
+ null, version, null, null, null, copySource, null, null, null, accept, null);
+ }
+
+ @HttpRequestInformation(
+ method = HttpMethod.PUT,
+ path = "/{containerName}/{blob}",
+ expectedStatusCodes = { 201 })
+ @UnexpectedResponseExceptionDetail(exceptionBodyClass = StorageError.class)
+ Response stageBlock(@HostParam("url") String url, @PathParam("containerName") String containerName,
+ @PathParam("blob") String blob, @QueryParam("comp") String comp, @QueryParam("blockid") String blockId,
+ @HeaderParam("Content-Length") long contentLength,
+ @HeaderParam("Content-MD5") String transactionalContentMD5,
+ @HeaderParam("x-ms-content-crc64") String transactionalContentCrc64, @QueryParam("timeout") Integer timeout,
+ @HeaderParam("x-ms-lease-id") String leaseId, @HeaderParam("x-ms-encryption-key") String encryptionKey,
+ @HeaderParam("x-ms-encryption-key-sha256") String encryptionKeySha256,
+ @HeaderParam("x-ms-encryption-algorithm") EncryptionAlgorithmType encryptionAlgorithm,
+ @HeaderParam("x-ms-encryption-scope") String encryptionScope, @HeaderParam("x-ms-version") String version,
+ @HeaderParam("x-ms-client-request-id") String requestId,
+ @HeaderParam("x-ms-structured-body") String structuredBodyType,
+ @HeaderParam("x-ms-structured-content-length") Long structuredContentLength,
+ @BodyParam("application/octet-stream") BinaryData body, @HeaderParam("Accept") String accept,
+ RequestOptions requestOptions);
+
+ @HttpRequestInformation(
+ method = HttpMethod.PUT,
+ path = "/{containerName}/{blob}",
+ expectedStatusCodes = { 201 })
+ @UnexpectedResponseExceptionDetail(exceptionBodyClass = StorageError.class)
+ default void stageBlock(@HostParam("url") String url, @PathParam("containerName") String containerName,
+ @PathParam("blob") String blob, @QueryParam("comp") String comp, @QueryParam("blockid") String blockId,
+ @HeaderParam("Content-Length") long contentLength, @HeaderParam("x-ms-version") String version,
+ @BodyParam("application/octet-stream") BinaryData body, @HeaderParam("Accept") String accept) {
+ stageBlock(url, containerName, blob, comp, blockId, contentLength, null, null, null, null, null, null, null,
+ null, version, null, null, null, body, accept, null);
+ }
+
+ @HttpRequestInformation(
+ method = HttpMethod.PUT,
+ path = "/{containerName}/{blob}",
+ expectedStatusCodes = { 201 })
+ @UnexpectedResponseExceptionDetail(exceptionBodyClass = StorageError.class)
+ Response stageBlockFromURL(@HostParam("url") String url, @PathParam("containerName") String containerName,
+ @PathParam("blob") String blob, @QueryParam("comp") String comp, @QueryParam("blockid") String blockId,
+ @HeaderParam("Content-Length") long contentLength, @HeaderParam("x-ms-copy-source") String sourceUrl,
+ @HeaderParam("x-ms-source-range") String sourceRange,
+ @HeaderParam("x-ms-source-content-md5") String sourceContentMD5,
+ @HeaderParam("x-ms-source-content-crc64") String sourceContentcrc64, @QueryParam("timeout") Integer timeout,
+ @HeaderParam("x-ms-encryption-key") String encryptionKey,
+ @HeaderParam("x-ms-encryption-key-sha256") String encryptionKeySha256,
+ @HeaderParam("x-ms-encryption-algorithm") EncryptionAlgorithmType encryptionAlgorithm,
+ @HeaderParam("x-ms-encryption-scope") String encryptionScope, @HeaderParam("x-ms-lease-id") String leaseId,
+ @HeaderParam("x-ms-source-if-modified-since") DateTimeRfc1123 sourceIfModifiedSince,
+ @HeaderParam("x-ms-source-if-unmodified-since") DateTimeRfc1123 sourceIfUnmodifiedSince,
+ @HeaderParam("x-ms-source-if-match") String sourceIfMatch,
+ @HeaderParam("x-ms-source-if-none-match") String sourceIfNoneMatch,
+ @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId,
+ @HeaderParam("x-ms-copy-source-authorization") String copySourceAuthorization,
+ @HeaderParam("Accept") String accept, RequestOptions requestOptions);
+
+ @HttpRequestInformation(
+ method = HttpMethod.PUT,
+ path = "/{containerName}/{blob}",
+ expectedStatusCodes = { 201 })
+ @UnexpectedResponseExceptionDetail(exceptionBodyClass = StorageError.class)
+ default void stageBlockFromURL(@HostParam("url") String url, @PathParam("containerName") String containerName,
+ @PathParam("blob") String blob, @QueryParam("comp") String comp, @QueryParam("blockid") String blockId,
+ @HeaderParam("Content-Length") long contentLength, @HeaderParam("x-ms-copy-source") String sourceUrl,
+ @HeaderParam("x-ms-version") String version, @HeaderParam("Accept") String accept) {
+ stageBlockFromURL(url, containerName, blob, comp, blockId, contentLength, sourceUrl, null, null, null, null,
+ null, null, null, null, null, null, null, null, null, version, null, null, accept, null);
+ }
+
+ @HttpRequestInformation(
+ method = HttpMethod.PUT,
+ path = "/{containerName}/{blob}",
+ expectedStatusCodes = { 201 })
+ @UnexpectedResponseExceptionDetail(exceptionBodyClass = StorageError.class)
+ Response commitBlockList(@HostParam("url") String url, @PathParam("containerName") String containerName,
+ @PathParam("blob") String blob, @QueryParam("comp") String comp, @QueryParam("timeout") Integer timeout,
+ @HeaderParam("x-ms-blob-cache-control") String cacheControl,
+ @HeaderParam("x-ms-blob-content-type") String contentType,
+ @HeaderParam("x-ms-blob-content-encoding") String contentEncoding,
+ @HeaderParam("x-ms-blob-content-language") String contentLanguage,
+ @HeaderParam("x-ms-blob-content-md5") String contentMd5,
+ @HeaderParam("Content-MD5") String transactionalContentMD5,
+ @HeaderParam("x-ms-content-crc64") String transactionalContentCrc64,
+ @HeaderParam("x-ms-meta-") Map metadata, @HeaderParam("x-ms-lease-id") String leaseId,
+ @HeaderParam("x-ms-blob-content-disposition") String contentDisposition,
+ @HeaderParam("x-ms-encryption-key") String encryptionKey,
+ @HeaderParam("x-ms-encryption-key-sha256") String encryptionKeySha256,
+ @HeaderParam("x-ms-encryption-algorithm") EncryptionAlgorithmType encryptionAlgorithm,
+ @HeaderParam("x-ms-encryption-scope") String encryptionScope,
+ @HeaderParam("x-ms-access-tier") AccessTier tier,
+ @HeaderParam("If-Modified-Since") DateTimeRfc1123 ifModifiedSince,
+ @HeaderParam("If-Unmodified-Since") DateTimeRfc1123 ifUnmodifiedSince,
+ @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch,
+ @HeaderParam("x-ms-if-tags") String ifTags, @HeaderParam("x-ms-version") String version,
+ @HeaderParam("x-ms-client-request-id") String requestId, @HeaderParam("x-ms-tags") String blobTagsString,
+ @HeaderParam("x-ms-immutability-policy-until-date") DateTimeRfc1123 immutabilityPolicyExpiry,
+ @HeaderParam("x-ms-immutability-policy-mode") BlobImmutabilityPolicyMode immutabilityPolicyMode,
+ @HeaderParam("x-ms-legal-hold") Boolean legalHold, @BodyParam("application/xml") BlockLookupList blocks,
+ @HeaderParam("Accept") String accept, RequestOptions requestOptions);
+
+ @HttpRequestInformation(
+ method = HttpMethod.PUT,
+ path = "/{containerName}/{blob}",
+ expectedStatusCodes = { 201 })
+ @UnexpectedResponseExceptionDetail(exceptionBodyClass = StorageError.class)
+ default void commitBlockList(@HostParam("url") String url, @PathParam("containerName") String containerName,
+ @PathParam("blob") String blob, @QueryParam("comp") String comp,
+ @HeaderParam("x-ms-version") String version, @BodyParam("application/xml") BlockLookupList blocks,
+ @HeaderParam("Accept") String accept) {
+ commitBlockList(url, containerName, blob, comp, null, null, null, null, null, null, null, null, null, null,
+ null, null, null, null, null, null, null, null, null, null, null, version, null, null, null, null, null,
+ blocks, accept, null);
+ }
+
+ @HttpRequestInformation(
+ method = HttpMethod.GET,
+ path = "/{containerName}/{blob}",
+ expectedStatusCodes = { 200 })
+ @UnexpectedResponseExceptionDetail(exceptionBodyClass = StorageError.class)
+ Response getBlockList(@HostParam("url") String url, @PathParam("containerName") String containerName,
+ @PathParam("blob") String blob, @QueryParam("comp") String comp, @QueryParam("snapshot") String snapshot,
+ @QueryParam("blocklisttype") BlockListType listType, @QueryParam("timeout") Integer timeout,
+ @HeaderParam("x-ms-lease-id") String leaseId, @HeaderParam("x-ms-if-tags") String ifTags,
+ @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId,
+ @HeaderParam("Accept") String accept, RequestOptions requestOptions);
+
+ @HttpRequestInformation(
+ method = HttpMethod.GET,
+ path = "/{containerName}/{blob}",
+ expectedStatusCodes = { 200 })
+ @UnexpectedResponseExceptionDetail(exceptionBodyClass = StorageError.class)
+ default BlockList getBlockList(@HostParam("url") String url, @PathParam("containerName") String containerName,
+ @PathParam("blob") String blob, @QueryParam("comp") String comp,
+ @QueryParam("blocklisttype") BlockListType listType, @HeaderParam("x-ms-version") String version,
+ @HeaderParam("Accept") String accept) {
+ return getBlockList(url, containerName, blob, comp, null, listType, null, null, null, version, null, accept,
+ null).getValue();
+ }
+ }
+
+ /**
+ * The Upload Block Blob operation updates the content of an existing block blob. Updating an existing block blob
+ * overwrites any existing metadata on the blob. Partial updates are not supported with Put Blob; the content of the
+ * existing blob is overwritten with the content of the new blob. To perform a partial update of the content of a
+ * block blob, use the Put Block List operation.
+ *
+ * @param containerName The container name.
+ * @param blob The blob name.
+ * @param contentLength The length of the request.
+ * @param body Initial data.
+ * @param timeout The timeout parameter is expressed in seconds. For more information, see <a
+ * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting
+ * Timeouts for Blob Service Operations.</a>.
+ * @param transactionalContentMD5 Specify the transactional md5 for the body, to be validated by the service.
+ * @param metadata Optional. Specifies a user-defined name-value pair associated with the blob. If no name-value
+ * pairs are specified, the operation will copy the metadata from the source blob or file to the destination blob.
+ * If one or more name-value pairs are specified, the destination blob is created with the specified metadata, and
+ * metadata is not copied from the source blob or file. Note that beginning with version 2009-09-19, metadata names
+ * must adhere to the naming rules for C# identifiers. See Naming and Referencing Containers, Blobs, and Metadata
+ * for more information.
+ * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID.
+ * @param tier Optional. Indicates the tier to be set on the blob.
+ * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the
+ * specified date/time.
+ * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since
+ * the specified date/time.
+ * @param ifMatch Specify an ETag value to operate only on blobs with a matching value.
+ * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value.
+ * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value.
+ * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the
+ * analytics logs when storage analytics logging is enabled.
+ * @param blobTagsString Optional. Used to set blob tags in various blob operations.
+ * @param immutabilityPolicyExpiry Specifies the date time when the blobs immutability policy is set to expire.
+ * @param immutabilityPolicyMode Specifies the immutability policy mode to set on the blob.
+ * @param legalHold Specified if a legal hold should be set on the blob.
+ * @param transactionalContentCrc64 Specify the transactional crc64 for the body, to be validated by the service.
+ * @param structuredBodyType Required if the request body is a structured message. Specifies the message schema
+ * version and properties.
+ * @param structuredContentLength Required if the request body is a structured message. Specifies the length of the
+ * blob/file content inside the message body. Will always be smaller than Content-Length.
+ * @param blobHttpHeaders Parameter group.
+ * @param cpkInfo Parameter group.
+ * @param encryptionScopeParam Parameter group.
+ * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the service returns an error.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response.
+ */
+ public Response uploadWithResponse(String containerName, String blob, long contentLength, BinaryData body,
+ Integer timeout, byte[] transactionalContentMD5, Map metadata, String leaseId, AccessTier tier,
+ OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch,
+ String ifTags, String requestId, String blobTagsString, OffsetDateTime immutabilityPolicyExpiry,
+ BlobImmutabilityPolicyMode immutabilityPolicyMode, Boolean legalHold, byte[] transactionalContentCrc64,
+ String structuredBodyType, Long structuredContentLength, BlobHttpHeaders blobHttpHeaders, CpkInfo cpkInfo,
+ EncryptionScope encryptionScopeParam, RequestOptions requestOptions) {
+ final String blobType = "BlockBlob";
+ final String accept = "application/xml";
+ String contentTypeInternal = null;
+ if (blobHttpHeaders != null) {
+ contentTypeInternal = blobHttpHeaders.getContentType();
+ }
+ String contentType = contentTypeInternal;
+ String contentEncodingInternal = null;
+ if (blobHttpHeaders != null) {
+ contentEncodingInternal = blobHttpHeaders.getContentEncoding();
+ }
+ String contentEncoding = contentEncodingInternal;
+ String contentLanguageInternal = null;
+ if (blobHttpHeaders != null) {
+ contentLanguageInternal = blobHttpHeaders.getContentLanguage();
+ }
+ String contentLanguage = contentLanguageInternal;
+ byte[] contentMd5Internal = null;
+ if (blobHttpHeaders != null) {
+ contentMd5Internal = blobHttpHeaders.getContentMd5();
+ }
+ byte[] contentMd5 = contentMd5Internal;
+ String cacheControlInternal = null;
+ if (blobHttpHeaders != null) {
+ cacheControlInternal = blobHttpHeaders.getCacheControl();
+ }
+ String cacheControl = cacheControlInternal;
+ String contentDispositionInternal = null;
+ if (blobHttpHeaders != null) {
+ contentDispositionInternal = blobHttpHeaders.getContentDisposition();
+ }
+ String contentDisposition = contentDispositionInternal;
+ String encryptionKeyInternal = null;
+ if (cpkInfo != null) {
+ encryptionKeyInternal = cpkInfo.getEncryptionKey();
+ }
+ String encryptionKey = encryptionKeyInternal;
+ String encryptionKeySha256Internal = null;
+ if (cpkInfo != null) {
+ encryptionKeySha256Internal = cpkInfo.getEncryptionKeySha256();
+ }
+ String encryptionKeySha256 = encryptionKeySha256Internal;
+ EncryptionAlgorithmType encryptionAlgorithmInternal = null;
+ if (cpkInfo != null) {
+ encryptionAlgorithmInternal = cpkInfo.getEncryptionAlgorithm();
+ }
+ EncryptionAlgorithmType encryptionAlgorithm = encryptionAlgorithmInternal;
+ String encryptionScopeInternal = null;
+ if (encryptionScopeParam != null) {
+ encryptionScopeInternal = encryptionScopeParam.getEncryptionScope();
+ }
+ String encryptionScope = encryptionScopeInternal;
+ String transactionalContentMD5Converted = Base64Util.encodeToString(transactionalContentMD5);
+ String contentMd5Converted = Base64Util.encodeToString(contentMd5);
+ DateTimeRfc1123 ifModifiedSinceConverted
+ = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince);
+ DateTimeRfc1123 ifUnmodifiedSinceConverted
+ = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince);
+ DateTimeRfc1123 immutabilityPolicyExpiryConverted
+ = immutabilityPolicyExpiry == null ? null : new DateTimeRfc1123(immutabilityPolicyExpiry);
+ String transactionalContentCrc64Converted = Base64Util.encodeToString(transactionalContentCrc64);
+ return service.upload(this.client.getUrl(), containerName, blob, blobType, timeout,
+ transactionalContentMD5Converted, contentLength, contentType, contentEncoding, contentLanguage,
+ contentMd5Converted, cacheControl, metadata, leaseId, contentDisposition, encryptionKey,
+ encryptionKeySha256, encryptionAlgorithm, encryptionScope, tier, ifModifiedSinceConverted,
+ ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, this.client.getVersion(), requestId,
+ blobTagsString, immutabilityPolicyExpiryConverted, immutabilityPolicyMode, legalHold,
+ transactionalContentCrc64Converted, structuredBodyType, structuredContentLength, body, accept,
+ requestOptions);
+ }
+
+ /**
+ * The Upload Block Blob operation updates the content of an existing block blob. Updating an existing block blob
+ * overwrites any existing metadata on the blob. Partial updates are not supported with Put Blob; the content of the
+ * existing blob is overwritten with the content of the new blob. To perform a partial update of the content of a
+ * block blob, use the Put Block List operation.
+ *
+ * @param containerName The container name.
+ * @param blob The blob name.
+ * @param contentLength The length of the request.
+ * @param body Initial data.
+ * @param timeout The timeout parameter is expressed in seconds. For more information, see <a
+ * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting
+ * Timeouts for Blob Service Operations.</a>.
+ * @param transactionalContentMD5 Specify the transactional md5 for the body, to be validated by the service.
+ * @param metadata Optional. Specifies a user-defined name-value pair associated with the blob. If no name-value
+ * pairs are specified, the operation will copy the metadata from the source blob or file to the destination blob.
+ * If one or more name-value pairs are specified, the destination blob is created with the specified metadata, and
+ * metadata is not copied from the source blob or file. Note that beginning with version 2009-09-19, metadata names
+ * must adhere to the naming rules for C# identifiers. See Naming and Referencing Containers, Blobs, and Metadata
+ * for more information.
+ * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID.
+ * @param tier Optional. Indicates the tier to be set on the blob.
+ * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the
+ * specified date/time.
+ * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since
+ * the specified date/time.
+ * @param ifMatch Specify an ETag value to operate only on blobs with a matching value.
+ * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value.
+ * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value.
+ * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the
+ * analytics logs when storage analytics logging is enabled.
+ * @param blobTagsString Optional. Used to set blob tags in various blob operations.
+ * @param immutabilityPolicyExpiry Specifies the date time when the blobs immutability policy is set to expire.
+ * @param immutabilityPolicyMode Specifies the immutability policy mode to set on the blob.
+ * @param legalHold Specified if a legal hold should be set on the blob.
+ * @param transactionalContentCrc64 Specify the transactional crc64 for the body, to be validated by the service.
+ * @param structuredBodyType Required if the request body is a structured message. Specifies the message schema
+ * version and properties.
+ * @param structuredContentLength Required if the request body is a structured message. Specifies the length of the
+ * blob/file content inside the message body. Will always be smaller than Content-Length.
+ * @param blobHttpHeaders Parameter group.
+ * @param cpkInfo Parameter group.
+ * @param encryptionScopeParam Parameter group.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the service returns an error.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ public void upload(String containerName, String blob, long contentLength, BinaryData body, Integer timeout,
+ byte[] transactionalContentMD5, Map metadata, String leaseId, AccessTier tier,
+ OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch,
+ String ifTags, String requestId, String blobTagsString, OffsetDateTime immutabilityPolicyExpiry,
+ BlobImmutabilityPolicyMode immutabilityPolicyMode, Boolean legalHold, byte[] transactionalContentCrc64,
+ String structuredBodyType, Long structuredContentLength, BlobHttpHeaders blobHttpHeaders, CpkInfo cpkInfo,
+ EncryptionScope encryptionScopeParam) {
+ uploadWithResponse(containerName, blob, contentLength, body, timeout, transactionalContentMD5, metadata,
+ leaseId, tier, ifModifiedSince, ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, requestId, blobTagsString,
+ immutabilityPolicyExpiry, immutabilityPolicyMode, legalHold, transactionalContentCrc64, structuredBodyType,
+ structuredContentLength, blobHttpHeaders, cpkInfo, encryptionScopeParam, RequestOptions.none());
+ }
+
+ /**
+ * The Put Blob from URL operation creates a new Block Blob where the contents of the blob are read from a given
+ * URL. This API is supported beginning with the 2020-04-08 version. Partial updates are not supported with Put Blob
+ * from URL; the content of an existing blob is overwritten with the content of the new blob. To perform partial
+ * updates to a block blob's contents using a source URL, use the Put Block from URL API in conjunction with Put
+ * Block List.
+ *
+ * @param containerName The container name.
+ * @param blob The blob name.
+ * @param contentLength The length of the request.
+ * @param copySource Specifies the name of the source page blob snapshot. This value is a URL of up to 2 KB in
+ * length that specifies a page blob snapshot. The value should be URL-encoded as it would appear in a request URI.
+ * The source blob must either be public or must be authenticated via a shared access signature.
+ * @param timeout The timeout parameter is expressed in seconds. For more information, see <a
+ * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting
+ * Timeouts for Blob Service Operations.</a>.
+ * @param transactionalContentMD5 Specify the transactional md5 for the body, to be validated by the service.
+ * @param metadata Optional. Specifies a user-defined name-value pair associated with the blob. If no name-value
+ * pairs are specified, the operation will copy the metadata from the source blob or file to the destination blob.
+ * If one or more name-value pairs are specified, the destination blob is created with the specified metadata, and
+ * metadata is not copied from the source blob or file. Note that beginning with version 2009-09-19, metadata names
+ * must adhere to the naming rules for C# identifiers. See Naming and Referencing Containers, Blobs, and Metadata
+ * for more information.
+ * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID.
+ * @param tier Optional. Indicates the tier to be set on the blob.
+ * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the
+ * specified date/time.
+ * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since
+ * the specified date/time.
+ * @param ifMatch Specify an ETag value to operate only on blobs with a matching value.
+ * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value.
+ * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value.
+ * @param sourceIfModifiedSince Specify this header value to operate only on a blob if it has been modified since
+ * the specified date/time.
+ * @param sourceIfUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified
+ * since the specified date/time.
+ * @param sourceIfMatch Specify an ETag value to operate only on blobs with a matching value.
+ * @param sourceIfNoneMatch Specify an ETag value to operate only on blobs without a matching value.
+ * @param sourceIfTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value.
+ * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the
+ * analytics logs when storage analytics logging is enabled.
+ * @param sourceContentMD5 Specify the md5 calculated for the range of bytes that must be read from the copy source.
+ * @param blobTagsString Optional. Used to set blob tags in various blob operations.
+ * @param copySourceBlobProperties Optional, default is true. Indicates if properties from the source blob should be
+ * copied.
+ * @param copySourceAuthorization Only Bearer type is supported. Credentials should be a valid OAuth access token to
+ * copy source.
+ * @param copySourceTags Optional, default 'replace'. Indicates if source tags should be copied or replaced with the
+ * tags specified by x-ms-tags.
+ * @param blobHttpHeaders Parameter group.
+ * @param cpkInfo Parameter group.
+ * @param encryptionScopeParam Parameter group.
+ * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the service returns an error.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response.
+ */
+ public Response putBlobFromUrlWithResponse(String containerName, String blob, long contentLength,
+ String copySource, Integer timeout, byte[] transactionalContentMD5, Map metadata,
+ String leaseId, AccessTier tier, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince,
+ String ifMatch, String ifNoneMatch, String ifTags, OffsetDateTime sourceIfModifiedSince,
+ OffsetDateTime sourceIfUnmodifiedSince, String sourceIfMatch, String sourceIfNoneMatch, String sourceIfTags,
+ String requestId, byte[] sourceContentMD5, String blobTagsString, Boolean copySourceBlobProperties,
+ String copySourceAuthorization, BlobCopySourceTagsMode copySourceTags, BlobHttpHeaders blobHttpHeaders,
+ CpkInfo cpkInfo, EncryptionScope encryptionScopeParam, RequestOptions requestOptions) {
+ final String blobType = "BlockBlob";
+ final String accept = "application/xml";
+ String contentTypeInternal = null;
+ if (blobHttpHeaders != null) {
+ contentTypeInternal = blobHttpHeaders.getContentType();
+ }
+ String contentType = contentTypeInternal;
+ String contentEncodingInternal = null;
+ if (blobHttpHeaders != null) {
+ contentEncodingInternal = blobHttpHeaders.getContentEncoding();
+ }
+ String contentEncoding = contentEncodingInternal;
+ String contentLanguageInternal = null;
+ if (blobHttpHeaders != null) {
+ contentLanguageInternal = blobHttpHeaders.getContentLanguage();
+ }
+ String contentLanguage = contentLanguageInternal;
+ byte[] contentMd5Internal = null;
+ if (blobHttpHeaders != null) {
+ contentMd5Internal = blobHttpHeaders.getContentMd5();
+ }
+ byte[] contentMd5 = contentMd5Internal;
+ String cacheControlInternal = null;
+ if (blobHttpHeaders != null) {
+ cacheControlInternal = blobHttpHeaders.getCacheControl();
+ }
+ String cacheControl = cacheControlInternal;
+ String contentDispositionInternal = null;
+ if (blobHttpHeaders != null) {
+ contentDispositionInternal = blobHttpHeaders.getContentDisposition();
+ }
+ String contentDisposition = contentDispositionInternal;
+ String encryptionKeyInternal = null;
+ if (cpkInfo != null) {
+ encryptionKeyInternal = cpkInfo.getEncryptionKey();
+ }
+ String encryptionKey = encryptionKeyInternal;
+ String encryptionKeySha256Internal = null;
+ if (cpkInfo != null) {
+ encryptionKeySha256Internal = cpkInfo.getEncryptionKeySha256();
+ }
+ String encryptionKeySha256 = encryptionKeySha256Internal;
+ EncryptionAlgorithmType encryptionAlgorithmInternal = null;
+ if (cpkInfo != null) {
+ encryptionAlgorithmInternal = cpkInfo.getEncryptionAlgorithm();
+ }
+ EncryptionAlgorithmType encryptionAlgorithm = encryptionAlgorithmInternal;
+ String encryptionScopeInternal = null;
+ if (encryptionScopeParam != null) {
+ encryptionScopeInternal = encryptionScopeParam.getEncryptionScope();
+ }
+ String encryptionScope = encryptionScopeInternal;
+ String transactionalContentMD5Converted = Base64Util.encodeToString(transactionalContentMD5);
+ String contentMd5Converted = Base64Util.encodeToString(contentMd5);
+ DateTimeRfc1123 ifModifiedSinceConverted
+ = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince);
+ DateTimeRfc1123 ifUnmodifiedSinceConverted
+ = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince);
+ DateTimeRfc1123 sourceIfModifiedSinceConverted
+ = sourceIfModifiedSince == null ? null : new DateTimeRfc1123(sourceIfModifiedSince);
+ DateTimeRfc1123 sourceIfUnmodifiedSinceConverted
+ = sourceIfUnmodifiedSince == null ? null : new DateTimeRfc1123(sourceIfUnmodifiedSince);
+ String sourceContentMD5Converted = Base64Util.encodeToString(sourceContentMD5);
+ return service.putBlobFromUrl(this.client.getUrl(), containerName, blob, blobType, timeout,
+ transactionalContentMD5Converted, contentLength, contentType, contentEncoding, contentLanguage,
+ contentMd5Converted, cacheControl, metadata, leaseId, contentDisposition, encryptionKey,
+ encryptionKeySha256, encryptionAlgorithm, encryptionScope, tier, ifModifiedSinceConverted,
+ ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, sourceIfModifiedSinceConverted,
+ sourceIfUnmodifiedSinceConverted, sourceIfMatch, sourceIfNoneMatch, sourceIfTags, this.client.getVersion(),
+ requestId, sourceContentMD5Converted, blobTagsString, copySource, copySourceBlobProperties,
+ copySourceAuthorization, copySourceTags, accept, requestOptions);
+ }
+
+ /**
+ * The Put Blob from URL operation creates a new Block Blob where the contents of the blob are read from a given
+ * URL. This API is supported beginning with the 2020-04-08 version. Partial updates are not supported with Put Blob
+ * from URL; the content of an existing blob is overwritten with the content of the new blob. To perform partial
+ * updates to a block blob's contents using a source URL, use the Put Block from URL API in conjunction with Put
+ * Block List.
+ *
+ * @param containerName The container name.
+ * @param blob The blob name.
+ * @param contentLength The length of the request.
+ * @param copySource Specifies the name of the source page blob snapshot. This value is a URL of up to 2 KB in
+ * length that specifies a page blob snapshot. The value should be URL-encoded as it would appear in a request URI.
+ * The source blob must either be public or must be authenticated via a shared access signature.
+ * @param timeout The timeout parameter is expressed in seconds. For more information, see <a
+ * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting
+ * Timeouts for Blob Service Operations.</a>.
+ * @param transactionalContentMD5 Specify the transactional md5 for the body, to be validated by the service.
+ * @param metadata Optional. Specifies a user-defined name-value pair associated with the blob. If no name-value
+ * pairs are specified, the operation will copy the metadata from the source blob or file to the destination blob.
+ * If one or more name-value pairs are specified, the destination blob is created with the specified metadata, and
+ * metadata is not copied from the source blob or file. Note that beginning with version 2009-09-19, metadata names
+ * must adhere to the naming rules for C# identifiers. See Naming and Referencing Containers, Blobs, and Metadata
+ * for more information.
+ * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID.
+ * @param tier Optional. Indicates the tier to be set on the blob.
+ * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the
+ * specified date/time.
+ * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since
+ * the specified date/time.
+ * @param ifMatch Specify an ETag value to operate only on blobs with a matching value.
+ * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value.
+ * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value.
+ * @param sourceIfModifiedSince Specify this header value to operate only on a blob if it has been modified since
+ * the specified date/time.
+ * @param sourceIfUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified
+ * since the specified date/time.
+ * @param sourceIfMatch Specify an ETag value to operate only on blobs with a matching value.
+ * @param sourceIfNoneMatch Specify an ETag value to operate only on blobs without a matching value.
+ * @param sourceIfTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value.
+ * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the
+ * analytics logs when storage analytics logging is enabled.
+ * @param sourceContentMD5 Specify the md5 calculated for the range of bytes that must be read from the copy source.
+ * @param blobTagsString Optional. Used to set blob tags in various blob operations.
+ * @param copySourceBlobProperties Optional, default is true. Indicates if properties from the source blob should be
+ * copied.
+ * @param copySourceAuthorization Only Bearer type is supported. Credentials should be a valid OAuth access token to
+ * copy source.
+ * @param copySourceTags Optional, default 'replace'. Indicates if source tags should be copied or replaced with the
+ * tags specified by x-ms-tags.
+ * @param blobHttpHeaders Parameter group.
+ * @param cpkInfo Parameter group.
+ * @param encryptionScopeParam Parameter group.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the service returns an error.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ public void putBlobFromUrl(String containerName, String blob, long contentLength, String copySource,
+ Integer timeout, byte[] transactionalContentMD5, Map metadata, String leaseId, AccessTier tier,
+ OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch,
+ String ifTags, OffsetDateTime sourceIfModifiedSince, OffsetDateTime sourceIfUnmodifiedSince,
+ String sourceIfMatch, String sourceIfNoneMatch, String sourceIfTags, String requestId, byte[] sourceContentMD5,
+ String blobTagsString, Boolean copySourceBlobProperties, String copySourceAuthorization,
+ BlobCopySourceTagsMode copySourceTags, BlobHttpHeaders blobHttpHeaders, CpkInfo cpkInfo,
+ EncryptionScope encryptionScopeParam) {
+ putBlobFromUrlWithResponse(containerName, blob, contentLength, copySource, timeout, transactionalContentMD5,
+ metadata, leaseId, tier, ifModifiedSince, ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags,
+ sourceIfModifiedSince, sourceIfUnmodifiedSince, sourceIfMatch, sourceIfNoneMatch, sourceIfTags, requestId,
+ sourceContentMD5, blobTagsString, copySourceBlobProperties, copySourceAuthorization, copySourceTags,
+ blobHttpHeaders, cpkInfo, encryptionScopeParam, RequestOptions.none());
+ }
+
+ /**
+ * The Stage Block operation creates a new block to be committed as part of a blob.
+ *
+ * @param containerName The container name.
+ * @param blob The blob name.
+ * @param blockId A valid Base64 string value that identifies the block. Prior to encoding, the string must be less
+ * than or equal to 64 bytes in size. For a given blob, the length of the value specified for the blockid parameter
+ * must be the same size for each block.
+ * @param contentLength The length of the request.
+ * @param body Initial data.
+ * @param transactionalContentMD5 Specify the transactional md5 for the body, to be validated by the service.
+ * @param transactionalContentCrc64 Specify the transactional crc64 for the body, to be validated by the service.
+ * @param timeout The timeout parameter is expressed in seconds. For more information, see <a
+ * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting
+ * Timeouts for Blob Service Operations.</a>.
+ * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID.
+ * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the
+ * analytics logs when storage analytics logging is enabled.
+ * @param structuredBodyType Required if the request body is a structured message. Specifies the message schema
+ * version and properties.
+ * @param structuredContentLength Required if the request body is a structured message. Specifies the length of the
+ * blob/file content inside the message body. Will always be smaller than Content-Length.
+ * @param cpkInfo Parameter group.
+ * @param encryptionScopeParam Parameter group.
+ * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the service returns an error.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response.
+ */
+ public Response stageBlockWithResponse(String containerName, String blob, String blockId, long contentLength,
+ BinaryData body, byte[] transactionalContentMD5, byte[] transactionalContentCrc64, Integer timeout,
+ String leaseId, String requestId, String structuredBodyType, Long structuredContentLength, CpkInfo cpkInfo,
+ EncryptionScope encryptionScopeParam, RequestOptions requestOptions) {
+ final String comp = "block";
+ final String accept = "application/xml";
+ String encryptionKeyInternal = null;
+ if (cpkInfo != null) {
+ encryptionKeyInternal = cpkInfo.getEncryptionKey();
+ }
+ String encryptionKey = encryptionKeyInternal;
+ String encryptionKeySha256Internal = null;
+ if (cpkInfo != null) {
+ encryptionKeySha256Internal = cpkInfo.getEncryptionKeySha256();
+ }
+ String encryptionKeySha256 = encryptionKeySha256Internal;
+ EncryptionAlgorithmType encryptionAlgorithmInternal = null;
+ if (cpkInfo != null) {
+ encryptionAlgorithmInternal = cpkInfo.getEncryptionAlgorithm();
+ }
+ EncryptionAlgorithmType encryptionAlgorithm = encryptionAlgorithmInternal;
+ String encryptionScopeInternal = null;
+ if (encryptionScopeParam != null) {
+ encryptionScopeInternal = encryptionScopeParam.getEncryptionScope();
+ }
+ String encryptionScope = encryptionScopeInternal;
+ String transactionalContentMD5Converted = Base64Util.encodeToString(transactionalContentMD5);
+ String transactionalContentCrc64Converted = Base64Util.encodeToString(transactionalContentCrc64);
+ return service.stageBlock(this.client.getUrl(), containerName, blob, comp, blockId, contentLength,
+ transactionalContentMD5Converted, transactionalContentCrc64Converted, timeout, leaseId, encryptionKey,
+ encryptionKeySha256, encryptionAlgorithm, encryptionScope, this.client.getVersion(), requestId,
+ structuredBodyType, structuredContentLength, body, accept, requestOptions);
+ }
+
+ /**
+ * The Stage Block operation creates a new block to be committed as part of a blob.
+ *
+ * @param containerName The container name.
+ * @param blob The blob name.
+ * @param blockId A valid Base64 string value that identifies the block. Prior to encoding, the string must be less
+ * than or equal to 64 bytes in size. For a given blob, the length of the value specified for the blockid parameter
+ * must be the same size for each block.
+ * @param contentLength The length of the request.
+ * @param body Initial data.
+ * @param transactionalContentMD5 Specify the transactional md5 for the body, to be validated by the service.
+ * @param transactionalContentCrc64 Specify the transactional crc64 for the body, to be validated by the service.
+ * @param timeout The timeout parameter is expressed in seconds. For more information, see <a
+ * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting
+ * Timeouts for Blob Service Operations.</a>.
+ * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID.
+ * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the
+ * analytics logs when storage analytics logging is enabled.
+ * @param structuredBodyType Required if the request body is a structured message. Specifies the message schema
+ * version and properties.
+ * @param structuredContentLength Required if the request body is a structured message. Specifies the length of the
+ * blob/file content inside the message body. Will always be smaller than Content-Length.
+ * @param cpkInfo Parameter group.
+ * @param encryptionScopeParam Parameter group.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the service returns an error.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ public void stageBlock(String containerName, String blob, String blockId, long contentLength, BinaryData body,
+ byte[] transactionalContentMD5, byte[] transactionalContentCrc64, Integer timeout, String leaseId,
+ String requestId, String structuredBodyType, Long structuredContentLength, CpkInfo cpkInfo,
+ EncryptionScope encryptionScopeParam) {
+ stageBlockWithResponse(containerName, blob, blockId, contentLength, body, transactionalContentMD5,
+ transactionalContentCrc64, timeout, leaseId, requestId, structuredBodyType, structuredContentLength,
+ cpkInfo, encryptionScopeParam, RequestOptions.none());
+ }
+
+ /**
+ * The Stage Block operation creates a new block to be committed as part of a blob where the contents are read from
+ * a URL.
+ *
+ * @param containerName The container name.
+ * @param blob The blob name.
+ * @param blockId A valid Base64 string value that identifies the block. Prior to encoding, the string must be less
+ * than or equal to 64 bytes in size. For a given blob, the length of the value specified for the blockid parameter
+ * must be the same size for each block.
+ * @param contentLength The length of the request.
+ * @param sourceUrl Specify a URL to the copy source.
+ * @param sourceRange Bytes of source data in the specified range.
+ * @param sourceContentMD5 Specify the md5 calculated for the range of bytes that must be read from the copy source.
+ * @param sourceContentcrc64 Specify the crc64 calculated for the range of bytes that must be read from the copy
+ * source.
+ * @param timeout The timeout parameter is expressed in seconds. For more information, see <a
+ * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting
+ * Timeouts for Blob Service Operations.</a>.
+ * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID.
+ * @param sourceIfModifiedSince Specify this header value to operate only on a blob if it has been modified since
+ * the specified date/time.
+ * @param sourceIfUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified
+ * since the specified date/time.
+ * @param sourceIfMatch Specify an ETag value to operate only on blobs with a matching value.
+ * @param sourceIfNoneMatch Specify an ETag value to operate only on blobs without a matching value.
+ * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the
+ * analytics logs when storage analytics logging is enabled.
+ * @param copySourceAuthorization Only Bearer type is supported. Credentials should be a valid OAuth access token to
+ * copy source.
+ * @param cpkInfo Parameter group.
+ * @param encryptionScopeParam Parameter group.
+ * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the service returns an error.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response.
+ */
+ public Response stageBlockFromURLWithResponse(String containerName, String blob, String blockId,
+ long contentLength, String sourceUrl, String sourceRange, byte[] sourceContentMD5, byte[] sourceContentcrc64,
+ Integer timeout, String leaseId, OffsetDateTime sourceIfModifiedSince, OffsetDateTime sourceIfUnmodifiedSince,
+ String sourceIfMatch, String sourceIfNoneMatch, String requestId, String copySourceAuthorization,
+ CpkInfo cpkInfo, EncryptionScope encryptionScopeParam, RequestOptions requestOptions) {
+ final String comp = "block";
+ final String accept = "application/xml";
+ String encryptionKeyInternal = null;
+ if (cpkInfo != null) {
+ encryptionKeyInternal = cpkInfo.getEncryptionKey();
+ }
+ String encryptionKey = encryptionKeyInternal;
+ String encryptionKeySha256Internal = null;
+ if (cpkInfo != null) {
+ encryptionKeySha256Internal = cpkInfo.getEncryptionKeySha256();
+ }
+ String encryptionKeySha256 = encryptionKeySha256Internal;
+ EncryptionAlgorithmType encryptionAlgorithmInternal = null;
+ if (cpkInfo != null) {
+ encryptionAlgorithmInternal = cpkInfo.getEncryptionAlgorithm();
+ }
+ EncryptionAlgorithmType encryptionAlgorithm = encryptionAlgorithmInternal;
+ String encryptionScopeInternal = null;
+ if (encryptionScopeParam != null) {
+ encryptionScopeInternal = encryptionScopeParam.getEncryptionScope();
+ }
+ String encryptionScope = encryptionScopeInternal;
+ String sourceContentMD5Converted = Base64Util.encodeToString(sourceContentMD5);
+ String sourceContentcrc64Converted = Base64Util.encodeToString(sourceContentcrc64);
+ DateTimeRfc1123 sourceIfModifiedSinceConverted
+ = sourceIfModifiedSince == null ? null : new DateTimeRfc1123(sourceIfModifiedSince);
+ DateTimeRfc1123 sourceIfUnmodifiedSinceConverted
+ = sourceIfUnmodifiedSince == null ? null : new DateTimeRfc1123(sourceIfUnmodifiedSince);
+ return service.stageBlockFromURL(this.client.getUrl(), containerName, blob, comp, blockId, contentLength,
+ sourceUrl, sourceRange, sourceContentMD5Converted, sourceContentcrc64Converted, timeout, encryptionKey,
+ encryptionKeySha256, encryptionAlgorithm, encryptionScope, leaseId, sourceIfModifiedSinceConverted,
+ sourceIfUnmodifiedSinceConverted, sourceIfMatch, sourceIfNoneMatch, this.client.getVersion(), requestId,
+ copySourceAuthorization, accept, requestOptions);
+ }
+
+ /**
+ * The Stage Block operation creates a new block to be committed as part of a blob where the contents are read from
+ * a URL.
+ *
+ * @param containerName The container name.
+ * @param blob The blob name.
+ * @param blockId A valid Base64 string value that identifies the block. Prior to encoding, the string must be less
+ * than or equal to 64 bytes in size. For a given blob, the length of the value specified for the blockid parameter
+ * must be the same size for each block.
+ * @param contentLength The length of the request.
+ * @param sourceUrl Specify a URL to the copy source.
+ * @param sourceRange Bytes of source data in the specified range.
+ * @param sourceContentMD5 Specify the md5 calculated for the range of bytes that must be read from the copy source.
+ * @param sourceContentcrc64 Specify the crc64 calculated for the range of bytes that must be read from the copy
+ * source.
+ * @param timeout The timeout parameter is expressed in seconds. For more information, see <a
+ * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting
+ * Timeouts for Blob Service Operations.</a>.
+ * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID.
+ * @param sourceIfModifiedSince Specify this header value to operate only on a blob if it has been modified since
+ * the specified date/time.
+ * @param sourceIfUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified
+ * since the specified date/time.
+ * @param sourceIfMatch Specify an ETag value to operate only on blobs with a matching value.
+ * @param sourceIfNoneMatch Specify an ETag value to operate only on blobs without a matching value.
+ * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the
+ * analytics logs when storage analytics logging is enabled.
+ * @param copySourceAuthorization Only Bearer type is supported. Credentials should be a valid OAuth access token to
+ * copy source.
+ * @param cpkInfo Parameter group.
+ * @param encryptionScopeParam Parameter group.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the service returns an error.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ public void stageBlockFromURL(String containerName, String blob, String blockId, long contentLength,
+ String sourceUrl, String sourceRange, byte[] sourceContentMD5, byte[] sourceContentcrc64, Integer timeout,
+ String leaseId, OffsetDateTime sourceIfModifiedSince, OffsetDateTime sourceIfUnmodifiedSince,
+ String sourceIfMatch, String sourceIfNoneMatch, String requestId, String copySourceAuthorization,
+ CpkInfo cpkInfo, EncryptionScope encryptionScopeParam) {
+ stageBlockFromURLWithResponse(containerName, blob, blockId, contentLength, sourceUrl, sourceRange,
+ sourceContentMD5, sourceContentcrc64, timeout, leaseId, sourceIfModifiedSince, sourceIfUnmodifiedSince,
+ sourceIfMatch, sourceIfNoneMatch, requestId, copySourceAuthorization, cpkInfo, encryptionScopeParam,
+ RequestOptions.none());
+ }
+
+ /**
+ * The Commit Block List operation writes a blob by specifying the list of block IDs that make up the blob. In order
+ * to be written as part of a blob, a block must have been successfully written to the server in a prior Put Block
+ * operation. You can call Put Block List to update a blob by uploading only those blocks that have changed, then
+ * committing the new and existing blocks together. You can do this by specifying whether to commit a block from the
+ * committed block list or from the uncommitted block list, or to commit the most recently uploaded version of the
+ * block, whichever list it may belong to.
+ *
+ * @param containerName The container name.
+ * @param blob The blob name.
+ * @param blocks Blob Blocks.
+ * @param timeout The timeout parameter is expressed in seconds. For more information, see <a
+ * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting
+ * Timeouts for Blob Service Operations.</a>.
+ * @param transactionalContentMD5 Specify the transactional md5 for the body, to be validated by the service.
+ * @param transactionalContentCrc64 Specify the transactional crc64 for the body, to be validated by the service.
+ * @param metadata Optional. Specifies a user-defined name-value pair associated with the blob. If no name-value
+ * pairs are specified, the operation will copy the metadata from the source blob or file to the destination blob.
+ * If one or more name-value pairs are specified, the destination blob is created with the specified metadata, and
+ * metadata is not copied from the source blob or file. Note that beginning with version 2009-09-19, metadata names
+ * must adhere to the naming rules for C# identifiers. See Naming and Referencing Containers, Blobs, and Metadata
+ * for more information.
+ * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID.
+ * @param tier Optional. Indicates the tier to be set on the blob.
+ * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the
+ * specified date/time.
+ * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since
+ * the specified date/time.
+ * @param ifMatch Specify an ETag value to operate only on blobs with a matching value.
+ * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value.
+ * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value.
+ * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the
+ * analytics logs when storage analytics logging is enabled.
+ * @param blobTagsString Optional. Used to set blob tags in various blob operations.
+ * @param immutabilityPolicyExpiry Specifies the date time when the blobs immutability policy is set to expire.
+ * @param immutabilityPolicyMode Specifies the immutability policy mode to set on the blob.
+ * @param legalHold Specified if a legal hold should be set on the blob.
+ * @param blobHttpHeaders Parameter group.
+ * @param cpkInfo Parameter group.
+ * @param encryptionScopeParam Parameter group.
+ * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the service returns an error.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response.
+ */
+ public Response commitBlockListWithResponse(String containerName, String blob, BlockLookupList blocks,
+ Integer timeout, byte[] transactionalContentMD5, byte[] transactionalContentCrc64, Map metadata,
+ String leaseId, AccessTier tier, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince,
+ String ifMatch, String ifNoneMatch, String ifTags, String requestId, String blobTagsString,
+ OffsetDateTime immutabilityPolicyExpiry, BlobImmutabilityPolicyMode immutabilityPolicyMode, Boolean legalHold,
+ BlobHttpHeaders blobHttpHeaders, CpkInfo cpkInfo, EncryptionScope encryptionScopeParam,
+ RequestOptions requestOptions) {
+ final String comp = "blocklist";
+ final String accept = "application/xml";
+ String cacheControlInternal = null;
+ if (blobHttpHeaders != null) {
+ cacheControlInternal = blobHttpHeaders.getCacheControl();
+ }
+ String cacheControl = cacheControlInternal;
+ String contentTypeInternal = null;
+ if (blobHttpHeaders != null) {
+ contentTypeInternal = blobHttpHeaders.getContentType();
+ }
+ String contentType = contentTypeInternal;
+ String contentEncodingInternal = null;
+ if (blobHttpHeaders != null) {
+ contentEncodingInternal = blobHttpHeaders.getContentEncoding();
+ }
+ String contentEncoding = contentEncodingInternal;
+ String contentLanguageInternal = null;
+ if (blobHttpHeaders != null) {
+ contentLanguageInternal = blobHttpHeaders.getContentLanguage();
+ }
+ String contentLanguage = contentLanguageInternal;
+ byte[] contentMd5Internal = null;
+ if (blobHttpHeaders != null) {
+ contentMd5Internal = blobHttpHeaders.getContentMd5();
+ }
+ byte[] contentMd5 = contentMd5Internal;
+ String contentDispositionInternal = null;
+ if (blobHttpHeaders != null) {
+ contentDispositionInternal = blobHttpHeaders.getContentDisposition();
+ }
+ String contentDisposition = contentDispositionInternal;
+ String encryptionKeyInternal = null;
+ if (cpkInfo != null) {
+ encryptionKeyInternal = cpkInfo.getEncryptionKey();
+ }
+ String encryptionKey = encryptionKeyInternal;
+ String encryptionKeySha256Internal = null;
+ if (cpkInfo != null) {
+ encryptionKeySha256Internal = cpkInfo.getEncryptionKeySha256();
+ }
+ String encryptionKeySha256 = encryptionKeySha256Internal;
+ EncryptionAlgorithmType encryptionAlgorithmInternal = null;
+ if (cpkInfo != null) {
+ encryptionAlgorithmInternal = cpkInfo.getEncryptionAlgorithm();
+ }
+ EncryptionAlgorithmType encryptionAlgorithm = encryptionAlgorithmInternal;
+ String encryptionScopeInternal = null;
+ if (encryptionScopeParam != null) {
+ encryptionScopeInternal = encryptionScopeParam.getEncryptionScope();
+ }
+ String encryptionScope = encryptionScopeInternal;
+ String contentMd5Converted = Base64Util.encodeToString(contentMd5);
+ String transactionalContentMD5Converted = Base64Util.encodeToString(transactionalContentMD5);
+ String transactionalContentCrc64Converted = Base64Util.encodeToString(transactionalContentCrc64);
+ DateTimeRfc1123 ifModifiedSinceConverted
+ = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince);
+ DateTimeRfc1123 ifUnmodifiedSinceConverted
+ = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince);
+ DateTimeRfc1123 immutabilityPolicyExpiryConverted
+ = immutabilityPolicyExpiry == null ? null : new DateTimeRfc1123(immutabilityPolicyExpiry);
+ return service.commitBlockList(this.client.getUrl(), containerName, blob, comp, timeout, cacheControl,
+ contentType, contentEncoding, contentLanguage, contentMd5Converted, transactionalContentMD5Converted,
+ transactionalContentCrc64Converted, metadata, leaseId, contentDisposition, encryptionKey,
+ encryptionKeySha256, encryptionAlgorithm, encryptionScope, tier, ifModifiedSinceConverted,
+ ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, this.client.getVersion(), requestId,
+ blobTagsString, immutabilityPolicyExpiryConverted, immutabilityPolicyMode, legalHold, blocks, accept,
+ requestOptions);
+ }
+
+ /**
+ * The Commit Block List operation writes a blob by specifying the list of block IDs that make up the blob. In order
+ * to be written as part of a blob, a block must have been successfully written to the server in a prior Put Block
+ * operation. You can call Put Block List to update a blob by uploading only those blocks that have changed, then
+ * committing the new and existing blocks together. You can do this by specifying whether to commit a block from the
+ * committed block list or from the uncommitted block list, or to commit the most recently uploaded version of the
+ * block, whichever list it may belong to.
+ *
+ * @param containerName The container name.
+ * @param blob The blob name.
+ * @param blocks Blob Blocks.
+ * @param timeout The timeout parameter is expressed in seconds. For more information, see <a
+ * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting
+ * Timeouts for Blob Service Operations.</a>.
+ * @param transactionalContentMD5 Specify the transactional md5 for the body, to be validated by the service.
+ * @param transactionalContentCrc64 Specify the transactional crc64 for the body, to be validated by the service.
+ * @param metadata Optional. Specifies a user-defined name-value pair associated with the blob. If no name-value
+ * pairs are specified, the operation will copy the metadata from the source blob or file to the destination blob.
+ * If one or more name-value pairs are specified, the destination blob is created with the specified metadata, and
+ * metadata is not copied from the source blob or file. Note that beginning with version 2009-09-19, metadata names
+ * must adhere to the naming rules for C# identifiers. See Naming and Referencing Containers, Blobs, and Metadata
+ * for more information.
+ * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID.
+ * @param tier Optional. Indicates the tier to be set on the blob.
+ * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the
+ * specified date/time.
+ * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since
+ * the specified date/time.
+ * @param ifMatch Specify an ETag value to operate only on blobs with a matching value.
+ * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value.
+ * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value.
+ * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the
+ * analytics logs when storage analytics logging is enabled.
+ * @param blobTagsString Optional. Used to set blob tags in various blob operations.
+ * @param immutabilityPolicyExpiry Specifies the date time when the blobs immutability policy is set to expire.
+ * @param immutabilityPolicyMode Specifies the immutability policy mode to set on the blob.
+ * @param legalHold Specified if a legal hold should be set on the blob.
+ * @param blobHttpHeaders Parameter group.
+ * @param cpkInfo Parameter group.
+ * @param encryptionScopeParam Parameter group.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the service returns an error.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ public void commitBlockList(String containerName, String blob, BlockLookupList blocks, Integer timeout,
+ byte[] transactionalContentMD5, byte[] transactionalContentCrc64, Map metadata, String leaseId,
+ AccessTier tier, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch,
+ String ifNoneMatch, String ifTags, String requestId, String blobTagsString,
+ OffsetDateTime immutabilityPolicyExpiry, BlobImmutabilityPolicyMode immutabilityPolicyMode, Boolean legalHold,
+ BlobHttpHeaders blobHttpHeaders, CpkInfo cpkInfo, EncryptionScope encryptionScopeParam) {
+ commitBlockListWithResponse(containerName, blob, blocks, timeout, transactionalContentMD5,
+ transactionalContentCrc64, metadata, leaseId, tier, ifModifiedSince, ifUnmodifiedSince, ifMatch,
+ ifNoneMatch, ifTags, requestId, blobTagsString, immutabilityPolicyExpiry, immutabilityPolicyMode, legalHold,
+ blobHttpHeaders, cpkInfo, encryptionScopeParam, RequestOptions.none());
+ }
+
+ /**
+ * The Get Block List operation retrieves the list of blocks that have been uploaded as part of a block blob.
+ *
+ * @param containerName The container name.
+ * @param blob The blob name.
+ * @param listType Specifies whether to return the list of committed blocks, the list of uncommitted blocks, or both
+ * lists together.
+ * @param snapshot The snapshot parameter is an opaque DateTime value that, when present, specifies the blob
+ * snapshot to retrieve. For more information on working with blob snapshots, see <a
+ * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/creating-a-snapshot-of-a-blob">Creating
+ * a Snapshot of a Blob.</a>.
+ * @param timeout The timeout parameter is expressed in seconds. For more information, see <a
+ * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting
+ * Timeouts for Blob Service Operations.</a>.
+ * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID.
+ * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value.
+ * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the
+ * analytics logs when storage analytics logging is enabled.
+ * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the service returns an error.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response.
+ */
+ public Response getBlockListWithResponse(String containerName, String blob, BlockListType listType,
+ String snapshot, Integer timeout, String leaseId, String ifTags, String requestId,
+ RequestOptions requestOptions) {
+ final String comp = "blocklist";
+ final String accept = "application/xml";
+ return service.getBlockList(this.client.getUrl(), containerName, blob, comp, snapshot, listType, timeout,
+ leaseId, ifTags, this.client.getVersion(), requestId, accept, requestOptions);
+ }
+
+ /**
+ * The Get Block List operation retrieves the list of blocks that have been uploaded as part of a block blob.
+ *
+ * @param containerName The container name.
+ * @param blob The blob name.
+ * @param listType Specifies whether to return the list of committed blocks, the list of uncommitted blocks, or both
+ * lists together.
+ * @param snapshot The snapshot parameter is an opaque DateTime value that, when present, specifies the blob
+ * snapshot to retrieve. For more information on working with blob snapshots, see <a
+ * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/creating-a-snapshot-of-a-blob">Creating
+ * a Snapshot of a Blob.</a>.
+ * @param timeout The timeout parameter is expressed in seconds. For more information, see <a
+ * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting
+ * Timeouts for Blob Service Operations.</a>.
+ * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID.
+ * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value.
+ * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the
+ * analytics logs when storage analytics logging is enabled.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the service returns an error.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response.
+ */
+ public BlockList getBlockList(String containerName, String blob, BlockListType listType, String snapshot,
+ Integer timeout, String leaseId, String ifTags, String requestId) {
+ return getBlockListWithResponse(containerName, blob, listType, snapshot, timeout, leaseId, ifTags, requestId,
+ RequestOptions.none()).getValue();
+ }
+}
diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/implementation/ContainersImpl.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/implementation/ContainersImpl.java
new file mode 100644
index 000000000000..9c85188924d5
--- /dev/null
+++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/implementation/ContainersImpl.java
@@ -0,0 +1,1552 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.v2.storage.blob.implementation;
+
+import com.azure.v2.storage.blob.implementation.models.BlobSignedIdentifierWrapper;
+import com.azure.v2.storage.blob.models.BlobContainerEncryptionScope;
+import com.azure.v2.storage.blob.models.BlobSignedIdentifier;
+import com.azure.v2.storage.blob.models.FilterBlobSegment;
+import com.azure.v2.storage.blob.models.FilterBlobsIncludeItem;
+import com.azure.v2.storage.blob.models.ListBlobsFlatSegmentResponse;
+import com.azure.v2.storage.blob.models.ListBlobsHierarchySegmentResponse;
+import com.azure.v2.storage.blob.models.ListBlobsIncludeItem;
+import com.azure.v2.storage.blob.models.PublicAccessType;
+import com.azure.v2.storage.blob.models.StorageError;
+import io.clientcore.core.annotations.ServiceInterface;
+import io.clientcore.core.http.RestProxy;
+import io.clientcore.core.http.annotations.BodyParam;
+import io.clientcore.core.http.annotations.HeaderParam;
+import io.clientcore.core.http.annotations.HostParam;
+import io.clientcore.core.http.annotations.HttpRequestInformation;
+import io.clientcore.core.http.annotations.PathParam;
+import io.clientcore.core.http.annotations.QueryParam;
+import io.clientcore.core.http.annotations.UnexpectedResponseExceptionDetail;
+import io.clientcore.core.http.exceptions.HttpResponseException;
+import io.clientcore.core.http.models.HttpMethod;
+import io.clientcore.core.http.models.RequestOptions;
+import io.clientcore.core.http.models.Response;
+import io.clientcore.core.http.pipeline.HttpPipeline;
+import io.clientcore.core.models.binarydata.BinaryData;
+import io.clientcore.core.serialization.ObjectSerializer;
+import io.clientcore.core.utils.DateTimeRfc1123;
+import java.io.InputStream;
+import java.lang.reflect.InvocationTargetException;
+import java.time.OffsetDateTime;
+import java.util.List;
+import java.util.Map;
+import java.util.Objects;
+import java.util.stream.Collectors;
+
+/**
+ * An instance of this class provides access to all the operations defined in Containers.
+ */
+public final class ContainersImpl {
+ /**
+ * The proxy service used to perform REST calls.
+ */
+ private final ContainersService service;
+
+ /**
+ * The service client containing this operation class.
+ */
+ private final AzureBlobStorageImpl client;
+
+ /**
+ * Initializes an instance of ContainersImpl.
+ *
+ * @param client the instance of the service client containing this operation class.
+ */
+ ContainersImpl(AzureBlobStorageImpl client) {
+ this.service = RestProxy.create(ContainersService.class, client.getHttpPipeline());
+ this.client = client;
+ }
+
+ /**
+ * The interface defining all the services for AzureBlobStorageContainers to be used by the proxy service to perform
+ * REST calls.
+ */
+ @ServiceInterface(name = "AzureBlobStorageCont", host = "{url}")
+ public interface ContainersService {
+ static ContainersService getNewInstance(HttpPipeline pipeline, ObjectSerializer serializer) {
+ try {
+ Class> clazz = Class.forName("com.azure.v2.storage.blob.implementation.ContainersServiceImpl");
+ return (ContainersService) clazz.getMethod("getNewInstance", HttpPipeline.class, ObjectSerializer.class)
+ .invoke(null, pipeline, serializer);
+ } catch (ClassNotFoundException | NoSuchMethodException | IllegalAccessException
+ | InvocationTargetException e) {
+ throw new RuntimeException(e);
+ }
+
+ }
+
+ @HttpRequestInformation(method = HttpMethod.PUT, path = "/{containerName}", expectedStatusCodes = { 201 })
+ @UnexpectedResponseExceptionDetail(exceptionBodyClass = StorageError.class)
+ Response create(@HostParam("url") String url, @PathParam("containerName") String containerName,
+ @QueryParam("restype") String restype, @QueryParam("timeout") Integer timeout,
+ @HeaderParam("x-ms-meta-") Map metadata,
+ @HeaderParam("x-ms-blob-public-access") PublicAccessType access,
+ @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId,
+ @HeaderParam("x-ms-default-encryption-scope") String defaultEncryptionScope,
+ @HeaderParam("x-ms-deny-encryption-scope-override") Boolean encryptionScopeOverridePrevented,
+ @HeaderParam("Accept") String accept, RequestOptions requestOptions);
+
+ @HttpRequestInformation(method = HttpMethod.PUT, path = "/{containerName}", expectedStatusCodes = { 201 })
+ @UnexpectedResponseExceptionDetail(exceptionBodyClass = StorageError.class)
+ default void create(@HostParam("url") String url, @PathParam("containerName") String containerName,
+ @QueryParam("restype") String restype, @HeaderParam("x-ms-version") String version,
+ @HeaderParam("Accept") String accept) {
+ create(url, containerName, restype, null, null, null, version, null, null, null, accept, null);
+ }
+
+ @HttpRequestInformation(method = HttpMethod.GET, path = "/{containerName}", expectedStatusCodes = { 200 })
+ @UnexpectedResponseExceptionDetail(exceptionBodyClass = StorageError.class)
+ Response getProperties(@HostParam("url") String url, @PathParam("containerName") String containerName,
+ @QueryParam("restype") String restype, @QueryParam("timeout") Integer timeout,
+ @HeaderParam("x-ms-lease-id") String leaseId, @HeaderParam("x-ms-version") String version,
+ @HeaderParam("x-ms-client-request-id") String requestId, @HeaderParam("Accept") String accept,
+ RequestOptions requestOptions);
+
+ @HttpRequestInformation(method = HttpMethod.GET, path = "/{containerName}", expectedStatusCodes = { 200 })
+ @UnexpectedResponseExceptionDetail(exceptionBodyClass = StorageError.class)
+ default void getProperties(@HostParam("url") String url, @PathParam("containerName") String containerName,
+ @QueryParam("restype") String restype, @HeaderParam("x-ms-version") String version,
+ @HeaderParam("Accept") String accept) {
+ getProperties(url, containerName, restype, null, null, version, null, accept, null);
+ }
+
+ @HttpRequestInformation(method = HttpMethod.DELETE, path = "/{containerName}", expectedStatusCodes = { 202 })
+ @UnexpectedResponseExceptionDetail(exceptionBodyClass = StorageError.class)
+ Response delete(@HostParam("url") String url, @PathParam("containerName") String containerName,
+ @QueryParam("restype") String restype, @QueryParam("timeout") Integer timeout,
+ @HeaderParam("x-ms-lease-id") String leaseId,
+ @HeaderParam("If-Modified-Since") DateTimeRfc1123 ifModifiedSince,
+ @HeaderParam("If-Unmodified-Since") DateTimeRfc1123 ifUnmodifiedSince,
+ @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId,
+ @HeaderParam("Accept") String accept, RequestOptions requestOptions);
+
+ @HttpRequestInformation(method = HttpMethod.DELETE, path = "/{containerName}", expectedStatusCodes = { 202 })
+ @UnexpectedResponseExceptionDetail(exceptionBodyClass = StorageError.class)
+ default void delete(@HostParam("url") String url, @PathParam("containerName") String containerName,
+ @QueryParam("restype") String restype, @HeaderParam("x-ms-version") String version,
+ @HeaderParam("Accept") String accept) {
+ delete(url, containerName, restype, null, null, null, null, version, null, accept, null);
+ }
+
+ @HttpRequestInformation(method = HttpMethod.PUT, path = "/{containerName}", expectedStatusCodes = { 200 })
+ @UnexpectedResponseExceptionDetail(exceptionBodyClass = StorageError.class)
+ Response setMetadata(@HostParam("url") String url, @PathParam("containerName") String containerName,
+ @QueryParam("restype") String restype, @QueryParam("comp") String comp,
+ @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-lease-id") String leaseId,
+ @HeaderParam("x-ms-meta-") Map metadata,
+ @HeaderParam("If-Modified-Since") DateTimeRfc1123 ifModifiedSince,
+ @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId,
+ @HeaderParam("Accept") String accept, RequestOptions requestOptions);
+
+ @HttpRequestInformation(method = HttpMethod.PUT, path = "/{containerName}", expectedStatusCodes = { 200 })
+ @UnexpectedResponseExceptionDetail(exceptionBodyClass = StorageError.class)
+ default void setMetadata(@HostParam("url") String url, @PathParam("containerName") String containerName,
+ @QueryParam("restype") String restype, @QueryParam("comp") String comp,
+ @HeaderParam("x-ms-version") String version, @HeaderParam("Accept") String accept) {
+ setMetadata(url, containerName, restype, comp, null, null, null, null, version, null, accept, null);
+ }
+
+ @HttpRequestInformation(method = HttpMethod.GET, path = "/{containerName}", expectedStatusCodes = { 200 })
+ @UnexpectedResponseExceptionDetail(exceptionBodyClass = StorageError.class)
+ Response getAccessPolicy(@HostParam("url") String url,
+ @PathParam("containerName") String containerName, @QueryParam("restype") String restype,
+ @QueryParam("comp") String comp, @QueryParam("timeout") Integer timeout,
+ @HeaderParam("x-ms-lease-id") String leaseId, @HeaderParam("x-ms-version") String version,
+ @HeaderParam("x-ms-client-request-id") String requestId, @HeaderParam("Accept") String accept,
+ RequestOptions requestOptions);
+
+ @HttpRequestInformation(method = HttpMethod.GET, path = "/{containerName}", expectedStatusCodes = { 200 })
+ @UnexpectedResponseExceptionDetail(exceptionBodyClass = StorageError.class)
+ default BlobSignedIdentifierWrapper getAccessPolicy(@HostParam("url") String url,
+ @PathParam("containerName") String containerName, @QueryParam("restype") String restype,
+ @QueryParam("comp") String comp, @HeaderParam("x-ms-version") String version,
+ @HeaderParam("Accept") String accept) {
+ return getAccessPolicy(url, containerName, restype, comp, null, null, version, null, accept, null)
+ .getValue();
+ }
+
+ @HttpRequestInformation(method = HttpMethod.PUT, path = "/{containerName}", expectedStatusCodes = { 200 })
+ @UnexpectedResponseExceptionDetail(exceptionBodyClass = StorageError.class)
+ Response setAccessPolicy(@HostParam("url") String url, @PathParam("containerName") String containerName,
+ @QueryParam("restype") String restype, @QueryParam("comp") String comp,
+ @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-lease-id") String leaseId,
+ @HeaderParam("x-ms-blob-public-access") PublicAccessType access,
+ @HeaderParam("If-Modified-Since") DateTimeRfc1123 ifModifiedSince,
+ @HeaderParam("If-Unmodified-Since") DateTimeRfc1123 ifUnmodifiedSince,
+ @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId,
+ @BodyParam("application/xml") BlobSignedIdentifierWrapper containerAcl,
+ @HeaderParam("Accept") String accept, RequestOptions requestOptions);
+
+ @HttpRequestInformation(method = HttpMethod.PUT, path = "/{containerName}", expectedStatusCodes = { 200 })
+ @UnexpectedResponseExceptionDetail(exceptionBodyClass = StorageError.class)
+ default void setAccessPolicy(@HostParam("url") String url, @PathParam("containerName") String containerName,
+ @QueryParam("restype") String restype, @QueryParam("comp") String comp,
+ @HeaderParam("x-ms-version") String version, @HeaderParam("Accept") String accept) {
+ setAccessPolicy(url, containerName, restype, comp, null, null, null, null, null, version, null, null,
+ accept, null);
+ }
+
+ @HttpRequestInformation(method = HttpMethod.PUT, path = "/{containerName}", expectedStatusCodes = { 201 })
+ @UnexpectedResponseExceptionDetail(exceptionBodyClass = StorageError.class)
+ Response restore(@HostParam("url") String url, @PathParam("containerName") String containerName,
+ @QueryParam("restype") String restype, @QueryParam("comp") String comp,
+ @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-version") String version,
+ @HeaderParam("x-ms-client-request-id") String requestId,
+ @HeaderParam("x-ms-deleted-container-name") String deletedContainerName,
+ @HeaderParam("x-ms-deleted-container-version") String deletedContainerVersion,
+ @HeaderParam("Accept") String accept, RequestOptions requestOptions);
+
+ @HttpRequestInformation(method = HttpMethod.PUT, path = "/{containerName}", expectedStatusCodes = { 201 })
+ @UnexpectedResponseExceptionDetail(exceptionBodyClass = StorageError.class)
+ default void restore(@HostParam("url") String url, @PathParam("containerName") String containerName,
+ @QueryParam("restype") String restype, @QueryParam("comp") String comp,
+ @HeaderParam("x-ms-version") String version, @HeaderParam("Accept") String accept) {
+ restore(url, containerName, restype, comp, null, version, null, null, null, accept, null);
+ }
+
+ @HttpRequestInformation(method = HttpMethod.PUT, path = "/{containerName}", expectedStatusCodes = { 200 })
+ @UnexpectedResponseExceptionDetail(exceptionBodyClass = StorageError.class)
+ Response rename(@HostParam("url") String url, @PathParam("containerName") String containerName,
+ @QueryParam("restype") String restype, @QueryParam("comp") String comp,
+ @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-version") String version,
+ @HeaderParam("x-ms-client-request-id") String requestId,
+ @HeaderParam("x-ms-source-container-name") String sourceContainerName,
+ @HeaderParam("x-ms-source-lease-id") String sourceLeaseId, @HeaderParam("Accept") String accept,
+ RequestOptions requestOptions);
+
+ @HttpRequestInformation(method = HttpMethod.PUT, path = "/{containerName}", expectedStatusCodes = { 200 })
+ @UnexpectedResponseExceptionDetail(exceptionBodyClass = StorageError.class)
+ default void rename(@HostParam("url") String url, @PathParam("containerName") String containerName,
+ @QueryParam("restype") String restype, @QueryParam("comp") String comp,
+ @HeaderParam("x-ms-version") String version,
+ @HeaderParam("x-ms-source-container-name") String sourceContainerName,
+ @HeaderParam("Accept") String accept) {
+ rename(url, containerName, restype, comp, null, version, null, sourceContainerName, null, accept, null);
+ }
+
+ @HttpRequestInformation(method = HttpMethod.POST, path = "/{containerName}", expectedStatusCodes = { 202 })
+ @UnexpectedResponseExceptionDetail(exceptionBodyClass = StorageError.class)
+ Response submitBatch(@HostParam("url") String url,
+ @PathParam("containerName") String containerName, @QueryParam("restype") String restype,
+ @QueryParam("comp") String comp, @HeaderParam("Content-Length") long contentLength,
+ @HeaderParam("Content-Type") String multipartContentType, @QueryParam("timeout") Integer timeout,
+ @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId,
+ @BodyParam("application/xml") BinaryData body, @HeaderParam("Accept") String accept,
+ RequestOptions requestOptions);
+
+ @HttpRequestInformation(method = HttpMethod.POST, path = "/{containerName}", expectedStatusCodes = { 202 })
+ @UnexpectedResponseExceptionDetail(exceptionBodyClass = StorageError.class)
+ default InputStream submitBatch(@HostParam("url") String url, @PathParam("containerName") String containerName,
+ @QueryParam("restype") String restype, @QueryParam("comp") String comp,
+ @HeaderParam("Content-Length") long contentLength, @HeaderParam("Content-Type") String multipartContentType,
+ @HeaderParam("x-ms-version") String version, @BodyParam("application/xml") BinaryData body,
+ @HeaderParam("Accept") String accept) {
+ return submitBatch(url, containerName, restype, comp, contentLength, multipartContentType, null, version,
+ null, body, accept, null).getValue();
+ }
+
+ @HttpRequestInformation(method = HttpMethod.GET, path = "/{containerName}", expectedStatusCodes = { 200 })
+ @UnexpectedResponseExceptionDetail(exceptionBodyClass = StorageError.class)
+ Response filterBlobs(@HostParam("url") String url,
+ @PathParam("containerName") String containerName, @QueryParam("restype") String restype,
+ @QueryParam("comp") String comp, @QueryParam("timeout") Integer timeout,
+ @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId,
+ @QueryParam("where") String where, @QueryParam("marker") String marker,
+ @QueryParam("maxresults") Integer maxresults, @QueryParam("include") String include,
+ @HeaderParam("Accept") String accept, RequestOptions requestOptions);
+
+ @HttpRequestInformation(method = HttpMethod.GET, path = "/{containerName}", expectedStatusCodes = { 200 })
+ @UnexpectedResponseExceptionDetail(exceptionBodyClass = StorageError.class)
+ default FilterBlobSegment filterBlobs(@HostParam("url") String url,
+ @PathParam("containerName") String containerName, @QueryParam("restype") String restype,
+ @QueryParam("comp") String comp, @HeaderParam("x-ms-version") String version,
+ @HeaderParam("Accept") String accept) {
+ return filterBlobs(url, containerName, restype, comp, null, version, null, null, null, null, null, accept,
+ null).getValue();
+ }
+
+ @HttpRequestInformation(method = HttpMethod.PUT, path = "/{containerName}", expectedStatusCodes = { 201 })
+ @UnexpectedResponseExceptionDetail(exceptionBodyClass = StorageError.class)
+ Response acquireLease(@HostParam("url") String url, @PathParam("containerName") String containerName,
+ @QueryParam("comp") String comp, @QueryParam("restype") String restype,
+ @HeaderParam("x-ms-lease-action") String action, @QueryParam("timeout") Integer timeout,
+ @HeaderParam("x-ms-lease-duration") Integer duration,
+ @HeaderParam("x-ms-proposed-lease-id") String proposedLeaseId,
+ @HeaderParam("If-Modified-Since") DateTimeRfc1123 ifModifiedSince,
+ @HeaderParam("If-Unmodified-Since") DateTimeRfc1123 ifUnmodifiedSince,
+ @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId,
+ @HeaderParam("Accept") String accept, RequestOptions requestOptions);
+
+ @HttpRequestInformation(method = HttpMethod.PUT, path = "/{containerName}", expectedStatusCodes = { 201 })
+ @UnexpectedResponseExceptionDetail(exceptionBodyClass = StorageError.class)
+ default void acquireLease(@HostParam("url") String url, @PathParam("containerName") String containerName,
+ @QueryParam("comp") String comp, @QueryParam("restype") String restype,
+ @HeaderParam("x-ms-lease-action") String action, @HeaderParam("x-ms-version") String version,
+ @HeaderParam("Accept") String accept) {
+ acquireLease(url, containerName, comp, restype, action, null, null, null, null, null, version, null, accept,
+ null);
+ }
+
+ @HttpRequestInformation(method = HttpMethod.PUT, path = "/{containerName}", expectedStatusCodes = { 200 })
+ @UnexpectedResponseExceptionDetail(exceptionBodyClass = StorageError.class)
+ Response releaseLease(@HostParam("url") String url, @PathParam("containerName") String containerName,
+ @QueryParam("comp") String comp, @QueryParam("restype") String restype,
+ @HeaderParam("x-ms-lease-action") String action, @QueryParam("timeout") Integer timeout,
+ @HeaderParam("x-ms-lease-id") String leaseId,
+ @HeaderParam("If-Modified-Since") DateTimeRfc1123 ifModifiedSince,
+ @HeaderParam("If-Unmodified-Since") DateTimeRfc1123 ifUnmodifiedSince,
+ @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId,
+ @HeaderParam("Accept") String accept, RequestOptions requestOptions);
+
+ @HttpRequestInformation(method = HttpMethod.PUT, path = "/{containerName}", expectedStatusCodes = { 200 })
+ @UnexpectedResponseExceptionDetail(exceptionBodyClass = StorageError.class)
+ default void releaseLease(@HostParam("url") String url, @PathParam("containerName") String containerName,
+ @QueryParam("comp") String comp, @QueryParam("restype") String restype,
+ @HeaderParam("x-ms-lease-action") String action, @HeaderParam("x-ms-lease-id") String leaseId,
+ @HeaderParam("x-ms-version") String version, @HeaderParam("Accept") String accept) {
+ releaseLease(url, containerName, comp, restype, action, null, leaseId, null, null, version, null, accept,
+ null);
+ }
+
+ @HttpRequestInformation(method = HttpMethod.PUT, path = "/{containerName}", expectedStatusCodes = { 200 })
+ @UnexpectedResponseExceptionDetail(exceptionBodyClass = StorageError.class)
+ Response renewLease(@HostParam("url") String url, @PathParam("containerName") String containerName,
+ @QueryParam("comp") String comp, @QueryParam("restype") String restype,
+ @HeaderParam("x-ms-lease-action") String action, @QueryParam("timeout") Integer timeout,
+ @HeaderParam("x-ms-lease-id") String leaseId,
+ @HeaderParam("If-Modified-Since") DateTimeRfc1123 ifModifiedSince,
+ @HeaderParam("If-Unmodified-Since") DateTimeRfc1123 ifUnmodifiedSince,
+ @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId,
+ @HeaderParam("Accept") String accept, RequestOptions requestOptions);
+
+ @HttpRequestInformation(method = HttpMethod.PUT, path = "/{containerName}", expectedStatusCodes = { 200 })
+ @UnexpectedResponseExceptionDetail(exceptionBodyClass = StorageError.class)
+ default void renewLease(@HostParam("url") String url, @PathParam("containerName") String containerName,
+ @QueryParam("comp") String comp, @QueryParam("restype") String restype,
+ @HeaderParam("x-ms-lease-action") String action, @HeaderParam("x-ms-lease-id") String leaseId,
+ @HeaderParam("x-ms-version") String version, @HeaderParam("Accept") String accept) {
+ renewLease(url, containerName, comp, restype, action, null, leaseId, null, null, version, null, accept,
+ null);
+ }
+
+ @HttpRequestInformation(method = HttpMethod.PUT, path = "/{containerName}", expectedStatusCodes = { 202 })
+ @UnexpectedResponseExceptionDetail(exceptionBodyClass = StorageError.class)
+ Response breakLease(@HostParam("url") String url, @PathParam("containerName") String containerName,
+ @QueryParam("comp") String comp, @QueryParam("restype") String restype,
+ @HeaderParam("x-ms-lease-action") String action, @QueryParam("timeout") Integer timeout,
+ @HeaderParam("x-ms-lease-break-period") Integer breakPeriod,
+ @HeaderParam("If-Modified-Since") DateTimeRfc1123 ifModifiedSince,
+ @HeaderParam("If-Unmodified-Since") DateTimeRfc1123 ifUnmodifiedSince,
+ @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId,
+ @HeaderParam("Accept") String accept, RequestOptions requestOptions);
+
+ @HttpRequestInformation(method = HttpMethod.PUT, path = "/{containerName}", expectedStatusCodes = { 202 })
+ @UnexpectedResponseExceptionDetail(exceptionBodyClass = StorageError.class)
+ default void breakLease(@HostParam("url") String url, @PathParam("containerName") String containerName,
+ @QueryParam("comp") String comp, @QueryParam("restype") String restype,
+ @HeaderParam("x-ms-lease-action") String action, @HeaderParam("x-ms-version") String version,
+ @HeaderParam("Accept") String accept) {
+ breakLease(url, containerName, comp, restype, action, null, null, null, null, version, null, accept, null);
+ }
+
+ @HttpRequestInformation(method = HttpMethod.PUT, path = "/{containerName}", expectedStatusCodes = { 200 })
+ @UnexpectedResponseExceptionDetail(exceptionBodyClass = StorageError.class)
+ Response changeLease(@HostParam("url") String url, @PathParam("containerName") String containerName,
+ @QueryParam("comp") String comp, @QueryParam("restype") String restype,
+ @HeaderParam("x-ms-lease-action") String action, @QueryParam("timeout") Integer timeout,
+ @HeaderParam("x-ms-lease-id") String leaseId, @HeaderParam("x-ms-proposed-lease-id") String proposedLeaseId,
+ @HeaderParam("If-Modified-Since") DateTimeRfc1123 ifModifiedSince,
+ @HeaderParam("If-Unmodified-Since") DateTimeRfc1123 ifUnmodifiedSince,
+ @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId,
+ @HeaderParam("Accept") String accept, RequestOptions requestOptions);
+
+ @HttpRequestInformation(method = HttpMethod.PUT, path = "/{containerName}", expectedStatusCodes = { 200 })
+ @UnexpectedResponseExceptionDetail(exceptionBodyClass = StorageError.class)
+ default void changeLease(@HostParam("url") String url, @PathParam("containerName") String containerName,
+ @QueryParam("comp") String comp, @QueryParam("restype") String restype,
+ @HeaderParam("x-ms-lease-action") String action, @HeaderParam("x-ms-lease-id") String leaseId,
+ @HeaderParam("x-ms-proposed-lease-id") String proposedLeaseId, @HeaderParam("x-ms-version") String version,
+ @HeaderParam("Accept") String accept) {
+ changeLease(url, containerName, comp, restype, action, null, leaseId, proposedLeaseId, null, null, version,
+ null, accept, null);
+ }
+
+ @HttpRequestInformation(method = HttpMethod.GET, path = "/{containerName}", expectedStatusCodes = { 200 })
+ @UnexpectedResponseExceptionDetail(exceptionBodyClass = StorageError.class)
+ Response listBlobFlatSegment(@HostParam("url") String url,
+ @PathParam("containerName") String containerName, @QueryParam("restype") String restype,
+ @QueryParam("comp") String comp, @QueryParam("prefix") String prefix, @QueryParam("marker") String marker,
+ @QueryParam("maxresults") Integer maxresults, @QueryParam("include") String include,
+ @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-version") String version,
+ @HeaderParam("x-ms-client-request-id") String requestId, @HeaderParam("Accept") String accept,
+ RequestOptions requestOptions);
+
+ @HttpRequestInformation(method = HttpMethod.GET, path = "/{containerName}", expectedStatusCodes = { 200 })
+ @UnexpectedResponseExceptionDetail(exceptionBodyClass = StorageError.class)
+ default ListBlobsFlatSegmentResponse listBlobFlatSegment(@HostParam("url") String url,
+ @PathParam("containerName") String containerName, @QueryParam("restype") String restype,
+ @QueryParam("comp") String comp, @HeaderParam("x-ms-version") String version,
+ @HeaderParam("Accept") String accept) {
+ return listBlobFlatSegment(url, containerName, restype, comp, null, null, null, null, null, version, null,
+ accept, null).getValue();
+ }
+
+ @HttpRequestInformation(method = HttpMethod.GET, path = "/{containerName}", expectedStatusCodes = { 200 })
+ @UnexpectedResponseExceptionDetail(exceptionBodyClass = StorageError.class)
+ Response listBlobHierarchySegment(@HostParam("url") String url,
+ @PathParam("containerName") String containerName, @QueryParam("restype") String restype,
+ @QueryParam("comp") String comp, @QueryParam("prefix") String prefix,
+ @QueryParam("delimiter") String delimiter, @QueryParam("marker") String marker,
+ @QueryParam("maxresults") Integer maxresults, @QueryParam("include") String include,
+ @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-version") String version,
+ @HeaderParam("x-ms-client-request-id") String requestId, @HeaderParam("Accept") String accept,
+ RequestOptions requestOptions);
+
+ @HttpRequestInformation(method = HttpMethod.GET, path = "/{containerName}", expectedStatusCodes = { 200 })
+ @UnexpectedResponseExceptionDetail(exceptionBodyClass = StorageError.class)
+ default ListBlobsHierarchySegmentResponse listBlobHierarchySegment(@HostParam("url") String url,
+ @PathParam("containerName") String containerName, @QueryParam("restype") String restype,
+ @QueryParam("comp") String comp, @QueryParam("delimiter") String delimiter,
+ @HeaderParam("x-ms-version") String version, @HeaderParam("Accept") String accept) {
+ return listBlobHierarchySegment(url, containerName, restype, comp, null, delimiter, null, null, null, null,
+ version, null, accept, null).getValue();
+ }
+
+ @HttpRequestInformation(method = HttpMethod.GET, path = "/{containerName}", expectedStatusCodes = { 200 })
+ @UnexpectedResponseExceptionDetail(exceptionBodyClass = StorageError.class)
+ Response getAccountInfo(@HostParam("url") String url, @PathParam("containerName") String containerName,
+ @QueryParam("restype") String restype, @QueryParam("comp") String comp,
+ @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-version") String version,
+ @HeaderParam("x-ms-client-request-id") String requestId, @HeaderParam("Accept") String accept,
+ RequestOptions requestOptions);
+
+ @HttpRequestInformation(method = HttpMethod.GET, path = "/{containerName}", expectedStatusCodes = { 200 })
+ @UnexpectedResponseExceptionDetail(exceptionBodyClass = StorageError.class)
+ default void getAccountInfo(@HostParam("url") String url, @PathParam("containerName") String containerName,
+ @QueryParam("restype") String restype, @QueryParam("comp") String comp,
+ @HeaderParam("x-ms-version") String version, @HeaderParam("Accept") String accept) {
+ getAccountInfo(url, containerName, restype, comp, null, version, null, accept, null);
+ }
+ }
+
+ /**
+ * creates a new container under the specified account. If the container with the same name already exists, the
+ * operation fails.
+ *
+ * @param containerName The container name.
+ * @param timeout The timeout parameter is expressed in seconds. For more information, see <a
+ * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting
+ * Timeouts for Blob Service Operations.</a>.
+ * @param metadata Optional. Specifies a user-defined name-value pair associated with the blob. If no name-value
+ * pairs are specified, the operation will copy the metadata from the source blob or file to the destination blob.
+ * If one or more name-value pairs are specified, the destination blob is created with the specified metadata, and
+ * metadata is not copied from the source blob or file. Note that beginning with version 2009-09-19, metadata names
+ * must adhere to the naming rules for C# identifiers. See Naming and Referencing Containers, Blobs, and Metadata
+ * for more information.
+ * @param access Specifies whether data in the container may be accessed publicly and the level of access.
+ * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the
+ * analytics logs when storage analytics logging is enabled.
+ * @param blobContainerEncryptionScope Parameter group.
+ * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the service returns an error.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response.
+ */
+ public Response createWithResponse(String containerName, Integer timeout, Map metadata,
+ PublicAccessType access, String requestId, BlobContainerEncryptionScope blobContainerEncryptionScope,
+ RequestOptions requestOptions) {
+ final String restype = "container";
+ final String accept = "application/xml";
+ String defaultEncryptionScopeInternal = null;
+ if (blobContainerEncryptionScope != null) {
+ defaultEncryptionScopeInternal = blobContainerEncryptionScope.getDefaultEncryptionScope();
+ }
+ String defaultEncryptionScope = defaultEncryptionScopeInternal;
+ Boolean encryptionScopeOverridePreventedInternal = null;
+ if (blobContainerEncryptionScope != null) {
+ encryptionScopeOverridePreventedInternal
+ = blobContainerEncryptionScope.isEncryptionScopeOverridePrevented();
+ }
+ Boolean encryptionScopeOverridePrevented = encryptionScopeOverridePreventedInternal;
+ return service.create(this.client.getUrl(), containerName, restype, timeout, metadata, access,
+ this.client.getVersion(), requestId, defaultEncryptionScope, encryptionScopeOverridePrevented, accept,
+ requestOptions);
+ }
+
+ /**
+ * creates a new container under the specified account. If the container with the same name already exists, the
+ * operation fails.
+ *
+ * @param containerName The container name.
+ * @param timeout The timeout parameter is expressed in seconds. For more information, see <a
+ * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting
+ * Timeouts for Blob Service Operations.</a>.
+ * @param metadata Optional. Specifies a user-defined name-value pair associated with the blob. If no name-value
+ * pairs are specified, the operation will copy the metadata from the source blob or file to the destination blob.
+ * If one or more name-value pairs are specified, the destination blob is created with the specified metadata, and
+ * metadata is not copied from the source blob or file. Note that beginning with version 2009-09-19, metadata names
+ * must adhere to the naming rules for C# identifiers. See Naming and Referencing Containers, Blobs, and Metadata
+ * for more information.
+ * @param access Specifies whether data in the container may be accessed publicly and the level of access.
+ * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the
+ * analytics logs when storage analytics logging is enabled.
+ * @param blobContainerEncryptionScope Parameter group.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the service returns an error.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ public void create(String containerName, Integer timeout, Map metadata, PublicAccessType access,
+ String requestId, BlobContainerEncryptionScope blobContainerEncryptionScope) {
+ createWithResponse(containerName, timeout, metadata, access, requestId, blobContainerEncryptionScope,
+ RequestOptions.none());
+ }
+
+ /**
+ * returns all user-defined metadata and system properties for the specified container. The data returned does not
+ * include the container's list of blobs.
+ *
+ * @param containerName The container name.
+ * @param timeout The timeout parameter is expressed in seconds. For more information, see <a
+ * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting
+ * Timeouts for Blob Service Operations.</a>.
+ * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID.
+ * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the
+ * analytics logs when storage analytics logging is enabled.
+ * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the service returns an error.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response.
+ */
+ public Response getPropertiesWithResponse(String containerName, Integer timeout, String leaseId,
+ String requestId, RequestOptions requestOptions) {
+ final String restype = "container";
+ final String accept = "application/xml";
+ return service.getProperties(this.client.getUrl(), containerName, restype, timeout, leaseId,
+ this.client.getVersion(), requestId, accept, requestOptions);
+ }
+
+ /**
+ * returns all user-defined metadata and system properties for the specified container. The data returned does not
+ * include the container's list of blobs.
+ *
+ * @param containerName The container name.
+ * @param timeout The timeout parameter is expressed in seconds. For more information, see <a
+ * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting
+ * Timeouts for Blob Service Operations.</a>.
+ * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID.
+ * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the
+ * analytics logs when storage analytics logging is enabled.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the service returns an error.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ public void getProperties(String containerName, Integer timeout, String leaseId, String requestId) {
+ getPropertiesWithResponse(containerName, timeout, leaseId, requestId, RequestOptions.none());
+ }
+
+ /**
+ * operation marks the specified container for deletion. The container and any blobs contained within it are later
+ * deleted during garbage collection.
+ *
+ * @param containerName The container name.
+ * @param timeout The timeout parameter is expressed in seconds. For more information, see <a
+ * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting
+ * Timeouts for Blob Service Operations.</a>.
+ * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID.
+ * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the
+ * specified date/time.
+ * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since
+ * the specified date/time.
+ * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the
+ * analytics logs when storage analytics logging is enabled.
+ * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the service returns an error.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response.
+ */
+ public Response deleteWithResponse(String containerName, Integer timeout, String leaseId,
+ OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String requestId,
+ RequestOptions requestOptions) {
+ final String restype = "container";
+ final String accept = "application/xml";
+ DateTimeRfc1123 ifModifiedSinceConverted
+ = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince);
+ DateTimeRfc1123 ifUnmodifiedSinceConverted
+ = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince);
+ return service.delete(this.client.getUrl(), containerName, restype, timeout, leaseId, ifModifiedSinceConverted,
+ ifUnmodifiedSinceConverted, this.client.getVersion(), requestId, accept, requestOptions);
+ }
+
+ /**
+ * operation marks the specified container for deletion. The container and any blobs contained within it are later
+ * deleted during garbage collection.
+ *
+ * @param containerName The container name.
+ * @param timeout The timeout parameter is expressed in seconds. For more information, see <a
+ * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting
+ * Timeouts for Blob Service Operations.</a>.
+ * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID.
+ * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the
+ * specified date/time.
+ * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since
+ * the specified date/time.
+ * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the
+ * analytics logs when storage analytics logging is enabled.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the service returns an error.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ public void delete(String containerName, Integer timeout, String leaseId, OffsetDateTime ifModifiedSince,
+ OffsetDateTime ifUnmodifiedSince, String requestId) {
+ deleteWithResponse(containerName, timeout, leaseId, ifModifiedSince, ifUnmodifiedSince, requestId,
+ RequestOptions.none());
+ }
+
+ /**
+ * operation sets one or more user-defined name-value pairs for the specified container.
+ *
+ * @param containerName The container name.
+ * @param timeout The timeout parameter is expressed in seconds. For more information, see <a
+ * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting
+ * Timeouts for Blob Service Operations.</a>.
+ * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID.
+ * @param metadata Optional. Specifies a user-defined name-value pair associated with the blob. If no name-value
+ * pairs are specified, the operation will copy the metadata from the source blob or file to the destination blob.
+ * If one or more name-value pairs are specified, the destination blob is created with the specified metadata, and
+ * metadata is not copied from the source blob or file. Note that beginning with version 2009-09-19, metadata names
+ * must adhere to the naming rules for C# identifiers. See Naming and Referencing Containers, Blobs, and Metadata
+ * for more information.
+ * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the
+ * specified date/time.
+ * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the
+ * analytics logs when storage analytics logging is enabled.
+ * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the service returns an error.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response.
+ */
+ public Response setMetadataWithResponse(String containerName, Integer timeout, String leaseId,
+ Map metadata, OffsetDateTime ifModifiedSince, String requestId, RequestOptions requestOptions) {
+ final String restype = "container";
+ final String comp = "metadata";
+ final String accept = "application/xml";
+ DateTimeRfc1123 ifModifiedSinceConverted
+ = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince);
+ return service.setMetadata(this.client.getUrl(), containerName, restype, comp, timeout, leaseId, metadata,
+ ifModifiedSinceConverted, this.client.getVersion(), requestId, accept, requestOptions);
+ }
+
+ /**
+ * operation sets one or more user-defined name-value pairs for the specified container.
+ *
+ * @param containerName The container name.
+ * @param timeout The timeout parameter is expressed in seconds. For more information, see <a
+ * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting
+ * Timeouts for Blob Service Operations.</a>.
+ * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID.
+ * @param metadata Optional. Specifies a user-defined name-value pair associated with the blob. If no name-value
+ * pairs are specified, the operation will copy the metadata from the source blob or file to the destination blob.
+ * If one or more name-value pairs are specified, the destination blob is created with the specified metadata, and
+ * metadata is not copied from the source blob or file. Note that beginning with version 2009-09-19, metadata names
+ * must adhere to the naming rules for C# identifiers. See Naming and Referencing Containers, Blobs, and Metadata
+ * for more information.
+ * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the
+ * specified date/time.
+ * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the
+ * analytics logs when storage analytics logging is enabled.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the service returns an error.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ public void setMetadata(String containerName, Integer timeout, String leaseId, Map metadata,
+ OffsetDateTime ifModifiedSince, String requestId) {
+ setMetadataWithResponse(containerName, timeout, leaseId, metadata, ifModifiedSince, requestId,
+ RequestOptions.none());
+ }
+
+ /**
+ * gets the permissions for the specified container. The permissions indicate whether container data may be accessed
+ * publicly.
+ *
+ * @param containerName The container name.
+ * @param timeout The timeout parameter is expressed in seconds. For more information, see <a
+ * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting
+ * Timeouts for Blob Service Operations.</a>.
+ * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID.
+ * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the
+ * analytics logs when storage analytics logging is enabled.
+ * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the service returns an error.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the permissions for the specified container.
+ */
+ public Response getAccessPolicyWithResponse(String containerName, Integer timeout,
+ String leaseId, String requestId, RequestOptions requestOptions) {
+ final String restype = "container";
+ final String comp = "acl";
+ final String accept = "application/xml";
+ return service.getAccessPolicy(this.client.getUrl(), containerName, restype, comp, timeout, leaseId,
+ this.client.getVersion(), requestId, accept, requestOptions);
+ }
+
+ /**
+ * gets the permissions for the specified container. The permissions indicate whether container data may be accessed
+ * publicly.
+ *
+ * @param containerName The container name.
+ * @param timeout The timeout parameter is expressed in seconds. For more information, see <a
+ * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting
+ * Timeouts for Blob Service Operations.</a>.
+ * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID.
+ * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the
+ * analytics logs when storage analytics logging is enabled.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the service returns an error.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the permissions for the specified container.
+ */
+ public BlobSignedIdentifierWrapper getAccessPolicy(String containerName, Integer timeout, String leaseId,
+ String requestId) {
+ return getAccessPolicyWithResponse(containerName, timeout, leaseId, requestId, RequestOptions.none())
+ .getValue();
+ }
+
+ /**
+ * sets the permissions for the specified container. The permissions indicate whether blobs in a container may be
+ * accessed publicly.
+ *
+ * @param containerName The container name.
+ * @param timeout The timeout parameter is expressed in seconds. For more information, see <a
+ * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting
+ * Timeouts for Blob Service Operations.</a>.
+ * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID.
+ * @param access Specifies whether data in the container may be accessed publicly and the level of access.
+ * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the
+ * specified date/time.
+ * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since
+ * the specified date/time.
+ * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the
+ * analytics logs when storage analytics logging is enabled.
+ * @param containerAcl the acls for the container.
+ * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the service returns an error.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response.
+ */
+ public Response setAccessPolicyWithResponse(String containerName, Integer timeout, String leaseId,
+ PublicAccessType access, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String requestId,
+ List containerAcl, RequestOptions requestOptions) {
+ final String restype = "container";
+ final String comp = "acl";
+ final String accept = "application/xml";
+ DateTimeRfc1123 ifModifiedSinceConverted
+ = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince);
+ DateTimeRfc1123 ifUnmodifiedSinceConverted
+ = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince);
+ BlobSignedIdentifierWrapper containerAclConverted = new BlobSignedIdentifierWrapper(containerAcl);
+ return service.setAccessPolicy(this.client.getUrl(), containerName, restype, comp, timeout, leaseId, access,
+ ifModifiedSinceConverted, ifUnmodifiedSinceConverted, this.client.getVersion(), requestId,
+ containerAclConverted, accept, requestOptions);
+ }
+
+ /**
+ * sets the permissions for the specified container. The permissions indicate whether blobs in a container may be
+ * accessed publicly.
+ *
+ * @param containerName The container name.
+ * @param timeout The timeout parameter is expressed in seconds. For more information, see <a
+ * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting
+ * Timeouts for Blob Service Operations.</a>.
+ * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID.
+ * @param access Specifies whether data in the container may be accessed publicly and the level of access.
+ * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the
+ * specified date/time.
+ * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since
+ * the specified date/time.
+ * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the
+ * analytics logs when storage analytics logging is enabled.
+ * @param containerAcl the acls for the container.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the service returns an error.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ public void setAccessPolicy(String containerName, Integer timeout, String leaseId, PublicAccessType access,
+ OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String requestId,
+ List containerAcl) {
+ setAccessPolicyWithResponse(containerName, timeout, leaseId, access, ifModifiedSince, ifUnmodifiedSince,
+ requestId, containerAcl, RequestOptions.none());
+ }
+
+ /**
+ * Restores a previously-deleted container.
+ *
+ * @param containerName The container name.
+ * @param timeout The timeout parameter is expressed in seconds. For more information, see <a
+ * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting
+ * Timeouts for Blob Service Operations.</a>.
+ * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the
+ * analytics logs when storage analytics logging is enabled.
+ * @param deletedContainerName Optional. Version 2019-12-12 and later. Specifies the name of the deleted container
+ * to restore.
+ * @param deletedContainerVersion Optional. Version 2019-12-12 and later. Specifies the version of the deleted
+ * container to restore.
+ * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the service returns an error.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response.
+ */
+ public Response restoreWithResponse(String containerName, Integer timeout, String requestId,
+ String deletedContainerName, String deletedContainerVersion, RequestOptions requestOptions) {
+ final String restype = "container";
+ final String comp = "undelete";
+ final String accept = "application/xml";
+ return service.restore(this.client.getUrl(), containerName, restype, comp, timeout, this.client.getVersion(),
+ requestId, deletedContainerName, deletedContainerVersion, accept, requestOptions);
+ }
+
+ /**
+ * Restores a previously-deleted container.
+ *
+ * @param containerName The container name.
+ * @param timeout The timeout parameter is expressed in seconds. For more information, see <a
+ * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting
+ * Timeouts for Blob Service Operations.</a>.
+ * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the
+ * analytics logs when storage analytics logging is enabled.
+ * @param deletedContainerName Optional. Version 2019-12-12 and later. Specifies the name of the deleted container
+ * to restore.
+ * @param deletedContainerVersion Optional. Version 2019-12-12 and later. Specifies the version of the deleted
+ * container to restore.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the service returns an error.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ public void restore(String containerName, Integer timeout, String requestId, String deletedContainerName,
+ String deletedContainerVersion) {
+ restoreWithResponse(containerName, timeout, requestId, deletedContainerName, deletedContainerVersion,
+ RequestOptions.none());
+ }
+
+ /**
+ * Renames an existing container.
+ *
+ * @param containerName The container name.
+ * @param sourceContainerName Required. Specifies the name of the container to rename.
+ * @param timeout The timeout parameter is expressed in seconds. For more information, see <a
+ * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting
+ * Timeouts for Blob Service Operations.</a>.
+ * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the
+ * analytics logs when storage analytics logging is enabled.
+ * @param sourceLeaseId A lease ID for the source path. If specified, the source path must have an active lease and
+ * the lease ID must match.
+ * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the service returns an error.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response.
+ */
+ public Response renameWithResponse(String containerName, String sourceContainerName, Integer timeout,
+ String requestId, String sourceLeaseId, RequestOptions requestOptions) {
+ final String restype = "container";
+ final String comp = "rename";
+ final String accept = "application/xml";
+ return service.rename(this.client.getUrl(), containerName, restype, comp, timeout, this.client.getVersion(),
+ requestId, sourceContainerName, sourceLeaseId, accept, requestOptions);
+ }
+
+ /**
+ * Renames an existing container.
+ *
+ * @param containerName The container name.
+ * @param sourceContainerName Required. Specifies the name of the container to rename.
+ * @param timeout The timeout parameter is expressed in seconds. For more information, see <a
+ * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting
+ * Timeouts for Blob Service Operations.</a>.
+ * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the
+ * analytics logs when storage analytics logging is enabled.
+ * @param sourceLeaseId A lease ID for the source path. If specified, the source path must have an active lease and
+ * the lease ID must match.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the service returns an error.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ public void rename(String containerName, String sourceContainerName, Integer timeout, String requestId,
+ String sourceLeaseId) {
+ renameWithResponse(containerName, sourceContainerName, timeout, requestId, sourceLeaseId,
+ RequestOptions.none());
+ }
+
+ /**
+ * The Batch operation allows multiple API calls to be embedded into a single HTTP request.
+ *
+ * @param containerName The container name.
+ * @param contentLength The length of the request.
+ * @param multipartContentType Required. The value of this header must be multipart/mixed with a batch boundary.
+ * Example header value: multipart/mixed; boundary=batch_<GUID>.
+ * @param body Initial data.
+ * @param timeout The timeout parameter is expressed in seconds. For more information, see <a
+ * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting
+ * Timeouts for Blob Service Operations.</a>.
+ * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the
+ * analytics logs when storage analytics logging is enabled.
+ * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the service returns an error.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response.
+ */
+ public Response submitBatchWithResponse(String containerName, long contentLength,
+ String multipartContentType, BinaryData body, Integer timeout, String requestId,
+ RequestOptions requestOptions) {
+ final String restype = "container";
+ final String comp = "batch";
+ final String accept = "application/xml";
+ return service.submitBatch(this.client.getUrl(), containerName, restype, comp, contentLength,
+ multipartContentType, timeout, this.client.getVersion(), requestId, body, accept, requestOptions);
+ }
+
+ /**
+ * The Batch operation allows multiple API calls to be embedded into a single HTTP request.
+ *
+ * @param containerName The container name.
+ * @param contentLength The length of the request.
+ * @param multipartContentType Required. The value of this header must be multipart/mixed with a batch boundary.
+ * Example header value: multipart/mixed; boundary=batch_<GUID>.
+ * @param body Initial data.
+ * @param timeout The timeout parameter is expressed in seconds. For more information, see <a
+ * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting
+ * Timeouts for Blob Service Operations.</a>.
+ * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the
+ * analytics logs when storage analytics logging is enabled.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the service returns an error.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response.
+ */
+ public InputStream submitBatch(String containerName, long contentLength, String multipartContentType,
+ BinaryData body, Integer timeout, String requestId) {
+ return submitBatchWithResponse(containerName, contentLength, multipartContentType, body, timeout, requestId,
+ RequestOptions.none()).getValue();
+ }
+
+ /**
+ * The Filter Blobs operation enables callers to list blobs in a container whose tags match a given search
+ * expression. Filter blobs searches within the given container.
+ *
+ * @param containerName The container name.
+ * @param timeout The timeout parameter is expressed in seconds. For more information, see <a
+ * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting
+ * Timeouts for Blob Service Operations.</a>.
+ * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the
+ * analytics logs when storage analytics logging is enabled.
+ * @param where Filters the results to return only to return only blobs whose tags match the specified expression.
+ * @param marker A string value that identifies the portion of the list of containers to be returned with the next
+ * listing operation. The operation returns the NextMarker value within the response body if the listing operation
+ * did not return all containers remaining to be listed with the current page. The NextMarker value can be used as
+ * the value for the marker parameter in a subsequent call to request the next page of list items. The marker value
+ * is opaque to the client.
+ * @param maxresults Specifies the maximum number of containers to return. If the request does not specify
+ * maxresults, or specifies a value greater than 5000, the server will return up to 5000 items. Note that if the
+ * listing operation crosses a partition boundary, then the service will return a continuation token for retrieving
+ * the remainder of the results. For this reason, it is possible that the service will return fewer results than
+ * specified by maxresults, or than the default of 5000.
+ * @param include Include this parameter to specify one or more datasets to include in the response.
+ * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the service returns an error.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the result of a Filter Blobs API call.
+ */
+ public Response filterBlobsWithResponse(String containerName, Integer timeout, String requestId,
+ String where, String marker, Integer maxresults, List include,
+ RequestOptions requestOptions) {
+ final String restype = "container";
+ final String comp = "blobs";
+ final String accept = "application/xml";
+ String includeConverted = (include == null)
+ ? null
+ : include.stream()
+ .map(paramItemValue -> Objects.toString(paramItemValue, ""))
+ .collect(Collectors.joining(","));
+ return service.filterBlobs(this.client.getUrl(), containerName, restype, comp, timeout,
+ this.client.getVersion(), requestId, where, marker, maxresults, includeConverted, accept, requestOptions);
+ }
+
+ /**
+ * The Filter Blobs operation enables callers to list blobs in a container whose tags match a given search
+ * expression. Filter blobs searches within the given container.
+ *
+ * @param containerName The container name.
+ * @param timeout The timeout parameter is expressed in seconds. For more information, see <a
+ * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting
+ * Timeouts for Blob Service Operations.</a>.
+ * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the
+ * analytics logs when storage analytics logging is enabled.
+ * @param where Filters the results to return only to return only blobs whose tags match the specified expression.
+ * @param marker A string value that identifies the portion of the list of containers to be returned with the next
+ * listing operation. The operation returns the NextMarker value within the response body if the listing operation
+ * did not return all containers remaining to be listed with the current page. The NextMarker value can be used as
+ * the value for the marker parameter in a subsequent call to request the next page of list items. The marker value
+ * is opaque to the client.
+ * @param maxresults Specifies the maximum number of containers to return. If the request does not specify
+ * maxresults, or specifies a value greater than 5000, the server will return up to 5000 items. Note that if the
+ * listing operation crosses a partition boundary, then the service will return a continuation token for retrieving
+ * the remainder of the results. For this reason, it is possible that the service will return fewer results than
+ * specified by maxresults, or than the default of 5000.
+ * @param include Include this parameter to specify one or more datasets to include in the response.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the service returns an error.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the result of a Filter Blobs API call.
+ */
+ public FilterBlobSegment filterBlobs(String containerName, Integer timeout, String requestId, String where,
+ String marker, Integer maxresults, List include) {
+ return filterBlobsWithResponse(containerName, timeout, requestId, where, marker, maxresults, include,
+ RequestOptions.none()).getValue();
+ }
+
+ /**
+ * [Update] establishes and manages a lock on a container for delete operations. The lock duration can be 15 to 60
+ * seconds, or can be infinite.
+ *
+ * @param containerName The container name.
+ * @param timeout The timeout parameter is expressed in seconds. For more information, see <a
+ * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting
+ * Timeouts for Blob Service Operations.</a>.
+ * @param duration Specifies the duration of the lease, in seconds, or negative one (-1) for a lease that never
+ * expires. A non-infinite lease can be between 15 and 60 seconds. A lease duration cannot be changed using renew or
+ * change.
+ * @param proposedLeaseId Proposed lease ID, in a GUID string format. The Blob service returns 400 (Invalid request)
+ * if the proposed lease ID is not in the correct format. See Guid Constructor (String) for a list of valid GUID
+ * string formats.
+ * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the
+ * specified date/time.
+ * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since
+ * the specified date/time.
+ * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the
+ * analytics logs when storage analytics logging is enabled.
+ * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the service returns an error.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response.
+ */
+ public Response acquireLeaseWithResponse(String containerName, Integer timeout, Integer duration,
+ String proposedLeaseId, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String requestId,
+ RequestOptions requestOptions) {
+ final String comp = "lease";
+ final String restype = "container";
+ final String action = "acquire";
+ final String accept = "application/xml";
+ DateTimeRfc1123 ifModifiedSinceConverted
+ = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince);
+ DateTimeRfc1123 ifUnmodifiedSinceConverted
+ = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince);
+ return service.acquireLease(this.client.getUrl(), containerName, comp, restype, action, timeout, duration,
+ proposedLeaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, this.client.getVersion(), requestId,
+ accept, requestOptions);
+ }
+
+ /**
+ * [Update] establishes and manages a lock on a container for delete operations. The lock duration can be 15 to 60
+ * seconds, or can be infinite.
+ *
+ * @param containerName The container name.
+ * @param timeout The timeout parameter is expressed in seconds. For more information, see <a
+ * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting
+ * Timeouts for Blob Service Operations.</a>.
+ * @param duration Specifies the duration of the lease, in seconds, or negative one (-1) for a lease that never
+ * expires. A non-infinite lease can be between 15 and 60 seconds. A lease duration cannot be changed using renew or
+ * change.
+ * @param proposedLeaseId Proposed lease ID, in a GUID string format. The Blob service returns 400 (Invalid request)
+ * if the proposed lease ID is not in the correct format. See Guid Constructor (String) for a list of valid GUID
+ * string formats.
+ * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the
+ * specified date/time.
+ * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since
+ * the specified date/time.
+ * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the
+ * analytics logs when storage analytics logging is enabled.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the service returns an error.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ public void acquireLease(String containerName, Integer timeout, Integer duration, String proposedLeaseId,
+ OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String requestId) {
+ acquireLeaseWithResponse(containerName, timeout, duration, proposedLeaseId, ifModifiedSince, ifUnmodifiedSince,
+ requestId, RequestOptions.none());
+ }
+
+ /**
+ * [Update] establishes and manages a lock on a container for delete operations. The lock duration can be 15 to 60
+ * seconds, or can be infinite.
+ *
+ * @param containerName The container name.
+ * @param leaseId Specifies the current lease ID on the resource.
+ * @param timeout The timeout parameter is expressed in seconds. For more information, see <a
+ * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting
+ * Timeouts for Blob Service Operations.</a>.
+ * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the
+ * specified date/time.
+ * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since
+ * the specified date/time.
+ * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the
+ * analytics logs when storage analytics logging is enabled.
+ * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the service returns an error.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response.
+ */
+ public Response releaseLeaseWithResponse(String containerName, String leaseId, Integer timeout,
+ OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String requestId,
+ RequestOptions requestOptions) {
+ final String comp = "lease";
+ final String restype = "container";
+ final String action = "release";
+ final String accept = "application/xml";
+ DateTimeRfc1123 ifModifiedSinceConverted
+ = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince);
+ DateTimeRfc1123 ifUnmodifiedSinceConverted
+ = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince);
+ return service.releaseLease(this.client.getUrl(), containerName, comp, restype, action, timeout, leaseId,
+ ifModifiedSinceConverted, ifUnmodifiedSinceConverted, this.client.getVersion(), requestId, accept,
+ requestOptions);
+ }
+
+ /**
+ * [Update] establishes and manages a lock on a container for delete operations. The lock duration can be 15 to 60
+ * seconds, or can be infinite.
+ *
+ * @param containerName The container name.
+ * @param leaseId Specifies the current lease ID on the resource.
+ * @param timeout The timeout parameter is expressed in seconds. For more information, see <a
+ * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting
+ * Timeouts for Blob Service Operations.</a>.
+ * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the
+ * specified date/time.
+ * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since
+ * the specified date/time.
+ * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the
+ * analytics logs when storage analytics logging is enabled.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the service returns an error.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ public void releaseLease(String containerName, String leaseId, Integer timeout, OffsetDateTime ifModifiedSince,
+ OffsetDateTime ifUnmodifiedSince, String requestId) {
+ releaseLeaseWithResponse(containerName, leaseId, timeout, ifModifiedSince, ifUnmodifiedSince, requestId,
+ RequestOptions.none());
+ }
+
+ /**
+ * [Update] establishes and manages a lock on a container for delete operations. The lock duration can be 15 to 60
+ * seconds, or can be infinite.
+ *
+ * @param containerName The container name.
+ * @param leaseId Specifies the current lease ID on the resource.
+ * @param timeout The timeout parameter is expressed in seconds. For more information, see <a
+ * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting
+ * Timeouts for Blob Service Operations.</a>.
+ * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the
+ * specified date/time.
+ * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since
+ * the specified date/time.
+ * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the
+ * analytics logs when storage analytics logging is enabled.
+ * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the service returns an error.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response.
+ */
+ public Response renewLeaseWithResponse(String containerName, String leaseId, Integer timeout,
+ OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String requestId,
+ RequestOptions requestOptions) {
+ final String comp = "lease";
+ final String restype = "container";
+ final String action = "renew";
+ final String accept = "application/xml";
+ DateTimeRfc1123 ifModifiedSinceConverted
+ = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince);
+ DateTimeRfc1123 ifUnmodifiedSinceConverted
+ = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince);
+ return service.renewLease(this.client.getUrl(), containerName, comp, restype, action, timeout, leaseId,
+ ifModifiedSinceConverted, ifUnmodifiedSinceConverted, this.client.getVersion(), requestId, accept,
+ requestOptions);
+ }
+
+ /**
+ * [Update] establishes and manages a lock on a container for delete operations. The lock duration can be 15 to 60
+ * seconds, or can be infinite.
+ *
+ * @param containerName The container name.
+ * @param leaseId Specifies the current lease ID on the resource.
+ * @param timeout The timeout parameter is expressed in seconds. For more information, see <a
+ * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting
+ * Timeouts for Blob Service Operations.</a>.
+ * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the
+ * specified date/time.
+ * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since
+ * the specified date/time.
+ * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the
+ * analytics logs when storage analytics logging is enabled.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the service returns an error.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ public void renewLease(String containerName, String leaseId, Integer timeout, OffsetDateTime ifModifiedSince,
+ OffsetDateTime ifUnmodifiedSince, String requestId) {
+ renewLeaseWithResponse(containerName, leaseId, timeout, ifModifiedSince, ifUnmodifiedSince, requestId,
+ RequestOptions.none());
+ }
+
+ /**
+ * [Update] establishes and manages a lock on a container for delete operations. The lock duration can be 15 to 60
+ * seconds, or can be infinite.
+ *
+ * @param containerName The container name.
+ * @param timeout The timeout parameter is expressed in seconds. For more information, see <a
+ * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting
+ * Timeouts for Blob Service Operations.</a>.
+ * @param breakPeriod For a break operation, proposed duration the lease should continue before it is broken, in
+ * seconds, between 0 and 60. This break period is only used if it is shorter than the time remaining on the lease.
+ * If longer, the time remaining on the lease is used. A new lease will not be available before the break period has
+ * expired, but the lease may be held for longer than the break period. If this header does not appear with a break
+ * operation, a fixed-duration lease breaks after the remaining lease period elapses, and an infinite lease breaks
+ * immediately.
+ * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the
+ * specified date/time.
+ * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since
+ * the specified date/time.
+ * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the
+ * analytics logs when storage analytics logging is enabled.
+ * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the service returns an error.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response.
+ */
+ public Response breakLeaseWithResponse(String containerName, Integer timeout, Integer breakPeriod,
+ OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String requestId,
+ RequestOptions requestOptions) {
+ final String comp = "lease";
+ final String restype = "container";
+ final String action = "break";
+ final String accept = "application/xml";
+ DateTimeRfc1123 ifModifiedSinceConverted
+ = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince);
+ DateTimeRfc1123 ifUnmodifiedSinceConverted
+ = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince);
+ return service.breakLease(this.client.getUrl(), containerName, comp, restype, action, timeout, breakPeriod,
+ ifModifiedSinceConverted, ifUnmodifiedSinceConverted, this.client.getVersion(), requestId, accept,
+ requestOptions);
+ }
+
+ /**
+ * [Update] establishes and manages a lock on a container for delete operations. The lock duration can be 15 to 60
+ * seconds, or can be infinite.
+ *
+ * @param containerName The container name.
+ * @param timeout The timeout parameter is expressed in seconds. For more information, see <a
+ * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting
+ * Timeouts for Blob Service Operations.</a>.
+ * @param breakPeriod For a break operation, proposed duration the lease should continue before it is broken, in
+ * seconds, between 0 and 60. This break period is only used if it is shorter than the time remaining on the lease.
+ * If longer, the time remaining on the lease is used. A new lease will not be available before the break period has
+ * expired, but the lease may be held for longer than the break period. If this header does not appear with a break
+ * operation, a fixed-duration lease breaks after the remaining lease period elapses, and an infinite lease breaks
+ * immediately.
+ * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the
+ * specified date/time.
+ * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since
+ * the specified date/time.
+ * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the
+ * analytics logs when storage analytics logging is enabled.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the service returns an error.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ public void breakLease(String containerName, Integer timeout, Integer breakPeriod, OffsetDateTime ifModifiedSince,
+ OffsetDateTime ifUnmodifiedSince, String requestId) {
+ breakLeaseWithResponse(containerName, timeout, breakPeriod, ifModifiedSince, ifUnmodifiedSince, requestId,
+ RequestOptions.none());
+ }
+
+ /**
+ * [Update] establishes and manages a lock on a container for delete operations. The lock duration can be 15 to 60
+ * seconds, or can be infinite.
+ *
+ * @param containerName The container name.
+ * @param leaseId Specifies the current lease ID on the resource.
+ * @param proposedLeaseId Proposed lease ID, in a GUID string format. The Blob service returns 400 (Invalid request)
+ * if the proposed lease ID is not in the correct format. See Guid Constructor (String) for a list of valid GUID
+ * string formats.
+ * @param timeout The timeout parameter is expressed in seconds. For more information, see <a
+ * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting
+ * Timeouts for Blob Service Operations.</a>.
+ * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the
+ * specified date/time.
+ * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since
+ * the specified date/time.
+ * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the
+ * analytics logs when storage analytics logging is enabled.
+ * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the service returns an error.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response.
+ */
+ public Response changeLeaseWithResponse(String containerName, String leaseId, String proposedLeaseId,
+ Integer timeout, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String requestId,
+ RequestOptions requestOptions) {
+ final String comp = "lease";
+ final String restype = "container";
+ final String action = "change";
+ final String accept = "application/xml";
+ DateTimeRfc1123 ifModifiedSinceConverted
+ = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince);
+ DateTimeRfc1123 ifUnmodifiedSinceConverted
+ = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince);
+ return service.changeLease(this.client.getUrl(), containerName, comp, restype, action, timeout, leaseId,
+ proposedLeaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, this.client.getVersion(), requestId,
+ accept, requestOptions);
+ }
+
+ /**
+ * [Update] establishes and manages a lock on a container for delete operations. The lock duration can be 15 to 60
+ * seconds, or can be infinite.
+ *
+ * @param containerName The container name.
+ * @param leaseId Specifies the current lease ID on the resource.
+ * @param proposedLeaseId Proposed lease ID, in a GUID string format. The Blob service returns 400 (Invalid request)
+ * if the proposed lease ID is not in the correct format. See Guid Constructor (String) for a list of valid GUID
+ * string formats.
+ * @param timeout The timeout parameter is expressed in seconds. For more information, see <a
+ * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting
+ * Timeouts for Blob Service Operations.</a>.
+ * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the
+ * specified date/time.
+ * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since
+ * the specified date/time.
+ * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the
+ * analytics logs when storage analytics logging is enabled.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the service returns an error.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ public void changeLease(String containerName, String leaseId, String proposedLeaseId, Integer timeout,
+ OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String requestId) {
+ changeLeaseWithResponse(containerName, leaseId, proposedLeaseId, timeout, ifModifiedSince, ifUnmodifiedSince,
+ requestId, RequestOptions.none());
+ }
+
+ /**
+ * [Update] The List Blobs operation returns a list of the blobs under the specified container.
+ *
+ * @param containerName The container name.
+ * @param prefix Filters the results to return only containers whose name begins with the specified prefix.
+ * @param marker A string value that identifies the portion of the list of containers to be returned with the next
+ * listing operation. The operation returns the NextMarker value within the response body if the listing operation
+ * did not return all containers remaining to be listed with the current page. The NextMarker value can be used as
+ * the value for the marker parameter in a subsequent call to request the next page of list items. The marker value
+ * is opaque to the client.
+ * @param maxresults Specifies the maximum number of containers to return. If the request does not specify
+ * maxresults, or specifies a value greater than 5000, the server will return up to 5000 items. Note that if the
+ * listing operation crosses a partition boundary, then the service will return a continuation token for retrieving
+ * the remainder of the results. For this reason, it is possible that the service will return fewer results than
+ * specified by maxresults, or than the default of 5000.
+ * @param include Include this parameter to specify one or more datasets to include in the response.
+ * @param timeout The timeout parameter is expressed in seconds. For more information, see <a
+ * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting
+ * Timeouts for Blob Service Operations.</a>.
+ * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the
+ * analytics logs when storage analytics logging is enabled.
+ * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the service returns an error.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return an enumeration of blobs.
+ */
+ public Response listBlobFlatSegmentWithResponse(String containerName, String prefix,
+ String marker, Integer maxresults, List include, Integer timeout, String requestId,
+ RequestOptions requestOptions) {
+ final String restype = "container";
+ final String comp = "list";
+ final String accept = "application/xml";
+ String includeConverted = (include == null)
+ ? null
+ : include.stream()
+ .map(paramItemValue -> Objects.toString(paramItemValue, ""))
+ .collect(Collectors.joining(","));
+ return service.listBlobFlatSegment(this.client.getUrl(), containerName, restype, comp, prefix, marker,
+ maxresults, includeConverted, timeout, this.client.getVersion(), requestId, accept, requestOptions);
+ }
+
+ /**
+ * [Update] The List Blobs operation returns a list of the blobs under the specified container.
+ *
+ * @param containerName The container name.
+ * @param prefix Filters the results to return only containers whose name begins with the specified prefix.
+ * @param marker A string value that identifies the portion of the list of containers to be returned with the next
+ * listing operation. The operation returns the NextMarker value within the response body if the listing operation
+ * did not return all containers remaining to be listed with the current page. The NextMarker value can be used as
+ * the value for the marker parameter in a subsequent call to request the next page of list items. The marker value
+ * is opaque to the client.
+ * @param maxresults Specifies the maximum number of containers to return. If the request does not specify
+ * maxresults, or specifies a value greater than 5000, the server will return up to 5000 items. Note that if the
+ * listing operation crosses a partition boundary, then the service will return a continuation token for retrieving
+ * the remainder of the results. For this reason, it is possible that the service will return fewer results than
+ * specified by maxresults, or than the default of 5000.
+ * @param include Include this parameter to specify one or more datasets to include in the response.
+ * @param timeout The timeout parameter is expressed in seconds. For more information, see <a
+ * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting
+ * Timeouts for Blob Service Operations.</a>.
+ * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the
+ * analytics logs when storage analytics logging is enabled.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the service returns an error.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return an enumeration of blobs.
+ */
+ public ListBlobsFlatSegmentResponse listBlobFlatSegment(String containerName, String prefix, String marker,
+ Integer maxresults, List include, Integer timeout, String requestId) {
+ return listBlobFlatSegmentWithResponse(containerName, prefix, marker, maxresults, include, timeout, requestId,
+ RequestOptions.none()).getValue();
+ }
+
+ /**
+ * [Update] The List Blobs operation returns a list of the blobs under the specified container.
+ *
+ * @param containerName The container name.
+ * @param delimiter When the request includes this parameter, the operation returns a BlobPrefix element in the
+ * response body that acts as a placeholder for all blobs whose names begin with the same substring up to the
+ * appearance of the delimiter character. The delimiter may be a single character or a string.
+ * @param prefix Filters the results to return only containers whose name begins with the specified prefix.
+ * @param marker A string value that identifies the portion of the list of containers to be returned with the next
+ * listing operation. The operation returns the NextMarker value within the response body if the listing operation
+ * did not return all containers remaining to be listed with the current page. The NextMarker value can be used as
+ * the value for the marker parameter in a subsequent call to request the next page of list items. The marker value
+ * is opaque to the client.
+ * @param maxresults Specifies the maximum number of containers to return. If the request does not specify
+ * maxresults, or specifies a value greater than 5000, the server will return up to 5000 items. Note that if the
+ * listing operation crosses a partition boundary, then the service will return a continuation token for retrieving
+ * the remainder of the results. For this reason, it is possible that the service will return fewer results than
+ * specified by maxresults, or than the default of 5000.
+ * @param include Include this parameter to specify one or more datasets to include in the response.
+ * @param timeout The timeout parameter is expressed in seconds. For more information, see <a
+ * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting
+ * Timeouts for Blob Service Operations.</a>.
+ * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the
+ * analytics logs when storage analytics logging is enabled.
+ * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the service returns an error.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return an enumeration of blobs.
+ */
+ public Response listBlobHierarchySegmentWithResponse(String containerName,
+ String delimiter, String prefix, String marker, Integer maxresults, List include,
+ Integer timeout, String requestId, RequestOptions requestOptions) {
+ final String restype = "container";
+ final String comp = "list";
+ final String accept = "application/xml";
+ String includeConverted = (include == null)
+ ? null
+ : include.stream()
+ .map(paramItemValue -> Objects.toString(paramItemValue, ""))
+ .collect(Collectors.joining(","));
+ return service.listBlobHierarchySegment(this.client.getUrl(), containerName, restype, comp, prefix, delimiter,
+ marker, maxresults, includeConverted, timeout, this.client.getVersion(), requestId, accept, requestOptions);
+ }
+
+ /**
+ * [Update] The List Blobs operation returns a list of the blobs under the specified container.
+ *
+ * @param containerName The container name.
+ * @param delimiter When the request includes this parameter, the operation returns a BlobPrefix element in the
+ * response body that acts as a placeholder for all blobs whose names begin with the same substring up to the
+ * appearance of the delimiter character. The delimiter may be a single character or a string.
+ * @param prefix Filters the results to return only containers whose name begins with the specified prefix.
+ * @param marker A string value that identifies the portion of the list of containers to be returned with the next
+ * listing operation. The operation returns the NextMarker value within the response body if the listing operation
+ * did not return all containers remaining to be listed with the current page. The NextMarker value can be used as
+ * the value for the marker parameter in a subsequent call to request the next page of list items. The marker value
+ * is opaque to the client.
+ * @param maxresults Specifies the maximum number of containers to return. If the request does not specify
+ * maxresults, or specifies a value greater than 5000, the server will return up to 5000 items. Note that if the
+ * listing operation crosses a partition boundary, then the service will return a continuation token for retrieving
+ * the remainder of the results. For this reason, it is possible that the service will return fewer results than
+ * specified by maxresults, or than the default of 5000.
+ * @param include Include this parameter to specify one or more datasets to include in the response.
+ * @param timeout The timeout parameter is expressed in seconds. For more information, see <a
+ * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting
+ * Timeouts for Blob Service Operations.</a>.
+ * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the
+ * analytics logs when storage analytics logging is enabled.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the service returns an error.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return an enumeration of blobs.
+ */
+ public ListBlobsHierarchySegmentResponse listBlobHierarchySegment(String containerName, String delimiter,
+ String prefix, String marker, Integer maxresults, List include, Integer timeout,
+ String requestId) {
+ return listBlobHierarchySegmentWithResponse(containerName, delimiter, prefix, marker, maxresults, include,
+ timeout, requestId, RequestOptions.none()).getValue();
+ }
+
+ /**
+ * Returns the sku name and account kind.
+ *
+ * @param containerName The container name.
+ * @param timeout The timeout parameter is expressed in seconds. For more information, see <a
+ * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting
+ * Timeouts for Blob Service Operations.</a>.
+ * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the
+ * analytics logs when storage analytics logging is enabled.
+ * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the service returns an error.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response.
+ */
+ public Response getAccountInfoWithResponse(String containerName, Integer timeout, String requestId,
+ RequestOptions requestOptions) {
+ final String restype = "account";
+ final String comp = "properties";
+ final String accept = "application/xml";
+ return service.getAccountInfo(this.client.getUrl(), containerName, restype, comp, timeout,
+ this.client.getVersion(), requestId, accept, requestOptions);
+ }
+
+ /**
+ * Returns the sku name and account kind.
+ *
+ * @param containerName The container name.
+ * @param timeout The timeout parameter is expressed in seconds. For more information, see <a
+ * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting
+ * Timeouts for Blob Service Operations.</a>.
+ * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the
+ * analytics logs when storage analytics logging is enabled.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the service returns an error.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ public void getAccountInfo(String containerName, Integer timeout, String requestId) {
+ getAccountInfoWithResponse(containerName, timeout, requestId, RequestOptions.none());
+ }
+}
diff --git a/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/implementation/PageBlobsImpl.java b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/implementation/PageBlobsImpl.java
new file mode 100644
index 000000000000..88f24cf88d5d
--- /dev/null
+++ b/sdk/storage/azure-storage-blob-v2/src/main/java/com/azure/v2/storage/blob/implementation/PageBlobsImpl.java
@@ -0,0 +1,1458 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.v2.storage.blob.implementation;
+
+import com.azure.v2.storage.blob.models.BlobHttpHeaders;
+import com.azure.v2.storage.blob.models.BlobImmutabilityPolicyMode;
+import com.azure.v2.storage.blob.models.CpkInfo;
+import com.azure.v2.storage.blob.models.EncryptionAlgorithmType;
+import com.azure.v2.storage.blob.models.EncryptionScope;
+import com.azure.v2.storage.blob.models.PageList;
+import com.azure.v2.storage.blob.models.PremiumPageBlobAccessTier;
+import com.azure.v2.storage.blob.models.SequenceNumberActionType;
+import com.azure.v2.storage.blob.models.StorageError;
+import io.clientcore.core.annotations.ServiceInterface;
+import io.clientcore.core.http.RestProxy;
+import io.clientcore.core.http.annotations.BodyParam;
+import io.clientcore.core.http.annotations.HeaderParam;
+import io.clientcore.core.http.annotations.HostParam;
+import io.clientcore.core.http.annotations.HttpRequestInformation;
+import io.clientcore.core.http.annotations.PathParam;
+import io.clientcore.core.http.annotations.QueryParam;
+import io.clientcore.core.http.annotations.UnexpectedResponseExceptionDetail;
+import io.clientcore.core.http.exceptions.HttpResponseException;
+import io.clientcore.core.http.models.HttpMethod;
+import io.clientcore.core.http.models.RequestOptions;
+import io.clientcore.core.http.models.Response;
+import io.clientcore.core.http.pipeline.HttpPipeline;
+import io.clientcore.core.models.binarydata.BinaryData;
+import io.clientcore.core.serialization.ObjectSerializer;
+import io.clientcore.core.utils.Base64Util;
+import io.clientcore.core.utils.DateTimeRfc1123;
+import java.lang.reflect.InvocationTargetException;
+import java.time.OffsetDateTime;
+import java.util.Map;
+
+/**
+ * An instance of this class provides access to all the operations defined in PageBlobs.
+ */
+public final class PageBlobsImpl {
+ /**
+ * The proxy service used to perform REST calls.
+ */
+ private final PageBlobsService service;
+
+ /**
+ * The service client containing this operation class.
+ */
+ private final AzureBlobStorageImpl client;
+
+ /**
+ * Initializes an instance of PageBlobsImpl.
+ *
+ * @param client the instance of the service client containing this operation class.
+ */
+ PageBlobsImpl(AzureBlobStorageImpl client) {
+ this.service = RestProxy.create(PageBlobsService.class, client.getHttpPipeline());
+ this.client = client;
+ }
+
+ /**
+ * The interface defining all the services for AzureBlobStoragePageBlobs to be used by the proxy service to perform
+ * REST calls.
+ */
+ @ServiceInterface(name = "AzureBlobStoragePage", host = "{url}")
+ public interface PageBlobsService {
+ static PageBlobsService getNewInstance(HttpPipeline pipeline, ObjectSerializer serializer) {
+ try {
+ Class> clazz = Class.forName("com.azure.v2.storage.blob.implementation.PageBlobsServiceImpl");
+ return (PageBlobsService) clazz.getMethod("getNewInstance", HttpPipeline.class, ObjectSerializer.class)
+ .invoke(null, pipeline, serializer);
+ } catch (ClassNotFoundException | NoSuchMethodException | IllegalAccessException
+ | InvocationTargetException e) {
+ throw new RuntimeException(e);
+ }
+
+ }
+
+ @HttpRequestInformation(
+ method = HttpMethod.PUT,
+ path = "/{containerName}/{blob}",
+ expectedStatusCodes = { 201 })
+ @UnexpectedResponseExceptionDetail(exceptionBodyClass = StorageError.class)
+ Response create(@HostParam("url") String url, @PathParam("containerName") String containerName,
+ @PathParam("blob") String blob, @HeaderParam("x-ms-blob-type") String blobType,
+ @QueryParam("timeout") Integer timeout, @HeaderParam("Content-Length") long contentLength,
+ @HeaderParam("x-ms-access-tier") PremiumPageBlobAccessTier tier,
+ @HeaderParam("x-ms-blob-content-type") String contentType,
+ @HeaderParam("x-ms-blob-content-encoding") String contentEncoding,
+ @HeaderParam("x-ms-blob-content-language") String contentLanguage,
+ @HeaderParam("x-ms-blob-content-md5") String contentMd5,
+ @HeaderParam("x-ms-blob-cache-control") String cacheControl,
+ @HeaderParam("x-ms-meta-") Map metadata, @HeaderParam("x-ms-lease-id") String leaseId,
+ @HeaderParam("x-ms-blob-content-disposition") String contentDisposition,
+ @HeaderParam("x-ms-encryption-key") String encryptionKey,
+ @HeaderParam("x-ms-encryption-key-sha256") String encryptionKeySha256,
+ @HeaderParam("x-ms-encryption-algorithm") EncryptionAlgorithmType encryptionAlgorithm,
+ @HeaderParam("x-ms-encryption-scope") String encryptionScope,
+ @HeaderParam("If-Modified-Since") DateTimeRfc1123 ifModifiedSince,
+ @HeaderParam("If-Unmodified-Since") DateTimeRfc1123 ifUnmodifiedSince,
+ @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch,
+ @HeaderParam("x-ms-if-tags") String ifTags, @HeaderParam("x-ms-blob-content-length") long blobContentLength,
+ @HeaderParam("x-ms-blob-sequence-number") Long blobSequenceNumber,
+ @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId,
+ @HeaderParam("x-ms-tags") String blobTagsString,
+ @HeaderParam("x-ms-immutability-policy-until-date") DateTimeRfc1123 immutabilityPolicyExpiry,
+ @HeaderParam("x-ms-immutability-policy-mode") BlobImmutabilityPolicyMode immutabilityPolicyMode,
+ @HeaderParam("x-ms-legal-hold") Boolean legalHold, @HeaderParam("Accept") String accept,
+ RequestOptions requestOptions);
+
+ @HttpRequestInformation(
+ method = HttpMethod.PUT,
+ path = "/{containerName}/{blob}",
+ expectedStatusCodes = { 201 })
+ @UnexpectedResponseExceptionDetail(exceptionBodyClass = StorageError.class)
+ default void create(@HostParam("url") String url, @PathParam("containerName") String containerName,
+ @PathParam("blob") String blob, @HeaderParam("x-ms-blob-type") String blobType,
+ @HeaderParam("Content-Length") long contentLength,
+ @HeaderParam("x-ms-blob-content-length") long blobContentLength,
+ @HeaderParam("x-ms-version") String version, @HeaderParam("Accept") String accept) {
+ create(url, containerName, blob, blobType, null, contentLength, null, null, null, null, null, null, null,
+ null, null, null, null, null, null, null, null, null, null, null, blobContentLength, null, version,
+ null, null, null, null, null, accept, null);
+ }
+
+ @HttpRequestInformation(
+ method = HttpMethod.PUT,
+ path = "/{containerName}/{blob}",
+ expectedStatusCodes = { 201 })
+ @UnexpectedResponseExceptionDetail(exceptionBodyClass = StorageError.class)
+ Response uploadPages(@HostParam("url") String url, @PathParam("containerName") String containerName,
+ @PathParam("blob") String blob, @QueryParam("comp") String comp,
+ @HeaderParam("x-ms-page-write") String pageWrite, @HeaderParam("Content-Length") long contentLength,
+ @HeaderParam("Content-MD5") String transactionalContentMD5,
+ @HeaderParam("x-ms-content-crc64") String transactionalContentCrc64, @QueryParam("timeout") Integer timeout,
+ @HeaderParam("x-ms-range") String range, @HeaderParam("x-ms-lease-id") String leaseId,
+ @HeaderParam("x-ms-encryption-key") String encryptionKey,
+ @HeaderParam("x-ms-encryption-key-sha256") String encryptionKeySha256,
+ @HeaderParam("x-ms-encryption-algorithm") EncryptionAlgorithmType encryptionAlgorithm,
+ @HeaderParam("x-ms-encryption-scope") String encryptionScope,
+ @HeaderParam("x-ms-if-sequence-number-le") Long ifSequenceNumberLessThanOrEqualTo,
+ @HeaderParam("x-ms-if-sequence-number-lt") Long ifSequenceNumberLessThan,
+ @HeaderParam("x-ms-if-sequence-number-eq") Long ifSequenceNumberEqualTo,
+ @HeaderParam("If-Modified-Since") DateTimeRfc1123 ifModifiedSince,
+ @HeaderParam("If-Unmodified-Since") DateTimeRfc1123 ifUnmodifiedSince,
+ @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch,
+ @HeaderParam("x-ms-if-tags") String ifTags, @HeaderParam("x-ms-version") String version,
+ @HeaderParam("x-ms-client-request-id") String requestId,
+ @HeaderParam("x-ms-structured-body") String structuredBodyType,
+ @HeaderParam("x-ms-structured-content-length") Long structuredContentLength,
+ @BodyParam("application/octet-stream") BinaryData body, @HeaderParam("Accept") String accept,
+ RequestOptions requestOptions);
+
+ @HttpRequestInformation(
+ method = HttpMethod.PUT,
+ path = "/{containerName}/{blob}",
+ expectedStatusCodes = { 201 })
+ @UnexpectedResponseExceptionDetail(exceptionBodyClass = StorageError.class)
+ default void uploadPages(@HostParam("url") String url, @PathParam("containerName") String containerName,
+ @PathParam("blob") String blob, @QueryParam("comp") String comp,
+ @HeaderParam("x-ms-page-write") String pageWrite, @HeaderParam("Content-Length") long contentLength,
+ @HeaderParam("x-ms-version") String version, @BodyParam("application/octet-stream") BinaryData body,
+ @HeaderParam("Accept") String accept) {
+ uploadPages(url, containerName, blob, comp, pageWrite, contentLength, null, null, null, null, null, null,
+ null, null, null, null, null, null, null, null, null, null, null, version, null, null, null, body,
+ accept, null);
+ }
+
+ @HttpRequestInformation(
+ method = HttpMethod.PUT,
+ path = "/{containerName}/{blob}",
+ expectedStatusCodes = { 201 })
+ @UnexpectedResponseExceptionDetail(exceptionBodyClass = StorageError.class)
+ Response