Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Queue docstrings
  • Loading branch information
lmazuel committed Oct 4, 2019
commit 1af42322e0b99477579e42d00be2824bad3ebfd1
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class MessagesPaged(AsyncPageIterator):

:ivar int results_per_page: The maximum number of results retrieved per API call.
:ivar current_page: The current page of listed results.
:vartype current_page: list(~azure.storage.queue.models.QueueMessage)
:vartype current_page: list(~azure.storage.queue.QueueMessage)

:param callable command: Function to retrieve the next page of items.
:param int results_per_page: The maximum number of messages to retrieve per
Expand Down Expand Up @@ -61,7 +61,7 @@ class QueuePropertiesPaged(AsyncPageIterator):
:ivar str location_mode: The location mode being used to list results. The available
options include "primary" and "secondary".
:ivar current_page: The current page of listed results.
:vartype current_page: list(~azure.storage.queue.models.QueueProperties)
:vartype current_page: list(~azure.storage.queue.QueueProperties)

:param callable command: Function to retrieve the next page of items.
:param str prefix: Filters the results to return only queues whose names
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ class QueueClient(AsyncStorageAccountHostsMixin, QueueClientBase):
account, in which case the queue must also be specified.
:param queue: The queue. If specified, this value will override
a queue value specified in the queue URL.
:type queue: str or ~azure.storage.queue.models.QueueProperties
:type queue: str or ~azure.storage.queue.QueueProperties
:param credential:
The credentials with which to authenticate. This is optional if the
account URL already has a SAS token. The value can be a SAS token string, and account
Expand Down Expand Up @@ -193,7 +193,7 @@ async def get_queue_properties(self, timeout=None, **kwargs): # type: ignore
:param int timeout:
The timeout parameter is expressed in seconds.
:return: Properties for the specified container within a container object.
:rtype: ~azure.storage.queue.models.QueueProperties
:rtype: ~azure.storage.queue.QueueProperties

.. admonition:: Example:

Expand Down Expand Up @@ -254,7 +254,7 @@ async def get_queue_access_policy(self, timeout=None, **kwargs): # type: ignore
:param int timeout:
The server timeout, expressed in seconds.
:return: A dictionary of access policies associated with the queue.
:rtype: dict(str, :class:`~azure.storage.queue.models.AccessPolicy`)
:rtype: dict(str, ~azure.storage.queue.AccessPolicy)
"""
try:
_, identifiers = await self._client.queue.get_access_policy(
Expand Down Expand Up @@ -285,7 +285,7 @@ async def set_queue_access_policy(self, signed_identifiers=None, timeout=None, *
A list of SignedIdentifier access policies to associate with the queue.
The list may contain up to 5 elements. An empty list
will clear the access policies set on the service.
:type signed_identifiers: dict(str, :class:`~azure.storage.queue.models.AccessPolicy`)
:type signed_identifiers: dict(str, ~azure.storage.queue.AccessPolicy)
:param int timeout:
The server timeout, expressed in seconds.

Expand Down Expand Up @@ -357,10 +357,10 @@ async def enqueue_message( # type: ignore
:param int timeout:
The server timeout, expressed in seconds.
:return:
A :class:`~azure.storage.queue.models.QueueMessage` object.
A :class:`~azure.storage.queue.QueueMessage` object.
This object is also populated with the content although it is not
returned from the service.
:rtype: ~azure.storage.queue.models.QueueMessage
:rtype: ~azure.storage.queue.QueueMessage

.. admonition:: Example:

Expand Down Expand Up @@ -427,7 +427,7 @@ def receive_messages(self, messages_per_page=None, visibility_timeout=None, time
The server timeout, expressed in seconds.
:return:
Returns a message iterator of dict-like Message objects.
:rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.storage.queue.models.Message]
:rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.storage.queue.Message]

.. admonition:: Example:

Expand Down Expand Up @@ -498,9 +498,9 @@ async def update_message(
:param int timeout:
The server timeout, expressed in seconds.
:return:
A :class:`~azure.storage.queue.models.QueueMessage` object. For convenience,
A :class:`~azure.storage.queue.QueueMessage` object. For convenience,
this object is also populated with the content, although it is not returned by the service.
:rtype: ~azure.storage.queue.models.QueueMessage
:rtype: ~azure.storage.queue.QueueMessage

.. admonition:: Example:

Expand Down Expand Up @@ -581,10 +581,10 @@ async def peek_messages(self, max_messages=None, timeout=None, **kwargs): # typ
:param int timeout:
The server timeout, expressed in seconds.
:return:
A list of :class:`~azure.storage.queue.models.QueueMessage` objects. Note that
A list of :class:`~azure.storage.queue.QueueMessage` objects. Note that
time_next_visible and pop_receipt will not be populated as peek does
not pop the message and can only retrieve already visible messages.
:rtype: list(:class:`~azure.storage.queue.models.QueueMessage`)
:rtype: list(:class:`~azure.storage.queue.QueueMessage`)

.. admonition:: Example:

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -181,20 +181,20 @@ async def set_service_properties( # type: ignore

:param logging:
Groups the Azure Analytics Logging settings.
:type logging: ~azure.storage.queue.models.Logging
:type logging: ~azure.storage.queue.Logging
:param hour_metrics:
The hour metrics settings provide a summary of request
statistics grouped by API in hourly aggregates for queues.
:type hour_metrics: ~azure.storage.queue.models.Metrics
:type hour_metrics: ~azure.storage.queue.Metrics
:param minute_metrics:
The minute metrics settings provide request statistics
for each minute for queues.
:type minute_metrics: ~azure.storage.queue.models.Metrics
:type minute_metrics: ~azure.storage.queue.Metrics
:param cors:
You can include up to five CorsRule elements in the
list. If an empty list is specified, all CORS rules will be deleted,
and CORS will be disabled for the service.
:type cors: list(:class:`~azure.storage.queue.models.CorsRule`)
:type cors: list(~azure.storage.queue.CorsRule)
:param int timeout:
The timeout parameter is expressed in seconds.
:rtype: None
Expand Down Expand Up @@ -288,7 +288,7 @@ async def create_queue( # type: ignore
:type metadata: dict(str, str)
:param int timeout:
The timeout parameter is expressed in seconds.
:rtype: ~azure.storage.queue.aio.queue_client_async.QueueClient
:rtype: ~azure.storage.queue.aio.QueueClient

.. admonition:: Example:

Expand Down Expand Up @@ -325,7 +325,7 @@ async def delete_queue( # type: ignore
:param queue:
The queue to delete. This can either be the name of the queue,
or an instance of QueueProperties.
:type queue: str or ~azure.storage.queue.models.QueueProperties
:type queue: str or ~azure.storage.queue.QueueProperties
:param int timeout:
The timeout parameter is expressed in seconds.
:rtype: None
Expand All @@ -352,9 +352,9 @@ def get_queue_client(self, queue, **kwargs):
:param queue:
The queue. This can either be the name of the queue,
or an instance of QueueProperties.
:type queue: str or ~azure.storage.queue.models.QueueProperties
:type queue: str or ~azure.storage.queue.QueueProperties
:returns: A :class:`~azure.core.queue.queue_client.QueueClient` object.
:rtype: ~azure.storage.queue.aio.queue_client_async.QueueClient
:rtype: ~azure.storage.queue.aio.QueueClient

.. admonition:: Example:

Expand Down
8 changes: 4 additions & 4 deletions sdk/storage/azure-storage-queue/azure/storage/queue/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ class Logging(GeneratedLogging):
:ivar bool write: Required. Indicates whether all write requests should be logged.
:ivar retention_policy: Required.
The retention policy for the metrics.
:vartype retention_policy: ~azure.storage.queue.models.RetentionPolicy
:vartype retention_policy: ~azure.storage.queue.RetentionPolicy
"""

def __init__(self, **kwargs):
Expand All @@ -51,7 +51,7 @@ class Metrics(GeneratedMetrics):
statistics for called API operations.
:ivar retention_policy: Required.
The retention policy for the metrics.
:vartype retention_policy: ~azure.storage.queue.models.RetentionPolicy
:vartype retention_policy: ~azure.storage.queue.RetentionPolicy
"""

def __init__(self, **kwargs):
Expand Down Expand Up @@ -223,7 +223,7 @@ class MessagesPaged(PageIterator):

:ivar int results_per_page: The maximum number of results retrieved per API call.
:ivar current_page: The current page of listed results.
:vartype current_page: list(~azure.storage.queue.models.QueueMessage)
:vartype current_page: list(~azure.storage.queue.QueueMessage)

:param callable command: Function to retrieve the next page of items.
:param int results_per_page: The maximum number of messages to retrieve per
Expand Down Expand Up @@ -289,7 +289,7 @@ class QueuePropertiesPaged(PageIterator):
:ivar str location_mode: The location mode being used to list results. The available
options include "primary" and "secondary".
:ivar current_page: The current page of listed results.
:vartype current_page: list(~azure.storage.queue.models.QueueProperties)
:vartype current_page: list(~azure.storage.queue.QueueProperties)

:param callable command: Function to retrieve the next page of items.
:param str prefix: Filters the results to return only queues whose names
Expand Down
26 changes: 13 additions & 13 deletions sdk/storage/azure-storage-queue/azure/storage/queue/queue_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ class QueueClient(StorageAccountHostsMixin):
account, in which case the queue must also be specified.
:param queue: The queue. If specified, this value will override
a queue value specified in the queue URL.
:type queue: str or ~azure.storage.queue.models.QueueProperties
:type queue: str or ~azure.storage.queue.QueueProperties
:param credential:
The credentials with which to authenticate. This is optional if the
account URL already has a SAS token. The value can be a SAS token string, and account
Expand Down Expand Up @@ -141,7 +141,7 @@ def from_connection_string(
A connection string to an Azure Storage account.
:param queue: The queue. This can either be the name of the queue,
or an instance of QueueProperties.
:type queue: str or ~azure.storage.queue.models.QueueProperties
:type queue: str or ~azure.storage.queue.QueueProperties
:param credential:
The credentials with which to authenticate. This is optional if the
account URL already has a SAS token, or the connection string already has shared
Expand Down Expand Up @@ -175,7 +175,7 @@ def generate_shared_access_signature(

Use the returned signature with the credential parameter of any Queue Service.

:param ~azure.storage.queue.models.QueuePermissions permission:
:param ~azure.storage.queue.QueuePermissions permission:
The permissions associated with the shared access signature. The
user is restricted to operations allowed by the permissions.
Required unless a policy_id is given referencing a stored access policy
Expand Down Expand Up @@ -315,7 +315,7 @@ def get_queue_properties(self, timeout=None, **kwargs):
:param int timeout:
The timeout parameter is expressed in seconds.
:return: Properties for the specified container within a container object.
:rtype: ~azure.storage.queue.models.QueueProperties
:rtype: ~azure.storage.queue.QueueProperties

.. admonition:: Example:

Expand Down Expand Up @@ -379,7 +379,7 @@ def get_queue_access_policy(self, timeout=None, **kwargs):
:param int timeout:
The server timeout, expressed in seconds.
:return: A dictionary of access policies associated with the queue.
:rtype: dict(str, :class:`~azure.storage.queue.models.AccessPolicy`)
:rtype: dict(str, ~azure.storage.queue.AccessPolicy)
"""
try:
_, identifiers = self._client.queue.get_access_policy(
Expand Down Expand Up @@ -411,7 +411,7 @@ def set_queue_access_policy(self, signed_identifiers=None, timeout=None, **kwarg
A list of SignedIdentifier access policies to associate with the queue.
The list may contain up to 5 elements. An empty list
will clear the access policies set on the service.
:type signed_identifiers: dict(str, :class:`~azure.storage.queue.models.AccessPolicy`)
:type signed_identifiers: dict(str, ~azure.storage.queue.AccessPolicy)
:param int timeout:
The server timeout, expressed in seconds.

Expand Down Expand Up @@ -484,10 +484,10 @@ def enqueue_message( # type: ignore
:param int timeout:
The server timeout, expressed in seconds.
:return:
A :class:`~azure.storage.queue.models.QueueMessage` object.
A :class:`~azure.storage.queue.QueueMessage` object.
This object is also populated with the content although it is not
returned from the service.
:rtype: ~azure.storage.queue.models.QueueMessage
:rtype: ~azure.storage.queue.QueueMessage

.. admonition:: Example:

Expand Down Expand Up @@ -552,7 +552,7 @@ def receive_messages(self, messages_per_page=None, visibility_timeout=None, time
The server timeout, expressed in seconds.
:return:
Returns a message iterator of dict-like Message objects.
:rtype: ~azure.core.paging.ItemPaged[~azure.storage.queue.models.Message]
:rtype: ~azure.core.paging.ItemPaged[~azure.storage.queue.Message]

.. admonition:: Example:

Expand Down Expand Up @@ -615,9 +615,9 @@ def update_message(self, message, visibility_timeout=None, pop_receipt=None, # t
:param int timeout:
The server timeout, expressed in seconds.
:return:
A :class:`~azure.storage.queue.models.QueueMessage` object. For convenience,
A :class:`~azure.storage.queue.QueueMessage` object. For convenience,
this object is also populated with the content, although it is not returned by the service.
:rtype: ~azure.storage.queue.models.QueueMessage
:rtype: ~azure.storage.queue.QueueMessage

.. admonition:: Example:

Expand Down Expand Up @@ -698,10 +698,10 @@ def peek_messages(self, max_messages=None, timeout=None, **kwargs): # type: igno
:param int timeout:
The server timeout, expressed in seconds.
:return:
A list of :class:`~azure.storage.queue.models.QueueMessage` objects. Note that
A list of :class:`~azure.storage.queue.QueueMessage` objects. Note that
time_next_visible and pop_receipt will not be populated as peek does
not pop the message and can only retrieve already visible messages.
:rtype: list(:class:`~azure.storage.queue.models.QueueMessage`)
:rtype: list(:class:`~azure.storage.queue.QueueMessage`)

.. admonition:: Example:

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -173,14 +173,14 @@ def generate_shared_access_signature(
been specified in an associated stored access policy. Azure will always
convert values to UTC. If a date is passed in without timezone info, it
is assumed to be UTC.
:type expiry: datetime or str
:type expiry: ~datetime.datetime or str
:param start:
The time at which the shared access signature becomes valid. If
omitted, start time for this call is assumed to be the time when the
storage service receives the request. Azure will always convert values
to UTC. If a date is passed in without timezone info, it is assumed to
be UTC.
:type start: datetime or str
:type start: ~datetime.datetime or str
:param str ip:
Specifies an IP address or a range of IP addresses from which to accept requests.
If the IP address from which the request originates does not match the IP address
Expand Down Expand Up @@ -281,20 +281,20 @@ def set_service_properties( # type: ignore

:param logging:
Groups the Azure Analytics Logging settings.
:type logging: ~azure.storage.queue.models.Logging
:type logging: ~azure.storage.queue.Logging
:param hour_metrics:
The hour metrics settings provide a summary of request
statistics grouped by API in hourly aggregates for queues.
:type hour_metrics: ~azure.storage.queue.models.Metrics
:type hour_metrics: ~azure.storage.queue.Metrics
:param minute_metrics:
The minute metrics settings provide request statistics
for each minute for queues.
:type minute_metrics: ~azure.storage.queue.models.Metrics
:type minute_metrics: ~azure.storage.queue.Metrics
:param cors:
You can include up to five CorsRule elements in the
list. If an empty list is specified, all CORS rules will be deleted,
and CORS will be disabled for the service.
:type cors: list(:class:`~azure.storage.queue.models.CorsRule`)
:type cors: list(~azure.storage.queue.CorsRule)
:param int timeout:
The timeout parameter is expressed in seconds.
:rtype: None
Expand Down Expand Up @@ -389,7 +389,7 @@ def create_queue(
:type metadata: dict(str, str)
:param int timeout:
The timeout parameter is expressed in seconds.
:rtype: ~azure.storage.queue.queue_client.QueueClient
:rtype: ~azure.storage.queue.QueueClient

.. admonition:: Example:

Expand Down Expand Up @@ -426,7 +426,7 @@ def delete_queue(
:param queue:
The queue to delete. This can either be the name of the queue,
or an instance of QueueProperties.
:type queue: str or ~azure.storage.queue.models.QueueProperties
:type queue: str or ~azure.storage.queue.QueueProperties
:param int timeout:
The timeout parameter is expressed in seconds.
:rtype: None
Expand All @@ -453,7 +453,7 @@ def get_queue_client(self, queue, **kwargs):
:param queue:
The queue. This can either be the name of the queue,
or an instance of QueueProperties.
:type queue: str or ~azure.storage.queue.models.QueueProperties
:type queue: str or ~azure.storage.queue.QueueProperties
:returns: A :class:`~azure.core.queue.queue_client.QueueClient` object.
:rtype: ~azure.core.queue.queue_client.QueueClient

Expand Down