From 71e8d07c663c58687fccf1dd3b4e7fd02cd93ec3 Mon Sep 17 00:00:00 2001 From: Alan Zimmer <48699787+alzimmermsft@users.noreply.github.com> Date: Tue, 30 Jul 2019 14:11:22 -0700 Subject: [PATCH] Add REST API Documentation Links (#4557) * Added links REST API documentation --- .../azure/storage/queue/QueueAsyncClient.java | 51 +++++++++++++++++++ .../com/azure/storage/queue/QueueClient.java | 51 +++++++++++++++++++ .../queue/QueueServiceAsyncClient.java | 20 +++++++- .../storage/queue/QueueServiceClient.java | 15 ++++++ 4 files changed, 135 insertions(+), 2 deletions(-) diff --git a/storage/client/queue/src/main/java/com/azure/storage/queue/QueueAsyncClient.java b/storage/client/queue/src/main/java/com/azure/storage/queue/QueueAsyncClient.java index 4bd8de4b8f130..659d128dc243b 100644 --- a/storage/client/queue/src/main/java/com/azure/storage/queue/QueueAsyncClient.java +++ b/storage/client/queue/src/main/java/com/azure/storage/queue/QueueAsyncClient.java @@ -108,6 +108,9 @@ public URL getQueueUrl() { * * {@codesnippet com.azure.storage.queue.queueAsyncClient.create} * + *

For more information, see the + * Azure Docs.

+ * * @return A response that only contains headers and response status code * @throws StorageErrorException If a queue with the same name already exists in the queue service. */ @@ -124,6 +127,9 @@ public Mono create() { * * {@codesnippet com.azure.storage.queue.queueAsyncClient.create#map} * + *

For more information, see the + * Azure Docs.

+ * * @param metadata Metadata to associate with the queue * @return A response that only contains headers and response status code * @throws StorageErrorException If a queue with the same name and different metadata already exists in the queue service. @@ -142,6 +148,9 @@ public Mono create(Map metadata) { * * {@codesnippet com.azure.storage.queue.queueAsyncClient.delete} * + *

For more information, see the + * Azure Docs.

+ * * @return A response that only contains headers and response status code * @throws StorageErrorException If the queue doesn't exist */ @@ -159,6 +168,9 @@ public Mono delete() { * * {@codesnippet com.azure.storage.queue.queueAsyncClient.getProperties} * + *

For more information, see the + * Azure Docs.

+ * * @return A response containing a {@link QueueProperties} value which contains the metadata and approximate * messages count of the queue. * @throws StorageErrorException If the queue doesn't exist @@ -183,6 +195,9 @@ public Mono> getProperties() { * * {@codesnippet com.azure.storage.queue.queueAsyncClient.clearMetadata#map} * + *

For more information, see the + * Azure Docs.

+ * * @param metadata Metadata to set on the queue * @return A response that only contains headers and response status code * @throws StorageErrorException If the queue doesn't exist @@ -201,6 +216,9 @@ public Mono setMetadata(Map metadata) { * * {@codesnippet com.azure.storage.queue.queueAsyncClient.getAccessPolicy} * + *

For more information, see the + * Azure Docs.

+ * * @return The stored access policies specified on the queue. * @throws StorageErrorException If the queue doesn't exist */ @@ -218,6 +236,9 @@ public Flux getAccessPolicy() { * * {@codesnippet com.azure.storage.queue.queueAsyncClient.setAccessPolicy} * + *

For more information, see the + * Azure Docs.

+ * * @param permissions Access policies to set on the queue * @return A response that only contains headers and response status code * @throws StorageErrorException If the queue doesn't exist, a stored access policy doesn't have all fields filled out, @@ -237,6 +258,9 @@ public Mono setAccessPolicy(List permissions) { * * {@codesnippet com.azure.storage.queue.queueAsyncClient.clearMessages} * + *

For more information, see the + * Azure Docs.

+ * * @return A response that only contains headers and response status code * @throws StorageErrorException If the queue doesn't exist */ @@ -254,6 +278,9 @@ public Mono clearMessages() { * * {@codesnippet com.azure.storage.queue.queueAsyncClient.enqueueMessage#string} * + *

For more information, see the + * Azure Docs.

+ * * @param messageText Message text * @return A {@link EnqueuedMessage} value that contains the {@link EnqueuedMessage#messageId() messageId} and * {@link EnqueuedMessage#popReceipt() popReceipt} that are used to interact with the message and other metadata @@ -277,6 +304,9 @@ public Mono> enqueueMessage(String messageText) { * * {@codesnippet com.azure.storage.queue.queueAsyncClient.enqueueMessageLiveTime#string-duration-duration} * + *

For more information, see the + * Azure Docs.

+ * * @param messageText Message text * @param visibilityTimeout Optional. The timeout period for how long the message is invisible in the queue in seconds. * If unset the value will default to 0 and the message will be instantly visible. The timeout must be between 0 @@ -307,6 +337,9 @@ public Mono> enqueueMessage(String messageText, Durati * * {@codesnippet com.azure.storage.queue.queueAsyncClient.dequeueMessages} * + *

For more information, see the + * Azure Docs.

+ * * @return The first {@link DequeuedMessage} in the queue, it contains * {@link DequeuedMessage#messageId() messageId} and {@link DequeuedMessage#popReceipt() popReceipt} used to interact * with the message, additionally it contains other metadata about the message. @@ -325,6 +358,9 @@ public Flux dequeueMessages() { * * {@codesnippet com.azure.storage.queue.queueAsyncClient.dequeueMessages#integer} * + *

For more information, see the + * Azure Docs.

+ * * @param maxMessages Optional. Maximum number of messages to get, if there are less messages exist in the queue than requested * all the messages will be returned. If left empty only 1 message will be retrieved, the allowed range is 1 to 32 * messages. @@ -347,6 +383,9 @@ public Flux dequeueMessages(Integer maxMessages) { * * {@codesnippet com.azure.storage.queue.queueAsyncClient.dequeueMessages#integer-duration} * + *

For more information, see the + * Azure Docs.

+ * * @param maxMessages Optional. Maximum number of messages to get, if there are less messages exist in the queue than requested * all the messages will be returned. If left empty only 1 message will be retrieved, the allowed range is 1 to 32 * messages. @@ -376,6 +415,9 @@ public Flux dequeueMessages(Integer maxMessages, Duration visib * * {@codesnippet com.azure.storage.queue.queueAsyncClient.peekMessages} * + *

For more information, see the + * Azure Docs.

+ * * @return A {@link PeekedMessage} that contains metadata about the message. */ public Flux peekMessages() { @@ -394,6 +436,9 @@ public Flux peekMessages() { * * {@codesnippet com.azure.storage.queue.queueAsyncClient.peekMessages#integer} * + *

For more information, see the + * Azure Docs.

+ * * @param maxMessages Optional. Maximum number of messages to peek, if there are less messages exist in the queue than requested * all the messages will be peeked. If left empty only 1 message will be peeked, the allowed range is 1 to 32 * messages. @@ -415,6 +460,9 @@ public Flux peekMessages(Integer maxMessages) { * * {@codesnippet com.azure.storage.queue.queueAsyncClient.updateMessage} * + *

For more information, see the + * Azure Docs.

+ * * @param messageText Updated value for the message * @param messageId Id of the message to update * @param popReceipt Unique identifier that must match for the message to be updated @@ -440,6 +488,9 @@ public Mono> updateMessage(String messageText, String m * * {@codesnippet com.azure.storage.queue.queueAsyncClient.deleteMessage} * + *

For more information, see the + * Azure Docs.

+ * * @param messageId Id of the message to deleted * @param popReceipt Unique identifier that must match for the message to be deleted * @return A response that only contains headers and response status code diff --git a/storage/client/queue/src/main/java/com/azure/storage/queue/QueueClient.java b/storage/client/queue/src/main/java/com/azure/storage/queue/QueueClient.java index 763c58560871e..3e55da311b152 100644 --- a/storage/client/queue/src/main/java/com/azure/storage/queue/QueueClient.java +++ b/storage/client/queue/src/main/java/com/azure/storage/queue/QueueClient.java @@ -63,6 +63,9 @@ public URL getQueueUrl() { * *{@codesnippet com.azure.storage.queue.queueClient.create} * + *

For more information, see the + * Azure Docs.

+ * * @return A response that only contains headers and response status code * @throws StorageErrorException If a queue with the same name already exists in the queue service. */ @@ -79,6 +82,9 @@ public VoidResponse create() { * * {@codesnippet com.azure.storage.queue.queueClient.create#map} * + *

For more information, see the + * Azure Docs.

+ * * @param metadata Metadata to associate with the queue * @return A response that only contains headers and response status code * @throws StorageErrorException If a queue with the same name and different metadata already exists in the queue service. @@ -96,6 +102,9 @@ public VoidResponse create(Map metadata) { * * {@codesnippet com.azure.storage.queue.queueClient.delete} * + *

For more information, see the + * Azure Docs.

+ * * @return A response that only contains headers and response status code * @throws StorageErrorException If the queue doesn't exist */ @@ -112,6 +121,9 @@ public VoidResponse delete() { * * {@codesnippet com.azure.storage.queue.queueClient.getProperties} * + *

For more information, see the + * Azure Docs.

+ * * @return A response containing a {@link QueueProperties} value which contains the metadata and approximate * messages count of the queue. * @throws StorageErrorException If the queue doesn't exist @@ -135,6 +147,9 @@ public Response getProperties() { * * {@codesnippet com.azure.storage.queue.queueClient.clearMetadata#map} * + *

For more information, see the + * Azure Docs.

+ * * @param metadata Metadata to set on the queue * @return A response that only contains headers and response status code * @throws StorageErrorException If the queue doesn't exist @@ -152,6 +167,9 @@ public VoidResponse setMetadata(Map metadata) { * * {@codesnippet com.azure.storage.queue.queueClient.getAccessPolicy} * + *

For more information, see the + * Azure Docs.

+ * * @return The stored access policies specified on the queue. * @throws StorageErrorException If the queue doesn't exist */ @@ -168,6 +186,9 @@ public Iterable getAccessPolicy() { * * {@codesnippet com.azure.storage.queue.queueClient.setAccessPolicy} * + *

For more information, see the + * Azure Docs.

+ * * @param permissions Access policies to set on the queue * @return A response that only contains headers and response status code * @throws StorageErrorException If the queue doesn't exist, a stored access policy doesn't have all fields filled out, @@ -186,6 +207,9 @@ public VoidResponse setAccessPolicy(List permissions) { * * {@codesnippet com.azure.storage.queue.queueClient.clearMessages} * + *

For more information, see the + * Azure Docs.

+ * * @return A response that only contains headers and response status code * @throws StorageErrorException If the queue doesn't exist */ @@ -202,6 +226,9 @@ public VoidResponse clearMessages() { * * {@codesnippet com.azure.storage.queue.queueClient.enqueueMessage#string} * + *

For more information, see the + * Azure Docs.

+ * * @param messageText Message text * @return A {@link EnqueuedMessage} value that contains the {@link EnqueuedMessage#messageId() messageId} and * {@link EnqueuedMessage#popReceipt() popReceipt} that are used to interact with the message and other metadata @@ -225,6 +252,9 @@ public Response enqueueMessage(String messageText) { * * {@codesnippet com.azure.storage.queue.queueClient.enqueueMessageLiveTime#string-duration-duration} * + *

For more information, see the + * Azure Docs.

+ * * @param messageText Message text * @param visibilityTimeout Optional. The timeout period for how long the message is invisible in the queue in seconds. * If unset the value will default to 0 and the message will be instantly visible. The timeout must be between 0 @@ -250,6 +280,9 @@ public Response enqueueMessage(String messageText, Duration vis * * {@codesnippet com.azure.storage.queue.queueClient.dequeueMessages} * + *

For more information, see the + * Azure Docs.

+ * * @return The first {@link DequeuedMessage} in the queue, it contains * {@link DequeuedMessage#messageId() messageId} and {@link DequeuedMessage#popReceipt() popReceipt} used to interact * with the message, additionally it contains other metadata about the message. @@ -268,6 +301,9 @@ public Iterable dequeueMessages() { * * {@codesnippet com.azure.storage.queue.queueClient.dequeueMessages#integer} * + *

For more information, see the + * Azure Docs.

+ * * @param maxMessages Optional. Maximum number of messages to get, if there are less messages exist in the queue than requested * all the messages will be returned. If left empty only 1 message will be retrieved, the allowed range is 1 to 32 * messages. @@ -290,6 +326,9 @@ public Iterable dequeueMessages(Integer maxMessages) { * * {@codesnippet com.azure.storage.queue.queueClient.dequeueMessages#integer-duration} * + *

For more information, see the + * Azure Docs.

+ * * @param maxMessages Optional. Maximum number of messages to get, if there are less messages exist in the queue than requested * all the messages will be returned. If left empty only 1 message will be retrieved, the allowed range is 1 to 32 * messages. @@ -317,6 +356,9 @@ public Iterable dequeueMessages(Integer maxMessages, Duration v * * {@codesnippet com.azure.storage.queue.queueClient.peekMessages} * + *

For more information, see the + * Azure Docs.

+ * * @return A {@link PeekedMessage} that contains metadata about the message. */ public Iterable peekMessages() { @@ -335,6 +377,9 @@ public Iterable peekMessages() { * * {@codesnippet com.azure.storage.queue.queueClient.peekMessages#integer} * + *

For more information, see the + * Azure Docs.

+ * * @param maxMessages Optional. Maximum number of messages to peek, if there are less messages exist in the queue than requested * all the messages will be peeked. If left empty only 1 message will be peeked, the allowed range is 1 to 32 * messages. @@ -355,6 +400,9 @@ public Iterable peekMessages(Integer maxMessages) { * * {@codesnippet com.azure.storage.queue.queueClient.updateMessage} * + *

For more information, see the + * Azure Docs.

+ * * @param messageText Updated value for the message * @param messageId Id of the message to update * @param popReceipt Unique identifier that must match for the message to be updated @@ -378,6 +426,9 @@ public Response updateMessage(String messageText, String message * * {@codesnippet com.azure.storage.queue.queueClient.deleteMessage} * + *

For more information, see the + * Azure Docs.

+ * * @param messageId Id of the message to deleted * @param popReceipt Unique identifier that must match for the message to be deleted * @return A response that only contains headers and response status code diff --git a/storage/client/queue/src/main/java/com/azure/storage/queue/QueueServiceAsyncClient.java b/storage/client/queue/src/main/java/com/azure/storage/queue/QueueServiceAsyncClient.java index 6e6b099653bca..74a6e978a4f07 100644 --- a/storage/client/queue/src/main/java/com/azure/storage/queue/QueueServiceAsyncClient.java +++ b/storage/client/queue/src/main/java/com/azure/storage/queue/QueueServiceAsyncClient.java @@ -21,13 +21,14 @@ import com.azure.storage.queue.models.StorageErrorException; import com.azure.storage.queue.models.StorageServiceProperties; import com.azure.storage.queue.models.StorageServiceStats; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; + import java.net.MalformedURLException; import java.net.URL; import java.util.ArrayList; import java.util.List; import java.util.Map; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; /** * This class provides a client that contains all the operations for interacting with a queue account in Azure Storage. @@ -153,6 +154,9 @@ public Mono deleteQueue(String queueName) { * * {@codesnippet com.azure.storage.queue.queueServiceAsyncClient.listQueues} * + *

For more information, see the + * Azure Docs.

+ * * @return {@link QueueItem Queues} in the storage account */ public Flux listQueues() { @@ -171,6 +175,9 @@ public Flux listQueues() { * * {@codesnippet com.azure.storage.queue.queueServiceClient.listQueues#queueSergmentOptions} * + *

For more information, see the + * Azure Docs.

+ * * @param options Options for listing queues * @return {@link QueueItem Queues} in the storage account that satisfy the filter requirements */ @@ -240,6 +247,9 @@ private Flux extractAndFetchQueues(ServicesListQueuesSegmentResponse * * {@codesnippet com.azure.storage.queue.queueServiceAsyncClient.getProperties} * + *

For more information, see the + * Azure Docs.

+ * * @return Storage account Queue service properties */ public Mono> getProperties() { @@ -264,6 +274,9 @@ public Mono> getProperties() { * * {@codesnippet com.azure.storage.queue.queueServiceAsyncClient.setPropertiesEnableMetrics#storageServiceProperties} * + *

For more information, see the + * Azure Docs.

+ * * @param properties Storage account Queue service properties * @return A response that only contains headers and response status code * @throws StorageErrorException When one of the following is true @@ -292,6 +305,9 @@ public Mono setProperties(StorageServiceProperties properties) { * * {@codesnippet com.azure.storage.queue.queueServiceAsyncClient.getStatistics} * + *

For more information, see the + * Azure Docs.

+ * * @return The geo replication information about the Queue service */ public Mono> getStatistics() { diff --git a/storage/client/queue/src/main/java/com/azure/storage/queue/QueueServiceClient.java b/storage/client/queue/src/main/java/com/azure/storage/queue/QueueServiceClient.java index a002e5b12f872..78ef5b204281b 100644 --- a/storage/client/queue/src/main/java/com/azure/storage/queue/QueueServiceClient.java +++ b/storage/client/queue/src/main/java/com/azure/storage/queue/QueueServiceClient.java @@ -127,6 +127,9 @@ public VoidResponse deleteQueue(String queueName) { * * {@codesnippet com.azure.storage.queue.queueServiceClient.listQueues} * + *

For more information, see the + * Azure Docs.

+ * * @return {@link QueueItem Queues} in the storage account */ public Iterable listQueues() { @@ -145,6 +148,9 @@ public Iterable listQueues() { * * {@codesnippet com.azure.storage.queue.queueServiceClient.listQueues#queueSergmentOptions} * + *

For more information, see the + * Azure Docs.

+ * * @param options Options for listing queues * @return {@link QueueItem Queues} in the storage account that satisfy the filter requirements */ @@ -176,6 +182,9 @@ Iterable listQueues(String marker, QueuesSegmentOptions options) { * * {@codesnippet com.azure.storage.queue.queueServiceClient.getProperties} * + *

For more information, see the + * Azure Docs.

+ * * @return Storage account Queue service properties */ public Response getProperties() { @@ -199,6 +208,9 @@ public Response getProperties() { * * {@codesnippet com.azure.storage.queue.queueServiceClient.setPropertiesEnableMetrics#storageServiceProperties} * + *

For more information, see the + * Azure Docs.

+ * * @param properties Storage account Queue service properties * @return A response that only contains headers and response status code * @throws StorageErrorException When one of the following is true @@ -226,6 +238,9 @@ public VoidResponse setProperties(StorageServiceProperties properties) { * * {@codesnippet com.azure.storage.queue.queueServiceClient.getStatistics} * + *

For more information, see the + * Azure Docs.

+ * * @return The geo replication information about the Queue service */ public Response getStatistics() {