diff --git a/eng/code-quality-reports/src/main/resources/checkstyle/checkstyle-suppressions.xml b/eng/code-quality-reports/src/main/resources/checkstyle/checkstyle-suppressions.xml
index d7496c3ed2e9..6a907a19a665 100644
--- a/eng/code-quality-reports/src/main/resources/checkstyle/checkstyle-suppressions.xml
+++ b/eng/code-quality-reports/src/main/resources/checkstyle/checkstyle-suppressions.xml
@@ -34,9 +34,6 @@
-
-
-
@@ -77,15 +74,6 @@
-
-
-
-
-
-
-
-
-
@@ -146,29 +134,6 @@ the main ServiceBusClientBuilder. -->
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -184,13 +149,6 @@ the main ServiceBusClientBuilder. -->
-
-
-
-
-
-
-
@@ -231,8 +189,6 @@ the main ServiceBusClientBuilder. -->
-
-
@@ -246,9 +202,6 @@ the main ServiceBusClientBuilder. -->
-
-
-
-
@@ -440,13 +392,6 @@ the main ServiceBusClientBuilder. -->
-
-
-
-
-
-
diff --git a/eng/code-quality-reports/src/main/resources/spotbugs/spotbugs-exclude.xml b/eng/code-quality-reports/src/main/resources/spotbugs/spotbugs-exclude.xml
index 2b1257ba70c1..d7b34475724b 100644
--- a/eng/code-quality-reports/src/main/resources/spotbugs/spotbugs-exclude.xml
+++ b/eng/code-quality-reports/src/main/resources/spotbugs/spotbugs-exclude.xml
@@ -164,10 +164,7 @@
-
-
-
-
+
@@ -411,19 +408,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -482,24 +466,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -541,8 +507,6 @@
-
-
-
-
-
-
-
-
@@ -596,48 +554,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -1891,37 +1807,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobContainerAsyncClient.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobContainerAsyncClient.java
index 1d53e8fe0e45..753176857abc 100644
--- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobContainerAsyncClient.java
+++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobContainerAsyncClient.java
@@ -427,8 +427,7 @@ Mono> createWithResponse(Map metadata, PublicAcce
Context context) {
context = context == null ? Context.NONE : context;
return this.azureBlobStorage.getContainers().createNoCustomHeadersWithResponseAsync(containerName, null,
- metadata, accessType, null, blobContainerEncryptionScope, context)
- .onErrorMap(ModelHelper::mapToBlobStorageException);
+ metadata, accessType, null, blobContainerEncryptionScope, context);
}
/**
@@ -576,8 +575,7 @@ Mono> deleteWithResponse(BlobRequestConditions requestConditions,
return this.azureBlobStorage.getContainers().deleteNoCustomHeadersWithResponseAsync(containerName, null,
requestConditions.getLeaseId(), requestConditions.getIfModifiedSince(),
- requestConditions.getIfUnmodifiedSince(), null, context)
- .onErrorMap(ModelHelper::mapToBlobStorageException);
+ requestConditions.getIfUnmodifiedSince(), null, context);
}
/**
@@ -718,7 +716,6 @@ Mono> getPropertiesWithResponse(String leaseId
return this.azureBlobStorage.getContainers()
.getPropertiesWithResponseAsync(containerName, null, leaseId, null, context)
- .onErrorMap(ModelHelper::mapToBlobStorageException)
.map(rb -> {
ContainersGetPropertiesHeaders hd = rb.getDeserializedHeaders();
BlobContainerProperties properties = new BlobContainerProperties(hd.getXMsMeta(), hd.getETag(),
@@ -802,8 +799,7 @@ Mono> setMetadataWithResponse(Map metadata,
}
return this.azureBlobStorage.getContainers().setMetadataNoCustomHeadersWithResponseAsync(containerName, null,
- requestConditions.getLeaseId(), metadata, requestConditions.getIfModifiedSince(), null, context)
- .onErrorMap(ModelHelper::mapToBlobStorageException);
+ requestConditions.getLeaseId(), metadata, requestConditions.getIfModifiedSince(), null, context);
}
/**
@@ -871,7 +867,6 @@ Mono> getAccessPolicyWithResponse(String l
context = context == null ? Context.NONE : context;
return this.azureBlobStorage.getContainers().getAccessPolicyWithResponseAsync(
containerName, null, leaseId, null, context)
- .onErrorMap(ModelHelper::mapToBlobStorageException)
.map(response -> new SimpleResponse<>(response,
new BlobContainerAccessPolicies(response.getDeserializedHeaders().getXMsBlobPublicAccess(),
response.getValue().items())));
@@ -995,8 +990,7 @@ OffsetDateTime.now will only give back milliseconds (more precise fields are zer
return this.azureBlobStorage.getContainers().setAccessPolicyNoCustomHeadersWithResponseAsync(containerName,
null, requestConditions.getLeaseId(), accessType, requestConditions.getIfModifiedSince(),
- requestConditions.getIfUnmodifiedSince(), null, identifiers, context)
- .onErrorMap(ModelHelper::mapToBlobStorageException);
+ requestConditions.getIfUnmodifiedSince(), null, identifiers, context);
}
/**
@@ -1203,8 +1197,7 @@ PagedFlux listBlobsFlatWithOptionalTimeout(ListBlobsOptions options, S
return StorageImplUtils.applyOptionalTimeout(
this.azureBlobStorage.getContainers().listBlobFlatSegmentWithResponseAsync(containerName,
options.getPrefix(), marker, options.getMaxResultsPerPage(), include, null, null, Context.NONE),
- timeout)
- .onErrorMap(ModelHelper::mapToBlobStorageException);
+ timeout);
}
/**
@@ -1378,8 +1371,7 @@ PagedFlux listBlobsHierarchyWithOptionalTimeout(String delimiter, List
this.azureBlobStorage.getContainers().listBlobHierarchySegmentWithResponseAsync(containerName, delimiter,
options.getPrefix(), marker, options.getMaxResultsPerPage(), include, null, null,
Context.NONE),
- timeout)
- .onErrorMap(ModelHelper::mapToBlobStorageException);
+ timeout);
}
/**
@@ -1462,7 +1454,6 @@ private Mono> findBlobsByTags(
return StorageImplUtils.applyOptionalTimeout(
this.azureBlobStorage.getContainers().filterBlobsWithResponseAsync(containerName, null, null,
options.getQuery(), marker, options.getMaxResultsPerPage(), null, context), timeout)
- .onErrorMap(ModelHelper::mapToBlobStorageException)
.map(response -> {
List value = response.getValue().getBlobs().stream()
.map(ModelHelper::populateTaggedBlobItem)
@@ -1529,7 +1520,6 @@ public Mono> getAccountInfoWithResponse() {
Mono> getAccountInfoWithResponse(Context context) {
context = context == null ? Context.NONE : context;
return this.azureBlobStorage.getContainers().getAccountInfoWithResponseAsync(containerName, context)
- .onErrorMap(ModelHelper::mapToBlobStorageException)
.map(rb -> {
ContainersGetAccountInfoHeaders hd = rb.getDeserializedHeaders();
return new SimpleResponse<>(rb, new StorageAccountInfo(hd.getXMsSkuName(), hd.getXMsAccountKind()));
diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobServiceAsyncClient.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobServiceAsyncClient.java
index 729889954532..3842d2b3e621 100644
--- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobServiceAsyncClient.java
+++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobServiceAsyncClient.java
@@ -539,8 +539,7 @@ private Mono> listBlobContainersSegment(String
this.azureBlobStorage.getServices().listBlobContainersSegmentSinglePageAsync(
options.getPrefix(), marker, options.getMaxResultsPerPage(),
toIncludeTypes(options.getDetails()),
- null, null, Context.NONE), timeout)
- .onErrorMap(ModelHelper::mapToBlobStorageException);
+ null, null, Context.NONE), timeout);
}
/**
@@ -614,7 +613,6 @@ private Mono> findBlobsByTags(
return StorageImplUtils.applyOptionalTimeout(
this.azureBlobStorage.getServices().filterBlobsWithResponseAsync(null, null,
options.getQuery(), marker, options.getMaxResultsPerPage(), null, context), timeout)
- .onErrorMap(ModelHelper::mapToBlobStorageException)
.map(response -> {
List value = response.getValue().getBlobs().stream()
.map(ModelHelper::populateTaggedBlobItem)
@@ -712,7 +710,6 @@ Mono> getPropertiesWithResponse(Context context)
context = context == null ? Context.NONE : context;
throwOnAnonymousAccess();
return this.azureBlobStorage.getServices().getPropertiesWithResponseAsync(null, null, context)
- .onErrorMap(ModelHelper::mapToBlobStorageException)
.map(rb -> new SimpleResponse<>(rb, rb.getValue()));
}
@@ -859,8 +856,7 @@ Mono> setPropertiesWithResponse(BlobServiceProperties properties,
context = context == null ? Context.NONE : context;
return this.azureBlobStorage.getServices()
- .setPropertiesNoCustomHeadersWithResponseAsync(finalProperties, null, null, context)
- .onErrorMap(ModelHelper::mapToBlobStorageException);
+ .setPropertiesNoCustomHeadersWithResponseAsync(finalProperties, null, null, context);
}
/**
@@ -964,7 +960,6 @@ Mono> getUserDelegationKeyWithResponse(OffsetDateTim
.setStart(start == null ? "" : Constants.ISO_8601_UTC_DATE_FORMATTER.format(start))
.setExpiry(Constants.ISO_8601_UTC_DATE_FORMATTER.format(expiry)),
null, null, context)
- .onErrorMap(ModelHelper::mapToBlobStorageException)
.map(rb -> new SimpleResponse<>(rb, rb.getValue()));
}
@@ -1022,7 +1017,6 @@ Mono> getStatisticsWithResponse(Context context)
context = context == null ? Context.NONE : context;
return this.azureBlobStorage.getServices().getStatisticsWithResponseAsync(null, null, context)
- .onErrorMap(ModelHelper::mapToBlobStorageException)
.map(rb -> new SimpleResponse<>(rb, rb.getValue()));
}
@@ -1074,7 +1068,6 @@ public Mono> getAccountInfoWithResponse() {
Mono> getAccountInfoWithResponse(Context context) {
throwOnAnonymousAccess();
return this.azureBlobStorage.getServices().getAccountInfoWithResponseAsync(context)
- .onErrorMap(ModelHelper::mapToBlobStorageException)
.map(rb -> {
ServicesGetAccountInfoHeaders hd = rb.getDeserializedHeaders();
return new SimpleResponse<>(rb, new StorageAccountInfo(hd.getXMsSkuName(), hd.getXMsAccountKind(),
@@ -1276,7 +1269,6 @@ Mono> undeleteBlobContainerWithResponse(
context = context == null ? Context.NONE : context;
return this.azureBlobStorage.getContainers().restoreWithResponseAsync(finalDestinationContainerName, null,
null, options.getDeletedContainerName(), options.getDeletedContainerVersion(), context)
- .onErrorMap(ModelHelper::mapToBlobStorageException)
.map(response -> new SimpleResponse<>(response,
getBlobContainerAsyncClient(finalDestinationContainerName)));
}
diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/AppendBlobsImpl.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/AppendBlobsImpl.java
index 09a7e2b2d317..70bcd8fc25ce 100644
--- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/AppendBlobsImpl.java
+++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/AppendBlobsImpl.java
@@ -1,7 +1,6 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// Code generated by Microsoft (R) AutoRest Code Generator.
-
package com.azure.storage.blob.implementation;
import com.azure.core.annotation.BodyParam;
@@ -39,11 +38,13 @@
import java.util.Map;
import reactor.core.publisher.Flux;
import reactor.core.publisher.Mono;
+import com.azure.storage.blob.implementation.util.ModelHelper;
/**
* 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.
*/
@@ -56,7 +57,7 @@ public final class AppendBlobsImpl {
/**
* Initializes an instance of AppendBlobsImpl.
- *
+ *
* @param client the instance of the service client containing this operation class.
*/
AppendBlobsImpl(AzureBlobStorageImpl client) {
@@ -72,6 +73,7 @@ public final class AppendBlobsImpl {
@Host("{url}")
@ServiceInterface(name = "AzureBlobStorageAppe")
public interface AppendBlobsService {
+
@Put("/{containerName}/{blob}")
@ExpectedResponses({ 201 })
@UnexpectedResponseExceptionType(BlobStorageExceptionInternal.class)
@@ -307,7 +309,7 @@ Mono> sealNoCustomHeaders(@HostParam("url") String url,
/**
* The Create Append Blob operation creates a new append blob.
- *
+ *
* @param containerName The container name.
* @param blob The blob name.
* @param contentLength The length of the request.
@@ -408,17 +410,19 @@ public Mono> createWithResponseAsyn
= ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince);
DateTimeRfc1123 immutabilityPolicyExpiryConverted
= immutabilityPolicyExpiry == null ? null : new DateTimeRfc1123(immutabilityPolicyExpiry);
- return FluxUtil.withContext(context -> service.create(this.client.getUrl(), containerName, blob, blobType,
- timeout, contentLength, contentType, contentEncoding, contentLanguage, contentMd5Converted, cacheControl,
- metadata, leaseId, contentDisposition, encryptionKey, encryptionKeySha256, encryptionAlgorithm,
- encryptionScope, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags,
- this.client.getVersion(), requestId, blobTagsString, immutabilityPolicyExpiryConverted,
- immutabilityPolicyMode, legalHold, accept, context));
+ return FluxUtil
+ .withContext(context -> service.create(this.client.getUrl(), containerName, blob, blobType, timeout,
+ contentLength, contentType, contentEncoding, contentLanguage, contentMd5Converted, cacheControl,
+ metadata, leaseId, contentDisposition, encryptionKey, encryptionKeySha256, encryptionAlgorithm,
+ encryptionScope, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags,
+ this.client.getVersion(), requestId, blobTagsString, immutabilityPolicyExpiryConverted,
+ immutabilityPolicyMode, legalHold, accept, context))
+ .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException);
}
/**
* The Create Append Blob operation creates a new append blob.
- *
+ *
* @param containerName The container name.
* @param blob The blob name.
* @param contentLength The length of the request.
@@ -524,12 +528,13 @@ public Mono> createWithResponseAsyn
contentEncoding, contentLanguage, contentMd5Converted, cacheControl, metadata, leaseId, contentDisposition,
encryptionKey, encryptionKeySha256, encryptionAlgorithm, encryptionScope, ifModifiedSinceConverted,
ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, this.client.getVersion(), requestId,
- blobTagsString, immutabilityPolicyExpiryConverted, immutabilityPolicyMode, legalHold, accept, context);
+ blobTagsString, immutabilityPolicyExpiryConverted, immutabilityPolicyMode, legalHold, accept, context)
+ .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException);
}
/**
* The Create Append Blob operation creates a new append blob.
- *
+ *
* @param containerName The container name.
* @param blob The blob name.
* @param contentLength The length of the request.
@@ -573,12 +578,13 @@ public Mono createAsync(String containerName, String blob, long contentLen
return createWithResponseAsync(containerName, blob, contentLength, timeout, metadata, leaseId, ifModifiedSince,
ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, requestId, blobTagsString, immutabilityPolicyExpiry,
immutabilityPolicyMode, legalHold, blobHttpHeaders, cpkInfo, encryptionScopeParam)
+ .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException)
.flatMap(ignored -> Mono.empty());
}
/**
* The Create Append Blob operation creates a new append blob.
- *
+ *
* @param containerName The container name.
* @param blob The blob name.
* @param contentLength The length of the request.
@@ -623,12 +629,13 @@ public Mono createAsync(String containerName, String blob, long contentLen
return createWithResponseAsync(containerName, blob, contentLength, timeout, metadata, leaseId, ifModifiedSince,
ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, requestId, blobTagsString, immutabilityPolicyExpiry,
immutabilityPolicyMode, legalHold, blobHttpHeaders, cpkInfo, encryptionScopeParam, context)
+ .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException)
.flatMap(ignored -> Mono.empty());
}
/**
* The Create Append Blob operation creates a new append blob.
- *
+ *
* @param containerName The container name.
* @param blob The blob name.
* @param contentLength The length of the request.
@@ -729,17 +736,19 @@ public Mono> createNoCustomHeadersWithResponseAsync(String contai
= ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince);
DateTimeRfc1123 immutabilityPolicyExpiryConverted
= immutabilityPolicyExpiry == null ? null : new DateTimeRfc1123(immutabilityPolicyExpiry);
- return FluxUtil.withContext(context -> service.createNoCustomHeaders(this.client.getUrl(), containerName, blob,
- blobType, timeout, contentLength, contentType, contentEncoding, contentLanguage, contentMd5Converted,
- cacheControl, metadata, leaseId, contentDisposition, encryptionKey, encryptionKeySha256,
- encryptionAlgorithm, encryptionScope, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch,
- ifNoneMatch, ifTags, this.client.getVersion(), requestId, blobTagsString, immutabilityPolicyExpiryConverted,
- immutabilityPolicyMode, legalHold, accept, context));
+ return FluxUtil
+ .withContext(context -> service.createNoCustomHeaders(this.client.getUrl(), containerName, blob, blobType,
+ timeout, contentLength, contentType, contentEncoding, contentLanguage, contentMd5Converted,
+ cacheControl, metadata, leaseId, contentDisposition, encryptionKey, encryptionKeySha256,
+ encryptionAlgorithm, encryptionScope, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch,
+ ifNoneMatch, ifTags, this.client.getVersion(), requestId, blobTagsString,
+ immutabilityPolicyExpiryConverted, immutabilityPolicyMode, legalHold, accept, context))
+ .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException);
}
/**
* The Create Append Blob operation creates a new append blob.
- *
+ *
* @param containerName The container name.
* @param blob The blob name.
* @param contentLength The length of the request.
@@ -841,19 +850,21 @@ public Mono> createNoCustomHeadersWithResponseAsync(String contai
= ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince);
DateTimeRfc1123 immutabilityPolicyExpiryConverted
= immutabilityPolicyExpiry == null ? null : new DateTimeRfc1123(immutabilityPolicyExpiry);
- return service.createNoCustomHeaders(this.client.getUrl(), containerName, blob, blobType, timeout,
- contentLength, contentType, contentEncoding, contentLanguage, contentMd5Converted, cacheControl, metadata,
- leaseId, contentDisposition, encryptionKey, encryptionKeySha256, encryptionAlgorithm, encryptionScope,
- ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags,
- this.client.getVersion(), requestId, blobTagsString, immutabilityPolicyExpiryConverted,
- immutabilityPolicyMode, legalHold, accept, context);
+ return service
+ .createNoCustomHeaders(this.client.getUrl(), containerName, blob, blobType, timeout, contentLength,
+ contentType, contentEncoding, contentLanguage, contentMd5Converted, cacheControl, metadata, leaseId,
+ contentDisposition, encryptionKey, encryptionKeySha256, encryptionAlgorithm, encryptionScope,
+ ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags,
+ this.client.getVersion(), requestId, blobTagsString, immutabilityPolicyExpiryConverted,
+ immutabilityPolicyMode, legalHold, accept, context)
+ .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException);
}
/**
* The 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.
@@ -922,18 +933,20 @@ public Mono> appendBlockWithRe
= ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince);
DateTimeRfc1123 ifUnmodifiedSinceConverted
= ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince);
- return FluxUtil.withContext(context -> service.appendBlock(this.client.getUrl(), containerName, blob, comp,
- timeout, contentLength, transactionalContentMD5Converted, transactionalContentCrc64Converted, leaseId,
- maxSize, appendPosition, encryptionKey, encryptionKeySha256, encryptionAlgorithm, encryptionScope,
- ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags,
- this.client.getVersion(), requestId, body, accept, context));
+ return FluxUtil
+ .withContext(context -> service.appendBlock(this.client.getUrl(), containerName, blob, comp, timeout,
+ contentLength, transactionalContentMD5Converted, transactionalContentCrc64Converted, leaseId, maxSize,
+ appendPosition, encryptionKey, encryptionKeySha256, encryptionAlgorithm, encryptionScope,
+ ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags,
+ this.client.getVersion(), requestId, body, accept, context))
+ .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException);
}
/**
* The Append Block operation commits a new block of data to the end of an existing append blob. The Append Block
* operation is permitted only if the blob was created with x-ms-blob-type set to AppendBlob. Append Block is
* supported only on version 2015-02-21 version or later.
- *
+ *
* @param containerName The container name.
* @param blob The blob name.
* @param contentLength The length of the request.
@@ -1003,18 +1016,20 @@ public Mono> appendBlockWithRe
= ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince);
DateTimeRfc1123 ifUnmodifiedSinceConverted
= ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince);
- return service.appendBlock(this.client.getUrl(), containerName, blob, comp, timeout, contentLength,
- transactionalContentMD5Converted, transactionalContentCrc64Converted, leaseId, maxSize, appendPosition,
- encryptionKey, encryptionKeySha256, encryptionAlgorithm, encryptionScope, ifModifiedSinceConverted,
- ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, this.client.getVersion(), requestId, body, accept,
- context);
+ return service
+ .appendBlock(this.client.getUrl(), containerName, blob, comp, timeout, contentLength,
+ transactionalContentMD5Converted, transactionalContentCrc64Converted, leaseId, maxSize, appendPosition,
+ encryptionKey, encryptionKeySha256, encryptionAlgorithm, encryptionScope, ifModifiedSinceConverted,
+ ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, this.client.getVersion(), requestId, body,
+ accept, context)
+ .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException);
}
/**
* The Append Block operation commits a new block of data to the end of an existing append blob. The Append Block
* operation is permitted only if the blob was created with x-ms-blob-type set to AppendBlob. Append Block is
* supported only on version 2015-02-21 version or later.
- *
+ *
* @param containerName The container name.
* @param blob The blob name.
* @param contentLength The length of the request.
@@ -1056,14 +1071,16 @@ public Mono appendBlockAsync(String containerName, String blob, long conte
String ifNoneMatch, String ifTags, String requestId, CpkInfo cpkInfo, EncryptionScope encryptionScopeParam) {
return appendBlockWithResponseAsync(containerName, blob, contentLength, body, timeout, transactionalContentMD5,
transactionalContentCrc64, leaseId, maxSize, appendPosition, ifModifiedSince, ifUnmodifiedSince, ifMatch,
- ifNoneMatch, ifTags, requestId, cpkInfo, encryptionScopeParam).flatMap(ignored -> Mono.empty());
+ ifNoneMatch, ifTags, requestId, cpkInfo, encryptionScopeParam)
+ .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException)
+ .flatMap(ignored -> Mono.empty());
}
/**
* The Append Block operation commits a new block of data to the end of an existing append blob. The Append Block
* operation is permitted only if the blob was created with x-ms-blob-type set to AppendBlob. Append Block is
* supported only on version 2015-02-21 version or later.
- *
+ *
* @param containerName The container name.
* @param blob The blob name.
* @param contentLength The length of the request.
@@ -1107,14 +1124,16 @@ public Mono appendBlockAsync(String containerName, String blob, long conte
Context context) {
return appendBlockWithResponseAsync(containerName, blob, contentLength, body, timeout, transactionalContentMD5,
transactionalContentCrc64, leaseId, maxSize, appendPosition, ifModifiedSince, ifUnmodifiedSince, ifMatch,
- ifNoneMatch, ifTags, requestId, cpkInfo, encryptionScopeParam, context).flatMap(ignored -> Mono.empty());
+ ifNoneMatch, ifTags, requestId, cpkInfo, encryptionScopeParam, context)
+ .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException)
+ .flatMap(ignored -> Mono.empty());
}
/**
* The Append Block operation commits a new block of data to the end of an existing append blob. The Append Block
* operation is permitted only if the blob was created with x-ms-blob-type set to AppendBlob. Append Block is
* supported only on version 2015-02-21 version or later.
- *
+ *
* @param containerName The container name.
* @param blob The blob name.
* @param contentLength The length of the request.
@@ -1183,18 +1202,20 @@ public Mono> appendBlockNoCustomHeadersWithResponseAsync(String c
= ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince);
DateTimeRfc1123 ifUnmodifiedSinceConverted
= ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince);
- return FluxUtil.withContext(context -> service.appendBlockNoCustomHeaders(this.client.getUrl(), containerName,
- blob, comp, timeout, contentLength, transactionalContentMD5Converted, transactionalContentCrc64Converted,
- leaseId, maxSize, appendPosition, encryptionKey, encryptionKeySha256, encryptionAlgorithm, encryptionScope,
- ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags,
- this.client.getVersion(), requestId, body, accept, context));
+ return FluxUtil
+ .withContext(context -> service.appendBlockNoCustomHeaders(this.client.getUrl(), containerName, blob, comp,
+ timeout, contentLength, transactionalContentMD5Converted, transactionalContentCrc64Converted, leaseId,
+ maxSize, appendPosition, encryptionKey, encryptionKeySha256, encryptionAlgorithm, encryptionScope,
+ ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags,
+ this.client.getVersion(), requestId, body, accept, context))
+ .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException);
}
/**
* The Append Block operation commits a new block of data to the end of an existing append blob. The Append Block
* operation is permitted only if the blob was created with x-ms-blob-type set to AppendBlob. Append Block is
* supported only on version 2015-02-21 version or later.
- *
+ *
* @param containerName The container name.
* @param blob The blob name.
* @param contentLength The length of the request.
@@ -1264,18 +1285,20 @@ public Mono> appendBlockNoCustomHeadersWithResponseAsync(String c
= ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince);
DateTimeRfc1123 ifUnmodifiedSinceConverted
= ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince);
- return service.appendBlockNoCustomHeaders(this.client.getUrl(), containerName, blob, comp, timeout,
- contentLength, transactionalContentMD5Converted, transactionalContentCrc64Converted, leaseId, maxSize,
- appendPosition, encryptionKey, encryptionKeySha256, encryptionAlgorithm, encryptionScope,
- ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags,
- this.client.getVersion(), requestId, body, accept, context);
+ return service
+ .appendBlockNoCustomHeaders(this.client.getUrl(), containerName, blob, comp, timeout, contentLength,
+ transactionalContentMD5Converted, transactionalContentCrc64Converted, leaseId, maxSize, appendPosition,
+ encryptionKey, encryptionKeySha256, encryptionAlgorithm, encryptionScope, ifModifiedSinceConverted,
+ ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, this.client.getVersion(), requestId, body,
+ accept, context)
+ .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException);
}
/**
* The Append Block operation commits a new block of data to the end of an existing append blob. The Append Block
* operation is permitted only if the blob was created with x-ms-blob-type set to AppendBlob. Append Block is
* supported only on version 2015-02-21 version or later.
- *
+ *
* @param containerName The container name.
* @param blob The blob name.
* @param contentLength The length of the request.
@@ -1344,18 +1367,20 @@ public Mono> appendBlockWithRe
= ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince);
DateTimeRfc1123 ifUnmodifiedSinceConverted
= ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince);
- return FluxUtil.withContext(context -> service.appendBlock(this.client.getUrl(), containerName, blob, comp,
- timeout, contentLength, transactionalContentMD5Converted, transactionalContentCrc64Converted, leaseId,
- maxSize, appendPosition, encryptionKey, encryptionKeySha256, encryptionAlgorithm, encryptionScope,
- ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags,
- this.client.getVersion(), requestId, body, accept, context));
+ return FluxUtil
+ .withContext(context -> service.appendBlock(this.client.getUrl(), containerName, blob, comp, timeout,
+ contentLength, transactionalContentMD5Converted, transactionalContentCrc64Converted, leaseId, maxSize,
+ appendPosition, encryptionKey, encryptionKeySha256, encryptionAlgorithm, encryptionScope,
+ ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags,
+ this.client.getVersion(), requestId, body, accept, context))
+ .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException);
}
/**
* The Append Block operation commits a new block of data to the end of an existing append blob. The Append Block
* operation is permitted only if the blob was created with x-ms-blob-type set to AppendBlob. Append Block is
* supported only on version 2015-02-21 version or later.
- *
+ *
* @param containerName The container name.
* @param blob The blob name.
* @param contentLength The length of the request.
@@ -1425,18 +1450,20 @@ public Mono> appendBlockWithRe
= ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince);
DateTimeRfc1123 ifUnmodifiedSinceConverted
= ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince);
- return service.appendBlock(this.client.getUrl(), containerName, blob, comp, timeout, contentLength,
- transactionalContentMD5Converted, transactionalContentCrc64Converted, leaseId, maxSize, appendPosition,
- encryptionKey, encryptionKeySha256, encryptionAlgorithm, encryptionScope, ifModifiedSinceConverted,
- ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, this.client.getVersion(), requestId, body, accept,
- context);
+ return service
+ .appendBlock(this.client.getUrl(), containerName, blob, comp, timeout, contentLength,
+ transactionalContentMD5Converted, transactionalContentCrc64Converted, leaseId, maxSize, appendPosition,
+ encryptionKey, encryptionKeySha256, encryptionAlgorithm, encryptionScope, ifModifiedSinceConverted,
+ ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, this.client.getVersion(), requestId, body,
+ accept, context)
+ .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException);
}
/**
* The Append Block operation commits a new block of data to the end of an existing append blob. The Append Block
* operation is permitted only if the blob was created with x-ms-blob-type set to AppendBlob. Append Block is
* supported only on version 2015-02-21 version or later.
- *
+ *
* @param containerName The container name.
* @param blob The blob name.
* @param contentLength The length of the request.
@@ -1478,14 +1505,16 @@ public Mono appendBlockAsync(String containerName, String blob, long conte
String ifNoneMatch, String ifTags, String requestId, CpkInfo cpkInfo, EncryptionScope encryptionScopeParam) {
return appendBlockWithResponseAsync(containerName, blob, contentLength, body, timeout, transactionalContentMD5,
transactionalContentCrc64, leaseId, maxSize, appendPosition, ifModifiedSince, ifUnmodifiedSince, ifMatch,
- ifNoneMatch, ifTags, requestId, cpkInfo, encryptionScopeParam).flatMap(ignored -> Mono.empty());
+ ifNoneMatch, ifTags, requestId, cpkInfo, encryptionScopeParam)
+ .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException)
+ .flatMap(ignored -> Mono.empty());
}
/**
* The Append Block operation commits a new block of data to the end of an existing append blob. The Append Block
* operation is permitted only if the blob was created with x-ms-blob-type set to AppendBlob. Append Block is
* supported only on version 2015-02-21 version or later.
- *
+ *
* @param containerName The container name.
* @param blob The blob name.
* @param contentLength The length of the request.
@@ -1529,14 +1558,16 @@ public Mono appendBlockAsync(String containerName, String blob, long conte
Context context) {
return appendBlockWithResponseAsync(containerName, blob, contentLength, body, timeout, transactionalContentMD5,
transactionalContentCrc64, leaseId, maxSize, appendPosition, ifModifiedSince, ifUnmodifiedSince, ifMatch,
- ifNoneMatch, ifTags, requestId, cpkInfo, encryptionScopeParam, context).flatMap(ignored -> Mono.empty());
+ ifNoneMatch, ifTags, requestId, cpkInfo, encryptionScopeParam, context)
+ .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException)
+ .flatMap(ignored -> Mono.empty());
}
/**
* The Append Block operation commits a new block of data to the end of an existing append blob. The Append Block
* operation is permitted only if the blob was created with x-ms-blob-type set to AppendBlob. Append Block is
* supported only on version 2015-02-21 version or later.
- *
+ *
* @param containerName The container name.
* @param blob The blob name.
* @param contentLength The length of the request.
@@ -1605,18 +1636,20 @@ public Mono> appendBlockNoCustomHeadersWithResponseAsync(String c
= ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince);
DateTimeRfc1123 ifUnmodifiedSinceConverted
= ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince);
- return FluxUtil.withContext(context -> service.appendBlockNoCustomHeaders(this.client.getUrl(), containerName,
- blob, comp, timeout, contentLength, transactionalContentMD5Converted, transactionalContentCrc64Converted,
- leaseId, maxSize, appendPosition, encryptionKey, encryptionKeySha256, encryptionAlgorithm, encryptionScope,
- ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags,
- this.client.getVersion(), requestId, body, accept, context));
+ return FluxUtil
+ .withContext(context -> service.appendBlockNoCustomHeaders(this.client.getUrl(), containerName, blob, comp,
+ timeout, contentLength, transactionalContentMD5Converted, transactionalContentCrc64Converted, leaseId,
+ maxSize, appendPosition, encryptionKey, encryptionKeySha256, encryptionAlgorithm, encryptionScope,
+ ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags,
+ this.client.getVersion(), requestId, body, accept, context))
+ .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException);
}
/**
* The Append Block operation commits a new block of data to the end of an existing append blob. The Append Block
* operation is permitted only if the blob was created with x-ms-blob-type set to AppendBlob. Append Block is
* supported only on version 2015-02-21 version or later.
- *
+ *
* @param containerName The container name.
* @param blob The blob name.
* @param contentLength The length of the request.
@@ -1686,18 +1719,20 @@ public Mono> appendBlockNoCustomHeadersWithResponseAsync(String c
= ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince);
DateTimeRfc1123 ifUnmodifiedSinceConverted
= ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince);
- return service.appendBlockNoCustomHeaders(this.client.getUrl(), containerName, blob, comp, timeout,
- contentLength, transactionalContentMD5Converted, transactionalContentCrc64Converted, leaseId, maxSize,
- appendPosition, encryptionKey, encryptionKeySha256, encryptionAlgorithm, encryptionScope,
- ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags,
- this.client.getVersion(), requestId, body, accept, context);
+ return service
+ .appendBlockNoCustomHeaders(this.client.getUrl(), containerName, blob, comp, timeout, contentLength,
+ transactionalContentMD5Converted, transactionalContentCrc64Converted, leaseId, maxSize, appendPosition,
+ encryptionKey, encryptionKeySha256, encryptionAlgorithm, encryptionScope, ifModifiedSinceConverted,
+ ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, this.client.getVersion(), requestId, body,
+ accept, context)
+ .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException);
}
/**
* The Append Block operation commits a new block of data to the end of an existing append blob where the contents
* are read from a source url. The Append Block operation is permitted only if the blob was created with
* x-ms-blob-type set to AppendBlob. Append Block is supported only on version 2015-02-21 version or later.
- *
+ *
* @param containerName The container name.
* @param blob The blob name.
* @param sourceUrl Specify a URL to the copy source.
@@ -1791,14 +1826,14 @@ public Mono> appendBloc
encryptionScope, leaseId, maxSize, appendPosition, ifModifiedSinceConverted, ifUnmodifiedSinceConverted,
ifMatch, ifNoneMatch, ifTags, sourceIfModifiedSinceConverted, sourceIfUnmodifiedSinceConverted,
sourceIfMatch, sourceIfNoneMatch, this.client.getVersion(), requestId, copySourceAuthorization, accept,
- context));
+ context)).onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException);
}
/**
* The Append Block operation commits a new block of data to the end of an existing append blob where the contents
* are read from a source url. The Append Block operation is permitted only if the blob was created with
* x-ms-blob-type set to AppendBlob. Append Block is supported only on version 2015-02-21 version or later.
- *
+ *
* @param containerName The container name.
* @param blob The blob name.
* @param sourceUrl Specify a URL to the copy source.
@@ -1892,14 +1927,15 @@ public Mono> appendBloc
transactionalContentMD5Converted, encryptionKey, encryptionKeySha256, encryptionAlgorithm, encryptionScope,
leaseId, maxSize, appendPosition, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch,
ifNoneMatch, ifTags, sourceIfModifiedSinceConverted, sourceIfUnmodifiedSinceConverted, sourceIfMatch,
- sourceIfNoneMatch, this.client.getVersion(), requestId, copySourceAuthorization, accept, context);
+ sourceIfNoneMatch, this.client.getVersion(), requestId, copySourceAuthorization, accept, context)
+ .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException);
}
/**
* The Append Block operation commits a new block of data to the end of an existing append blob where the contents
* are read from a source url. The Append Block operation is permitted only if the blob was created with
* x-ms-blob-type set to AppendBlob. Append Block is supported only on version 2015-02-21 version or later.
- *
+ *
* @param containerName The container name.
* @param blob The blob name.
* @param sourceUrl Specify a URL to the copy source.
@@ -1957,14 +1993,15 @@ public Mono appendBlockFromUrlAsync(String containerName, String blob, Str
sourceContentMD5, sourceContentcrc64, timeout, transactionalContentMD5, leaseId, maxSize, appendPosition,
ifModifiedSince, ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, sourceIfModifiedSince,
sourceIfUnmodifiedSince, sourceIfMatch, sourceIfNoneMatch, requestId, copySourceAuthorization, cpkInfo,
- encryptionScopeParam).flatMap(ignored -> Mono.empty());
+ encryptionScopeParam).onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException)
+ .flatMap(ignored -> Mono.empty());
}
/**
* The Append Block operation commits a new block of data to the end of an existing append blob where the contents
* are read from a source url. The Append Block operation is permitted only if the blob was created with
* x-ms-blob-type set to AppendBlob. Append Block is supported only on version 2015-02-21 version or later.
- *
+ *
* @param containerName The container name.
* @param blob The blob name.
* @param sourceUrl Specify a URL to the copy source.
@@ -2023,14 +2060,16 @@ public Mono appendBlockFromUrlAsync(String containerName, String blob, Str
sourceContentMD5, sourceContentcrc64, timeout, transactionalContentMD5, leaseId, maxSize, appendPosition,
ifModifiedSince, ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, sourceIfModifiedSince,
sourceIfUnmodifiedSince, sourceIfMatch, sourceIfNoneMatch, requestId, copySourceAuthorization, cpkInfo,
- encryptionScopeParam, context).flatMap(ignored -> Mono.empty());
+ encryptionScopeParam, context)
+ .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException)
+ .flatMap(ignored -> Mono.empty());
}
/**
* The Append Block operation commits a new block of data to the end of an existing append blob where the contents
* are read from a source url. The Append Block operation is permitted only if the blob was created with
* x-ms-blob-type set to AppendBlob. Append Block is supported only on version 2015-02-21 version or later.
- *
+ *
* @param containerName The container name.
* @param blob The blob name.
* @param sourceUrl Specify a URL to the copy source.
@@ -2117,20 +2156,22 @@ public Mono> appendBlockFromUrlNoCustomHeadersWithResponseAsync(S
= sourceIfModifiedSince == null ? null : new DateTimeRfc1123(sourceIfModifiedSince);
DateTimeRfc1123 sourceIfUnmodifiedSinceConverted
= sourceIfUnmodifiedSince == null ? null : new DateTimeRfc1123(sourceIfUnmodifiedSince);
- return FluxUtil.withContext(context -> service.appendBlockFromUrlNoCustomHeaders(this.client.getUrl(),
- containerName, blob, comp, sourceUrl, sourceRange, sourceContentMD5Converted, sourceContentcrc64Converted,
- timeout, contentLength, transactionalContentMD5Converted, encryptionKey, encryptionKeySha256,
- encryptionAlgorithm, encryptionScope, leaseId, maxSize, appendPosition, ifModifiedSinceConverted,
- ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, sourceIfModifiedSinceConverted,
- sourceIfUnmodifiedSinceConverted, sourceIfMatch, sourceIfNoneMatch, this.client.getVersion(), requestId,
- copySourceAuthorization, accept, context));
+ return FluxUtil
+ .withContext(context -> service.appendBlockFromUrlNoCustomHeaders(this.client.getUrl(), containerName, blob,
+ comp, sourceUrl, sourceRange, sourceContentMD5Converted, sourceContentcrc64Converted, timeout,
+ contentLength, transactionalContentMD5Converted, encryptionKey, encryptionKeySha256,
+ encryptionAlgorithm, encryptionScope, leaseId, maxSize, appendPosition, ifModifiedSinceConverted,
+ ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, sourceIfModifiedSinceConverted,
+ sourceIfUnmodifiedSinceConverted, sourceIfMatch, sourceIfNoneMatch, this.client.getVersion(), requestId,
+ copySourceAuthorization, accept, context))
+ .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException);
}
/**
* The Append Block operation commits a new block of data to the end of an existing append blob where the contents
* are read from a source url. The Append Block operation is permitted only if the blob was created with
* x-ms-blob-type set to AppendBlob. Append Block is supported only on version 2015-02-21 version or later.
- *
+ *
* @param containerName The container name.
* @param blob The blob name.
* @param sourceUrl Specify a URL to the copy source.
@@ -2223,13 +2264,14 @@ public Mono> appendBlockFromUrlNoCustomHeadersWithResponseAsync(S
transactionalContentMD5Converted, encryptionKey, encryptionKeySha256, encryptionAlgorithm, encryptionScope,
leaseId, maxSize, appendPosition, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch,
ifNoneMatch, ifTags, sourceIfModifiedSinceConverted, sourceIfUnmodifiedSinceConverted, sourceIfMatch,
- sourceIfNoneMatch, this.client.getVersion(), requestId, copySourceAuthorization, accept, context);
+ sourceIfNoneMatch, this.client.getVersion(), requestId, copySourceAuthorization, accept, context)
+ .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException);
}
/**
* The Seal operation seals the Append Blob to make it read-only. Seal is supported only on version 2019-12-12
* version or later.
- *
+ *
* @param containerName The container name.
* @param blob The blob name.
* @param timeout The timeout parameter is expressed in seconds. For more information, see <a
@@ -2263,15 +2305,17 @@ public Mono> sealWithResponseAsync(St
= ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince);
DateTimeRfc1123 ifUnmodifiedSinceConverted
= ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince);
- return FluxUtil.withContext(context -> service.seal(this.client.getUrl(), containerName, blob, comp, timeout,
- this.client.getVersion(), requestId, leaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch,
- ifNoneMatch, appendPosition, accept, context));
+ return FluxUtil
+ .withContext(context -> service.seal(this.client.getUrl(), containerName, blob, comp, timeout,
+ this.client.getVersion(), requestId, leaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted,
+ ifMatch, ifNoneMatch, appendPosition, accept, context))
+ .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException);
}
/**
* The Seal operation seals the Append Blob to make it read-only. Seal is supported only on version 2019-12-12
* version or later.
- *
+ *
* @param containerName The container name.
* @param blob The blob name.
* @param timeout The timeout parameter is expressed in seconds. For more information, see <a
@@ -2306,15 +2350,17 @@ public Mono> sealWithResponseAsync(St
= ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince);
DateTimeRfc1123 ifUnmodifiedSinceConverted
= ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince);
- return service.seal(this.client.getUrl(), containerName, blob, comp, timeout, this.client.getVersion(),
- requestId, leaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch,
- appendPosition, accept, context);
+ return service
+ .seal(this.client.getUrl(), containerName, blob, comp, timeout, this.client.getVersion(), requestId,
+ leaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, appendPosition,
+ accept, context)
+ .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException);
}
/**
* The Seal operation seals the Append Blob to make it read-only. Seal is supported only on version 2019-12-12
* version or later.
- *
+ *
* @param containerName The container name.
* @param blob The blob name.
* @param timeout The timeout parameter is expressed in seconds. For more information, see <a
@@ -2343,13 +2389,15 @@ public Mono sealAsync(String containerName, String blob, Integer timeout,
OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch,
Long appendPosition) {
return sealWithResponseAsync(containerName, blob, timeout, requestId, leaseId, ifModifiedSince,
- ifUnmodifiedSince, ifMatch, ifNoneMatch, appendPosition).flatMap(ignored -> Mono.empty());
+ ifUnmodifiedSince, ifMatch, ifNoneMatch, appendPosition)
+ .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException)
+ .flatMap(ignored -> Mono.empty());
}
/**
* The Seal operation seals the Append Blob to make it read-only. Seal is supported only on version 2019-12-12
* version or later.
- *
+ *
* @param containerName The container name.
* @param blob The blob name.
* @param timeout The timeout parameter is expressed in seconds. For more information, see <a
@@ -2379,13 +2427,15 @@ public Mono sealAsync(String containerName, String blob, Integer timeout,
OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch,
Long appendPosition, Context context) {
return sealWithResponseAsync(containerName, blob, timeout, requestId, leaseId, ifModifiedSince,
- ifUnmodifiedSince, ifMatch, ifNoneMatch, appendPosition, context).flatMap(ignored -> Mono.empty());
+ ifUnmodifiedSince, ifMatch, ifNoneMatch, appendPosition, context)
+ .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException)
+ .flatMap(ignored -> Mono.empty());
}
/**
* The Seal operation seals the Append Blob to make it read-only. Seal is supported only on version 2019-12-12
* version or later.
- *
+ *
* @param containerName The container name.
* @param blob The blob name.
* @param timeout The timeout parameter is expressed in seconds. For more information, see <a
@@ -2419,15 +2469,17 @@ public Mono> sealNoCustomHeadersWithResponseAsync(String containe
= ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince);
DateTimeRfc1123 ifUnmodifiedSinceConverted
= ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince);
- return FluxUtil.withContext(context -> service.sealNoCustomHeaders(this.client.getUrl(), containerName, blob,
- comp, timeout, this.client.getVersion(), requestId, leaseId, ifModifiedSinceConverted,
- ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, appendPosition, accept, context));
+ return FluxUtil
+ .withContext(context -> service.sealNoCustomHeaders(this.client.getUrl(), containerName, blob, comp,
+ timeout, this.client.getVersion(), requestId, leaseId, ifModifiedSinceConverted,
+ ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, appendPosition, accept, context))
+ .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException);
}
/**
* The Seal operation seals the Append Blob to make it read-only. Seal is supported only on version 2019-12-12
* version or later.
- *
+ *
* @param containerName The container name.
* @param blob The blob name.
* @param timeout The timeout parameter is expressed in seconds. For more information, see <a
@@ -2462,8 +2514,10 @@ public Mono> sealNoCustomHeadersWithResponseAsync(String containe
= ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince);
DateTimeRfc1123 ifUnmodifiedSinceConverted
= ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince);
- return service.sealNoCustomHeaders(this.client.getUrl(), containerName, blob, comp, timeout,
- this.client.getVersion(), requestId, leaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch,
- ifNoneMatch, appendPosition, accept, context);
+ return service
+ .sealNoCustomHeaders(this.client.getUrl(), containerName, blob, comp, timeout, this.client.getVersion(),
+ requestId, leaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch,
+ appendPosition, accept, context)
+ .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException);
}
}
diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/BlobsImpl.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/BlobsImpl.java
index a486f7542d11..c5770824b839 100644
--- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/BlobsImpl.java
+++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/BlobsImpl.java
@@ -1,7 +1,6 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// Code generated by Microsoft (R) AutoRest Code Generator.
-
package com.azure.storage.blob.implementation;
import com.azure.core.annotation.BodyParam;
@@ -71,11 +70,13 @@
import java.util.Map;
import reactor.core.publisher.Flux;
import reactor.core.publisher.Mono;
+import com.azure.storage.blob.implementation.util.ModelHelper;
/**
* 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.
*/
@@ -88,7 +89,7 @@ public final class BlobsImpl {
/**
* Initializes an instance of BlobsImpl.
- *
+ *
* @param client the instance of the service client containing this operation class.
*/
BlobsImpl(AzureBlobStorageImpl client) {
@@ -103,6 +104,7 @@ public final class BlobsImpl {
@Host("{url}")
@ServiceInterface(name = "AzureBlobStorageBlob")
public interface BlobsService {
+
@Get("/{containerName}/{blob}")
@ExpectedResponses({ 200, 206 })
@UnexpectedResponseExceptionType(BlobStorageExceptionInternal.class)
@@ -817,7 +819,7 @@ Mono> setTagsNoCustomHeaders(@HostParam("url") String url,
/**
* The Download operation reads or downloads a blob from the system, including its metadata and properties. You can
* also call Download to read a snapshot or version.
- *
+ *
* @param containerName The container name.
* @param blob The blob name.
* @param snapshot The snapshot parameter is an opaque DateTime value that, when present, specifies the blob
@@ -876,16 +878,18 @@ public Mono>> downloadWithRe
= ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince);
DateTimeRfc1123 ifUnmodifiedSinceConverted
= ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince);
- return FluxUtil.withContext(context -> service.download(this.client.getUrl(), containerName, blob, snapshot,
- versionId, timeout, range, leaseId, rangeGetContentMD5, rangeGetContentCRC64, encryptionKey,
- encryptionKeySha256, encryptionAlgorithm, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch,
- ifNoneMatch, ifTags, this.client.getVersion(), requestId, accept, context));
+ return FluxUtil
+ .withContext(context -> service.download(this.client.getUrl(), containerName, blob, snapshot, versionId,
+ timeout, range, leaseId, rangeGetContentMD5, rangeGetContentCRC64, encryptionKey, encryptionKeySha256,
+ encryptionAlgorithm, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags,
+ this.client.getVersion(), requestId, accept, context))
+ .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException);
}
/**
* The Download operation reads or downloads a blob from the system, including its metadata and properties. You can
* also call Download to read a snapshot or version.
- *
+ *
* @param containerName The container name.
* @param blob The blob name.
* @param snapshot The snapshot parameter is an opaque DateTime value that, when present, specifies the blob
@@ -945,16 +949,18 @@ public Mono>> downloadWithRe
= ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince);
DateTimeRfc1123 ifUnmodifiedSinceConverted
= ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince);
- return service.download(this.client.getUrl(), containerName, blob, snapshot, versionId, timeout, range, leaseId,
- rangeGetContentMD5, rangeGetContentCRC64, encryptionKey, encryptionKeySha256, encryptionAlgorithm,
- ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags,
- this.client.getVersion(), requestId, accept, context);
+ return service
+ .download(this.client.getUrl(), containerName, blob, snapshot, versionId, timeout, range, leaseId,
+ rangeGetContentMD5, rangeGetContentCRC64, encryptionKey, encryptionKeySha256, encryptionAlgorithm,
+ ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags,
+ this.client.getVersion(), requestId, accept, context)
+ .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException);
}
/**
* The Download operation reads or downloads a blob from the system, including its metadata and properties. You can
* also call Download to read a snapshot or version.
- *
+ *
* @param containerName The container name.
* @param blob The blob name.
* @param snapshot The snapshot parameter is an opaque DateTime value that, when present, specifies the blob
@@ -994,13 +1000,14 @@ public Flux downloadAsync(String containerName, String blob, String
String ifTags, String requestId, CpkInfo cpkInfo) {
return downloadWithResponseAsync(containerName, blob, snapshot, versionId, timeout, range, leaseId,
rangeGetContentMD5, rangeGetContentCRC64, ifModifiedSince, ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags,
- requestId, cpkInfo).flatMapMany(fluxByteBufferResponse -> fluxByteBufferResponse.getValue());
+ requestId, cpkInfo).onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException)
+ .flatMapMany(fluxByteBufferResponse -> fluxByteBufferResponse.getValue());
}
/**
* The Download operation reads or downloads a blob from the system, including its metadata and properties. You can
* also call Download to read a snapshot or version.
- *
+ *
* @param containerName The container name.
* @param blob The blob name.
* @param snapshot The snapshot parameter is an opaque DateTime value that, when present, specifies the blob
@@ -1041,13 +1048,15 @@ public Flux downloadAsync(String containerName, String blob, String
String ifTags, String requestId, CpkInfo cpkInfo, Context context) {
return downloadWithResponseAsync(containerName, blob, snapshot, versionId, timeout, range, leaseId,
rangeGetContentMD5, rangeGetContentCRC64, ifModifiedSince, ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags,
- requestId, cpkInfo, context).flatMapMany(fluxByteBufferResponse -> fluxByteBufferResponse.getValue());
+ requestId, cpkInfo, context)
+ .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException)
+ .flatMapMany(fluxByteBufferResponse -> fluxByteBufferResponse.getValue());
}
/**
* The Download operation reads or downloads a blob from the system, including its metadata and properties. You can
* also call Download to read a snapshot or version.
- *
+ *
* @param containerName The container name.
* @param blob The blob name.
* @param snapshot The snapshot parameter is an opaque DateTime value that, when present, specifies the blob
@@ -1105,16 +1114,18 @@ public Mono downloadNoCustomHeadersWithResponseAsync(String cont
= ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince);
DateTimeRfc1123 ifUnmodifiedSinceConverted
= ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince);
- return FluxUtil.withContext(context -> service.downloadNoCustomHeaders(this.client.getUrl(), containerName,
- blob, snapshot, versionId, timeout, range, leaseId, rangeGetContentMD5, rangeGetContentCRC64, encryptionKey,
- encryptionKeySha256, encryptionAlgorithm, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch,
- ifNoneMatch, ifTags, this.client.getVersion(), requestId, accept, context));
+ return FluxUtil
+ .withContext(context -> service.downloadNoCustomHeaders(this.client.getUrl(), containerName, blob, snapshot,
+ versionId, timeout, range, leaseId, rangeGetContentMD5, rangeGetContentCRC64, encryptionKey,
+ encryptionKeySha256, encryptionAlgorithm, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch,
+ ifNoneMatch, ifTags, this.client.getVersion(), requestId, accept, context))
+ .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException);
}
/**
* The Download operation reads or downloads a blob from the system, including its metadata and properties. You can
* also call Download to read a snapshot or version.
- *
+ *
* @param containerName The container name.
* @param blob The blob name.
* @param snapshot The snapshot parameter is an opaque DateTime value that, when present, specifies the blob
@@ -1173,16 +1184,18 @@ public Mono downloadNoCustomHeadersWithResponseAsync(String cont
= ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince);
DateTimeRfc1123 ifUnmodifiedSinceConverted
= ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince);
- return service.downloadNoCustomHeaders(this.client.getUrl(), containerName, blob, snapshot, versionId, timeout,
- range, leaseId, rangeGetContentMD5, rangeGetContentCRC64, encryptionKey, encryptionKeySha256,
- encryptionAlgorithm, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags,
- this.client.getVersion(), requestId, accept, context);
+ return service
+ .downloadNoCustomHeaders(this.client.getUrl(), containerName, blob, snapshot, versionId, timeout, range,
+ leaseId, rangeGetContentMD5, rangeGetContentCRC64, encryptionKey, encryptionKeySha256,
+ encryptionAlgorithm, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags,
+ this.client.getVersion(), requestId, accept, context)
+ .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException);
}
/**
* The Get Properties operation returns all user-defined metadata, standard HTTP properties, and system properties
* for the blob. It does not return the content of the blob.
- *
+ *
* @param containerName The container name.
* @param blob The blob name.
* @param snapshot The snapshot parameter is an opaque DateTime value that, when present, specifies the blob
@@ -1235,16 +1248,18 @@ public Mono> getPropertiesWithResp
= ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince);
DateTimeRfc1123 ifUnmodifiedSinceConverted
= ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince);
- return FluxUtil.withContext(context -> service.getProperties(this.client.getUrl(), containerName, blob,
- snapshot, versionId, timeout, leaseId, encryptionKey, encryptionKeySha256, encryptionAlgorithm,
- ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags,
- this.client.getVersion(), requestId, accept, context));
+ return FluxUtil
+ .withContext(context -> service.getProperties(this.client.getUrl(), containerName, blob, snapshot,
+ versionId, timeout, leaseId, encryptionKey, encryptionKeySha256, encryptionAlgorithm,
+ ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags,
+ this.client.getVersion(), requestId, accept, context))
+ .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException);
}
/**
* The Get Properties operation returns all user-defined metadata, standard HTTP properties, and system properties
* for the blob. It does not return the content of the blob.
- *
+ *
* @param containerName The container name.
* @param blob The blob name.
* @param snapshot The snapshot parameter is an opaque DateTime value that, when present, specifies the blob
@@ -1298,16 +1313,18 @@ public Mono> getPropertiesWithResp
= ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince);
DateTimeRfc1123 ifUnmodifiedSinceConverted
= ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince);
- return service.getProperties(this.client.getUrl(), containerName, blob, snapshot, versionId, timeout, leaseId,
- encryptionKey, encryptionKeySha256, encryptionAlgorithm, ifModifiedSinceConverted,
- ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, this.client.getVersion(), requestId, accept,
- context);
+ return service
+ .getProperties(this.client.getUrl(), containerName, blob, snapshot, versionId, timeout, leaseId,
+ encryptionKey, encryptionKeySha256, encryptionAlgorithm, ifModifiedSinceConverted,
+ ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, this.client.getVersion(), requestId, accept,
+ context)
+ .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException);
}
/**
* The Get Properties operation returns all user-defined metadata, standard HTTP properties, and system properties
* for the blob. It does not return the content of the blob.
- *
+ *
* @param containerName The container name.
* @param blob The blob name.
* @param snapshot The snapshot parameter is an opaque DateTime value that, when present, specifies the blob
@@ -1341,13 +1358,14 @@ public Mono getPropertiesAsync(String containerName, String blob, String s
String ifMatch, String ifNoneMatch, String ifTags, String requestId, CpkInfo cpkInfo) {
return getPropertiesWithResponseAsync(containerName, blob, snapshot, versionId, timeout, leaseId,
ifModifiedSince, ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, requestId, cpkInfo)
+ .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException)
.flatMap(ignored -> Mono.empty());
}
/**
* The Get Properties operation returns all user-defined metadata, standard HTTP properties, and system properties
* for the blob. It does not return the content of the blob.
- *
+ *
* @param containerName The container name.
* @param blob The blob name.
* @param snapshot The snapshot parameter is an opaque DateTime value that, when present, specifies the blob
@@ -1382,13 +1400,14 @@ public Mono getPropertiesAsync(String containerName, String blob, String s
String ifMatch, String ifNoneMatch, String ifTags, String requestId, CpkInfo cpkInfo, Context context) {
return getPropertiesWithResponseAsync(containerName, blob, snapshot, versionId, timeout, leaseId,
ifModifiedSince, ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, requestId, cpkInfo, context)
+ .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException)
.flatMap(ignored -> Mono.empty());
}
/**
* The Get Properties operation returns all user-defined metadata, standard HTTP properties, and system properties
* for the blob. It does not return the content of the blob.
- *
+ *
* @param containerName The container name.
* @param blob The blob name.
* @param snapshot The snapshot parameter is an opaque DateTime value that, when present, specifies the blob
@@ -1441,16 +1460,18 @@ public Mono> getPropertiesNoCustomHeadersWithResponseAsync(String
= ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince);
DateTimeRfc1123 ifUnmodifiedSinceConverted
= ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince);
- return FluxUtil.withContext(context -> service.getPropertiesNoCustomHeaders(this.client.getUrl(), containerName,
- blob, snapshot, versionId, timeout, leaseId, encryptionKey, encryptionKeySha256, encryptionAlgorithm,
- ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags,
- this.client.getVersion(), requestId, accept, context));
+ return FluxUtil
+ .withContext(context -> service.getPropertiesNoCustomHeaders(this.client.getUrl(), containerName, blob,
+ snapshot, versionId, timeout, leaseId, encryptionKey, encryptionKeySha256, encryptionAlgorithm,
+ ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags,
+ this.client.getVersion(), requestId, accept, context))
+ .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException);
}
/**
* The Get Properties operation returns all user-defined metadata, standard HTTP properties, and system properties
* for the blob. It does not return the content of the blob.
- *
+ *
* @param containerName The container name.
* @param blob The blob name.
* @param snapshot The snapshot parameter is an opaque DateTime value that, when present, specifies the blob
@@ -1504,10 +1525,12 @@ public Mono> getPropertiesNoCustomHeadersWithResponseAsync(String
= ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince);
DateTimeRfc1123 ifUnmodifiedSinceConverted
= ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince);
- return service.getPropertiesNoCustomHeaders(this.client.getUrl(), containerName, blob, snapshot, versionId,
- timeout, leaseId, encryptionKey, encryptionKeySha256, encryptionAlgorithm, ifModifiedSinceConverted,
- ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, this.client.getVersion(), requestId, accept,
- context);
+ return service
+ .getPropertiesNoCustomHeaders(this.client.getUrl(), containerName, blob, snapshot, versionId, timeout,
+ leaseId, encryptionKey, encryptionKeySha256, encryptionAlgorithm, ifModifiedSinceConverted,
+ ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, this.client.getVersion(), requestId, accept,
+ context)
+ .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException);
}
/**
@@ -1526,7 +1549,7 @@ public Mono> getPropertiesNoCustomHeadersWithResponseAsync(String
* 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
@@ -1568,9 +1591,11 @@ public Mono> deleteWithResponseAsync(Stri
= ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince);
DateTimeRfc1123 ifUnmodifiedSinceConverted
= ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince);
- return FluxUtil.withContext(context -> service.delete(this.client.getUrl(), containerName, blob, snapshot,
- versionId, timeout, leaseId, deleteSnapshots, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch,
- ifNoneMatch, ifTags, this.client.getVersion(), requestId, blobDeleteType, accept, context));
+ return FluxUtil
+ .withContext(context -> service.delete(this.client.getUrl(), containerName, blob, snapshot, versionId,
+ timeout, leaseId, deleteSnapshots, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch,
+ ifNoneMatch, ifTags, this.client.getVersion(), requestId, blobDeleteType, accept, context))
+ .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException);
}
/**
@@ -1589,7 +1614,7 @@ public Mono> deleteWithResponseAsync(Stri
* 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
@@ -1632,9 +1657,11 @@ public Mono> deleteWithResponseAsync(Stri
= ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince);
DateTimeRfc1123 ifUnmodifiedSinceConverted
= ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince);
- return service.delete(this.client.getUrl(), containerName, blob, snapshot, versionId, timeout, leaseId,
- deleteSnapshots, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags,
- this.client.getVersion(), requestId, blobDeleteType, accept, context);
+ return service
+ .delete(this.client.getUrl(), containerName, blob, snapshot, versionId, timeout, leaseId, deleteSnapshots,
+ ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags,
+ this.client.getVersion(), requestId, blobDeleteType, accept, context)
+ .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException);
}
/**
@@ -1653,7 +1680,7 @@ public Mono> deleteWithResponseAsync(Stri
* 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
@@ -1692,6 +1719,7 @@ public Mono deleteAsync(String containerName, String blob, String snapshot
BlobDeleteType blobDeleteType) {
return deleteWithResponseAsync(containerName, blob, snapshot, versionId, timeout, leaseId, deleteSnapshots,
ifModifiedSince, ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, requestId, blobDeleteType)
+ .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException)
.flatMap(ignored -> Mono.empty());
}
@@ -1711,7 +1739,7 @@ public Mono deleteAsync(String containerName, String blob, String snapshot
* 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
@@ -1751,6 +1779,7 @@ public Mono deleteAsync(String containerName, String blob, String snapshot
BlobDeleteType blobDeleteType, Context context) {
return deleteWithResponseAsync(containerName, blob, snapshot, versionId, timeout, leaseId, deleteSnapshots,
ifModifiedSince, ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, requestId, blobDeleteType, context)
+ .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException)
.flatMap(ignored -> Mono.empty());
}
@@ -1770,7 +1799,7 @@ public Mono deleteAsync(String containerName, String blob, String snapshot
* 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
@@ -1815,7 +1844,8 @@ public Mono> deleteNoCustomHeadersWithResponseAsync(String contai
return FluxUtil
.withContext(context -> service.deleteNoCustomHeaders(this.client.getUrl(), containerName, blob, snapshot,
versionId, timeout, leaseId, deleteSnapshots, ifModifiedSinceConverted, ifUnmodifiedSinceConverted,
- ifMatch, ifNoneMatch, ifTags, this.client.getVersion(), requestId, blobDeleteType, accept, context));
+ ifMatch, ifNoneMatch, ifTags, this.client.getVersion(), requestId, blobDeleteType, accept, context))
+ .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException);
}
/**
@@ -1834,7 +1864,7 @@ public Mono> deleteNoCustomHeadersWithResponseAsync(String contai
* automatic snapshot using snapshot timestamp or version id. You can restore the blob by calling Put or Copy Blob
* API with automatic snapshot as source. Deleting automatic snapshot requires shared key or special SAS/RBAC
* permissions.
- *
+ *
* @param containerName The container name.
* @param blob The blob name.
* @param snapshot The snapshot parameter is an opaque DateTime value that, when present, specifies the blob
@@ -1877,14 +1907,16 @@ public Mono> deleteNoCustomHeadersWithResponseAsync(String contai
= ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince);
DateTimeRfc1123 ifUnmodifiedSinceConverted
= ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince);
- return service.deleteNoCustomHeaders(this.client.getUrl(), containerName, blob, snapshot, versionId, timeout,
- leaseId, deleteSnapshots, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch,
- ifTags, this.client.getVersion(), requestId, blobDeleteType, accept, context);
+ return service
+ .deleteNoCustomHeaders(this.client.getUrl(), containerName, blob, snapshot, versionId, timeout, leaseId,
+ deleteSnapshots, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags,
+ this.client.getVersion(), requestId, blobDeleteType, accept, context)
+ .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException);
}
/**
* Undelete a blob that was previously soft deleted.
- *
+ *
* @param containerName The container name.
* @param blob The blob name.
* @param timeout The timeout parameter is expressed in seconds. For more information, see <a
@@ -1902,13 +1934,15 @@ public Mono> undeleteWithResponseAsync(
Integer timeout, String requestId) {
final String comp = "undelete";
final String accept = "application/xml";
- return FluxUtil.withContext(context -> service.undelete(this.client.getUrl(), containerName, blob, comp,
- timeout, this.client.getVersion(), requestId, accept, context));
+ return FluxUtil
+ .withContext(context -> service.undelete(this.client.getUrl(), containerName, blob, comp, timeout,
+ this.client.getVersion(), requestId, accept, context))
+ .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException);
}
/**
* Undelete a blob that was previously soft deleted.
- *
+ *
* @param containerName The container name.
* @param blob The blob name.
* @param timeout The timeout parameter is expressed in seconds. For more information, see <a
@@ -1927,13 +1961,15 @@ public Mono> undeleteWithResponseAsync(
Integer timeout, String requestId, Context context) {
final String comp = "undelete";
final String accept = "application/xml";
- return service.undelete(this.client.getUrl(), containerName, blob, comp, timeout, this.client.getVersion(),
- requestId, accept, context);
+ return service
+ .undelete(this.client.getUrl(), containerName, blob, comp, timeout, this.client.getVersion(), requestId,
+ accept, context)
+ .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException);
}
/**
* Undelete a blob that was previously soft deleted.
- *
+ *
* @param containerName The container name.
* @param blob The blob name.
* @param timeout The timeout parameter is expressed in seconds. For more information, see <a
@@ -1948,12 +1984,14 @@ public Mono> undeleteWithResponseAsync(
*/
@ServiceMethod(returns = ReturnType.SINGLE)
public Mono undeleteAsync(String containerName, String blob, Integer timeout, String requestId) {
- return undeleteWithResponseAsync(containerName, blob, timeout, requestId).flatMap(ignored -> Mono.empty());
+ return undeleteWithResponseAsync(containerName, blob, timeout, requestId)
+ .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException)
+ .flatMap(ignored -> Mono.empty());
}
/**
* Undelete a blob that was previously soft deleted.
- *
+ *
* @param containerName The container name.
* @param blob The blob name.
* @param timeout The timeout parameter is expressed in seconds. For more information, see <a
@@ -1971,12 +2009,13 @@ public Mono undeleteAsync(String containerName, String blob, Integer timeo
public Mono undeleteAsync(String containerName, String blob, Integer timeout, String requestId,
Context context) {
return undeleteWithResponseAsync(containerName, blob, timeout, requestId, context)
+ .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException)
.flatMap(ignored -> Mono.empty());
}
/**
* Undelete a blob that was previously soft deleted.
- *
+ *
* @param containerName The container name.
* @param blob The blob name.
* @param timeout The timeout parameter is expressed in seconds. For more information, see <a
@@ -1994,13 +2033,15 @@ public Mono> undeleteNoCustomHeadersWithResponseAsync(String cont
Integer timeout, String requestId) {
final String comp = "undelete";
final String accept = "application/xml";
- return FluxUtil.withContext(context -> service.undeleteNoCustomHeaders(this.client.getUrl(), containerName,
- blob, comp, timeout, this.client.getVersion(), requestId, accept, context));
+ return FluxUtil
+ .withContext(context -> service.undeleteNoCustomHeaders(this.client.getUrl(), containerName, blob, comp,
+ timeout, this.client.getVersion(), requestId, accept, context))
+ .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException);
}
/**
* Undelete a blob that was previously soft deleted.
- *
+ *
* @param containerName The container name.
* @param blob The blob name.
* @param timeout The timeout parameter is expressed in seconds. For more information, see <a
@@ -2019,13 +2060,15 @@ public Mono> undeleteNoCustomHeadersWithResponseAsync(String cont
Integer timeout, String requestId, Context context) {
final String comp = "undelete";
final String accept = "application/xml";
- return service.undeleteNoCustomHeaders(this.client.getUrl(), containerName, blob, comp, timeout,
- this.client.getVersion(), requestId, accept, context);
+ return service
+ .undeleteNoCustomHeaders(this.client.getUrl(), containerName, blob, comp, timeout, this.client.getVersion(),
+ requestId, accept, context)
+ .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException);
}
/**
* Sets the time a blob will expire and be deleted.
- *
+ *
* @param containerName The container name.
* @param blob The blob name.
* @param expiryOptions Required. Indicates mode of the expiry time.
@@ -2045,13 +2088,15 @@ public Mono> setExpiryWithResponseAsyn
BlobExpiryOptions expiryOptions, Integer timeout, String requestId, String expiresOn) {
final String comp = "expiry";
final String accept = "application/xml";
- return FluxUtil.withContext(context -> service.setExpiry(this.client.getUrl(), containerName, blob, comp,
- timeout, this.client.getVersion(), requestId, expiryOptions, expiresOn, accept, context));
+ return FluxUtil
+ .withContext(context -> service.setExpiry(this.client.getUrl(), containerName, blob, comp, timeout,
+ this.client.getVersion(), requestId, expiryOptions, expiresOn, accept, context))
+ .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException);
}
/**
* Sets the time a blob will expire and be deleted.
- *
+ *
* @param containerName The container name.
* @param blob The blob name.
* @param expiryOptions Required. Indicates mode of the expiry time.
@@ -2072,13 +2117,15 @@ public Mono> setExpiryWithResponseAsyn
BlobExpiryOptions expiryOptions, Integer timeout, String requestId, String expiresOn, Context context) {
final String comp = "expiry";
final String accept = "application/xml";
- return service.setExpiry(this.client.getUrl(), containerName, blob, comp, timeout, this.client.getVersion(),
- requestId, expiryOptions, expiresOn, accept, context);
+ return service
+ .setExpiry(this.client.getUrl(), containerName, blob, comp, timeout, this.client.getVersion(), requestId,
+ expiryOptions, expiresOn, accept, context)
+ .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException);
}
/**
* Sets the time a blob will expire and be deleted.
- *
+ *
* @param containerName The container name.
* @param blob The blob name.
* @param expiryOptions Required. Indicates mode of the expiry time.
@@ -2097,12 +2144,13 @@ public Mono> setExpiryWithResponseAsyn
public Mono setExpiryAsync(String containerName, String blob, BlobExpiryOptions expiryOptions,
Integer timeout, String requestId, String expiresOn) {
return setExpiryWithResponseAsync(containerName, blob, expiryOptions, timeout, requestId, expiresOn)
+ .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException)
.flatMap(ignored -> Mono.empty());
}
/**
* Sets the time a blob will expire and be deleted.
- *
+ *
* @param containerName The container name.
* @param blob The blob name.
* @param expiryOptions Required. Indicates mode of the expiry time.
@@ -2122,12 +2170,13 @@ public Mono setExpiryAsync(String containerName, String blob, BlobExpiryOp
public Mono setExpiryAsync(String containerName, String blob, BlobExpiryOptions expiryOptions,
Integer timeout, String requestId, String expiresOn, Context context) {
return setExpiryWithResponseAsync(containerName, blob, expiryOptions, timeout, requestId, expiresOn, context)
+ .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException)
.flatMap(ignored -> Mono.empty());
}
/**
* Sets the time a blob will expire and be deleted.
- *
+ *
* @param containerName The container name.
* @param blob The blob name.
* @param expiryOptions Required. Indicates mode of the expiry time.
@@ -2147,13 +2196,15 @@ public Mono> setExpiryNoCustomHeadersWithResponseAsync(String con
BlobExpiryOptions expiryOptions, Integer timeout, String requestId, String expiresOn) {
final String comp = "expiry";
final String accept = "application/xml";
- return FluxUtil.withContext(context -> service.setExpiryNoCustomHeaders(this.client.getUrl(), containerName,
- blob, comp, timeout, this.client.getVersion(), requestId, expiryOptions, expiresOn, accept, context));
+ return FluxUtil
+ .withContext(context -> service.setExpiryNoCustomHeaders(this.client.getUrl(), containerName, blob, comp,
+ timeout, this.client.getVersion(), requestId, expiryOptions, expiresOn, accept, context))
+ .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException);
}
/**
* Sets the time a blob will expire and be deleted.
- *
+ *
* @param containerName The container name.
* @param blob The blob name.
* @param expiryOptions Required. Indicates mode of the expiry time.
@@ -2174,13 +2225,15 @@ public Mono> setExpiryNoCustomHeadersWithResponseAsync(String con
BlobExpiryOptions expiryOptions, Integer timeout, String requestId, String expiresOn, Context context) {
final String comp = "expiry";
final String accept = "application/xml";
- return service.setExpiryNoCustomHeaders(this.client.getUrl(), containerName, blob, comp, timeout,
- this.client.getVersion(), requestId, expiryOptions, expiresOn, accept, context);
+ return service
+ .setExpiryNoCustomHeaders(this.client.getUrl(), containerName, blob, comp, timeout,
+ this.client.getVersion(), requestId, expiryOptions, expiresOn, accept, context)
+ .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException);
}
/**
* The Set HTTP Headers operation sets system properties on the blob.
- *
+ *
* @param containerName The container name.
* @param blob The blob name.
* @param timeout The timeout parameter is expressed in seconds. For more information, see <a
@@ -2243,15 +2296,17 @@ public Mono> setHttpHeadersWithRe
= ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince);
DateTimeRfc1123 ifUnmodifiedSinceConverted
= ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince);
- return FluxUtil.withContext(context -> service.setHttpHeaders(this.client.getUrl(), containerName, blob, comp,
- timeout, cacheControl, contentType, contentMd5Converted, contentEncoding, contentLanguage, leaseId,
- ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, contentDisposition,
- this.client.getVersion(), requestId, accept, context));
+ return FluxUtil
+ .withContext(context -> service.setHttpHeaders(this.client.getUrl(), containerName, blob, comp, timeout,
+ cacheControl, contentType, contentMd5Converted, contentEncoding, contentLanguage, leaseId,
+ ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, contentDisposition,
+ this.client.getVersion(), requestId, accept, context))
+ .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException);
}
/**
* The Set HTTP Headers operation sets system properties on the blob.
- *
+ *
* @param containerName The container name.
* @param blob The blob name.
* @param timeout The timeout parameter is expressed in seconds. For more information, see <a
@@ -2316,15 +2371,17 @@ public Mono> setHttpHeadersWithRe
= ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince);
DateTimeRfc1123 ifUnmodifiedSinceConverted
= ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince);
- return service.setHttpHeaders(this.client.getUrl(), containerName, blob, comp, timeout, cacheControl,
- contentType, contentMd5Converted, contentEncoding, contentLanguage, leaseId, ifModifiedSinceConverted,
- ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, contentDisposition, this.client.getVersion(),
- requestId, accept, context);
+ return service
+ .setHttpHeaders(this.client.getUrl(), containerName, blob, comp, timeout, cacheControl, contentType,
+ contentMd5Converted, contentEncoding, contentLanguage, leaseId, ifModifiedSinceConverted,
+ ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, contentDisposition, this.client.getVersion(),
+ requestId, accept, context)
+ .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException);
}
/**
* The Set HTTP Headers operation sets system properties on the blob.
- *
+ *
* @param containerName The container name.
* @param blob The blob name.
* @param timeout The timeout parameter is expressed in seconds. For more information, see <a
@@ -2352,12 +2409,13 @@ public Mono setHttpHeadersAsync(String containerName, String blob, Integer
String ifTags, String requestId, BlobHttpHeaders blobHttpHeaders) {
return setHttpHeadersWithResponseAsync(containerName, blob, timeout, leaseId, ifModifiedSince,
ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, requestId, blobHttpHeaders)
+ .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException)
.flatMap(ignored -> Mono.empty());
}
/**
* The Set HTTP Headers operation sets system properties on the blob.
- *
+ *
* @param containerName The container name.
* @param blob The blob name.
* @param timeout The timeout parameter is expressed in seconds. For more information, see <a
@@ -2386,12 +2444,13 @@ public Mono setHttpHeadersAsync(String containerName, String blob, Integer
String ifTags, String requestId, BlobHttpHeaders blobHttpHeaders, Context context) {
return setHttpHeadersWithResponseAsync(containerName, blob, timeout, leaseId, ifModifiedSince,
ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, requestId, blobHttpHeaders, context)
+ .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException)
.flatMap(ignored -> Mono.empty());
}
/**
* The Set HTTP Headers operation sets system properties on the blob.
- *
+ *
* @param containerName The container name.
* @param blob The blob name.
* @param timeout The timeout parameter is expressed in seconds. For more information, see <a
@@ -2454,15 +2513,17 @@ public Mono> setHttpHeadersNoCustomHeadersWithResponseAsync(Strin
= ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince);
DateTimeRfc1123 ifUnmodifiedSinceConverted
= ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince);
- return FluxUtil.withContext(context -> service.setHttpHeadersNoCustomHeaders(this.client.getUrl(),
- containerName, blob, comp, timeout, cacheControl, contentType, contentMd5Converted, contentEncoding,
- contentLanguage, leaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch,
- ifTags, contentDisposition, this.client.getVersion(), requestId, accept, context));
+ return FluxUtil
+ .withContext(context -> service.setHttpHeadersNoCustomHeaders(this.client.getUrl(), containerName, blob,
+ comp, timeout, cacheControl, contentType, contentMd5Converted, contentEncoding, contentLanguage,
+ leaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags,
+ contentDisposition, this.client.getVersion(), requestId, accept, context))
+ .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException);
}
/**
* The Set HTTP Headers operation sets system properties on the blob.
- *
+ *
* @param containerName The container name.
* @param blob The blob name.
* @param timeout The timeout parameter is expressed in seconds. For more information, see <a
@@ -2527,15 +2588,17 @@ public Mono> setHttpHeadersNoCustomHeadersWithResponseAsync(Strin
= ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince);
DateTimeRfc1123 ifUnmodifiedSinceConverted
= ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince);
- return service.setHttpHeadersNoCustomHeaders(this.client.getUrl(), containerName, blob, comp, timeout,
- cacheControl, contentType, contentMd5Converted, contentEncoding, contentLanguage, leaseId,
- ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, contentDisposition,
- this.client.getVersion(), requestId, accept, context);
+ return service
+ .setHttpHeadersNoCustomHeaders(this.client.getUrl(), containerName, blob, comp, timeout, cacheControl,
+ contentType, contentMd5Converted, contentEncoding, contentLanguage, leaseId, ifModifiedSinceConverted,
+ ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, contentDisposition, this.client.getVersion(),
+ requestId, accept, context)
+ .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException);
}
/**
* The Set 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
@@ -2562,14 +2625,16 @@ public Mono> setImmutabili
= ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince);
DateTimeRfc1123 immutabilityPolicyExpiryConverted
= immutabilityPolicyExpiry == null ? null : new DateTimeRfc1123(immutabilityPolicyExpiry);
- return FluxUtil.withContext(context -> service.setImmutabilityPolicy(this.client.getUrl(), containerName, blob,
- comp, timeout, this.client.getVersion(), requestId, ifUnmodifiedSinceConverted,
- immutabilityPolicyExpiryConverted, immutabilityPolicyMode, accept, context));
+ return FluxUtil
+ .withContext(context -> service.setImmutabilityPolicy(this.client.getUrl(), containerName, blob, comp,
+ timeout, this.client.getVersion(), requestId, ifUnmodifiedSinceConverted,
+ immutabilityPolicyExpiryConverted, immutabilityPolicyMode, accept, context))
+ .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException);
}
/**
* The Set Immutability Policy operation sets the immutability policy on the blob.
- *
+ *
* @param containerName The container name.
* @param blob The blob name.
* @param timeout The timeout parameter is expressed in seconds. For more information, see <a
@@ -2597,14 +2662,16 @@ public Mono> setImmutabili
= ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince);
DateTimeRfc1123 immutabilityPolicyExpiryConverted
= immutabilityPolicyExpiry == null ? null : new DateTimeRfc1123(immutabilityPolicyExpiry);
- return service.setImmutabilityPolicy(this.client.getUrl(), containerName, blob, comp, timeout,
- this.client.getVersion(), requestId, ifUnmodifiedSinceConverted, immutabilityPolicyExpiryConverted,
- immutabilityPolicyMode, accept, context);
+ return service
+ .setImmutabilityPolicy(this.client.getUrl(), containerName, blob, comp, timeout, this.client.getVersion(),
+ requestId, ifUnmodifiedSinceConverted, immutabilityPolicyExpiryConverted, immutabilityPolicyMode,
+ accept, context)
+ .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException);
}
/**
* The Set Immutability Policy operation sets the immutability policy on the blob.
- *
+ *
* @param containerName The container name.
* @param blob The blob name.
* @param timeout The timeout parameter is expressed in seconds. For more information, see <a
@@ -2626,12 +2693,14 @@ public Mono setImmutabilityPolicyAsync(String containerName, String blob,
OffsetDateTime ifUnmodifiedSince, OffsetDateTime immutabilityPolicyExpiry,
BlobImmutabilityPolicyMode immutabilityPolicyMode) {
return setImmutabilityPolicyWithResponseAsync(containerName, blob, timeout, requestId, ifUnmodifiedSince,
- immutabilityPolicyExpiry, immutabilityPolicyMode).flatMap(ignored -> Mono.empty());
+ immutabilityPolicyExpiry, immutabilityPolicyMode)
+ .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException)
+ .flatMap(ignored -> Mono.empty());
}
/**
* The Set Immutability Policy operation sets the immutability policy on the blob.
- *
+ *
* @param containerName The container name.
* @param blob The blob name.
* @param timeout The timeout parameter is expressed in seconds. For more information, see <a
@@ -2654,12 +2723,14 @@ public Mono setImmutabilityPolicyAsync(String containerName, String blob,
OffsetDateTime ifUnmodifiedSince, OffsetDateTime immutabilityPolicyExpiry,
BlobImmutabilityPolicyMode immutabilityPolicyMode, Context context) {
return setImmutabilityPolicyWithResponseAsync(containerName, blob, timeout, requestId, ifUnmodifiedSince,
- immutabilityPolicyExpiry, immutabilityPolicyMode, context).flatMap(ignored -> Mono.empty());
+ immutabilityPolicyExpiry, immutabilityPolicyMode, context)
+ .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException)
+ .flatMap(ignored -> Mono.empty());
}
/**
* The Set Immutability Policy operation sets the immutability policy on the blob.
- *
+ *
* @param containerName The container name.
* @param blob The blob name.
* @param timeout The timeout parameter is expressed in seconds. For more information, see <a
@@ -2686,14 +2757,16 @@ public Mono> setImmutabilityPolicyNoCustomHeadersWithResponseAsyn
= ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince);
DateTimeRfc1123 immutabilityPolicyExpiryConverted
= immutabilityPolicyExpiry == null ? null : new DateTimeRfc1123(immutabilityPolicyExpiry);
- return FluxUtil.withContext(context -> service.setImmutabilityPolicyNoCustomHeaders(this.client.getUrl(),
- containerName, blob, comp, timeout, this.client.getVersion(), requestId, ifUnmodifiedSinceConverted,
- immutabilityPolicyExpiryConverted, immutabilityPolicyMode, accept, context));
+ return FluxUtil
+ .withContext(context -> service.setImmutabilityPolicyNoCustomHeaders(this.client.getUrl(), containerName,
+ blob, comp, timeout, this.client.getVersion(), requestId, ifUnmodifiedSinceConverted,
+ immutabilityPolicyExpiryConverted, immutabilityPolicyMode, accept, context))
+ .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException);
}
/**
* The Set Immutability Policy operation sets the immutability policy on the blob.
- *
+ *
* @param containerName The container name.
* @param blob The blob name.
* @param timeout The timeout parameter is expressed in seconds. For more information, see <a
@@ -2721,14 +2794,16 @@ public Mono> setImmutabilityPolicyNoCustomHeadersWithResponseAsyn
= ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince);
DateTimeRfc1123 immutabilityPolicyExpiryConverted
= immutabilityPolicyExpiry == null ? null : new DateTimeRfc1123(immutabilityPolicyExpiry);
- return service.setImmutabilityPolicyNoCustomHeaders(this.client.getUrl(), containerName, blob, comp, timeout,
- this.client.getVersion(), requestId, ifUnmodifiedSinceConverted, immutabilityPolicyExpiryConverted,
- immutabilityPolicyMode, accept, context);
+ return service
+ .setImmutabilityPolicyNoCustomHeaders(this.client.getUrl(), containerName, blob, comp, timeout,
+ this.client.getVersion(), requestId, ifUnmodifiedSinceConverted, immutabilityPolicyExpiryConverted,
+ immutabilityPolicyMode, accept, context)
+ .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException);
}
/**
* The Delete Immutability Policy operation deletes the immutability policy on the blob.
- *
+ *
* @param containerName The container name.
* @param blob The blob name.
* @param timeout The timeout parameter is expressed in seconds. For more information, see <a
@@ -2746,13 +2821,15 @@ public Mono> deleteImmu
String containerName, String blob, Integer timeout, String requestId) {
final String comp = "immutabilityPolicies";
final String accept = "application/xml";
- return FluxUtil.withContext(context -> service.deleteImmutabilityPolicy(this.client.getUrl(), containerName,
- blob, comp, timeout, this.client.getVersion(), requestId, accept, context));
+ return FluxUtil
+ .withContext(context -> service.deleteImmutabilityPolicy(this.client.getUrl(), containerName, blob, comp,
+ timeout, this.client.getVersion(), requestId, accept, context))
+ .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException);
}
/**
* The Delete Immutability Policy operation deletes the immutability policy on the blob.
- *
+ *
* @param containerName The container name.
* @param blob The blob name.
* @param timeout The timeout parameter is expressed in seconds. For more information, see <a
@@ -2771,13 +2848,15 @@ public Mono> deleteImmu
String containerName, String blob, Integer timeout, String requestId, Context context) {
final String comp = "immutabilityPolicies";
final String accept = "application/xml";
- return service.deleteImmutabilityPolicy(this.client.getUrl(), containerName, blob, comp, timeout,
- this.client.getVersion(), requestId, accept, context);
+ return service
+ .deleteImmutabilityPolicy(this.client.getUrl(), containerName, blob, comp, timeout,
+ this.client.getVersion(), requestId, accept, context)
+ .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException);
}
/**
* The Delete Immutability Policy operation deletes the immutability policy on the blob.
- *
+ *
* @param containerName The container name.
* @param blob The blob name.
* @param timeout The timeout parameter is expressed in seconds. For more information, see <a
@@ -2794,12 +2873,13 @@ public Mono> deleteImmu
public Mono deleteImmutabilityPolicyAsync(String containerName, String blob, Integer timeout,
String requestId) {
return deleteImmutabilityPolicyWithResponseAsync(containerName, blob, timeout, requestId)
+ .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException)
.flatMap(ignored -> Mono.empty());
}
/**
* The Delete Immutability Policy operation deletes the immutability policy on the blob.
- *
+ *
* @param containerName The container name.
* @param blob The blob name.
* @param timeout The timeout parameter is expressed in seconds. For more information, see <a
@@ -2817,12 +2897,13 @@ public Mono deleteImmutabilityPolicyAsync(String containerName, String blo
public Mono deleteImmutabilityPolicyAsync(String containerName, String blob, Integer timeout,
String requestId, Context context) {
return deleteImmutabilityPolicyWithResponseAsync(containerName, blob, timeout, requestId, context)
+ .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException)
.flatMap(ignored -> Mono.empty());
}
/**
* The Delete Immutability Policy operation deletes the immutability policy on the blob.
- *
+ *
* @param containerName The container name.
* @param blob The blob name.
* @param timeout The timeout parameter is expressed in seconds. For more information, see <a
@@ -2840,13 +2921,15 @@ public Mono> deleteImmutabilityPolicyNoCustomHeadersWithResponseA
String blob, Integer timeout, String requestId) {
final String comp = "immutabilityPolicies";
final String accept = "application/xml";
- return FluxUtil.withContext(context -> service.deleteImmutabilityPolicyNoCustomHeaders(this.client.getUrl(),
- containerName, blob, comp, timeout, this.client.getVersion(), requestId, accept, context));
+ return FluxUtil
+ .withContext(context -> service.deleteImmutabilityPolicyNoCustomHeaders(this.client.getUrl(), containerName,
+ blob, comp, timeout, this.client.getVersion(), requestId, accept, context))
+ .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException);
}
/**
* The Delete Immutability Policy operation deletes the immutability policy on the blob.
- *
+ *
* @param containerName The container name.
* @param blob The blob name.
* @param timeout The timeout parameter is expressed in seconds. For more information, see <a
@@ -2865,13 +2948,15 @@ public Mono> deleteImmutabilityPolicyNoCustomHeadersWithResponseA
String blob, Integer timeout, String requestId, Context context) {
final String comp = "immutabilityPolicies";
final String accept = "application/xml";
- return service.deleteImmutabilityPolicyNoCustomHeaders(this.client.getUrl(), containerName, blob, comp, timeout,
- this.client.getVersion(), requestId, accept, context);
+ return service
+ .deleteImmutabilityPolicyNoCustomHeaders(this.client.getUrl(), containerName, blob, comp, timeout,
+ this.client.getVersion(), requestId, accept, context)
+ .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException);
}
/**
* The Set Legal Hold operation sets a legal hold on the blob.
- *
+ *
* @param containerName The container name.
* @param blob The blob name.
* @param legalHold Specified if a legal hold should be set on the blob.
@@ -2890,13 +2975,15 @@ public Mono> setLegalHoldWithRespon
String blob, boolean legalHold, Integer timeout, String requestId) {
final String comp = "legalhold";
final String accept = "application/xml";
- return FluxUtil.withContext(context -> service.setLegalHold(this.client.getUrl(), containerName, blob, comp,
- timeout, this.client.getVersion(), requestId, legalHold, accept, context));
+ return FluxUtil
+ .withContext(context -> service.setLegalHold(this.client.getUrl(), containerName, blob, comp, timeout,
+ this.client.getVersion(), requestId, legalHold, accept, context))
+ .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException);
}
/**
* The Set Legal Hold operation sets a legal hold on the blob.
- *
+ *
* @param containerName The container name.
* @param blob The blob name.
* @param legalHold Specified if a legal hold should be set on the blob.
@@ -2916,13 +3003,15 @@ public Mono> setLegalHoldWithRespon
String blob, boolean legalHold, Integer timeout, String requestId, Context context) {
final String comp = "legalhold";
final String accept = "application/xml";
- return service.setLegalHold(this.client.getUrl(), containerName, blob, comp, timeout, this.client.getVersion(),
- requestId, legalHold, accept, context);
+ return service
+ .setLegalHold(this.client.getUrl(), containerName, blob, comp, timeout, this.client.getVersion(), requestId,
+ legalHold, accept, context)
+ .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException);
}
/**
* The Set Legal Hold operation sets a legal hold on the blob.
- *
+ *
* @param containerName The container name.
* @param blob The blob name.
* @param legalHold Specified if a legal hold should be set on the blob.
@@ -2940,12 +3029,13 @@ public Mono> setLegalHoldWithRespon
public Mono setLegalHoldAsync(String containerName, String blob, boolean legalHold, Integer timeout,
String requestId) {
return setLegalHoldWithResponseAsync(containerName, blob, legalHold, timeout, requestId)
+ .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException)
.flatMap(ignored -> Mono.empty());
}
/**
* The Set Legal Hold operation sets a legal hold on the blob.
- *
+ *
* @param containerName The container name.
* @param blob The blob name.
* @param legalHold Specified if a legal hold should be set on the blob.
@@ -2964,12 +3054,13 @@ public Mono setLegalHoldAsync(String containerName, String blob, boolean l
public Mono setLegalHoldAsync(String containerName, String blob, boolean legalHold, Integer timeout,
String requestId, Context context) {
return setLegalHoldWithResponseAsync(containerName, blob, legalHold, timeout, requestId, context)
+ .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException)
.flatMap(ignored -> Mono.empty());
}
/**
* The Set Legal Hold operation sets a legal hold on the blob.
- *
+ *
* @param containerName The container name.
* @param blob The blob name.
* @param legalHold Specified if a legal hold should be set on the blob.
@@ -2988,13 +3079,15 @@ public Mono> setLegalHoldNoCustomHeadersWithResponseAsync(String
boolean legalHold, Integer timeout, String requestId) {
final String comp = "legalhold";
final String accept = "application/xml";
- return FluxUtil.withContext(context -> service.setLegalHoldNoCustomHeaders(this.client.getUrl(), containerName,
- blob, comp, timeout, this.client.getVersion(), requestId, legalHold, accept, context));
+ return FluxUtil
+ .withContext(context -> service.setLegalHoldNoCustomHeaders(this.client.getUrl(), containerName, blob, comp,
+ timeout, this.client.getVersion(), requestId, legalHold, accept, context))
+ .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException);
}
/**
* The Set Legal Hold operation sets a legal hold on the blob.
- *
+ *
* @param containerName The container name.
* @param blob The blob name.
* @param legalHold Specified if a legal hold should be set on the blob.
@@ -3014,14 +3107,16 @@ public Mono> setLegalHoldNoCustomHeadersWithResponseAsync(String
boolean legalHold, Integer timeout, String requestId, Context context) {
final String comp = "legalhold";
final String accept = "application/xml";
- return service.setLegalHoldNoCustomHeaders(this.client.getUrl(), containerName, blob, comp, timeout,
- this.client.getVersion(), requestId, legalHold, accept, context);
+ return service
+ .setLegalHoldNoCustomHeaders(this.client.getUrl(), containerName, blob, comp, timeout,
+ this.client.getVersion(), requestId, legalHold, accept, context)
+ .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException);
}
/**
* The Set Blob Metadata operation sets user-defined metadata for the specified blob as one or more name-value
* pairs.
- *
+ *
* @param containerName The container name.
* @param blob The blob name.
* @param timeout The timeout parameter is expressed in seconds. For more information, see <a
@@ -3081,16 +3176,18 @@ public Mono> setMetadataWithResponse
= ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince);
DateTimeRfc1123 ifUnmodifiedSinceConverted
= ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince);
- return FluxUtil.withContext(context -> service.setMetadata(this.client.getUrl(), containerName, blob, comp,
- timeout, metadata, leaseId, encryptionKey, encryptionKeySha256, encryptionAlgorithm, encryptionScope,
- ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags,
- this.client.getVersion(), requestId, accept, context));
+ return FluxUtil
+ .withContext(context -> service.setMetadata(this.client.getUrl(), containerName, blob, comp, timeout,
+ metadata, leaseId, encryptionKey, encryptionKeySha256, encryptionAlgorithm, encryptionScope,
+ ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags,
+ this.client.getVersion(), requestId, accept, context))
+ .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException);
}
/**
* The Set Blob Metadata operation sets user-defined metadata for the specified blob as one or more name-value
* pairs.
- *
+ *
* @param containerName The container name.
* @param blob The blob name.
* @param timeout The timeout parameter is expressed in seconds. For more information, see <a
@@ -3151,16 +3248,18 @@ public Mono> setMetadataWithResponse
= ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince);
DateTimeRfc1123 ifUnmodifiedSinceConverted
= ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince);
- return service.setMetadata(this.client.getUrl(), containerName, blob, comp, timeout, metadata, leaseId,
- encryptionKey, encryptionKeySha256, encryptionAlgorithm, encryptionScope, ifModifiedSinceConverted,
- ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, this.client.getVersion(), requestId, accept,
- context);
+ return service
+ .setMetadata(this.client.getUrl(), containerName, blob, comp, timeout, metadata, leaseId, encryptionKey,
+ encryptionKeySha256, encryptionAlgorithm, encryptionScope, ifModifiedSinceConverted,
+ ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, this.client.getVersion(), requestId, accept,
+ context)
+ .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException);
}
/**
* The Set Blob Metadata operation sets user-defined metadata for the specified blob as one or more name-value
* pairs.
- *
+ *
* @param containerName The container name.
* @param blob The blob name.
* @param timeout The timeout parameter is expressed in seconds. For more information, see <a
@@ -3195,13 +3294,14 @@ public Mono setMetadataAsync(String containerName, String blob, Integer ti
String ifNoneMatch, String ifTags, String requestId, CpkInfo cpkInfo, EncryptionScope encryptionScopeParam) {
return setMetadataWithResponseAsync(containerName, blob, timeout, metadata, leaseId, ifModifiedSince,
ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, requestId, cpkInfo, encryptionScopeParam)
+ .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException)
.flatMap(ignored -> Mono.empty());
}
/**
* The Set Blob Metadata operation sets user-defined metadata for the specified blob as one or more name-value
* pairs.
- *
+ *
* @param containerName The container name.
* @param blob The blob name.
* @param timeout The timeout parameter is expressed in seconds. For more information, see <a
@@ -3238,13 +3338,14 @@ public Mono setMetadataAsync(String containerName, String blob, Integer ti
Context context) {
return setMetadataWithResponseAsync(containerName, blob, timeout, metadata, leaseId, ifModifiedSince,
ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, requestId, cpkInfo, encryptionScopeParam, context)
+ .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException)
.flatMap(ignored -> Mono.empty());
}
/**
* The Set Blob Metadata operation sets user-defined metadata for the specified blob as one or more name-value
* pairs.
- *
+ *
* @param containerName The container name.
* @param blob The blob name.
* @param timeout The timeout parameter is expressed in seconds. For more information, see <a
@@ -3304,16 +3405,18 @@ public Mono> setMetadataNoCustomHeadersWithResponseAsync(String c
= ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince);
DateTimeRfc1123 ifUnmodifiedSinceConverted
= ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince);
- return FluxUtil.withContext(context -> service.setMetadataNoCustomHeaders(this.client.getUrl(), containerName,
- blob, comp, timeout, metadata, leaseId, encryptionKey, encryptionKeySha256, encryptionAlgorithm,
- encryptionScope, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags,
- this.client.getVersion(), requestId, accept, context));
+ return FluxUtil
+ .withContext(context -> service.setMetadataNoCustomHeaders(this.client.getUrl(), containerName, blob, comp,
+ timeout, metadata, leaseId, encryptionKey, encryptionKeySha256, encryptionAlgorithm, encryptionScope,
+ ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags,
+ this.client.getVersion(), requestId, accept, context))
+ .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException);
}
/**
* The Set Blob Metadata operation sets user-defined metadata for the specified blob as one or more name-value
* pairs.
- *
+ *
* @param containerName The container name.
* @param blob The blob name.
* @param timeout The timeout parameter is expressed in seconds. For more information, see <a
@@ -3374,15 +3477,17 @@ public Mono> setMetadataNoCustomHeadersWithResponseAsync(String c
= ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince);
DateTimeRfc1123 ifUnmodifiedSinceConverted
= ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince);
- return service.setMetadataNoCustomHeaders(this.client.getUrl(), containerName, blob, comp, timeout, metadata,
- leaseId, encryptionKey, encryptionKeySha256, encryptionAlgorithm, encryptionScope, ifModifiedSinceConverted,
- ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, this.client.getVersion(), requestId, accept,
- context);
+ return service
+ .setMetadataNoCustomHeaders(this.client.getUrl(), containerName, blob, comp, timeout, metadata, leaseId,
+ encryptionKey, encryptionKeySha256, encryptionAlgorithm, encryptionScope, ifModifiedSinceConverted,
+ ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, this.client.getVersion(), requestId, accept,
+ context)
+ .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException);
}
/**
* [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
@@ -3419,14 +3524,16 @@ public Mono> acquireLeaseWithRespon
= ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince);
DateTimeRfc1123 ifUnmodifiedSinceConverted
= ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince);
- return FluxUtil.withContext(context -> service.acquireLease(this.client.getUrl(), containerName, blob, comp,
- action, timeout, duration, proposedLeaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch,
- ifNoneMatch, ifTags, this.client.getVersion(), requestId, accept, context));
+ return FluxUtil
+ .withContext(context -> service.acquireLease(this.client.getUrl(), containerName, blob, comp, action,
+ timeout, duration, proposedLeaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch,
+ ifNoneMatch, ifTags, this.client.getVersion(), requestId, accept, context))
+ .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException);
}
/**
* [Update] The Lease Blob operation establishes and manages a lock on a blob for write and delete operations.
- *
+ *
* @param containerName The container name.
* @param blob The blob name.
* @param timeout The timeout parameter is expressed in seconds. For more information, see <a
@@ -3465,14 +3572,16 @@ public Mono> acquireLeaseWithRespon
= ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince);
DateTimeRfc1123 ifUnmodifiedSinceConverted
= ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince);
- return service.acquireLease(this.client.getUrl(), containerName, blob, comp, action, timeout, duration,
- proposedLeaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags,
- this.client.getVersion(), requestId, accept, context);
+ return service
+ .acquireLease(this.client.getUrl(), containerName, blob, comp, action, timeout, duration, proposedLeaseId,
+ ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags,
+ this.client.getVersion(), requestId, accept, context)
+ .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException);
}
/**
* [Update] The Lease Blob operation establishes and manages a lock on a blob for write and delete operations.
- *
+ *
* @param containerName The container name.
* @param blob The blob name.
* @param timeout The timeout parameter is expressed in seconds. For more information, see <a
@@ -3503,12 +3612,14 @@ public Mono acquireLeaseAsync(String containerName, String blob, Integer t
String proposedLeaseId, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch,
String ifNoneMatch, String ifTags, String requestId) {
return acquireLeaseWithResponseAsync(containerName, blob, timeout, duration, proposedLeaseId, ifModifiedSince,
- ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, requestId).flatMap(ignored -> Mono.empty());
+ ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, requestId)
+ .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException)
+ .flatMap(ignored -> Mono.empty());
}
/**
* [Update] The Lease Blob operation establishes and manages a lock on a blob for write and delete operations.
- *
+ *
* @param containerName The container name.
* @param blob The blob name.
* @param timeout The timeout parameter is expressed in seconds. For more information, see <a
@@ -3540,12 +3651,14 @@ public Mono acquireLeaseAsync(String containerName, String blob, Integer t
String proposedLeaseId, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch,
String ifNoneMatch, String ifTags, String requestId, Context context) {
return acquireLeaseWithResponseAsync(containerName, blob, timeout, duration, proposedLeaseId, ifModifiedSince,
- ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, requestId, context).flatMap(ignored -> Mono.empty());
+ ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, requestId, context)
+ .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException)
+ .flatMap(ignored -> Mono.empty());
}
/**
* [Update] The Lease Blob operation establishes and manages a lock on a blob for write and delete operations.
- *
+ *
* @param containerName The container name.
* @param blob The blob name.
* @param timeout The timeout parameter is expressed in seconds. For more information, see <a
@@ -3585,12 +3698,13 @@ public Mono> acquireLeaseNoCustomHeadersWithResponseAsync(String
return FluxUtil
.withContext(context -> service.acquireLeaseNoCustomHeaders(this.client.getUrl(), containerName, blob, comp,
action, timeout, duration, proposedLeaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted,
- ifMatch, ifNoneMatch, ifTags, this.client.getVersion(), requestId, accept, context));
+ ifMatch, ifNoneMatch, ifTags, this.client.getVersion(), requestId, accept, context))
+ .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException);
}
/**
* [Update] The Lease Blob operation establishes and manages a lock on a blob for write and delete operations.
- *
+ *
* @param containerName The container name.
* @param blob The blob name.
* @param timeout The timeout parameter is expressed in seconds. For more information, see <a
@@ -3629,14 +3743,16 @@ public Mono> acquireLeaseNoCustomHeadersWithResponseAsync(String
= ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince);
DateTimeRfc1123 ifUnmodifiedSinceConverted
= ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince);
- return service.acquireLeaseNoCustomHeaders(this.client.getUrl(), containerName, blob, comp, action, timeout,
- duration, proposedLeaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch,
- ifTags, this.client.getVersion(), requestId, accept, context);
+ return service
+ .acquireLeaseNoCustomHeaders(this.client.getUrl(), containerName, blob, comp, action, timeout, duration,
+ proposedLeaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags,
+ this.client.getVersion(), requestId, accept, context)
+ .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException);
}
/**
* [Update] The Lease Blob operation establishes and manages a lock on a blob for write and delete operations.
- *
+ *
* @param containerName The container name.
* @param blob The blob name.
* @param leaseId Specifies the current lease ID on the resource.
@@ -3668,14 +3784,16 @@ public Mono> releaseLeaseWithRespon
= ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince);
DateTimeRfc1123 ifUnmodifiedSinceConverted
= ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince);
- return FluxUtil.withContext(context -> service.releaseLease(this.client.getUrl(), containerName, blob, comp,
- action, timeout, leaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch,
- ifTags, this.client.getVersion(), requestId, accept, context));
+ return FluxUtil
+ .withContext(context -> service.releaseLease(this.client.getUrl(), containerName, blob, comp, action,
+ timeout, leaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags,
+ this.client.getVersion(), requestId, accept, context))
+ .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException);
}
/**
* [Update] The Lease Blob operation establishes and manages a lock on a blob for write and delete operations.
- *
+ *
* @param containerName The container name.
* @param blob The blob name.
* @param leaseId Specifies the current lease ID on the resource.
@@ -3708,14 +3826,16 @@ public Mono> releaseLeaseWithRespon
= ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince);
DateTimeRfc1123 ifUnmodifiedSinceConverted
= ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince);
- return service.releaseLease(this.client.getUrl(), containerName, blob, comp, action, timeout, leaseId,
- ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags,
- this.client.getVersion(), requestId, accept, context);
+ return service
+ .releaseLease(this.client.getUrl(), containerName, blob, comp, action, timeout, leaseId,
+ ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags,
+ this.client.getVersion(), requestId, accept, context)
+ .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException);
}
/**
* [Update] The Lease Blob operation establishes and manages a lock on a blob for write and delete operations.
- *
+ *
* @param containerName The container name.
* @param blob The blob name.
* @param leaseId Specifies the current lease ID on the resource.
@@ -3741,12 +3861,14 @@ public Mono releaseLeaseAsync(String containerName, String blob, String le
OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch,
String ifTags, String requestId) {
return releaseLeaseWithResponseAsync(containerName, blob, leaseId, timeout, ifModifiedSince, ifUnmodifiedSince,
- ifMatch, ifNoneMatch, ifTags, requestId).flatMap(ignored -> Mono.empty());
+ ifMatch, ifNoneMatch, ifTags, requestId)
+ .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException)
+ .flatMap(ignored -> Mono.empty());
}
/**
* [Update] The Lease Blob operation establishes and manages a lock on a blob for write and delete operations.
- *
+ *
* @param containerName The container name.
* @param blob The blob name.
* @param leaseId Specifies the current lease ID on the resource.
@@ -3773,12 +3895,14 @@ public Mono releaseLeaseAsync(String containerName, String blob, String le
OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch,
String ifTags, String requestId, Context context) {
return releaseLeaseWithResponseAsync(containerName, blob, leaseId, timeout, ifModifiedSince, ifUnmodifiedSince,
- ifMatch, ifNoneMatch, ifTags, requestId, context).flatMap(ignored -> Mono.empty());
+ ifMatch, ifNoneMatch, ifTags, requestId, context)
+ .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException)
+ .flatMap(ignored -> Mono.empty());
}
/**
* [Update] The Lease Blob operation establishes and manages a lock on a blob for write and delete operations.
- *
+ *
* @param containerName The container name.
* @param blob The blob name.
* @param leaseId Specifies the current lease ID on the resource.
@@ -3810,14 +3934,16 @@ public Mono> releaseLeaseNoCustomHeadersWithResponseAsync(String
= ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince);
DateTimeRfc1123 ifUnmodifiedSinceConverted
= ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince);
- return FluxUtil.withContext(context -> service.releaseLeaseNoCustomHeaders(this.client.getUrl(), containerName,
- blob, comp, action, timeout, leaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch,
- ifNoneMatch, ifTags, this.client.getVersion(), requestId, accept, context));
+ return FluxUtil
+ .withContext(context -> service.releaseLeaseNoCustomHeaders(this.client.getUrl(), containerName, blob, comp,
+ action, timeout, leaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch,
+ ifTags, this.client.getVersion(), requestId, accept, context))
+ .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException);
}
/**
* [Update] The Lease Blob operation establishes and manages a lock on a blob for write and delete operations.
- *
+ *
* @param containerName The container name.
* @param blob The blob name.
* @param leaseId Specifies the current lease ID on the resource.
@@ -3850,14 +3976,16 @@ public Mono> releaseLeaseNoCustomHeadersWithResponseAsync(String
= ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince);
DateTimeRfc1123 ifUnmodifiedSinceConverted
= ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince);
- return service.releaseLeaseNoCustomHeaders(this.client.getUrl(), containerName, blob, comp, action, timeout,
- leaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags,
- this.client.getVersion(), requestId, accept, context);
+ return service
+ .releaseLeaseNoCustomHeaders(this.client.getUrl(), containerName, blob, comp, action, timeout, leaseId,
+ ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags,
+ this.client.getVersion(), requestId, accept, context)
+ .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException);
}
/**
* [Update] The Lease Blob operation establishes and manages a lock on a blob for write and delete operations.
- *
+ *
* @param containerName The container name.
* @param blob The blob name.
* @param leaseId Specifies the current lease ID on the resource.
@@ -3889,14 +4017,16 @@ public Mono> renewLeaseWithResponseAs
= ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince);
DateTimeRfc1123 ifUnmodifiedSinceConverted
= ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince);
- return FluxUtil.withContext(context -> service.renewLease(this.client.getUrl(), containerName, blob, comp,
- action, timeout, leaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch,
- ifTags, this.client.getVersion(), requestId, accept, context));
+ return FluxUtil
+ .withContext(context -> service.renewLease(this.client.getUrl(), containerName, blob, comp, action, timeout,
+ leaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags,
+ this.client.getVersion(), requestId, accept, context))
+ .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException);
}
/**
* [Update] The Lease Blob operation establishes and manages a lock on a blob for write and delete operations.
- *
+ *
* @param containerName The container name.
* @param blob The blob name.
* @param leaseId Specifies the current lease ID on the resource.
@@ -3929,14 +4059,16 @@ public Mono> renewLeaseWithResponseAs
= ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince);
DateTimeRfc1123 ifUnmodifiedSinceConverted
= ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince);
- return service.renewLease(this.client.getUrl(), containerName, blob, comp, action, timeout, leaseId,
- ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags,
- this.client.getVersion(), requestId, accept, context);
+ return service
+ .renewLease(this.client.getUrl(), containerName, blob, comp, action, timeout, leaseId,
+ ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags,
+ this.client.getVersion(), requestId, accept, context)
+ .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException);
}
/**
* [Update] The Lease Blob operation establishes and manages a lock on a blob for write and delete operations.
- *
+ *
* @param containerName The container name.
* @param blob The blob name.
* @param leaseId Specifies the current lease ID on the resource.
@@ -3962,12 +4094,14 @@ public Mono renewLeaseAsync(String containerName, String blob, String leas
OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch,
String ifTags, String requestId) {
return renewLeaseWithResponseAsync(containerName, blob, leaseId, timeout, ifModifiedSince, ifUnmodifiedSince,
- ifMatch, ifNoneMatch, ifTags, requestId).flatMap(ignored -> Mono.empty());
+ ifMatch, ifNoneMatch, ifTags, requestId)
+ .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException)
+ .flatMap(ignored -> Mono.empty());
}
/**
* [Update] The Lease Blob operation establishes and manages a lock on a blob for write and delete operations.
- *
+ *
* @param containerName The container name.
* @param blob The blob name.
* @param leaseId Specifies the current lease ID on the resource.
@@ -3994,12 +4128,14 @@ public Mono renewLeaseAsync(String containerName, String blob, String leas
OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch,
String ifTags, String requestId, Context context) {
return renewLeaseWithResponseAsync(containerName, blob, leaseId, timeout, ifModifiedSince, ifUnmodifiedSince,
- ifMatch, ifNoneMatch, ifTags, requestId, context).flatMap(ignored -> Mono.empty());
+ ifMatch, ifNoneMatch, ifTags, requestId, context)
+ .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException)
+ .flatMap(ignored -> Mono.empty());
}
/**
* [Update] The Lease Blob operation establishes and manages a lock on a blob for write and delete operations.
- *
+ *
* @param containerName The container name.
* @param blob The blob name.
* @param leaseId Specifies the current lease ID on the resource.
@@ -4031,14 +4167,16 @@ public Mono> renewLeaseNoCustomHeadersWithResponseAsync(String co
= ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince);
DateTimeRfc1123 ifUnmodifiedSinceConverted
= ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince);
- return FluxUtil.withContext(context -> service.renewLeaseNoCustomHeaders(this.client.getUrl(), containerName,
- blob, comp, action, timeout, leaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch,
- ifNoneMatch, ifTags, this.client.getVersion(), requestId, accept, context));
+ return FluxUtil
+ .withContext(context -> service.renewLeaseNoCustomHeaders(this.client.getUrl(), containerName, blob, comp,
+ action, timeout, leaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch,
+ ifTags, this.client.getVersion(), requestId, accept, context))
+ .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException);
}
/**
* [Update] The Lease Blob operation establishes and manages a lock on a blob for write and delete operations.
- *
+ *
* @param containerName The container name.
* @param blob The blob name.
* @param leaseId Specifies the current lease ID on the resource.
@@ -4071,14 +4209,16 @@ public Mono> renewLeaseNoCustomHeadersWithResponseAsync(String co
= ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince);
DateTimeRfc1123 ifUnmodifiedSinceConverted
= ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince);
- return service.renewLeaseNoCustomHeaders(this.client.getUrl(), containerName, blob, comp, action, timeout,
- leaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags,
- this.client.getVersion(), requestId, accept, context);
+ return service
+ .renewLeaseNoCustomHeaders(this.client.getUrl(), containerName, blob, comp, action, timeout, leaseId,
+ ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags,
+ this.client.getVersion(), requestId, accept, context)
+ .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException);
}
/**
* [Update] The Lease Blob operation establishes and manages a lock on a blob for write and delete operations.
- *
+ *
* @param containerName The container name.
* @param blob The blob name.
* @param leaseId Specifies the current lease ID on the resource.
@@ -4113,14 +4253,16 @@ public Mono> changeLeaseWithResponse
= ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince);
DateTimeRfc1123 ifUnmodifiedSinceConverted
= ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince);
- return FluxUtil.withContext(context -> service.changeLease(this.client.getUrl(), containerName, blob, comp,
- action, timeout, leaseId, proposedLeaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch,
- ifNoneMatch, ifTags, this.client.getVersion(), requestId, accept, context));
+ return FluxUtil
+ .withContext(context -> service.changeLease(this.client.getUrl(), containerName, blob, comp, action,
+ timeout, leaseId, proposedLeaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch,
+ ifNoneMatch, ifTags, this.client.getVersion(), requestId, accept, context))
+ .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException);
}
/**
* [Update] The Lease Blob operation establishes and manages a lock on a blob for write and delete operations.
- *
+ *
* @param containerName The container name.
* @param blob The blob name.
* @param leaseId Specifies the current lease ID on the resource.
@@ -4157,14 +4299,16 @@ public Mono> changeLeaseWithResponse
= ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince);
DateTimeRfc1123 ifUnmodifiedSinceConverted
= ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince);
- return service.changeLease(this.client.getUrl(), containerName, blob, comp, action, timeout, leaseId,
- proposedLeaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags,
- this.client.getVersion(), requestId, accept, context);
+ return service
+ .changeLease(this.client.getUrl(), containerName, blob, comp, action, timeout, leaseId, proposedLeaseId,
+ ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags,
+ this.client.getVersion(), requestId, accept, context)
+ .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException);
}
/**
* [Update] The Lease Blob operation establishes and manages a lock on a blob for write and delete operations.
- *
+ *
* @param containerName The container name.
* @param blob The blob name.
* @param leaseId Specifies the current lease ID on the resource.
@@ -4193,12 +4337,14 @@ public Mono changeLeaseAsync(String containerName, String blob, String lea
Integer timeout, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch,
String ifNoneMatch, String ifTags, String requestId) {
return changeLeaseWithResponseAsync(containerName, blob, leaseId, proposedLeaseId, timeout, ifModifiedSince,
- ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, requestId).flatMap(ignored -> Mono.empty());
+ ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, requestId)
+ .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException)
+ .flatMap(ignored -> Mono.empty());
}
/**
* [Update] The Lease Blob operation establishes and manages a lock on a blob for write and delete operations.
- *
+ *
* @param containerName The container name.
* @param blob The blob name.
* @param leaseId Specifies the current lease ID on the resource.
@@ -4228,12 +4374,14 @@ public Mono changeLeaseAsync(String containerName, String blob, String lea
Integer timeout, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch,
String ifNoneMatch, String ifTags, String requestId, Context context) {
return changeLeaseWithResponseAsync(containerName, blob, leaseId, proposedLeaseId, timeout, ifModifiedSince,
- ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, requestId, context).flatMap(ignored -> Mono.empty());
+ ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, requestId, context)
+ .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException)
+ .flatMap(ignored -> Mono.empty());
}
/**
* [Update] The Lease Blob operation establishes and manages a lock on a blob for write and delete operations.
- *
+ *
* @param containerName The container name.
* @param blob The blob name.
* @param leaseId Specifies the current lease ID on the resource.
@@ -4268,14 +4416,16 @@ public Mono> changeLeaseNoCustomHeadersWithResponseAsync(String c
= ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince);
DateTimeRfc1123 ifUnmodifiedSinceConverted
= ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince);
- return FluxUtil.withContext(context -> service.changeLeaseNoCustomHeaders(this.client.getUrl(), containerName,
- blob, comp, action, timeout, leaseId, proposedLeaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted,
- ifMatch, ifNoneMatch, ifTags, this.client.getVersion(), requestId, accept, context));
+ return FluxUtil
+ .withContext(context -> service.changeLeaseNoCustomHeaders(this.client.getUrl(), containerName, blob, comp,
+ action, timeout, leaseId, proposedLeaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted,
+ ifMatch, ifNoneMatch, ifTags, this.client.getVersion(), requestId, accept, context))
+ .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException);
}
/**
* [Update] The Lease Blob operation establishes and manages a lock on a blob for write and delete operations.
- *
+ *
* @param containerName The container name.
* @param blob The blob name.
* @param leaseId Specifies the current lease ID on the resource.
@@ -4312,14 +4462,16 @@ public Mono> changeLeaseNoCustomHeadersWithResponseAsync(String c
= ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince);
DateTimeRfc1123 ifUnmodifiedSinceConverted
= ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince);
- return service.changeLeaseNoCustomHeaders(this.client.getUrl(), containerName, blob, comp, action, timeout,
- leaseId, proposedLeaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch,
- ifTags, this.client.getVersion(), requestId, accept, context);
+ return service
+ .changeLeaseNoCustomHeaders(this.client.getUrl(), containerName, blob, comp, action, timeout, leaseId,
+ proposedLeaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags,
+ this.client.getVersion(), requestId, accept, context)
+ .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException);
}
/**
* [Update] The Lease Blob operation establishes and manages a lock on a blob for write and delete operations.
- *
+ *
* @param containerName The container name.
* @param blob The blob name.
* @param timeout The timeout parameter is expressed in seconds. For more information, see <a
@@ -4356,14 +4508,16 @@ public Mono> breakLeaseWithResponseAs
= ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince);
DateTimeRfc1123 ifUnmodifiedSinceConverted
= ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince);
- return FluxUtil.withContext(context -> service.breakLease(this.client.getUrl(), containerName, blob, comp,
- action, timeout, breakPeriod, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch,
- ifTags, this.client.getVersion(), requestId, accept, context));
+ return FluxUtil
+ .withContext(context -> service.breakLease(this.client.getUrl(), containerName, blob, comp, action, timeout,
+ breakPeriod, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags,
+ this.client.getVersion(), requestId, accept, context))
+ .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException);
}
/**
* [Update] The Lease Blob operation establishes and manages a lock on a blob for write and delete operations.
- *
+ *
* @param containerName The container name.
* @param blob The blob name.
* @param timeout The timeout parameter is expressed in seconds. For more information, see <a
@@ -4402,14 +4556,16 @@ public Mono> breakLeaseWithResponseAs
= ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince);
DateTimeRfc1123 ifUnmodifiedSinceConverted
= ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince);
- return service.breakLease(this.client.getUrl(), containerName, blob, comp, action, timeout, breakPeriod,
- ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags,
- this.client.getVersion(), requestId, accept, context);
+ return service
+ .breakLease(this.client.getUrl(), containerName, blob, comp, action, timeout, breakPeriod,
+ ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags,
+ this.client.getVersion(), requestId, accept, context)
+ .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException);
}
/**
* [Update] The Lease Blob operation establishes and manages a lock on a blob for write and delete operations.
- *
+ *
* @param containerName The container name.
* @param blob The blob name.
* @param timeout The timeout parameter is expressed in seconds. For more information, see <a
@@ -4440,12 +4596,14 @@ public Mono breakLeaseAsync(String containerName, String blob, Integer tim
OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch,
String ifTags, String requestId) {
return breakLeaseWithResponseAsync(containerName, blob, timeout, breakPeriod, ifModifiedSince,
- ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, requestId).flatMap(ignored -> Mono.empty());
+ ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, requestId)
+ .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException)
+ .flatMap(ignored -> Mono.empty());
}
/**
* [Update] The Lease Blob operation establishes and manages a lock on a blob for write and delete operations.
- *
+ *
* @param containerName The container name.
* @param blob The blob name.
* @param timeout The timeout parameter is expressed in seconds. For more information, see <a
@@ -4477,12 +4635,14 @@ public Mono breakLeaseAsync(String containerName, String blob, Integer tim
OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch,
String ifTags, String requestId, Context context) {
return breakLeaseWithResponseAsync(containerName, blob, timeout, breakPeriod, ifModifiedSince,
- ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, requestId, context).flatMap(ignored -> Mono.empty());
+ ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, requestId, context)
+ .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException)
+ .flatMap(ignored -> Mono.empty());
}
/**
* [Update] The Lease Blob operation establishes and manages a lock on a blob for write and delete operations.
- *
+ *
* @param containerName The container name.
* @param blob The blob name.
* @param timeout The timeout parameter is expressed in seconds. For more information, see <a
@@ -4519,14 +4679,16 @@ public Mono> breakLeaseNoCustomHeadersWithResponseAsync(String co
= ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince);
DateTimeRfc1123 ifUnmodifiedSinceConverted
= ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince);
- return FluxUtil.withContext(context -> service.breakLeaseNoCustomHeaders(this.client.getUrl(), containerName,
- blob, comp, action, timeout, breakPeriod, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch,
- ifNoneMatch, ifTags, this.client.getVersion(), requestId, accept, context));
+ return FluxUtil
+ .withContext(context -> service.breakLeaseNoCustomHeaders(this.client.getUrl(), containerName, blob, comp,
+ action, timeout, breakPeriod, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch,
+ ifNoneMatch, ifTags, this.client.getVersion(), requestId, accept, context))
+ .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException);
}
/**
* [Update] The Lease Blob operation establishes and manages a lock on a blob for write and delete operations.
- *
+ *
* @param containerName The container name.
* @param blob The blob name.
* @param timeout The timeout parameter is expressed in seconds. For more information, see <a
@@ -4564,14 +4726,16 @@ public Mono> breakLeaseNoCustomHeadersWithResponseAsync(String co
= ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince);
DateTimeRfc1123 ifUnmodifiedSinceConverted
= ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince);
- return service.breakLeaseNoCustomHeaders(this.client.getUrl(), containerName, blob, comp, action, timeout,
- breakPeriod, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags,
- this.client.getVersion(), requestId, accept, context);
+ return service
+ .breakLeaseNoCustomHeaders(this.client.getUrl(), containerName, blob, comp, action, timeout, breakPeriod,
+ ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags,
+ this.client.getVersion(), requestId, accept, context)
+ .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException);
}
/**
* 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
@@ -4631,15 +4795,17 @@ public Mono> createSnapshotWithRe
= ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince);
DateTimeRfc1123 ifUnmodifiedSinceConverted
= ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince);
- return FluxUtil.withContext(context -> service.createSnapshot(this.client.getUrl(), containerName, blob, comp,
- timeout, metadata, encryptionKey, encryptionKeySha256, encryptionAlgorithm, encryptionScope,
- ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, leaseId,
- this.client.getVersion(), requestId, accept, context));
+ return FluxUtil
+ .withContext(context -> service.createSnapshot(this.client.getUrl(), containerName, blob, comp, timeout,
+ metadata, encryptionKey, encryptionKeySha256, encryptionAlgorithm, encryptionScope,
+ ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, leaseId,
+ this.client.getVersion(), requestId, accept, context))
+ .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException);
}
/**
* The Create Snapshot operation creates a read-only snapshot of a blob.
- *
+ *
* @param containerName The container name.
* @param blob The blob name.
* @param timeout The timeout parameter is expressed in seconds. For more information, see <a
@@ -4700,15 +4866,17 @@ public Mono> createSnapshotWithRe
= ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince);
DateTimeRfc1123 ifUnmodifiedSinceConverted
= ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince);
- return service.createSnapshot(this.client.getUrl(), containerName, blob, comp, timeout, metadata, encryptionKey,
- encryptionKeySha256, encryptionAlgorithm, encryptionScope, ifModifiedSinceConverted,
- ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, leaseId, this.client.getVersion(), requestId,
- accept, context);
+ return service
+ .createSnapshot(this.client.getUrl(), containerName, blob, comp, timeout, metadata, encryptionKey,
+ encryptionKeySha256, encryptionAlgorithm, encryptionScope, ifModifiedSinceConverted,
+ ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, leaseId, this.client.getVersion(), requestId,
+ accept, context)
+ .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException);
}
/**
* The Create Snapshot operation creates a read-only snapshot of a blob.
- *
+ *
* @param containerName The container name.
* @param blob The blob name.
* @param timeout The timeout parameter is expressed in seconds. For more information, see <a
@@ -4744,12 +4912,13 @@ public Mono createSnapshotAsync(String containerName, String blob, Integer
EncryptionScope encryptionScopeParam) {
return createSnapshotWithResponseAsync(containerName, blob, timeout, metadata, ifModifiedSince,
ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, leaseId, requestId, cpkInfo, encryptionScopeParam)
+ .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException)
.flatMap(ignored -> Mono.empty());
}
/**
* The Create Snapshot operation creates a read-only snapshot of a blob.
- *
+ *
* @param containerName The container name.
* @param blob The blob name.
* @param timeout The timeout parameter is expressed in seconds. For more information, see <a
@@ -4786,12 +4955,13 @@ public Mono createSnapshotAsync(String containerName, String blob, Integer
EncryptionScope encryptionScopeParam, Context context) {
return createSnapshotWithResponseAsync(containerName, blob, timeout, metadata, ifModifiedSince,
ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, leaseId, requestId, cpkInfo, encryptionScopeParam, context)
+ .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException)
.flatMap(ignored -> Mono.empty());
}
/**
* The Create Snapshot operation creates a read-only snapshot of a blob.
- *
+ *
* @param containerName The container name.
* @param blob The blob name.
* @param timeout The timeout parameter is expressed in seconds. For more information, see <a
@@ -4851,15 +5021,17 @@ public Mono> createSnapshotNoCustomHeadersWithResponseAsync(Strin
= ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince);
DateTimeRfc1123 ifUnmodifiedSinceConverted
= ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince);
- return FluxUtil.withContext(context -> service.createSnapshotNoCustomHeaders(this.client.getUrl(),
- containerName, blob, comp, timeout, metadata, encryptionKey, encryptionKeySha256, encryptionAlgorithm,
- encryptionScope, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags,
- leaseId, this.client.getVersion(), requestId, accept, context));
+ return FluxUtil
+ .withContext(context -> service.createSnapshotNoCustomHeaders(this.client.getUrl(), containerName, blob,
+ comp, timeout, metadata, encryptionKey, encryptionKeySha256, encryptionAlgorithm, encryptionScope,
+ ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, leaseId,
+ this.client.getVersion(), requestId, accept, context))
+ .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException);
}
/**
* The Create Snapshot operation creates a read-only snapshot of a blob.
- *
+ *
* @param containerName The container name.
* @param blob The blob name.
* @param timeout The timeout parameter is expressed in seconds. For more information, see <a
@@ -4920,15 +5092,17 @@ public Mono> createSnapshotNoCustomHeadersWithResponseAsync(Strin
= ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince);
DateTimeRfc1123 ifUnmodifiedSinceConverted
= ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince);
- return service.createSnapshotNoCustomHeaders(this.client.getUrl(), containerName, blob, comp, timeout, metadata,
- encryptionKey, encryptionKeySha256, encryptionAlgorithm, encryptionScope, ifModifiedSinceConverted,
- ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, leaseId, this.client.getVersion(), requestId,
- accept, context);
+ return service
+ .createSnapshotNoCustomHeaders(this.client.getUrl(), containerName, blob, comp, timeout, metadata,
+ encryptionKey, encryptionKeySha256, encryptionAlgorithm, encryptionScope, ifModifiedSinceConverted,
+ ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, leaseId, this.client.getVersion(), requestId,
+ accept, context)
+ .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException);
}
/**
* The 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
@@ -4996,12 +5170,13 @@ public Mono> startCopyFromURLWi
metadata, tier, rehydratePriority, sourceIfModifiedSinceConverted, sourceIfUnmodifiedSinceConverted,
sourceIfMatch, sourceIfNoneMatch, sourceIfTags, ifModifiedSinceConverted, ifUnmodifiedSinceConverted,
ifMatch, ifNoneMatch, ifTags, copySource, leaseId, this.client.getVersion(), requestId, blobTagsString,
- sealBlob, immutabilityPolicyExpiryConverted, immutabilityPolicyMode, legalHold, accept, context));
+ sealBlob, immutabilityPolicyExpiryConverted, immutabilityPolicyMode, legalHold, accept, context))
+ .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException);
}
/**
* The Start Copy From URL operation copies a blob or an internet resource to a new blob.
- *
+ *
* @param containerName The container name.
* @param blob The blob name.
* @param copySource Specifies the name of the source page blob snapshot. This value is a URL of up to 2 KB in
@@ -5066,16 +5241,18 @@ public Mono> startCopyFromURLWi
= ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince);
DateTimeRfc1123 immutabilityPolicyExpiryConverted
= immutabilityPolicyExpiry == null ? null : new DateTimeRfc1123(immutabilityPolicyExpiry);
- return service.startCopyFromURL(this.client.getUrl(), containerName, blob, timeout, metadata, tier,
- rehydratePriority, sourceIfModifiedSinceConverted, sourceIfUnmodifiedSinceConverted, sourceIfMatch,
- sourceIfNoneMatch, sourceIfTags, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch,
- ifTags, copySource, leaseId, this.client.getVersion(), requestId, blobTagsString, sealBlob,
- immutabilityPolicyExpiryConverted, immutabilityPolicyMode, legalHold, accept, context);
+ return service
+ .startCopyFromURL(this.client.getUrl(), containerName, blob, timeout, metadata, tier, rehydratePriority,
+ sourceIfModifiedSinceConverted, sourceIfUnmodifiedSinceConverted, sourceIfMatch, sourceIfNoneMatch,
+ sourceIfTags, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags,
+ copySource, leaseId, this.client.getVersion(), requestId, blobTagsString, sealBlob,
+ immutabilityPolicyExpiryConverted, immutabilityPolicyMode, legalHold, accept, context)
+ .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException);
}
/**
* The Start Copy From URL operation copies a blob or an internet resource to a new blob.
- *
+ *
* @param containerName The container name.
* @param blob The blob name.
* @param copySource Specifies the name of the source page blob snapshot. This value is a URL of up to 2 KB in
@@ -5131,12 +5308,13 @@ public Mono startCopyFromURLAsync(String containerName, String blob, Strin
rehydratePriority, sourceIfModifiedSince, sourceIfUnmodifiedSince, sourceIfMatch, sourceIfNoneMatch,
sourceIfTags, ifModifiedSince, ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, leaseId, requestId,
blobTagsString, sealBlob, immutabilityPolicyExpiry, immutabilityPolicyMode, legalHold)
+ .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException)
.flatMap(ignored -> Mono.empty());
}
/**
* The Start Copy From URL operation copies a blob or an internet resource to a new blob.
- *
+ *
* @param containerName The container name.
* @param blob The blob name.
* @param copySource Specifies the name of the source page blob snapshot. This value is a URL of up to 2 KB in
@@ -5193,12 +5371,13 @@ public Mono startCopyFromURLAsync(String containerName, String blob, Strin
rehydratePriority, sourceIfModifiedSince, sourceIfUnmodifiedSince, sourceIfMatch, sourceIfNoneMatch,
sourceIfTags, ifModifiedSince, ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, leaseId, requestId,
blobTagsString, sealBlob, immutabilityPolicyExpiry, immutabilityPolicyMode, legalHold, context)
+ .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException)
.flatMap(ignored -> Mono.empty());
}
/**
* The Start Copy From URL operation copies a blob or an internet resource to a new blob.
- *
+ *
* @param containerName The container name.
* @param blob The blob name.
* @param copySource Specifies the name of the source page blob snapshot. This value is a URL of up to 2 KB in
@@ -5261,17 +5440,19 @@ public Mono> startCopyFromURLNoCustomHeadersWithResponseAsync(Str
= ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince);
DateTimeRfc1123 immutabilityPolicyExpiryConverted
= immutabilityPolicyExpiry == null ? null : new DateTimeRfc1123(immutabilityPolicyExpiry);
- return FluxUtil.withContext(
- context -> service.startCopyFromURLNoCustomHeaders(this.client.getUrl(), containerName, blob, timeout,
- metadata, tier, rehydratePriority, sourceIfModifiedSinceConverted, sourceIfUnmodifiedSinceConverted,
- sourceIfMatch, sourceIfNoneMatch, sourceIfTags, ifModifiedSinceConverted, ifUnmodifiedSinceConverted,
- ifMatch, ifNoneMatch, ifTags, copySource, leaseId, this.client.getVersion(), requestId, blobTagsString,
- sealBlob, immutabilityPolicyExpiryConverted, immutabilityPolicyMode, legalHold, accept, context));
+ return FluxUtil
+ .withContext(context -> service.startCopyFromURLNoCustomHeaders(this.client.getUrl(), containerName, blob,
+ timeout, metadata, tier, rehydratePriority, sourceIfModifiedSinceConverted,
+ sourceIfUnmodifiedSinceConverted, sourceIfMatch, sourceIfNoneMatch, sourceIfTags,
+ ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, copySource, leaseId,
+ this.client.getVersion(), requestId, blobTagsString, sealBlob, immutabilityPolicyExpiryConverted,
+ immutabilityPolicyMode, legalHold, accept, context))
+ .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException);
}
/**
* The Start Copy From URL operation copies a blob or an internet resource to a new blob.
- *
+ *
* @param containerName The container name.
* @param blob The blob name.
* @param copySource Specifies the name of the source page blob snapshot. This value is a URL of up to 2 KB in
@@ -5336,17 +5517,19 @@ public Mono> startCopyFromURLNoCustomHeadersWithResponseAsync(Str
= ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince);
DateTimeRfc1123 immutabilityPolicyExpiryConverted
= immutabilityPolicyExpiry == null ? null : new DateTimeRfc1123(immutabilityPolicyExpiry);
- return service.startCopyFromURLNoCustomHeaders(this.client.getUrl(), containerName, blob, timeout, metadata,
- tier, rehydratePriority, sourceIfModifiedSinceConverted, sourceIfUnmodifiedSinceConverted, sourceIfMatch,
- sourceIfNoneMatch, sourceIfTags, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch,
- ifTags, copySource, leaseId, this.client.getVersion(), requestId, blobTagsString, sealBlob,
- immutabilityPolicyExpiryConverted, immutabilityPolicyMode, legalHold, accept, context);
+ return service
+ .startCopyFromURLNoCustomHeaders(this.client.getUrl(), containerName, blob, timeout, metadata, tier,
+ rehydratePriority, sourceIfModifiedSinceConverted, sourceIfUnmodifiedSinceConverted, sourceIfMatch,
+ sourceIfNoneMatch, sourceIfTags, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch,
+ ifNoneMatch, ifTags, copySource, leaseId, this.client.getVersion(), requestId, blobTagsString, sealBlob,
+ immutabilityPolicyExpiryConverted, immutabilityPolicyMode, legalHold, accept, context)
+ .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException);
}
/**
* The 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
@@ -5420,18 +5603,20 @@ public Mono> copyFromURLWithResponse
String sourceContentMD5Converted = Base64Util.encodeToString(sourceContentMD5);
DateTimeRfc1123 immutabilityPolicyExpiryConverted
= immutabilityPolicyExpiry == null ? null : new DateTimeRfc1123(immutabilityPolicyExpiry);
- return FluxUtil.withContext(context -> service.copyFromURL(this.client.getUrl(), containerName, blob,
- xMsRequiresSync, timeout, metadata, tier, sourceIfModifiedSinceConverted, sourceIfUnmodifiedSinceConverted,
- sourceIfMatch, sourceIfNoneMatch, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch,
- ifNoneMatch, ifTags, copySource, leaseId, this.client.getVersion(), requestId, sourceContentMD5Converted,
- blobTagsString, immutabilityPolicyExpiryConverted, immutabilityPolicyMode, legalHold,
- copySourceAuthorization, encryptionScope, copySourceTags, accept, context));
+ return FluxUtil
+ .withContext(context -> service.copyFromURL(this.client.getUrl(), containerName, blob, xMsRequiresSync,
+ timeout, metadata, tier, sourceIfModifiedSinceConverted, sourceIfUnmodifiedSinceConverted,
+ sourceIfMatch, sourceIfNoneMatch, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch,
+ ifNoneMatch, ifTags, copySource, leaseId, this.client.getVersion(), requestId,
+ sourceContentMD5Converted, blobTagsString, immutabilityPolicyExpiryConverted, immutabilityPolicyMode,
+ legalHold, copySourceAuthorization, encryptionScope, copySourceTags, accept, context))
+ .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException);
}
/**
* The Copy From URL operation copies a blob or an internet resource to a new blob. It will not return a response
* until the copy is complete.
- *
+ *
* @param containerName The container name.
* @param blob The blob name.
* @param copySource Specifies the name of the source page blob snapshot. This value is a URL of up to 2 KB in
@@ -5506,18 +5691,20 @@ public Mono> copyFromURLWithResponse
String sourceContentMD5Converted = Base64Util.encodeToString(sourceContentMD5);
DateTimeRfc1123 immutabilityPolicyExpiryConverted
= immutabilityPolicyExpiry == null ? null : new DateTimeRfc1123(immutabilityPolicyExpiry);
- return service.copyFromURL(this.client.getUrl(), containerName, blob, xMsRequiresSync, timeout, metadata, tier,
- sourceIfModifiedSinceConverted, sourceIfUnmodifiedSinceConverted, sourceIfMatch, sourceIfNoneMatch,
- ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, copySource, leaseId,
- this.client.getVersion(), requestId, sourceContentMD5Converted, blobTagsString,
- immutabilityPolicyExpiryConverted, immutabilityPolicyMode, legalHold, copySourceAuthorization,
- encryptionScope, copySourceTags, accept, context);
+ return service
+ .copyFromURL(this.client.getUrl(), containerName, blob, xMsRequiresSync, timeout, metadata, tier,
+ sourceIfModifiedSinceConverted, sourceIfUnmodifiedSinceConverted, sourceIfMatch, sourceIfNoneMatch,
+ ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, copySource, leaseId,
+ this.client.getVersion(), requestId, sourceContentMD5Converted, blobTagsString,
+ immutabilityPolicyExpiryConverted, immutabilityPolicyMode, legalHold, copySourceAuthorization,
+ encryptionScope, copySourceTags, accept, context)
+ .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException);
}
/**
* The Copy From URL operation copies a blob or an internet resource to a new blob. It will not return a response
* until the copy is complete.
- *
+ *
* @param containerName The container name.
* @param blob The blob name.
* @param copySource Specifies the name of the source page blob snapshot. This value is a URL of up to 2 KB in
@@ -5576,13 +5763,14 @@ public Mono copyFromURLAsync(String containerName, String blob, String cop
sourceIfModifiedSince, sourceIfUnmodifiedSince, sourceIfMatch, sourceIfNoneMatch, ifModifiedSince,
ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, leaseId, requestId, sourceContentMD5, blobTagsString,
immutabilityPolicyExpiry, immutabilityPolicyMode, legalHold, copySourceAuthorization, copySourceTags,
- encryptionScopeParam).flatMap(ignored -> Mono.empty());
+ encryptionScopeParam).onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException)
+ .flatMap(ignored -> Mono.empty());
}
/**
* The Copy From URL operation copies a blob or an internet resource to a new blob. It will not return a response
* until the copy is complete.
- *
+ *
* @param containerName The container name.
* @param blob The blob name.
* @param copySource Specifies the name of the source page blob snapshot. This value is a URL of up to 2 KB in
@@ -5643,13 +5831,15 @@ public Mono copyFromURLAsync(String containerName, String blob, String cop
sourceIfModifiedSince, sourceIfUnmodifiedSince, sourceIfMatch, sourceIfNoneMatch, ifModifiedSince,
ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, leaseId, requestId, sourceContentMD5, blobTagsString,
immutabilityPolicyExpiry, immutabilityPolicyMode, legalHold, copySourceAuthorization, copySourceTags,
- encryptionScopeParam, context).flatMap(ignored -> Mono.empty());
+ encryptionScopeParam, context)
+ .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException)
+ .flatMap(ignored -> Mono.empty());
}
/**
* The Copy From URL operation copies a blob or an internet resource to a new blob. It will not return a response
* until the copy is complete.
- *
+ *
* @param containerName The container name.
* @param blob The blob name.
* @param copySource Specifies the name of the source page blob snapshot. This value is a URL of up to 2 KB in
@@ -5723,19 +5913,21 @@ public Mono> copyFromURLNoCustomHeadersWithResponseAsync(String c
String sourceContentMD5Converted = Base64Util.encodeToString(sourceContentMD5);
DateTimeRfc1123 immutabilityPolicyExpiryConverted
= immutabilityPolicyExpiry == null ? null : new DateTimeRfc1123(immutabilityPolicyExpiry);
- return FluxUtil.withContext(
- context -> service.copyFromURLNoCustomHeaders(this.client.getUrl(), containerName, blob, xMsRequiresSync,
- timeout, metadata, tier, sourceIfModifiedSinceConverted, sourceIfUnmodifiedSinceConverted,
- sourceIfMatch, sourceIfNoneMatch, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch,
- ifNoneMatch, ifTags, copySource, leaseId, this.client.getVersion(), requestId,
- sourceContentMD5Converted, blobTagsString, immutabilityPolicyExpiryConverted, immutabilityPolicyMode,
- legalHold, copySourceAuthorization, encryptionScope, copySourceTags, accept, context));
+ return FluxUtil
+ .withContext(context -> service.copyFromURLNoCustomHeaders(this.client.getUrl(), containerName, blob,
+ xMsRequiresSync, timeout, metadata, tier, sourceIfModifiedSinceConverted,
+ sourceIfUnmodifiedSinceConverted, sourceIfMatch, sourceIfNoneMatch, ifModifiedSinceConverted,
+ ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, copySource, leaseId, this.client.getVersion(),
+ requestId, sourceContentMD5Converted, blobTagsString, immutabilityPolicyExpiryConverted,
+ immutabilityPolicyMode, legalHold, copySourceAuthorization, encryptionScope, copySourceTags, accept,
+ context))
+ .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException);
}
/**
* The Copy From URL operation copies a blob or an internet resource to a new blob. It will not return a response
* until the copy is complete.
- *
+ *
* @param containerName The container name.
* @param blob The blob name.
* @param copySource Specifies the name of the source page blob snapshot. This value is a URL of up to 2 KB in
@@ -5810,18 +6002,20 @@ public Mono> copyFromURLNoCustomHeadersWithResponseAsync(String c
String sourceContentMD5Converted = Base64Util.encodeToString(sourceContentMD5);
DateTimeRfc1123 immutabilityPolicyExpiryConverted
= immutabilityPolicyExpiry == null ? null : new DateTimeRfc1123(immutabilityPolicyExpiry);
- return service.copyFromURLNoCustomHeaders(this.client.getUrl(), containerName, blob, xMsRequiresSync, timeout,
- metadata, tier, sourceIfModifiedSinceConverted, sourceIfUnmodifiedSinceConverted, sourceIfMatch,
- sourceIfNoneMatch, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags,
- copySource, leaseId, this.client.getVersion(), requestId, sourceContentMD5Converted, blobTagsString,
- immutabilityPolicyExpiryConverted, immutabilityPolicyMode, legalHold, copySourceAuthorization,
- encryptionScope, copySourceTags, accept, context);
+ return service
+ .copyFromURLNoCustomHeaders(this.client.getUrl(), containerName, blob, xMsRequiresSync, timeout, metadata,
+ tier, sourceIfModifiedSinceConverted, sourceIfUnmodifiedSinceConverted, sourceIfMatch,
+ sourceIfNoneMatch, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags,
+ copySource, leaseId, this.client.getVersion(), requestId, sourceContentMD5Converted, blobTagsString,
+ immutabilityPolicyExpiryConverted, immutabilityPolicyMode, legalHold, copySourceAuthorization,
+ encryptionScope, copySourceTags, accept, context)
+ .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException);
}
/**
* The Abort Copy From URL operation aborts a pending Copy From URL operation, and leaves a destination blob with
* zero length and full metadata.
- *
+ *
* @param containerName The container name.
* @param blob The blob name.
* @param copyId The copy identifier provided in the x-ms-copy-id header of the original Copy Blob operation.
@@ -5843,13 +6037,14 @@ public Mono> abortCopyFromURLWi
final String copyActionAbortConstant = "abort";
final String accept = "application/xml";
return FluxUtil.withContext(context -> service.abortCopyFromURL(this.client.getUrl(), containerName, blob, comp,
- copyActionAbortConstant, copyId, timeout, leaseId, this.client.getVersion(), requestId, accept, context));
+ copyActionAbortConstant, copyId, timeout, leaseId, this.client.getVersion(), requestId, accept, context))
+ .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException);
}
/**
* The Abort Copy From URL operation aborts a pending Copy From URL operation, and leaves a destination blob with
* zero length and full metadata.
- *
+ *
* @param containerName The container name.
* @param blob The blob name.
* @param copyId The copy identifier provided in the x-ms-copy-id header of the original Copy Blob operation.
@@ -5872,14 +6067,16 @@ public Mono> abortCopyFromURLWi
final String comp = "copy";
final String copyActionAbortConstant = "abort";
final String accept = "application/xml";
- return service.abortCopyFromURL(this.client.getUrl(), containerName, blob, comp, copyActionAbortConstant,
- copyId, timeout, leaseId, this.client.getVersion(), requestId, accept, context);
+ return service
+ .abortCopyFromURL(this.client.getUrl(), containerName, blob, comp, copyActionAbortConstant, copyId, timeout,
+ leaseId, this.client.getVersion(), requestId, accept, context)
+ .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException);
}
/**
* The Abort Copy From URL operation aborts a pending Copy From URL operation, and leaves a destination blob with
* zero length and full metadata.
- *
+ *
* @param containerName The container name.
* @param blob The blob name.
* @param copyId The copy identifier provided in the x-ms-copy-id header of the original Copy Blob operation.
@@ -5898,13 +6095,14 @@ public Mono> abortCopyFromURLWi
public Mono abortCopyFromURLAsync(String containerName, String blob, String copyId, Integer timeout,
String leaseId, String requestId) {
return abortCopyFromURLWithResponseAsync(containerName, blob, copyId, timeout, leaseId, requestId)
+ .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException)
.flatMap(ignored -> Mono.empty());
}
/**
* The Abort Copy From URL operation aborts a pending Copy From URL operation, and leaves a destination blob with
* zero length and full metadata.
- *
+ *
* @param containerName The container name.
* @param blob The blob name.
* @param copyId The copy identifier provided in the x-ms-copy-id header of the original Copy Blob operation.
@@ -5924,13 +6122,14 @@ public Mono abortCopyFromURLAsync(String containerName, String blob, Strin
public Mono abortCopyFromURLAsync(String containerName, String blob, String copyId, Integer timeout,
String leaseId, String requestId, Context context) {
return abortCopyFromURLWithResponseAsync(containerName, blob, copyId, timeout, leaseId, requestId, context)
+ .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException)
.flatMap(ignored -> Mono.empty());
}
/**
* The Abort Copy From URL operation aborts a pending Copy From URL operation, and leaves a destination blob with
* zero length and full metadata.
- *
+ *
* @param containerName The container name.
* @param blob The blob name.
* @param copyId The copy identifier provided in the x-ms-copy-id header of the original Copy Blob operation.
@@ -5953,13 +6152,14 @@ public Mono> abortCopyFromURLNoCustomHeadersWithResponseAsync(Str
final String accept = "application/xml";
return FluxUtil.withContext(context -> service.abortCopyFromURLNoCustomHeaders(this.client.getUrl(),
containerName, blob, comp, copyActionAbortConstant, copyId, timeout, leaseId, this.client.getVersion(),
- requestId, accept, context));
+ requestId, accept, context))
+ .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException);
}
/**
* The Abort Copy From URL operation aborts a pending Copy From URL operation, and leaves a destination blob with
* zero length and full metadata.
- *
+ *
* @param containerName The container name.
* @param blob The blob name.
* @param copyId The copy identifier provided in the x-ms-copy-id header of the original Copy Blob operation.
@@ -5981,8 +6181,10 @@ public Mono> abortCopyFromURLNoCustomHeadersWithResponseAsync(Str
final String comp = "copy";
final String copyActionAbortConstant = "abort";
final String accept = "application/xml";
- return service.abortCopyFromURLNoCustomHeaders(this.client.getUrl(), containerName, blob, comp,
- copyActionAbortConstant, copyId, timeout, leaseId, this.client.getVersion(), requestId, accept, context);
+ return service
+ .abortCopyFromURLNoCustomHeaders(this.client.getUrl(), containerName, blob, comp, copyActionAbortConstant,
+ copyId, timeout, leaseId, this.client.getVersion(), requestId, accept, context)
+ .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException);
}
/**
@@ -5990,7 +6192,7 @@ public Mono> abortCopyFromURLNoCustomHeadersWithResponseAsync(Str
* 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.
@@ -6019,9 +6221,11 @@ public Mono> setTierWithResponseAsync(St
String requestId, String leaseId, String ifTags) {
final String comp = "tier";
final String accept = "application/xml";
- return FluxUtil.withContext(
- context -> service.setTier(this.client.getUrl(), containerName, blob, comp, snapshot, versionId, timeout,
- tier, rehydratePriority, this.client.getVersion(), requestId, leaseId, ifTags, accept, context));
+ return FluxUtil
+ .withContext(context -> service.setTier(this.client.getUrl(), containerName, blob, comp, snapshot,
+ versionId, timeout, tier, rehydratePriority, this.client.getVersion(), requestId, leaseId, ifTags,
+ accept, context))
+ .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException);
}
/**
@@ -6029,7 +6233,7 @@ public Mono> setTierWithResponseAsync(St
* 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.
@@ -6059,8 +6263,10 @@ public Mono> setTierWithResponseAsync(St
String requestId, String leaseId, String ifTags, Context context) {
final String comp = "tier";
final String accept = "application/xml";
- return service.setTier(this.client.getUrl(), containerName, blob, comp, snapshot, versionId, timeout, tier,
- rehydratePriority, this.client.getVersion(), requestId, leaseId, ifTags, accept, context);
+ return service
+ .setTier(this.client.getUrl(), containerName, blob, comp, snapshot, versionId, timeout, tier,
+ rehydratePriority, this.client.getVersion(), requestId, leaseId, ifTags, accept, context)
+ .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException);
}
/**
@@ -6068,7 +6274,7 @@ public Mono> setTierWithResponseAsync(St
* 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.
@@ -6096,7 +6302,9 @@ public Mono setTierAsync(String containerName, String blob, AccessTier tie
String versionId, Integer timeout, RehydratePriority rehydratePriority, String requestId, String leaseId,
String ifTags) {
return setTierWithResponseAsync(containerName, blob, tier, snapshot, versionId, timeout, rehydratePriority,
- requestId, leaseId, ifTags).flatMap(ignored -> Mono.empty());
+ requestId, leaseId, ifTags)
+ .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException)
+ .flatMap(ignored -> Mono.empty());
}
/**
@@ -6104,7 +6312,7 @@ public Mono setTierAsync(String containerName, String blob, AccessTier tie
* 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.
@@ -6133,7 +6341,9 @@ public Mono setTierAsync(String containerName, String blob, AccessTier tie
String versionId, Integer timeout, RehydratePriority rehydratePriority, String requestId, String leaseId,
String ifTags, Context context) {
return setTierWithResponseAsync(containerName, blob, tier, snapshot, versionId, timeout, rehydratePriority,
- requestId, leaseId, ifTags, context).flatMap(ignored -> Mono.empty());
+ requestId, leaseId, ifTags, context)
+ .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException)
+ .flatMap(ignored -> Mono.empty());
}
/**
@@ -6141,7 +6351,7 @@ public Mono setTierAsync(String containerName, String blob, AccessTier tie
* 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.
@@ -6170,9 +6380,11 @@ public Mono> setTierNoCustomHeadersWithResponseAsync(String conta
String requestId, String leaseId, String ifTags) {
final String comp = "tier";
final String accept = "application/xml";
- return FluxUtil.withContext(context -> service.setTierNoCustomHeaders(this.client.getUrl(), containerName, blob,
- comp, snapshot, versionId, timeout, tier, rehydratePriority, this.client.getVersion(), requestId, leaseId,
- ifTags, accept, context));
+ return FluxUtil
+ .withContext(context -> service.setTierNoCustomHeaders(this.client.getUrl(), containerName, blob, comp,
+ snapshot, versionId, timeout, tier, rehydratePriority, this.client.getVersion(), requestId, leaseId,
+ ifTags, accept, context))
+ .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException);
}
/**
@@ -6180,7 +6392,7 @@ public Mono> setTierNoCustomHeadersWithResponseAsync(String conta
* account and on a block blob in a blob storage account (locally redundant storage only). A premium page blob's
* tier determines the allowed size, IOPS, and bandwidth of the blob. A block blob's tier determines
* Hot/Cool/Archive storage type. This operation does not update the blob's ETag.
- *
+ *
* @param containerName The container name.
* @param blob The blob name.
* @param tier Indicates the tier to be set on the blob.
@@ -6210,13 +6422,15 @@ public Mono> setTierNoCustomHeadersWithResponseAsync(String conta
String requestId, String leaseId, String ifTags, Context context) {
final String comp = "tier";
final String accept = "application/xml";
- return service.setTierNoCustomHeaders(this.client.getUrl(), containerName, blob, comp, snapshot, versionId,
- timeout, tier, rehydratePriority, this.client.getVersion(), requestId, leaseId, ifTags, accept, context);
+ return service
+ .setTierNoCustomHeaders(this.client.getUrl(), containerName, blob, comp, snapshot, versionId, timeout, tier,
+ rehydratePriority, this.client.getVersion(), requestId, leaseId, ifTags, accept, context)
+ .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException);
}
/**
* Returns the sku name and account kind.
- *
+ *
* @param containerName The container name.
* @param blob The blob name.
* @throws IllegalArgumentException thrown if parameters fail the validation.
@@ -6230,13 +6444,15 @@ public Mono> getAccountInfoWithRe
final String restype = "account";
final String comp = "properties";
final String accept = "application/xml";
- return FluxUtil.withContext(context -> service.getAccountInfo(this.client.getUrl(), containerName, blob,
- restype, comp, this.client.getVersion(), accept, context));
+ return FluxUtil
+ .withContext(context -> service.getAccountInfo(this.client.getUrl(), containerName, blob, restype, comp,
+ this.client.getVersion(), accept, context))
+ .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException);
}
/**
* Returns the sku name and account kind.
- *
+ *
* @param containerName The container name.
* @param blob The blob name.
* @param context The context to associate with this operation.
@@ -6251,13 +6467,15 @@ public Mono> getAccountInfoWithRe
final String restype = "account";
final String comp = "properties";
final String accept = "application/xml";
- return service.getAccountInfo(this.client.getUrl(), containerName, blob, restype, comp,
- this.client.getVersion(), accept, context);
+ return service
+ .getAccountInfo(this.client.getUrl(), containerName, blob, restype, comp, this.client.getVersion(), accept,
+ context)
+ .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException);
}
/**
* Returns the sku name and account kind.
- *
+ *
* @param containerName The container name.
* @param blob The blob name.
* @throws IllegalArgumentException thrown if parameters fail the validation.
@@ -6267,12 +6485,14 @@ public Mono> getAccountInfoWithRe
*/
@ServiceMethod(returns = ReturnType.SINGLE)
public Mono getAccountInfoAsync(String containerName, String blob) {
- return getAccountInfoWithResponseAsync(containerName, blob).flatMap(ignored -> Mono.empty());
+ return getAccountInfoWithResponseAsync(containerName, blob)
+ .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException)
+ .flatMap(ignored -> Mono.empty());
}
/**
* Returns the sku name and account kind.
- *
+ *
* @param containerName The container name.
* @param blob The blob name.
* @param context The context to associate with this operation.
@@ -6283,12 +6503,14 @@ public Mono getAccountInfoAsync(String containerName, String blob) {
*/
@ServiceMethod(returns = ReturnType.SINGLE)
public Mono getAccountInfoAsync(String containerName, String blob, Context context) {
- return getAccountInfoWithResponseAsync(containerName, blob, context).flatMap(ignored -> Mono.empty());
+ return getAccountInfoWithResponseAsync(containerName, blob, context)
+ .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException)
+ .flatMap(ignored -> Mono.empty());
}
/**
* Returns the sku name and account kind.
- *
+ *
* @param containerName The container name.
* @param blob The blob name.
* @throws IllegalArgumentException thrown if parameters fail the validation.
@@ -6301,13 +6523,15 @@ public Mono> getAccountInfoNoCustomHeadersWithResponseAsync(Strin
final String restype = "account";
final String comp = "properties";
final String accept = "application/xml";
- return FluxUtil.withContext(context -> service.getAccountInfoNoCustomHeaders(this.client.getUrl(),
- containerName, blob, restype, comp, this.client.getVersion(), accept, context));
+ return FluxUtil
+ .withContext(context -> service.getAccountInfoNoCustomHeaders(this.client.getUrl(), containerName, blob,
+ restype, comp, this.client.getVersion(), accept, context))
+ .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException);
}
/**
* Returns the sku name and account kind.
- *
+ *
* @param containerName The container name.
* @param blob The blob name.
* @param context The context to associate with this operation.
@@ -6322,13 +6546,15 @@ public Mono> getAccountInfoNoCustomHeadersWithResponseAsync(Strin
final String restype = "account";
final String comp = "properties";
final String accept = "application/xml";
- return service.getAccountInfoNoCustomHeaders(this.client.getUrl(), containerName, blob, restype, comp,
- this.client.getVersion(), accept, context);
+ return service
+ .getAccountInfoNoCustomHeaders(this.client.getUrl(), containerName, blob, restype, comp,
+ this.client.getVersion(), accept, context)
+ .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException);
}
/**
* The Query operation enables users to select/project on blob data by providing simple query expressions.
- *
+ *
* @param containerName The container name.
* @param blob The blob name.
* @param snapshot The snapshot parameter is an opaque DateTime value that, when present, specifies the blob
@@ -6381,15 +6607,17 @@ public Mono>> queryWithResponse
= ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince);
DateTimeRfc1123 ifUnmodifiedSinceConverted
= ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince);
- return FluxUtil.withContext(context -> service.query(this.client.getUrl(), containerName, blob, comp, snapshot,
- timeout, leaseId, encryptionKey, encryptionKeySha256, encryptionAlgorithm, ifModifiedSinceConverted,
- ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, this.client.getVersion(), requestId, queryRequest,
- accept, context));
+ return FluxUtil
+ .withContext(context -> service.query(this.client.getUrl(), containerName, blob, comp, snapshot, timeout,
+ leaseId, encryptionKey, encryptionKeySha256, encryptionAlgorithm, ifModifiedSinceConverted,
+ ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, this.client.getVersion(), requestId,
+ queryRequest, accept, context))
+ .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException);
}
/**
* The Query operation enables users to select/project on blob data by providing simple query expressions.
- *
+ *
* @param containerName The container name.
* @param blob The blob name.
* @param snapshot The snapshot parameter is an opaque DateTime value that, when present, specifies the blob
@@ -6443,14 +6671,16 @@ public Mono>> queryWithResponse
= ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince);
DateTimeRfc1123 ifUnmodifiedSinceConverted
= ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince);
- return service.query(this.client.getUrl(), containerName, blob, comp, snapshot, timeout, leaseId, encryptionKey,
- encryptionKeySha256, encryptionAlgorithm, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch,
- ifNoneMatch, ifTags, this.client.getVersion(), requestId, queryRequest, accept, context);
+ return service
+ .query(this.client.getUrl(), containerName, blob, comp, snapshot, timeout, leaseId, encryptionKey,
+ encryptionKeySha256, encryptionAlgorithm, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch,
+ ifNoneMatch, ifTags, this.client.getVersion(), requestId, queryRequest, accept, context)
+ .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException);
}
/**
* The Query operation enables users to select/project on blob data by providing simple query expressions.
- *
+ *
* @param containerName The container name.
* @param blob The blob name.
* @param snapshot The snapshot parameter is an opaque DateTime value that, when present, specifies the blob
@@ -6483,12 +6713,13 @@ public Flux queryAsync(String containerName, String blob, String sna
String ifNoneMatch, String ifTags, String requestId, QueryRequest queryRequest, CpkInfo cpkInfo) {
return queryWithResponseAsync(containerName, blob, snapshot, timeout, leaseId, ifModifiedSince,
ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, requestId, queryRequest, cpkInfo)
+ .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException)
.flatMapMany(fluxByteBufferResponse -> fluxByteBufferResponse.getValue());
}
/**
* The Query operation enables users to select/project on blob data by providing simple query expressions.
- *
+ *
* @param containerName The container name.
* @param blob The blob name.
* @param snapshot The snapshot parameter is an opaque DateTime value that, when present, specifies the blob
@@ -6523,12 +6754,13 @@ public Flux queryAsync(String containerName, String blob, String sna
Context context) {
return queryWithResponseAsync(containerName, blob, snapshot, timeout, leaseId, ifModifiedSince,
ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, requestId, queryRequest, cpkInfo, context)
+ .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException)
.flatMapMany(fluxByteBufferResponse -> fluxByteBufferResponse.getValue());
}
/**
* 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
@@ -6581,15 +6813,17 @@ public Mono queryNoCustomHeadersWithResponseAsync(String contain
= ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince);
DateTimeRfc1123 ifUnmodifiedSinceConverted
= ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince);
- return FluxUtil.withContext(context -> service.queryNoCustomHeaders(this.client.getUrl(), containerName, blob,
- comp, snapshot, timeout, leaseId, encryptionKey, encryptionKeySha256, encryptionAlgorithm,
- ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags,
- this.client.getVersion(), requestId, queryRequest, accept, context));
+ return FluxUtil
+ .withContext(context -> service.queryNoCustomHeaders(this.client.getUrl(), containerName, blob, comp,
+ snapshot, timeout, leaseId, encryptionKey, encryptionKeySha256, encryptionAlgorithm,
+ ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags,
+ this.client.getVersion(), requestId, queryRequest, accept, context))
+ .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException);
}
/**
* The Query operation enables users to select/project on blob data by providing simple query expressions.
- *
+ *
* @param containerName The container name.
* @param blob The blob name.
* @param snapshot The snapshot parameter is an opaque DateTime value that, when present, specifies the blob
@@ -6643,15 +6877,17 @@ public Mono queryNoCustomHeadersWithResponseAsync(String contain
= ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince);
DateTimeRfc1123 ifUnmodifiedSinceConverted
= ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince);
- return service.queryNoCustomHeaders(this.client.getUrl(), containerName, blob, comp, snapshot, timeout, leaseId,
- encryptionKey, encryptionKeySha256, encryptionAlgorithm, ifModifiedSinceConverted,
- ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, this.client.getVersion(), requestId, queryRequest,
- accept, context);
+ return service
+ .queryNoCustomHeaders(this.client.getUrl(), containerName, blob, comp, snapshot, timeout, leaseId,
+ encryptionKey, encryptionKeySha256, encryptionAlgorithm, ifModifiedSinceConverted,
+ ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, this.client.getVersion(), requestId,
+ queryRequest, accept, context)
+ .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException);
}
/**
* The 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
@@ -6677,13 +6913,15 @@ public Mono> getTagsWithResponseAsyn
Integer timeout, String requestId, String snapshot, String versionId, String ifTags, String leaseId) {
final String comp = "tags";
final String accept = "application/xml";
- return FluxUtil.withContext(context -> service.getTags(this.client.getUrl(), containerName, blob, comp, timeout,
- this.client.getVersion(), requestId, snapshot, versionId, ifTags, leaseId, accept, context));
+ return FluxUtil
+ .withContext(context -> service.getTags(this.client.getUrl(), containerName, blob, comp, timeout,
+ this.client.getVersion(), requestId, snapshot, versionId, ifTags, leaseId, accept, context))
+ .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException);
}
/**
* The Get Tags operation enables users to get the tags associated with a blob.
- *
+ *
* @param containerName The container name.
* @param blob The blob name.
* @param timeout The timeout parameter is expressed in seconds. For more information, see <a
@@ -6711,13 +6949,15 @@ public Mono> getTagsWithResponseAsyn
Context context) {
final String comp = "tags";
final String accept = "application/xml";
- return service.getTags(this.client.getUrl(), containerName, blob, comp, timeout, this.client.getVersion(),
- requestId, snapshot, versionId, ifTags, leaseId, accept, context);
+ return service
+ .getTags(this.client.getUrl(), containerName, blob, comp, timeout, this.client.getVersion(), requestId,
+ snapshot, versionId, ifTags, leaseId, accept, context)
+ .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException);
}
/**
* The Get Tags operation enables users to get the tags associated with a blob.
- *
+ *
* @param containerName The container name.
* @param blob The blob name.
* @param timeout The timeout parameter is expressed in seconds. For more information, see <a
@@ -6742,12 +6982,13 @@ public Mono> getTagsWithResponseAsyn
public Mono getTagsAsync(String containerName, String blob, Integer timeout, String requestId,
String snapshot, String versionId, String ifTags, String leaseId) {
return getTagsWithResponseAsync(containerName, blob, timeout, requestId, snapshot, versionId, ifTags, leaseId)
+ .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException)
.flatMap(res -> Mono.justOrEmpty(res.getValue()));
}
/**
* The Get Tags operation enables users to get the tags associated with a blob.
- *
+ *
* @param containerName The container name.
* @param blob The blob name.
* @param timeout The timeout parameter is expressed in seconds. For more information, see <a
@@ -6773,12 +7014,13 @@ public Mono getTagsAsync(String containerName, String blob, Integer ti
public Mono getTagsAsync(String containerName, String blob, Integer timeout, String requestId,
String snapshot, String versionId, String ifTags, String leaseId, Context context) {
return getTagsWithResponseAsync(containerName, blob, timeout, requestId, snapshot, versionId, ifTags, leaseId,
- context).flatMap(res -> Mono.justOrEmpty(res.getValue()));
+ context).onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException)
+ .flatMap(res -> Mono.justOrEmpty(res.getValue()));
}
/**
* The Get Tags operation enables users to get the tags associated with a blob.
- *
+ *
* @param containerName The container name.
* @param blob The blob name.
* @param timeout The timeout parameter is expressed in seconds. For more information, see <a
@@ -6804,13 +7046,15 @@ public Mono> getTagsNoCustomHeadersWithResponseAsync(String c
Integer timeout, String requestId, String snapshot, String versionId, String ifTags, String leaseId) {
final String comp = "tags";
final String accept = "application/xml";
- return FluxUtil.withContext(context -> service.getTagsNoCustomHeaders(this.client.getUrl(), containerName, blob,
- comp, timeout, this.client.getVersion(), requestId, snapshot, versionId, ifTags, leaseId, accept, context));
+ return FluxUtil
+ .withContext(context -> service.getTagsNoCustomHeaders(this.client.getUrl(), containerName, blob, comp,
+ timeout, this.client.getVersion(), requestId, snapshot, versionId, ifTags, leaseId, accept, context))
+ .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException);
}
/**
* The Get Tags operation enables users to get the tags associated with a blob.
- *
+ *
* @param containerName The container name.
* @param blob The blob name.
* @param timeout The timeout parameter is expressed in seconds. For more information, see <a
@@ -6838,13 +7082,15 @@ public Mono> getTagsNoCustomHeadersWithResponseAsync(String c
Context context) {
final String comp = "tags";
final String accept = "application/xml";
- return service.getTagsNoCustomHeaders(this.client.getUrl(), containerName, blob, comp, timeout,
- this.client.getVersion(), requestId, snapshot, versionId, ifTags, leaseId, accept, context);
+ return service
+ .getTagsNoCustomHeaders(this.client.getUrl(), containerName, blob, comp, timeout, this.client.getVersion(),
+ requestId, snapshot, versionId, ifTags, leaseId, accept, context)
+ .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException);
}
/**
* The Set Tags operation enables users to set tags on a blob.
- *
+ *
* @param containerName The container name.
* @param blob The blob name.
* @param timeout The timeout parameter is expressed in seconds. For more information, see <a
@@ -6872,14 +7118,16 @@ public Mono> setTagsWithResponseAsync(St
final String accept = "application/xml";
String transactionalContentMD5Converted = Base64Util.encodeToString(transactionalContentMD5);
String transactionalContentCrc64Converted = Base64Util.encodeToString(transactionalContentCrc64);
- return FluxUtil.withContext(context -> service.setTags(this.client.getUrl(), containerName, blob, comp,
- this.client.getVersion(), timeout, versionId, transactionalContentMD5Converted,
- transactionalContentCrc64Converted, requestId, ifTags, leaseId, tags, accept, context));
+ return FluxUtil
+ .withContext(context -> service.setTags(this.client.getUrl(), containerName, blob, comp,
+ this.client.getVersion(), timeout, versionId, transactionalContentMD5Converted,
+ transactionalContentCrc64Converted, requestId, ifTags, leaseId, tags, accept, context))
+ .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException);
}
/**
* The Set Tags operation enables users to set tags on a blob.
- *
+ *
* @param containerName The container name.
* @param blob The blob name.
* @param timeout The timeout parameter is expressed in seconds. For more information, see <a
@@ -6908,14 +7156,16 @@ public Mono> setTagsWithResponseAsync(St
final String accept = "application/xml";
String transactionalContentMD5Converted = Base64Util.encodeToString(transactionalContentMD5);
String transactionalContentCrc64Converted = Base64Util.encodeToString(transactionalContentCrc64);
- return service.setTags(this.client.getUrl(), containerName, blob, comp, this.client.getVersion(), timeout,
- versionId, transactionalContentMD5Converted, transactionalContentCrc64Converted, requestId, ifTags, leaseId,
- tags, accept, context);
+ return service
+ .setTags(this.client.getUrl(), containerName, blob, comp, this.client.getVersion(), timeout, versionId,
+ transactionalContentMD5Converted, transactionalContentCrc64Converted, requestId, ifTags, leaseId, tags,
+ accept, context)
+ .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException);
}
/**
* The Set Tags operation enables users to set tags on a blob.
- *
+ *
* @param containerName The container name.
* @param blob The blob name.
* @param timeout The timeout parameter is expressed in seconds. For more information, see <a
@@ -6940,12 +7190,14 @@ public Mono setTagsAsync(String containerName, String blob, Integer timeou
byte[] transactionalContentMD5, byte[] transactionalContentCrc64, String requestId, String ifTags,
String leaseId, BlobTags tags) {
return setTagsWithResponseAsync(containerName, blob, timeout, versionId, transactionalContentMD5,
- transactionalContentCrc64, requestId, ifTags, leaseId, tags).flatMap(ignored -> Mono.empty());
+ transactionalContentCrc64, requestId, ifTags, leaseId, tags)
+ .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException)
+ .flatMap(ignored -> Mono.empty());
}
/**
* The Set Tags operation enables users to set tags on a blob.
- *
+ *
* @param containerName The container name.
* @param blob The blob name.
* @param timeout The timeout parameter is expressed in seconds. For more information, see <a
@@ -6971,12 +7223,14 @@ public Mono setTagsAsync(String containerName, String blob, Integer timeou
byte[] transactionalContentMD5, byte[] transactionalContentCrc64, String requestId, String ifTags,
String leaseId, BlobTags tags, Context context) {
return setTagsWithResponseAsync(containerName, blob, timeout, versionId, transactionalContentMD5,
- transactionalContentCrc64, requestId, ifTags, leaseId, tags, context).flatMap(ignored -> Mono.empty());
+ transactionalContentCrc64, requestId, ifTags, leaseId, tags, context)
+ .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException)
+ .flatMap(ignored -> Mono.empty());
}
/**
* The Set Tags operation enables users to set tags on a blob.
- *
+ *
* @param containerName The container name.
* @param blob The blob name.
* @param timeout The timeout parameter is expressed in seconds. For more information, see <a
@@ -7004,14 +7258,16 @@ public Mono> setTagsNoCustomHeadersWithResponseAsync(String conta
final String accept = "application/xml";
String transactionalContentMD5Converted = Base64Util.encodeToString(transactionalContentMD5);
String transactionalContentCrc64Converted = Base64Util.encodeToString(transactionalContentCrc64);
- return FluxUtil.withContext(context -> service.setTagsNoCustomHeaders(this.client.getUrl(), containerName, blob,
- comp, this.client.getVersion(), timeout, versionId, transactionalContentMD5Converted,
- transactionalContentCrc64Converted, requestId, ifTags, leaseId, tags, accept, context));
+ return FluxUtil
+ .withContext(context -> service.setTagsNoCustomHeaders(this.client.getUrl(), containerName, blob, comp,
+ this.client.getVersion(), timeout, versionId, transactionalContentMD5Converted,
+ transactionalContentCrc64Converted, requestId, ifTags, leaseId, tags, accept, context))
+ .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException);
}
/**
* The Set Tags operation enables users to set tags on a blob.
- *
+ *
* @param containerName The container name.
* @param blob The blob name.
* @param timeout The timeout parameter is expressed in seconds. For more information, see <a
@@ -7040,8 +7296,10 @@ public Mono> setTagsNoCustomHeadersWithResponseAsync(String conta
final String accept = "application/xml";
String transactionalContentMD5Converted = Base64Util.encodeToString(transactionalContentMD5);
String transactionalContentCrc64Converted = Base64Util.encodeToString(transactionalContentCrc64);
- return service.setTagsNoCustomHeaders(this.client.getUrl(), containerName, blob, comp, this.client.getVersion(),
- timeout, versionId, transactionalContentMD5Converted, transactionalContentCrc64Converted, requestId, ifTags,
- leaseId, tags, accept, context);
+ return service
+ .setTagsNoCustomHeaders(this.client.getUrl(), containerName, blob, comp, this.client.getVersion(), timeout,
+ versionId, transactionalContentMD5Converted, transactionalContentCrc64Converted, requestId, ifTags,
+ leaseId, tags, accept, context)
+ .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException);
}
}
diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/BlockBlobsImpl.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/BlockBlobsImpl.java
index 5ae070424204..43e1069e53a9 100644
--- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/BlockBlobsImpl.java
+++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/BlockBlobsImpl.java
@@ -1,7 +1,6 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// Code generated by Microsoft (R) AutoRest Code Generator.
-
package com.azure.storage.blob.implementation;
import com.azure.core.annotation.BodyParam;
@@ -47,11 +46,13 @@
import java.util.Map;
import reactor.core.publisher.Flux;
import reactor.core.publisher.Mono;
+import com.azure.storage.blob.implementation.util.ModelHelper;
/**
* 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.
*/
@@ -64,7 +65,7 @@ public final class BlockBlobsImpl {
/**
* Initializes an instance of BlockBlobsImpl.
- *
+ *
* @param client the instance of the service client containing this operation class.
*/
BlockBlobsImpl(AzureBlobStorageImpl client) {
@@ -80,6 +81,7 @@ public final class BlockBlobsImpl {
@Host("{url}")
@ServiceInterface(name = "AzureBlobStorageBloc")
public interface BlockBlobsService {
+
@Put("/{containerName}/{blob}")
@ExpectedResponses({ 201 })
@UnexpectedResponseExceptionType(BlobStorageExceptionInternal.class)
@@ -482,7 +484,7 @@ Mono> getBlockListNoCustomHeaders(@HostParam("url") String u
* 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.
@@ -590,13 +592,15 @@ public Mono> uploadWithResponseAsync
DateTimeRfc1123 immutabilityPolicyExpiryConverted
= immutabilityPolicyExpiry == null ? null : new DateTimeRfc1123(immutabilityPolicyExpiry);
String transactionalContentCrc64Converted = Base64Util.encodeToString(transactionalContentCrc64);
- return FluxUtil.withContext(context -> service.upload(this.client.getUrl(), containerName, blob, blobType,
- timeout, transactionalContentMD5Converted, contentLength, contentType, contentEncoding, contentLanguage,
- contentMd5Converted, cacheControl, metadata, leaseId, contentDisposition, encryptionKey,
- encryptionKeySha256, encryptionAlgorithm, encryptionScope, tier, ifModifiedSinceConverted,
- ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, this.client.getVersion(), requestId,
- blobTagsString, immutabilityPolicyExpiryConverted, immutabilityPolicyMode, legalHold,
- transactionalContentCrc64Converted, body, accept, context));
+ return FluxUtil
+ .withContext(context -> service.upload(this.client.getUrl(), containerName, blob, blobType, timeout,
+ transactionalContentMD5Converted, contentLength, contentType, contentEncoding, contentLanguage,
+ contentMd5Converted, cacheControl, metadata, leaseId, contentDisposition, encryptionKey,
+ encryptionKeySha256, encryptionAlgorithm, encryptionScope, tier, ifModifiedSinceConverted,
+ ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, this.client.getVersion(), requestId,
+ blobTagsString, immutabilityPolicyExpiryConverted, immutabilityPolicyMode, legalHold,
+ transactionalContentCrc64Converted, body, accept, context))
+ .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException);
}
/**
@@ -604,7 +608,7 @@ public Mono> uploadWithResponseAsync
* overwrites any existing metadata on the blob. Partial updates are not supported with Put Blob; the content of the
* existing blob is overwritten with the content of the new blob. To perform a partial update of the content of a
* block blob, use the Put Block List operation.
- *
+ *
* @param containerName The container name.
* @param blob The blob name.
* @param contentLength The length of the request.
@@ -713,13 +717,14 @@ public Mono> uploadWithResponseAsync
DateTimeRfc1123 immutabilityPolicyExpiryConverted
= immutabilityPolicyExpiry == null ? null : new DateTimeRfc1123(immutabilityPolicyExpiry);
String transactionalContentCrc64Converted = Base64Util.encodeToString(transactionalContentCrc64);
- return service.upload(this.client.getUrl(), containerName, blob, blobType, timeout,
- transactionalContentMD5Converted, contentLength, contentType, contentEncoding, contentLanguage,
- contentMd5Converted, cacheControl, metadata, leaseId, contentDisposition, encryptionKey,
- encryptionKeySha256, encryptionAlgorithm, encryptionScope, tier, ifModifiedSinceConverted,
- ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, this.client.getVersion(), requestId,
- blobTagsString, immutabilityPolicyExpiryConverted, immutabilityPolicyMode, legalHold,
- transactionalContentCrc64Converted, body, accept, context);
+ return service
+ .upload(this.client.getUrl(), containerName, blob, blobType, timeout, transactionalContentMD5Converted,
+ contentLength, contentType, contentEncoding, contentLanguage, contentMd5Converted, cacheControl,
+ metadata, leaseId, contentDisposition, encryptionKey, encryptionKeySha256, encryptionAlgorithm,
+ encryptionScope, tier, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch,
+ ifTags, this.client.getVersion(), requestId, blobTagsString, immutabilityPolicyExpiryConverted,
+ immutabilityPolicyMode, legalHold, transactionalContentCrc64Converted, body, accept, context)
+ .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException);
}
/**
@@ -727,7 +732,7 @@ public Mono> uploadWithResponseAsync
* overwrites any existing metadata on the blob. Partial updates are not supported with Put Blob; the content of the
* existing blob is overwritten with the content of the new blob. To perform a partial update of the content of a
* block blob, use the Put Block List operation.
- *
+ *
* @param containerName The container name.
* @param blob The blob name.
* @param contentLength The length of the request.
@@ -776,7 +781,9 @@ public Mono uploadAsync(String containerName, String blob, long contentLen
return uploadWithResponseAsync(containerName, blob, contentLength, body, timeout, transactionalContentMD5,
metadata, leaseId, tier, ifModifiedSince, ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, requestId,
blobTagsString, immutabilityPolicyExpiry, immutabilityPolicyMode, legalHold, transactionalContentCrc64,
- blobHttpHeaders, cpkInfo, encryptionScopeParam).flatMap(ignored -> Mono.empty());
+ blobHttpHeaders, cpkInfo, encryptionScopeParam)
+ .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException)
+ .flatMap(ignored -> Mono.empty());
}
/**
@@ -784,7 +791,7 @@ public Mono uploadAsync(String containerName, String blob, long contentLen
* 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.
@@ -834,7 +841,9 @@ public Mono uploadAsync(String containerName, String blob, long contentLen
return uploadWithResponseAsync(containerName, blob, contentLength, body, timeout, transactionalContentMD5,
metadata, leaseId, tier, ifModifiedSince, ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, requestId,
blobTagsString, immutabilityPolicyExpiry, immutabilityPolicyMode, legalHold, transactionalContentCrc64,
- blobHttpHeaders, cpkInfo, encryptionScopeParam, context).flatMap(ignored -> Mono.empty());
+ blobHttpHeaders, cpkInfo, encryptionScopeParam, context)
+ .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException)
+ .flatMap(ignored -> Mono.empty());
}
/**
@@ -842,7 +851,7 @@ public Mono uploadAsync(String containerName, String blob, long contentLen
* 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.
@@ -950,13 +959,15 @@ public Mono> uploadNoCustomHeadersWithResponseAsync(String contai
DateTimeRfc1123 immutabilityPolicyExpiryConverted
= immutabilityPolicyExpiry == null ? null : new DateTimeRfc1123(immutabilityPolicyExpiry);
String transactionalContentCrc64Converted = Base64Util.encodeToString(transactionalContentCrc64);
- return FluxUtil.withContext(context -> service.uploadNoCustomHeaders(this.client.getUrl(), containerName, blob,
- blobType, timeout, transactionalContentMD5Converted, contentLength, contentType, contentEncoding,
- contentLanguage, contentMd5Converted, cacheControl, metadata, leaseId, contentDisposition, encryptionKey,
- encryptionKeySha256, encryptionAlgorithm, encryptionScope, tier, ifModifiedSinceConverted,
- ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, this.client.getVersion(), requestId,
- blobTagsString, immutabilityPolicyExpiryConverted, immutabilityPolicyMode, legalHold,
- transactionalContentCrc64Converted, body, accept, context));
+ return FluxUtil
+ .withContext(context -> service.uploadNoCustomHeaders(this.client.getUrl(), containerName, blob, blobType,
+ timeout, transactionalContentMD5Converted, contentLength, contentType, contentEncoding, contentLanguage,
+ contentMd5Converted, cacheControl, metadata, leaseId, contentDisposition, encryptionKey,
+ encryptionKeySha256, encryptionAlgorithm, encryptionScope, tier, ifModifiedSinceConverted,
+ ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, this.client.getVersion(), requestId,
+ blobTagsString, immutabilityPolicyExpiryConverted, immutabilityPolicyMode, legalHold,
+ transactionalContentCrc64Converted, body, accept, context))
+ .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException);
}
/**
@@ -964,7 +975,7 @@ public Mono> uploadNoCustomHeadersWithResponseAsync(String contai
* overwrites any existing metadata on the blob. Partial updates are not supported with Put Blob; the content of the
* existing blob is overwritten with the content of the new blob. To perform a partial update of the content of a
* block blob, use the Put Block List operation.
- *
+ *
* @param containerName The container name.
* @param blob The blob name.
* @param contentLength The length of the request.
@@ -1073,13 +1084,15 @@ public Mono> uploadNoCustomHeadersWithResponseAsync(String contai
DateTimeRfc1123 immutabilityPolicyExpiryConverted
= immutabilityPolicyExpiry == null ? null : new DateTimeRfc1123(immutabilityPolicyExpiry);
String transactionalContentCrc64Converted = Base64Util.encodeToString(transactionalContentCrc64);
- return service.uploadNoCustomHeaders(this.client.getUrl(), containerName, blob, blobType, timeout,
- transactionalContentMD5Converted, contentLength, contentType, contentEncoding, contentLanguage,
- contentMd5Converted, cacheControl, metadata, leaseId, contentDisposition, encryptionKey,
- encryptionKeySha256, encryptionAlgorithm, encryptionScope, tier, ifModifiedSinceConverted,
- ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, this.client.getVersion(), requestId,
- blobTagsString, immutabilityPolicyExpiryConverted, immutabilityPolicyMode, legalHold,
- transactionalContentCrc64Converted, body, accept, context);
+ return service
+ .uploadNoCustomHeaders(this.client.getUrl(), containerName, blob, blobType, timeout,
+ transactionalContentMD5Converted, contentLength, contentType, contentEncoding, contentLanguage,
+ contentMd5Converted, cacheControl, metadata, leaseId, contentDisposition, encryptionKey,
+ encryptionKeySha256, encryptionAlgorithm, encryptionScope, tier, ifModifiedSinceConverted,
+ ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, this.client.getVersion(), requestId,
+ blobTagsString, immutabilityPolicyExpiryConverted, immutabilityPolicyMode, legalHold,
+ transactionalContentCrc64Converted, body, accept, context)
+ .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException);
}
/**
@@ -1087,7 +1100,7 @@ public Mono> uploadNoCustomHeadersWithResponseAsync(String contai
* overwrites any existing metadata on the blob. Partial updates are not supported with Put Blob; the content of the
* existing blob is overwritten with the content of the new blob. To perform a partial update of the content of a
* block blob, use the Put Block List operation.
- *
+ *
* @param containerName The container name.
* @param blob The blob name.
* @param contentLength The length of the request.
@@ -1195,13 +1208,15 @@ public Mono> uploadWithResponseAsync
DateTimeRfc1123 immutabilityPolicyExpiryConverted
= immutabilityPolicyExpiry == null ? null : new DateTimeRfc1123(immutabilityPolicyExpiry);
String transactionalContentCrc64Converted = Base64Util.encodeToString(transactionalContentCrc64);
- return FluxUtil.withContext(context -> service.upload(this.client.getUrl(), containerName, blob, blobType,
- timeout, transactionalContentMD5Converted, contentLength, contentType, contentEncoding, contentLanguage,
- contentMd5Converted, cacheControl, metadata, leaseId, contentDisposition, encryptionKey,
- encryptionKeySha256, encryptionAlgorithm, encryptionScope, tier, ifModifiedSinceConverted,
- ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, this.client.getVersion(), requestId,
- blobTagsString, immutabilityPolicyExpiryConverted, immutabilityPolicyMode, legalHold,
- transactionalContentCrc64Converted, body, accept, context));
+ return FluxUtil
+ .withContext(context -> service.upload(this.client.getUrl(), containerName, blob, blobType, timeout,
+ transactionalContentMD5Converted, contentLength, contentType, contentEncoding, contentLanguage,
+ contentMd5Converted, cacheControl, metadata, leaseId, contentDisposition, encryptionKey,
+ encryptionKeySha256, encryptionAlgorithm, encryptionScope, tier, ifModifiedSinceConverted,
+ ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, this.client.getVersion(), requestId,
+ blobTagsString, immutabilityPolicyExpiryConverted, immutabilityPolicyMode, legalHold,
+ transactionalContentCrc64Converted, body, accept, context))
+ .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException);
}
/**
@@ -1209,7 +1224,7 @@ public Mono> uploadWithResponseAsync
* overwrites any existing metadata on the blob. Partial updates are not supported with Put Blob; the content of the
* existing blob is overwritten with the content of the new blob. To perform a partial update of the content of a
* block blob, use the Put Block List operation.
- *
+ *
* @param containerName The container name.
* @param blob The blob name.
* @param contentLength The length of the request.
@@ -1318,13 +1333,14 @@ public Mono> uploadWithResponseAsync
DateTimeRfc1123 immutabilityPolicyExpiryConverted
= immutabilityPolicyExpiry == null ? null : new DateTimeRfc1123(immutabilityPolicyExpiry);
String transactionalContentCrc64Converted = Base64Util.encodeToString(transactionalContentCrc64);
- return service.upload(this.client.getUrl(), containerName, blob, blobType, timeout,
- transactionalContentMD5Converted, contentLength, contentType, contentEncoding, contentLanguage,
- contentMd5Converted, cacheControl, metadata, leaseId, contentDisposition, encryptionKey,
- encryptionKeySha256, encryptionAlgorithm, encryptionScope, tier, ifModifiedSinceConverted,
- ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, this.client.getVersion(), requestId,
- blobTagsString, immutabilityPolicyExpiryConverted, immutabilityPolicyMode, legalHold,
- transactionalContentCrc64Converted, body, accept, context);
+ return service
+ .upload(this.client.getUrl(), containerName, blob, blobType, timeout, transactionalContentMD5Converted,
+ contentLength, contentType, contentEncoding, contentLanguage, contentMd5Converted, cacheControl,
+ metadata, leaseId, contentDisposition, encryptionKey, encryptionKeySha256, encryptionAlgorithm,
+ encryptionScope, tier, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch,
+ ifTags, this.client.getVersion(), requestId, blobTagsString, immutabilityPolicyExpiryConverted,
+ immutabilityPolicyMode, legalHold, transactionalContentCrc64Converted, body, accept, context)
+ .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException);
}
/**
@@ -1332,7 +1348,7 @@ public Mono> uploadWithResponseAsync
* overwrites any existing metadata on the blob. Partial updates are not supported with Put Blob; the content of the
* existing blob is overwritten with the content of the new blob. To perform a partial update of the content of a
* block blob, use the Put Block List operation.
- *
+ *
* @param containerName The container name.
* @param blob The blob name.
* @param contentLength The length of the request.
@@ -1381,7 +1397,9 @@ public Mono uploadAsync(String containerName, String blob, long contentLen
return uploadWithResponseAsync(containerName, blob, contentLength, body, timeout, transactionalContentMD5,
metadata, leaseId, tier, ifModifiedSince, ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, requestId,
blobTagsString, immutabilityPolicyExpiry, immutabilityPolicyMode, legalHold, transactionalContentCrc64,
- blobHttpHeaders, cpkInfo, encryptionScopeParam).flatMap(ignored -> Mono.empty());
+ blobHttpHeaders, cpkInfo, encryptionScopeParam)
+ .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException)
+ .flatMap(ignored -> Mono.empty());
}
/**
@@ -1389,7 +1407,7 @@ public Mono uploadAsync(String containerName, String blob, long contentLen
* 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.
@@ -1439,7 +1457,9 @@ public Mono uploadAsync(String containerName, String blob, long contentLen
return uploadWithResponseAsync(containerName, blob, contentLength, body, timeout, transactionalContentMD5,
metadata, leaseId, tier, ifModifiedSince, ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, requestId,
blobTagsString, immutabilityPolicyExpiry, immutabilityPolicyMode, legalHold, transactionalContentCrc64,
- blobHttpHeaders, cpkInfo, encryptionScopeParam, context).flatMap(ignored -> Mono.empty());
+ blobHttpHeaders, cpkInfo, encryptionScopeParam, context)
+ .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException)
+ .flatMap(ignored -> Mono.empty());
}
/**
@@ -1447,7 +1467,7 @@ public Mono uploadAsync(String containerName, String blob, long contentLen
* 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.
@@ -1555,13 +1575,15 @@ public Mono> uploadNoCustomHeadersWithResponseAsync(String contai
DateTimeRfc1123 immutabilityPolicyExpiryConverted
= immutabilityPolicyExpiry == null ? null : new DateTimeRfc1123(immutabilityPolicyExpiry);
String transactionalContentCrc64Converted = Base64Util.encodeToString(transactionalContentCrc64);
- return FluxUtil.withContext(context -> service.uploadNoCustomHeaders(this.client.getUrl(), containerName, blob,
- blobType, timeout, transactionalContentMD5Converted, contentLength, contentType, contentEncoding,
- contentLanguage, contentMd5Converted, cacheControl, metadata, leaseId, contentDisposition, encryptionKey,
- encryptionKeySha256, encryptionAlgorithm, encryptionScope, tier, ifModifiedSinceConverted,
- ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, this.client.getVersion(), requestId,
- blobTagsString, immutabilityPolicyExpiryConverted, immutabilityPolicyMode, legalHold,
- transactionalContentCrc64Converted, body, accept, context));
+ return FluxUtil
+ .withContext(context -> service.uploadNoCustomHeaders(this.client.getUrl(), containerName, blob, blobType,
+ timeout, transactionalContentMD5Converted, contentLength, contentType, contentEncoding, contentLanguage,
+ contentMd5Converted, cacheControl, metadata, leaseId, contentDisposition, encryptionKey,
+ encryptionKeySha256, encryptionAlgorithm, encryptionScope, tier, ifModifiedSinceConverted,
+ ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, this.client.getVersion(), requestId,
+ blobTagsString, immutabilityPolicyExpiryConverted, immutabilityPolicyMode, legalHold,
+ transactionalContentCrc64Converted, body, accept, context))
+ .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException);
}
/**
@@ -1569,7 +1591,7 @@ public Mono> uploadNoCustomHeadersWithResponseAsync(String contai
* overwrites any existing metadata on the blob. Partial updates are not supported with Put Blob; the content of the
* existing blob is overwritten with the content of the new blob. To perform a partial update of the content of a
* block blob, use the Put Block List operation.
- *
+ *
* @param containerName The container name.
* @param blob The blob name.
* @param contentLength The length of the request.
@@ -1678,13 +1700,15 @@ public Mono> uploadNoCustomHeadersWithResponseAsync(String contai
DateTimeRfc1123 immutabilityPolicyExpiryConverted
= immutabilityPolicyExpiry == null ? null : new DateTimeRfc1123(immutabilityPolicyExpiry);
String transactionalContentCrc64Converted = Base64Util.encodeToString(transactionalContentCrc64);
- return service.uploadNoCustomHeaders(this.client.getUrl(), containerName, blob, blobType, timeout,
- transactionalContentMD5Converted, contentLength, contentType, contentEncoding, contentLanguage,
- contentMd5Converted, cacheControl, metadata, leaseId, contentDisposition, encryptionKey,
- encryptionKeySha256, encryptionAlgorithm, encryptionScope, tier, ifModifiedSinceConverted,
- ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, this.client.getVersion(), requestId,
- blobTagsString, immutabilityPolicyExpiryConverted, immutabilityPolicyMode, legalHold,
- transactionalContentCrc64Converted, body, accept, context);
+ return service
+ .uploadNoCustomHeaders(this.client.getUrl(), containerName, blob, blobType, timeout,
+ transactionalContentMD5Converted, contentLength, contentType, contentEncoding, contentLanguage,
+ contentMd5Converted, cacheControl, metadata, leaseId, contentDisposition, encryptionKey,
+ encryptionKeySha256, encryptionAlgorithm, encryptionScope, tier, ifModifiedSinceConverted,
+ ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, this.client.getVersion(), requestId,
+ blobTagsString, immutabilityPolicyExpiryConverted, immutabilityPolicyMode, legalHold,
+ transactionalContentCrc64Converted, body, accept, context)
+ .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException);
}
/**
@@ -1693,7 +1717,7 @@ public Mono> uploadNoCustomHeadersWithResponseAsync(String contai
* 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.
@@ -1817,14 +1841,16 @@ public Mono> putBlobFromUrlW
DateTimeRfc1123 sourceIfUnmodifiedSinceConverted
= sourceIfUnmodifiedSince == null ? null : new DateTimeRfc1123(sourceIfUnmodifiedSince);
String sourceContentMD5Converted = Base64Util.encodeToString(sourceContentMD5);
- return FluxUtil.withContext(context -> service.putBlobFromUrl(this.client.getUrl(), containerName, blob,
- blobType, timeout, transactionalContentMD5Converted, contentLength, contentType, contentEncoding,
- contentLanguage, contentMd5Converted, cacheControl, metadata, leaseId, contentDisposition, encryptionKey,
- encryptionKeySha256, encryptionAlgorithm, encryptionScope, tier, ifModifiedSinceConverted,
- ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, sourceIfModifiedSinceConverted,
- sourceIfUnmodifiedSinceConverted, sourceIfMatch, sourceIfNoneMatch, sourceIfTags, this.client.getVersion(),
- requestId, sourceContentMD5Converted, blobTagsString, copySource, copySourceBlobProperties,
- copySourceAuthorization, copySourceTags, accept, context));
+ return FluxUtil
+ .withContext(context -> service.putBlobFromUrl(this.client.getUrl(), containerName, blob, blobType, timeout,
+ transactionalContentMD5Converted, contentLength, contentType, contentEncoding, contentLanguage,
+ contentMd5Converted, cacheControl, metadata, leaseId, contentDisposition, encryptionKey,
+ encryptionKeySha256, encryptionAlgorithm, encryptionScope, tier, ifModifiedSinceConverted,
+ ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, sourceIfModifiedSinceConverted,
+ sourceIfUnmodifiedSinceConverted, sourceIfMatch, sourceIfNoneMatch, sourceIfTags,
+ this.client.getVersion(), requestId, sourceContentMD5Converted, blobTagsString, copySource,
+ copySourceBlobProperties, copySourceAuthorization, copySourceTags, accept, context))
+ .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException);
}
/**
@@ -1833,7 +1859,7 @@ public Mono> putBlobFromUrlW
* 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.
@@ -1958,14 +1984,16 @@ public Mono