![JAR search and dependency download from the Maven repository](/logo.png)
com.microsoft.azure.storage.GeneratedPageBlobs Maven / Gradle / Ivy
/**
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for
* license information.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is
* regenerated.
*/
package com.microsoft.azure.storage;
import com.microsoft.azure.storage.blob.models.PageBlobClearPagesResponse;
import com.microsoft.azure.storage.blob.models.PageBlobCopyIncrementalResponse;
import com.microsoft.azure.storage.blob.models.PageBlobCreateResponse;
import com.microsoft.azure.storage.blob.models.PageBlobGetPageRangesDiffResponse;
import com.microsoft.azure.storage.blob.models.PageBlobGetPageRangesResponse;
import com.microsoft.azure.storage.blob.models.PageBlobResizeResponse;
import com.microsoft.azure.storage.blob.models.PageBlobUpdateSequenceNumberResponse;
import com.microsoft.azure.storage.blob.models.PageBlobUploadPagesResponse;
import com.microsoft.azure.storage.blob.models.PageList;
import com.microsoft.azure.storage.blob.models.SequenceNumberActionType;
import com.microsoft.azure.storage.blob.models.StorageErrorException;
import com.microsoft.rest.v2.DateTimeRfc1123;
import com.microsoft.rest.v2.RestProxy;
import com.microsoft.rest.v2.ServiceCallback;
import com.microsoft.rest.v2.ServiceFuture;
import com.microsoft.rest.v2.Validator;
import com.microsoft.rest.v2.annotations.BodyParam;
import com.microsoft.rest.v2.annotations.ExpectedResponses;
import com.microsoft.rest.v2.annotations.GET;
import com.microsoft.rest.v2.annotations.HeaderParam;
import com.microsoft.rest.v2.annotations.Host;
import com.microsoft.rest.v2.annotations.HostParam;
import com.microsoft.rest.v2.annotations.PUT;
import com.microsoft.rest.v2.annotations.QueryParam;
import com.microsoft.rest.v2.annotations.UnexpectedResponseExceptionType;
import com.microsoft.rest.v2.util.Base64Util;
import io.reactivex.Completable;
import io.reactivex.Flowable;
import io.reactivex.Maybe;
import io.reactivex.Single;
import io.reactivex.annotations.NonNull;
import java.net.URL;
import java.nio.ByteBuffer;
import java.time.OffsetDateTime;
import java.util.HashMap;
import java.util.Map;
/**
* An instance of this class provides access to all the operations defined in
* GeneratedPageBlobs.
*/
public final class GeneratedPageBlobs {
/**
* The proxy service used to perform REST calls.
*/
private PageBlobsService service;
/**
* The service client containing this operation class.
*/
private GeneratedStorageClient client;
/**
* Initializes an instance of GeneratedPageBlobs.
*
* @param client the instance of the service client containing this operation class.
*/
public GeneratedPageBlobs(GeneratedStorageClient client) {
this.service = RestProxy.create(PageBlobsService.class, client);
this.client = client;
}
/**
* The interface defining all the services for GeneratedPageBlobs to be
* used by the proxy service to perform REST calls.
*/
@Host("{url}")
private interface PageBlobsService {
@PUT("{containerName}/{blob}")
@ExpectedResponses({201})
@UnexpectedResponseExceptionType(StorageErrorException.class)
Single create(@HostParam("url") String url, @QueryParam("timeout") Integer timeout, @HeaderParam("Content-Length") long contentLength, @HeaderParam("x-ms-blob-content-type") String blobContentType, @HeaderParam("x-ms-blob-content-encoding") String blobContentEncoding, @HeaderParam("x-ms-blob-content-language") String blobContentLanguage, @HeaderParam("x-ms-blob-content-md5") String blobContentMD5, @HeaderParam("x-ms-blob-cache-control") String blobCacheControl, @HeaderParam("x-ms-meta-") Map metadata, @HeaderParam("x-ms-lease-id") String leaseId, @HeaderParam("x-ms-blob-content-disposition") String blobContentDisposition, @HeaderParam("If-Modified-Since") DateTimeRfc1123 ifModifiedSince, @HeaderParam("If-Unmodified-Since") DateTimeRfc1123 ifUnmodifiedSince, @HeaderParam("If-Match") String ifMatches, @HeaderParam("If-None-Match") String ifNoneMatch, @HeaderParam("x-ms-blob-content-length") long blobContentLength, @HeaderParam("x-ms-blob-sequence-number") Long blobSequenceNumber, @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, @HeaderParam("x-ms-blob-type") String blobType);
@PUT("{containerName}/{blob}")
@ExpectedResponses({201})
@UnexpectedResponseExceptionType(StorageErrorException.class)
Single uploadPages(@HostParam("url") String url, @BodyParam("application/octet-stream") Flowable body, @HeaderParam("Content-Length") long contentLength, @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-range") String range, @HeaderParam("x-ms-lease-id") String leaseId, @HeaderParam("x-ms-if-sequence-number-le") Long ifSequenceNumberLessThanOrEqualTo, @HeaderParam("x-ms-if-sequence-number-lt") Long ifSequenceNumberLessThan, @HeaderParam("x-ms-if-sequence-number-eq") Long ifSequenceNumberEqualTo, @HeaderParam("If-Modified-Since") DateTimeRfc1123 ifModifiedSince, @HeaderParam("If-Unmodified-Since") DateTimeRfc1123 ifUnmodifiedSince, @HeaderParam("If-Match") String ifMatches, @HeaderParam("If-None-Match") String ifNoneMatch, @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, @QueryParam("comp") String comp, @HeaderParam("x-ms-page-write") String pageWrite);
@PUT("{containerName}/{blob}")
@ExpectedResponses({201})
@UnexpectedResponseExceptionType(StorageErrorException.class)
Single clearPages(@HostParam("url") String url, @HeaderParam("Content-Length") long contentLength, @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-range") String range, @HeaderParam("x-ms-lease-id") String leaseId, @HeaderParam("x-ms-if-sequence-number-le") Long ifSequenceNumberLessThanOrEqualTo, @HeaderParam("x-ms-if-sequence-number-lt") Long ifSequenceNumberLessThan, @HeaderParam("x-ms-if-sequence-number-eq") Long ifSequenceNumberEqualTo, @HeaderParam("If-Modified-Since") DateTimeRfc1123 ifModifiedSince, @HeaderParam("If-Unmodified-Since") DateTimeRfc1123 ifUnmodifiedSince, @HeaderParam("If-Match") String ifMatches, @HeaderParam("If-None-Match") String ifNoneMatch, @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, @QueryParam("comp") String comp, @HeaderParam("x-ms-page-write") String pageWrite);
@GET("{containerName}/{blob}")
@ExpectedResponses({200})
@UnexpectedResponseExceptionType(StorageErrorException.class)
Single getPageRanges(@HostParam("url") String url, @QueryParam("snapshot") String snapshot, @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-range") String range, @HeaderParam("x-ms-lease-id") String leaseId, @HeaderParam("If-Modified-Since") DateTimeRfc1123 ifModifiedSince, @HeaderParam("If-Unmodified-Since") DateTimeRfc1123 ifUnmodifiedSince, @HeaderParam("If-Match") String ifMatches, @HeaderParam("If-None-Match") String ifNoneMatch, @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, @QueryParam("comp") String comp);
@GET("{containerName}/{blob}")
@ExpectedResponses({200})
@UnexpectedResponseExceptionType(StorageErrorException.class)
Single getPageRangesDiff(@HostParam("url") String url, @QueryParam("snapshot") String snapshot, @QueryParam("timeout") Integer timeout, @QueryParam("prevsnapshot") String prevsnapshot, @HeaderParam("x-ms-range") String range, @HeaderParam("x-ms-lease-id") String leaseId, @HeaderParam("If-Modified-Since") DateTimeRfc1123 ifModifiedSince, @HeaderParam("If-Unmodified-Since") DateTimeRfc1123 ifUnmodifiedSince, @HeaderParam("If-Match") String ifMatches, @HeaderParam("If-None-Match") String ifNoneMatch, @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, @QueryParam("comp") String comp);
@PUT("{containerName}/{blob}")
@ExpectedResponses({200})
@UnexpectedResponseExceptionType(StorageErrorException.class)
Single resize(@HostParam("url") String url, @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-lease-id") String leaseId, @HeaderParam("If-Modified-Since") DateTimeRfc1123 ifModifiedSince, @HeaderParam("If-Unmodified-Since") DateTimeRfc1123 ifUnmodifiedSince, @HeaderParam("If-Match") String ifMatches, @HeaderParam("If-None-Match") String ifNoneMatch, @HeaderParam("x-ms-blob-content-length") long blobContentLength, @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, @QueryParam("comp") String comp);
@PUT("{containerName}/{blob}")
@ExpectedResponses({200})
@UnexpectedResponseExceptionType(StorageErrorException.class)
Single updateSequenceNumber(@HostParam("url") String url, @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-lease-id") String leaseId, @HeaderParam("If-Modified-Since") DateTimeRfc1123 ifModifiedSince, @HeaderParam("If-Unmodified-Since") DateTimeRfc1123 ifUnmodifiedSince, @HeaderParam("If-Match") String ifMatches, @HeaderParam("If-None-Match") String ifNoneMatch, @HeaderParam("x-ms-sequence-number-action") SequenceNumberActionType sequenceNumberAction, @HeaderParam("x-ms-blob-sequence-number") Long blobSequenceNumber, @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, @QueryParam("comp") String comp);
@PUT("{containerName}/{blob}")
@ExpectedResponses({202})
@UnexpectedResponseExceptionType(StorageErrorException.class)
Single copyIncremental(@HostParam("url") String url, @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-meta-") Map metadata, @HeaderParam("If-Modified-Since") DateTimeRfc1123 ifModifiedSince, @HeaderParam("If-Unmodified-Since") DateTimeRfc1123 ifUnmodifiedSince, @HeaderParam("If-Match") String ifMatches, @HeaderParam("If-None-Match") String ifNoneMatch, @HeaderParam("x-ms-copy-source") URL copySource, @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, @QueryParam("comp") String comp);
}
/**
* The Create operation creates a new page blob.
*
* @param contentLength The length of the request.
* @param blobContentLength This header specifies the maximum size for the page blob, up to 1 TB. The page blob size must be aligned to a 512-byte boundary.
* @param timeout The timeout parameter is expressed in seconds. For more information, see <a href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting Timeouts for Blob Service Operations.</a>.
* @param blobContentType Optional. Sets the blob's content type. If specified, this property is stored with the blob and returned with a read request.
* @param blobContentEncoding Optional. Sets the blob's content encoding. If specified, this property is stored with the blob and returned with a read request.
* @param blobContentLanguage Optional. Set the blob's content language. If specified, this property is stored with the blob and returned with a read request.
* @param blobContentMD5 Optional. An MD5 hash of the blob content. Note that this hash is not validated, as the hashes for the individual blocks were validated when each was uploaded.
* @param blobCacheControl Optional. Sets the blob's cache control. If specified, this property is stored with the blob and returned with a read request.
* @param metadata Optional. Specifies a user-defined name-value pair associated with the blob. If no name-value pairs are specified, the operation will copy the metadata from the source blob or file to the destination blob. If one or more name-value pairs are specified, the destination blob is created with the specified metadata, and metadata is not copied from the source blob or file. Note that beginning with version 2009-09-19, metadata names must adhere to the naming rules for C# identifiers. See Naming and Referencing Containers, Blobs, and Metadata for more information.
* @param leaseId If specified, the operation only succeeds if the container's lease is active and matches this ID.
* @param blobContentDisposition Optional. Sets the blob's Content-Disposition header.
* @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the specified date/time.
* @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since the specified date/time.
* @param ifMatches Specify an ETag value to operate only on blobs with a matching value.
* @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value.
* @param blobSequenceNumber Set for page blobs only. The sequence number is a user-controlled value that you can use to track requests. The value of the sequence number must be between 0 and 2^63 - 1.
* @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the analytics logs when storage analytics logging is enabled.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws StorageErrorException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
*/
public void create(@NonNull long contentLength, @NonNull long blobContentLength, Integer timeout, String blobContentType, String blobContentEncoding, String blobContentLanguage, byte[] blobContentMD5, String blobCacheControl, Map metadata, String leaseId, String blobContentDisposition, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatches, String ifNoneMatch, Long blobSequenceNumber, String requestId) {
createAsync(contentLength, blobContentLength, timeout, blobContentType, blobContentEncoding, blobContentLanguage, blobContentMD5, blobCacheControl, metadata, leaseId, blobContentDisposition, ifModifiedSince, ifUnmodifiedSince, ifMatches, ifNoneMatch, blobSequenceNumber, requestId).blockingAwait();
}
/**
* The Create operation creates a new page blob.
*
* @param contentLength The length of the request.
* @param blobContentLength This header specifies the maximum size for the page blob, up to 1 TB. The page blob size must be aligned to a 512-byte boundary.
* @param timeout The timeout parameter is expressed in seconds. For more information, see <a href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting Timeouts for Blob Service Operations.</a>.
* @param blobContentType Optional. Sets the blob's content type. If specified, this property is stored with the blob and returned with a read request.
* @param blobContentEncoding Optional. Sets the blob's content encoding. If specified, this property is stored with the blob and returned with a read request.
* @param blobContentLanguage Optional. Set the blob's content language. If specified, this property is stored with the blob and returned with a read request.
* @param blobContentMD5 Optional. An MD5 hash of the blob content. Note that this hash is not validated, as the hashes for the individual blocks were validated when each was uploaded.
* @param blobCacheControl Optional. Sets the blob's cache control. If specified, this property is stored with the blob and returned with a read request.
* @param metadata Optional. Specifies a user-defined name-value pair associated with the blob. If no name-value pairs are specified, the operation will copy the metadata from the source blob or file to the destination blob. If one or more name-value pairs are specified, the destination blob is created with the specified metadata, and metadata is not copied from the source blob or file. Note that beginning with version 2009-09-19, metadata names must adhere to the naming rules for C# identifiers. See Naming and Referencing Containers, Blobs, and Metadata for more information.
* @param leaseId If specified, the operation only succeeds if the container's lease is active and matches this ID.
* @param blobContentDisposition Optional. Sets the blob's Content-Disposition header.
* @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the specified date/time.
* @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since the specified date/time.
* @param ifMatches Specify an ETag value to operate only on blobs with a matching value.
* @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value.
* @param blobSequenceNumber Set for page blobs only. The sequence number is a user-controlled value that you can use to track requests. The value of the sequence number must be between 0 and 2^63 - 1.
* @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the analytics logs when storage analytics logging is enabled.
* @param serviceCallback the async ServiceCallback to handle successful and failed responses.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @return a ServiceFuture which will be completed with the result of the network request.
*/
public ServiceFuture createAsync(@NonNull long contentLength, @NonNull long blobContentLength, Integer timeout, String blobContentType, String blobContentEncoding, String blobContentLanguage, byte[] blobContentMD5, String blobCacheControl, Map metadata, String leaseId, String blobContentDisposition, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatches, String ifNoneMatch, Long blobSequenceNumber, String requestId, ServiceCallback serviceCallback) {
return ServiceFuture.fromBody(createAsync(contentLength, blobContentLength, timeout, blobContentType, blobContentEncoding, blobContentLanguage, blobContentMD5, blobCacheControl, metadata, leaseId, blobContentDisposition, ifModifiedSince, ifUnmodifiedSince, ifMatches, ifNoneMatch, blobSequenceNumber, requestId), serviceCallback);
}
/**
* The Create operation creates a new page blob.
*
* @param contentLength The length of the request.
* @param blobContentLength This header specifies the maximum size for the page blob, up to 1 TB. The page blob size must be aligned to a 512-byte boundary.
* @param timeout The timeout parameter is expressed in seconds. For more information, see <a href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting Timeouts for Blob Service Operations.</a>.
* @param blobContentType Optional. Sets the blob's content type. If specified, this property is stored with the blob and returned with a read request.
* @param blobContentEncoding Optional. Sets the blob's content encoding. If specified, this property is stored with the blob and returned with a read request.
* @param blobContentLanguage Optional. Set the blob's content language. If specified, this property is stored with the blob and returned with a read request.
* @param blobContentMD5 Optional. An MD5 hash of the blob content. Note that this hash is not validated, as the hashes for the individual blocks were validated when each was uploaded.
* @param blobCacheControl Optional. Sets the blob's cache control. If specified, this property is stored with the blob and returned with a read request.
* @param metadata Optional. Specifies a user-defined name-value pair associated with the blob. If no name-value pairs are specified, the operation will copy the metadata from the source blob or file to the destination blob. If one or more name-value pairs are specified, the destination blob is created with the specified metadata, and metadata is not copied from the source blob or file. Note that beginning with version 2009-09-19, metadata names must adhere to the naming rules for C# identifiers. See Naming and Referencing Containers, Blobs, and Metadata for more information.
* @param leaseId If specified, the operation only succeeds if the container's lease is active and matches this ID.
* @param blobContentDisposition Optional. Sets the blob's Content-Disposition header.
* @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the specified date/time.
* @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since the specified date/time.
* @param ifMatches Specify an ETag value to operate only on blobs with a matching value.
* @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value.
* @param blobSequenceNumber Set for page blobs only. The sequence number is a user-controlled value that you can use to track requests. The value of the sequence number must be between 0 and 2^63 - 1.
* @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the analytics logs when storage analytics logging is enabled.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @return a Single which performs the network request upon subscription.
*/
public Single createWithRestResponseAsync(@NonNull long contentLength, @NonNull long blobContentLength, Integer timeout, String blobContentType, String blobContentEncoding, String blobContentLanguage, byte[] blobContentMD5, String blobCacheControl, Map metadata, String leaseId, String blobContentDisposition, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatches, String ifNoneMatch, Long blobSequenceNumber, String requestId) {
if (this.client.url() == null) {
throw new IllegalArgumentException("Parameter this.client.url() is required and cannot be null.");
}
if (this.client.version() == null) {
throw new IllegalArgumentException("Parameter this.client.version() is required and cannot be null.");
}
Validator.validate(metadata);
final String blobType = "PageBlob";
String blobContentMD5Converted = Base64Util.encodeToString(blobContentMD5);
DateTimeRfc1123 ifModifiedSinceConverted = null;
if (ifModifiedSince != null) {
ifModifiedSinceConverted = new DateTimeRfc1123(ifModifiedSince);
}
DateTimeRfc1123 ifUnmodifiedSinceConverted = null;
if (ifUnmodifiedSince != null) {
ifUnmodifiedSinceConverted = new DateTimeRfc1123(ifUnmodifiedSince);
}
return service.create(this.client.url(), timeout, contentLength, blobContentType, blobContentEncoding, blobContentLanguage, blobContentMD5Converted, blobCacheControl, metadata, leaseId, blobContentDisposition, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatches, ifNoneMatch, blobContentLength, blobSequenceNumber, this.client.version(), requestId, blobType);
}
/**
* The Create operation creates a new page blob.
*
* @param contentLength The length of the request.
* @param blobContentLength This header specifies the maximum size for the page blob, up to 1 TB. The page blob size must be aligned to a 512-byte boundary.
* @param timeout The timeout parameter is expressed in seconds. For more information, see <a href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting Timeouts for Blob Service Operations.</a>.
* @param blobContentType Optional. Sets the blob's content type. If specified, this property is stored with the blob and returned with a read request.
* @param blobContentEncoding Optional. Sets the blob's content encoding. If specified, this property is stored with the blob and returned with a read request.
* @param blobContentLanguage Optional. Set the blob's content language. If specified, this property is stored with the blob and returned with a read request.
* @param blobContentMD5 Optional. An MD5 hash of the blob content. Note that this hash is not validated, as the hashes for the individual blocks were validated when each was uploaded.
* @param blobCacheControl Optional. Sets the blob's cache control. If specified, this property is stored with the blob and returned with a read request.
* @param metadata Optional. Specifies a user-defined name-value pair associated with the blob. If no name-value pairs are specified, the operation will copy the metadata from the source blob or file to the destination blob. If one or more name-value pairs are specified, the destination blob is created with the specified metadata, and metadata is not copied from the source blob or file. Note that beginning with version 2009-09-19, metadata names must adhere to the naming rules for C# identifiers. See Naming and Referencing Containers, Blobs, and Metadata for more information.
* @param leaseId If specified, the operation only succeeds if the container's lease is active and matches this ID.
* @param blobContentDisposition Optional. Sets the blob's Content-Disposition header.
* @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the specified date/time.
* @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since the specified date/time.
* @param ifMatches Specify an ETag value to operate only on blobs with a matching value.
* @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value.
* @param blobSequenceNumber Set for page blobs only. The sequence number is a user-controlled value that you can use to track requests. The value of the sequence number must be between 0 and 2^63 - 1.
* @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the analytics logs when storage analytics logging is enabled.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @return a Single which performs the network request upon subscription.
*/
public Completable createAsync(@NonNull long contentLength, @NonNull long blobContentLength, Integer timeout, String blobContentType, String blobContentEncoding, String blobContentLanguage, byte[] blobContentMD5, String blobCacheControl, Map metadata, String leaseId, String blobContentDisposition, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatches, String ifNoneMatch, Long blobSequenceNumber, String requestId) {
return createWithRestResponseAsync(contentLength, blobContentLength, timeout, blobContentType, blobContentEncoding, blobContentLanguage, blobContentMD5, blobCacheControl, metadata, leaseId, blobContentDisposition, ifModifiedSince, ifUnmodifiedSince, ifMatches, ifNoneMatch, blobSequenceNumber, requestId)
.toCompletable();
}
/**
* The Upload Pages operation writes a range of pages to a page blob.
*
* @param body Initial data.
* @param contentLength The length of the request.
* @param timeout The timeout parameter is expressed in seconds. For more information, see <a href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting Timeouts for Blob Service Operations.</a>.
* @param range Return only the bytes of the blob in the specified range.
* @param leaseId If specified, the operation only succeeds if the container's lease is active and matches this ID.
* @param ifSequenceNumberLessThanOrEqualTo Specify this header value to operate only on a blob if it has a sequence number less than or equal to the specified.
* @param ifSequenceNumberLessThan Specify this header value to operate only on a blob if it has a sequence number less than the specified.
* @param ifSequenceNumberEqualTo Specify this header value to operate only on a blob if it has the specified sequence number.
* @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the specified date/time.
* @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since the specified date/time.
* @param ifMatches Specify an ETag value to operate only on blobs with a matching value.
* @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value.
* @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the analytics logs when storage analytics logging is enabled.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws StorageErrorException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
*/
public void uploadPages(@NonNull Flowable body, @NonNull long contentLength, Integer timeout, String range, String leaseId, Long ifSequenceNumberLessThanOrEqualTo, Long ifSequenceNumberLessThan, Long ifSequenceNumberEqualTo, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatches, String ifNoneMatch, String requestId) {
uploadPagesAsync(body, contentLength, timeout, range, leaseId, ifSequenceNumberLessThanOrEqualTo, ifSequenceNumberLessThan, ifSequenceNumberEqualTo, ifModifiedSince, ifUnmodifiedSince, ifMatches, ifNoneMatch, requestId).blockingAwait();
}
/**
* The Upload Pages operation writes a range of pages to a page blob.
*
* @param body Initial data.
* @param contentLength The length of the request.
* @param timeout The timeout parameter is expressed in seconds. For more information, see <a href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting Timeouts for Blob Service Operations.</a>.
* @param range Return only the bytes of the blob in the specified range.
* @param leaseId If specified, the operation only succeeds if the container's lease is active and matches this ID.
* @param ifSequenceNumberLessThanOrEqualTo Specify this header value to operate only on a blob if it has a sequence number less than or equal to the specified.
* @param ifSequenceNumberLessThan Specify this header value to operate only on a blob if it has a sequence number less than the specified.
* @param ifSequenceNumberEqualTo Specify this header value to operate only on a blob if it has the specified sequence number.
* @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the specified date/time.
* @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since the specified date/time.
* @param ifMatches Specify an ETag value to operate only on blobs with a matching value.
* @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value.
* @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the analytics logs when storage analytics logging is enabled.
* @param serviceCallback the async ServiceCallback to handle successful and failed responses.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @return a ServiceFuture which will be completed with the result of the network request.
*/
public ServiceFuture uploadPagesAsync(@NonNull Flowable body, @NonNull long contentLength, Integer timeout, String range, String leaseId, Long ifSequenceNumberLessThanOrEqualTo, Long ifSequenceNumberLessThan, Long ifSequenceNumberEqualTo, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatches, String ifNoneMatch, String requestId, ServiceCallback serviceCallback) {
return ServiceFuture.fromBody(uploadPagesAsync(body, contentLength, timeout, range, leaseId, ifSequenceNumberLessThanOrEqualTo, ifSequenceNumberLessThan, ifSequenceNumberEqualTo, ifModifiedSince, ifUnmodifiedSince, ifMatches, ifNoneMatch, requestId), serviceCallback);
}
/**
* The Upload Pages operation writes a range of pages to a page blob.
*
* @param body Initial data.
* @param contentLength The length of the request.
* @param timeout The timeout parameter is expressed in seconds. For more information, see <a href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting Timeouts for Blob Service Operations.</a>.
* @param range Return only the bytes of the blob in the specified range.
* @param leaseId If specified, the operation only succeeds if the container's lease is active and matches this ID.
* @param ifSequenceNumberLessThanOrEqualTo Specify this header value to operate only on a blob if it has a sequence number less than or equal to the specified.
* @param ifSequenceNumberLessThan Specify this header value to operate only on a blob if it has a sequence number less than the specified.
* @param ifSequenceNumberEqualTo Specify this header value to operate only on a blob if it has the specified sequence number.
* @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the specified date/time.
* @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since the specified date/time.
* @param ifMatches Specify an ETag value to operate only on blobs with a matching value.
* @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value.
* @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the analytics logs when storage analytics logging is enabled.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @return a Single which performs the network request upon subscription.
*/
public Single uploadPagesWithRestResponseAsync(@NonNull Flowable body, @NonNull long contentLength, Integer timeout, String range, String leaseId, Long ifSequenceNumberLessThanOrEqualTo, Long ifSequenceNumberLessThan, Long ifSequenceNumberEqualTo, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatches, String ifNoneMatch, String requestId) {
if (this.client.url() == null) {
throw new IllegalArgumentException("Parameter this.client.url() is required and cannot be null.");
}
if (body == null) {
throw new IllegalArgumentException("Parameter body is required and cannot be null.");
}
if (this.client.version() == null) {
throw new IllegalArgumentException("Parameter this.client.version() is required and cannot be null.");
}
final String comp = "page";
final String pageWrite = "update";
DateTimeRfc1123 ifModifiedSinceConverted = null;
if (ifModifiedSince != null) {
ifModifiedSinceConverted = new DateTimeRfc1123(ifModifiedSince);
}
DateTimeRfc1123 ifUnmodifiedSinceConverted = null;
if (ifUnmodifiedSince != null) {
ifUnmodifiedSinceConverted = new DateTimeRfc1123(ifUnmodifiedSince);
}
return service.uploadPages(this.client.url(), body, contentLength, timeout, range, leaseId, ifSequenceNumberLessThanOrEqualTo, ifSequenceNumberLessThan, ifSequenceNumberEqualTo, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatches, ifNoneMatch, this.client.version(), requestId, comp, pageWrite);
}
/**
* The Upload Pages operation writes a range of pages to a page blob.
*
* @param body Initial data.
* @param contentLength The length of the request.
* @param timeout The timeout parameter is expressed in seconds. For more information, see <a href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting Timeouts for Blob Service Operations.</a>.
* @param range Return only the bytes of the blob in the specified range.
* @param leaseId If specified, the operation only succeeds if the container's lease is active and matches this ID.
* @param ifSequenceNumberLessThanOrEqualTo Specify this header value to operate only on a blob if it has a sequence number less than or equal to the specified.
* @param ifSequenceNumberLessThan Specify this header value to operate only on a blob if it has a sequence number less than the specified.
* @param ifSequenceNumberEqualTo Specify this header value to operate only on a blob if it has the specified sequence number.
* @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the specified date/time.
* @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since the specified date/time.
* @param ifMatches Specify an ETag value to operate only on blobs with a matching value.
* @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value.
* @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the analytics logs when storage analytics logging is enabled.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @return a Single which performs the network request upon subscription.
*/
public Completable uploadPagesAsync(@NonNull Flowable body, @NonNull long contentLength, Integer timeout, String range, String leaseId, Long ifSequenceNumberLessThanOrEqualTo, Long ifSequenceNumberLessThan, Long ifSequenceNumberEqualTo, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatches, String ifNoneMatch, String requestId) {
return uploadPagesWithRestResponseAsync(body, contentLength, timeout, range, leaseId, ifSequenceNumberLessThanOrEqualTo, ifSequenceNumberLessThan, ifSequenceNumberEqualTo, ifModifiedSince, ifUnmodifiedSince, ifMatches, ifNoneMatch, requestId)
.toCompletable();
}
/**
* The Clear Pages operation clears a set of pages from a page blob.
*
* @param contentLength The length of the request.
* @param timeout The timeout parameter is expressed in seconds. For more information, see <a href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting Timeouts for Blob Service Operations.</a>.
* @param range Return only the bytes of the blob in the specified range.
* @param leaseId If specified, the operation only succeeds if the container's lease is active and matches this ID.
* @param ifSequenceNumberLessThanOrEqualTo Specify this header value to operate only on a blob if it has a sequence number less than or equal to the specified.
* @param ifSequenceNumberLessThan Specify this header value to operate only on a blob if it has a sequence number less than the specified.
* @param ifSequenceNumberEqualTo Specify this header value to operate only on a blob if it has the specified sequence number.
* @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the specified date/time.
* @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since the specified date/time.
* @param ifMatches Specify an ETag value to operate only on blobs with a matching value.
* @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value.
* @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the analytics logs when storage analytics logging is enabled.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws StorageErrorException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
*/
public void clearPages(@NonNull long contentLength, Integer timeout, String range, String leaseId, Long ifSequenceNumberLessThanOrEqualTo, Long ifSequenceNumberLessThan, Long ifSequenceNumberEqualTo, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatches, String ifNoneMatch, String requestId) {
clearPagesAsync(contentLength, timeout, range, leaseId, ifSequenceNumberLessThanOrEqualTo, ifSequenceNumberLessThan, ifSequenceNumberEqualTo, ifModifiedSince, ifUnmodifiedSince, ifMatches, ifNoneMatch, requestId).blockingAwait();
}
/**
* The Clear Pages operation clears a set of pages from a page blob.
*
* @param contentLength The length of the request.
* @param timeout The timeout parameter is expressed in seconds. For more information, see <a href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting Timeouts for Blob Service Operations.</a>.
* @param range Return only the bytes of the blob in the specified range.
* @param leaseId If specified, the operation only succeeds if the container's lease is active and matches this ID.
* @param ifSequenceNumberLessThanOrEqualTo Specify this header value to operate only on a blob if it has a sequence number less than or equal to the specified.
* @param ifSequenceNumberLessThan Specify this header value to operate only on a blob if it has a sequence number less than the specified.
* @param ifSequenceNumberEqualTo Specify this header value to operate only on a blob if it has the specified sequence number.
* @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the specified date/time.
* @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since the specified date/time.
* @param ifMatches Specify an ETag value to operate only on blobs with a matching value.
* @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value.
* @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the analytics logs when storage analytics logging is enabled.
* @param serviceCallback the async ServiceCallback to handle successful and failed responses.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @return a ServiceFuture which will be completed with the result of the network request.
*/
public ServiceFuture clearPagesAsync(@NonNull long contentLength, Integer timeout, String range, String leaseId, Long ifSequenceNumberLessThanOrEqualTo, Long ifSequenceNumberLessThan, Long ifSequenceNumberEqualTo, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatches, String ifNoneMatch, String requestId, ServiceCallback serviceCallback) {
return ServiceFuture.fromBody(clearPagesAsync(contentLength, timeout, range, leaseId, ifSequenceNumberLessThanOrEqualTo, ifSequenceNumberLessThan, ifSequenceNumberEqualTo, ifModifiedSince, ifUnmodifiedSince, ifMatches, ifNoneMatch, requestId), serviceCallback);
}
/**
* The Clear Pages operation clears a set of pages from a page blob.
*
* @param contentLength The length of the request.
* @param timeout The timeout parameter is expressed in seconds. For more information, see <a href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting Timeouts for Blob Service Operations.</a>.
* @param range Return only the bytes of the blob in the specified range.
* @param leaseId If specified, the operation only succeeds if the container's lease is active and matches this ID.
* @param ifSequenceNumberLessThanOrEqualTo Specify this header value to operate only on a blob if it has a sequence number less than or equal to the specified.
* @param ifSequenceNumberLessThan Specify this header value to operate only on a blob if it has a sequence number less than the specified.
* @param ifSequenceNumberEqualTo Specify this header value to operate only on a blob if it has the specified sequence number.
* @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the specified date/time.
* @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since the specified date/time.
* @param ifMatches Specify an ETag value to operate only on blobs with a matching value.
* @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value.
* @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the analytics logs when storage analytics logging is enabled.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @return a Single which performs the network request upon subscription.
*/
public Single clearPagesWithRestResponseAsync(@NonNull long contentLength, Integer timeout, String range, String leaseId, Long ifSequenceNumberLessThanOrEqualTo, Long ifSequenceNumberLessThan, Long ifSequenceNumberEqualTo, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatches, String ifNoneMatch, String requestId) {
if (this.client.url() == null) {
throw new IllegalArgumentException("Parameter this.client.url() is required and cannot be null.");
}
if (this.client.version() == null) {
throw new IllegalArgumentException("Parameter this.client.version() is required and cannot be null.");
}
final String comp = "page";
final String pageWrite = "clear";
DateTimeRfc1123 ifModifiedSinceConverted = null;
if (ifModifiedSince != null) {
ifModifiedSinceConverted = new DateTimeRfc1123(ifModifiedSince);
}
DateTimeRfc1123 ifUnmodifiedSinceConverted = null;
if (ifUnmodifiedSince != null) {
ifUnmodifiedSinceConverted = new DateTimeRfc1123(ifUnmodifiedSince);
}
return service.clearPages(this.client.url(), contentLength, timeout, range, leaseId, ifSequenceNumberLessThanOrEqualTo, ifSequenceNumberLessThan, ifSequenceNumberEqualTo, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatches, ifNoneMatch, this.client.version(), requestId, comp, pageWrite);
}
/**
* The Clear Pages operation clears a set of pages from a page blob.
*
* @param contentLength The length of the request.
* @param timeout The timeout parameter is expressed in seconds. For more information, see <a href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting Timeouts for Blob Service Operations.</a>.
* @param range Return only the bytes of the blob in the specified range.
* @param leaseId If specified, the operation only succeeds if the container's lease is active and matches this ID.
* @param ifSequenceNumberLessThanOrEqualTo Specify this header value to operate only on a blob if it has a sequence number less than or equal to the specified.
* @param ifSequenceNumberLessThan Specify this header value to operate only on a blob if it has a sequence number less than the specified.
* @param ifSequenceNumberEqualTo Specify this header value to operate only on a blob if it has the specified sequence number.
* @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the specified date/time.
* @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since the specified date/time.
* @param ifMatches Specify an ETag value to operate only on blobs with a matching value.
* @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value.
* @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the analytics logs when storage analytics logging is enabled.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @return a Single which performs the network request upon subscription.
*/
public Completable clearPagesAsync(@NonNull long contentLength, Integer timeout, String range, String leaseId, Long ifSequenceNumberLessThanOrEqualTo, Long ifSequenceNumberLessThan, Long ifSequenceNumberEqualTo, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatches, String ifNoneMatch, String requestId) {
return clearPagesWithRestResponseAsync(contentLength, timeout, range, leaseId, ifSequenceNumberLessThanOrEqualTo, ifSequenceNumberLessThan, ifSequenceNumberEqualTo, ifModifiedSince, ifUnmodifiedSince, ifMatches, ifNoneMatch, requestId)
.toCompletable();
}
/**
* The Get Page Ranges operation returns the list of valid page ranges for a page blob or snapshot of a page blob.
*
* @param snapshot The snapshot parameter is an opaque DateTime value that, when present, specifies the blob snapshot to retrieve. For more information on working with blob snapshots, see <a href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/creating-a-snapshot-of-a-blob">Creating a Snapshot of a Blob.</a>.
* @param timeout The timeout parameter is expressed in seconds. For more information, see <a href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting Timeouts for Blob Service Operations.</a>.
* @param range Return only the bytes of the blob in the specified range.
* @param leaseId If specified, the operation only succeeds if the container's lease is active and matches this ID.
* @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the specified date/time.
* @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since the specified date/time.
* @param ifMatches Specify an ETag value to operate only on blobs with a matching value.
* @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value.
* @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the analytics logs when storage analytics logging is enabled.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws StorageErrorException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the PageList object if successful.
*/
public PageList getPageRanges(String snapshot, Integer timeout, String range, String leaseId, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatches, String ifNoneMatch, String requestId) {
return getPageRangesAsync(snapshot, timeout, range, leaseId, ifModifiedSince, ifUnmodifiedSince, ifMatches, ifNoneMatch, requestId).blockingGet();
}
/**
* The Get Page Ranges operation returns the list of valid page ranges for a page blob or snapshot of a page blob.
*
* @param snapshot The snapshot parameter is an opaque DateTime value that, when present, specifies the blob snapshot to retrieve. For more information on working with blob snapshots, see <a href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/creating-a-snapshot-of-a-blob">Creating a Snapshot of a Blob.</a>.
* @param timeout The timeout parameter is expressed in seconds. For more information, see <a href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting Timeouts for Blob Service Operations.</a>.
* @param range Return only the bytes of the blob in the specified range.
* @param leaseId If specified, the operation only succeeds if the container's lease is active and matches this ID.
* @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the specified date/time.
* @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since the specified date/time.
* @param ifMatches Specify an ETag value to operate only on blobs with a matching value.
* @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value.
* @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the analytics logs when storage analytics logging is enabled.
* @param serviceCallback the async ServiceCallback to handle successful and failed responses.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @return a ServiceFuture which will be completed with the result of the network request.
*/
public ServiceFuture getPageRangesAsync(String snapshot, Integer timeout, String range, String leaseId, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatches, String ifNoneMatch, String requestId, ServiceCallback serviceCallback) {
return ServiceFuture.fromBody(getPageRangesAsync(snapshot, timeout, range, leaseId, ifModifiedSince, ifUnmodifiedSince, ifMatches, ifNoneMatch, requestId), serviceCallback);
}
/**
* The Get Page Ranges operation returns the list of valid page ranges for a page blob or snapshot of a page blob.
*
* @param snapshot The snapshot parameter is an opaque DateTime value that, when present, specifies the blob snapshot to retrieve. For more information on working with blob snapshots, see <a href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/creating-a-snapshot-of-a-blob">Creating a Snapshot of a Blob.</a>.
* @param timeout The timeout parameter is expressed in seconds. For more information, see <a href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting Timeouts for Blob Service Operations.</a>.
* @param range Return only the bytes of the blob in the specified range.
* @param leaseId If specified, the operation only succeeds if the container's lease is active and matches this ID.
* @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the specified date/time.
* @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since the specified date/time.
* @param ifMatches Specify an ETag value to operate only on blobs with a matching value.
* @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value.
* @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the analytics logs when storage analytics logging is enabled.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @return a Single which performs the network request upon subscription.
*/
public Single getPageRangesWithRestResponseAsync(String snapshot, Integer timeout, String range, String leaseId, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatches, String ifNoneMatch, String requestId) {
if (this.client.url() == null) {
throw new IllegalArgumentException("Parameter this.client.url() is required and cannot be null.");
}
if (this.client.version() == null) {
throw new IllegalArgumentException("Parameter this.client.version() is required and cannot be null.");
}
final String comp = "pagelist";
DateTimeRfc1123 ifModifiedSinceConverted = null;
if (ifModifiedSince != null) {
ifModifiedSinceConverted = new DateTimeRfc1123(ifModifiedSince);
}
DateTimeRfc1123 ifUnmodifiedSinceConverted = null;
if (ifUnmodifiedSince != null) {
ifUnmodifiedSinceConverted = new DateTimeRfc1123(ifUnmodifiedSince);
}
return service.getPageRanges(this.client.url(), snapshot, timeout, range, leaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatches, ifNoneMatch, this.client.version(), requestId, comp);
}
/**
* The Get Page Ranges operation returns the list of valid page ranges for a page blob or snapshot of a page blob.
*
* @param snapshot The snapshot parameter is an opaque DateTime value that, when present, specifies the blob snapshot to retrieve. For more information on working with blob snapshots, see <a href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/creating-a-snapshot-of-a-blob">Creating a Snapshot of a Blob.</a>.
* @param timeout The timeout parameter is expressed in seconds. For more information, see <a href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting Timeouts for Blob Service Operations.</a>.
* @param range Return only the bytes of the blob in the specified range.
* @param leaseId If specified, the operation only succeeds if the container's lease is active and matches this ID.
* @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the specified date/time.
* @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since the specified date/time.
* @param ifMatches Specify an ETag value to operate only on blobs with a matching value.
* @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value.
* @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the analytics logs when storage analytics logging is enabled.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @return a Single which performs the network request upon subscription.
*/
public Maybe getPageRangesAsync(String snapshot, Integer timeout, String range, String leaseId, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatches, String ifNoneMatch, String requestId) {
return getPageRangesWithRestResponseAsync(snapshot, timeout, range, leaseId, ifModifiedSince, ifUnmodifiedSince, ifMatches, ifNoneMatch, requestId)
.flatMapMaybe((PageBlobGetPageRangesResponse res) -> res.body() == null ? Maybe.empty() : Maybe.just(res.body()));
}
/**
* [Update] The Get Page Ranges Diff operation returns the list of valid page ranges for a page blob that were changed between target blob and previous snapshot.
*
* @param snapshot The snapshot parameter is an opaque DateTime value that, when present, specifies the blob snapshot to retrieve. For more information on working with blob snapshots, see <a href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/creating-a-snapshot-of-a-blob">Creating a Snapshot of a Blob.</a>.
* @param timeout The timeout parameter is expressed in seconds. For more information, see <a href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting Timeouts for Blob Service Operations.</a>.
* @param prevsnapshot Optional in version 2015-07-08 and newer. The prevsnapshot parameter is a DateTime value that specifies that the response will contain only pages that were changed between target blob and previous snapshot. Changed pages include both updated and cleared pages. The target blob may be a snapshot, as long as the snapshot specified by prevsnapshot is the older of the two. Note that incremental snapshots are currently supported only for blobs created on or after January 1, 2016.
* @param range Return only the bytes of the blob in the specified range.
* @param leaseId If specified, the operation only succeeds if the container's lease is active and matches this ID.
* @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the specified date/time.
* @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since the specified date/time.
* @param ifMatches Specify an ETag value to operate only on blobs with a matching value.
* @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value.
* @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the analytics logs when storage analytics logging is enabled.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws StorageErrorException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the PageList object if successful.
*/
public PageList getPageRangesDiff(String snapshot, Integer timeout, String prevsnapshot, String range, String leaseId, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatches, String ifNoneMatch, String requestId) {
return getPageRangesDiffAsync(snapshot, timeout, prevsnapshot, range, leaseId, ifModifiedSince, ifUnmodifiedSince, ifMatches, ifNoneMatch, requestId).blockingGet();
}
/**
* [Update] The Get Page Ranges Diff operation returns the list of valid page ranges for a page blob that were changed between target blob and previous snapshot.
*
* @param snapshot The snapshot parameter is an opaque DateTime value that, when present, specifies the blob snapshot to retrieve. For more information on working with blob snapshots, see <a href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/creating-a-snapshot-of-a-blob">Creating a Snapshot of a Blob.</a>.
* @param timeout The timeout parameter is expressed in seconds. For more information, see <a href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting Timeouts for Blob Service Operations.</a>.
* @param prevsnapshot Optional in version 2015-07-08 and newer. The prevsnapshot parameter is a DateTime value that specifies that the response will contain only pages that were changed between target blob and previous snapshot. Changed pages include both updated and cleared pages. The target blob may be a snapshot, as long as the snapshot specified by prevsnapshot is the older of the two. Note that incremental snapshots are currently supported only for blobs created on or after January 1, 2016.
* @param range Return only the bytes of the blob in the specified range.
* @param leaseId If specified, the operation only succeeds if the container's lease is active and matches this ID.
* @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the specified date/time.
* @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since the specified date/time.
* @param ifMatches Specify an ETag value to operate only on blobs with a matching value.
* @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value.
* @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the analytics logs when storage analytics logging is enabled.
* @param serviceCallback the async ServiceCallback to handle successful and failed responses.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @return a ServiceFuture which will be completed with the result of the network request.
*/
public ServiceFuture getPageRangesDiffAsync(String snapshot, Integer timeout, String prevsnapshot, String range, String leaseId, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatches, String ifNoneMatch, String requestId, ServiceCallback serviceCallback) {
return ServiceFuture.fromBody(getPageRangesDiffAsync(snapshot, timeout, prevsnapshot, range, leaseId, ifModifiedSince, ifUnmodifiedSince, ifMatches, ifNoneMatch, requestId), serviceCallback);
}
/**
* [Update] The Get Page Ranges Diff operation returns the list of valid page ranges for a page blob that were changed between target blob and previous snapshot.
*
* @param snapshot The snapshot parameter is an opaque DateTime value that, when present, specifies the blob snapshot to retrieve. For more information on working with blob snapshots, see <a href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/creating-a-snapshot-of-a-blob">Creating a Snapshot of a Blob.</a>.
* @param timeout The timeout parameter is expressed in seconds. For more information, see <a href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting Timeouts for Blob Service Operations.</a>.
* @param prevsnapshot Optional in version 2015-07-08 and newer. The prevsnapshot parameter is a DateTime value that specifies that the response will contain only pages that were changed between target blob and previous snapshot. Changed pages include both updated and cleared pages. The target blob may be a snapshot, as long as the snapshot specified by prevsnapshot is the older of the two. Note that incremental snapshots are currently supported only for blobs created on or after January 1, 2016.
* @param range Return only the bytes of the blob in the specified range.
* @param leaseId If specified, the operation only succeeds if the container's lease is active and matches this ID.
* @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the specified date/time.
* @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since the specified date/time.
* @param ifMatches Specify an ETag value to operate only on blobs with a matching value.
* @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value.
* @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the analytics logs when storage analytics logging is enabled.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @return a Single which performs the network request upon subscription.
*/
public Single getPageRangesDiffWithRestResponseAsync(String snapshot, Integer timeout, String prevsnapshot, String range, String leaseId, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatches, String ifNoneMatch, String requestId) {
if (this.client.url() == null) {
throw new IllegalArgumentException("Parameter this.client.url() is required and cannot be null.");
}
if (this.client.version() == null) {
throw new IllegalArgumentException("Parameter this.client.version() is required and cannot be null.");
}
final String comp = "pagelist";
DateTimeRfc1123 ifModifiedSinceConverted = null;
if (ifModifiedSince != null) {
ifModifiedSinceConverted = new DateTimeRfc1123(ifModifiedSince);
}
DateTimeRfc1123 ifUnmodifiedSinceConverted = null;
if (ifUnmodifiedSince != null) {
ifUnmodifiedSinceConverted = new DateTimeRfc1123(ifUnmodifiedSince);
}
return service.getPageRangesDiff(this.client.url(), snapshot, timeout, prevsnapshot, range, leaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatches, ifNoneMatch, this.client.version(), requestId, comp);
}
/**
* [Update] The Get Page Ranges Diff operation returns the list of valid page ranges for a page blob that were changed between target blob and previous snapshot.
*
* @param snapshot The snapshot parameter is an opaque DateTime value that, when present, specifies the blob snapshot to retrieve. For more information on working with blob snapshots, see <a href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/creating-a-snapshot-of-a-blob">Creating a Snapshot of a Blob.</a>.
* @param timeout The timeout parameter is expressed in seconds. For more information, see <a href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting Timeouts for Blob Service Operations.</a>.
* @param prevsnapshot Optional in version 2015-07-08 and newer. The prevsnapshot parameter is a DateTime value that specifies that the response will contain only pages that were changed between target blob and previous snapshot. Changed pages include both updated and cleared pages. The target blob may be a snapshot, as long as the snapshot specified by prevsnapshot is the older of the two. Note that incremental snapshots are currently supported only for blobs created on or after January 1, 2016.
* @param range Return only the bytes of the blob in the specified range.
* @param leaseId If specified, the operation only succeeds if the container's lease is active and matches this ID.
* @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the specified date/time.
* @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since the specified date/time.
* @param ifMatches Specify an ETag value to operate only on blobs with a matching value.
* @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value.
* @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the analytics logs when storage analytics logging is enabled.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @return a Single which performs the network request upon subscription.
*/
public Maybe getPageRangesDiffAsync(String snapshot, Integer timeout, String prevsnapshot, String range, String leaseId, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatches, String ifNoneMatch, String requestId) {
return getPageRangesDiffWithRestResponseAsync(snapshot, timeout, prevsnapshot, range, leaseId, ifModifiedSince, ifUnmodifiedSince, ifMatches, ifNoneMatch, requestId)
.flatMapMaybe((PageBlobGetPageRangesDiffResponse res) -> res.body() == null ? Maybe.empty() : Maybe.just(res.body()));
}
/**
* Resize the Blob.
*
* @param blobContentLength This header specifies the maximum size for the page blob, up to 1 TB. The page blob size must be aligned to a 512-byte boundary.
* @param timeout The timeout parameter is expressed in seconds. For more information, see <a href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting Timeouts for Blob Service Operations.</a>.
* @param leaseId If specified, the operation only succeeds if the container's lease is active and matches this ID.
* @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the specified date/time.
* @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since the specified date/time.
* @param ifMatches Specify an ETag value to operate only on blobs with a matching value.
* @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value.
* @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the analytics logs when storage analytics logging is enabled.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws StorageErrorException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
*/
public void resize(@NonNull long blobContentLength, Integer timeout, String leaseId, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatches, String ifNoneMatch, String requestId) {
resizeAsync(blobContentLength, timeout, leaseId, ifModifiedSince, ifUnmodifiedSince, ifMatches, ifNoneMatch, requestId).blockingAwait();
}
/**
* Resize the Blob.
*
* @param blobContentLength This header specifies the maximum size for the page blob, up to 1 TB. The page blob size must be aligned to a 512-byte boundary.
* @param timeout The timeout parameter is expressed in seconds. For more information, see <a href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting Timeouts for Blob Service Operations.</a>.
* @param leaseId If specified, the operation only succeeds if the container's lease is active and matches this ID.
* @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the specified date/time.
* @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since the specified date/time.
* @param ifMatches Specify an ETag value to operate only on blobs with a matching value.
* @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value.
* @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the analytics logs when storage analytics logging is enabled.
* @param serviceCallback the async ServiceCallback to handle successful and failed responses.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @return a ServiceFuture which will be completed with the result of the network request.
*/
public ServiceFuture resizeAsync(@NonNull long blobContentLength, Integer timeout, String leaseId, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatches, String ifNoneMatch, String requestId, ServiceCallback serviceCallback) {
return ServiceFuture.fromBody(resizeAsync(blobContentLength, timeout, leaseId, ifModifiedSince, ifUnmodifiedSince, ifMatches, ifNoneMatch, requestId), serviceCallback);
}
/**
* Resize the Blob.
*
* @param blobContentLength This header specifies the maximum size for the page blob, up to 1 TB. The page blob size must be aligned to a 512-byte boundary.
* @param timeout The timeout parameter is expressed in seconds. For more information, see <a href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting Timeouts for Blob Service Operations.</a>.
* @param leaseId If specified, the operation only succeeds if the container's lease is active and matches this ID.
* @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the specified date/time.
* @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since the specified date/time.
* @param ifMatches Specify an ETag value to operate only on blobs with a matching value.
* @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value.
* @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the analytics logs when storage analytics logging is enabled.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @return a Single which performs the network request upon subscription.
*/
public Single resizeWithRestResponseAsync(@NonNull long blobContentLength, Integer timeout, String leaseId, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatches, String ifNoneMatch, String requestId) {
if (this.client.url() == null) {
throw new IllegalArgumentException("Parameter this.client.url() is required and cannot be null.");
}
if (this.client.version() == null) {
throw new IllegalArgumentException("Parameter this.client.version() is required and cannot be null.");
}
final String comp = "properties";
DateTimeRfc1123 ifModifiedSinceConverted = null;
if (ifModifiedSince != null) {
ifModifiedSinceConverted = new DateTimeRfc1123(ifModifiedSince);
}
DateTimeRfc1123 ifUnmodifiedSinceConverted = null;
if (ifUnmodifiedSince != null) {
ifUnmodifiedSinceConverted = new DateTimeRfc1123(ifUnmodifiedSince);
}
return service.resize(this.client.url(), timeout, leaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatches, ifNoneMatch, blobContentLength, this.client.version(), requestId, comp);
}
/**
* Resize the Blob.
*
* @param blobContentLength This header specifies the maximum size for the page blob, up to 1 TB. The page blob size must be aligned to a 512-byte boundary.
* @param timeout The timeout parameter is expressed in seconds. For more information, see <a href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting Timeouts for Blob Service Operations.</a>.
* @param leaseId If specified, the operation only succeeds if the container's lease is active and matches this ID.
* @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the specified date/time.
* @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since the specified date/time.
* @param ifMatches Specify an ETag value to operate only on blobs with a matching value.
* @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value.
* @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the analytics logs when storage analytics logging is enabled.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @return a Single which performs the network request upon subscription.
*/
public Completable resizeAsync(@NonNull long blobContentLength, Integer timeout, String leaseId, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatches, String ifNoneMatch, String requestId) {
return resizeWithRestResponseAsync(blobContentLength, timeout, leaseId, ifModifiedSince, ifUnmodifiedSince, ifMatches, ifNoneMatch, requestId)
.toCompletable();
}
/**
* Update the sequence number of the blob.
*
* @param sequenceNumberAction Required if the x-ms-blob-sequence-number header is set for the request. This property applies to page blobs only. This property indicates how the service should modify the blob's sequence number. Possible values include: 'max', 'update', 'increment'.
* @param timeout The timeout parameter is expressed in seconds. For more information, see <a href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting Timeouts for Blob Service Operations.</a>.
* @param leaseId If specified, the operation only succeeds if the container's lease is active and matches this ID.
* @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the specified date/time.
* @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since the specified date/time.
* @param ifMatches Specify an ETag value to operate only on blobs with a matching value.
* @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value.
* @param blobSequenceNumber Set for page blobs only. The sequence number is a user-controlled value that you can use to track requests. The value of the sequence number must be between 0 and 2^63 - 1.
* @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the analytics logs when storage analytics logging is enabled.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws StorageErrorException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
*/
public void updateSequenceNumber(@NonNull SequenceNumberActionType sequenceNumberAction, Integer timeout, String leaseId, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatches, String ifNoneMatch, Long blobSequenceNumber, String requestId) {
updateSequenceNumberAsync(sequenceNumberAction, timeout, leaseId, ifModifiedSince, ifUnmodifiedSince, ifMatches, ifNoneMatch, blobSequenceNumber, requestId).blockingAwait();
}
/**
* Update the sequence number of the blob.
*
* @param sequenceNumberAction Required if the x-ms-blob-sequence-number header is set for the request. This property applies to page blobs only. This property indicates how the service should modify the blob's sequence number. Possible values include: 'max', 'update', 'increment'.
* @param timeout The timeout parameter is expressed in seconds. For more information, see <a href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting Timeouts for Blob Service Operations.</a>.
* @param leaseId If specified, the operation only succeeds if the container's lease is active and matches this ID.
* @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the specified date/time.
* @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since the specified date/time.
* @param ifMatches Specify an ETag value to operate only on blobs with a matching value.
* @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value.
* @param blobSequenceNumber Set for page blobs only. The sequence number is a user-controlled value that you can use to track requests. The value of the sequence number must be between 0 and 2^63 - 1.
* @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the analytics logs when storage analytics logging is enabled.
* @param serviceCallback the async ServiceCallback to handle successful and failed responses.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @return a ServiceFuture which will be completed with the result of the network request.
*/
public ServiceFuture updateSequenceNumberAsync(@NonNull SequenceNumberActionType sequenceNumberAction, Integer timeout, String leaseId, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatches, String ifNoneMatch, Long blobSequenceNumber, String requestId, ServiceCallback serviceCallback) {
return ServiceFuture.fromBody(updateSequenceNumberAsync(sequenceNumberAction, timeout, leaseId, ifModifiedSince, ifUnmodifiedSince, ifMatches, ifNoneMatch, blobSequenceNumber, requestId), serviceCallback);
}
/**
* Update the sequence number of the blob.
*
* @param sequenceNumberAction Required if the x-ms-blob-sequence-number header is set for the request. This property applies to page blobs only. This property indicates how the service should modify the blob's sequence number. Possible values include: 'max', 'update', 'increment'.
* @param timeout The timeout parameter is expressed in seconds. For more information, see <a href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting Timeouts for Blob Service Operations.</a>.
* @param leaseId If specified, the operation only succeeds if the container's lease is active and matches this ID.
* @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the specified date/time.
* @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since the specified date/time.
* @param ifMatches Specify an ETag value to operate only on blobs with a matching value.
* @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value.
* @param blobSequenceNumber Set for page blobs only. The sequence number is a user-controlled value that you can use to track requests. The value of the sequence number must be between 0 and 2^63 - 1.
* @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the analytics logs when storage analytics logging is enabled.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @return a Single which performs the network request upon subscription.
*/
public Single updateSequenceNumberWithRestResponseAsync(@NonNull SequenceNumberActionType sequenceNumberAction, Integer timeout, String leaseId, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatches, String ifNoneMatch, Long blobSequenceNumber, String requestId) {
if (this.client.url() == null) {
throw new IllegalArgumentException("Parameter this.client.url() is required and cannot be null.");
}
if (sequenceNumberAction == null) {
throw new IllegalArgumentException("Parameter sequenceNumberAction is required and cannot be null.");
}
if (this.client.version() == null) {
throw new IllegalArgumentException("Parameter this.client.version() is required and cannot be null.");
}
final String comp = "properties";
DateTimeRfc1123 ifModifiedSinceConverted = null;
if (ifModifiedSince != null) {
ifModifiedSinceConverted = new DateTimeRfc1123(ifModifiedSince);
}
DateTimeRfc1123 ifUnmodifiedSinceConverted = null;
if (ifUnmodifiedSince != null) {
ifUnmodifiedSinceConverted = new DateTimeRfc1123(ifUnmodifiedSince);
}
return service.updateSequenceNumber(this.client.url(), timeout, leaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatches, ifNoneMatch, sequenceNumberAction, blobSequenceNumber, this.client.version(), requestId, comp);
}
/**
* Update the sequence number of the blob.
*
* @param sequenceNumberAction Required if the x-ms-blob-sequence-number header is set for the request. This property applies to page blobs only. This property indicates how the service should modify the blob's sequence number. Possible values include: 'max', 'update', 'increment'.
* @param timeout The timeout parameter is expressed in seconds. For more information, see <a href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting Timeouts for Blob Service Operations.</a>.
* @param leaseId If specified, the operation only succeeds if the container's lease is active and matches this ID.
* @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the specified date/time.
* @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since the specified date/time.
* @param ifMatches Specify an ETag value to operate only on blobs with a matching value.
* @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value.
* @param blobSequenceNumber Set for page blobs only. The sequence number is a user-controlled value that you can use to track requests. The value of the sequence number must be between 0 and 2^63 - 1.
* @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the analytics logs when storage analytics logging is enabled.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @return a Single which performs the network request upon subscription.
*/
public Completable updateSequenceNumberAsync(@NonNull SequenceNumberActionType sequenceNumberAction, Integer timeout, String leaseId, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatches, String ifNoneMatch, Long blobSequenceNumber, String requestId) {
return updateSequenceNumberWithRestResponseAsync(sequenceNumberAction, timeout, leaseId, ifModifiedSince, ifUnmodifiedSince, ifMatches, ifNoneMatch, blobSequenceNumber, requestId)
.toCompletable();
}
/**
* The Copy Incremental operation copies a snapshot of the source page blob to a destination page blob. The snapshot is copied such that only the differential changes between the previously copied snapshot are transferred to the destination. The copied snapshots are complete copies of the original snapshot and can be read or copied from as usual. This API is supported since REST version 2016-05-31.
*
* @param copySource Specifies the name of the source page blob snapshot. This value is a URL of up to 2 KB in length that specifies a page blob snapshot. The value should be URL-encoded as it would appear in a request URI. The source blob must either be public or must be authenticated via a shared access signature.
* @param timeout The timeout parameter is expressed in seconds. For more information, see <a href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting Timeouts for Blob Service Operations.</a>.
* @param metadata Optional. Specifies a user-defined name-value pair associated with the blob. If no name-value pairs are specified, the operation will copy the metadata from the source blob or file to the destination blob. If one or more name-value pairs are specified, the destination blob is created with the specified metadata, and metadata is not copied from the source blob or file. Note that beginning with version 2009-09-19, metadata names must adhere to the naming rules for C# identifiers. See Naming and Referencing Containers, Blobs, and Metadata for more information.
* @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the specified date/time.
* @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since the specified date/time.
* @param ifMatches Specify an ETag value to operate only on blobs with a matching value.
* @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value.
* @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the analytics logs when storage analytics logging is enabled.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws StorageErrorException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
*/
public void copyIncremental(@NonNull URL copySource, Integer timeout, Map metadata, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatches, String ifNoneMatch, String requestId) {
copyIncrementalAsync(copySource, timeout, metadata, ifModifiedSince, ifUnmodifiedSince, ifMatches, ifNoneMatch, requestId).blockingAwait();
}
/**
* The Copy Incremental operation copies a snapshot of the source page blob to a destination page blob. The snapshot is copied such that only the differential changes between the previously copied snapshot are transferred to the destination. The copied snapshots are complete copies of the original snapshot and can be read or copied from as usual. This API is supported since REST version 2016-05-31.
*
* @param copySource Specifies the name of the source page blob snapshot. This value is a URL of up to 2 KB in length that specifies a page blob snapshot. The value should be URL-encoded as it would appear in a request URI. The source blob must either be public or must be authenticated via a shared access signature.
* @param timeout The timeout parameter is expressed in seconds. For more information, see <a href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting Timeouts for Blob Service Operations.</a>.
* @param metadata Optional. Specifies a user-defined name-value pair associated with the blob. If no name-value pairs are specified, the operation will copy the metadata from the source blob or file to the destination blob. If one or more name-value pairs are specified, the destination blob is created with the specified metadata, and metadata is not copied from the source blob or file. Note that beginning with version 2009-09-19, metadata names must adhere to the naming rules for C# identifiers. See Naming and Referencing Containers, Blobs, and Metadata for more information.
* @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the specified date/time.
* @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since the specified date/time.
* @param ifMatches Specify an ETag value to operate only on blobs with a matching value.
* @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value.
* @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the analytics logs when storage analytics logging is enabled.
* @param serviceCallback the async ServiceCallback to handle successful and failed responses.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @return a ServiceFuture which will be completed with the result of the network request.
*/
public ServiceFuture copyIncrementalAsync(@NonNull URL copySource, Integer timeout, Map metadata, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatches, String ifNoneMatch, String requestId, ServiceCallback serviceCallback) {
return ServiceFuture.fromBody(copyIncrementalAsync(copySource, timeout, metadata, ifModifiedSince, ifUnmodifiedSince, ifMatches, ifNoneMatch, requestId), serviceCallback);
}
/**
* The Copy Incremental operation copies a snapshot of the source page blob to a destination page blob. The snapshot is copied such that only the differential changes between the previously copied snapshot are transferred to the destination. The copied snapshots are complete copies of the original snapshot and can be read or copied from as usual. This API is supported since REST version 2016-05-31.
*
* @param copySource Specifies the name of the source page blob snapshot. This value is a URL of up to 2 KB in length that specifies a page blob snapshot. The value should be URL-encoded as it would appear in a request URI. The source blob must either be public or must be authenticated via a shared access signature.
* @param timeout The timeout parameter is expressed in seconds. For more information, see <a href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting Timeouts for Blob Service Operations.</a>.
* @param metadata Optional. Specifies a user-defined name-value pair associated with the blob. If no name-value pairs are specified, the operation will copy the metadata from the source blob or file to the destination blob. If one or more name-value pairs are specified, the destination blob is created with the specified metadata, and metadata is not copied from the source blob or file. Note that beginning with version 2009-09-19, metadata names must adhere to the naming rules for C# identifiers. See Naming and Referencing Containers, Blobs, and Metadata for more information.
* @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the specified date/time.
* @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since the specified date/time.
* @param ifMatches Specify an ETag value to operate only on blobs with a matching value.
* @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value.
* @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the analytics logs when storage analytics logging is enabled.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @return a Single which performs the network request upon subscription.
*/
public Single copyIncrementalWithRestResponseAsync(@NonNull URL copySource, Integer timeout, Map metadata, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatches, String ifNoneMatch, String requestId) {
if (this.client.url() == null) {
throw new IllegalArgumentException("Parameter this.client.url() is required and cannot be null.");
}
if (copySource == null) {
throw new IllegalArgumentException("Parameter copySource is required and cannot be null.");
}
if (this.client.version() == null) {
throw new IllegalArgumentException("Parameter this.client.version() is required and cannot be null.");
}
Validator.validate(metadata);
Validator.validate(copySource);
final String comp = "incrementalcopy";
DateTimeRfc1123 ifModifiedSinceConverted = null;
if (ifModifiedSince != null) {
ifModifiedSinceConverted = new DateTimeRfc1123(ifModifiedSince);
}
DateTimeRfc1123 ifUnmodifiedSinceConverted = null;
if (ifUnmodifiedSince != null) {
ifUnmodifiedSinceConverted = new DateTimeRfc1123(ifUnmodifiedSince);
}
return service.copyIncremental(this.client.url(), timeout, metadata, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatches, ifNoneMatch, copySource, this.client.version(), requestId, comp);
}
/**
* The Copy Incremental operation copies a snapshot of the source page blob to a destination page blob. The snapshot is copied such that only the differential changes between the previously copied snapshot are transferred to the destination. The copied snapshots are complete copies of the original snapshot and can be read or copied from as usual. This API is supported since REST version 2016-05-31.
*
* @param copySource Specifies the name of the source page blob snapshot. This value is a URL of up to 2 KB in length that specifies a page blob snapshot. The value should be URL-encoded as it would appear in a request URI. The source blob must either be public or must be authenticated via a shared access signature.
* @param timeout The timeout parameter is expressed in seconds. For more information, see <a href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting Timeouts for Blob Service Operations.</a>.
* @param metadata Optional. Specifies a user-defined name-value pair associated with the blob. If no name-value pairs are specified, the operation will copy the metadata from the source blob or file to the destination blob. If one or more name-value pairs are specified, the destination blob is created with the specified metadata, and metadata is not copied from the source blob or file. Note that beginning with version 2009-09-19, metadata names must adhere to the naming rules for C# identifiers. See Naming and Referencing Containers, Blobs, and Metadata for more information.
* @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the specified date/time.
* @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since the specified date/time.
* @param ifMatches Specify an ETag value to operate only on blobs with a matching value.
* @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value.
* @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the analytics logs when storage analytics logging is enabled.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @return a Single which performs the network request upon subscription.
*/
public Completable copyIncrementalAsync(@NonNull URL copySource, Integer timeout, Map metadata, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatches, String ifNoneMatch, String requestId) {
return copyIncrementalWithRestResponseAsync(copySource, timeout, metadata, ifModifiedSince, ifUnmodifiedSince, ifMatches, ifNoneMatch, requestId)
.toCompletable();
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy