diff --git a/microsoft-azure-api/src/main/java/com/microsoft/windowsazure/services/blob/BlobConfiguration.java b/microsoft-azure-api/src/main/java/com/microsoft/windowsazure/services/blob/BlobConfiguration.java index d561bcb73a87e..a8191bce65ae1 100644 --- a/microsoft-azure-api/src/main/java/com/microsoft/windowsazure/services/blob/BlobConfiguration.java +++ b/microsoft-azure-api/src/main/java/com/microsoft/windowsazure/services/blob/BlobConfiguration.java @@ -2,20 +2,41 @@ * Copyright 2011 Microsoft Corporation * * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.microsoft.windowsazure.services.blob; +/** + * This class contains static strings used to identify parts of a service configuration instance associated with the + * Windows Azure Blob service. + *
+ * These values must not be altered.
+ */
public class BlobConfiguration {
+ /**
+ * The Blob configuration account name constant. This
+ * Use the {@link BlobServiceOptions options} parameter to specify a server timeout for the operation.
+ *
+ * @param options
+ * A {@link BlobServiceOptions} instance containing options for the request.
+ * @return
+ * A {@link GetServicePropertiesResult} reference to the blob service properties.
+ *
+ * @throws ServiceException
+ * if an error occurs accessing the storage service.
+ */
GetServicePropertiesResult getServiceProperties(BlobServiceOptions options) throws ServiceException;
+ /**
+ * Sets the service properties of the blob storage account.
+ *
+ * @param serviceProperties
+ * A {@link ServiceProperties} instance containing the blob service properties to set.
+ * @throws ServiceException
+ * if an error occurs accessing the storage service.
+ */
void setServiceProperties(ServiceProperties serviceProperties) throws ServiceException;
+ /**
+ * Sets the service properties of the blob storage account, using the specified options.
+ *
+ * Use the {@link BlobServiceOptions options} parameter to specify the server timeout for the operation.
+ *
+ * @param serviceProperties
+ * A {@link ServiceProperties} instance containing the blob service properties to set.
+ * @param options
+ * A {@link BlobServiceOptions} instance containing options for the request.
+ * @throws ServiceException
+ * if an error occurs accessing the storage service.
+ */
void setServiceProperties(ServiceProperties serviceProperties, BlobServiceOptions options) throws ServiceException;
+ /**
+ * Gets a list of the containers in the blob storage account.
+ *
+ * @return
+ * A {@link ListContainersResult} reference to the result of the list containers operation.
+ * @throws ServiceException
+ * if an error occurs accessing the storage service.
+ */
ListContainersResult listContainers() throws ServiceException;
+ /**
+ * Gets a list of the containers in the blob storage account using the specified options.
+ *
+ * Use the {@link ListContainersOptions options} parameter to specify options, including a server response timeout
+ * for the request, a container name prefix filter, a marker for continuing requests, the maximum number of results
+ * to return in a request, and whether to include container metadata in the results.
+ *
+ * @param options
+ * A {@link ListContainersOptions} instance containing options for the request.
+ * @return
+ * A {@link ListContainersResult} reference to the result of the list containers operation.
+ * @throws ServiceException
+ * if an error occurs accessing the storage service.
+ */
ListContainersResult listContainers(ListContainersOptions options) throws ServiceException;
+ /**
+ * Creates a container with the specified name.
+ *
+ * Container names must be unique within a storage account, and must follow the naming rules specified in Naming and Referencing Containers,
+ * Blobs, and Metadata.
+ *
+ * @param container
+ * A {@link String} containing the name of the container to create.
+ * @throws ServiceException
+ * if an error occurs accessing the storage service.
+ */
void createContainer(String container) throws ServiceException;
+ /**
+ * Creates a container with the specified name, using the specified options.
+ *
+ * Use the {@link CreateContainerOptions options} parameter to specify options, including a server response timeout
+ * for the request, metadata to set on the container, and the public access level for container and blob data.
+ * Container names must be unique within a storage account, and must follow the naming rules specified in Naming and Referencing Containers,
+ * Blobs, and Metadata.
+ *
+ * @param container
+ * A {@link String} containing the name of the container to create.
+ * @param options
+ * A {@link CreateContainerOptions} instance containing options for the request.
+ * @throws ServiceException
+ * if an error occurs accessing the storage service.
+ */
void createContainer(String container, CreateContainerOptions options) throws ServiceException;
+ /**
+ * Marks a container for deletion. The container and any blobs contained within it are later deleted during garbage
+ * collection.
+ *
+ * When a container is deleted, a container with the same name cannot be created for at least 30 seconds; the
+ * container may not be available for more than 30 seconds if the service is still processing the request.
+ *
+ * @param container
+ * A {@link String} containing the name of the container to delete.
+ * @throws ServiceException
+ * if an error occurs accessing the storage service.
+ */
void deleteContainer(String container) throws ServiceException;
+ /**
+ * Marks a container for deletion, using the specified options. The container and any blobs contained within it are
+ * later deleted during garbage collection.
+ *
+ * Use the {@link DeleteContainerOptions options} parameter to specify the server response timeout and any access
+ * conditions for the container deletion operation. Access conditions can be used to make the operation conditional
+ * on the value of the Etag or last modified time of the container.
+ *
+ * When a container is deleted, a container with the same name cannot be created for at least 30 seconds; the
+ * container may not be available for more than 30 seconds if the service is still processing the request.
+ *
+ * @param container
+ * A {@link String} containing the name of the container to delete.
+ * @param options
+ * A {@link DeleteContainerOptions} instance containing options for the request.
+ * @throws ServiceException
+ * if an error occurs accessing the storage service.
+ */
void deleteContainer(String container, DeleteContainerOptions options) throws ServiceException;
+ /**
+ * Gets all metadata and system properties for a container.
+ *
+ * @param container
+ * A {@link String} containing the name of the container to get properties and metadata for.
+ * @return
+ * A {@link GetContainerPropertiesResult} reference to the container properties and metadata.
+ * @throws ServiceException
+ * if an error occurs accessing the storage service.
+ */
GetContainerPropertiesResult getContainerProperties(String container) throws ServiceException;
+ /**
+ * Gets all metadata and system properties for a container, using the specified options.
+ *
+ * Use the {@link BlobServiceOptions options} parameter to specify the server timeout for the operation.
+ *
+ * @param container
+ * A {@link String} containing the name of the container to get properties and metadata for.
+ * @param options
+ * A {@link BlobServiceOptions} instance containing options for the request.
+ * @return
+ * A {@link GetContainerPropertiesResult} reference to the container properties and metadata.
+ * @throws ServiceException
+ * if an error occurs accessing the storage service.
+ */
GetContainerPropertiesResult getContainerProperties(String container, BlobServiceOptions options)
throws ServiceException;
+ /**
+ * Gets all metadata for a container.
+ *
+ * @param container
+ * A {@link String} containing the name of the container to get the metadata from.
+ * @return
+ * A {@link GetContainerPropertiesResult} reference to the container metadata.
+ * @throws ServiceException
+ * if an error occurs accessing the storage service.
+ */
GetContainerPropertiesResult getContainerMetadata(String container) throws ServiceException;
+ /**
+ * Gets all metadata for a container, using the specified options.
+ *
+ * Use the {@link BlobServiceOptions options} parameter to specify the server timeout for the operation.
+ *
+ * @param container
+ * A {@link String} containing the name of the container to get the metadata from.
+ * @param options
+ * A {@link BlobServiceOptions} instance containing options for the request.
+ * @return
+ * A {@link GetContainerPropertiesResult} reference to the container metadata.
+ * @throws ServiceException
+ * if an error occurs accessing the storage service.
+ */
GetContainerPropertiesResult getContainerMetadata(String container, BlobServiceOptions options)
throws ServiceException;
+ /**
+ * Gets the public access level and container-level access policies for a container.
+ *
+ * @param container
+ * A {@link String} containing the name of the container to get the public access level and
+ * container-level access policies from.
+ * @return
+ * A {@link GetContainerACLResult} reference to the container's public access level and
+ * container-level access policies.
+ * @throws ServiceException
+ * if an error occurs accessing the storage service.
+ */
GetContainerACLResult getContainerACL(String container) throws ServiceException;
+ /**
+ * Gets the public access level and container-level access policies for a container, using the specified
+ * options.
+ *
+ * Use the {@link BlobServiceOptions options} parameter to specify the server timeout for the operation.
+ *
+ * @param container
+ * A {@link String} containing the name of the container to get the public access level and
+ * container-level access policies from.
+ * @param options
+ * A {@link BlobServiceOptions} instance containing options for the request.
+ * @return
+ * A {@link GetContainerACLResult} reference to the container's public access level and
+ * container-level access policies.
+ * @throws ServiceException
+ * if an error occurs accessing the storage service.
+ */
GetContainerACLResult getContainerACL(String container, BlobServiceOptions options) throws ServiceException;
+ /**
+ * Sets the public access level and container-level access policies for a container.
+ *
+ * @param container
+ * A {@link String} containing the name of the container to set the public access level and
+ * container-level access policies on.
+ * @param acl
+ * A {@link ContainerACL} instance containing the public access level and container-level access policies
+ * to set on the container.
+ * @throws ServiceException
+ * if an error occurs accessing the storage service.
+ */
void setContainerACL(String container, ContainerACL acl) throws ServiceException;
+ /**
+ * Sets the public access level and container-level access policies for a container, using the specified options.
+ *
+ * Use the {@link BlobServiceOptions options} parameter to specify the server timeout for the operation.
+ *
+ * @param container
+ * A {@link String} containing the name of the container to set the public access level and
+ * container-level access policies on.
+ * @param acl
+ * A {@link ContainerACL} instance containing the public access level and container-level access policies
+ * to set on the container.
+ * @param options
+ * A {@link BlobServiceOptions} instance containing options for the request.
+ * @throws ServiceException
+ * if an error occurs accessing the storage service.
+ */
void setContainerACL(String container, ContainerACL acl, BlobServiceOptions options) throws ServiceException;
+ /**
+ * Sets the metadata on a container.
+ *
+ * Calling this method overwrites all existing metadata that is associated with the container. It is not possible to
+ * modify an individual name-value pair. To keep the existing metadata and update or add individual values, make a
+ * copy of the metadata, make your changes, and upload the modified copy. Calling this method also updates the Etag
+ * and Last-Modified-Time properties for the container.
+ *
+ * Metadata for a container can also be set at the time it is created.
+ *
+ * @param container
+ * A {@link String} containing the name of the container to set metadata on.
+ * @param metadata
+ * A {@link java.util.HashMap} of pairs of {@link String} containing the metadata name-value pairs to set
+ * on the container.
+ * @throws ServiceException
+ * if an error occurs accessing the storage service.
+ */
void setContainerMetadata(String container, HashMap
+ * Use the {@link SetContainerMetadataOptions options} parameter to specify the server timeout for the operation,
+ * and to set access conditions on whether to update the metadata or not.
+ *
+ * Calling this method overwrites all existing metadata that is associated with the container. It is not possible to
+ * modify an individual name-value pair. To keep the existing metadata and update or add individual values, make a
+ * copy of the metadata, make your changes, and upload the modified copy. Calling this method also updates the ETag
+ * and last modified time properties for the container.
+ *
+ * Metadata for a container can also be set at the time it is created.
+ *
+ * @param container
+ * A {@link String} containing the name of the container to set metadata on.
+ * @param metadata
+ * A {@link java.util.HashMap} of pairs of {@link String} containing the metadata name-value pairs to set
+ * on the container.
+ * @param options
+ * A {@link SetContainerMetadataOptions} instance containing options for the request.
+ * @throws ServiceException
+ * if an error occurs accessing the storage service.
+ */
void setContainerMetadata(String container, HashMap
+ * Use the {@link ListBlobsOptions options} parameter to optionally specify the server timeout for the operation, a
+ * prefix for blobs to match, a marker to continue a list operation, a maximum number of results to return with one
+ * list operation, a delimiter for structuring virtual blob hierarchies, and whether to include blob metadata, blob
+ * snapshots, and uncommitted blobs in the results.
+ *
+ * @param container
+ * A {@link String} containing the name of the container of blobs to list.
+ * @param options
+ * A {@link ListBlobsOptions} instance containing options for the request.
+ * @return
+ * A {@link ListBlobsResult} reference to the result of the list blobs operation.
+ * @throws ServiceException
+ * if an error occurs accessing the storage service.
+ */
ListBlobsResult listBlobs(String container, ListBlobsOptions options) throws ServiceException;
+ /**
+ * Creates a page blob of the specified maximum length.
+ *
+ * Note that this method only initializes the page blob. To add content to a page blob, use the
+ * {@link BlobContract#createBlobPages(String, String, PageRange, long, InputStream)} or
+ * {@link BlobContract#createBlobPages(String, String, PageRange, long, InputStream, CreateBlobPagesOptions)}
+ * methods.
+ *
+ * @param container
+ * A {@link String} containing the name of the container to create the blob in.
+ * @param blob
+ * A {@link String} containing the name of the blob to create. A blob name can contain any combination of
+ * characters, but reserved URL characters must be properly escaped. A blob name must be at least one
+ * character long and cannot be more than 1,024 characters long, and must be unique within the container.
+ * @param length
+ * The length in bytes of the page blob to create. The length must be a multiple of 512 and may be up to
+ * 1 TB.
+ * @throws ServiceException
+ * if an error occurs accessing the storage service.
+ */
void createPageBlob(String container, String blob, int length) throws ServiceException;
+ /**
+ * Creates a page blob of the specified maximum length, using the specified options.
+ *
+ * Use the {@link CreateBlobOptions options} parameter to optionally specify the server timeout for the operation,
+ * the MIME content type and content encoding for the blob, the content language, the MD5 hash, a cache control
+ * value, blob metadata, and a sequence number.
+ *
+ * Note that this method only initializes the blob. To add content to a page blob, use the
+ * {@link BlobContract#createBlobPages(String, String, PageRange, long, InputStream)} or
+ * {@link BlobContract#createBlobPages(String, String, PageRange, long, InputStream, CreateBlobPagesOptions)}
+ * methods.
+ *
+ * @param container
+ * A {@link String} containing the name of the container to create the blob in.
+ * @param blob
+ * A {@link String} containing the name of the blob to create. A blob name can contain any combination of
+ * characters, but reserved URL characters must be properly escaped. A blob name must be at least one
+ * character long and cannot be more than 1,024 characters long, and must be unique within the container.
+ * @param length
+ * The length in bytes of the page blob to create. The length must be a multiple of 512 and may be up to
+ * 1 TB.
+ * @param options
+ * A {@link CreateBlobOptions} instance containing options for the request.
+ * @throws ServiceException
+ * if an error occurs accessing the storage service.
+ */
void createPageBlob(String container, String blob, int length, CreateBlobOptions options) throws ServiceException;
+ /**
+ * Creates a block blob from a content stream.
+ *
+ * @param container
+ * A {@link String} containing the name of the container to create the blob in.
+ * @param blob
+ * A {@link String} containing the name of the blob to create. A blob name can contain any combination of
+ * characters, but reserved URL characters must be properly escaped. A blob name must be at least one
+ * character long and cannot be more than 1,024 characters long, and must be unique within the container.
+ * @param contentStream
+ * An {@link InputStream} reference to the content stream to upload to the new blob.
+ * @throws ServiceException
+ * if an error occurs accessing the storage service.
+ */
void createBlockBlob(String container, String blob, InputStream contentStream) throws ServiceException;
+ /**
+ * Creates a block blob from a content stream, using the specified options.
+ *
+ * Use the {@link CreateBlobOptions options} parameter to optionally specify the server timeout for the operation,
+ * the MIME content type and content encoding for the blob, the content language, the MD5 hash, a cache control
+ * value, and blob metadata.
+ *
+ * @param container
+ * A {@link String} containing the name of the container to create the blob in.
+ * @param blob
+ * A {@link String} containing the name of the blob to create. A blob name can contain any combination of
+ * characters, but reserved URL characters must be properly escaped. A blob name must be at least one
+ * character long and cannot be more than 1,024 characters long, and must be unique within the container.
+ * @param contentStream
+ * An {@link InputStream} reference to the content to upload to the new blob.
+ * @param options
+ * A {@link CreateBlobOptions} instance containing options for the request.
+ * @throws ServiceException
+ * if an error occurs accessing the storage service.
+ */
void createBlockBlob(String container, String blob, InputStream contentStream, CreateBlobOptions options)
throws ServiceException;
+ /**
+ * Clears a range of pages from a page blob.
+ *
+ * This method clears and releases the storage for the page range specified by the range parameter within
+ * the page blob specified by the blob and container parameters. The range parameter can
+ * specify up to the value of the blob's full size.
+ *
+ * @param container
+ * A {@link String} containing the name of the blob's container.
+ * @param blob
+ * A {@link String} containing the name of the blob to clear the range from.
+ * @param range
+ * A {@link PageRange} containing the start and end of the range to clear in the page blob.
+ * @return
+ * A {@link CreateBlobPagesResult} reference to the result of the clear blob pages operation.
+ * @throws ServiceException
+ * if an error occurs accessing the storage service.
+ */
CreateBlobPagesResult clearBlobPages(String container, String blob, PageRange range) throws ServiceException;
+ /**
+ * Clears a range of pages from a page blob, using the specified options.
+ *
+ * This method clears and releases the storage for the page range specified by the range parameter within
+ * the page blob specified by the blob and container parameters. The range parameter can
+ * specify up to the value of the blob's full size. Use the {@link CreateBlobPagesOptions options} parameter to
+ * optionally specify the server timeout for the operation, the lease ID if the blob has an active lease, and access
+ * conditions for the clear pages operation.
+ *
+ * @param container
+ * A {@link String} containing the name of the blob's container.
+ * @param blob
+ * A {@link String} containing the name of the blob to clear the range from.
+ * @param range
+ * A {@link PageRange} containing the start and end of the range to clear in the page blob.
+ * @param options
+ * A {@link CreateBlobPagesOptions} instance containing options for the request.
+ * @return
+ * A {@link CreateBlobPagesResult} reference to the result of the clear blob pages operation.
+ * @throws ServiceException
+ * if an error occurs accessing the storage service.
+ */
CreateBlobPagesResult clearBlobPages(String container, String blob, PageRange range, CreateBlobPagesOptions options)
throws ServiceException;
+ /**
+ * Creates or updates a range of pages in a page blob.
+ *
+ * This method creates or updates the storage for the page range specified by the range parameter within
+ * the page blob specified by the blob and container parameters. The range parameter can
+ * specify up to 4MB of data, and its length must match the length parameter. The operation stores
+ * length bytes from the contentStream parameter in the specified page range in the blob.
+ *
+ * @param container
+ * A {@link String} containing the name of the blob's container.
+ * @param blob
+ * A {@link String} containing the name of the blob to create or update the range content of.
+ * @param range
+ * A {@link PageRange} containing the start and end of the range to create or update in the page blob.
+ * @param length
+ * The number of bytes to read from the contentStream parameter into the specified range.
+ * @param contentStream
+ * An {@link InputStream} reference to the content to copy to the page blob.
+ * @return
+ * A {@link CreateBlobPagesResult} reference to the result of the create blob pages operation.
+ * @throws ServiceException
+ * if an error occurs accessing the storage service.
+ */
CreateBlobPagesResult createBlobPages(String container, String blob, PageRange range, long length,
InputStream contentStream) throws ServiceException;
+ /**
+ * Creates or updates a range of pages in a page blob, using the specified options.
+ *
+ * This method creates or updates the storage for the page range specified by the range parameter within
+ * the page blob specified by the blob and container parameters. The range parameter can
+ * specify up to 4MB of data, and its length must match the length parameter. The operation stores
+ * length bytes from the contentStream parameter in the specified page range in the blob. Use the
+ * {@link CreateBlobPagesOptions options} parameter to optionally specify the server timeout for the operation, the
+ * lease ID if the blob has an active lease, an MD5 hash of the content for verification, and access conditions for
+ * the create pages operation.
+ *
+ * @param container
+ * A {@link String} containing the name of the blob's container.
+ * @param blob
+ * A {@link String} containing the name of the blob to create or update the range content of.
+ * @param range
+ * A {@link PageRange} containing the start and end of the range to create or update in the page blob.
+ * @param length
+ * The number of bytes to read from the contentStream parameter into the specified range.
+ * @param contentStream
+ * An {@link InputStream} reference to the content to copy to the page blob.
+ * @param options
+ * A {@link CreateBlobPagesOptions} instance containing options for the request.
+ * @return
+ * A {@link CreateBlobPagesResult} reference to the result of the create blob pages operation.
+ * @throws ServiceException
+ * if an error occurs accessing the storage service.
+ */
CreateBlobPagesResult createBlobPages(String container, String blob, PageRange range, long length,
InputStream contentStream, CreateBlobPagesOptions options) throws ServiceException;
+ /**
+ * Creates a new uncommited block from a content stream.
+ *
+ * This method creates an uncommitted block for a block blob specified by the blob and container
+ * parameters. The blockId parameter is a client-specified ID for the block, which must be less than or
+ * equal to 64 bytes in size. For a given blob, the length of the value specified for the blockId parameter
+ * must be the same size for each block. The contentStream parameter specifies the content to be copied to
+ * the block. The content for the block must be less than or equal to 4 MB in size.
+ *
+ * To create or update a block blob, the blocks that have been successfully written to the server with this method
+ * must be committed using a call to {@link BlobContract#commitBlobBlocks(String, String, BlockList)} or
+ * {@link BlobContract#commitBlobBlocks(String, String, BlockList, CommitBlobBlocksOptions)}.
+ *
+ *
+ * @param container
+ * A {@link String} containing the name of the blob's container.
+ * @param blob
+ * A {@link String} containing the name of the blob to create the block for.
+ * @param blockId
+ * A {@link String} containing a client-specified ID for the block.
+ * @param contentStream
+ * An {@link InputStream} reference to the content to copy to the block.
+ * @throws ServiceException
+ * if an error occurs accessing the storage service.
+ */
void createBlobBlock(String container, String blob, String blockId, InputStream contentStream)
throws ServiceException;
+ /**
+ * Creates a new uncommitted block from a content stream, using the specified options.
+ *
+ * This method creates an uncommitted block for a block blob specified by the blob and container
+ * parameters. The blockId parameter is a client-specified ID for the block, which must be less than or
+ * equal to 64 bytes in size. For a given blob, the length of the value specified for the blockId parameter
+ * must be the same size for each block. The contentStream parameter specifies the content to be copied to
+ * the block. The content for the block must be less than or equal to 4 MB in size. Use the
+ * {@link CreateBlobBlockOptions options} parameter to optionally specify the server timeout for the operation, the
+ * lease ID if the blob has an active lease, and the MD5 hash value for the block content.
+ *
+ * To create or update a block blob, the blocks that have been successfully written to the server with this method
+ * must be committed using a call to {@link BlobContract#commitBlobBlocks(String, String, BlockList)} or
+ * {@link BlobContract#commitBlobBlocks(String, String, BlockList, CommitBlobBlocksOptions)}.
+ *
+ * @param container
+ * A {@link String} containing the name of the blob's container.
+ * @param blob
+ * A {@link String} containing the name of the blob to create the block for.
+ * @param blockId
+ * A {@link String} containing a client-specified ID for the block.
+ * @param contentStream
+ * An {@link InputStream} reference to the content to copy to the block.
+ * @param options
+ * A {@link CreateBlobBlockOptions} instance containing options for the request.
+ * @throws ServiceException
+ * if an error occurs accessing the storage service.
+ */
void createBlobBlock(String container, String blob, String blockId, InputStream contentStream,
CreateBlobBlockOptions options) throws ServiceException;
+ /**
+ * Commits a list of blocks to a block blob.
+ *
+ * This method creates or updates the block blob specified by the blob and container parameters.
+ * You can call this method to update a blob by uploading only those blocks that have changed, then committing the
+ * new and existing blocks together. You can do this with the blockList parameter by specifying whether to
+ * commit a block from the committed block list or from the uncommitted block list, or to commit the most recently
+ * uploaded version of the block, whichever list it may belong to.
+ *
+ * In order to be written as part of a blob, each block in the list must have been successfully written to the
+ * server with a call to {@link BlobContract#createBlobBlock(String, String, String, InputStream)} or
+ * {@link BlobContract#createBlobBlock(String, String, String, InputStream, CreateBlobBlockOptions)}.
+ *
+ * @param container
+ * A {@link String} containing the name of the blob's container.
+ * @param blob
+ * A {@link String} containing the name of the block blob to create or update.
+ * @param blockList
+ * A {@link BlockList} containing the list of blocks to commit to the block blob.
+ * @throws ServiceException
+ * if an error occurs accessing the storage service.
+ */
void commitBlobBlocks(String container, String blob, BlockList blockList) throws ServiceException;
+ /**
+ * Commits a block list to a block blob, using the specified options.
+ *
+ * This method creates or updates the block blob specified by the blob and container parameters.
+ * You can call this method to update a blob by uploading only those blocks that have changed, then committing the
+ * new and existing blocks together. You can do this with the blockList parameter by specifying whether to
+ * commit a block from the committed block list or from the uncommitted block list, or to commit the most recently
+ * uploaded version of the block, whichever list it may belong to. Use the
+ * {@link BlobContract#CommitBlobBlocksOptions options} parameter to optionally specify the server timeout for the
+ * operation, the MIME content type and content encoding for the blob, the content language, the MD5 hash, a cache
+ * control value, blob metadata, the lease ID if the blob has an active lease, and any access conditions for the
+ * operation.
+ *
+ * In order to be written as part of a blob, each block in the list must have been successfully written to the
+ * server with a call to {@link BlobContract#createBlobBlock(String, String, String, InputStream)} or
+ * {@link BlobContract#createBlobBlock(String, String, String, InputStream, CreateBlobBlockOptions)}.
+ *
+ * @param container
+ * A {@link String} containing the name of the blob's container.
+ * @param blob
+ * A {@link String} containing the name of the block blob to create or update.
+ * @param blockList
+ * A {@link BlockList} containing the list of blocks to commit to the block blob.
+ * @param options
+ * A {@link CommitBlobBlocksOptions} instance containing options for the request.
+ * @throws ServiceException
+ * if an error occurs accessing the storage service.
+ */
void commitBlobBlocks(String container, String blob, BlockList blockList, CommitBlobBlocksOptions options)
throws ServiceException;
+ /**
+ * Lists the blocks of a blob.
+ *
+ * This method lists the committed blocks of the block blob specified by the blob and container
+ * parameters.
+ *
+ * @param container
+ * A {@link String} containing the name of the blob's container.
+ * @param blob
+ * A {@link String} containing the name of the block blob to list.
+ * @return
+ * A {@link ListBlobBlocksResult} instance containing the list of blocks returned for the request.
+ * @throws ServiceException
+ * if an error occurs accessing the storage service.
+ */
ListBlobBlocksResult listBlobBlocks(String container, String blob) throws ServiceException;
+ /**
+ * Lists the blocks of a blob, using the specified options.
+ *
+ * This method lists the committed blocks, uncommitted blocks, or both, of the block blob specified by the
+ * blob and container parameters. Use the {@link ListBlobBlocksOptions options} parameter to
+ * specify an optional server timeout for the operation, the lease ID if the blob has an active lease, the snapshot
+ * timestamp to get the committed blocks of a snapshot, whether to return the committed block list, and whether to
+ * return the uncommitted block list. By default, only the committed blocks of the blob are returned.
+ *
+ * @param container
+ * A {@link String} containing the name of the blob's container.
+ * @param blob
+ * A {@link String} containing the name of the block blob to list.
+ * @param options
+ * A {@link ListBlobBlocksOptions} instance containing options for the request.
+ * @return
+ * A {@link ListBlobBlocksResult} instance containing the list of blocks returned for the request.
+ * @throws ServiceException
+ * if an error occurs accessing the storage service.
+ */
ListBlobBlocksResult listBlobBlocks(String container, String blob, ListBlobBlocksOptions options)
throws ServiceException;
+ /**
+ * Gets the properties of a blob.
+ *
+ * This method lists the properties of the blob specified by the blob and container parameters.
+ *
+ * @param container
+ * A {@link String} containing the name of the blob's container.
+ * @param blob
+ * A {@link String} containing the name of the blob to get properties for.
+ * @return
+ * A {@link GetBlobPropertiesResult} instance containing the blob properties returned for the request.
+ * @throws ServiceException
+ * if an error occurs accessing the storage service.
+ */
GetBlobPropertiesResult getBlobProperties(String container, String blob) throws ServiceException;
+ /**
+ * Gets the properties of a blob, using the specified options.
+ *
+ * This method lists the properties of the blob specified by the blob and container parameters.
+ * Use the {@link GetBlobPropertiesOptions options} parameter to set an optional server timeout for the operation,
+ * the lease ID if the blob has an active lease, the snapshot timestamp to get the properties of a snapshot, and any
+ * access conditions for the request.
+ *
+ * @param container
+ * A {@link String} containing the name of the blob's container.
+ * @param blob
+ * A {@link String} containing the name of the blob to get properties for.
+ * @param options
+ * A {@link GetBlobPropertiesOptions} instance containing options for the request.
+ * @return
+ * A {@link GetBlobPropertiesResult} instance containing the blob properties returned for the request.
+ * @throws ServiceException
+ * if an error occurs accessing the storage service.
+ */
GetBlobPropertiesResult getBlobProperties(String container, String blob, GetBlobPropertiesOptions options)
throws ServiceException;
+ /**
+ * Gets the metadata of a blob.
+ *
+ * This method lists the user-specified metadata of the blob specified by the blob and container
+ * parameters.
+ *
+ * @param container
+ * A {@link String} containing the name of the blob's container.
+ * @param blob
+ * A {@link String} containing the name of the blob to get metadata for.
+ * @return
+ * A {@link GetBlobMetadataResult} instance containing the blob metadata returned for the request.
+ * @throws ServiceException
+ * if an error occurs accessing the storage service.
+ */
GetBlobMetadataResult getBlobMetadata(String container, String blob) throws ServiceException;
+ /**
+ * Gets the metadata of a blob, using the specified options.
+ *
+ * This method lists the user-specified metadata of the blob specified by the blob and container
+ * parameters. Use the {@link GetBlobMetadataOptions options} parameter to set an optional server timeout for the
+ * operation, the lease ID if the blob has an active lease, the snapshot timestamp to get the properties of a
+ * snapshot, and any access conditions for the request.
+ *
+ * @param container
+ * A {@link String} containing the name of the blob's container.
+ * @param blob
+ * A {@link String} containing the name of the blob to get metadata for.
+ * @param options
+ * A {@link GetBlobMetadataOptions} instance containing options for the request.
+ * @return
+ * A {@link GetBlobMetadataResult} instance containing the blob metadata returned for the request.
+ * @throws ServiceException
+ * if an error occurs accessing the storage service.
+ */
GetBlobMetadataResult getBlobMetadata(String container, String blob, GetBlobMetadataOptions options)
throws ServiceException;
+ /**
+ * Gets the list of valid page ranges for a page blob.
+ *
+ * This method lists the valid page ranges of the page blob specified by the blob and container
+ * parameters.
+ *
+ * @param container
+ * A {@link String} containing the name of the blob's container.
+ * @param blob
+ * A {@link String} containing the name of the blob to get page ranges for.
+ * @return
+ * A {@link ListBlobRegionsResult} instance containing the valid page ranges of the blob.
+ * @throws ServiceException
+ * if an error occurs accessing the storage service.
+ */
ListBlobRegionsResult listBlobRegions(String container, String blob) throws ServiceException;
+ /**
+ * Gets a list of valid page ranges for a page blob or snapshot of a page blob, using the specified options.
+ *
+ * This method lists the valid page ranges of the page blob specified by the blob and container
+ * parameters. Use the {@link ListBlobRegionsOptions options} parameter to set an optional server timeout for the
+ * operation, the lease ID if the blob has an active lease, the snapshot timestamp to get the valid page ranges of a
+ * snapshot, the start offset and/or end offset to use to narrow the returned valid page range results, and any
+ * access conditions for the request.
+ *
+ * @param container
+ * A {@link String} containing the name of the blob's container.
+ * @param blob
+ * A {@link String} containing the name of the blob to get page ranges for.
+ * @param options
+ * A {@link ListBlobRegionsOptions} instance containing options for the request.
+ * @return
+ * A {@link ListBlobRegionsResult} instance containing the valid page ranges of the blob.
+ * @throws ServiceException
+ * if an error occurs accessing the storage service.
+ */
ListBlobRegionsResult listBlobRegions(String container, String blob, ListBlobRegionsOptions options)
throws ServiceException;
+ /**
+ * Sets the specified properties on a blob.
+ *
+ * This method sets properties on the blob specified by the blob and container parameters. Use the
+ * {@link SetBlobPropertiesOptions options} parameter to set an optional server timeout for the operation, the MIME
+ * content type and content encoding for the blob, the content length, the content language, the MD5 hash, a cache
+ * control value, a blob lease ID, a sequence number and sequence number action value, and any access conditions for
+ * the operation.
+ *
+ * A page blob's sequence number is updated only if the request meets either of the following conditions:
+ *
+ * A page blob's size is modified only if the request specifies a value for the content length.
+ *
+ * If a request sets only a sequence number and/or content length, and no other properties, then none of the blob's
+ * other properties are modified.
+ *
+ * If any one or more of the following properties is set in the request, then all of these properties are set
+ * together. If a value is not provided for a given property when at least one of the properties listed below is
+ * set, then that property will be cleared for the blob.
+ *
+ * This method sets the metadata specified in the metadata parameter on the blob specified by the
+ * blob and container parameters.
+ *
+ * Blob metadata is a collection of name-value {@link String} pairs for client use and is opaque to the server. This
+ * request replaces all existing metadata associated with the blob. To remove all metadata from the blob, make this
+ * request with an empty metadata list. To replace or append a single metadata name-value pair, get the existing
+ * blob metadata and replace or append the new item, then make this request with the updated metadata.
+ *
+ * Metadata names must adhere to the naming rules for C# identifiers.
+ *
+ * @param container
+ * A {@link String} containing the name of the blob's container.
+ * @param blob
+ * A {@link String} containing the name of the blob to set metadata on.
+ * @param metadata
+ * A {@link HashMap} of key-value pairs of {@link String} containing the blob metadata to set.
+ * @return
+ * A {@link SetBlobMetadataResult} instance containing the server response to the request.
+ * @throws ServiceException
+ * if an error occurs accessing the storage service.
+ */
SetBlobMetadataResult setBlobMetadata(String container, String blob, HashMap
+ * This method sets the metadata specified in the metadata parameter on the blob specified by the
+ * blob and container parameters. Use the {@link SetBlobMetadataOptions options} parameter to set
+ * an optional server timeout for the operation, a blob lease ID, and any access conditions for the operation.
+ *
+ * Blob metadata is a collection of name-value {@link String} pairs for client use and is opaque to the server. This
+ * request replaces all existing metadata associated with the blob. To remove all metadata from the blob, make this
+ * request with an empty metadata list. To replace or append a single metadata name-value pair, get the existing
+ * blob metadata and replace or append the new item, then make this request with the updated metadata.
+ *
+ * Metadata names must adhere to the naming rules for C# identifiers.
+ *
+ * @param container
+ * A {@link String} containing the name of the blob's container.
+ * @param blob
+ * A {@link String} containing the name of the blob to set metadata on.
+ * @param metadata
+ * A {@link HashMap} of key-value pairs of {@link String} containing the blob metadata to set.
+ * @param options
+ * A {@link SetBlobMetadataOptions} instance containing options for the request.
+ * @return
+ * A {@link SetBlobMetadataResult} instance containing the server response to the request.
+ * @throws ServiceException
+ * if an error occurs accessing the storage service.
+ */
SetBlobMetadataResult setBlobMetadata(String container, String blob, HashMap
+ * This method gets the properties, metadata, and content of the blob specified by the blob and
+ * container parameters.
+ *
+ * @param container
+ * A {@link String} containing the name of the blob's container.
+ * @param blob
+ * A {@link String} containing the name of the blob to get.
+ * @return
+ * A {@link GetBlobResult} instance containing the properties, metadata, and content of the blob from the
+ * server response to the request.
+ * @throws ServiceException
+ * if an error occurs accessing the storage service.
+ */
GetBlobResult getBlob(String container, String blob) throws ServiceException;
+ /**
+ * Gets the properties, metadata, and content of a blob or blob snapshot, using the specified options.
+ *
+ * This method gets the properties, metadata, and content of the blob specified by the blob and
+ * container parameters. Use the {@link GetBlobOptions options} parameter to set an optional server timeout
+ * for the operation, a snapshot timestamp to specify a snapshot, a blob lease ID to get a blob with an active
+ * lease, an optional start and end range for blob content to return, and any access conditions to satisfy.
+ *
+ * @param container
+ * A {@link String} containing the name of the blob's container.
+ * @param blob
+ * A {@link String} containing the name of the blob to get.
+ * @param options
+ * A {@link GetBlobOptions} instance containing options for the request.
+ * @return
+ * A {@link GetBlobResult} instance containing the properties, metadata, and content of the blob from the
+ * server response to the request.
+ * @throws ServiceException
+ * if an error occurs accessing the storage service.
+ */
GetBlobResult getBlob(String container, String blob, GetBlobOptions options) throws ServiceException;
+ /**
+ * Marks a blob for deletion.
+ *
+ * This method marks the properties, metadata, and content of the blob specified by the blob and
+ * container parameters for deletion.
+ *
+ * When a blob is successfully deleted, it is immediately removed from the storage account's index and is no longer
+ * accessible to clients. The blob's data is later removed from the service during garbage collection.
+ *
+ * Note that in order to delete a blob, you must delete all of its snapshots. You can delete an individual snapshot,
+ * only the snapshots, or both the blob and its snapshots with the
+ * {@link #deleteBlob(String, String, DeleteBlobOptions)} method.
+ *
+ * @param container
+ * A {@link String} containing the name of the blob's container.
+ * @param blob
+ * A {@link String} containing the name of the blob to delete.
+ * @throws ServiceException
+ * if an error occurs accessing the storage service.
+ */
void deleteBlob(String container, String blob) throws ServiceException;
+ /**
+ * Marks a blob or snapshot for deletion, using the specified options.
+ *
+ * This method marks the properties, metadata, and content of the blob or snapshot specified by the blob
+ * and container parameters for deletion. Use the {@link DeleteBlobOptions options} parameter to set an
+ * optional server timeout for the operation, a snapshot timestamp to specify an individual snapshot to delete, a
+ * blob lease ID to delete a blob with an active lease, a flag indicating whether to delete all snapshots but not
+ * the blob, or both the blob and all snapshots, and any access conditions to satisfy.
+ *
+ * When a blob is successfully deleted, it is immediately removed from the storage account's index and is no longer
+ * accessible to clients. The blob's data is later removed from the service during garbage collection.
+ *
+ * If the blob has an active lease, the client must specify a valid lease ID in the options parameter in
+ * order to delete it.
+ *
+ * If a blob has a large number of snapshots, it's possible that the delete blob operation will time out. If this
+ * happens, the client should retry the request.
+ *
+ *
+ * @param container
+ * A {@link String} containing the name of the blob's container.
+ * @param blob
+ * A {@link String} containing the name of the blob to delete.
+ * @param options
+ * A {@link DeleteBlobOptions} instance containing options for the request.
+ * @throws ServiceException
+ * if an error occurs accessing the storage service.
+ */
void deleteBlob(String container, String blob, DeleteBlobOptions options) throws ServiceException;
+ /**
+ * Creates a read-only snapshot of a blob.
+ *
+ * This method creates a read-only snapshot of the blob specified by the blob and container
+ * parameters as of the time the server processes the request. The current properties and metadata of the blob are
+ * copied to the snapshot. The base blob's committed block list is also copied to the snapshot, if the blob is a
+ * block blob. Any uncommitted blocks are not copied. Once a snapshot has been created, it can be read, copied, or
+ * deleted, but not modified.
+ *
+ * Use the {@link #createBlobSnapshot(String, String, CreateBlobSnapshotOptions)} overload of this method to make a
+ * create blob snapshot request of a blob with an active lease, to change the metadata on the snapshot, or to set
+ * access conditions on the request.
+ *
+ * When you create a snapshot, the Blob service returns a timestamp value that uniquely identifies the snapshot
+ * relative to its base blob. You can use this value to perform further operations on the snapshot. Any method on a
+ * blob that is valid for a snapshot can be called by specifying the snapshot timestamp as an option. Note that you
+ * should treat this timestamp value as opaque.
+ *
+ * A snapshot provides a convenient way to back up blob data. You can use a snapshot to restore a blob to an earlier
+ * version by calling {@link #copyBlob(String, String, String, String, CopyBlobOptions) copyBlob} to overwrite a
+ * base blob with its snapshot. The snapshot remains, but the base blob is overwritten with a copy that can be both
+ * read and written.
+ *
+ * Note that each time you make a create blob snapshot request, a new snapshot is created, with a unique timestamp
+ * value. A blob can support any number of snapshots. Existing snapshots are never overwritten, but must be deleted
+ * explicitly with a {@link #deleteBlob(String, String, DeleteBlobOptions) deleteBlob} request.
+ *
+ * Note that a lease associated with the base blob is not copied to the snapshot. Snapshots cannot be leased.
+ *
+ * When a base blob is copied with a {@link #copyBlob(String, String, String, String, CopyBlobOptions) copyBlob}
+ * request, any snapshots of the base blob are not copied to the destination blob. When a destination blob is
+ * overwritten with a copy, any snapshots associated with the destination blob stay intact under its name.
+ *
+ * @param container
+ * A {@link String} containing the name of the blob's container.
+ * @param blob
+ * A {@link String} containing the name of the blob to create a snapshot of.
+ * @return
+ * A {@link CreateBlobSnapshotResult} instance containing the server response to the request.
+ * @throws ServiceException
+ * if an error occurs accessing the storage service.
+ */
CreateBlobSnapshotResult createBlobSnapshot(String container, String blob) throws ServiceException;
+ /**
+ * Creates a read-only snapshot of a blob, using the specified options.
+ *
+ * This method creates a read-only snapshot of the blob specified by the blob and container
+ * parameters as of the time the server processes the request. Use the {@link CreateBlobSnapshotOptions options}
+ * parameter to set an optional server timeout for the operation, to make a create blob snapshot request of a blob
+ * with an active lease, to change the metadata on the snapshot, or to set access conditions on the request. Unless
+ * overridden in the options parameter, the current properties and metadata of the blob are copied to the
+ * snapshot. The base blob's committed block list is also copied to the snapshot, if the blob is a block blob. Any
+ * uncommitted blocks are not copied. Once a snapshot has been created, it can be read, copied, or deleted, but not
+ * modified.
+ *
+ * When you create a snapshot, the Blob service returns a timestamp value that uniquely identifies the snapshot
+ * relative to its base blob. You can use this value to perform further operations on the snapshot. Any method on a
+ * blob that is valid for a snapshot can be called by specifying the snapshot timestamp as an option. Note that you
+ * should treat this timestamp value as opaque.
+ *
+ * A snapshot provides a convenient way to back up blob data. You can use a snapshot to restore a blob to an earlier
+ * version by calling {@link #copyBlob(String, String, String, String, CopyBlobOptions) copyBlob} to overwrite a
+ * base blob with its snapshot. The snapshot remains, but the base blob is overwritten with a copy that can be both
+ * read and written.
+ *
+ * Note that each time you make a create blob snapshot request, a new snapshot is created, with a unique timestamp
+ * value. A blob can support any number of snapshots. Existing snapshots are never overwritten, but must be deleted
+ * explicitly with a {@link #deleteBlob(String, String, DeleteBlobOptions) deleteBlob} request.
+ *
+ * Note that a lease associated with the base blob is not copied to the snapshot. Snapshots cannot be leased.
+ *
+ * When a base blob is copied with a {@link #copyBlob(String, String, String, String, CopyBlobOptions) copyBlob}
+ * request, any snapshots of the base blob are not copied to the destination blob. When a destination blob is
+ * overwritten with a copy, any snapshots associated with the destination blob stay intact under its name.
+ *
+ * @param container
+ * A {@link String} containing the name of the blob's container.
+ * @param blob
+ * A {@link String} containing the name of the blob to create a snapshot of.
+ * @param options
+ * A {@link CreateBlobSnapshotOptions} instance containing options for the request.
+ * @return
+ * A {@link CreateBlobSnapshotResult} instance containing the server response to the request.
+ * @throws ServiceException
+ * if an error occurs accessing the storage service.
+ */
CreateBlobSnapshotResult createBlobSnapshot(String container, String blob, CreateBlobSnapshotOptions options)
throws ServiceException;
+ /**
+ * Copies a source blob to a destination within the storage account.
+ *
+ * This method creates a copy of the properties, metadata, and content of the blob specified by the
+ * sourceBlob and sourceContainer in the destination specified by the destinationBlob and
+ * destinationContainer parameters. The sourceContainer and destinationContainer
+ * parameters may be empty to specify the root container. The destination may be a new or existing blob.
+ *
+ * Use the {@link #copyBlob(String, String, String, String, CopyBlobOptions)} overload of this method to copy a
+ * snapshot, modify the metadata of the destination, copy from or to a blob with an active lease, or to set access
+ * conditions on either the source or the destination blob.
+ *
+ * The source blob for a copy operation may be a block blob or a page blob, or a snapshot of either. If the
+ * destination blob already exists, it must be of the same blob type as the source blob.
+ *
+ * Copying a source blob always copies the entire blob; copying a range of bytes or a set of blocks is not
+ * supported.
+ *
+ * A copy blob request can take any of the following forms:
+ *
+ * The source blob's committed block list is also copied to the destination blob, if the blob is a block blob. Any
+ * uncommitted blocks are not copied.
+ *
+ * The destination blob is always the same size as the source blob, so the value of the Content-Length header for
+ * the destination blob will be the same as that for the source blob.
+ *
+ * When the source blob and destination blob are the same, Copy Blob removes any uncommitted blocks.
+ *
+ * When a source blob is copied, any snapshots of the source blob are not copied to the destination. When a
+ * destination blob is overwritten with a copy, any snapshots associated with the destination blob stay intact under
+ * its name.
+ *
+ * @param destinationContainer
+ * A {@link String} containing the name of the destination blob's container.
+ * @param destinationBlob
+ * A {@link String} containing the name of the destination blob.
+ * @param sourceContainer
+ * A {@link String} containing the name of the source blob's container.
+ * @param sourceBlob
+ * A {@link String} containing the name of the source blob.
+ * @throws ServiceException
+ * if an error occurs accessing the storage service.
+ */
void copyBlob(String destinationContainer, String destinationBlob, String sourceContainer, String sourceBlob)
throws ServiceException;
+ /**
+ * Copies a source blob to a destination within the storage account, using the specified options.
+ *
+ * This method creates a copy of the properties, metadata, and content of the blob specified by the
+ * sourceBlob and sourceContainer in the destination specified by the destinationBlob and
+ * destinationContainer parameters. The sourceContainer and destinationContainer
+ * parameters may be empty to specify the root container. The destination may be a new or existing blob. Use the
+ * {@link CopyBlobOptions options} parameter to set an optional server timeout for the operation, an optional source
+ * snapshot timestamp value to copy from a particular snapshot of the source blob, new blob metadata to set on the
+ * destination blob, a blob lease ID to overwrite a blob with an active lease, a source lease ID to copy from a
+ * source blob with an active lease, any access conditions to satisfy on the destination, and any access conditions
+ * to satisfy on the source.
+ *
+ * The source blob for a copy operation may be a block blob or a page blob, or a snapshot of either. If the
+ * destination blob already exists, it must be of the same blob type as the source blob.
+ *
+ * Copying a source blob always copies the entire blob; copying a range of bytes or a set of blocks is not
+ * supported.
+ *
+ * A copy blob request can take any of the following forms:
+ *
+ * The source blob's committed block list is also copied to the destination blob, if the blob is a block blob. Any
+ * uncommitted blocks are not copied.
+ *
+ * The destination blob is always the same size as the source blob, so the value of the Content-Length header for
+ * the destination blob will be the same as that for the source blob.
+ *
+ * You can specify one or more new metadata values for the destination blob by specifying the metadata in the
+ * options parameter. If this option is not specified, the metadata associated with the source blob is
+ * copied to the destination blob.
+ *
+ * When the source blob and destination blob are the same, Copy Blob removes any uncommitted blocks. If metadata is
+ * specified in this case, the existing metadata is overwritten with the new metadata.
+ *
+ * You can specify access conditions on the request to copy the blob only if a condition is met. If the specified
+ * conditions are not met, the blob is not copied, and the Blob service returns status code 412 (Precondition
+ * Failed), which causes a {@link ServiceException} to be thrown.
+ *
+ * If the destination blob has an active lease, you must specify a valid lease ID for the active lease in order to
+ * copy the blob.
+ *
+ * If the source blob has an active lease, you can optionally specify the lease ID for the source blob to copy the
+ * source blob conditionally. In this case, the source blob will be copied only if the lease ID for the source blob
+ * matches that specified on the request.
+ *
+ * Copying a blob does not affect an existing lease on the destination blob. The destination blob's lease is
+ * maintained, whether you are copying a blob to a destination blob with a different name from the source, copying
+ * the blob to a destination blob with the same name as the source, or copying a snapshot over its base blob.
+ *
+ * When a source blob is copied, any snapshots of the source blob are not copied to the destination. When a
+ * destination blob is overwritten with a copy, any snapshots associated with the destination blob stay intact under
+ * its name.
+ *
+ * @param destinationContainer
+ * A {@link String} containing the name of the destination blob's container.
+ * @param destinationBlob
+ * A {@link String} containing the name of the destination blob.
+ * @param sourceContainer
+ * A {@link String} containing the name of the source blob's container.
+ * @param sourceBlob
+ * A {@link String} containing the name of the source blob.
+ * @param options
+ * A {@link CopyBlobOptions} instance containing options for the request.
+ * @throws ServiceException
+ * if an error occurs accessing the storage service.
+ */
void copyBlob(String destinationContainer, String destinationBlob, String sourceContainer, String sourceBlob,
CopyBlobOptions options) throws ServiceException;
+ /**
+ * Gets a new lease on a blob.
+ *
+ * This method requests a lease on the blob specified by the blob and container parameters. If the
+ * blob does not have an active lease, the Blob service creates a new one-minute lock for write operations on the
+ * blob and returns a new lease ID. Any operation that writes to the blob's properties, metadata, or content for the
+ * duration of the lease must include this lease ID to succeed. You may request a new lease only for a blob without
+ * an unexpired lease.
+ *
+ * @param container
+ * A {@link String} containing the name of the blob's container.
+ * @param blob
+ * A {@link String} containing the name of the blob to acquire a lease on.
+ * @return
+ * An {@link AcquireLeaseResult} instance containing the server response to the request.
+ * @throws ServiceException
+ * if an error occurs accessing the storage service.
+ */
AcquireLeaseResult acquireLease(String container, String blob) throws ServiceException;
+ /**
+ * Gets a new lease on a blob, using the specified options.
+ *
+ * This method requests a lease on the blob specified by the blob and container parameters. Use
+ * the {@link AcquireLeaseOptions options} parameter to set an optional server timeout for the operation and any
+ * access conditions for the operation. If the blob does not have an active lease, the Blob service creates a new
+ * one-minute lock for write operations on the blob and returns a new lease ID. Any operation that writes to the
+ * blob's properties, metadata, or content for the duration of the lease must include this lease ID to succeed. You
+ * may request a new lease only for a blob without an unexpired lease.
+ *
+ * @param container
+ * A {@link String} containing the name of the blob's container.
+ * @param blob
+ * A {@link String} containing the name of the blob to acquire a lease on.
+ * @param options
+ * An {@link AcquireLeaseOptions} instance containing options for the request.
+ * @return
+ * An {@link AcquireLeaseResult} instance containing the server response to the request.
+ * @throws ServiceException
+ * if an error occurs accessing the storage service.
+ */
AcquireLeaseResult acquireLease(String container, String blob, AcquireLeaseOptions options) throws ServiceException;
+ /**
+ * Renews a lease on a blob.
+ *
+ * This method renews the lease on the blob specified by the blob and container parameters with
+ * its most recent lease ID specified by the leaseId parameter. Note that the lease may be renewed even if
+ * it has expired or been released as long as the blob has not been modified since the expiration or release of that
+ * lease.
+ *
+ * @param container
+ * A {@link String} containing the name of the blob's container.
+ * @param blob
+ * A {@link String} containing the name of the blob to renew a lease on.
+ * @param leaseId
+ * A {@link String} containing the lease ID.
+ * @return
+ * An {@link AcquireLeaseResult} instance containing the server response to the request.
+ * @throws ServiceException
+ * if an error occurs accessing the storage service.
+ */
AcquireLeaseResult renewLease(String container, String blob, String leaseId) throws ServiceException;
+ /**
+ * Renews a lease on a blob, using the specified options.
+ *
+ * This method renews the lease on the blob specified by the blob and container parameters with
+ * its most recent lease ID specified by the leaseId parameter. Use the {@link BlobServiceOptions options}
+ * parameter to specify an optional server timeout for the operation. Note that the lease may be renewed even if it
+ * has expired or been released as long as the blob has not been modified since the expiration or release of that
+ * lease.
+ *
+ * @param container
+ * A {@link String} containing the name of the blob's container.
+ * @param blob
+ * A {@link String} containing the name of the blob to renew a lease on.
+ * @param leaseId
+ * A {@link String} containing the lease ID.
+ * @param options
+ * A {@link BlobServiceOptions} instance containing options for the request.
+ * @return
+ * An {@link AcquireLeaseResult} instance containing the server response to the request.
+ * @throws ServiceException
+ * if an error occurs accessing the storage service.
+ */
AcquireLeaseResult renewLease(String container, String blob, String leaseId, BlobServiceOptions options)
throws ServiceException;
+ /**
+ * Releases an active or broken lease on a blob.
+ *
+ * This method releases the lease on the blob specified by the blob and container parameters with
+ * a broken or active lease ID specified by the leaseId parameter. Releasing the lease allows another
+ * client to immediately acquire the lease for the blob as soon as the release is complete.
+ *
+ * @param container
+ * A {@link String} containing the name of the blob's container.
+ * @param blob
+ * A {@link String} containing the name of the blob to release a lease on.
+ * @param leaseId
+ * A {@link String} containing the lease ID.
+ * @throws ServiceException
+ * if an error occurs accessing the storage service.
+ */
void releaseLease(String container, String blob, String leaseId) throws ServiceException;
+ /**
+ * Releases an active or broken lease on a blob, using the specified options.
+ *
+ * This method releases the lease on the blob specified by the blob and container parameters with
+ * a broken or active lease ID specified by the leaseId parameter. Use the {@link BlobServiceOptions
+ * options} parameter to specify the server timeout for the operation. Releasing the lease allows another client to
+ * immediately acquire the lease for the blob as soon as the release is complete.
+ *
+ * @param container
+ * A {@link String} containing the name of the blob's container.
+ * @param blob
+ * A {@link String} containing the name of the blob to release a lease on.
+ * @param leaseId
+ * A {@link String} containing the lease ID.
+ * @param options
+ * A {@link BlobServiceOptions} instance containing options for the request.
+ * @throws ServiceException
+ * if an error occurs accessing the storage service.
+ */
void releaseLease(String container, String blob, String leaseId, BlobServiceOptions options)
throws ServiceException;
+ /**
+ * Breaks an active lease on a blob.
+ *
+ * This method breaks the lease on the blob specified by the blob and container parameters. The
+ * leaseId parameter is not used by the server.
+ *
+ * Once a lease is broken, it cannot be renewed. Any authorized request can break the lease; the request is not
+ * required to specify a matching lease ID. When a lease is broken, the remaining time on the lease is allowed to
+ * elapse, during which time no lease operation may be performed on the blob.
+ *
+ * A lease that has been broken but has not yet expired can also be released, in which case another client may
+ * immediately acquire a new lease on the blob.
+ *
+ * @param container
+ * A {@link String} containing the name of the blob's container.
+ * @param blob
+ * A {@link String} containing the name of the blob to break a lease on.
+ * @param leaseId
+ * A {@link String} containing an optional lease ID.
+ * @throws ServiceException
+ * if an error occurs accessing the storage service.
+ */
void breakLease(String container, String blob, String leaseId) throws ServiceException;
+ /**
+ * Breaks an active lease on a blob, using the specified options.
+ *
+ * This method breaks the lease on the blob specified by the blob and container parameters. The
+ * leaseId parameter is not used by the server. Use the {@link BlobServiceOptions options} parameter to
+ * specify the server timeout for the operation.
+ *
+ * Once a lease is broken, it cannot be renewed. Any authorized request can break the lease; the request is not
+ * required to specify a matching lease ID. When a lease is broken, the remaining time on the lease is allowed to
+ * elapse, during which time no lease operation may be performed on the blob.
+ *
+ * A lease that has been broken but has not yet expired can also be released, in which case another client may
+ * immediately acquire a new lease on the blob.
+ *
+ * @param container
+ * A {@link String} containing the name of the blob's container.
+ * @param blob
+ * A {@link String} containing the name of the blob to break a lease on.
+ * @param leaseId
+ * A {@link String} containing an optional lease ID.
+ * @param options
+ * A {@link BlobServiceOptions} instance containing options for the request.
+ * @throws ServiceException
+ * if an error occurs accessing the storage service.
+ */
void breakLease(String container, String blob, String leaseId, BlobServiceOptions options) throws ServiceException;
}
diff --git a/microsoft-azure-api/src/main/java/com/microsoft/windowsazure/services/blob/BlobService.java b/microsoft-azure-api/src/main/java/com/microsoft/windowsazure/services/blob/BlobService.java
index 6a35854124a0e..0e48a3033dfb5 100644
--- a/microsoft-azure-api/src/main/java/com/microsoft/windowsazure/services/blob/BlobService.java
+++ b/microsoft-azure-api/src/main/java/com/microsoft/windowsazure/services/blob/BlobService.java
@@ -2,36 +2,83 @@
* Copyright 2011 Microsoft Corporation
*
* Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
*/
package com.microsoft.windowsazure.services.blob;
import com.microsoft.windowsazure.services.core.Configuration;
+/**
+ * A class for static factory methods that return instances implementing {@link BlobContract}.
+ */
public class BlobService {
private BlobService() {
}
+ /**
+ * A static factory method that returns an instance implementing {@link BlobContract} using default values for
+ * initializing a {@link Configuration} instance. Note that the returned interface will not work unless storage
+ * account credentials have been added to the "META-INF/com.microsoft.windowsazure.properties" resource file.
+ *
+ * @return
+ * An instance implementing {@link BlobContract} for interacting with the blob service.
+ */
public static BlobContract create() {
return create(null, Configuration.getInstance());
}
+ /**
+ * A static factory method that returns an instance implementing {@link BlobContract} using the specified
+ * {@link Configuration} instance. The {@link Configuration} instance must have storage account information and
+ * credentials set before this method is called for the returned interface to work.
+ *
+ * @param config
+ * A {@link Configuration} instance configured with storage account information and credentials.
+ *
+ * @return
+ * An instance implementing {@link BlobContract} for interacting with the blob service.
+ */
public static BlobContract create(Configuration config) {
return create(null, config);
}
+ /**
+ * A static factory method that returns an instance implementing {@link BlobContract} using default values for
+ * initializing a {@link Configuration} instance, and using the specified profile prefix for service settings. Note
+ * that the returned interface will not work unless storage account settings and credentials have been added to the
+ * "META-INF/com.microsoft.windowsazure.properties" resource file with the specified profile prefix.
+ *
+ * @param profile
+ * A string prefix for the account name and credentials settings in the {@link Configuration} instance.
+ * @return
+ * An instance implementing {@link BlobContract} for interacting with the blob service.
+ */
public static BlobContract create(String profile) {
return create(profile, Configuration.getInstance());
}
+ /**
+ * A static factory method that returns an instance implementing {@link BlobContract} using the specified
+ * {@link Configuration} instance and profile prefix for service settings. The {@link Configuration} instance must
+ * have storage account information and credentials set with the specified profile prefix before this method is
+ * called for the returned interface to work.
+ *
+ * @param profile
+ * A string prefix for the account name and credentials settings in the {@link Configuration} instance.
+ * @param config
+ * A {@link Configuration} instance configured with storage account information and credentials.
+ *
+ * @return
+ * An instance implementing {@link BlobContract} for interacting with the blob service.
+ */
public static BlobContract create(String profile, Configuration config) {
return config.create(profile, BlobContract.class);
}
diff --git a/microsoft-azure-api/src/main/java/com/microsoft/windowsazure/services/blob/models/AccessCondition.java b/microsoft-azure-api/src/main/java/com/microsoft/windowsazure/services/blob/models/AccessCondition.java
index 24018221dc132..90791bacfeb21 100644
--- a/microsoft-azure-api/src/main/java/com/microsoft/windowsazure/services/blob/models/AccessCondition.java
+++ b/microsoft-azure-api/src/main/java/com/microsoft/windowsazure/services/blob/models/AccessCondition.java
@@ -2,15 +2,15 @@
* Copyright 2011 Microsoft Corporation
*
* Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
*/
package com.microsoft.windowsazure.services.blob.models;
@@ -19,18 +19,18 @@
import com.microsoft.windowsazure.services.blob.implementation.RFC1123DateConverter;
/**
- * Represents a set of access conditions to be used for operations against the storage services.
+ * Represents a set of access conditions for operations that use storage services.
*/
public final class AccessCondition {
/**
- * Specifies that no access condition is set.
+ * Specifies an access condition with no conditions set.
*/
public static final AccessCondition NONE = new AccessCondition(AccessConditionHeaderType.NONE, null);
/**
- * Returns an access condition such that an operation will be performed only if the resource's ETag value matches
- * the specified ETag value.
+ * Creates an access condition that only allows an operation if the resource's ETag value matches the specified ETag
+ * value.
*
* Setting this access condition modifies the request to include the HTTP If-Match conditional header. If
* this access condition is set, the operation is performed only if the ETag of the resource matches the specified
@@ -49,8 +49,8 @@ public static AccessCondition ifMatch(String etag) {
}
/**
- * Returns an access condition such that an operation will be performed only if the resource has been modified since
- * the specified time.
+ * Creates an access condition that only allows an operation if the resource has been modified since the specified
+ * time.
*
* Setting this access condition modifies the request to include the HTTP If-Modified-Since conditional
* header. If this access condition is set, the operation is performed only if the resource has been modified since
@@ -70,8 +70,8 @@ public static AccessCondition ifModifiedSince(Date lastMotified) {
}
/**
- * Returns an access condition such that an operation will be performed only if the resource's ETag value does not
- * match the specified ETag value.
+ * Creates an access condition that only allows an operation if the resource's ETag value does not match the
+ * specified ETag value.
*
* Setting this access condition modifies the request to include the HTTP If-None-Match conditional header.
* If this access condition is set, the operation is performed only if the ETag of the resource does not match the
@@ -90,8 +90,8 @@ public static AccessCondition ifNoneMatch(String etag) {
}
/**
- * Returns an access condition such that an operation will be performed only if the resource has not been modified
- * since the specified time.
+ * Creates an access condition that only allows an operation if the resource has not been modified since the
+ * specified time.
*
* Setting this access condition modifies the request to include the HTTP If-Unmodified-Since conditional
* header. If this access condition is set, the operation is performed only if the resource has not been modified
@@ -111,12 +111,12 @@ public static AccessCondition ifNotModifiedSince(Date lastMotified) {
}
/**
- * Represents the header type.
+ * Represents the access condition header type.
*/
private AccessConditionHeaderType header = AccessConditionHeaderType.NONE;
/**
- * Represents the header value.
+ * Represents the access condition header value.
*/
private String value;
@@ -140,18 +140,43 @@ protected AccessCondition(AccessConditionHeaderType headerType, String value) {
this.setValue(value);
}
+ /**
+ * Gets the access condition header type set in this
+ * The timeout value only affects calls made on methods where this {@link AcquireLeaseOptions} instance is
+ * passed as a parameter.
+ *
+ * @param timeout
+ * The server request timeout value to set in milliseconds.
+ * @return
+ * A reference to this {@link AcquireLeaseOptions} instance.
+ */
@Override
public AcquireLeaseOptions setTimeout(Integer timeout) {
super.setTimeout(timeout);
return this;
}
+ /**
+ * Gets the access conditions set in this {@link AcquireLeaseOptions} instance.
+ *
+ * @return
+ * An {@link AccessCondition} containing the access conditions set, if any.
+ */
public AccessCondition getAccessCondition() {
return accessCondition;
}
+ /**
+ * Sets the access conditions for acquiring a lease on a blob. By default, the operation will acquire the lease
+ * unconditionally. Use this method to specify conditions on the ETag or last modified time value for performing the
+ * operation.
+ *
+ * The accessCondition value only affects calls made on methods where this {@link AcquireLeaseOptions}
+ * instance is passed as a parameter.
+ *
+ * @param accessCondition
+ * An {@link AccessCondition} containing the access conditions to set.
+ * @return
+ * A reference to this {@link AcquireLeaseOptions} instance.
+ */
public AcquireLeaseOptions setAccessCondition(AccessCondition accessCondition) {
this.accessCondition = accessCondition;
return this;
diff --git a/microsoft-azure-api/src/main/java/com/microsoft/windowsazure/services/blob/models/AcquireLeaseResult.java b/microsoft-azure-api/src/main/java/com/microsoft/windowsazure/services/blob/models/AcquireLeaseResult.java
index 1565c42585004..785d10473f081 100644
--- a/microsoft-azure-api/src/main/java/com/microsoft/windowsazure/services/blob/models/AcquireLeaseResult.java
+++ b/microsoft-azure-api/src/main/java/com/microsoft/windowsazure/services/blob/models/AcquireLeaseResult.java
@@ -2,25 +2,55 @@
* Copyright 2011 Microsoft Corporation
*
* Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
*/
package com.microsoft.windowsazure.services.blob.models;
+import com.microsoft.windowsazure.services.blob.BlobContract;
+
+/**
+ * A wrapper class for the response returned from a Blob Service REST API Lease Blob operation. This is returned by
+ * calls to implementations of {@link BlobContract#breakLease(String, String, String, BlobServiceOptions)},
+ * {@link BlobContract#releaseLease(String, String, String, BlobServiceOptions)} and
+ * {@link BlobContract#renewLease(String, String, String, BlobServiceOptions)}.
+ *
+ * See the Lease Blob documentation on
+ * MSDN for details of the underlying Blob Service REST API operation.
+ */
public class AcquireLeaseResult {
private String leaseId;
+ /**
+ * Gets the lease ID of the blob.
+ *
+ * This value is used when updating or deleting a blob with an active lease, and when renewing or releasing the
+ * lease.
+ *
+ * @return
+ * A {@link String} containing the server-assigned lease ID for the blob.
+ */
public String getLeaseId() {
return leaseId;
}
+ /**
+ * Reserved for internal use. Sets the lease ID of the blob from the x-ms-lease-id header of the
+ * response.
+ *
+ * This method is invoked by the API to set the value from the Blob Service REST API operation response returned by
+ * the server.
+ *
+ * @param leaseId
+ * A {@link String} containing the server-assigned lease ID for the blob.
+ */
public void setLeaseId(String leaseId) {
this.leaseId = leaseId;
}
diff --git a/microsoft-azure-api/src/main/java/com/microsoft/windowsazure/services/blob/models/BlobProperties.java b/microsoft-azure-api/src/main/java/com/microsoft/windowsazure/services/blob/models/BlobProperties.java
index 73d968d1153f6..f5231d28254a2 100644
--- a/microsoft-azure-api/src/main/java/com/microsoft/windowsazure/services/blob/models/BlobProperties.java
+++ b/microsoft-azure-api/src/main/java/com/microsoft/windowsazure/services/blob/models/BlobProperties.java
@@ -2,15 +2,15 @@
* Copyright 2011 Microsoft Corporation
*
* Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
*/
package com.microsoft.windowsazure.services.blob.models;
@@ -21,6 +21,9 @@
import com.microsoft.windowsazure.services.blob.implementation.RFC1123DateAdapter;
+/**
+ * Represents the HTML properties and system properties that may be set on a blob.
+ */
public class BlobProperties {
private Date lastModified;
private String etag;
@@ -34,102 +37,263 @@ public class BlobProperties {
private String leaseStatus;
private long sequenceNumber;
+ /**
+ * Gets the last modified time of the blob. For block blobs, this value is returned only if the blob has committed
+ * blocks.
+ *
+ * Any operation that modifies the blob, including updates to the blob's metadata or properties, changes the last
+ * modified time of the blob. This value can be used in an access condition when updating or deleting a blob to
+ * prevent the client from modifying data that has been changed by another client.
+ *
+ * @return
+ * A {@link java.util.Date} containing the last modified time of the blob.
+ */
@XmlElement(name = "Last-Modified")
@XmlJavaTypeAdapter(RFC1123DateAdapter.class)
public Date getLastModified() {
return lastModified;
}
+ /**
+ * Reserved for internal use. Sets the last modified time of the blob from the
+ * This method is invoked by the API to set the value from the Blob Service REST API operation response returned by
+ * the server.
+ *
+ * @param lastModified
+ * A {@link java.util.Date} containing the last modified time of the blob.
+ */
public void setLastModified(Date lastModified) {
this.lastModified = lastModified;
}
+ /**
+ * Gets the ETag of the blob. For block blobs, this value is returned only if the blob has committed blocks.
+ *
+ * This value can be used in an access condition when updating or deleting a blob to prevent the client from
+ * modifying data that has been changed by another client.
+ *
+ * @return
+ * A {@link String} containing the server-assigned ETag value for the blob.
+ */
@XmlElement(name = "Etag")
public String getEtag() {
return etag;
}
+ /**
+ * Reserved for internal use. Sets the ETag value of the blob from the
+ * This method is invoked by the API to set the value from the Blob Service REST API operation response returned by
+ * the server.
+ *
+ * @param etag
+ * A {@link String} containing the server-assigned ETag value for the blob.
+ */
public void setEtag(String etag) {
this.etag = etag;
}
+ /**
+ * Gets the MIME content type of the blob.
+ *
+ * @return
+ * A {@link String} containing the MIME content type value for the blob.
+ */
@XmlElement(name = "Content-Type")
public String getContentType() {
return contentType;
}
+ /**
+ * Reserved for internal use. Sets the MIME content type value for the blob from the
+ * The timeout value only affects calls made on methods where this {@link BlobServiceOptions} instance is passed as
+ * a parameter.
+ *
+ * @return
+ * The server request timeout value in milliseconds.
+ */
public Integer getTimeout() {
return timeout;
}
+ /**
+ * Sets the server request timeout value associated with this {@link BlobServiceOptions} instance.
+ *
+ * The timeout value only affects calls made on methods where this {@link BlobServiceOptions} instance is passed as
+ * a parameter.
+ *
+ * @param timeout
+ * The server request timeout value to set in milliseconds.
+ * @return
+ * A reference to this {@link BlobServiceOptions} instance.
+ */
public BlobServiceOptions setTimeout(Integer timeout) {
this.timeout = timeout;
return this;
diff --git a/microsoft-azure-api/src/main/java/com/microsoft/windowsazure/services/blob/models/BlockList.java b/microsoft-azure-api/src/main/java/com/microsoft/windowsazure/services/blob/models/BlockList.java
index 7fcdfe314651b..320066d06f80f 100644
--- a/microsoft-azure-api/src/main/java/com/microsoft/windowsazure/services/blob/models/BlockList.java
+++ b/microsoft-azure-api/src/main/java/com/microsoft/windowsazure/services/blob/models/BlockList.java
@@ -2,15 +2,15 @@
* Copyright 2011 Microsoft Corporation
*
* Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
*/
package com.microsoft.windowsazure.services.blob.models;
@@ -26,10 +26,21 @@
import com.microsoft.windowsazure.services.core.utils.pipeline.Base64StringAdapter;
+/**
+ * Represents a list of blocks that may be committed to a block blob.
+ */
@XmlRootElement(name = "BlockList")
public class BlockList {
private List
+ * The timeout value only affects calls made on methods where this {@link CommitBlobBlocksOptions} instance
+ * is passed as a parameter.
+ *
+ * @param timeout
+ * The server request timeout value to set in milliseconds.
+ * @return
+ * A reference to this {@link CommitBlobBlocksOptions} instance.
+ */
@Override
public CommitBlobBlocksOptions setTimeout(Integer timeout) {
super.setTimeout(timeout);
return this;
}
+ /**
+ * Gets the MIME content type value set in this {@link CommitBlobBlocksOptions} instance.
+ *
+ * @return
+ * A {@link String} containing the MIME content type value set, if any.
+ */
public String getBlobContentType() {
return blobContentType;
}
+ /**
+ * Sets the optional MIME content type for the blob content. This value will be returned to clients in the
+ *
+ * Note that this value only affects calls made on methods where this {@link CommitBlobBlocksOptions} instance is
+ * passed as a parameter.
+ *
+ * @param blobContentType
+ * A {@link String} containing the MIME content type value to set.
+ * @return
+ * A reference to this {@link CommitBlobBlocksOptions} instance.
+ */
public CommitBlobBlocksOptions setBlobContentType(String blobContentType) {
this.blobContentType = blobContentType;
return this;
}
+ /**
+ * Gets the HTTP content encoding value set in this {@link CommitBlobBlocksOptions} instance.
+ *
+ * @return
+ * A {@link String} containing the HTTP content encoding value set, if any.
+ */
public String getBlobContentEncoding() {
return blobContentEncoding;
}
+ /**
+ * Sets the optional HTTP content encoding value for the blob content. Use this value to specify any HTTP content
+ * encodings applied to the blob, passed as a
+ * Note that this value only affects calls made on methods where this {@link CommitBlobBlocksOptions} instance is
+ * passed as a parameter.
+ *
+ * @param blobContentEncoding
+ * A {@link String} containing the
+ * Note that this value only affects calls made on methods where this {@link CommitBlobBlocksOptions} instance is
+ * passed as a parameter.
+ *
+ * @param blobContentLanguage
+ * A {@link String} containing the
+ * Note that this value only affects calls made on methods where this {@link CommitBlobBlocksOptions} instance is
+ * passed as a parameter.
+ *
+ * @param blobContentMD5
+ * A {@link String} containing the MD5 hash value for the blob content to set.
+ * @return
+ * A reference to this {@link CommitBlobBlocksOptions} instance.
+ */
public CommitBlobBlocksOptions setBlobContentMD5(String blobContentMD5) {
this.blobContentMD5 = blobContentMD5;
return this;
}
+ /**
+ * Gets the HTTP cache control value set in this {@link CommitBlobBlocksOptions} instance.
+ *
+ * @return
+ * A {@link String} containing the HTTP cache control value set, if any.
+ */
public String getBlobCacheControl() {
return blobCacheControl;
}
+ /**
+ * Sets the optional HTTP cache control value for the blob content. The Blob service stores
+ * this value but does not use or modify it. This value will be returned to clients in the headers of the response
+ * when the blob data or blob properties are requested.
+ *
+ * Note that this value only affects calls made on methods where this {@link CommitBlobBlocksOptions} instance is
+ * passed as a parameter.
+ *
+ * @param blobCacheControl
+ * A {@link String} containing the HTTP cache control value to set.
+ * @return
+ * A reference to this {@link CommitBlobBlocksOptions} instance.
+ */
public CommitBlobBlocksOptions setBlobCacheControl(String blobCacheControl) {
this.blobCacheControl = blobCacheControl;
return this;
}
+ /**
+ * Gets the blob metadata collection set in this {@link CommitBlobBlocksOptions} instance.
+ *
+ * @return
+ * A {@link HashMap} of name-value pairs of {@link String} containing the blob metadata set, if any.
+ */
public HashMap
+ * The metadata value only affects calls made on methods where this {@link CommitBlobBlocksOptions}
+ * instance is passed as a parameter.
+ *
+ * @param metadata
+ * A {@link HashMap} of name-value pairs of {@link String} containing the blob metadata to set.
+ * @return
+ * A reference to this {@link CommitBlobBlocksOptions} instance.
+ */
public CommitBlobBlocksOptions setMetadata(HashMap
+ * The leaseId value only affects calls made on methods where this {@link CommitBlobBlocksOptions} instance
+ * is passed as a parameter.
+ *
+ * @param leaseId
+ * A {@link String} containing the lease ID to set.
+ * @return
+ * A reference to this {@link CommitBlobBlocksOptions} instance.
+ */
public CommitBlobBlocksOptions setLeaseId(String leaseId) {
this.leaseId = leaseId;
return this;
}
+ /**
+ * Gets the access conditions set in this {@link CommitBlobBlocksOptions} instance.
+ *
+ * @return
+ * An {@link AccessCondition} containing the access conditions set, if any.
+ */
public AccessCondition getAccessCondition() {
return accessCondition;
}
+ /**
+ * Sets the access conditions for updating a blob. By default, the commit block blobs operation will set the
+ * container metadata unconditionally. Use this method to specify conditions on the ETag or last modified time value
+ * for performing the commit block blobs operation.
+ *
+ * The accessCondition value only affects calls made on methods where this {@link CommitBlobBlocksOptions}
+ * instance is passed as a parameter.
+ *
+ * @param accessCondition
+ * An {@link AccessCondition} containing the access conditions to set.
+ * @return
+ * A reference to this {@link CommitBlobBlocksOptions} instance.
+ */
public CommitBlobBlocksOptions setAccessCondition(AccessCondition accessCondition) {
this.accessCondition = accessCondition;
return this;
diff --git a/microsoft-azure-api/src/main/java/com/microsoft/windowsazure/services/blob/models/ContainerACL.java b/microsoft-azure-api/src/main/java/com/microsoft/windowsazure/services/blob/models/ContainerACL.java
index 628d08d95cab6..d5f6005b41ea2 100644
--- a/microsoft-azure-api/src/main/java/com/microsoft/windowsazure/services/blob/models/ContainerACL.java
+++ b/microsoft-azure-api/src/main/java/com/microsoft/windowsazure/services/blob/models/ContainerACL.java
@@ -2,15 +2,15 @@
* Copyright 2011 Microsoft Corporation
*
* Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
*/
package com.microsoft.windowsazure.services.blob.models;
@@ -22,46 +22,174 @@
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
+import com.microsoft.windowsazure.services.blob.BlobContract;
import com.microsoft.windowsazure.services.blob.implementation.ContainerACLDateAdapter;
+/**
+ * Represents the public access properties and the container-level access policies of a container in the Blob storage
+ * service. This is returned by calls to implementations of {@link BlobContract#getContainerACL(String)} and
+ * {@link BlobContract#getContainerACL(String, BlobServiceOptions)}, and passed as a parameter to calls to
+ * implementations of {@link BlobContract#setContainerACL(String, ContainerACL)} and
+ * {@link BlobContract#setContainerACL(String, ContainerACL, BlobServiceOptions)}.
+ *
+ * See the Get Container ACL and the Set Container ACL documentation on MSDN
+ * for details of the underlying Blob Service REST API operations.
+ */
public class ContainerACL {
private String etag;
private Date lastModified;
private PublicAccessType publicAccess;
private List
+ * This value is only set on a container when this {@link ContainerACL} instance is passed as a parameter to a call
+ * to an implementation of {@link BlobContract#setContainerACL(String, ContainerACL)} or
+ * {@link BlobContract#setContainerACL(String, ContainerACL, BlobServiceOptions)}.
+ *
+ * @param etag
+ * A {@link String} containing the Etag value to associate with this
+ * {@link ContainerACL} instance.
+ */
public void setEtag(String etag) {
this.etag = etag;
}
+ /**
+ * Gets the last modified time associated with this {@link ContainerACL} instance. This is the value
+ * returned for a container by a Blob service REST API Get Container ACL operation, or the value to set on a
+ * container with a Set Container ACL operation.
+ *
+ * @return
+ * A {@link Date} containing the last modified time associated with this {@link ContainerACL} instance.
+ */
public Date getLastModified() {
return lastModified;
}
+ /**
+ * Sets the last modified time to associate with this {@link ContainerACL} instance.
+ *
+ * This value is only set on a container when this {@link ContainerACL} instance is passed as a parameter to a call
+ * to an implementation of {@link BlobContract#setContainerACL(String, ContainerACL)} or
+ * {@link BlobContract#setContainerACL(String, ContainerACL, BlobServiceOptions)}.
+ *
+ * @param lastModified
+ * A {@link Date} containing the last modified time to associate with this {@link ContainerACL} instance.
+ */
public void setLastModified(Date lastModified) {
this.lastModified = lastModified;
}
+ /**
+ * Gets the public access level associated with this {@link ContainerACL} instance. This is the value
+ * returned for a container by a Blob service REST API Get Container ACL operation, or the value to set on a
+ * container with a Set Container ACL operation.
+ *
+ * @return
+ * A {@link PublicAccessType} value representing the public access level associated with this
+ * {@link ContainerACL} instance.
+ */
public PublicAccessType getPublicAccess() {
return publicAccess;
}
+ /**
+ * Sets the public access level to associate with this {@link ContainerACL} instance.
+ *
+ * This value is only set on a container when this {@link ContainerACL} instance is passed as a parameter to a call
+ * to an implementation of {@link BlobContract#setContainerACL(String, ContainerACL)} or
+ * {@link BlobContract#setContainerACL(String, ContainerACL, BlobServiceOptions)}.
+ *
+ * @param publicAccess
+ * A {@link PublicAccessType} value representing the public access level to associate with this
+ * {@link ContainerACL} instance.
+ */
public void setPublicAccess(PublicAccessType publicAccess) {
this.publicAccess = publicAccess;
}
+ /**
+ * Gets the list of container-level access policies associated with this {@link ContainerACL} instance. This is the
+ * value returned for a container by a Blob service REST API Get Container ACL operation, or the value to set on a
+ * container with a Set Container ACL operation.
+ *
+ * @return
+ * A {@link List} of {@link SignedIdentifier} instances containing up to five container-level access
+ * policies associated with this {@link ContainerACL} instance.
+ */
public List
+ * This value is only set on a container when this {@link ContainerACL} instance is passed as a parameter to a call
+ * to an implementation of {@link BlobContract#setContainerACL(String, ContainerACL)} or
+ * {@link BlobContract#setContainerACL(String, ContainerACL, BlobServiceOptions)}.
+ *
+ * @param signedIdentifiers
+ * A {@link List} of {@link SignedIdentifier} instances containing up to five container-level access
+ * policies to associate with this {@link ContainerACL} instance.
+ */
public void setSignedIdentifiers(List
+ * Use the id parameter to specify a name for the access policy. The name may be up to 64 characters in
+ * length and must be unique within the container.
+ *
+ * Use the start parameter to specify the start time for valid access to a resource using the access
+ * policy. If this value is
+ * Use the expiry parameter to specify the expiration time for valid access to a resource using the access
+ * policy. If this value is
+ * Use the permission parameter to specify the operations that can be performed on a blob that is accessed
+ * with the access policy. Supported permissions include read (r), write (w), delete (d), and list (l). Permissions
+ * may be grouped so as to allow multiple operations to be performed with the access policy. For example, to grant
+ * all permissions to a resource, specify "rwdl" for the parameter. To grant only read/write permissions, specify
+ * "rw" for the parameter.
+ *
+ * This value is only set on a container when this {@link ContainerACL} instance is passed as a parameter to a call
+ * to an implementation of {@link BlobContract#setContainerACL(String, ContainerACL)} or
+ * {@link BlobContract#setContainerACL(String, ContainerACL, BlobServiceOptions)}.
+ *
+ * @param id
+ * A {@link String} containing the name for the access policy.
+ * @param start
+ * A {@link Date} representing the start time for the access policy. If this value is
+ * The timeout value only affects calls made on methods where this {@link CopyBlobOptions} instance is
+ * passed as a parameter.
+ *
+ * @param timeout
+ * The server request timeout value to set in milliseconds.
+ * @return
+ * A reference to this {@link CopyBlobOptions} instance.
+ */
@Override
public CopyBlobOptions setTimeout(Integer timeout) {
super.setTimeout(timeout);
return this;
}
+ /**
+ * Gets the source snapshot timestamp value set in this {@link CopyBlobOptions} instance.
+ *
+ * @return
+ * A {@link String} containing the snapshot timestamp value of the source blob snapshot to list.
+ */
public String getSourceSnapshot() {
return sourceSnapshot;
}
+ /**
+ * Sets the snapshot timestamp value used to identify the particular snapshot of the source blob to copy. The
+ * snapshot timestamp value is an opaque value returned by the server to identify a snapshot. When this option is
+ * set, the properties, metadata, and content of the snapshot are copied to the destination.
+ *
+ * Note that this value only affects calls made on methods where this {@link ListBlobBlocksOptions} instance is
+ * passed as a parameter.
+ *
+ * @param sourceSnapshot
+ * A {@link String} containing the snapshot timestamp value of the source blob snapshot to list.
+ * @return
+ * A reference to this {@link ListBlobBlocksOptions} instance.
+ */
public CopyBlobOptions setSourceSnapshot(String sourceSnapshot) {
this.sourceSnapshot = sourceSnapshot;
return this;
}
+ /**
+ * Gets the blob metadata collection set in this {@link CopyBlobOptions} instance.
+ *
+ * @return
+ * A {@link HashMap} of name-value pairs of {@link String} containing the blob metadata set, if any.
+ */
public HashMap
+ * Note that if any metadata is set with this option, no source blob metadata will be copied to the destination
+ * blob.
+ *
+ * The metadata value only affects calls made on methods where this {@link CreateBlobOptions} instance is
+ * passed as a parameter.
+ *
+ * @param metadata
+ * A {@link HashMap} of name-value pairs of {@link String} containing the blob metadata to set.
+ * @return
+ * A reference to this {@link CreateBlobOptions} instance.
+ */
public CopyBlobOptions setMetadata(HashMap
+ * Note that if any metadata is set with this option, no source blob metadata will be copied to the destination
+ * blob.
+ *
+ * @param key
+ * A {@link String} containing the name portion of the name-value pair to add to the metadata collection.
+ * @param value
+ * A {@link String} containing the value portion of the name-value pair to add to the metadata
+ * collection.
+ * @return
+ * A reference to this {@link CopyBlobOptions} instance.
+ */
public CopyBlobOptions addMetadata(String key, String value) {
this.getMetadata().put(key, value);
return this;
}
+ /**
+ * Gets the lease ID to match for the destination blob set in this {@link CopyBlobOptions} instance.
+ *
+ * @return
+ * A {@link String} containing the lease ID set, if any.
+ */
public String getLeaseId() {
return leaseId;
}
+ /**
+ * Sets a lease ID value to match on the destination blob. If set, there must be an active lease with a matching
+ * lease ID set on the destination blob for the operation to succeed.
+ *
+ * Note that this value only affects calls made on methods where this {@link CopyBlobOptions} instance is passed as
+ * a parameter.
+ *
+ * @param leaseId
+ * A {@link String} containing the lease ID to set.
+ * @return
+ * A reference to this {@link CopyBlobOptions} instance.
+ */
public CopyBlobOptions setLeaseId(String leaseId) {
this.leaseId = leaseId;
return this;
}
+ /**
+ * Gets the lease ID to match for the source blob set in this {@link CopyBlobOptions} instance.
+ *
+ * @return
+ * A {@link String} containing the source blob lease ID set, if any.
+ */
public String getSourceLeaseId() {
return sourceLeaseId;
}
+ /**
+ * Sets a lease ID value to match on the source blob. If set, there must be an active lease with a matching
+ * lease ID set on the source blob for the operation to succeed.
+ *
+ * Note that this value only affects calls made on methods where this {@link CopyBlobOptions} instance is passed as
+ * a parameter.
+ *
+ * @param sourceLeaseId
+ * A {@link String} containing the source blob lease ID to set.
+ * @return
+ * A reference to this {@link CopyBlobOptions} instance.
+ */
public CopyBlobOptions setSourceLeaseId(String sourceLeaseId) {
this.sourceLeaseId = sourceLeaseId;
return this;
}
+ /**
+ * Gets the access conditions on the destination blob set in this {@link CopyBlobOptions} instance.
+ *
+ * @return
+ * An {@link AccessCondition} containing the destination blob access conditions set, if any.
+ */
public AccessCondition getAccessCondition() {
return accessCondition;
}
+ /**
+ * Sets optional access conditions for the destination blob. The operation will return an error if the access
+ * conditions are not met.
+ *
+ * Note that this value only affects calls made on methods where this {@link CopyBlobOptions} instance is passed as
+ * a parameter.
+ *
+ * @param accessCondition
+ * An {@link AccessCondition} containing the destination blob access conditions to set.
+ * @return
+ * A reference to this {@link CopyBlobOptions} instance.
+ */
public CopyBlobOptions setAccessCondition(AccessCondition accessCondition) {
this.accessCondition = accessCondition;
return this;
}
+ /**
+ * Gets the access conditions on the source blob set in this {@link CopyBlobOptions} instance.
+ *
+ * @return
+ * An {@link AccessCondition} containing the source blob access conditions set, if any.
+ */
public AccessCondition getSourceAccessCondition() {
return sourceAccessCondition;
}
+ /**
+ * Sets optional access conditions for the source blob. The operation will return an error if the access
+ * conditions are not met.
+ *
+ * Note that this value only affects calls made on methods where this {@link CopyBlobOptions} instance is passed as
+ * a parameter.
+ *
+ * @param sourceAccessCondition
+ * An {@link AccessCondition} containing the source blob access conditions to set.
+ * @return
+ * A reference to this {@link CopyBlobOptions} instance.
+ */
public CopyBlobOptions setSourceAccessCondition(AccessCondition sourceAccessCondition) {
this.sourceAccessCondition = sourceAccessCondition;
return this;
diff --git a/microsoft-azure-api/src/main/java/com/microsoft/windowsazure/services/blob/models/CreateBlobBlockOptions.java b/microsoft-azure-api/src/main/java/com/microsoft/windowsazure/services/blob/models/CreateBlobBlockOptions.java
index 65b3d4b40855f..98bdb31d5d99a 100644
--- a/microsoft-azure-api/src/main/java/com/microsoft/windowsazure/services/blob/models/CreateBlobBlockOptions.java
+++ b/microsoft-azure-api/src/main/java/com/microsoft/windowsazure/services/blob/models/CreateBlobBlockOptions.java
@@ -2,41 +2,98 @@
* Copyright 2011 Microsoft Corporation
*
* Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
*/
package com.microsoft.windowsazure.services.blob.models;
+import com.microsoft.windowsazure.services.blob.BlobContract;
+
+/**
+ * Represents the options that may be set on a
+ * {@link BlobContract#createBlobBlock(String, String, String, java.io.InputStream, CreateBlobBlockOptions)
+ * createBlobBlock} request. These options include an optional server timeout for the operation, the lease ID if the
+ * blob has an active lease, and the MD5 hash value for the block content.
+ */
public class CreateBlobBlockOptions extends BlobServiceOptions {
private String leaseId;
private String contentMD5;
+ /**
+ * Sets the optional server request timeout value associated with this {@link CreateBlobBlockOptions} instance.
+ *
+ * The timeout value only affects calls made on methods where this {@link CreateBlobBlockOptions} instance
+ * is passed as a parameter.
+ *
+ * @param timeout
+ * The server request timeout value to set in milliseconds.
+ * @return
+ * A reference to this {@link CreateBlobBlockOptions} instance.
+ */
@Override
public CreateBlobBlockOptions setTimeout(Integer timeout) {
super.setTimeout(timeout);
return this;
}
+ /**
+ * Gets the lease ID to match for the blob set in this {@link CreateBlobBlockOptions} instance.
+ *
+ * @return
+ * A {@link String} containing the lease ID set, if any.
+ */
public String getLeaseId() {
return leaseId;
}
+ /**
+ * Sets a lease ID value to match when updating the blob. This value must match the lease ID set on a leased blob
+ * for an update to succeed.
+ *
+ * Note that this value only affects calls made on methods where this {@link CreateBlobBlockOptions} instance is
+ * passed as a parameter.
+ *
+ * @param leaseId
+ * A {@link String} containing the lease ID to set.
+ * @return
+ * A reference to this {@link CreateBlobBlockOptions} instance.
+ */
public CreateBlobBlockOptions setLeaseId(String leaseId) {
this.leaseId = leaseId;
return this;
}
+ /**
+ * Gets the MD5 hash value for the block content set in this {@link CreateBlobBlockOptions} instance.
+ *
+ * @return
+ * A {@link String} containing the MD5 hash value for the block content set, if any.
+ */
public String getContentMD5() {
return contentMD5;
}
+ /**
+ * Sets the optional MD5 hash value for the block content. This hash is used to verify the integrity of the blob
+ * during transport. When this value is specified, the storage service checks the hash of the content that has
+ * arrived with the one that was sent. If the two hashes do not match, the operation will fail with error code 400
+ * (Bad Request), which will cause a ServiceException to be thrown.
+ *
+ * Note that this value only affects calls made on methods where this {@link CreateBlobBlockOptions} instance is
+ * passed as a parameter.
+ *
+ * @param contentMD5
+ * A {@link String} containing the MD5 hash value for the block content to set.
+ * @return
+ * A reference to this {@link CreateBlobBlockOptions} instance.
+ */
public CreateBlobBlockOptions setContentMD5(String contentMD5) {
this.contentMD5 = contentMD5;
return this;
diff --git a/microsoft-azure-api/src/main/java/com/microsoft/windowsazure/services/blob/models/CreateBlobOptions.java b/microsoft-azure-api/src/main/java/com/microsoft/windowsazure/services/blob/models/CreateBlobOptions.java
index 41fef87ff0cbf..e3afa134df8a2 100644
--- a/microsoft-azure-api/src/main/java/com/microsoft/windowsazure/services/blob/models/CreateBlobOptions.java
+++ b/microsoft-azure-api/src/main/java/com/microsoft/windowsazure/services/blob/models/CreateBlobOptions.java
@@ -2,20 +2,30 @@
* Copyright 2011 Microsoft Corporation
*
* Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
*/
package com.microsoft.windowsazure.services.blob.models;
import java.util.HashMap;
+import com.microsoft.windowsazure.services.blob.BlobContract;
+
+/**
+ * Represents the options that may be set on a
+ * {@link BlobContract#createPageBlob(String, String, int, CreateBlobOptions) createPageBlob} or
+ * {@link BlobContract#createBlockBlob(String, String, java.io.InputStream, CreateBlobOptions) createBlockBlob} request.
+ * These options include an optional server timeout for the operation, the MIME content type and content encoding for
+ * the blob, the content language, the MD5 hash, a cache control value, blob metadata, a blob lease ID, a sequence
+ * number, and access conditions.
+ */
public class CreateBlobOptions extends BlobServiceOptions {
private String contentType;
private String contentEncoding;
@@ -32,138 +42,418 @@ public class CreateBlobOptions extends BlobServiceOptions {
private Long sequenceNumber;
private AccessCondition accessCondition;
+ /**
+ * Sets the optional server request timeout value associated with this {@link CreateBlobOptions} instance.
+ *
+ * The timeout value only affects calls made on methods where this {@link CreateBlobOptions} instance is
+ * passed as a parameter.
+ *
+ * @param timeout
+ * The server request timeout value to set in milliseconds.
+ * @return
+ * A reference to this {@link CreateBlobOptions} instance.
+ */
@Override
public CreateBlobOptions setTimeout(Integer timeout) {
super.setTimeout(timeout);
return this;
}
+ /**
+ * Gets the
+ * Note that this value only affects calls made on methods where this {@link CreateBlobOptions} instance is passed
+ * as a parameter.
+ *
+ * @param contentEncoding
+ * A {@link String} containing the
+ * Note that this value only affects calls made on methods where this {@link CreateBlobOptions} instance is passed
+ * as a parameter.
+ *
+ * @param contentLanguage
+ * A {@link String} containing the
+ * Note that this value only affects calls made on methods where this {@link CreateBlobOptions} instance is passed
+ * as a parameter.
+ *
+ * @param contentMD5
+ * A {@link String} containing the
+ * Note that this value only affects calls made on methods where this {@link CreateBlobOptions} instance is passed
+ * as a parameter.
+ *
+ * @param cacheControl
+ * A {@link String} containing the
+ * Note that this value only affects calls made on methods where this {@link CreateBlobOptions} instance is passed
+ * as a parameter.
+ *
+ * @param blobContentType
+ * A {@link String} containing the
+ * Note that this value only affects calls made on methods where this {@link CreateBlobOptions} instance is passed
+ * as a parameter.
+ *
+ * @param blobContentEncoding
+ * A {@link String} containing the
+ * Note that this value only affects calls made on methods where this {@link CreateBlobOptions} instance is passed
+ * as a parameter.
+ *
+ * @param blobContentLanguage
+ * A {@link String} containing the
+ * Note that this value only affects calls made on methods where this {@link CreateBlobOptions} instance is passed
+ * as a parameter.
+ *
+ * @param blobContentMD5
+ * A {@link String} containing the
+ * Note that this value only affects calls made on methods where this {@link CreateBlobOptions} instance is passed
+ * as a parameter.
+ *
+ * @param blobCacheControl
+ * A {@link String} containing the
+ * The metadata value only affects calls made on methods where this {@link CreateBlobOptions} instance is
+ * passed as a parameter.
+ *
+ * @param metadata
+ * A {@link HashMap} of name-value pairs of {@link String} containing the blob metadata to set.
+ * @return
+ * A reference to this {@link CreateBlobOptions} instance.
+ */
public CreateBlobOptions setMetadata(HashMap
+ * Note that this value only affects calls made on methods where this {@link CreateBlobOptions} instance is passed
+ * as a parameter.
+ *
+ * @param sequenceNumber
+ * The page blob sequence number value to set.
+ * @return
+ * A reference to this {@link CreateBlobOptions} instance.
+ */
public CreateBlobOptions setSequenceNumber(Long sequenceNumber) {
this.sequenceNumber = sequenceNumber;
return this;
}
+ /**
+ * Gets the access conditions set in this {@link CreateBlobOptions} instance.
+ *
+ * @return
+ * An {@link AccessCondition} containing the access conditions set, if any.
+ */
public AccessCondition getAccessCondition() {
return accessCondition;
}
+ /**
+ * Sets the access conditions for updating a blob. This value is not used when creating a blob.
+ *
+ * @param accessCondition
+ * An {@link AccessCondition} containing the access conditions to set.
+ * @return
+ * A reference to this {@link CreateBlobOptions} instance.
+ */
public CreateBlobOptions setAccessCondition(AccessCondition accessCondition) {
this.accessCondition = accessCondition;
return this;
diff --git a/microsoft-azure-api/src/main/java/com/microsoft/windowsazure/services/blob/models/CreateBlobPagesOptions.java b/microsoft-azure-api/src/main/java/com/microsoft/windowsazure/services/blob/models/CreateBlobPagesOptions.java
index cbbde22e0f99b..e87466dd35c0c 100644
--- a/microsoft-azure-api/src/main/java/com/microsoft/windowsazure/services/blob/models/CreateBlobPagesOptions.java
+++ b/microsoft-azure-api/src/main/java/com/microsoft/windowsazure/services/blob/models/CreateBlobPagesOptions.java
@@ -2,51 +2,126 @@
* Copyright 2011 Microsoft Corporation
*
* Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
*/
package com.microsoft.windowsazure.services.blob.models;
+import com.microsoft.windowsazure.services.blob.BlobContract;
+
+/**
+ * Represents the options that may be set on a
+ * {@link BlobContract#createBlobPages(String, String, PageRange, long, java.io.InputStream, CreateBlobPagesOptions)}
+ * request. These options include an optional server timeout for the operation, a blob lease ID to create pages in a
+ * blob with an active lease, an optional MD5 hash for the content, and any access conditions to satisfy.
+ */
public class CreateBlobPagesOptions extends BlobServiceOptions {
private String leaseId;
private String contentMD5;
private AccessCondition accessCondition;
+ /**
+ * Sets the optional server request timeout value associated with this {@link CreateBlobPagesOptions} instance.
+ *
+ * The timeout value only affects calls made on methods where this {@link CreateBlobPagesOptions} instance
+ * is passed as a parameter.
+ *
+ * @param timeout
+ * The server request timeout value to set in milliseconds.
+ * @return
+ * A reference to this {@link CreateBlobPagesOptions} instance.
+ */
@Override
public CreateBlobPagesOptions setTimeout(Integer timeout) {
super.setTimeout(timeout);
return this;
}
+ /**
+ * Gets the lease ID to match for the blob set in this {@link CreateBlobPagesOptions} instance.
+ *
+ * @return
+ * A {@link String} containing the lease ID set, if any.
+ */
public String getLeaseId() {
return leaseId;
}
+ /**
+ * Sets an optional lease ID value to match when getting the blob. If set, the lease must be active and the value
+ * must match the lease ID set on the leased blob for the operation to succeed.
+ *
+ * Note that this value only affects calls made on methods where this {@link CreateBlobPagesOptions} instance is
+ * passed as a parameter.
+ *
+ * @param leaseId
+ * A {@link String} containing the lease ID to set.
+ * @return
+ * A reference to this {@link CreateBlobPagesOptions} instance.
+ */
public CreateBlobPagesOptions setLeaseId(String leaseId) {
this.leaseId = leaseId;
return this;
}
+ /**
+ * Gets the MD5 hash value for the page content set in this {@link CreateBlobPagesOptions} instance.
+ *
+ * @return
+ * A {@link String} containing the MD5 hash value for the block content set, if any.
+ */
public String getContentMD5() {
return contentMD5;
}
+ /**
+ * Sets the optional MD5 hash value for the page content. This hash is used to verify the integrity of the blob
+ * during transport. When this value is specified, the storage service checks the hash of the content that has
+ * arrived with the one that was sent. If the two hashes do not match, the operation will fail with error code 400
+ * (Bad Request), which will cause a ServiceException to be thrown.
+ *
+ * Note that this value only affects calls made on methods where this {@link CreateBlobPagesOptions} instance is
+ * passed as a parameter.
+ *
+ * @param contentMD5
+ * A {@link String} containing the MD5 hash value for the block content to set.
+ * @return
+ * A reference to this {@link CreateBlobPagesOptions} instance.
+ */
public CreateBlobPagesOptions setContentMD5(String contentMD5) {
this.contentMD5 = contentMD5;
return this;
}
+ /**
+ * Gets the access conditions set in this {@link CreateBlobPagesOptions} instance.
+ *
+ * @return
+ * An {@link AccessCondition} containing the access conditions set, if any.
+ */
public AccessCondition getAccessCondition() {
return accessCondition;
}
+ /**
+ * Sets optional access conditions for getting the blob. The operation will return an error if the access conditions
+ * are not met.
+ *
+ * Note that this value only affects calls made on methods where this {@link CreateBlobPagesOptions} instance is
+ * passed as a parameter.
+ *
+ * @param accessCondition
+ * An {@link AccessCondition} containing the access conditions to set.
+ * @return
+ * A reference to this {@link CreateBlobPagesOptions} instance.
+ */
public CreateBlobPagesOptions setAccessCondition(AccessCondition accessCondition) {
this.accessCondition = accessCondition;
return this;
diff --git a/microsoft-azure-api/src/main/java/com/microsoft/windowsazure/services/blob/models/CreateBlobPagesResult.java b/microsoft-azure-api/src/main/java/com/microsoft/windowsazure/services/blob/models/CreateBlobPagesResult.java
index b7eb8e83f56df..20e98bd3f3cc0 100644
--- a/microsoft-azure-api/src/main/java/com/microsoft/windowsazure/services/blob/models/CreateBlobPagesResult.java
+++ b/microsoft-azure-api/src/main/java/com/microsoft/windowsazure/services/blob/models/CreateBlobPagesResult.java
@@ -2,54 +2,137 @@
* Copyright 2011 Microsoft Corporation
*
* Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
*/
package com.microsoft.windowsazure.services.blob.models;
import java.util.Date;
+import com.microsoft.windowsazure.services.blob.BlobContract;
+
+/**
+ * A wrapper class for the response returned from a Blob Service REST API Put Page operation. This is returned by
+ * calls to implementations of {@link BlobContract#clearBlobPages(String, String, PageRange)},
+ * {@link BlobContract#clearBlobPages(String, String, PageRange, CreateBlobPagesOptions)},
+ * {@link BlobContract#createBlobPages(String, String, PageRange, long, java.io.InputStream)} and
+ * {@link BlobContract#createBlobPages(String, String, PageRange, long, java.io.InputStream, CreateBlobPagesOptions)}.
+ *
+ * See the Put Page documentation on
+ * MSDN for details of the underlying Blob Service REST API operation.
+ */
public class CreateBlobPagesResult {
private String etag;
private Date lastModified;
private String contentMD5;
private long sequenceNumber;
+ /**
+ * Gets the ETag of the blob.
+ *
+ * This value can be used in an access condition when updating or deleting a blob to prevent the client from
+ * modifying data that has been changed by another client.
+ *
+ * @return
+ * A {@link String} containing the server-assigned ETag value for the blob.
+ */
public String getEtag() {
return etag;
}
+ /**
+ * Reserved for internal use. Sets the ETag of the blob from the ETag element returned in the
+ * response.
+ *
+ * This method is invoked by the API to set the value from the Blob Service REST API operation response returned by
+ * the server.
+ *
+ * @param etag
+ * A {@link String} containing the server-assigned ETag value for the blob.
+ */
public void setEtag(String etag) {
this.etag = etag;
}
+ /**
+ * Gets the last modified time of the blob.
+ *
+ * Any operation that modifies the blob, including updates to the blob's metadata or properties, changes the last
+ * modified time of the blob. This value can be used in an access condition when updating or deleting a blob to
+ * prevent the client from modifying data that has been changed by another client.
+ *
+ * @return
+ * A {@link java.util.Date} containing the last modified time of the page blob.
+ */
public Date getLastModified() {
return lastModified;
}
+ /**
+ * Reserved for internal use. Sets the last modified time of the blob from the Last-Modified
+ * element returned in the response.
+ *
+ * This method is invoked by the API to set the value from the Blob Service REST API operation response returned by
+ * the server.
+ *
+ * @param lastModified
+ * A {@link java.util.Date} containing the last modified time of the blob.
+ */
public void setLastModified(Date lastModified) {
this.lastModified = lastModified;
}
+ /**
+ * Gets the MD5 hash value of the page blob. This value can be used to determine if the blob content has been
+ * corrupted in transmission.
+ *
+ * @return
+ * A {@link String} containing the MD5 hash value of the page blob.
+ */
public String getContentMD5() {
return contentMD5;
}
+ /**
+ * Reserved for internal use. Sets the MD5 hash value of the page blob from the Content-MD5 element
+ * returned in the response.
+ *
+ * @param contentMD5
+ * A {@link String} containing the MD5 hash value of the page blob.
+ */
public void setContentMD5(String contentMD5) {
this.contentMD5 = contentMD5;
}
+ /**
+ * Gets the sequence number of the page blob. This value can be used when updating or deleting a page blob using an
+ * optimistic concurrency model to prevent the client from modifying data that has been changed by another
+ * client.
+ *
+ * @return
+ * A {@link String} containing the client-assigned sequence number value for the page blob.
+ */
public long getSequenceNumber() {
return sequenceNumber;
}
+ /**
+ * Reserved for internal use. Sets the sequence number of the page blob from the
+ * x-ms-blob-sequence-number element returned in the response.
+ *
+ * This method is invoked by the API to set the value from the Blob Service REST API operation response returned by
+ * the server.
+ *
+ * @param sequenceNumber
+ * A {@link String} containing the client-assigned sequence number value for the page blob.
+ */
public void setSequenceNumber(long sequenceNumber) {
this.sequenceNumber = sequenceNumber;
}
diff --git a/microsoft-azure-api/src/main/java/com/microsoft/windowsazure/services/blob/models/CreateBlobSnapshotOptions.java b/microsoft-azure-api/src/main/java/com/microsoft/windowsazure/services/blob/models/CreateBlobSnapshotOptions.java
index 35ffd6419f97a..4df9b3b1f7c57 100644
--- a/microsoft-azure-api/src/main/java/com/microsoft/windowsazure/services/blob/models/CreateBlobSnapshotOptions.java
+++ b/microsoft-azure-api/src/main/java/com/microsoft/windowsazure/services/blob/models/CreateBlobSnapshotOptions.java
@@ -2,58 +2,146 @@
* Copyright 2011 Microsoft Corporation
*
* Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
*/
package com.microsoft.windowsazure.services.blob.models;
import java.util.HashMap;
+import com.microsoft.windowsazure.services.blob.BlobContract;
+
+/**
+ * Represents the options that may be set on a
+ * {@link BlobContract#createBlobSnapshot(String, String, CreateBlobSnapshotOptions) createBlobSnapshot} request. These
+ * options include an optional server timeout for the operation, blob metadata to set on the snapshot, a blob lease ID
+ * to get a blob with an active lease, an optional start and end range for blob content to
+ * return, and any access conditions to satisfy.
+ */
public class CreateBlobSnapshotOptions extends BlobServiceOptions {
private HashMap
+ * The timeout value only affects calls made on methods where this {@link CreateBlobSnapshotOptions}
+ * instance is passed as a parameter.
+ *
+ * @param timeout
+ * The server request timeout value to set in milliseconds.
+ * @return
+ * A reference to this {@link CreateBlobSnapshotOptions} instance.
+ */
@Override
public CreateBlobSnapshotOptions setTimeout(Integer timeout) {
super.setTimeout(timeout);
return this;
}
+ /**
+ * Gets the metadata collection set in this {@link CreateBlobSnapshotOptions} instance.
+ *
+ * @return
+ * A {@link HashMap} of name-value pairs of {@link String} containing the blob metadata set, if any.
+ */
public HashMap
+ * The metadata value only affects calls made on methods where this {@link CreateBlobSnapshotOptions}
+ * instance is passed as a parameter.
+ *
+ * @param metadata
+ * A {@link java.util.HashMap} of name-value pairs of {@link String} containing the names and values of
+ * the metadata to set.
+ * @return
+ * A reference to this {@link CreateBlobSnapshotOptions} instance.
+ */
public CreateBlobSnapshotOptions setMetadata(HashMap
+ * Note that this value only affects calls made on methods where this {@link CreateBlobSnapshotOptions} instance is
+ * passed as a parameter.
+ *
+ * @param leaseId
+ * A {@link String} containing the lease ID to set.
+ * @return
+ * A reference to this {@link CreateBlobSnapshotOptions} instance.
+ */
public CreateBlobSnapshotOptions setLeaseId(String leaseId) {
this.leaseId = leaseId;
return this;
}
+ /**
+ * Gets the access conditions set in this {@link CreateBlobSnapshotOptions} instance.
+ *
+ * @return
+ * An {@link AccessCondition} containing the access conditions set, if any.
+ */
public AccessCondition getAccessCondition() {
return accessCondition;
}
+ /**
+ * Sets optional access conditions for creating a snapshot of the blob. The operation will return an error if the
+ * access conditions are not met.
+ *
+ * Note that this value only affects calls made on methods where this {@link CreateBlobSnapshotOptions} instance is
+ * passed as a parameter.
+ *
+ * @param accessCondition
+ * An {@link AccessCondition} containing the access conditions to set.
+ * @return
+ * A reference to this {@link CreateBlobSnapshotOptions} instance.
+ */
public CreateBlobSnapshotOptions setAccessCondition(AccessCondition accessCondition) {
this.accessCondition = accessCondition;
return this;
diff --git a/microsoft-azure-api/src/main/java/com/microsoft/windowsazure/services/blob/models/CreateBlobSnapshotResult.java b/microsoft-azure-api/src/main/java/com/microsoft/windowsazure/services/blob/models/CreateBlobSnapshotResult.java
index eeaf0fb61b377..25daaff571ab7 100644
--- a/microsoft-azure-api/src/main/java/com/microsoft/windowsazure/services/blob/models/CreateBlobSnapshotResult.java
+++ b/microsoft-azure-api/src/main/java/com/microsoft/windowsazure/services/blob/models/CreateBlobSnapshotResult.java
@@ -2,45 +2,117 @@
* Copyright 2011 Microsoft Corporation
*
* Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
*/
package com.microsoft.windowsazure.services.blob.models;
import java.util.Date;
+import com.microsoft.windowsazure.services.blob.BlobContract;
+
+/**
+ * A wrapper class for the response returned from a Blob Service REST API Snapshot Blob operation. This is returned by
+ * calls to implementations of {@link BlobContract#createBlobSnapshot(String, String)} and
+ * {@link BlobContract#createBlobSnapshot(String, String, CreateBlobSnapshotOptions)}.
+ *
+ * See the Snapshot Blob documentation
+ * on MSDN for details of the underlying Blob Service REST API operation.
+ */
public class CreateBlobSnapshotResult {
private String snapshot;
private String etag;
private Date lastModified;
+ /**
+ * Gets the snapshot timestamp value returned by the server to uniquely identify the newly created snapshot.
+ *
+ * The snapshot timestamp value is an opaque value returned by the server to uniquely identify a snapshot version,
+ * and may be used in subsequent requests to access the snapshot.
+ *
+ *
+ * @return
+ * A {@link String} containing the snapshot timestamp value of the newly created snapshot.
+ */
public String getSnapshot() {
return snapshot;
}
+ /**
+ * Reserved for internal use. Sets the snapshot timestamp value from the x-ms-snapshot header
+ * returned in the response.
+ *
+ * This method is invoked by the API to set the value from the Blob Service REST API operation response returned by
+ * the server.
+ *
+ * @param snapshot
+ * A {@link String} containing the snapshot timestamp value of the newly created snapshot.
+ */
public void setSnapshot(String snapshot) {
this.snapshot = snapshot;
}
+ /**
+ * Gets the ETag of the snapshot.
+ *
+ * Note that a snapshot cannot be written to, so the ETag of a given snapshot will never change. However, the ETag
+ * of the snapshot will differ from that of the base blob if new metadata was supplied with the create blob snapshot
+ * request. If no metadata was specified with the request, the ETag of the snapshot will be identical to that of the
+ * base blob at the time the snapshot was taken.
+ *
+ * @return
+ * A {@link String} containing the server-assigned ETag value for the snapshot.
+ */
public String getEtag() {
return etag;
}
+ /**
+ * Reserved for internal use. Sets the ETag of the snapshot from the ETag header returned in the
+ * response.
+ *
+ * This method is invoked by the API to set the value from the Blob Service REST API operation response returned by
+ * the server.
+ *
+ * @param etag
+ * A {@link String} containing the server-assigned ETag value for the blob.
+ */
public void setEtag(String etag) {
this.etag = etag;
}
+ /**
+ * Gets the last modified time of the snapshot.
+ *
+ * Note that a snapshot cannot be written to, so the last modified time of a given snapshot will never change.
+ * However, the last modified time of the snapshot will differ from that of the base blob if new metadata was
+ * supplied with the create blob snapshot request. If no metadata was specified with the request, the last modified
+ * time of the snapshot will be identical to that of the base blob at the time the snapshot was taken.
+ *
+ * @return
+ * A {@link java.util.Date} containing the last modified time of the snapshot.
+ */
public Date getLastModified() {
return lastModified;
}
+ /**
+ * Reserved for internal use. Sets the last modified time of the snapshot from the Last-Modified
+ * header returned in the response.
+ *
+ * This method is invoked by the API to set the value from the Blob Service REST API operation response returned by
+ * the server.
+ *
+ * @param lastModified
+ * A {@link java.util.Date} containing the last modified time of the snapshot.
+ */
public void setLastModified(Date lastModified) {
this.lastModified = lastModified;
}
diff --git a/microsoft-azure-api/src/main/java/com/microsoft/windowsazure/services/blob/models/CreateContainerOptions.java b/microsoft-azure-api/src/main/java/com/microsoft/windowsazure/services/blob/models/CreateContainerOptions.java
index 2ad569ba45423..b128296b61aab 100644
--- a/microsoft-azure-api/src/main/java/com/microsoft/windowsazure/services/blob/models/CreateContainerOptions.java
+++ b/microsoft-azure-api/src/main/java/com/microsoft/windowsazure/services/blob/models/CreateContainerOptions.java
@@ -2,48 +2,141 @@
* Copyright 2011 Microsoft Corporation
*
* Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
*/
package com.microsoft.windowsazure.services.blob.models;
import java.util.HashMap;
+import com.microsoft.windowsazure.services.blob.BlobContract;
+
+/**
+ * Represents the options that may be set on a {@link BlobContract#createContainer(String, CreateContainerOptions)
+ * createContainer} request. These options include a server response timeout for the request, metadata to set on the
+ * container, and the public access level for container and blob data. Options that are not set will not be passed to
+ * the server with a request.
+ */
public class CreateContainerOptions extends BlobServiceOptions {
private String publicAccess;
private HashMap
+ * The timeout value only affects calls made on methods where this {@link CreateContainerOptions} instance
+ * is passed as a parameter.
+ *
+ * @param timeout
+ * The server request timeout value to set in milliseconds.
+ * @return
+ * A reference to this {@link CreateContainerOptions} instance.
+ */
@Override
public CreateContainerOptions setTimeout(Integer timeout) {
super.setTimeout(timeout);
return this;
}
+ /**
+ * Gets the metadata collection associated with this {@link CreateContainerOptions} instance.
+ *
+ * @return
+ * A {@link java.util.HashMap} of name-value pairs of {@link String} containing the names and values of
+ * the container metadata to set.
+ */
public HashMap
+ * The metadata value only affects calls made on methods where this {@link CreateContainerOptions} instance
+ * is passed as a parameter.
+ *
+ * @param metadata
+ * A {@link java.util.HashMap} of name-value pairs of {@link String} containing the names and values of
+ * the container metadata to set.
+ * @return
+ * A reference to this {@link CreateContainerOptions} instance.
+ */
public CreateContainerOptions setMetadata(HashMap
+ * The publicAccess value only affects calls made on methods where this {@link CreateContainerOptions}
+ * instance is passed as a parameter.
+ *
+ * @param publicAccess
+ * A {@link String} containing the public access level value to set, or
+ * The timeout value only affects calls made on methods where this {@link DeleteBlobOptions} instance is
+ * passed as a parameter.
+ *
+ * @param timeout
+ * The server request timeout value to set in milliseconds.
+ * @return
+ * A reference to this {@link DeleteBlobOptions} instance.
+ */
@Override
public DeleteBlobOptions setTimeout(Integer timeout) {
super.setTimeout(timeout);
return this;
}
+ /**
+ * Gets the snapshot timestamp value set in this {@link DeleteBlobOptions} instance.
+ *
+ * @return
+ * A {@link String} containing the snapshot timestamp value of the blob snapshot to get.
+ */
public String getSnapshot() {
return snapshot;
}
+ /**
+ * Reserved for future use. Sets an optional snapshot timestamp value used to identify the particular snapshot of
+ * the blob to delete.
+ *
+ * The snapshot timestamp value is an opaque value returned by the server to identify a snapshot. This option cannot
+ * be set if the delete snapshots only option is set to
+ * Note that this value only affects calls made on methods where this {@link DeleteBlobOptions} instance is passed
+ * as a parameter.
+ *
+ * @param snapshot
+ * A {@link String} containing the snapshot timestamp value of the blob snapshot to get.
+ * @return
+ * A reference to this {@link DeleteBlobOptions} instance.
+ */
public DeleteBlobOptions setSnapshot(String snapshot) {
this.snapshot = snapshot;
return this;
}
+ /**
+ * Gets the lease ID to match for the blob set in this {@link DeleteBlobOptions} instance.
+ *
+ * @return
+ * A {@link String} containing the lease ID set, if any.
+ */
public String getLeaseId() {
return leaseId;
}
+ /**
+ * Sets an optional lease ID value to match when deleting the blob. If set, the lease must be active and the value
+ * must match the lease ID set on the leased blob for the operation to succeed.
+ *
+ * Note that this value only affects calls made on methods where this {@link DeleteBlobOptions} instance is passed
+ * as a parameter.
+ *
+ * @param leaseId
+ * A {@link String} containing the lease ID to set.
+ * @return
+ * A reference to this {@link DeleteBlobOptions} instance.
+ */
public DeleteBlobOptions setLeaseId(String leaseId) {
this.leaseId = leaseId;
return this;
}
+ /**
+ * Gets the flag indicating whether to delete only snapshots of the blob, or both the blob and all its snapshots set
+ * in this {@link DeleteBlobOptions} instance.
+ *
+ * @return
+ * A value of
+ * If the deleteSnaphotsOnly parameter is set to
+ * This option is not compatible with the snapshot option; if both are set the Blob service returns status code 400
+ * (Bad Request) and a {@link StorageException} is thrown.
+ *
+ * Note that this value only affects calls made on methods where this {@link DeleteBlobOptions} instance is passed
+ * as a parameter.
+ *
+ * @param deleteSnaphotsOnly
+ * Set to
+ * Note that this value only affects calls made on methods where this {@link DeleteBlobOptions} instance is passed
+ * as a parameter.
+ *
+ * @param accessCondition
+ * An {@link AccessCondition} containing the access conditions to set.
+ * @return
+ * A reference to this {@link DeleteBlobOptions} instance.
+ */
public DeleteBlobOptions setAccessCondition(AccessCondition accessCondition) {
this.accessCondition = accessCondition;
return this;
diff --git a/microsoft-azure-api/src/main/java/com/microsoft/windowsazure/services/blob/models/DeleteContainerOptions.java b/microsoft-azure-api/src/main/java/com/microsoft/windowsazure/services/blob/models/DeleteContainerOptions.java
index 1916ecb70320c..fc5c922de7566 100644
--- a/microsoft-azure-api/src/main/java/com/microsoft/windowsazure/services/blob/models/DeleteContainerOptions.java
+++ b/microsoft-azure-api/src/main/java/com/microsoft/windowsazure/services/blob/models/DeleteContainerOptions.java
@@ -2,31 +2,72 @@
* Copyright 2011 Microsoft Corporation
*
* Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
*/
package com.microsoft.windowsazure.services.blob.models;
+import com.microsoft.windowsazure.services.blob.BlobContract;
+
+/**
+ * Represents the options that may be set on a {@link BlobContract#deleteContainer(String, DeleteContainerOptions)
+ * deleteContainer} request. These options include a server response timeout for the request and access conditions that
+ * specify whether to perform the operation or not depending on the values of the Etag or last modified time of the
+ * container. Options that are not set will not be passed to the server with a request.
+ */
public class DeleteContainerOptions extends BlobServiceOptions {
private AccessCondition accessCondition;
+ /**
+ * Sets the server request timeout value associated with this {@link DeleteContainerOptions} instance.
+ *
+ * The timeout value only affects calls made on methods where this {@link DeleteContainerOptions} instance
+ * is passed as a parameter.
+ *
+ * @param timeout
+ * The server request timeout value to set in milliseconds.
+ * @return
+ * A reference to this {@link DeleteContainerOptions} instance.
+ */
@Override
public DeleteContainerOptions setTimeout(Integer timeout) {
super.setTimeout(timeout);
return this;
}
+ /**
+ * Gets the access conditions associated with this {@link DeleteContainerOptions} instance.
+ *
+ * @return
+ * An {@link AccessCondition} reference containing the Etag and last modified time conditions for performing
+ * the delete container operation, or
+ * The accessCondition value only affects calls made on methods where this {@link DeleteContainerOptions}
+ * instance is passed as a parameter.
+ *
+ * @param accessCondition
+ * An {@link AccessCondition} reference containing the Etag and last modified time conditions for
+ * performing the delete container operation. Specify
+ * The timeout value only affects calls made on methods where this {@link GetBlobMetadataOptions} instance
+ * is passed as a parameter.
+ *
+ * @param timeout
+ * The server request timeout value to set in milliseconds.
+ * @return
+ * A reference to this {@link GetBlobMetadataOptions} instance.
+ */
@Override
public GetBlobMetadataOptions setTimeout(Integer timeout) {
super.setTimeout(timeout);
return this;
}
+ /**
+ * Gets the snapshot timestamp value set in this {@link GetBlobMetadataOptions} instance.
+ *
+ * @return
+ * A {@link String} containing the snapshot timestamp value of the blob snapshot to get metadata for.
+ */
public String getSnapshot() {
return snapshot;
}
+ /**
+ * Sets the snapshot timestamp value used to identify the particular snapshot of the blob to get metadata for. The
+ * snapshot timestamp value is an opaque value returned by the server to identify a snapshot. When this option is
+ * set, only the metadata of the snapshot is returned.
+ *
+ * Note that this value only affects calls made on methods where this {@link GetBlobMetadataOptions} instance is
+ * passed as a parameter.
+ *
+ * @param snapshot
+ * A {@link String} containing the snapshot timestamp value of the blob snapshot to get metadata for.
+ * @return
+ * A reference to this {@link GetBlobMetadataOptions} instance.
+ */
public GetBlobMetadataOptions setSnapshot(String snapshot) {
this.snapshot = snapshot;
return this;
}
+ /**
+ * Gets the lease ID to match for the blob set in this {@link GetBlobMetadataOptions} instance.
+ *
+ * @return
+ * A {@link String} containing the lease ID set, if any.
+ */
public String getLeaseId() {
return leaseId;
}
+ /**
+ * Sets a lease ID value to match when getting the metadata of the blob. If set, the lease must be active and the
+ * value must match the lease ID set on the leased blob for the operation to succeed.
+ *
+ * Note that this value only affects calls made on methods where this {@link GetBlobMetadataOptions} instance is
+ * passed as a parameter.
+ *
+ * @param leaseId
+ * A {@link String} containing the lease ID to set.
+ * @return
+ * A reference to this {@link GetBlobMetadataOptions} instance.
+ */
public GetBlobMetadataOptions setLeaseId(String leaseId) {
this.leaseId = leaseId;
return this;
}
+ /**
+ * Gets the access conditions set in this {@link GetBlobMetadataOptions} instance.
+ *
+ * @return
+ * An {@link AccessCondition} containing the access conditions set, if any.
+ */
public AccessCondition getAccessCondition() {
return accessCondition;
}
+ /**
+ * Sets the access conditions for getting the metadata of the blob. The operation will return an error if the
+ * access conditions are not met.
+ *
+ * @param accessCondition
+ * An {@link AccessCondition} containing the access conditions to set.
+ * @return
+ * A reference to this {@link GetBlobMetadataOptions} instance.
+ */
public GetBlobMetadataOptions setAccessCondition(AccessCondition accessCondition) {
this.accessCondition = accessCondition;
return this;
diff --git a/microsoft-azure-api/src/main/java/com/microsoft/windowsazure/services/blob/models/GetBlobMetadataResult.java b/microsoft-azure-api/src/main/java/com/microsoft/windowsazure/services/blob/models/GetBlobMetadataResult.java
index 93348f23cdba6..bba525e3db1e3 100644
--- a/microsoft-azure-api/src/main/java/com/microsoft/windowsazure/services/blob/models/GetBlobMetadataResult.java
+++ b/microsoft-azure-api/src/main/java/com/microsoft/windowsazure/services/blob/models/GetBlobMetadataResult.java
@@ -2,46 +2,115 @@
* Copyright 2011 Microsoft Corporation
*
* Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
*/
package com.microsoft.windowsazure.services.blob.models;
import java.util.Date;
import java.util.HashMap;
+import com.microsoft.windowsazure.services.blob.BlobContract;
+
+/**
+ * A wrapper class for the response returned from a Blob Service REST API Get Blob Metadata operation. This is
+ * returned by calls to implementations of {@link BlobContract#getBlobMetadata(String, String)} and
+ * {@link BlobContract#getBlobMetadata(String, String, GetBlobMetadataOptions)}.
+ *
+ * See the Get Blob Metadata
+ * documentation on MSDN for details of the underlying Blob Service REST API operation.
+ */
public class GetBlobMetadataResult {
private String etag;
private Date lastModified;
private HashMap
+ * This value can be used in an access condition when updating or deleting a blob to prevent the client from
+ * modifying data that has been changed by another client.
+ *
+ * @return
+ * A {@link String} containing the server-assigned ETag value for the blob.
+ */
public String getEtag() {
return etag;
}
+ /**
+ * Reserved for internal use. Sets the ETag of the blob from the ETag header returned in the
+ * response.
+ *
+ * This method is invoked by the API to set the value from the Blob Service REST API operation response returned by
+ * the server.
+ *
+ * @param etag
+ * A {@link String} containing the server-assigned ETag value for the blob.
+ */
public void setEtag(String etag) {
this.etag = etag;
}
+ /**
+ * Gets the last modified time of the block blob. For block blobs, this value is returned only if the blob has
+ * committed blocks.
+ *
+ * Any operation that modifies the blob, including updates to the blob's metadata or properties, changes the last
+ * modified time of the blob. This value can be used in an access condition when updating or deleting a blob to
+ * prevent the client from modifying data that has been changed by another client.
+ *
+ * @return
+ * A {@link java.util.Date} containing the last modified time of the blob.
+ */
public Date getLastModified() {
return lastModified;
}
+ /**
+ * Reserved for internal use. Sets the last modified time of the blob from the Last-Modified
+ * header returned in the response.
+ *
+ * This method is invoked by the API to set the value from the Blob Service REST API operation response returned by
+ * the server.
+ *
+ * @param lastModified
+ * A {@link java.util.Date} containing the last modified time of the blob.
+ */
public void setLastModified(Date lastModified) {
this.lastModified = lastModified;
}
+ /**
+ * Gets the user-defined blob metadata as a map of name and value pairs. The metadata is for client use and is
+ * opaque to the server.
+ *
+ * @return
+ * A {@link java.util.HashMap} of name-value pairs of {@link String} containing the names and values of
+ * the blob metadata.
+ */
public HashMap
+ * This method is invoked by the API to set the value from the Blob Service REST API operation response returned by
+ * the server.
+ *
+ * @param metadata
+ * A {@link java.util.HashMap} of name-value pairs of {@link String} containing the names and values
+ * of the blob metadata.
+ */
public void setMetadata(HashMap
+ * The timeout value only affects calls made on methods where this {@link GetBlobOptions} instance is
+ * passed as a parameter.
+ *
+ * @param timeout
+ * The server request timeout value to set in milliseconds.
+ * @return
+ * A reference to this {@link GetBlobOptions} instance.
+ */
@Override
public GetBlobOptions setTimeout(Integer timeout) {
super.setTimeout(timeout);
return this;
}
+ /**
+ * Gets the snapshot timestamp value set in this {@link GetBlobOptions} instance.
+ *
+ * @return
+ * A {@link String} containing the snapshot timestamp value of the blob snapshot to get.
+ */
public String getSnapshot() {
return snapshot;
}
+ /**
+ * Sets an optional snapshot timestamp value used to identify the particular snapshot of the blob to get properties,
+ * metadata, and content for. The snapshot timestamp value is an opaque value returned by the server to identify a
+ * snapshot. When this option is set, only the properties, metadata, and content of the snapshot are returned.
+ *
+ * Note that this value only affects calls made on methods where this {@link GetBlobOptions} instance is passed as a
+ * parameter.
+ *
+ * @param snapshot
+ * A {@link String} containing the snapshot timestamp value of the blob snapshot to get.
+ * @return
+ * A reference to this {@link GetBlobOptions} instance.
+ */
public GetBlobOptions setSnapshot(String snapshot) {
this.snapshot = snapshot;
return this;
}
+ /**
+ * Gets the lease ID to match for the blob set in this {@link GetBlobOptions} instance.
+ *
+ * @return
+ * A {@link String} containing the lease ID set, if any.
+ */
public String getLeaseId() {
return leaseId;
}
+ /**
+ * Sets an optional lease ID value to match when getting the blob. If set, the lease must be active and the value
+ * must match the lease ID set on the leased blob for the operation to succeed.
+ *
+ * Note that this value only affects calls made on methods where this {@link GetBlobOptions} instance is passed as a
+ * parameter.
+ *
+ * @param leaseId
+ * A {@link String} containing the lease ID to set.
+ * @return
+ * A reference to this {@link GetBlobOptions} instance.
+ */
public GetBlobOptions setLeaseId(String leaseId) {
this.leaseId = leaseId;
return this;
}
+ /**
+ * Reserved for future use. Gets a flag indicating whether to return an MD5 hash for the specified range of blob
+ * content set in this {@link GetBlobOptions} instance.
+ *
+ * @return
+ * A flag value of
+ * When the computeRangeMD5 parameter is set to
+ * When this value is set, the blob content beginning at the byte offset specified by the rangeStart value
+ * and ending at the range end value, inclusive, is returned in the server response to the get blob operation. If
+ * the range end is not set, the response includes blob content from the rangeStart value to the end of the
+ * blob.
+ *
+ * Note that this value only affects calls made on methods where this {@link GetBlobOptions} instance is passed as a
+ * parameter.
+ *
+ * @param rangeStart
+ * The beginning offset value in bytes for the blob content range to return, inclusive.
+ * @return
+ * A reference to this {@link GetBlobOptions} instance.
+ */
public GetBlobOptions setRangeStart(Long rangeStart) {
this.rangeStart = rangeStart;
return this;
}
+ /**
+ * Gets the ending byte offset value for the blob content range to return set in this {@link GetBlobOptions}
+ * instance.
+ *
+ * @return
+ * The ending offset value in bytes for the blob content range to return.
+ */
public Long getRangeEnd() {
return rangeEnd;
}
+ /**
+ * Sets an optional ending byte offset value of the blob content range to return for the request, inclusive.
+ *
+ * If the range start is not set, this value is ignored and the response includes content from the entire blob.
+ *
+ * Note that this value only affects calls made on methods where this {@link GetBlobOptions} instance is passed as a
+ * parameter.
+ *
+ * @param rangeEnd
+ * The ending offset value in bytes for the blob content range to return, inclusive.
+ * @return
+ * A reference to this {@link GetBlobOptions} instance.
+ */
public GetBlobOptions setRangeEnd(Long rangeEnd) {
this.rangeEnd = rangeEnd;
return this;
}
+ /**
+ * Gets the access conditions set in this {@link GetBlobOptions} instance.
+ *
+ * @return
+ * An {@link AccessCondition} containing the access conditions set, if any.
+ */
public AccessCondition getAccessCondition() {
return accessCondition;
}
+ /**
+ * Sets optional access conditions for getting the blob. The operation will return an error if the access conditions
+ * are not met.
+ *
+ * Note that this value only affects calls made on methods where this {@link GetBlobOptions} instance is passed as a
+ * parameter.
+ *
+ * @param accessCondition
+ * An {@link AccessCondition} containing the access conditions to set.
+ * @return
+ * A reference to this {@link GetBlobOptions} instance.
+ */
public GetBlobOptions setAccessCondition(AccessCondition accessCondition) {
this.accessCondition = accessCondition;
return this;
diff --git a/microsoft-azure-api/src/main/java/com/microsoft/windowsazure/services/blob/models/GetBlobPropertiesOptions.java b/microsoft-azure-api/src/main/java/com/microsoft/windowsazure/services/blob/models/GetBlobPropertiesOptions.java
index 8c252723fc180..1e93569b8a77f 100644
--- a/microsoft-azure-api/src/main/java/com/microsoft/windowsazure/services/blob/models/GetBlobPropertiesOptions.java
+++ b/microsoft-azure-api/src/main/java/com/microsoft/windowsazure/services/blob/models/GetBlobPropertiesOptions.java
@@ -2,51 +2,122 @@
* Copyright 2011 Microsoft Corporation
*
* Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
*/
package com.microsoft.windowsazure.services.blob.models;
+import com.microsoft.windowsazure.services.blob.BlobContract;
+
+/**
+ * Represents the options that may be set on a
+ * {@link BlobContract#getBlobProperties(String, String, GetBlobPropertiesOptions) getBlobProperties} request.
+ * These options include an optional server timeout for the operation, the lease ID if the blob has an active lease, the
+ * snapshot timestamp to get the properties of a snapshot, and any access conditions for the request.
+ */
public class GetBlobPropertiesOptions extends BlobServiceOptions {
private String snapshot;
private String leaseId;
private AccessCondition accessCondition;
+ /**
+ * Sets the optional server request timeout value associated with this {@link GetBlobPropertiesOptions} instance.
+ *
+ * The timeout value only affects calls made on methods where this {@link GetBlobPropertiesOptions}
+ * instance is passed as a parameter.
+ *
+ * @param timeout
+ * The server request timeout value to set in milliseconds.
+ * @return
+ * A reference to this {@link GetBlobPropertiesOptions} instance.
+ */
@Override
public GetBlobPropertiesOptions setTimeout(Integer timeout) {
super.setTimeout(timeout);
return this;
}
+ /**
+ * Gets the snapshot timestamp value set in this {@link GetBlobPropertiesOptions} instance.
+ *
+ * @return
+ * A {@link String} containing the snapshot timestamp value of the blob snapshot to get properties for.
+ */
public String getSnapshot() {
return snapshot;
}
+ /**
+ * Sets the snapshot timestamp value used to identify the particular snapshot of the blob to get properties for. The
+ * snapshot timestamp value is an opaque value returned by the server to identify a snapshot. When this option is
+ * set, only the properties of the snapshot are returned.
+ *
+ * Note that this value only affects calls made on methods where this {@link GetBlobPropertiesOptions} instance is
+ * passed as a parameter.
+ *
+ * @param snapshot
+ * A {@link String} containing the snapshot timestamp value of the blob snapshot to get properties for.
+ * @return
+ * A reference to this {@link GetBlobPropertiesOptions} instance.
+ */
public GetBlobPropertiesOptions setSnapshot(String snapshot) {
this.snapshot = snapshot;
return this;
}
+ /**
+ * Gets the lease ID to match for the blob set in this {@link GetBlobPropertiesOptions} instance.
+ *
+ * @return
+ * A {@link String} containing the lease ID set, if any.
+ */
public String getLeaseId() {
return leaseId;
}
+ /**
+ * Sets a lease ID value to match when getting the properties of the blob. If set, the lease must be active and the
+ * value must match the lease ID set on the leased blob for the operation to succeed.
+ *
+ * Note that this value only affects calls made on methods where this {@link GetBlobPropertiesOptions} instance is
+ * passed as a parameter.
+ *
+ * @param leaseId
+ * A {@link String} containing the lease ID to set.
+ * @return
+ * A reference to this {@link GetBlobPropertiesOptions} instance.
+ */
public GetBlobPropertiesOptions setLeaseId(String leaseId) {
this.leaseId = leaseId;
return this;
}
+ /**
+ * Gets the access conditions set in this {@link GetBlobPropertiesOptions} instance.
+ *
+ * @return
+ * An {@link AccessCondition} containing the access conditions set, if any.
+ */
public AccessCondition getAccessCondition() {
return accessCondition;
}
+ /**
+ * Sets the access conditions for getting the properties of the blob. The operation will return an error if the
+ * access conditions are not met.
+ *
+ * @param accessCondition
+ * An {@link AccessCondition} containing the access conditions to set.
+ * @return
+ * A reference to this {@link GetBlobPropertiesOptions} instance.
+ */
public GetBlobPropertiesOptions setAccessCondition(AccessCondition accessCondition) {
this.accessCondition = accessCondition;
return this;
diff --git a/microsoft-azure-api/src/main/java/com/microsoft/windowsazure/services/blob/models/GetBlobPropertiesResult.java b/microsoft-azure-api/src/main/java/com/microsoft/windowsazure/services/blob/models/GetBlobPropertiesResult.java
index 9d20e5221e945..db77763781ff5 100644
--- a/microsoft-azure-api/src/main/java/com/microsoft/windowsazure/services/blob/models/GetBlobPropertiesResult.java
+++ b/microsoft-azure-api/src/main/java/com/microsoft/windowsazure/services/blob/models/GetBlobPropertiesResult.java
@@ -2,36 +2,80 @@
* Copyright 2011 Microsoft Corporation
*
* Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
*/
package com.microsoft.windowsazure.services.blob.models;
import java.util.HashMap;
+import com.microsoft.windowsazure.services.blob.BlobContract;
+
+/**
+ * A wrapper class for the response returned from a Blob Service REST API Get Blob Properties operation. This is
+ * returned by calls to implementations of {@link BlobContract#getBlobProperties(String, String)} and
+ * {@link BlobContract#getBlobProperties(String, String, GetBlobPropertiesOptions)}.
+ *
+ * See the Get Blob Properties
+ * documentation on MSDN for details of the underlying Blob Service REST API operation.
+ */
public class GetBlobPropertiesResult {
private BlobProperties properties;
private HashMap
+ * This method is invoked by the API to set the value from the Blob Service REST API operation response returned by
+ * the server.
+ *
+ * @param properties
+ * A {@link BlobProperties} instance containing the properties of the blob.
+ */
public void setProperties(BlobProperties properties) {
this.properties = properties;
}
+ /**
+ * Gets the user-defined blob metadata as a map of name and value pairs. The metadata is for client use and is
+ * opaque to the server.
+ *
+ * @return
+ * A {@link java.util.HashMap} of key-value pairs of {@link String} containing the names and values of
+ * the blob metadata.
+ */
public HashMap
+ * This method is invoked by the API to set the value from the Blob Service REST API operation response returned by
+ * the server.
+ *
+ * @param metadata
+ * A {@link java.util.HashMap} of key-value pairs of {@link String} containing the names and values
+ * of the blob metadata.
+ */
public void setMetadata(HashMap
+ * See the Get Blob documentation on
+ * MSDN for details of the underlying Blob Service REST API operation.
+ */
public class GetBlobResult {
private InputStream contentStream;
private BlobProperties properties;
private HashMap
+ * This method is invoked by the API to set the value from the Blob Service REST API operation response returned by
+ * the server.
+ *
+ * @param contentStream
+ * An {@link InputStream} instance containing the content of the blob.
+ */
public void setContentStream(InputStream contentStream) {
this.contentStream = contentStream;
}
+ /**
+ * Gets the standard HTTP properties and system properties of the blob.
+ *
+ * @return
+ * A {@link BlobProperties} instance containing the properties of the blob.
+ */
public BlobProperties getProperties() {
return properties;
}
+ /**
+ * Reserved for internal use. Sets the blob properties from the headers returned in the response.
+ *
+ * This method is invoked by the API to set the value from the Blob Service REST API operation response returned by
+ * the server.
+ *
+ * @param properties
+ * A {@link BlobProperties} instance containing the properties of the blob.
+ */
public void setProperties(BlobProperties properties) {
this.properties = properties;
}
+ /**
+ * Gets the user-defined blob metadata as a map of name and value pairs. The metadata is for client use and is
+ * opaque to the server.
+ *
+ * @return
+ * A {@link java.util.HashMap} of key-value pairs of {@link String} containing the names and values of
+ * the blob metadata.
+ */
public HashMap
+ * This method is invoked by the API to set the value from the Blob Service REST API operation response returned by
+ * the server.
+ *
+ * @param metadata
+ * A {@link java.util.HashMap} of key-value pairs of {@link String} containing the names and values
+ * of the blob metadata.
+ */
public void setMetadata(HashMap
+ * See the Get Container ACL
+ * documentation on MSDN for details of the underlying Blob Service REST API operation.
+ */
public class GetContainerACLResult {
private ContainerACL containerACL;
+ /**
+ * Gets the container's public access level and container-level access policies from the headers and body returned
+ * in the response.
+ *
+ * @return
+ * A {@link ContainerACL} instance representing the public access level and container-level access policies
+ * returned by the request.
+ */
public ContainerACL getContainerACL() {
return containerACL;
}
+ /**
+ * Reserved for internal use. Sets the container's public access level and container-level access policies from the
+ * headers and body returned in the response.
+ *
+ * This method is invoked by the API to set the value from the Blob Service REST API operation response returned by
+ * the server.
+ *
+ * @param containerACL
+ * A {@link ContainerACL} instance representing the public access level and container-level access
+ * policies returned by the request.
+ */
public void setValue(ContainerACL containerACL) {
this.containerACL = containerACL;
}
diff --git a/microsoft-azure-api/src/main/java/com/microsoft/windowsazure/services/blob/models/GetContainerPropertiesResult.java b/microsoft-azure-api/src/main/java/com/microsoft/windowsazure/services/blob/models/GetContainerPropertiesResult.java
index 24c6d318e4995..00ad2de3de558 100644
--- a/microsoft-azure-api/src/main/java/com/microsoft/windowsazure/services/blob/models/GetContainerPropertiesResult.java
+++ b/microsoft-azure-api/src/main/java/com/microsoft/windowsazure/services/blob/models/GetContainerPropertiesResult.java
@@ -2,46 +2,114 @@
* Copyright 2011 Microsoft Corporation
*
* Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
*/
package com.microsoft.windowsazure.services.blob.models;
import java.util.Date;
import java.util.HashMap;
+import com.microsoft.windowsazure.services.blob.BlobContract;
+
+/**
+ * A wrapper class for the response returned from a Blob Service REST API Get Container Properties and Get Container
+ * Metadata operations. This is returned by
+ * calls to implementations of {@link BlobContract#getContainerProperties(String)},
+ * {@link BlobContract#getContainerProperties(String, BlobServiceOptions)},
+ * {@link BlobContract#getContainerMetadata(String)}, and
+ * {@link BlobContract#getContainerMetadata(String, BlobServiceOptions)}.
+ *
+ * See the Get Container Properties and
+ * Get Container Metadata documentation
+ * on MSDN for details of the underlying Blob Service REST API operations.
+ */
public class GetContainerPropertiesResult {
private String etag;
private Date lastModified;
private HashMap
+ * This method is invoked by the API to set the value from the Blob Service REST API operation response returned by
+ * the server.
+ *
+ * @param etag
+ * A {@link String} containing the server-assigned Etag value for the container.
+ */
public void setEtag(String etag) {
this.etag = etag;
}
+ /**
+ * Gets the last modifed time of the container. This value can be used when updating or deleting a container using
+ * an optimistic concurrency model to prevent the client from modifying data that has been changed by another
+ * client.
+ *
+ * @return
+ * A {@link java.util.Date} containing the last modified time of the container.
+ */
public Date getLastModified() {
return lastModified;
}
+ /**
+ * Reserved for internal use. Sets the last modified time of the container from the
+ * Last-Modified header returned in the response.
+ *
+ * This method is invoked by the API to set the value from the Blob Service REST API operation response returned by
+ * the server.
+ *
+ * @param lastModified
+ * A {@link java.util.Date} containing the last modified time of the container.
+ */
public void setLastModified(Date lastModified) {
this.lastModified = lastModified;
}
+ /**
+ * Gets the container metadata as a map of name and value pairs. The container metadata is for client use and is
+ * opaque to the server.
+ *
+ * @return
+ * A {@link java.util.HashMap} of key-value pairs of {@link String} containing the names and values of
+ * the container metadata.
+ */
public HashMap
+ * This method is invoked by the API to set the value from the Blob Service REST API operation response returned by
+ * the server.
+ *
+ * @param metadata
+ * A {@link java.util.HashMap} of key-value pairs of {@link String} containing the names and values
+ * of the container metadata.
+ */
public void setMetadata(HashMap
+ * See the Get Blob Service Properties
+ * documentation on MSDN for details of the underlying Blob Service REST API operation.
+ */
public class GetServicePropertiesResult {
private ServiceProperties value;
+ /**
+ * Gets a {@link ServiceProperties} instance containing the service property values associated with the storage
+ * account.
+ *
+ * Modifying the values in the {@link ServiceProperties} instance returned does not affect the values associated
+ * with the storage account. To change the values in the storage account, call the
+ * {@link BlobContract#setServiceProperties} method and pass the modified {@link ServiceProperties} instance as a
+ * parameter.
+ *
+ * @return
+ * A {@link ServiceProperties} instance containing the property values associated with the storage account.
+ */
public ServiceProperties getValue() {
return value;
}
+ /**
+ * Reserved for internal use. Sets the value of the {@link ServiceProperties} instance associated with a
+ * storage service call result. This method is invoked by the API to store service properties returned by
+ * a call to a REST operation and is not intended for public use.
+ *
+ * @param value
+ * A {@link ServiceProperties} instance containing the property values associated with the storage
+ * account.
+ */
public void setValue(ServiceProperties value) {
this.value = value;
}
diff --git a/microsoft-azure-api/src/main/java/com/microsoft/windowsazure/services/blob/models/ListBlobBlocksOptions.java b/microsoft-azure-api/src/main/java/com/microsoft/windowsazure/services/blob/models/ListBlobBlocksOptions.java
index 624474ea57f74..13e7c9fe9e8e0 100644
--- a/microsoft-azure-api/src/main/java/com/microsoft/windowsazure/services/blob/models/ListBlobBlocksOptions.java
+++ b/microsoft-azure-api/src/main/java/com/microsoft/windowsazure/services/blob/models/ListBlobBlocksOptions.java
@@ -2,61 +2,156 @@
* Copyright 2011 Microsoft Corporation
*
* Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
*/
package com.microsoft.windowsazure.services.blob.models;
+import com.microsoft.windowsazure.services.blob.BlobContract;
+
+/**
+ * Represents the options that may be set on a
+ * {@link BlobContract#listBlobBlocks(String, String, ListBlobBlocksOptions) listBlobBlocks} request. These options
+ * include an optional server timeout for the operation, the lease ID if the blob has an active lease, the snapshot
+ * timestamp to get the committed blocks of a snapshot, whether to return the committed block list, and whether to
+ * return the uncommitted block list.
+ */
public class ListBlobBlocksOptions extends BlobServiceOptions {
private String leaseId;
private String snapshot;
private boolean committedList;
private boolean uncommittedList;
+ /**
+ * Sets the optional server request timeout value associated with this {@link ListBlobBlocksOptions} instance.
+ *
+ * The timeout value only affects calls made on methods where this {@link ListBlobBlocksOptions} instance
+ * is passed as a parameter.
+ *
+ * @param timeout
+ * The server request timeout value to set in milliseconds.
+ * @return
+ * A reference to this {@link ListBlobBlocksOptions} instance.
+ */
@Override
public ListBlobBlocksOptions setTimeout(Integer timeout) {
super.setTimeout(timeout);
return this;
}
+ /**
+ * Gets the lease ID to match for the blob set in this {@link ListBlobBlocksOptions} instance.
+ *
+ * @return
+ * A {@link String} containing the lease ID set, if any.
+ */
public String getLeaseId() {
return leaseId;
}
+ /**
+ * Sets a lease ID value to match when listing the blocks of the blob. If set, the lease must be active and the
+ * value must match the lease ID set on the leased blob for the operation to succeed.
+ *
+ * Note that this value only affects calls made on methods where this {@link ListBlobBlocksOptions} instance is
+ * passed as a parameter.
+ *
+ * @param leaseId
+ * A {@link String} containing the lease ID to set.
+ * @return
+ * A reference to this {@link ListBlobBlocksOptions} instance.
+ */
public ListBlobBlocksOptions setLeaseId(String leaseId) {
this.leaseId = leaseId;
return this;
}
+ /**
+ * Gets the snapshot timestamp value set in this {@link ListBlobBlocksOptions} instance.
+ *
+ * @return
+ * A {@link String} containing the snapshot timestamp value of the blob snapshot to list.
+ */
public String getSnapshot() {
return snapshot;
}
+ /**
+ * Sets the snapshot timestamp value used to identify the particular snapshot of the blob to list blocks for. The
+ * snapshot timestamp value is an opaque value returned by the server to identify a snapshot. When this option is
+ * set, only the list of committed blocks of the snapshot is returned.
+ *
+ * Note that this value only affects calls made on methods where this {@link ListBlobBlocksOptions} instance is
+ * passed as a parameter.
+ *
+ * @param snapshot
+ * A {@link String} containing the snapshot timestamp value of the blob snapshot to list.
+ * @return
+ * A reference to this {@link ListBlobBlocksOptions} instance.
+ */
public ListBlobBlocksOptions setSnapshot(String snapshot) {
this.snapshot = snapshot;
return this;
}
+ /**
+ * Gets the flag value indicating whether to return the committed blocks of the blob set in this
+ * {@link ListBlobBlocksOptions} instance.
+ *
+ * @return
+ * A
+ * Note that this value only affects calls made on methods where this {@link ListBlobBlocksOptions} instance is
+ * passed as a parameter.
+ *
+ * @param committedList
+ * Set to
+ * Note that this value only affects calls made on methods where this {@link ListBlobBlocksOptions} instance is
+ * passed as a parameter.
+ *
+ * @param uncommittedList
+ * Set to
+ * See the Get Block List documentation
+ * on MSDN for details of the underlying Blob Service REST API operation.
+ */
@XmlRootElement(name = "BlockList")
public class ListBlobBlocksResult {
private Date lastModified;
@@ -34,77 +43,214 @@ public class ListBlobBlocksResult {
private List
+ * Any operation that modifies the blob, including updates to the blob's metadata or properties, changes the last
+ * modified time of the blob. This value can be used in an access condition when updating or deleting a blob to
+ * prevent the client from modifying data that has been changed by another client.
+ *
+ * @return
+ * A {@link java.util.Date} containing the last modified time of the blob.
+ */
public Date getLastModified() {
return lastModified;
}
+ /**
+ * Reserved for internal use. Sets the last modified time of the blob from the Last-Modified
+ * header returned in the response.
+ *
+ * This method is invoked by the API to set the value from the Blob Service REST API operation response returned by
+ * the server.
+ *
+ * @param lastModified
+ * A {@link java.util.Date} containing the last modified time of the blob.
+ */
public void setLastModified(Date lastModified) {
this.lastModified = lastModified;
}
+ /**
+ * Gets the ETag of the blob. This value is returned only if the blob has committed blocks.
+ *
+ * This value can be used in an access condition when updating or deleting a blob to prevent the client from
+ * modifying data that has been changed by another client.
+ *
+ * @return
+ * A {@link String} containing the server-assigned ETag value for the blob.
+ */
public String getEtag() {
return etag;
}
+ /**
+ * Reserved for internal use. Sets the ETag of the blob from the ETag header returned in the
+ * response.
+ *
+ * This method is invoked by the API to set the value from the Blob Service REST API operation response returned by
+ * the server.
+ *
+ * @param etag
+ * A {@link String} containing the server-assigned ETag value for the blob.
+ */
public void setEtag(String etag) {
this.etag = etag;
}
+ /**
+ * Gets the MIME content type of the blob. This value defaults to application/xml.
+ *
+ * @return
+ * A {@link String} containing the MIME content type value for the blob.
+ */
public String getContentType() {
return contentType;
}
+ /**
+ * Reserved for internal use. Sets the MIME content type of the blob from the Content-Type
+ * header returned in the response.
+ *
+ * This method is invoked by the API to set the value from the Blob Service REST API operation response returned by
+ * the server.
+ *
+ * @param contentType
+ * A {@link String} containing the MIME content type value for the blob.
+ */
public void setContentType(String contentType) {
this.contentType = contentType;
}
+ /**
+ * Gets the size of the blob in bytes. For blobs with no committed blocks, this value is 0.
+ *
+ * @return
+ * The size of the blob in bytes.
+ */
public long getContentLength() {
return contentLength;
}
+ /**
+ * Reserved for internal use. Sets the content length of the blob from the x-ms-blob-content-length
+ * header returned in the response.
+ *
+ * This method is invoked by the API to set the value from the Blob Service REST API operation response returned by
+ * the server.
+ *
+ * @param contentLength
+ * The size of the blob in bytes.
+ */
public void setContentLength(long contentLength) {
this.contentLength = contentLength;
}
+ /**
+ * Gets a list of the committed blocks of the blob. This list may be empty if no blocks have been committed or if
+ * committed blocks were not specified in the request.
+ *
+ * @return
+ * A {@link List} of {@link Entry} instances representing the committed blocks of the blob.
+ */
@XmlElementWrapper(name = "CommittedBlocks")
@XmlElement(name = "Block")
public List
+ * This method is invoked by the API to set the value from the Blob Service REST API operation response returned
+ * by the server.
+ *
+ * @param blockId
+ * A {@link String} containing the client-specified block ID for the block.
+ */
public void setBlockId(String blockId) {
this.blockId = blockId;
}
+ /**
+ * Gets the length in bytes of a block list entry.
+ *
+ * @return
+ * The length of the block in bytes.
+ */
@XmlElement(name = "Size")
public long getBlockLength() {
return blockLength;
}
+ /**
+ * Reserved for internal use. Sets the length in bytes of a block list entry from the Size
+ * element in the Block element in the list in the response.
+ *
+ * This method is invoked by the API to set the value from the Blob Service REST API operation response returned
+ * by the server.
+ *
+ * @param blockLength
+ * The length of the block in bytes.
+ */
public void setBlockLength(long blockLength) {
this.blockLength = blockLength;
}
diff --git a/microsoft-azure-api/src/main/java/com/microsoft/windowsazure/services/blob/models/ListBlobRegionsOptions.java b/microsoft-azure-api/src/main/java/com/microsoft/windowsazure/services/blob/models/ListBlobRegionsOptions.java
index 916981de10f51..c944d19e596c7 100644
--- a/microsoft-azure-api/src/main/java/com/microsoft/windowsazure/services/blob/models/ListBlobRegionsOptions.java
+++ b/microsoft-azure-api/src/main/java/com/microsoft/windowsazure/services/blob/models/ListBlobRegionsOptions.java
@@ -2,18 +2,27 @@
* Copyright 2011 Microsoft Corporation
*
* Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
*/
package com.microsoft.windowsazure.services.blob.models;
+import com.microsoft.windowsazure.services.blob.BlobContract;
+
+/**
+ * Represents the options that may be set on a
+ * {@link BlobContract#listBlobRegions(String, String, ListBlobRegionsOptions) listBlobRegions} request.
+ * These options include an optional server timeout for the operation, the lease ID if the blob has an active lease, the
+ * snapshot timestamp to get the valid page ranges of a snapshot, the start offset and/or end offset to use to narrow
+ * the returned valid page range results, and any access conditions for the request.
+ */
public class ListBlobRegionsOptions extends BlobServiceOptions {
private String leaseId;
private String snapshot;
@@ -21,52 +30,162 @@ public class ListBlobRegionsOptions extends BlobServiceOptions {
private Long rangeEnd;
private AccessCondition accessCondition;
+ /**
+ * Sets the optional server request timeout value associated with this {@link ListBlobRegionsOptions} instance.
+ *
+ * The timeout value only affects calls made on methods where this {@link ListBlobRegionsOptions} instance
+ * is passed as a parameter.
+ *
+ * @param timeout
+ * The server request timeout value to set in milliseconds.
+ * @return
+ * A reference to this {@link ListBlobRegionsOptions} instance.
+ */
@Override
public ListBlobRegionsOptions setTimeout(Integer timeout) {
super.setTimeout(timeout);
return this;
}
+ /**
+ * Gets the lease ID to match for the blob set in this {@link ListBlobRegionsOptions} instance.
+ *
+ * @return
+ * A {@link String} containing the lease ID set, if any.
+ */
public String getLeaseId() {
return leaseId;
}
+ /**
+ * Sets an optional lease ID value to match when getting the valid page ranges of the blob. If set, the lease must
+ * be active and the value must match the lease ID set on the leased blob for the operation to succeed.
+ *
+ * Note that this value only affects calls made on methods where this {@link ListBlobRegionsOptions} instance is
+ * passed as a parameter.
+ *
+ * @param leaseId
+ * A {@link String} containing the lease ID to set.
+ * @return
+ * A reference to this {@link ListBlobRegionsOptions} instance.
+ */
public ListBlobRegionsOptions setLeaseId(String leaseId) {
this.leaseId = leaseId;
return this;
}
+ /**
+ * Gets the snapshot timestamp value set in this {@link ListBlobRegionsOptions} instance.
+ *
+ * @return
+ * A {@link String} containing the snapshot timestamp value of the blob snapshot to get valid page ranges
+ * for.
+ */
public String getSnapshot() {
return snapshot;
}
+ /**
+ * Sets an optional snapshot timestamp value used to identify the particular snapshot of the blob to get valid page
+ * ranges for. The snapshot timestamp value is an opaque value returned by the server to identify a snapshot. When
+ * this option is set, only the valid page ranges of the snapshot are returned.
+ *
+ * Note that this value only affects calls made on methods where this {@link ListBlobRegionsOptions} instance is
+ * passed as a parameter.
+ *
+ * @param snapshot
+ * A {@link String} containing the snapshot timestamp value of the blob snapshot to get valid page ranges
+ * for.
+ * @return
+ * A reference to this {@link ListBlobRegionsOptions} instance.
+ */
public ListBlobRegionsOptions setSnapshot(String snapshot) {
this.snapshot = snapshot;
return this;
}
+ /**
+ * Gets the beginning byte offset value of the valid page ranges to return set in this
+ * {@link ListBlobRegionsOptions} instance.
+ *
+ * @return
+ * The beginning offset value in bytes for the valid page ranges to return.
+ */
public Long getRangeStart() {
return rangeStart;
}
+ /**
+ * Sets an optional beginning byte offset value of the valid page ranges to return for the request, inclusive.
+ *
+ * If the range end is not set, the response includes valid page ranges from the rangeStart value to the
+ * end of the blob.
+ *
+ * Note that this value only affects calls made on methods where this {@link ListBlobRegionsOptions} instance is
+ * passed as a parameter.
+ *
+ * @param rangeStart
+ * The beginning offset value in bytes for the valid page ranges to return, inclusive.
+ * @return
+ * A reference to this {@link ListBlobRegionsOptions} instance.
+ */
public ListBlobRegionsOptions setRangeStart(Long rangeStart) {
this.rangeStart = rangeStart;
return this;
}
+ /**
+ * Gets the ending byte offset value for the valid page ranges to return set in this {@link ListBlobRegionsOptions}
+ * instance.
+ *
+ * @return
+ * The ending offset value in bytes for the valid page ranges to return.
+ */
public Long getRangeEnd() {
return rangeEnd;
}
+ /**
+ * Sets an optional ending byte offset value of the valid page ranges to return for the request, inclusive.
+ *
+ * If the range start is not set, this value is ignored and the response includes valid page ranges from the entire
+ * blob.
+ *
+ * Note that this value only affects calls made on methods where this {@link ListBlobRegionsOptions} instance is
+ * passed as a parameter.
+ *
+ * @param rangeEnd
+ * The ending offset value in bytes for the valid page ranges to return, inclusive.
+ * @return
+ * A reference to this {@link ListBlobRegionsOptions} instance.
+ */
public ListBlobRegionsOptions setRangeEnd(Long rangeEnd) {
this.rangeEnd = rangeEnd;
return this;
}
+ /**
+ * Gets the access conditions set in this {@link ListBlobRegionsOptions} instance.
+ *
+ * @return
+ * An {@link AccessCondition} containing the access conditions set, if any.
+ */
public AccessCondition getAccessCondition() {
return accessCondition;
}
+ /**
+ * Sets optional access conditions for getting the valid page ranges of the blob. The operation will return an error
+ * if the access conditions are not met.
+ *
+ * Note that this value only affects calls made on methods where this {@link ListBlobRegionsOptions} instance is
+ * passed as a parameter.
+ *
+ * @param accessCondition
+ * An {@link AccessCondition} containing the access conditions to set.
+ * @return
+ * A reference to this {@link ListBlobRegionsOptions} instance.
+ */
public ListBlobRegionsOptions setAccessCondition(AccessCondition accessCondition) {
this.accessCondition = accessCondition;
return this;
diff --git a/microsoft-azure-api/src/main/java/com/microsoft/windowsazure/services/blob/models/ListBlobRegionsResult.java b/microsoft-azure-api/src/main/java/com/microsoft/windowsazure/services/blob/models/ListBlobRegionsResult.java
index da1ea2e16854b..ffec19183345f 100644
--- a/microsoft-azure-api/src/main/java/com/microsoft/windowsazure/services/blob/models/ListBlobRegionsResult.java
+++ b/microsoft-azure-api/src/main/java/com/microsoft/windowsazure/services/blob/models/ListBlobRegionsResult.java
@@ -2,15 +2,15 @@
* Copyright 2011 Microsoft Corporation
*
* Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
*/
package com.microsoft.windowsazure.services.blob.models;
@@ -20,6 +20,15 @@
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
+import com.microsoft.windowsazure.services.blob.BlobContract;
+
+/**
+ * A wrapper class for the response returned from a Blob Service REST API Get Page Ranges operation. This is returned by
+ * calls to implementations of {@link BlobContract#listBlobRegions(String, String, ListBlobRegionsOptions)}.
+ *
+ * See the Get Page Ranges
+ * documentation on MSDN for details of the underlying Blob Service REST API operation.
+ */
@XmlRootElement(name = "PageList")
public class ListBlobRegionsResult {
private Date lastModified;
@@ -27,35 +36,108 @@ public class ListBlobRegionsResult {
private long contentLength;
private List
+ * Any operation that modifies the blob, including updates to the blob's metadata or properties, changes the last
+ * modified time of the blob. This value can be used in an access condition when updating or deleting a blob to
+ * prevent the client from modifying data that has been changed by another client.
+ *
+ * @return
+ * A {@link java.util.Date} containing the last modified time of the blob.
+ */
public Date getLastModified() {
return lastModified;
}
+ /**
+ * Reserved for internal use. Sets the last modified time of the blob from the Last-Modified
+ * header returned in the response.
+ *
+ * This method is invoked by the API to set the value from the Blob Service REST API operation response returned by
+ * the server.
+ *
+ * @param lastModified
+ * A {@link java.util.Date} containing the last modified time of the blob.
+ */
public void setLastModified(Date lastModified) {
this.lastModified = lastModified;
}
+ /**
+ * Gets the ETag of the blob.
+ *
+ * This value can be used in an access condition when updating or deleting a blob to prevent the client from
+ * modifying data that has been changed by another client.
+ *
+ * @return
+ * A {@link String} containing the server-assigned ETag value for the blob.
+ */
public String getEtag() {
return etag;
}
+ /**
+ * Reserved for internal use. Sets the ETag of the blob from the ETag header returned in the
+ * response.
+ *
+ * This method is invoked by the API to set the value from the Blob Service REST API operation response returned by
+ * the server.
+ *
+ * @param etag
+ * A {@link String} containing the server-assigned ETag value for the blob.
+ */
public void setEtag(String etag) {
this.etag = etag;
}
+ /**
+ * Gets the size of the blob in bytes.
+ *
+ * @return
+ * The size of the blob in bytes.
+ */
public long getContentLength() {
return contentLength;
}
+ /**
+ * Reserved for internal use. Sets the content length of the blob from the x-ms-blob-content-length
+ * header returned in the response.
+ *
+ * This method is invoked by the API to set the value from the Blob Service REST API operation response returned by
+ * the server.
+ *
+ * @param contentLength
+ * The size of the blob in bytes.
+ */
public void setContentLength(long contentLength) {
this.contentLength = contentLength;
}
+ /**
+ * Gets the list of non-overlapping valid page ranges in the blob that match the parameters of the request, sorted
+ * by increasing address page range.
+ *
+ * @return
+ * A {@link List} of {@link PageRange} instances containing the valid page ranges for the blob.
+ */
@XmlElement(name = "PageRange")
public List
+ * This method is invoked by the API to set the value from the Blob Service REST API operation response returned by
+ * the server.
+ *
+ * @param pageRanges
+ * A {@link List} of {@link PageRange} instances containing the valid page ranges for the blob.
+ */
public void setPageRanges(List
+ * The timeout value only affects calls made on methods where this {@link ListBlobsOptions} instance is
+ * passed as a parameter.
+ *
+ * @param timeout
+ * The server request timeout value to set in milliseconds.
+ * @return
+ * A reference to this {@link ListBlobsOptions} instance.
+ */
@Override
public ListBlobsOptions setTimeout(Integer timeout) {
super.setTimeout(timeout);
return this;
}
+ /**
+ * Gets the prefix filter associated with this {@link ListBlobsOptions} instance. This value is used to return only
+ * blobs beginning with the prefix from the container in methods where this {@link ListBlobsOptions} instance is
+ * passed as a parameter.
+ *
+ * @return
+ * A {@link String} containing the prefix used to filter the blob names returned, if any.
+ */
public String getPrefix() {
return prefix;
}
+ /**
+ * Sets the optional blob name prefix filter value to use in a request. If this value is set, the server will return
+ * only blob names that match the prefix value in the response.
+ *
+ * The prefix value only affects calls made on methods where this {@link ListBlobsOptions} instance is
+ * passed as a parameter.
+ *
+ * @param prefix
+ * A {@link String} containing a prefix to use to filter the blob names returned.
+ */
public ListBlobsOptions setPrefix(String prefix) {
this.prefix = prefix;
return this;
}
+ /**
+ * Gets the marker value set in this {@link ListBlobsOptions} instance. If this value is set, the server will return
+ * blob names beginning at the specified marker in the response.
+ *
+ * @return
+ * A {@link String} containing the marker value to use to specify the beginning of the request results, if
+ * any.
+ */
public String getMarker() {
return marker;
}
+ /**
+ * Sets the optional marker value to use in a request. If this value is set, the server will return blob names
+ * beginning at the specified marker in the response. Leave this value unset for an initial request.
+ *
+ * The List Blobs operation returns a marker value in a NextMarker element if the blob list
+ * returned is not complete. The marker value may then be used in a subsequent call to request the next set of blob
+ * list items. The marker value is opaque to the client.
+ *
+ * Use the {@link ListBlobsResult#getNextMarker() getNextMarker} method on a {@link ListBlobsResult} instance to get
+ * the marker value to set on a {@link ListBlobsOptions} instance using a call to this method. Pass the
+ * {@link ListBlobsOptions} instance as a parameter to a {@link BlobContract#listBlobs(String, ListBlobsOptions)}
+ * call to get the next portion of the blob list.
+ *
+ * The marker value only affects calls made on methods where this {@link ListBlobsOptions} instance is
+ * passed as a parameter.
+ *
+ * @param marker
+ * A {@link String} containing the marker value to use to specify the beginning of the request results.
+ * @return
+ * A reference to this {@link ListBlobsOptions} instance.
+ */
public ListBlobsOptions setMarker(String marker) {
this.marker = marker;
return this;
}
+ /**
+ * Gets the value of the maximum number of results to return set in this {@link ListBlobsOptions} instance.
+ *
+ * @return
+ * The maximum number of results to return. If the value is zero, the server will return up to 5,000 items.
+ */
public int getMaxResults() {
return maxResults;
}
+ /**
+ * Sets the optional maximum number of results to return for a request. If this value is set, the server will return
+ * up to this number of blob and blob prefix results in the response. If a value is not specified, or a value
+ * greater than 5,000 is specified, the server will return up to 5,000 items.
+ *
+ * If there are more blobs and blob prefixes that can be returned than this maximum, the server returns a marker
+ * value in a NextMarker element in the response. The marker value may then be used in a subsequent
+ * call to request the next set of blob list items. The marker value is opaque to the client.
+ *
+ * Use the {@link ListBlobsResult#getNextMarker() getNextMarker} method on a {@link ListBlobsResult} instance to get
+ * the marker value to set on a {@link ListBlobsOptions} instance using a call to
+ * {@link ListBlobsOptions#setMarker(String)}. Pass the {@link ListBlobsOptions} instance as a parameter to a
+ * {@link BlobContract#listBlobs(String, ListBlobsOptions)} call to get the next portion of the blob list.
+ *
+ * The maxResults value only affects calls made on methods where this {@link ListBlobsOptions} instance is
+ * passed as a parameter.
+ *
+ * @param maxResults
+ * The maximum number of results to return.
+ * @return
+ * A reference to this {@link ListBlobsOptions} instance.
+ */
public ListBlobsOptions setMaxResults(int maxResults) {
this.maxResults = maxResults;
return this;
}
+ /**
+ * Gets the value of the delimiter to use for grouping virtual blob hierarchy set in this {@link ListBlobsOptions}
+ * instance.
+ *
+ * @return
+ * A {@link String} containing the delimiter value, if any.
+ */
public String getDelimiter() {
return delimiter;
}
+ /**
+ * Sets the value of the optional delimiter to use for grouping in a virtual blob hierarchy.
+ *
+ * When the request includes this optional parameter, the operation returns a blob prefix in a
+ * BlobPrefix element in the response that acts as a placeholder for all blobs whose names begin
+ * with the same substring up to the appearance of the delimiter character. The delimiter may be a single character
+ * or a string.
+ *
+ * The delimiter parameter enables the caller to traverse the blob namespace by using a user-configured
+ * delimiter. In this way, you can traverse a virtual hierarchy of blobs as though it were a file system. The
+ * delimiter is a string that may be one or more characters long. When the request includes this parameter, the
+ * operation response includes one BlobPrefix element for each set of blobs whose names begin with
+ * a common substring up to the first appearance of the delimiter string that comes after any prefix specified for
+ * the request. The value of the BlobPrefix element is
+ * The BlobPrefix elements in the response are accessed with the
+ * {@link ListBlobsResult#getBlobPrefixes()} method. You can use each value in the list returned to make a list
+ * blobs request for the blobs that begin with that blob prefix value, by specifying the value as the prefix option
+ * with a call to the {@link ListBlobsOptions#setPrefix(String) setPrefix} method on a {@link ListBlobsOptions}
+ * instance passed as a parameter to the request.
+ *
+ * Note that each blob prefix returned in the response counts toward the maximum number of blob results, just as
+ * each blob does.
+ *
+ * Note that if a delimiter is set, you cannot include snapshots. A request that includes both returns an
+ * InvalidQueryParameter error (HTTP status code 400 – Bad Request), which causes a {@link ServiceException} to be
+ * thrown.
+ *
+ * The delimiter value only affects calls made on methods where this {@link ListBlobsOptions} instance is
+ * passed as a parameter.
+ *
+ * @param delimiter
+ * A {@link String} containing the delimiter value to use for grouping virtual blob hierarchy.
+ * @return
+ * A reference to this {@link ListBlobsOptions} instance.
+ */
public ListBlobsOptions setDelimiter(String delimiter) {
this.delimiter = delimiter;
return this;
}
+ /**
+ * Gets the value of a flag indicating whether to include blob metadata with a response set in this
+ * {@link ListBlobsOptions} instance.
+ *
+ * @return
+ * A value of
+ * Note that if this flag is set, you cannot set a delimiter. A request that includes both returns an
+ * InvalidQueryParameter error (HTTP status code 400 – Bad Request), which causes a {@link ServiceException} to be
+ * thrown.
+ *
+ * @param includeSnapshots
+ * Set a value of
+ * See the Get Blobs documentation on
+ * MSDN for details of the underlying Blob Service REST API operation.
+ */
@XmlRootElement(name = "EnumerationResults")
public class ListBlobsResult {
private List
+ * This list may contain only a portion of the blob prefix entries that satisfy the request, limited by a server
+ * timeout or a maximum results parameter. If there are more blob entries and blob prefix entries that could satisfy
+ * the result, the server returns a NextMarker element with the response.
+ *
+ * The delimiter option enables the caller to traverse the blob namespace by using a user-configured delimiter. In
+ * this way, you can traverse a virtual hierarchy of blobs as though it were a file system. The delimiter may be a
+ * single character or a string. When the request includes the delimiter option, the response includes a
+ *
+ * To move down a level in the virtual hierarchy, you can use the {@link BlobPrefixEntry#getName()} method to get
+ * the prefix value to use to make a subsequent call to list blobs that begin with this prefix.
+ *
+ * Use the {@link ListBlobsResult#getNextMarker() getNextMarker} method to get this value and pass it as a marker
+ * option to a subsequent list blobs request to get the next set of blob results.
+ *
+ * Blobs are listed in alphabetical order in the response body, with upper-case letters listed first.
+ *
+ * @return
+ * A {@link List} of {@link BlobEntry} instances for the blobs that satisfied the request.
+ */
public List
+ * Use the {@link ListBlobsResult#getNextMarker() getNextMarker} method to get this value and pass it as a marker
+ * option to a subsequent list blobs request to get the next set of blob results.
+ *
+ * Blobs are listed in alphabetical order in the response body, with upper-case letters listed first.
+ *
+ * @return
+ * A {@link List} of {@link BlobEntry} instances for the blobs that satisfied the request.
+ */
public List
+ * This method is invoked by the API to set the value from the Blob Service REST API operation response returned by
+ * the server.
+ *
+ * @param prefix
+ * A {@link String} containing the prefix used to filter the blob names returned, if any.
+ */
public void setPrefix(String prefix) {
this.prefix = prefix;
}
+ /**
+ * Gets the value of the marker that was used to specify the beginning of the container list to return with the
+ * request. This value is not set if a marker was not specified in the request.
+ *
+ * The list blobs operation returns a marker value in a NextMarker element if the blob list
+ * returned is not complete. The marker value may then be used in a subsequent call to request the next set of blob
+ * list items. The marker value is opaque to the client.
+ *
+ * Use the {@link ListBlobsResult#getNextMarker() getNextMarker} method to get the marker value to set on a
+ * {@link ListBlobsOptions} instance using a call to {@link ListBlobsOptions#setMarker(String)}. Pass the
+ * {@link ListBlobsOptions} instance as a parameter to a {@link BlobContract#listBlobs(String, ListBlobsOptions)
+ * listBlobs} call to get the next portion of the blob list.
+ *
+ * @return
+ * A {@link String} containing the marker used to specify the beginning of the blob list returned, if any.
+ */
@XmlElement(name = "Marker")
public String getMarker() {
return marker;
}
+ /**
+ * Reserved for internal use. Sets the marker used to specify the beginning of the blob list to return from the
+ * Marker element returned in the response.
+ *
+ * This method is invoked by the API to set the value from the Blob Service REST API operation response returned by
+ * the server.
+ *
+ * @param marker
+ * A {@link String} containing the marker used to specify the beginning of the blob list returned.
+ */
public void setMarker(String marker) {
this.marker = marker;
}
+ /**
+ * Gets the next marker value needed to specify the beginning of the next portion of the blob list to return, if any
+ * was set in the response from the server.
+ *
+ * The list blobs operation returns a marker value in a NextMarker element if the blob list
+ * returned is not complete. The marker value may then be used in a subsequent call to request the next set of blob
+ * list items. The marker value is opaque to the client.
+ *
+ * Use the {@link ListBlobsResult#getNextMarker() getNextMarker} method to get the marker value to set on a
+ * {@link ListBlobsOptions} instance using a call to {@link ListBlobsOptions#setMarker(String)}. Pass the
+ * {@link ListBlobsOptions} instance as a parameter to a {@link BlobContract#listBlobs(String, ListBlobsOptions)
+ * listBlobs} call to get the next portion of the blob list.
+ *
+ * @return
+ * A {@link String} containing the next marker value needed to specify the beginning of the next portion
+ * of the blob list to return, if any was set in the response from the server.
+ */
@XmlElement(name = "NextMarker")
public String getNextMarker() {
return nextMarker;
}
+ /**
+ * Reserved for internal use. Sets the next marker value needed to specify the beginning of the next portion of the
+ * blob list to return from the NextMarker element returned in the response.
+ *
+ * This method is invoked by the API to set the value from the Blob Service REST API operation response returned by
+ * the server.
+ *
+ * @param nextMarker
+ * A {@link String} containing the next marker value needed to specify the beginning of the next portion
+ * of the blob list to return.
+ */
public void setNextMarker(String nextMarker) {
this.nextMarker = nextMarker;
}
+ /**
+ * Gets the maximum results to return used to generate the response, if present. The number of entries returned in
+ * the response will not exceed this number, including all BlobPrefix elements. This value is not
+ * set if a maximum number was not specified in the request. If the request does not specify this parameter or
+ * specifies a value greater than 5,000, the server will return up to 5,000 items. If there are more blobs or blob
+ * prefixes that satisfy the request than this maximum value, the server will include a next marker value in the
+ * response, which can be used to get the remaining blobs with a subsequent request.
+ *
+ * Use the {@link ListBlobsResult#getNextMarker() getNextMarker} method to get the marker value to set on a
+ * {@link ListBlobsOptions} instance using a call to {@link ListBlobsOptions#setMarker(String)}. Pass the
+ * {@link ListBlobsOptions} instance as a parameter to a {@link BlobContract#listBlobs(String, ListBlobsOptions)
+ * listBlobs} call to get the next portion of the blob list.
+ *
+ * @return
+ * The maximum results to return value in the response, if any.
+ */
@XmlElement(name = "MaxResults")
public int getMaxResults() {
return maxResults;
}
+ /**
+ * Reserved for internal use. Sets the maximum results to return value from the MaxResults element
+ * of the EnumerationResults element returned in the response.
+ *
+ * This method is invoked by the API to set the value from the Blob Service REST API operation response returned by
+ * the server.
+ *
+ * @param maxResults
+ * The maximum results to return value in the response, if any.
+ */
public void setMaxResults(int maxResults) {
this.maxResults = maxResults;
}
+ /**
+ * Gets the delimiter value used to generate the response, if present. When the request includes this parameter, the
+ * operation returns BlobPrefix elements in the response body that act as a placeholder for all
+ * blobs whose names begin with the same substring up to the appearance of the delimiter character.
+ *
+ * @return
+ * A {@link String} containing the delimiter value used as a request parameter.
+ */
@XmlElement(name = "Delimiter")
public String getDelimiter() {
return delimiter;
}
+ /**
+ * Reserved for internal use. Sets the delimiter value from the Delimiter element of the
+ * EnumerationResults element returned in the response.
+ *
+ * This method is invoked by the API to set the value from the Blob Service REST API operation response returned by
+ * the server.
+ *
+ * @param delimiter
+ * A {@link String} containing the delimiter value in the response, if any.
+ */
public void setDelimiter(String delimiter) {
this.delimiter = delimiter;
}
+ /**
+ * Gets the container URI. This value is returned in the ContainerName attribute of the
+ * EnumerationResults element returned in the response.
+ *
+ * @return
+ * A {@link String} containing the container URI.
+ */
@XmlAttribute(name = "ContainerName")
public String getContainerName() {
return containerName;
}
+ /**
+ * Reserved for internal use. Sets the container URI value from the ContainerName attribute of the
+ * EnumerationResults element returned in the response.
+ *
+ * This method is invoked by the API to set the value from the Blob Service REST API operation response returned by
+ * the server.
+ *
+ * @param containerName
+ * A {@link String} containing the container URI.
+ */
public void setContainerName(String containerName) {
this.containerName = containerName;
}
+ /**
+ * The abstract base class for
+ * This method is invoked by the API to set the value from the Blob Service REST API operation response returned
+ * by the server.
+ *
+ * @param name
+ * A {@link String} containing the value of the Name element within a
+ * BlobPrefix element.
+ */
public void setName(String name) {
this.name = name;
}
}
+ /**
+ * Represents a Blob element returned in the response. A
+ * This method is invoked by the API to set the value from the Blob Service REST API operation response returned
+ * by the server.
+ *
+ * @param name
+ * A {@link String} containing the value of the Name element within a
+ * Blob element.
+ */
public void setName(String name) {
this.name = name;
}
+ /**
+ * Gets the value of the Url element within a Blob element returned in
+ * the response. The value of the element is the complete URI address of the blob, including any virtual
+ * hierarchy.
+ *
+ * @return
+ * A {@link String} containing the complete URI address of the blob.
+ */
@XmlElement(name = "Url")
public String getUrl() {
return url;
}
+ /**
+ * Reserved for internal use. Sets the blob URI address from the Uri element in the
+ * Blob element in the Blobs list in the response.
+ *
+ * This method is invoked by the API to set the value from the Blob Service REST API operation response returned
+ * by the server.
+ *
+ * @param url
+ * A {@link String} containing the complete URI address of the blob.
+ */
public void setUrl(String url) {
this.url = url;
}
+ /**
+ * Gets a {@link BlobProperties} instance with the blob properties returned in the response.
+ *
+ * @return
+ * A {@link BlobProperties} instance with the blob properties returned in the response.
+ */
@XmlElement(name = "Properties")
public BlobProperties getProperties() {
return properties;
}
+ /**
+ * Reserved for internal use. Sets the blob properties from the Uri element in the
+ * Blob element in the Blobs list in the response.
+ *
+ * This method is invoked by the API to set the value from the Blob Service REST API operation response returned
+ * by the server.
+ *
+ * @param properties
+ * A {@link BlobProperties} instance with the blob properties returned in the response.
+ */
public void setProperties(BlobProperties properties) {
this.properties = properties;
}
+ /**
+ * Gets the snapshot timestamp value for a blob snapshot returned in the response. The value is set from the
+ * Snapshot element in the Blob element in the Blobs list in
+ * the response. Snapshots are included in the enumeration only if specified in the request options. Snapshots
+ * are listed from oldest to newest in the response.
+ *
+ * @return
+ * A {@link String} containing the snapshot timestamp of the blob snapshot.
+ */
@XmlElement(name = "Snapshot")
public String getSnapshot() {
return snapshot;
}
+ /**
+ * Reserved for internal use. Sets the blob snapshot timestamp from the Snapshot element in the
+ * Blob element in the Blobs list in the response.
+ *
+ * This method is invoked by the API to set the value from the Blob Service REST API operation response returned
+ * by the server.
+ *
+ * @param snapshot
+ * A {@link String} containing the snapshot timestamp of the blob snapshot.
+ */
public void setSnapshot(String snapshot) {
this.snapshot = snapshot;
}
+ /**
+ * Gets the blob's metadata collection set in the Metadata element in the Blob
+ * element in the Blobs list in the response. Metadata is included in the enumeration only if
+ * specified in the request options.
+ *
+ * @return
+ * A {@link HashMap} of name-value pairs of {@link String} containing the blob metadata set, if any.
+ */
@XmlElement(name = "Metadata")
@XmlJavaTypeAdapter(MetadataAdapter.class)
public HashMap
+ * This method is invoked by the API to set the value from the Blob Service REST API operation response returned
+ * by the server.
+ *
+ * @param metadata
+ * A {@link java.util.HashMap} of name-value pairs of {@link String} containing the names and values
+ * of the blob metadata, if present.
+ */
public void setMetadata(HashMap
+ * The timeout value only affects calls made on methods where this {@link ListContainersOptions} instance
+ * is passed as a parameter.
+ *
+ * @param timeout
+ * The server request timeout value to set in milliseconds.
+ * @return
+ * A reference to this {@link ListContainersOptions} instance.
+ */
@Override
public ListContainersOptions setTimeout(Integer timeout) {
super.setTimeout(timeout);
return this;
}
+ /**
+ * Gets the container name prefix filter value set in this {@link ListContainersOptions} instance.
+ *
+ * @return
+ * A {@link String} containing the container name prefix value, if any.
+ */
public String getPrefix() {
return prefix;
}
+ /**
+ * Sets the optional container name prefix filter value to use in a request. If this value is set, the server will
+ * return only container names that match the prefix value in the response.
+ *
+ * The prefix value only affects calls made on methods where this {@link ListContainersOptions} instance is
+ * passed as a parameter.
+ *
+ * @param prefix
+ * A {@link String} containing the container name prefix value to use to filter the request results.
+ * @return
+ * A reference to this {@link ListContainersOptions} instance.
+ */
public ListContainersOptions setPrefix(String prefix) {
this.prefix = prefix;
return this;
}
+ /**
+ * Gets the marker value set in this {@link ListContainersOptions} instance.
+ *
+ * @return
+ * A {@link String} containing the marker value to use to specify the beginning of the request results.
+ */
public String getMarker() {
return marker;
}
+ /**
+ * Sets the optional marker value to use in a request. If this value is set, the server will return container names
+ * beginning at the specified marker in the response.
+ *
+ * The List Containers operation returns a marker value in a NextMarker element if the container
+ * list returned is not complete. The marker value may then be used in a subsequent call to request the next set of
+ * container list items. The marker value is opaque to the client.
+ *
+ * Use the {@link ListContainersResult#getNextMarker() getNextMarker} method on a {@link ListContainersResult}
+ * instance to get the marker value to set on a {@link ListContainersOptions} instance using a call to this method.
+ * Pass the {@link ListContainersOptions} instance as a parameter to a
+ * {@link BlobContract#listContainers(listContainersOptions)} call to get the next portion of the container list.
+ *
+ * The marker value only affects calls made on methods where this {@link ListContainersOptions} instance is
+ * passed as a parameter.
+ *
+ * @param marker
+ * A {@link String} containing the marker value to use to specify the beginning of the request results.
+ * @return
+ * A reference to this {@link ListContainersOptions} instance.
+ */
public ListContainersOptions setMarker(String marker) {
this.marker = marker;
return this;
}
+ /**
+ * Gets the value of the maximum number of results to return set in this {@link ListContainersOptions} instance.
+ *
+ * @return
+ * The maximum number of results to return.
+ */
public int getMaxResults() {
return maxResults;
}
+ /**
+ * Sets the optional maximum number of results to return for a request. If this value is set, the server will return
+ * up to this number of results in the response. If a value is not specified, or a value greater than 5,000 is
+ * specified, the server will return up to 5,000 items.
+ *
+ * If there are more containers than this value that can be returned, the server returns a marker value in a
+ * NextMarker element in the response. The marker value may then be used in a subsequent call to
+ * request the next set of container list items. The marker value is opaque to the client.
+ *
+ * Use the {@link ListContainersResult#getNextMarker() getNextMarker} method on a {@link ListContainersResult}
+ * instance to get the marker value to set on a {@link ListContainersOptions} instance using a call to
+ * {@link ListContainersOptions#setMarker(String)}. Pass the {@link ListContainersOptions} instance as a parameter
+ * to a {@link BlobContract#listContainers(listContainersOptions)} call to get the next portion of the container
+ * list.
+ *
+ * The maxResults value only affects calls made on methods where this {@link ListContainersOptions}
+ * instance is passed as a parameter.
+ *
+ * @param maxResults
+ * The maximum number of results to return.
+ * @return
+ * A reference to this {@link ListContainersOptions} instance.
+ */
public ListContainersOptions setMaxResults(int maxResults) {
this.maxResults = maxResults;
return this;
}
+ /**
+ * Gets the value of a flag set in this {@link ListContainersOptions} instance indicating whether to include
+ * container metadata in the response to the request.
+ *
+ * @return
+ *
+ * The includeMetadata value only affects calls made on methods where this {@link ListContainersOptions}
+ * instance is passed as a parameter.
+ *
+ * @param includeMetadata
+ * Set to
+ * See the List Containers
+ * documentation on MSDN for details of the underlying Blob Service REST API operation.
+ */
@XmlRootElement(name = "EnumerationResults")
public class ListContainersResult {
private List
+ * This method is invoked by the API to set the value from the Blob Service REST API operation response returned by
+ * the server.
+ *
+ * @param value
+ * A {@link List} of {@link Container} instances representing the blob containers returned by the
+ * request.
+ */
public void setContainers(List
+ * This method is invoked by the API to set the value from the Blob Service REST API operation response returned by
+ * the server.
+ *
+ * @param accountName
+ * A {@link String} containing the base URI for Blob Service REST API operations on the storage account.
+ */
public void setAccountName(String accountName) {
this.accountName = accountName;
}
+ /**
+ * Gets the value of the filter used to return only containers beginning with the prefix. This value is not
+ * set if a prefix was not specified in the list containers request.
+ *
+ * @return
+ * A {@link String} containing the prefix used to filter the container names returned, if any.
+ */
@XmlElement(name = "Prefix")
public String getPrefix() {
return prefix;
}
+ /**
+ * Reserved for internal use. Sets the filter used to return only containers beginning with the prefix from the
+ * Prefix element returned in the response.
+ *
+ * This method is invoked by the API to set the value from the Blob Service REST API operation response returned by
+ * the server.
+ *
+ * @param prefix
+ * A {@link String} containing the prefix used to filter the container names returned, if any.
+ */
public void setPrefix(String prefix) {
this.prefix = prefix;
}
+ /**
+ * Gets the value of the marker that was used to specify the beginning of the container list to return with the
+ * request. This value is not set if a marker was not specified in the request.
+ *
+ * The List Containers operation returns a marker value in a NextMarker element if the container
+ * list returned is not complete. The marker value may then be used in a subsequent call to request the next set of
+ * container list items. The marker value is opaque to the client.
+ *
+ * Use the {@link ListContainersResult#getNextMarker() getNextMarker} method to get the marker value to set on a
+ * {@link ListContainersOptions} instance using a call to {@link ListContainersOptions#setMarker(String)}. Pass the
+ * {@link ListContainersOptions} instance as a parameter to a
+ * {@link BlobContract#listContainers(listContainersOptions)} call to get the next portion of the container list.
+ *
+ * @return
+ * A {@link String} containing the marker used to specify the beginning of the container list returned, if
+ * any.
+ */
@XmlElement(name = "Marker")
public String getMarker() {
return marker;
}
+ /**
+ * Reserved for internal use. Sets the marker used to specify the beginning of the container list to return from the
+ * Marker element returned in the response.
+ *
+ * This method is invoked by the API to set the value from the Blob Service REST API operation response returned by
+ * the server.
+ *
+ * @param marker
+ * A {@link String} containing the marker used to specify the beginning of the container list returned.
+ */
public void setMarker(String marker) {
this.marker = marker;
}
+ /**
+ * Gets the next marker value needed to specify the beginning of the next portion of the container list to return,
+ * if any was set in the response from the server.
+ *
+ * The List Containers operation returns a marker value in a NextMarker element if the container
+ * list returned is not complete. The marker value may then be used in a subsequent call to request the next set of
+ * container list items. The marker value is opaque to the client.
+ *
+ * Use the {@link ListContainersResult#getNextMarker() getNextMarker} method to get the marker value to set on a
+ * {@link ListContainersOptions} instance using a call to {@link ListContainersOptions#setMarker(String)}. Pass the
+ * {@link ListContainersOptions} instance as a parameter to a
+ * {@link BlobContract#listContainers(ListContainersOptions)} call to get the next portion of the container list.
+ *
+ * @return
+ * A {@link String} containing the next marker value needed to specify the beginning of the next portion
+ * of the container list to return, if any was set in the response from the server.
+ */
@XmlElement(name = "NextMarker")
public String getNextMarker() {
return nextMarker;
}
+ /**
+ * Reserved for internal use. Sets the next marker value needed to specify the beginning of the next portion of the
+ * container list to return from the NextMarker element returned in the response.
+ *
+ * This method is invoked by the API to set the value from the Blob Service REST API operation response returned by
+ * the server.
+ *
+ * @param nextMarker
+ * A {@link String} containing the next marker value needed to specify the beginning of the next portion
+ * of the container list to return.
+ */
public void setNextMarker(String nextMarker) {
this.nextMarker = nextMarker;
}
+ /**
+ * Gets the maximum number of container list items to return that was specified in the request. The number of
+ * containers returned in a single response will not exceed this value. This value is not set if a maximum number
+ * was not specified in the request. If there are more containers that satisfy the request than this maximum value,
+ * the server will include a next marker value in the response, which can be used to get the remaining containers
+ * with a subsequent request.
+ *
+ * Use the {@link ListContainersResult#getNextMarker() getNextMarker} method to get the marker value to set on a
+ * {@link ListContainersOptions} instance using a call to {@link ListContainersOptions#setMarker(String)}. Pass the
+ * {@link ListContainersOptions} instance as a parameter to a
+ * {@link BlobContract#listContainers(listContainersOptions)} call to get the next portion of the container list.
+ *
+ * @return
+ * The maximum number of container list items to return that was specified in the request, if any.
+ */
@XmlElement(name = "MaxResults")
public int getMaxResults() {
return maxResults;
}
+ /**
+ * Reserved for internal use. Sets the maximum number of container list items to return that was specified in the
+ * request from the MaxResults element returned in the response.
+ *
+ * This method is invoked by the API to set the value from the Blob Service REST API operation response returned by
+ * the server.
+ *
+ * @param maxResults
+ * The maximum number of container list items to return that was specified in the request, if any.
+ */
public void setMaxResults(int maxResults) {
this.maxResults = maxResults;
}
+ /**
+ * Represents a container for blob storage returned by the server. A {@link Container} instance contains a copy of
+ * the container properties and metadata in the storage service as of the time the container list was requested.
+ */
public static class Container {
private String name;
private String url;
private HashMap
+ * This method is invoked by the API to set the value from the Blob Service REST API operation response returned
+ * by the server.
+ *
+ * @param name
+ * A {@link String} containing the name of the container.
+ */
public void setName(String name) {
this.name = name;
}
+ /**
+ * Gets the URI of the container.
+ *
+ * @return
+ * A {@link String} containing the URI of the container.
+ */
@XmlElement(name = "Url")
public String getUrl() {
return url;
}
+ /**
+ * Reserved for internal use. Sets the URI of the container from the Url element returned in
+ * the response.
+ *
+ * This method is invoked by the API to set the value from the Blob Service REST API operation response returned
+ * by the server.
+ *
+ * @param url
+ * A {@link String} containing the URI of the container.
+ */
public void setUrl(String url) {
this.url = url;
}
+ /**
+ * Gets the container properties. The container properties include the last modified time and an Etag value.
+ *
+ * @return
+ * A {@link ContainerProperties} instance containing the properties associated with the container.
+ */
@XmlElement(name = "Properties")
public ContainerProperties getProperties() {
return properties;
}
+ /**
+ * Reserved for internal use. Sets the container properties from the Properties element
+ * returned in the response.
+ *
+ * This method is invoked by the API to set the value from the Blob Service REST API operation response returned
+ * by the server.
+ *
+ * @param properties
+ * A {@link ContainerProperties} instance containing the properties associated with the container.
+ */
public void setProperties(ContainerProperties properties) {
this.properties = properties;
}
+ /**
+ * Gets the container metadata as a map of name and value pairs. The container metadata is for client use and is
+ * opaque to the server.
+ *
+ * @return
+ * A {@link java.util.HashMap} of key-value pairs of {@link String} containing the names and values of
+ * the container metadata.
+ */
@XmlElement(name = "Metadata")
@XmlJavaTypeAdapter(MetadataAdapter.class)
public HashMap
+ * This method is invoked by the API to set the value from the Blob Service REST API operation response returned
+ * by the server.
+ *
+ * @param metadata
+ * A {@link java.util.HashMap} of key-value pairs of {@link String} containing the names and values
+ * of the container metadata.
+ */
public void setMetadata(HashMap
+ * This method is invoked by the API to set the value from the Blob Service REST API operation response returned
+ * by the server.
+ *
+ * @param lastModified
+ * A {@link java.util.Date} containing the last modified time of the container.
+ */
public void setLastModified(Date lastModified) {
this.lastModified = lastModified;
}
+ /**
+ * Gets the Etag of the container. This value can be used when updating or deleting a container using an
+ * optimistic concurrency model to prevent the client from modifying data that has been changed by another
+ * client.
+ *
+ * @return
+ * A {@link String} containing the server-assigned Etag value for the container.
+ */
@XmlElement(name = "Etag")
public String getEtag() {
return etag;
}
+ /**
+ * Reserved for internal use. Sets the Etag of the container from the Etag element returned in
+ * the response.
+ *
+ * This method is invoked by the API to set the value from the Blob Service REST API operation response returned
+ * by the server.
+ *
+ * @param etag
+ * A {@link String} containing the server-assigned Etag value for the container.
+ */
public void setEtag(String etag) {
this.etag = etag;
}
diff --git a/microsoft-azure-api/src/main/java/com/microsoft/windowsazure/services/blob/models/PageRange.java b/microsoft-azure-api/src/main/java/com/microsoft/windowsazure/services/blob/models/PageRange.java
index afef6edd6096b..1af40b003e052 100644
--- a/microsoft-azure-api/src/main/java/com/microsoft/windowsazure/services/blob/models/PageRange.java
+++ b/microsoft-azure-api/src/main/java/com/microsoft/windowsazure/services/blob/models/PageRange.java
@@ -2,56 +2,132 @@
* Copyright 2011 Microsoft Corporation
*
* Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
*/
package com.microsoft.windowsazure.services.blob.models;
import javax.xml.bind.annotation.XmlElement;
+/**
+ * Represents the range of bytes in a single page within a page blob.
+ *
+ * For a page update operation, the page range can be up to 4 MB in size. For a page clear operation, the page range can
+ * be up to the value of the blob's full size.
+ *
+ * Pages are aligned with 512-byte boundaries. When specifying a page range, the start offset must be a modulus of 512
+ * and the end offset must be a modulus of 512 – 1. Examples of valid byte ranges are 0-511, 512-1023, etc.
+ */
public class PageRange {
private long start;
private long end;
+ /**
+ * Default constructor. The start and end values must be set for this {@link PageRange} instance to be valid.
+ */
public PageRange() {
}
+ /**
+ * Creates a page range from the specified start and end byte offsets, inclusive.
+ *
+ * Pages are aligned with 512-byte boundaries. When specifying a page range, the start offset must be a modulus of
+ * 512 and the end offset must be a modulus of 512 – 1. Examples of valid byte ranges are 0-511, 512-1023, etc.
+ *
+ * @param start
+ * The beginning offset value in bytes for the page range, inclusive.
+ * @param end
+ * The ending offset value in bytes for the page range, inclusive.
+ */
public PageRange(long start, long end) {
this.start = start;
this.end = end;
}
+ /**
+ * Gets the byte offset of the start of the page range within the blob, inclusive.
+ *
+ * @return
+ * The beginning offset value in bytes for the page range, inclusive.
+ */
@XmlElement(name = "Start")
public long getStart() {
return start;
}
+ /**
+ * Sets the byte offset of the start of the page range within the blob, inclusive.
+ *
+ * Pages are aligned with 512-byte boundaries. When specifying a page range, the start offset must be a modulus of
+ * 512 and the end offset must be a modulus of 512 – 1. Examples of valid byte ranges are 0-511, 512-1023, etc.
+ *
+ * @param start
+ * The beginning offset value in bytes for the page range, inclusive.
+ * @return
+ * A reference to this {@link PageRange} instance.
+ */
public PageRange setStart(long start) {
this.start = start;
return this;
}
+ /**
+ * Gets the byte offset of the end of the page range within the blob, inclusive.
+ *
+ * @return
+ * The ending offset value in bytes for the page range, inclusive.
+ */
@XmlElement(name = "End")
public long getEnd() {
return end;
}
+ /**
+ * Sets the byte offset of the end of the page range within the blob, inclusive.
+ *
+ * Pages are aligned with 512-byte boundaries. When specifying a page range, the start offset must be a modulus of
+ * 512 and the end offset must be a modulus of 512 – 1. Examples of valid byte ranges are 0-511, 512-1023, etc.
+ *
+ * @param end
+ * The ending offset value in bytes for the page range, inclusive.
+ * @return
+ * A reference to this {@link PageRange} instance.
+ */
public PageRange setEnd(long end) {
this.end = end;
return this;
}
+ /**
+ * Gets the size of the page range in bytes.
+ *
+ * @return
+ * The size of the page range in bytes.
+ */
public long getLength() {
return end - start + 1;
}
+ /**
+ * Sets the length of the page range in bytes. This updates the byte offset of the end of the page range to the
+ * start value plus the length specified by the value parameter. The length must be a positive multiple of
+ * 512 bytes.
+ *
+ * Pages are aligned with 512-byte boundaries. When specifying a page range, the start offset must be a modulus of
+ * 512 and the end offset must be a modulus of 512 – 1. Examples of valid byte ranges are 0-511, 512-1023, etc.
+ *
+ * @param value
+ * The ending offset value in bytes for the page range, inclusive.
+ * @return
+ * A reference to this {@link PageRange} instance.
+ */
public PageRange setLength(long value) {
this.end = this.start + value - 1;
return this;
diff --git a/microsoft-azure-api/src/main/java/com/microsoft/windowsazure/services/blob/models/ServiceProperties.java b/microsoft-azure-api/src/main/java/com/microsoft/windowsazure/services/blob/models/ServiceProperties.java
index 4171ef288f4a7..cdca5eee0e01b 100644
--- a/microsoft-azure-api/src/main/java/com/microsoft/windowsazure/services/blob/models/ServiceProperties.java
+++ b/microsoft-azure-api/src/main/java/com/microsoft/windowsazure/services/blob/models/ServiceProperties.java
@@ -2,54 +2,108 @@
* Copyright 2011 Microsoft Corporation
*
* Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
*/
package com.microsoft.windowsazure.services.blob.models;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
+import com.microsoft.windowsazure.services.blob.BlobContract;
+
+/**
+ * Represents the Blob service properties that can be set on a storage account, including Windows Azure Storage
+ * Analytics. This class is used by the {@link BlobContract#getServiceProperties()} method to return the service
+ * property values set on the storage account, and by the {@link BlobContract#setServiceProperties(ServiceProperties)}
+ * and {@link BlobContract#setServiceProperties(ServiceProperties, BlobServiceOptions)} methods to set the values of the
+ * service properties.
+ */
@XmlRootElement(name = "StorageServiceProperties")
public class ServiceProperties {
private Logging logging = new Logging();
private Metrics metrics = new Metrics();
private String defaultServiceVersion;
+ /**
+ * Gets the value of the logging options on the storage account.
+ *
+ * @return
+ * A {@link Logging} instance containing the logging options.
+ */
@XmlElement(name = "Logging")
public Logging getLogging() {
return logging;
}
+ /**
+ * Sets the value of the logging options on the storage account.
+ *
+ * @param logging
+ * A {@link Logging} instance containing the logging options.
+ */
public void setLogging(Logging logging) {
this.logging = logging;
}
+ /**
+ * Gets the value of the metrics options on the storage account.
+ *
+ * @return
+ * A {@link Metrics} instance containing the metrics options.
+ */
@XmlElement(name = "Metrics")
public Metrics getMetrics() {
return metrics;
}
+ /**
+ * Sets the value of the metrics options on the storage account.
+ *
+ * @param metrics
+ * A {@link Metrics} instance containing the metrics options.
+ */
public void setMetrics(Metrics metrics) {
this.metrics = metrics;
}
+ /**
+ * Gets the default service version string used for operations on the storage account.
+ *
+ * @return
+ * A {@link String} containing the default service version string used for operations on the storage
+ * account.
+ */
@XmlElement(name = "DefaultServiceVersion")
public String getDefaultServiceVersion() {
return defaultServiceVersion;
}
+ /**
+ * Sets the default service version string used for operations on the storage account. This value is optional
+ * for a set service properties request. Allowed values include version 2009-09-19 and more recent versions.
+ *
+ * See Storage Services Versioning
+ * on MSDN for more information on applicable versions.
+ *
+ * @param defaultServiceVersion
+ * A {@link String} containing the default service version string used for operations on the storage
+ * account.
+ */
public void setDefaultServiceVersion(String defaultServiceVersion) {
this.defaultServiceVersion = defaultServiceVersion;
}
+ /**
+ * Represents the logging options that can be set on a storage account.
+ */
public static class Logging {
private String version;
private Boolean delete;
@@ -57,113 +111,258 @@ public static class Logging {
private Boolean write;
private RetentionPolicy retentionPolicy;
+ /**
+ * Gets the retention policy for logging data set on the storage account.
+ *
+ * @return
+ * The {@link RetentionPolicy} set on the storage account.
+ */
@XmlElement(name = "RetentionPolicy")
public RetentionPolicy getRetentionPolicy() {
return retentionPolicy;
}
+ /**
+ * Sets the retention policy to use for logging data on the storage account.
+ *
+ * @param retentionPolicy
+ * The {@link RetentionPolicy} to set on the storage account.
+ */
public void setRetentionPolicy(RetentionPolicy retentionPolicy) {
this.retentionPolicy = retentionPolicy;
}
+ /**
+ * Gets a flag indicating whether all write requests are logged.
+ *
+ * @return
+ * A flag value of
+ * The timeout value only affects calls made on methods where this {@link SetBlobMetadataOptions} instance
+ * is passed as a parameter.
+ *
+ * @param timeout
+ * The server request timeout value to set in milliseconds.
+ * @return
+ * A reference to this {@link SetBlobMetadataOptions} instance.
+ */
@Override
public SetBlobMetadataOptions setTimeout(Integer timeout) {
super.setTimeout(timeout);
return this;
}
+ /**
+ * Gets the lease ID to match for the blob set in this {@link SetBlobMetadataOptions} instance.
+ *
+ * @return
+ * A {@link String} containing the lease ID set, if any.
+ */
public String getLeaseId() {
return leaseId;
}
+ /**
+ * Sets an optional lease ID value to match when setting metadata of the blob. If set, the lease must be active
+ * and the value must match the lease ID set on the leased blob for the operation to succeed.
+ *
+ * Note that this value only affects calls made on methods where this {@link SetBlobMetadataOptions} instance is
+ * passed as a parameter.
+ *
+ * @param leaseId
+ * A {@link String} containing the lease ID to set.
+ * @return
+ * A reference to this {@link SetBlobMetadataOptions} instance.
+ */
public SetBlobMetadataOptions setLeaseId(String leaseId) {
this.leaseId = leaseId;
return this;
}
+ /**
+ * Gets the access conditions set in this {@link SetBlobMetadataOptions} instance.
+ *
+ * @return
+ * An {@link AccessCondition} containing the access conditions set, if any.
+ */
public AccessCondition getAccessCondition() {
return accessCondition;
}
+ /**
+ * Sets the access conditions for setting the metadata of a blob. By default, the set blob metadata operation
+ * will set the metadata unconditionally. Use this method to specify conditions on the ETag or last modified time
+ * value for performing the operation.
+ *
+ * The accessCondition value only affects calls made on methods where this {@link SetBlobMetadataOptions}
+ * instance is passed as a parameter.
+ *
+ * @param accessCondition
+ * An {@link AccessCondition} containing the access conditions to set.
+ * @return
+ * A reference to this {@link SetBlobMetadataOptions} instance.
+ */
public SetBlobMetadataOptions setAccessCondition(AccessCondition accessCondition) {
this.accessCondition = accessCondition;
return this;
diff --git a/microsoft-azure-api/src/main/java/com/microsoft/windowsazure/services/blob/models/SetBlobMetadataResult.java b/microsoft-azure-api/src/main/java/com/microsoft/windowsazure/services/blob/models/SetBlobMetadataResult.java
index abda2abdfdb60..c00f3d67d981c 100644
--- a/microsoft-azure-api/src/main/java/com/microsoft/windowsazure/services/blob/models/SetBlobMetadataResult.java
+++ b/microsoft-azure-api/src/main/java/com/microsoft/windowsazure/services/blob/models/SetBlobMetadataResult.java
@@ -2,36 +2,85 @@
* Copyright 2011 Microsoft Corporation
*
* Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
*/
package com.microsoft.windowsazure.services.blob.models;
import java.util.Date;
+import com.microsoft.windowsazure.services.blob.BlobContract;
+
+/**
+ * A wrapper class for the response returned from a Blob Service REST API Set Blob Metadata operation. This is
+ * returned by calls to implementations of
+ * {@link BlobContract#setBlobMetadata(String, String, java.util.HashMap, SetBlobMetadataOptions)}.
+ *
+ * See the Set Blob Metadata
+ * documentation on MSDN for details of the underlying Blob Service REST API operation.
+ */
public class SetBlobMetadataResult {
private String etag;
private Date lastModified;
+ /**
+ * Gets the ETag of the blob.
+ *
+ * This value can be used in an access condition when updating or deleting a blob to prevent the client from
+ * modifying data that has been changed by another client.
+ *
+ * @return
+ * A {@link String} containing the server-assigned ETag value for the blob.
+ */
public String getEtag() {
return etag;
}
+ /**
+ * Reserved for internal use. Sets the ETag of the blob from the ETag element returned in the
+ * response.
+ *
+ * This method is invoked by the API to set the value from the Blob Service REST API operation response returned by
+ * the server.
+ *
+ * @param etag
+ * A {@link String} containing the server-assigned ETag value for the blob.
+ */
public void setEtag(String etag) {
this.etag = etag;
}
+ /**
+ * Gets the last modified time of the blob.
+ *
+ * Any operation that modifies the blob, including updates to the blob's metadata or properties, changes the last
+ * modified time of the blob. This value can be used in an access condition when updating or deleting a blob to
+ * prevent the client from modifying data that has been changed by another client.
+ *
+ * @return
+ * A {@link java.util.Date} containing the last modified time of the page blob.
+ */
public Date getLastModified() {
return lastModified;
}
+ /**
+ * Reserved for internal use. Sets the last modified time of the blob from the Last-Modified
+ * element returned in the response.
+ *
+ * This method is invoked by the API to set the value from the Blob Service REST API operation response returned by
+ * the server.
+ *
+ * @param lastModified
+ * A {@link java.util.Date} containing the last modified time of the blob.
+ */
public void setLastModified(Date lastModified) {
this.lastModified = lastModified;
}
diff --git a/microsoft-azure-api/src/main/java/com/microsoft/windowsazure/services/blob/models/SetBlobPropertiesOptions.java b/microsoft-azure-api/src/main/java/com/microsoft/windowsazure/services/blob/models/SetBlobPropertiesOptions.java
index ed1e9c631cd7d..2dabb15421bc3 100644
--- a/microsoft-azure-api/src/main/java/com/microsoft/windowsazure/services/blob/models/SetBlobPropertiesOptions.java
+++ b/microsoft-azure-api/src/main/java/com/microsoft/windowsazure/services/blob/models/SetBlobPropertiesOptions.java
@@ -2,18 +2,28 @@
* Copyright 2011 Microsoft Corporation
*
* Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
*/
package com.microsoft.windowsazure.services.blob.models;
+import com.microsoft.windowsazure.services.blob.BlobContract;
+import com.microsoft.windowsazure.services.core.ServiceException;
+
+/**
+ * Represents the options that may be set on a
+ * {@link BlobContract#setBlobProperties(String, String, SetBlobPropertiesOptions) setBlobProperties} request.
+ * These options include an optional server timeout for the operation, the MIME content type and content encoding for
+ * the blob, the content length, the content language, the MD5 hash, a cache control value, a blob lease ID, a sequence
+ * number and sequence number action value, and any access conditions for the operation.
+ */
public class SetBlobPropertiesOptions extends BlobServiceOptions {
private String leaseId;
private String contentType;
@@ -26,97 +36,322 @@ public class SetBlobPropertiesOptions extends BlobServiceOptions {
private Long sequenceNumber;
private AccessCondition accessCondition;
+ /**
+ * Sets the optional server request timeout value associated with this {@link SetBlobPropertiesOptions} instance.
+ *
+ * The timeout value only affects calls made on methods where this {@link SetBlobPropertiesOptions}
+ * instance is passed as a parameter.
+ *
+ * @param timeout
+ * The server request timeout value to set in milliseconds.
+ * @return
+ * A reference to this {@link SetBlobPropertiesOptions} instance.
+ */
@Override
public SetBlobPropertiesOptions setTimeout(Integer timeout) {
super.setTimeout(timeout);
return this;
}
+ /**
+ * Gets the MIME content type value set in this {@link SetBlobPropertiesOptions} instance.
+ *
+ * @return
+ * A {@link String} containing the MIME content type value set, if any.
+ */
public String getContentType() {
return contentType;
}
+ /**
+ * Sets the optional MIME content type for the blob content. This value will be returned to clients in the
+ *
+ * Note that this value only affects calls made on methods where this {@link SetBlobPropertiesOptions} instance is
+ * passed as a parameter.
+ *
+ * @param contentType
+ * A {@link String} containing the MIME content type value to set.
+ * @return
+ * A reference to this {@link SetBlobPropertiesOptions} instance.
+ */
public SetBlobPropertiesOptions setContentType(String contentType) {
this.contentType = contentType;
return this;
}
+ /**
+ * Gets the new page blob size set in this {@link SetBlobPropertiesOptions} instance.
+ *
+ * @return
+ * The new size to set for a page blob.
+ */
public Long getContentLength() {
return contentLength;
}
+ /**
+ * Sets the size of a page blob to the specified size. If the specified contentLength value is less than
+ * the current size of the blob, then all pages above the specified value are cleared.
+ *
+ * This property cannot be used to change the size of a block blob. Setting this property for a block blob causes a
+ * {@link ServiceException} to be thrown.
+ *
+ * Note that this value only affects calls made on methods where this {@link SetBlobPropertiesOptions} instance is
+ * passed as a parameter.
+ *
+ * @param contentLength
+ * The new size to set for a page blob.
+ * @return
+ * A reference to this {@link SetBlobPropertiesOptions} instance.
+ */
public SetBlobPropertiesOptions setContentLength(Long contentLength) {
this.contentLength = contentLength;
return this;
}
+ /**
+ * Gets the HTTP content encoding value set in this {@link SetBlobPropertiesOptions} instance.
+ *
+ * @return
+ * A {@link String} containing the HTTP content encoding value set, if any.
+ */
public String getContentEncoding() {
return contentEncoding;
}
+ /**
+ * Sets the optional HTML content encoding value for the blob content. Use this value to specify any HTTP content
+ * encodings applied to the blob, passed as a
+ * Note that this value only affects calls made on methods where this {@link SetBlobPropertiesOptions} instance is
+ * passed as a parameter.
+ *
+ * @param contentEncoding
+ * A {@link String} containing the
+ * Note that this value only affects calls made on methods where this {@link SetBlobPropertiesOptions} instance is
+ * passed as a parameter.
+ *
+ * @param contentLanguage
+ * A {@link String} containing the
+ * Note that this value only affects calls made on methods where this {@link SetBlobPropertiesOptions} instance is
+ * passed as a parameter.
+ *
+ * @param contentMD5
+ * A {@link String} containing the MD5 hash value for the blob content to set.
+ * @return
+ * A reference to this {@link SetBlobPropertiesOptions} instance.
+ */
public SetBlobPropertiesOptions setContentMD5(String contentMD5) {
this.contentMD5 = contentMD5;
return this;
}
+ /**
+ * Gets the HTTP cache control value set in this {@link SetBlobPropertiesOptions} instance.
+ *
+ * @return
+ * A {@link String} containing the HTTP cache control value set, if any.
+ */
public String getCacheControl() {
return cacheControl;
}
+ /**
+ * Sets the optional HTTP cache control value for the blob content. The Blob service stores
+ * this value but does not use or modify it. This value will be returned to clients in the headers of the response
+ * when the blob data or blob properties are requested.
+ *
+ * Note that this value only affects calls made on methods where this {@link SetBlobPropertiesOptions} instance is
+ * passed as a parameter.
+ *
+ * @param cacheControl
+ * A {@link String} containing the HTTP cache control value to set.
+ * @return
+ * A reference to this {@link SetBlobPropertiesOptions} instance.
+ */
public SetBlobPropertiesOptions setCacheControl(String cacheControl) {
this.cacheControl = cacheControl;
return this;
}
+ /**
+ * Gets the sequence number value set in this {@link SetBlobPropertiesOptions} instance.
+ *
+ * @return
+ * The sequence number to set, if any.
+ */
public Long getSequenceNumber() {
return sequenceNumber;
}
+ /**
+ * Sets the page blob sequence number. The sequence number is a user-controlled property that you can use to track
+ * requests and manage concurrency issues. This value is optional, but is required if the sequence number action
+ * value is set to
+ * Use the sequenceNumber parameter together with the sequence number action to update the blob's sequence
+ * number, either to the specified value or to the higher of the values specified with the request or currently
+ * stored with the blob. This header should not be specified if the sequence number action is set to
+ *
+ * To set the sequence number to a value of your choosing, this property must be specified on the request together
+ * with a sequence number action value of
+ * Note that this value only affects calls made on methods where this {@link SetBlobPropertiesOptions} instance is
+ * passed as a parameter.
+ *
+ * @param sequenceNumber
+ * The sequence number to set.
+ * @return
+ * A reference to this {@link SetBlobPropertiesOptions} instance.
+ */
public SetBlobPropertiesOptions setSequenceNumber(Long sequenceNumber) {
this.sequenceNumber = sequenceNumber;
return this;
}
+ /**
+ * Gets the lease ID to match for the blob set in this {@link SetBlobPropertiesOptions} instance.
+ *
+ * @return
+ * A {@link String} containing the lease ID set, if any.
+ */
public String getLeaseId() {
return leaseId;
}
+ /**
+ * Sets an optional lease ID value to match when setting properties of the blob. If set, the lease must be active
+ * and the value must match the lease ID set on the leased blob for the operation to succeed.
+ *
+ * Note that this value only affects calls made on methods where this {@link SetBlobPropertiesOptions} instance is
+ * passed as a parameter.
+ *
+ * @param leaseId
+ * A {@link String} containing the lease ID to set.
+ * @return
+ * A reference to this {@link SetBlobPropertiesOptions} instance.
+ */
public SetBlobPropertiesOptions setLeaseId(String leaseId) {
this.leaseId = leaseId;
return this;
}
+ /**
+ * Gets the sequence number action set in this {@link SetBlobPropertiesOptions} instance.
+ *
+ * @return
+ * A {@link String} containing the sequence number action set, if any.
+ */
public String getSequenceNumberAction() {
return sequenceNumberAction;
}
+ /**
+ * Sets an optional sequence number action for a page blob. This value is required if a sequence number is set for
+ * the request.
+ *
+ * The sequenceNumberAction parameter indicates how the service should modify the page blob's sequence
+ * number. Specify one of the following strings for this parameter:
+ *
+ * Note that this value only affects calls made on methods where this {@link SetBlobPropertiesOptions} instance is
+ * passed as a parameter.
+ *
+ * @param sequenceNumberAction
+ * A {@link String} containing the sequence number action to set on the page blob.
+ * @return
+ * A reference to this {@link SetBlobPropertiesOptions} instance.
+ */
public SetBlobPropertiesOptions setSequenceNumberAction(String sequenceNumberAction) {
this.sequenceNumberAction = sequenceNumberAction;
return this;
}
+ /**
+ * Gets the access conditions set in this {@link SetBlobPropertiesOptions} instance.
+ *
+ * @return
+ * An {@link AccessCondition} containing the access conditions set, if any.
+ */
public AccessCondition getAccessCondition() {
return accessCondition;
}
+ /**
+ * Sets the access conditions for setting the properties of a blob. By default, the set blob properties operation
+ * will set the properties unconditionally. Use this method to specify conditions on the ETag or last modified time
+ * value for performing the operation.
+ *
+ * The accessCondition value only affects calls made on methods where this {@link SetBlobPropertiesOptions}
+ * instance is passed as a parameter.
+ *
+ * @param accessCondition
+ * An {@link AccessCondition} containing the access conditions to set.
+ * @return
+ * A reference to this {@link SetBlobPropertiesOptions} instance.
+ */
public SetBlobPropertiesOptions setAccessCondition(AccessCondition accessCondition) {
this.accessCondition = accessCondition;
return this;
diff --git a/microsoft-azure-api/src/main/java/com/microsoft/windowsazure/services/blob/models/SetBlobPropertiesResult.java b/microsoft-azure-api/src/main/java/com/microsoft/windowsazure/services/blob/models/SetBlobPropertiesResult.java
index f505058f1890c..599a9576b9eed 100644
--- a/microsoft-azure-api/src/main/java/com/microsoft/windowsazure/services/blob/models/SetBlobPropertiesResult.java
+++ b/microsoft-azure-api/src/main/java/com/microsoft/windowsazure/services/blob/models/SetBlobPropertiesResult.java
@@ -2,45 +2,112 @@
* Copyright 2011 Microsoft Corporation
*
* Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
*/
package com.microsoft.windowsazure.services.blob.models;
import java.util.Date;
+import com.microsoft.windowsazure.services.blob.BlobContract;
+
+/**
+ * A wrapper class for the response returned from a Blob Service REST API Set Blob Properties operation. This is
+ * returned by calls to implementations of
+ * {@link BlobContract#setBlobProperties(String, String, SetBlobPropertiesOptions)}.
+ *
+ * See the Set Blob Properties
+ * documentation on MSDN for details of the underlying Blob Service REST API operation.
+ */
public class SetBlobPropertiesResult {
private String etag;
private Date lastModified;
private Long sequenceNumber;
+ /**
+ * Gets the ETag of the blob.
+ *
+ * This value can be used in an access condition when updating or deleting a blob to prevent the client from
+ * modifying data that has been changed by another client.
+ *
+ * @return
+ * A {@link String} containing the server-assigned ETag value for the blob.
+ */
public String getEtag() {
return etag;
}
+ /**
+ * Reserved for internal use. Sets the ETag of the blob from the ETag element returned in the
+ * response.
+ *
+ * This method is invoked by the API to set the value from the Blob Service REST API operation response returned by
+ * the server.
+ *
+ * @param etag
+ * A {@link String} containing the server-assigned ETag value for the blob.
+ */
public void setEtag(String etag) {
this.etag = etag;
}
+ /**
+ * Gets the last modified time of the blob.
+ *
+ * Any operation that modifies the blob, including updates to the blob's metadata or properties, changes the last
+ * modified time of the blob. This value can be used in an access condition when updating or deleting a blob to
+ * prevent the client from modifying data that has been changed by another client.
+ *
+ * @return
+ * A {@link java.util.Date} containing the last modified time of the page blob.
+ */
public Date getLastModified() {
return lastModified;
}
+ /**
+ * Reserved for internal use. Sets the last modified time of the blob from the Last-Modified
+ * element returned in the response.
+ *
+ * This method is invoked by the API to set the value from the Blob Service REST API operation response returned by
+ * the server.
+ *
+ * @param lastModified
+ * A {@link java.util.Date} containing the last modified time of the blob.
+ */
public void setLastModified(Date lastModified) {
this.lastModified = lastModified;
}
+ /**
+ * Gets the sequence number of the page blob. This value can be used when updating or deleting a page blob using an
+ * optimistic concurrency model to prevent the client from modifying data that has been changed by another
+ * client.
+ *
+ * @return
+ * A {@link String} containing the client-assigned sequence number value for the page blob.
+ */
public Long getSequenceNumber() {
return sequenceNumber;
}
+ /**
+ * Reserved for internal use. Sets the sequence number of the page blob from the
+ * x-ms-blob-sequence-number element returned in the response.
+ *
+ * This method is invoked by the API to set the value from the Blob Service REST API operation response returned by
+ * the server.
+ *
+ * @param sequenceNumber
+ * A {@link String} containing the client-assigned sequence number value for the page blob.
+ */
public void setSequenceNumber(Long sequenceNumber) {
this.sequenceNumber = sequenceNumber;
}
diff --git a/microsoft-azure-api/src/main/java/com/microsoft/windowsazure/services/blob/models/SetContainerMetadataOptions.java b/microsoft-azure-api/src/main/java/com/microsoft/windowsazure/services/blob/models/SetContainerMetadataOptions.java
index f27304a09b755..0830b04e3d049 100644
--- a/microsoft-azure-api/src/main/java/com/microsoft/windowsazure/services/blob/models/SetContainerMetadataOptions.java
+++ b/microsoft-azure-api/src/main/java/com/microsoft/windowsazure/services/blob/models/SetContainerMetadataOptions.java
@@ -2,31 +2,73 @@
* Copyright 2011 Microsoft Corporation
*
* Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
*/
package com.microsoft.windowsazure.services.blob.models;
+import com.microsoft.windowsazure.services.blob.BlobContract;
+
+/**
+ * Represents the options that may be set on a
+ * {@link BlobContract#setContainerMetadata(String, java.util.HashMap, SetContainerMetadataOptions)} request. These
+ * options include a server response timeout for the request and access conditions that specify whether to perform the
+ * operation or not depending on the values of the Etag or last modified time of the container. Options that are not set
+ * will not be passed to the server with a request.
+ */
public class SetContainerMetadataOptions extends BlobServiceOptions {
private AccessCondition accessCondition;
+ /**
+ * Sets the server request timeout value associated with this {@link SetContainerMetadataOptions} instance.
+ *
+ * The timeout value only affects calls made on methods where this {@link SetContainerMetadataOptions}
+ * instance is passed as a parameter.
+ *
+ * @param timeout
+ * The server request timeout value to set in milliseconds.
+ * @return
+ * A reference to this {@link SetContainerMetadataOptions} instance.
+ */
@Override
public SetContainerMetadataOptions setTimeout(Integer timeout) {
super.setTimeout(timeout);
return this;
}
+ /**
+ * Gets the access conditions associated with this {@link SetContainerMetadataOptions} instance.
+ *
+ * @return
+ * An {@link AccessCondition} reference containing the Etag and last modified time conditions for performing
+ * the set container metadata operation, or
+ * The accessCondition value only affects calls made on methods where this
+ * {@link SetContainerMetadataOptions} instance is passed as a parameter.
+ *
+ * @param accessCondition
+ * An {@link AccessCondition} reference containing the Etag and last modified time conditions for
+ * performing the set container metadata operation. Specify String
value is used as a key in the
+ * configuration file, to identify the value for the DNS prefix name for the storage account.
+ */
public final static String ACCOUNT_NAME = "blob.accountName";
+
+ /**
+ * The Blob configuration account key constant. This String
value is used as a key in the
+ * configuration file, to identify the value for the storage service account key.
+ */
public final static String ACCOUNT_KEY = "blob.accountKey";
+
+ /**
+ * The Blob configuration URI constant. This String
value is used as a key in the
+ * configuration file, to identify the URI value for the Blob storage service REST API address for the
+ * storage account.
+ */
public final static String URI = "blob.uri";
}
diff --git a/microsoft-azure-api/src/main/java/com/microsoft/windowsazure/services/blob/BlobContract.java b/microsoft-azure-api/src/main/java/com/microsoft/windowsazure/services/blob/BlobContract.java
index e334771a68819..c6d2ec0d44332 100644
--- a/microsoft-azure-api/src/main/java/com/microsoft/windowsazure/services/blob/BlobContract.java
+++ b/microsoft-azure-api/src/main/java/com/microsoft/windowsazure/services/blob/BlobContract.java
@@ -2,15 +2,15 @@
* Copyright 2011 Microsoft Corporation
*
* Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
*/
package com.microsoft.windowsazure.services.blob;
@@ -60,148 +60,1420 @@
import com.microsoft.windowsazure.services.core.FilterableService;
import com.microsoft.windowsazure.services.core.ServiceException;
+/**
+ * Defines the methods available on the Windows Azure blob storage service. Construct an object instance implementing
+ * BlobContract
with one of the static create methods on {@link BlobService}. These methods
+ * associate a Configuration
with the implementation, so the methods on the instance of
+ * BlobContract
all work with a particular storage account.
+ */
public interface BlobContract extends FilterableService
+ *
+ * max
or update
, and also specifies a
+ * value for the sequence number.increment
, indicating that the service should
+ * increment the sequence number by one.
+ *
+ *
+ * @param container
+ * A {@link String} containing the name of the blob's container.
+ * @param blob
+ * A {@link String} containing the name of the blob to set properties on.
+ * @param options
+ * A {@link SetBlobPropertiesOptions} instance containing options for the request.
+ * @return
+ * A {@link SetBlobPropertiesResult} instance containing the ETag and last modified time of the blob, and
+ * the sequence number, if applicable.
+ * @throws ServiceException
+ * if an error occurs accessing the storage service.
+ */
SetBlobPropertiesResult setBlobProperties(String container, String blob, SetBlobPropertiesOptions options)
throws ServiceException;
+ /**
+ * Sets user-specified metadata on a blob.
+ *
+ *
+ *
+ *
+ * AccessCondition
instance.
+ *
+ * @return
+ * The {@link AccessConditionHeaderType} set in this AccessCondition
instance.
+ */
public AccessConditionHeaderType getHeader() {
return header;
}
+ /**
+ * Sets the access condition header type in this AccessCondition
instance.
+ *
+ * @param header
+ * The {@link AccessConditionHeaderType} to set in this AccessCondition
instance.
+ */
public void setHeader(AccessConditionHeaderType header) {
this.header = header;
}
+ /**
+ * Gets the access condition value set in this AccessCondition
instance.
+ *
+ * @return
+ * A {@link String} containing the access condition value set in this AccessCondition
instance.
+ */
public String getValue() {
return value;
}
+ /**
+ * Sets the access condition value in this AccessCondition
instance.
+ *
+ * @param value
+ * A {@link String} containing the access condition value to set in this AccessCondition
+ * instance.
+ */
public void setValue(String value) {
this.value = value;
}
diff --git a/microsoft-azure-api/src/main/java/com/microsoft/windowsazure/services/blob/models/AcquireLeaseOptions.java b/microsoft-azure-api/src/main/java/com/microsoft/windowsazure/services/blob/models/AcquireLeaseOptions.java
index af9ea1931ee2c..fe6e69ed87132 100644
--- a/microsoft-azure-api/src/main/java/com/microsoft/windowsazure/services/blob/models/AcquireLeaseOptions.java
+++ b/microsoft-azure-api/src/main/java/com/microsoft/windowsazure/services/blob/models/AcquireLeaseOptions.java
@@ -2,32 +2,68 @@
* Copyright 2011 Microsoft Corporation
*
* Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
*/
package com.microsoft.windowsazure.services.blob.models;
+import com.microsoft.windowsazure.services.blob.BlobContract;
+/**
+ * Represents the options that may be set on an {@link BlobContract#acquireLease(String, String, AcquireLeaseOptions)
+ * acquireLease} request.
+ * These options include an optional server timeout for the operation and any access conditions for the operation.
+ */
public class AcquireLeaseOptions extends BlobServiceOptions {
private AccessCondition accessCondition;
+ /**
+ * Sets the optional server request timeout value associated with this {@link AcquireLeaseOptions} instance.
+ * Last-Modified
header
+ * value returned in a server response.
+ * ETag
header value returned in a
+ * server response.
+ * Content-Type
+ * header value returned in the server response.
+ *
+ * @param contentType
+ * A {@link String} containing the MIME content type value for the blob.
+ */
public void setContentType(String contentType) {
this.contentType = contentType;
}
+ /**
+ * Gets the size of the blob in bytes.
+ *
+ * @return
+ * The size of the blob in bytes.
+ */
@XmlElement(name = "Content-Length")
public long getContentLength() {
return contentLength;
}
+ /**
+ * Reserved for internal use. Sets the content length value for the blob from the Content-Length
header
+ * value returned in the server response.
+ *
+ * @param contentLength
+ * The size of the blob in bytes.
+ */
public void setContentLength(long contentLength) {
this.contentLength = contentLength;
}
+ /**
+ * Gets the HTTP content encoding value of the blob.
+ *
+ * @return
+ * A {@link String} containing the HTTP content encoding value set, if any.
+ */
@XmlElement(name = "Content-Encoding")
public String getContentEncoding() {
return contentEncoding;
}
+ /**
+ * Reserved for internal use. Sets the HTTP content encoding value for the blob from the
+ * Content-Encoding
header value returned in the server response.
+ *
+ * @param contentEncoding
+ * A {@link String} containing the HTTP content encoding value to set.
+ */
public void setContentEncoding(String contentEncoding) {
this.contentEncoding = contentEncoding;
}
+ /**
+ * Gets the HTTP content language value of the blob.
+ *
+ * @return
+ * A {@link String} containing the HTTP content language value set, if any.
+ */
@XmlElement(name = "Content-Language")
public String getContentLanguage() {
return contentLanguage;
}
+ /**
+ * Reserved for internal use. Sets the HTTP content language value for the blob from the
+ * Content-Language
header value returned in the server response.
+ *
+ * @param contentLanguage
+ * A {@link String} containing the HTTP content language value to set.
+ */
public void setContentLanguage(String contentLanguage) {
this.contentLanguage = contentLanguage;
}
+ /**
+ * Gets the MD5 hash value of the blob content.
+ *
+ * @return
+ * A {@link String} containing the MD5 hash value of the blob content.
+ */
@XmlElement(name = "Content-MD5")
public String getContentMD5() {
return contentMD5;
}
+ /**
+ * Reserved for internal use. Sets the MD5 hash value of the blob content from the Content-MD5
header
+ * value returned in the server response.
+ *
+ * @param contentMD5
+ * A {@link String} containing the MD5 hash value of the blob content.
+ */
public void setContentMD5(String contentMD5) {
this.contentMD5 = contentMD5;
}
+ /**
+ * Gets the HTTP cache control value of the blob.
+ *
+ * @return
+ * A {@link String} containing the HTTP cache control value of the blob.
+ */
@XmlElement(name = "Cache-Control")
public String getCacheControl() {
return cacheControl;
}
+ /**
+ * Reserved for internal use. Sets the HTTP cache control value of the blob from the Cache-Control
+ * header value returned in the server response.
+ *
+ * @param cacheControl
+ * A {@link String} containing the HTTP cache control value of the blob.
+ */
public void setCacheControl(String cacheControl) {
this.cacheControl = cacheControl;
}
+ /**
+ * Gets a string representing the type of the blob, with a value of "BlockBlob" for block blobs, and "PageBlob"
+ * for page blobs.
+ *
+ * @return
+ * A {@link String} containing "BlockBlob" for block blobs, or "PageBlob" for page blobs.
+ */
@XmlElement(name = "BlobType")
public String getBlobType() {
return blobType;
}
+ /**
+ * Reserved for internal use. Sets the blob type from the x-ms-blob-type
header value returned in the
+ * server response.
+ *
+ * @param blobType
+ * A {@link String} containing "BlockBlob" for block blobs, or "PageBlob" for page blobs.
+ */
public void setBlobType(String blobType) {
this.blobType = blobType;
}
+ /**
+ * Gets a string representing the lease status of the blob, with a value of "locked" for blobs with an active lease,
+ * and "unlocked" for blobs without an active lease.
+ *
+ * @return
+ * A {@link String} containing "locked" for blobs with an active lease, and "unlocked" for blobs without an
+ * active lease.
+ */
@XmlElement(name = "LeaseStatus")
public String getLeaseStatus() {
return leaseStatus;
}
+ /**
+ * Reserved for internal use. Sets the blob lease status from the x-ms-lease-status
header value
+ * returned in the server response.
+ *
+ * @param leaseStatus
+ * A {@link String} containing "locked" for blobs with an active lease, and "unlocked" for blobs without
+ * an active lease.
+ */
public void setLeaseStatus(String leaseStatus) {
this.leaseStatus = leaseStatus;
}
+ /**
+ * Gets the current sequence number for a page blob. This value is not set for block blobs.
+ *
+ * @return
+ * The current sequence number of the page blob.
+ */
@XmlElement(name = "x-ms-blob-sequence-number")
public long getSequenceNumber() {
return sequenceNumber;
}
+ /**
+ * Reserved for internal use. Sets the page blob sequence number from the x-ms-blob-sequence-number
+ * header value returned in the server response.
+ *
+ * @param sequenceNumber
+ * The current sequence number of the page blob.
+ */
public void setSequenceNumber(long sequenceNumber) {
this.sequenceNumber = sequenceNumber;
}
diff --git a/microsoft-azure-api/src/main/java/com/microsoft/windowsazure/services/blob/models/BlobServiceOptions.java b/microsoft-azure-api/src/main/java/com/microsoft/windowsazure/services/blob/models/BlobServiceOptions.java
index 879986c2640c5..3fc56c6d1ab60 100644
--- a/microsoft-azure-api/src/main/java/com/microsoft/windowsazure/services/blob/models/BlobServiceOptions.java
+++ b/microsoft-azure-api/src/main/java/com/microsoft/windowsazure/services/blob/models/BlobServiceOptions.java
@@ -2,26 +2,52 @@
* Copyright 2011 Microsoft Corporation
*
* Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
*/
package com.microsoft.windowsazure.services.blob.models;
+import com.microsoft.windowsazure.services.blob.BlobContract;
+
+/**
+ * Represents the base class for options that may be set on Blob Service REST API operations invoked through the
+ * {@link BlobContract} interface. This class defines a server request timeout, which can be applied to all operations.
+ */
public class BlobServiceOptions {
// Nullable because it is optional
private Integer timeout;
+ /**
+ * Gets the server request timeout value associated with this {@link BlobServiceOptions} instance.
+ * Content-Type
header of the response when the blob data or blob properties are requested. If no
+ * content type is specified, the default content type is application/octet-stream.
+ * x-ms-blob-content-encoding
header value to the server.
+ * This value will be returned to clients in the headers of the response when the blob data or blob properties are
+ * requested. Pass an empty value to update a blob to the default value, which will cause no content encoding header
+ * to be returned with the blob.
+ * x-ms-blob-content-encoding
header value to set.
+ * @return
+ * A reference to this {@link CommitBlobBlocksOptions} instance.
+ */
public CommitBlobBlocksOptions setBlobContentEncoding(String blobContentEncoding) {
this.blobContentEncoding = blobContentEncoding;
return this;
}
+ /**
+ * Gets the HTTP content language header value set in this {@link CommitBlobBlocksOptions} instance.
+ *
+ * @return
+ * A {@link String} containing the HTTP content language header value set, if any.
+ */
public String getBlobContentLanguage() {
return blobContentLanguage;
}
+ /**
+ * Sets the optional HTTP content language header value for the blob content. Use this value to
+ * specify the content language of the blob. This value will be returned to clients in the
+ * x-ms-blob-content-language
header of the response when the blob data or blob properties are
+ * requested.
+ * x-ms-blob-content-language
header value to set.
+ * @return
+ * A reference to this {@link CommitBlobBlocksOptions} instance.
+ */
public CommitBlobBlocksOptions setBlobContentLanguage(String blobContentLanguage) {
this.blobContentLanguage = blobContentLanguage;
return this;
}
+ /**
+ * Gets the MD5 hash value for the blob content set in this {@link CommitBlobBlocksOptions} instance.
+ *
+ * @return
+ * A {@link String} containing the MD5 hash value for the blob content set, if any.
+ */
public String getBlobContentMD5() {
return blobContentMD5;
}
+ /**
+ * Sets the optional MD5 hash value for the blob content. This value will be returned to clients in the
+ * x-ms-blob-content-md5
header value of the response when the blob data or blob properties are
+ * requested. This hash is used to verify the integrity of the blob during transport. When this header is specified,
+ * the storage service checks the hash of the content that has arrived with the one that was sent. If the two hashes
+ * do not match, the operation will fail with error code 400 (Bad Request), which will cause a ServiceException to
+ * be thrown.
+ * null
, the start time for any resource request using the access policy is
+ * assumed to be the time when the Blob service receives the request.
+ * null
, the expiry time must be included in the Shared Access Signature for
+ * any resource request using the access policy.
+ * null
,
+ * any Shared Access Signature that refers to this policy may specify the start time.
+ * @param expiry
+ * A {@link Date} representing the expiration time for the access policy. If this value is
+ * null
, any Shared Access Signature that refers to this policy must specify the expiry
+ * value. Resource access using a Shared Access Signature that refers to this policy after this time is
+ * not valid.
+ * @param permission
+ * A {@link String} containing the permissions specified for the access policy.
+ */
public void addSignedIdentifier(String id, Date start, Date expiry, String permission) {
AccessPolicy accessPolicy = new AccessPolicy();
accessPolicy.setStart(start);
@@ -75,79 +203,202 @@ public void addSignedIdentifier(String id, Date start, Date expiry, String permi
this.getSignedIdentifiers().add(signedIdentifier);
}
+ /**
+ * A static inner class representing a collection of container-level access policies. A container may have up to
+ * five container-level access policies, which may be associated with any number of Shared Access Signatures.
+ */
@XmlRootElement(name = "SignedIdentifiers")
public static class SignedIdentifiers {
private Listnull
, the start time for any resource request using the access policy is assumed to be the time
+ * when the Blob service receives the request.
+ *
+ * @return
+ * A {@link Date} representing the start time for the access policy, or null
if none is
+ * specified.
+ */
@XmlElement(name = "Start")
@XmlJavaTypeAdapter(ContainerACLDateAdapter.class)
public Date getStart() {
return start;
}
+ /**
+ * Sets the start time for valid access to a resource using the access policy. If this value is
+ * null
, the start time for any resource request using the access policy is assumed to be the time
+ * when the Blob service receives the request.
+ *
+ * @param start
+ * A {@link Date} representing the start time for the access policy, or null
to leave
+ * the time unspecified.
+ */
public void setStart(Date start) {
this.start = start;
}
+ /**
+ * Gets the expiration time for valid access to a resource using the access policy. If this value is
+ * null
, any Shared Access Signature that refers to this access policy must specify the expiry
+ * value.
+ *
+ * @return
+ * A {@link Date} representing the expiration time for the access policy, or null
if none
+ * is specified.
+ */
@XmlElement(name = "Expiry")
@XmlJavaTypeAdapter(ContainerACLDateAdapter.class)
public Date getExpiry() {
return expiry;
}
+ /**
+ * Sets the expiration time for valid access to a resource using the access policy. If this value is
+ * null
, any Shared Access Signature that refers to this access policy must specify the expiry
+ * value.
+ *
+ * @param expiry
+ * A {@link Date} representing the expiration time for the access policy, or null
to
+ * leave the time unspecified.
+ */
public void setExpiry(Date expiry) {
this.expiry = expiry;
}
+ /**
+ * Gets the permissions for operations on resources specified by the access policy. Supported permissions
+ * include read (r), write (w), delete (d), and list (l). Permissions may be grouped so as to allow multiple
+ * operations to be performed with the access policy. For example, if all permissions to a resource are granted,
+ * the method returns "rwdl" as the result. If only read/write permissions are granted, the method returns "rw"
+ * as the result.
+ *
+ * @return
+ * A {@link String} containing the permissions specified for the access policy.
+ */
@XmlElement(name = "Permission")
public String getPermission() {
return permission;
}
+ /**
+ * Sets the permissions for operations on resources specified by the access policy. Supported permissions
+ * include read (r), write (w), delete (d), and list (l). Permissions may be grouped so as to allow multiple
+ * operations to be performed with the access policy. For example, to grant all permissions to a resource,
+ * specify "rwdl" for the parameter. To grant only read/write permissions, specify "rw" for the parameter.
+ *
+ * @param permission
+ * A {@link String} containing the permissions specified for the access policy.
+ */
public void setPermission(String permission) {
this.permission = permission;
}
}
+ /**
+ * An enumeration type for the public access levels that can be set on a blob container.
+ */
public static enum PublicAccessType {
- NONE, BLOBS_ONLY, CONTAINER_AND_BLOBS,
+ /**
+ * Access to this container and its blobs is restricted to calls made with the storage account private key.
+ */
+ NONE,
+ /**
+ * Anonymous public read-only access is allowed for individual blobs within the container, but it is not
+ * possible to enumerate the blobs within the container or to enumerate the containers in the storage account.
+ */
+ BLOBS_ONLY,
+ /**
+ * Anonymous public read-only access is allowed for individual blobs within the container, and the blobs within
+ * the container can be enumerated, but it is not possible to enumerate the containers in the storage account.
+ */
+ CONTAINER_AND_BLOBS,
}
}
diff --git a/microsoft-azure-api/src/main/java/com/microsoft/windowsazure/services/blob/models/CopyBlobOptions.java b/microsoft-azure-api/src/main/java/com/microsoft/windowsazure/services/blob/models/CopyBlobOptions.java
index dcecf99c157f3..484829480329d 100644
--- a/microsoft-azure-api/src/main/java/com/microsoft/windowsazure/services/blob/models/CopyBlobOptions.java
+++ b/microsoft-azure-api/src/main/java/com/microsoft/windowsazure/services/blob/models/CopyBlobOptions.java
@@ -2,20 +2,30 @@
* Copyright 2011 Microsoft Corporation
*
* Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
*/
package com.microsoft.windowsazure.services.blob.models;
import java.util.HashMap;
+import com.microsoft.windowsazure.services.blob.BlobContract;
+
+/**
+ * Represents the options that may be set on a
+ * {@link BlobContract#copyBlob(String, String, String, String, CopyBlobOptions) copyBlob} request. These options
+ * include an optional server timeout for the operation, an optional source snapshot timestamp value to copy from a
+ * particular snapshot of the source blob, blob metadata to set on the destination blob, a blob lease ID
+ * to overwrite a blob with an active lease, a source lease ID to copy from a source blob with an active lease, any
+ * access conditions to satisfy on the destination, and any access conditions to satisfy on the source.
+ */
public class CopyBlobOptions extends BlobServiceOptions {
private String leaseId;
private AccessCondition accessCondition;
@@ -24,66 +34,204 @@ public class CopyBlobOptions extends BlobServiceOptions {
private HashMapContent-Type
header value set in this {@link CreateBlobOptions} instance.
+ *
+ * @return
+ * A {@link String} containing the Content-Type
header value set, if any.
+ */
public String getContentType() {
return contentType;
}
+ /**
+ * Sets the optional Content-Type
header value for the blob content. This value will be returned to
+ * clients in the headers of the response when the blob data or blob properties are requested. If no content type is
+ * specified, the default content type is application/octet-stream.
+ *
+ * @param contentType
+ * A {@link String} containing the Content-Type
header value to set.
+ * @return
+ * A reference to this {@link CreateBlobOptions} instance.
+ */
public CreateBlobOptions setContentType(String contentType) {
this.contentType = contentType;
return this;
}
+ /**
+ * Gets the Content-Encoding
header value set in this {@link CreateBlobOptions} instance.
+ *
+ * @return
+ * A {@link String} containing the Content-Encoding
header value set, if any.
+ */
public String getContentEncoding() {
return contentEncoding;
}
+ /**
+ * Sets the optional Content-Encoding
header value for the blob content. Use this value to specify the
+ * content encodings applied to the blob. This value will be returned to clients in the headers of the response when
+ * the blob data or blob properties are requested.
+ * Content-Encoding
header value to set.
+ * @return
+ * A reference to this {@link CreateBlobOptions} instance.
+ */
public CreateBlobOptions setContentEncoding(String contentEncoding) {
this.contentEncoding = contentEncoding;
return this;
}
+ /**
+ * Gets the Content-Language
header value set in this {@link CreateBlobOptions} instance.
+ *
+ * @return
+ * A {@link String} containing the Content-Language
header value set, if any.
+ */
public String getContentLanguage() {
return contentLanguage;
}
+ /**
+ * Sets the optional Content-Language
header value for the blob content. Use this value to specify the
+ * content language of the blob. This value will be returned to clients in the headers of the response when the blob
+ * data or blob properties are requested.
+ * Content-Language
header value to set.
+ * @return
+ * A reference to this {@link CreateBlobOptions} instance.
+ */
public CreateBlobOptions setContentLanguage(String contentLanguage) {
this.contentLanguage = contentLanguage;
return this;
}
+ /**
+ * Gets the Content-MD5
header value set in this {@link CreateBlobOptions} instance.
+ *
+ * @return
+ * A {@link String} containing the Content-MD5
header value set, if any.
+ */
public String getContentMD5() {
return contentMD5;
}
+ /**
+ * Sets the optional Content-MD5
header value for the blob content. Use this value to specify an
+ * MD5 hash of the blob content. This hash is used to verify the integrity of the blob during transport. When this
+ * header is specified, the storage service checks the hash that has arrived with the one that was sent. If the two
+ * hashes do not match, the operation will fail with error code 400 (Bad Request). This value will be returned to
+ * clients in the headers of the response when the blob data or blob properties are requested.
+ * Content-MD5
header value to set.
+ * @return
+ * A reference to this {@link CreateBlobOptions} instance.
+ */
public CreateBlobOptions setContentMD5(String contentMD5) {
this.contentMD5 = contentMD5;
return this;
}
+ /**
+ * Gets the Cache-Control
header value set in this {@link CreateBlobOptions} instance.
+ *
+ * @return
+ * A {@link String} containing the Cache-Control
header value set, if any.
+ */
public String getCacheControl() {
return cacheControl;
}
+ /**
+ * Sets the optional Cache-Control
header value for the blob content. The Blob service stores this
+ * value but does not use or modify it. This value will be returned to clients in the headers of the response when
+ * the blob data or blob properties are requested.
+ * Cache-Control
header value to set.
+ * @return
+ * A reference to this {@link CreateBlobOptions} instance.
+ */
public CreateBlobOptions setCacheControl(String cacheControl) {
this.cacheControl = cacheControl;
return this;
}
+ /**
+ * Gets the x-ms-blob-content-type
header value set in this {@link CreateBlobOptions} instance.
+ *
+ * @return
+ * A {@link String} containing the x-ms-blob-content-type
header value set, if any.
+ */
public String getBlobContentType() {
return blobContentType;
}
+ /**
+ * Sets the optional x-ms-blob-content-type
header value for the blob content. This value will be
+ * returned to clients in the headers of the response when the blob data or blob properties are requested. If no
+ * content type is specified, the default content type is application/octet-stream.
+ * x-ms-blob-content-type
header value to set.
+ * @return
+ * A reference to this {@link CreateBlobOptions} instance.
+ */
public CreateBlobOptions setBlobContentType(String blobContentType) {
this.blobContentType = blobContentType;
return this;
}
+ /**
+ * Gets the x-ms-blob-content-encoding
header value set in this {@link CreateBlobOptions} instance.
+ *
+ * @return
+ * A {@link String} containing the x-ms-blob-content-encoding
header value set, if any.
+ */
public String getBlobContentEncoding() {
return blobContentEncoding;
}
+ /**
+ * Sets the optional x-ms-blob-content-encoding
header value for the blob content. Use this value to
+ * specify the content encodings applied to the blob. This value will be returned to clients in the headers of the
+ * response when the blob data or blob properties are requested.
+ * x-ms-blob-content-encoding
header value to set.
+ * @return
+ * A reference to this {@link CreateBlobOptions} instance.
+ */
public CreateBlobOptions setBlobContentEncoding(String blobContentEncoding) {
this.blobContentEncoding = blobContentEncoding;
return this;
}
+ /**
+ * Gets the x-ms-blob-content-language
header value set in this {@link CreateBlobOptions} instance.
+ *
+ * @return
+ * A {@link String} containing the x-ms-blob-content-language
header value set, if any.
+ */
public String getBlobContentLanguage() {
return blobContentLanguage;
}
+ /**
+ * Sets the optional x-ms-blob-content-language
header value for the blob content. Use this value to
+ * specify the content language of the blob. This value will be returned to clients in the headers of the response
+ * when the blob data or blob properties are requested.
+ * x-ms-blob-content-language
header value to set.
+ * @return
+ * A reference to this {@link CreateBlobOptions} instance.
+ */
public CreateBlobOptions setBlobContentLanguage(String blobContentLanguage) {
this.blobContentLanguage = blobContentLanguage;
return this;
}
+ /**
+ * Gets the x-ms-blob-content-md5
header value set in this {@link CreateBlobOptions} instance.
+ *
+ * @return
+ * A {@link String} containing the x-ms-blob-content-md5
header value set, if any.
+ */
public String getBlobContentMD5() {
return blobContentMD5;
}
+ /**
+ * Sets the optional MD5 hash value for the blob content. This value will be returned to clients in the
+ * x-ms-blob-content-md5
header value of the response when the blob data or blob properties are
+ * requested. This hash is used to verify the integrity of the blob during transport. When this header is specified,
+ * the storage service checks the hash of the content that has arrived with the one that was sent. If the two hashes
+ * do not match, the operation will fail with error code 400 (Bad Request), which will cause a ServiceException to
+ * be thrown.
+ * x-ms-blob-content-md5
header value to set.
+ * @return
+ * A reference to this {@link CreateBlobOptions} instance.
+ */
public CreateBlobOptions setBlobContentMD5(String blobContentMD5) {
this.blobContentMD5 = blobContentMD5;
return this;
}
+ /**
+ * Gets the x-ms-blob-cache-control
header value set in this {@link CreateBlobOptions} instance.
+ *
+ * @return
+ * A {@link String} containing the x-ms-blob-cache-control
header value set, if any.
+ */
public String getBlobCacheControl() {
return blobCacheControl;
}
+ /**
+ * Sets the optional x-ms-blob-cache-control
header value for the blob content. The Blob service stores
+ * this value but does not use or modify it. This value will be returned to clients in the headers of the response
+ * when the blob data or blob properties are requested.
+ * x-ms-blob-cache-control
header value to set.
+ * @return
+ * A reference to this {@link CreateBlobOptions} instance.
+ */
public CreateBlobOptions setBlobCacheControl(String blobCacheControl) {
this.blobCacheControl = blobCacheControl;
return this;
}
+ /**
+ * Gets the blob metadata collection set in this {@link CreateBlobOptions} instance.
+ *
+ * @return
+ * A {@link HashMap} of name-value pairs of {@link String} containing the blob metadata set, if any.
+ */
public HashMap
+ *
+ * The default value of null
sets the container data private to the storage account owner.
+ *
+ * @return
+ * A {@link String} containing the public access level value to set, or null
.
+ */
public String getPublicAccess() {
return publicAccess;
}
+ /**
+ * Sets the public access level value associated with this {@link CreateContainerOptions} instance. The public
+ * access level specifies whether data in the container may be accessed publicly and the level of access. Possible
+ * values include:
+ *
+ *
+ * The default value of null
sets the container data private to the storage account owner.
+ * null
to set the
+ * container data private to the storage account owner.
+ * @return
+ * A reference to this {@link CreateContainerOptions} instance.
+ */
public CreateContainerOptions setPublicAccess(String publicAccess) {
this.publicAccess = publicAccess;
return this;
diff --git a/microsoft-azure-api/src/main/java/com/microsoft/windowsazure/services/blob/models/DeleteBlobOptions.java b/microsoft-azure-api/src/main/java/com/microsoft/windowsazure/services/blob/models/DeleteBlobOptions.java
index 729a68c9e99f9..7d0d4377bdfc7 100644
--- a/microsoft-azure-api/src/main/java/com/microsoft/windowsazure/services/blob/models/DeleteBlobOptions.java
+++ b/microsoft-azure-api/src/main/java/com/microsoft/windowsazure/services/blob/models/DeleteBlobOptions.java
@@ -2,61 +2,168 @@
* Copyright 2011 Microsoft Corporation
*
* Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
*/
package com.microsoft.windowsazure.services.blob.models;
+import com.microsoft.windowsazure.services.blob.BlobContract;
+import com.microsoft.windowsazure.services.core.ServiceException;
+import com.microsoft.windowsazure.services.core.storage.StorageException;
+
+/**
+ * Represents the options that may be set on a {@link BlobContract#deleteBlob(String, String, DeleteBlobOptions)
+ * deleteBlob} request. These options include an optional server timeout for the operation, a snapshot timestamp to
+ * specify an individual snapshot to delete, a blob lease ID to delete a blob with an active lease, a flag indicating
+ * whether to delete all snapshots but not the blob, or both the blob and all snapshots, and any access conditions to
+ * satisfy.
+ */
public class DeleteBlobOptions extends BlobServiceOptions {
private String snapshot;
private String leaseId;
private boolean deleteSnaphotsOnly;
private AccessCondition accessCondition;
+ /**
+ * Sets the optional server request timeout value associated with this {@link DeleteBlobOptions} instance.
+ * true
or false
.
+ * true
to delete only the snapshots, or false
to delete both snapshots
+ * and the blob.
+ */
public boolean getDeleteSnaphotsOnly() {
return deleteSnaphotsOnly;
}
+ /**
+ * Sets a flag indicating whether to delete only snapshots of the blob, or both the blob and all its snapshots.
+ * true
, only the snapshots of the blob are
+ * deleted by the operation. If the parameter is set to false
, both the blob and all its snapshots are
+ * deleted by the operation. If this option is not set on a request, and the blob has associated snapshots, the Blob
+ * service returns a 409 (Conflict) status code and a {@link ServiceException} is thrown.
+ * true
to delete only the snapshots, or false
to delete both snapshots
+ * and the blob.
+ * @return
+ * A reference to this {@link DeleteBlobOptions} instance.
+ */
public DeleteBlobOptions setDeleteSnaphotsOnly(boolean deleteSnaphotsOnly) {
this.deleteSnaphotsOnly = deleteSnaphotsOnly;
return this;
}
+ /**
+ * Gets the access conditions set in this {@link DeleteBlobOptions} instance.
+ *
+ * @return
+ * An {@link AccessCondition} containing the access conditions set, if any.
+ */
public AccessCondition getAccessCondition() {
return accessCondition;
}
+ /**
+ * Sets optional access conditions for getting the blob. The operation will return an error if the access conditions
+ * are not met.
+ * null
if not set.
+ */
public AccessCondition getAccessCondition() {
return accessCondition;
}
+ /**
+ * Sets the access conditions associated with this {@link DeleteContainerOptions} instance. By default, the delete
+ * container operation will delete the container unconditionally. Use this method to specify conditions on the Etag
+ * or last modified time value for performing the delete container operation.
+ * null
to make the operation
+ * unconditional.
+ * @return
+ * A reference to this {@link DeleteContainerOptions} instance.
+ */
public DeleteContainerOptions setAccessCondition(AccessCondition accessCondition) {
this.accessCondition = accessCondition;
return this;
diff --git a/microsoft-azure-api/src/main/java/com/microsoft/windowsazure/services/blob/models/GetBlobMetadataOptions.java b/microsoft-azure-api/src/main/java/com/microsoft/windowsazure/services/blob/models/GetBlobMetadataOptions.java
index 9b1e055d8ae8f..0c8cbbbc88f07 100644
--- a/microsoft-azure-api/src/main/java/com/microsoft/windowsazure/services/blob/models/GetBlobMetadataOptions.java
+++ b/microsoft-azure-api/src/main/java/com/microsoft/windowsazure/services/blob/models/GetBlobMetadataOptions.java
@@ -2,51 +2,122 @@
* Copyright 2011 Microsoft Corporation
*
* Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
*/
package com.microsoft.windowsazure.services.blob.models;
+import com.microsoft.windowsazure.services.blob.BlobContract;
+
+/**
+ * Represents the options that may be set on a
+ * {@link BlobContract#getBlobMetadata(String, String, GetBlobMetadataOptions) getBlobMetadata} request.
+ * These options include an optional server timeout for the operation, the lease ID if the blob has an active lease, the
+ * snapshot timestamp to get the properties of a snapshot, and any access conditions for the request.
+ */
public class GetBlobMetadataOptions extends BlobServiceOptions {
private String snapshot;
private String leaseId;
private AccessCondition accessCondition;
+ /**
+ * Sets the optional server request timeout value associated with this {@link GetBlobMetadataOptions} instance.
+ * true
to get the MD5 hash value for the specified range, otherwise
+ * false
.
+ */
public boolean isComputeRangeMD5() {
return computeRangeMD5;
}
+ /**
+ * Reserved for future use. Sets a flag indicating whether to return an MD5 hash for the specified range of blob
+ * content.
+ * true
and specified together with a range less
+ * than or equal to 4 MB in size, the get blob operation response includes the MD5 hash for the range. If the
+ * computeRangeMD5 parameter is set to true
and no range is specified or the range exceeds 4
+ * MB in size, a {@link ServiceException} is thrown.
+ *
+ * @param computeRangeMD5
+ * Reserved for future use. Set a flag value of true
to get the MD5 hash value for the
+ * specified range, otherwise false
.
+ * @return
+ * A reference to this {@link GetBlobOptions} instance.
+ */
public GetBlobOptions setComputeRangeMD5(boolean computeRangeMD5) {
this.computeRangeMD5 = computeRangeMD5;
return this;
}
+ /**
+ * Gets the beginning byte offset value of the blob content range to return set in this {@link GetBlobOptions}
+ * instance.
+ *
+ * @return
+ * The beginning offset value in bytes for the blob content range to return.
+ */
public Long getRangeStart() {
return rangeStart;
}
+ /**
+ * Sets an optional beginning byte offset value of the blob content range to return for the request, inclusive.
+ * boolean
flag value indicating whether to return the committed blocks of the blob.
+ */
public boolean isCommittedList() {
return committedList;
}
+ /**
+ * Sets a flag indicating whether to return the committed blocks of the blob in the response to the list blob blocks
+ * request.
+ * true
to return the committed blocks of the blob; otherwise, false
.
+ * @return
+ * A reference to this {@link ListBlobBlocksOptions} instance.
+ */
public ListBlobBlocksOptions setCommittedList(boolean committedList) {
this.committedList = committedList;
return this;
}
+ /**
+ * Gets the flag value indicating whether to return the uncommitted blocks of the blob set in this
+ * {@link ListBlobBlocksOptions} instance.
+ *
+ * @return
+ * A boolean
flag value indicating whether to return the uncommitted blocks of the blob.
+ */
public boolean isUncommittedList() {
return uncommittedList;
}
+ /**
+ * Sets a flag indicating whether to return the uncommitted blocks of the blob in the response to the list blob
+ * blocks request.
+ * true
to return the uncommitted blocks of the blob; otherwise, false
.
+ * @return
+ * A reference to this {@link ListBlobBlocksOptions} instance.
+ */
public ListBlobBlocksOptions setUncommittedList(boolean uncommittedList) {
this.uncommittedList = uncommittedList;
return this;
diff --git a/microsoft-azure-api/src/main/java/com/microsoft/windowsazure/services/blob/models/ListBlobBlocksResult.java b/microsoft-azure-api/src/main/java/com/microsoft/windowsazure/services/blob/models/ListBlobBlocksResult.java
index 125c5cb6934e9..43008a72f44d6 100644
--- a/microsoft-azure-api/src/main/java/com/microsoft/windowsazure/services/blob/models/ListBlobBlocksResult.java
+++ b/microsoft-azure-api/src/main/java/com/microsoft/windowsazure/services/blob/models/ListBlobBlocksResult.java
@@ -2,15 +2,15 @@
* Copyright 2011 Microsoft Corporation
*
* Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
*/
package com.microsoft.windowsazure.services.blob.models;
@@ -23,8 +23,17 @@
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
+import com.microsoft.windowsazure.services.blob.BlobContract;
import com.microsoft.windowsazure.services.core.utils.pipeline.Base64StringAdapter;
+/**
+ * A wrapper class for the response returned from a Blob Service REST API Get Block List operation. This is returned by
+ * calls to implementations of {@link BlobContract#listBlobBlocks(String, String)} and
+ * {@link BlobContract#listBlobBlocks(String, String, ListBlobBlocksOptions)}.
+ * substring+delimiter
, where
+ * substring
is the common substring that begins one or more blob names, and delimiter
is
+ * the value of the delimiter parameter.
+ * true
to include blob metadata with a response, otherwise, false
.
+ */
public boolean isIncludeMetadata() {
return includeMetadata;
}
+ /**
+ * Sets the value of an optional flag indicating whether to include blob metadata with a response.
+ *
+ * @param includeMetadata
+ * Set a value of true
to include blob metadata with a response, otherwise,
+ * false
.
+ * @return
+ * A reference to this {@link ListBlobsOptions} instance.
+ */
public ListBlobsOptions setIncludeMetadata(boolean includeMetadata) {
this.includeMetadata = includeMetadata;
return this;
}
+ /**
+ * Gets the value of a flag indicating whether to include blob snapshots with a response set in this
+ * {@link ListBlobsOptions} instance.
+ *
+ * @return
+ * A value of true
to include blob metadata with a response, otherwise, false
.
+ */
public boolean isIncludeSnapshots() {
return includeSnapshots;
}
+ /**
+ * Sets the value of an optional flag indicating whether to include blob snapshots with a response.
+ * true
to include blob metadata with a response, otherwise,
+ * false
.
+ * @return
+ * A reference to this {@link ListBlobsOptions} instance.
+ */
public ListBlobsOptions setIncludeSnapshots(boolean includeSnapshots) {
this.includeSnapshots = includeSnapshots;
return this;
}
+ /**
+ * Gets the value of a flag indicating whether to include uncommitted blobs with a response set in this
+ * {@link ListBlobsOptions} instance.
+ *
+ * @return
+ * A value of true
to include uncommitted blobs with a response, otherwise, false
.
+ */
public boolean isIncludeUncommittedBlobs() {
return includeUncommittedBlobs;
}
+ /**
+ * Sets the value of an optional flag indicating whether to include uncommitted blobs with a response. Uncommitted
+ * blobs are blobs for which blocks have been uploaded, but which have not been committed with a request to
+ * {@link BlobContract#commitBlobBlocks(String, String, BlockList)} or
+ * {@link BlobContract#commitBlobBlocks(String, String, BlockList, CommitBlobBlocksOptions)}.
+ *
+ * @param includeUncommittedBlobs
+ * Set a value of true
to include uncommitted blobs with a response, otherwise,
+ * false
.
+ * @return
+ * A reference to this {@link ListBlobsOptions} instance.
+ */
public ListBlobsOptions setIncludeUncommittedBlobs(boolean includeUncommittedBlobs) {
this.includeUncommittedBlobs = includeUncommittedBlobs;
return this;
diff --git a/microsoft-azure-api/src/main/java/com/microsoft/windowsazure/services/blob/models/ListBlobsResult.java b/microsoft-azure-api/src/main/java/com/microsoft/windowsazure/services/blob/models/ListBlobsResult.java
index 35acf17541c56..feb0bf40944e3 100644
--- a/microsoft-azure-api/src/main/java/com/microsoft/windowsazure/services/blob/models/ListBlobsResult.java
+++ b/microsoft-azure-api/src/main/java/com/microsoft/windowsazure/services/blob/models/ListBlobsResult.java
@@ -2,15 +2,15 @@
* Copyright 2011 Microsoft Corporation
*
* Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
*/
package com.microsoft.windowsazure.services.blob.models;
@@ -26,8 +26,17 @@
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
+import com.microsoft.windowsazure.services.blob.BlobContract;
import com.microsoft.windowsazure.services.blob.implementation.MetadataAdapter;
+/**
+ * A wrapper class for the response returned from a Blob Service REST API Get Blobs operation. This is returned by
+ * calls to implementations of {@link BlobContract#listBlobs(String)} and
+ * {@link BlobContract#listBlobs(String, ListBlobsOptions)}.
+ * ListBlobsEntry
entries generated from the server response to the list blobs
+ * request.
+ *
+ * @return
+ * The {@link List} of {@link ListBlobsEntry} entries generated from the server response to the list blobs
+ * request.
+ */
@XmlElementWrapper(name = "Blobs")
@XmlElementRefs({ @XmlElementRef(name = "BlobPrefix", type = BlobPrefixEntry.class),
@XmlElementRef(name = "Blob", type = BlobEntry.class) })
@@ -49,6 +66,14 @@ public ListListBlobsEntry
entries
+ * generated from the server response to the list blobs request.
+ *
+ * @param entries
+ * The {@link List} of {@link ListBlobsEntry} entries to set the lists of blob entries and blob prefix
+ * entries from.
+ */
public void setEntries(ListBlobPrefixEntry
represents one
+ * or more blobs that have a common substring up to the delimiter specified in the request options.
+ * BlobPrefixEntry
in place of all blobs whose names begin with the same substring up to the appearance
+ * of the delimiter string. The value of {@link BlobPrefixEntry#getName()} is substring+ delimiter
+ * , where substring is the common substring that begins one or more blob names, and delimiter is
+ * the value of the delimiter option.
+ * Blob
and BlobPrefix
entries in the list of results returned
+ * in the response.
+ */
public static abstract class ListBlobsEntry {
}
+ /**
+ * Represents a BlobPrefix element returned in the response. When the request includes a delimiter
+ * parameter, a single BlobPrefix element is returned in place of all blobs whose names begin with
+ * the same substring up to the appearance of the delimiter character.
+ */
@XmlRootElement(name = "BlobPrefix")
public static class BlobPrefixEntry extends ListBlobsEntry {
private String name;
+ /**
+ * Gets the value of the Name element within a BlobPrefix element returned in
+ * the response. The value of the element is substring+delimiter, where substring is
+ * the common substring that begins one or more blob names, and delimiter is the value of the delimiter
+ * parameter.
+ *
+ * @return
+ * A {@link String} containing the common substring that begins one or more blob names up to and
+ * including the delimiter specified in the request.
+ */
@XmlElement(name = "Name")
public String getName() {
return name;
}
+ /**
+ * Reserved for internal use. Sets the blob prefix name from the Name element in the
+ * BlobPrefix element in the Blobs list in the response.
+ * BlobEntry
includes
+ * committed blobs, and can optionally include blob metadata, blob snapshots, and uncommitted blobs, depending on
+ * the request options set.
+ */
@XmlRootElement(name = "Blob")
public static class BlobEntry extends ListBlobsEntry {
private String name;
@@ -152,48 +385,138 @@ public static class BlobEntry extends ListBlobsEntry {
private HashMaptrue
to include container metadata in the response to the request.
+ */
public boolean isIncludeMetadata() {
return includeMetadata;
}
+ /**
+ * Sets the value of an optional flag indicating whether to include container metadata with the response to the
+ * request.
+ * true
to include container metadata in the response to the request.
+ * @return
+ * A reference to this {@link ListContainersOptions} instance.
+ */
public ListContainersOptions setIncludeMetadata(boolean includeMetadata) {
this.includeMetadata = includeMetadata;
return this;
diff --git a/microsoft-azure-api/src/main/java/com/microsoft/windowsazure/services/blob/models/ListContainersResult.java b/microsoft-azure-api/src/main/java/com/microsoft/windowsazure/services/blob/models/ListContainersResult.java
index 36ca841ed734d..eb47ce77be2b2 100644
--- a/microsoft-azure-api/src/main/java/com/microsoft/windowsazure/services/blob/models/ListContainersResult.java
+++ b/microsoft-azure-api/src/main/java/com/microsoft/windowsazure/services/blob/models/ListContainersResult.java
@@ -2,15 +2,15 @@
* Copyright 2011 Microsoft Corporation
*
* Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
*/
package com.microsoft.windowsazure.services.blob.models;
@@ -24,9 +24,18 @@
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
+import com.microsoft.windowsazure.services.blob.BlobContract;
import com.microsoft.windowsazure.services.blob.implementation.MetadataAdapter;
import com.microsoft.windowsazure.services.blob.implementation.RFC1123DateAdapter;
+/**
+ * A wrapper class for the response returned from a Blob Service REST API List Containers operation. This is returned by
+ * calls to implementations of {@link BlobContract#listContainers} and
+ * {@link BlobContract#listContainers(listContainersOptions)}.
+ * true
if all write operations are logged; otherwise, false
.
+ */
@XmlElement(name = "Write")
public boolean isWrite() {
return write;
}
+ /**
+ * Sets a flag indicating whether all write requests should be logged.
+ *
+ * @param write
+ * Set a flag value of true
to log all write operations; otherwise, false
.
+ */
public void setWrite(boolean write) {
this.write = write;
}
+ /**
+ * Gets a flag indicating whether all read requests are logged.
+ *
+ * @return
+ * A flag value of true
if all read operations are logged; otherwise, false
.
+ */
@XmlElement(name = "Read")
public boolean isRead() {
return read;
}
+ /**
+ * Sets a flag indicating whether all read requests should be logged.
+ *
+ * @param read
+ * Set a flag value of true
to log all read operations; otherwise, false
.
+ */
public void setRead(boolean read) {
this.read = read;
}
+ /**
+ * Gets a flag indicating whether all delete requests are logged.
+ *
+ * @return
+ * A flag value of true
if all delete operations are logged; otherwise, false
.
+ */
@XmlElement(name = "Delete")
public boolean isDelete() {
return delete;
}
+ /**
+ * Sets a flag indicating whether all delete requests should be logged.
+ *
+ * @param delete
+ * Set a flag value of true
to log all delete operations; otherwise, false
.
+ */
public void setDelete(boolean delete) {
this.delete = delete;
}
+ /**
+ * Gets the version of logging configured on the storage account.
+ *
+ * @return
+ * A {@link String} containing the version of logging configured on the storage account.
+ */
@XmlElement(name = "Version")
public String getVersion() {
return version;
}
+ /**
+ * Sets the version of logging configured on the storage account.
+ *
+ * @param version
+ * A {@link String} containing the version of logging configured on the storage account.
+ */
public void setVersion(String version) {
this.version = version;
}
}
+ /**
+ * Represents the metrics options that can be set on a storage account.
+ */
public static class Metrics {
private String version;
private boolean enabled;
private Boolean includeAPIs;
private RetentionPolicy retentionPolicy;
+ /**
+ * Gets the retention policy for metrics data set on the storage account.
+ *
+ * @return
+ * The {@link RetentionPolicy} set on the storage account.
+ */
@XmlElement(name = "RetentionPolicy")
public RetentionPolicy getRetentionPolicy() {
return retentionPolicy;
}
+ /**
+ * Sets the retention policy to use for metrics data on the storage account.
+ *
+ * @param retentionPolicy
+ * The {@link RetentionPolicy} to set on the storage account.
+ */
public void setRetentionPolicy(RetentionPolicy retentionPolicy) {
this.retentionPolicy = retentionPolicy;
}
+ /**
+ * Gets a flag indicating whether metrics generates summary statistics for called API operations.
+ *
+ * @return
+ * A flag value of true
if metrics generates summary statistics for called API operations;
+ * otherwise, false
.
+ */
@XmlElement(name = "IncludeAPIs")
public Boolean isIncludeAPIs() {
return includeAPIs;
}
+ /**
+ * Sets a flag indicating whether metrics should generate summary statistics for called API operations. This
+ * flag is optional if metrics is not enabled.
+ *
+ * @param includeAPIs
+ * Set a flag value of true
to generate summary statistics for called API operations;
+ * otherwise, false
.
+ */
public void setIncludeAPIs(Boolean includeAPIs) {
this.includeAPIs = includeAPIs;
}
+ /**
+ * Gets a flag indicating whether metrics is enabled for the storage account.
+ *
+ * @return
+ * A flag value of true
if metrics is enabled for the storage account; otherwise,
+ * false
.
+ */
@XmlElement(name = "Enabled")
public boolean isEnabled() {
return enabled;
}
+ /**
+ * Sets a flag indicating whether to enable metrics for the storage account.
+ *
+ * @param enabled
+ * Set a flag value of true
to enable metrics for the storage account; otherwise,
+ * false
.
+ */
public void setEnabled(boolean enabled) {
this.enabled = enabled;
}
+ /**
+ * Gets the version of Storage Analytics configured on the storage account.
+ *
+ * @return
+ * A {@link String} containing the version of Storage Analytics configured on the storage account.
+ */
@XmlElement(name = "Version")
public String getVersion() {
return version;
}
+ /**
+ * Sets the version of Storage Analytics configured on the storage account.
+ *
+ * @param version
+ * A {@link String} containing the version of Storage Analytics configured on the storage account.
+ */
public void setVersion(String version) {
this.version = version;
}
}
+ /**
+ * Represents the optional retention policy that can be applied to logging or metrics on the storage account.
+ */
public static class RetentionPolicy {
private boolean enabled;
private Integer days; // nullable, because optional if "enabled" is false
+ /**
+ * Gets the number of days that metrics or logging data should be retained, if logging is enabled.
+ *
+ * @return
+ * The number of days to retain logging or metrics data if logging is enabled, or null
.
+ */
@XmlElement(name = "Days")
public Integer getDays() {
return days;
}
+ /**
+ * Sets the number of days that metrics or logging data should be retained. The minimum value you can specify is
+ * 1; the largest value is 365 (one year). This value must be specified even if the enabled flag is set
+ * to false
.
+ *
+ * @param days
+ * The number of days to retain logging or metrics data.
+ */
public void setDays(Integer days) {
this.days = days;
}
+ /**
+ * Gets a flag indicating whether a retention policy is enabled.
+ *
+ * @return
+ * A flag value of true
if a retention policy is enabled; otherwise, false
.
+ */
@XmlElement(name = "Enabled")
public boolean isEnabled() {
return enabled;
}
+ /**
+ * Sets a flag indicating whether to enable a retention policy.
+ *
+ * @param enabled
+ * Set a flag value of true
to enable a retention policy; otherwise, false
.
+ */
public void setEnabled(boolean enabled) {
this.enabled = enabled;
}
diff --git a/microsoft-azure-api/src/main/java/com/microsoft/windowsazure/services/blob/models/SetBlobMetadataOptions.java b/microsoft-azure-api/src/main/java/com/microsoft/windowsazure/services/blob/models/SetBlobMetadataOptions.java
index c30ec2b0d1f04..8c15e4c5c5ef3 100644
--- a/microsoft-azure-api/src/main/java/com/microsoft/windowsazure/services/blob/models/SetBlobMetadataOptions.java
+++ b/microsoft-azure-api/src/main/java/com/microsoft/windowsazure/services/blob/models/SetBlobMetadataOptions.java
@@ -2,41 +2,97 @@
* Copyright 2011 Microsoft Corporation
*
* Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
*/
package com.microsoft.windowsazure.services.blob.models;
+import com.microsoft.windowsazure.services.blob.BlobContract;
+
+/**
+ * Represents the options that may be set on a
+ * {@link BlobContract#setBlobMetadata(String, String, java.util.HashMap, SetBlobMetadataOptions) setBlobMetadata}
+ * request. These options include an optional server timeout for the operation, a blob lease ID, and any access
+ * conditions for the operation.
+ */
public class SetBlobMetadataOptions extends BlobServiceOptions {
private String leaseId;
private AccessCondition accessCondition;
+ /**
+ * Sets the optional server request timeout value associated with this {@link SetBlobMetadataOptions} instance.
+ * Content-Type
header of the response when the blob data or blob properties are requested. If no
+ * content type is specified, the default content type is application/octet-stream.
+ * x-ms-blob-content-encoding
header value to the server.
+ * This value will be returned to clients in the headers of the response when the blob data or blob properties are
+ * requested. Pass an empty value to update a blob to the default value, which will cause no content encoding header
+ * to be returned with the blob.
+ * x-ms-blob-content-encoding
header value to set.
+ * @return
+ * A reference to this {@link SetBlobPropertiesOptions} instance.
+ */
public SetBlobPropertiesOptions setContentEncoding(String contentEncoding) {
this.contentEncoding = contentEncoding;
return this;
}
+ /**
+ * Gets the HTTP content language header value set in this {@link SetBlobPropertiesOptions} instance.
+ *
+ * @return
+ * A {@link String} containing the HTTP content language header value set, if any.
+ */
public String getContentLanguage() {
return contentLanguage;
}
+ /**
+ * Sets the optional HTTP content language header value for the blob content. Use this value to
+ * specify the content language of the blob. This value will be returned to clients in the
+ * x-ms-blob-content-language
header of the response when the blob data or blob properties are
+ * requested.
+ * x-ms-blob-content-language
header value to set.
+ * @return
+ * A reference to this {@link SetBlobPropertiesOptions} instance.
+ */
public SetBlobPropertiesOptions setContentLanguage(String contentLanguage) {
this.contentLanguage = contentLanguage;
return this;
}
+ /**
+ * Gets the MD5 hash value for the blob content set in this {@link SetBlobPropertiesOptions} instance.
+ *
+ * @return
+ * A {@link String} containing the MD5 hash value for the blob content set, if any.
+ */
public String getContentMD5() {
return contentMD5;
}
+ /**
+ * Sets the optional MD5 hash value for the blob content. This value will be returned to clients in the
+ * x-ms-blob-content-md5
header value of the response when the blob data or blob properties are
+ * requested. This hash is used to verify the integrity of the blob during transport. When this header is specified,
+ * the storage service checks the hash of the content that has arrived with the one that was sent. If the two hashes
+ * do not match, the operation will fail with error code 400 (Bad Request), which will cause a ServiceException to
+ * be thrown.
+ * max
or update
.
+ * increment
; in this case the service automatically increments the sequence number by one.
+ * update
.
+ *
+ *
+ * max
- Sets the sequence number to be the higher of the value included with the request and the
+ * value currently stored for the blob.update
- Sets the sequence number to the value included with the request.increment
- Increments the value of the sequence number by 1. If specifying this option, do not
+ * set the sequence number value; doing so will cause a {@link ServiceException} to be thrown.null
if not set.
+ */
public AccessCondition getAccessCondition() {
return accessCondition;
}
+ /**
+ * Sets the access conditions associated with this {@link SetContainerMetadataOptions} instance. By default, the set
+ * container metadata operation will set the container metadata unconditionally. Use this method to specify
+ * conditions on the Etag or last modified time value for performing the set container metadata operation.
+ * null
to make the operation
+ * unconditional.
+ * @return
+ * A reference to this {@link SetContainerMetadataOptions} instance.
+ */
public SetContainerMetadataOptions setAccessCondition(AccessCondition accessCondition) {
this.accessCondition = accessCondition;
return this;
diff --git a/microsoft-azure-api/src/main/java/com/microsoft/windowsazure/services/blob/package.html b/microsoft-azure-api/src/main/java/com/microsoft/windowsazure/services/blob/package.html
new file mode 100644
index 0000000000000..7795f32cd9e54
--- /dev/null
+++ b/microsoft-azure-api/src/main/java/com/microsoft/windowsazure/services/blob/package.html
@@ -0,0 +1,5 @@
+
+String
object that represents the To recipient.
+ * @param to
+ * A String
object that represents the To recipient.
*
* @return A Message
object that represents the updated message.
*/
diff --git a/microsoft-azure-api/src/main/java/com/microsoft/windowsazure/services/serviceBus/models/ListQueuesResult.java b/microsoft-azure-api/src/main/java/com/microsoft/windowsazure/services/serviceBus/models/ListQueuesResult.java
index df68d6fd58608..c06b5b3e27341 100644
--- a/microsoft-azure-api/src/main/java/com/microsoft/windowsazure/services/serviceBus/models/ListQueuesResult.java
+++ b/microsoft-azure-api/src/main/java/com/microsoft/windowsazure/services/serviceBus/models/ListQueuesResult.java
@@ -2,15 +2,15 @@
* Copyright 2011 Microsoft Corporation
*
* Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
*/
package com.microsoft.windowsazure.services.serviceBus.models;
@@ -36,7 +36,7 @@ public ListList
object that contains the {@link QueueInfo} objects assigned as the value of the
* result.
*/
diff --git a/microsoft-azure-api/src/main/java/com/microsoft/windowsazure/services/serviceBus/models/ListRulesResult.java b/microsoft-azure-api/src/main/java/com/microsoft/windowsazure/services/serviceBus/models/ListRulesResult.java
index 22cc18bb0d5fd..b12c3e65bb88a 100644
--- a/microsoft-azure-api/src/main/java/com/microsoft/windowsazure/services/serviceBus/models/ListRulesResult.java
+++ b/microsoft-azure-api/src/main/java/com/microsoft/windowsazure/services/serviceBus/models/ListRulesResult.java
@@ -2,15 +2,15 @@
* Copyright 2011 Microsoft Corporation
*
* Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
*/
package com.microsoft.windowsazure.services.serviceBus.models;
@@ -34,9 +34,9 @@ public ListList
object that contains the {@link RuleInfo} objects assigned as the value of the
* result.
*/
diff --git a/microsoft-azure-api/src/main/java/com/microsoft/windowsazure/services/serviceBus/models/ListSubscriptionsResult.java b/microsoft-azure-api/src/main/java/com/microsoft/windowsazure/services/serviceBus/models/ListSubscriptionsResult.java
index d77f40bfb519a..4b6c6cc5fbe86 100644
--- a/microsoft-azure-api/src/main/java/com/microsoft/windowsazure/services/serviceBus/models/ListSubscriptionsResult.java
+++ b/microsoft-azure-api/src/main/java/com/microsoft/windowsazure/services/serviceBus/models/ListSubscriptionsResult.java
@@ -2,15 +2,15 @@
* Copyright 2011 Microsoft Corporation
*
* Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
*/
package com.microsoft.windowsazure.services.serviceBus.models;
@@ -34,9 +34,9 @@ public ListList
object that contains the {@link SubscriptionInfo} objects assigned as the value of
* the result.
*/
diff --git a/microsoft-azure-api/src/main/java/com/microsoft/windowsazure/services/serviceBus/models/ListTopicsResult.java b/microsoft-azure-api/src/main/java/com/microsoft/windowsazure/services/serviceBus/models/ListTopicsResult.java
index 0aa49b51d9cf9..b5539a870055b 100644
--- a/microsoft-azure-api/src/main/java/com/microsoft/windowsazure/services/serviceBus/models/ListTopicsResult.java
+++ b/microsoft-azure-api/src/main/java/com/microsoft/windowsazure/services/serviceBus/models/ListTopicsResult.java
@@ -2,15 +2,15 @@
* Copyright 2011 Microsoft Corporation
*
* Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
*/
package com.microsoft.windowsazure.services.serviceBus.models;
@@ -34,9 +34,9 @@ public ListList
object that contains the {@link TopicInfo} objects assigned as the value of the
* result.
*/
diff --git a/microsoft-azure-api/src/main/java/com/microsoft/windowsazure/services/table/client/CloudTableClient.java b/microsoft-azure-api/src/main/java/com/microsoft/windowsazure/services/table/client/CloudTableClient.java
index b471594261c68..6ac9720aca758 100644
--- a/microsoft-azure-api/src/main/java/com/microsoft/windowsazure/services/table/client/CloudTableClient.java
+++ b/microsoft-azure-api/src/main/java/com/microsoft/windowsazure/services/table/client/CloudTableClient.java
@@ -954,7 +954,7 @@ public IterableString
containing the prefix to match on table names to return.
*
* @return
* An Iterable
collection of the table names in the storage account that match the specified
@@ -977,7 +977,7 @@ public IterableString
containing the prefix to match on table names to return.
* @param options
* A {@link TableRequestOptions} object that specifies execution options such as retry policy and timeout
* settings for the operation. Specify null
to use the request options specified on the
@@ -1005,9 +1005,6 @@ public IterableString
objects containing table names in the storage account.
*
@@ -1033,7 +1030,7 @@ public ResultSegmentString
containing the prefix to match on table names to return.
*
* @return
* A {@link ResultSegment} of String
objects containing table names matching the prefix in the
@@ -1066,7 +1063,7 @@ public ResultSegmentString
containing the prefix to match on table names to return.
* @param maxResults
* The maximum number of table names to return in the {@link ResultSegment}. If this parameter is null,
* the query will list up to the maximum 1,000 results.
@@ -1105,7 +1102,7 @@ public ResultSegmentString
containing the prefix to match on table names to return.
* @return
* A {@link TableQuery} instance for listing table names with the specified prefix.
*/
diff --git a/microsoft-azure-api/src/main/java/com/microsoft/windowsazure/services/table/client/TableQuery.java b/microsoft-azure-api/src/main/java/com/microsoft/windowsazure/services/table/client/TableQuery.java
index a54279ae0ce17..90a9bfa3501d3 100644
--- a/microsoft-azure-api/src/main/java/com/microsoft/windowsazure/services/table/client/TableQuery.java
+++ b/microsoft-azure-api/src/main/java/com/microsoft/windowsazure/services/table/client/TableQuery.java
@@ -456,7 +456,7 @@ public TableQuery() {
* {@link TableServiceEntity}.class
as the class type parameter if no more specialized type is
* required.
*
- * @param tablename
+ * @param tableName
* A String
containing the name of the source table to query.
* @param clazzType
* The java.lang.Class
of the class T
that represents the table entity type for