-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Storage Queues] Add autorest layer to storage queues (#5687)
* add queue.json in swagger * Add autorest layer
- Loading branch information
1 parent
f8b32eb
commit 219bdf5
Showing
22 changed files
with
6,057 additions
and
0 deletions.
There are no files selected for viewing
15 changes: 15 additions & 0 deletions
15
sdk/storage/azure-storage-queue/azure/storage/queue/_generated/__init__.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# coding=utf-8 | ||
# -------------------------------------------------------------------------- | ||
# Code generated by Microsoft (R) AutoRest Code Generator. | ||
# Changes may cause incorrect behavior and will be lost if the code is | ||
# regenerated. | ||
# -------------------------------------------------------------------------- | ||
|
||
from ._configuration import AzureQueueStorageConfiguration | ||
from ._azure_queue_storage import AzureQueueStorage | ||
__all__ = ['AzureQueueStorage', 'AzureQueueStorageConfiguration'] | ||
|
||
from .version import VERSION | ||
|
||
__version__ = VERSION | ||
|
62 changes: 62 additions & 0 deletions
62
sdk/storage/azure-storage-queue/azure/storage/queue/_generated/_azure_queue_storage.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
# coding=utf-8 | ||
# -------------------------------------------------------------------------- | ||
# Code generated by Microsoft (R) AutoRest Code Generator. | ||
# Changes may cause incorrect behavior and will be lost if the code is | ||
# regenerated. | ||
# -------------------------------------------------------------------------- | ||
|
||
from azure.core import PipelineClient | ||
from msrest import Serializer, Deserializer | ||
|
||
from ._configuration import AzureQueueStorageConfiguration | ||
from azure.core.exceptions import map_error | ||
from .operations import ServiceOperations | ||
from .operations import QueueOperations | ||
from .operations import MessagesOperations | ||
from .operations import MessageIdOperations | ||
from . import models | ||
|
||
|
||
class AzureQueueStorage(object): | ||
"""AzureQueueStorage | ||
:ivar service: Service operations | ||
:vartype service: queue.operations.ServiceOperations | ||
:ivar queue: Queue operations | ||
:vartype queue: queue.operations.QueueOperations | ||
:ivar messages: Messages operations | ||
:vartype messages: queue.operations.MessagesOperations | ||
:ivar message_id: MessageId operations | ||
:vartype message_id: queue.operations.MessageIdOperations | ||
:param url: The URL of the service account, queue or message that is the | ||
targe of the desired operation. | ||
:type url: str | ||
""" | ||
|
||
def __init__(self, url, config=None, **kwargs): | ||
|
||
base_url = '{url}' | ||
self._config = config or AzureQueueStorageConfiguration(url, **kwargs) | ||
self._client = PipelineClient(base_url=base_url, config=self._config, **kwargs) | ||
|
||
client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} | ||
self.api_version = '2018-03-28' | ||
self._serialize = Serializer(client_models) | ||
self._deserialize = Deserializer(client_models) | ||
|
||
self.service = ServiceOperations( | ||
self._client, self._config, self._serialize, self._deserialize) | ||
self.queue = QueueOperations( | ||
self._client, self._config, self._serialize, self._deserialize) | ||
self.messages = MessagesOperations( | ||
self._client, self._config, self._serialize, self._deserialize) | ||
self.message_id = MessageIdOperations( | ||
self._client, self._config, self._serialize, self._deserialize) | ||
|
||
def __enter__(self): | ||
self._client.__enter__() | ||
return self | ||
def __exit__(self, *exc_details): | ||
self._client.__exit__(*exc_details) |
50 changes: 50 additions & 0 deletions
50
sdk/storage/azure-storage-queue/azure/storage/queue/_generated/_configuration.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
# coding=utf-8 | ||
# -------------------------------------------------------------------------- | ||
# Code generated by Microsoft (R) AutoRest Code Generator. | ||
# Changes may cause incorrect behavior and will be lost if the code is | ||
# regenerated. | ||
# -------------------------------------------------------------------------- | ||
|
||
from azure.core.configuration import Configuration, ConnectionConfiguration | ||
from azure.core.pipeline import policies | ||
|
||
from .version import VERSION | ||
|
||
|
||
class AzureQueueStorageConfiguration(Configuration): | ||
"""Configuration for AzureQueueStorage | ||
Note that all parameters used to create this instance are saved as instance | ||
attributes. | ||
:param url: The URL of the service account, queue or message that is the | ||
targe of the desired operation. | ||
:type url: str | ||
:ivar version: Specifies the version of the operation to use for this | ||
request. | ||
:type version: str | ||
""" | ||
|
||
def __init__(self, url, **kwargs): | ||
|
||
if url is None: | ||
raise ValueError("Parameter 'url' must not be None.") | ||
|
||
super(AzureQueueStorageConfiguration, self).__init__(**kwargs) | ||
self._configure(**kwargs) | ||
|
||
self.user_agent_policy.add_user_agent('azurequeuestorage/{}'.format(VERSION)) | ||
self.generate_client_request_id = True | ||
self.accept_language = None | ||
|
||
self.url = url | ||
self.version = "2018-03-28" | ||
|
||
def _configure(self, **kwargs): | ||
self.connection = ConnectionConfiguration(**kwargs) | ||
self.user_agent_policy = policies.UserAgentPolicy(**kwargs) | ||
self.headers_policy = policies.HeadersPolicy(**kwargs) | ||
self.proxy_policy = policies.ProxyPolicy(**kwargs) | ||
self.logging_policy = policies.NetworkTraceLoggingPolicy(**kwargs) | ||
self.retry_policy = policies.RetryPolicy(**kwargs) | ||
self.custom_hook_policy = policies.CustomHookPolicy(**kwargs) | ||
self.redirect_policy = policies.RedirectPolicy(**kwargs) |
10 changes: 10 additions & 0 deletions
10
sdk/storage/azure-storage-queue/azure/storage/queue/_generated/aio/__init__.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# coding=utf-8 | ||
# -------------------------------------------------------------------------- | ||
# Code generated by Microsoft (R) AutoRest Code Generator. | ||
# Changes may cause incorrect behavior and will be lost if the code is | ||
# regenerated. | ||
# -------------------------------------------------------------------------- | ||
|
||
from ._azure_queue_storage_async import AzureQueueStorage | ||
from ._configuration_async import AzureQueueStorageConfiguration | ||
__all__ = ['AzureQueueStorage', 'AzureQueueStorageConfiguration'] |
63 changes: 63 additions & 0 deletions
63
...rage/azure-storage-queue/azure/storage/queue/_generated/aio/_azure_queue_storage_async.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
# coding=utf-8 | ||
# -------------------------------------------------------------------------- | ||
# Code generated by Microsoft (R) AutoRest Code Generator. | ||
# Changes may cause incorrect behavior and will be lost if the code is | ||
# regenerated. | ||
# -------------------------------------------------------------------------- | ||
|
||
from azure.core import AsyncPipelineClient | ||
from msrest import Serializer, Deserializer | ||
|
||
from ._configuration_async import AzureQueueStorageConfiguration | ||
from azure.core.exceptions import map_error | ||
from .operations_async import ServiceOperations | ||
from .operations_async import QueueOperations | ||
from .operations_async import MessagesOperations | ||
from .operations_async import MessageIdOperations | ||
from .. import models | ||
|
||
|
||
class AzureQueueStorage(object): | ||
"""AzureQueueStorage | ||
:ivar service: Service operations | ||
:vartype service: queue.aio.operations_async.ServiceOperations | ||
:ivar queue: Queue operations | ||
:vartype queue: queue.aio.operations_async.QueueOperations | ||
:ivar messages: Messages operations | ||
:vartype messages: queue.aio.operations_async.MessagesOperations | ||
:ivar message_id: MessageId operations | ||
:vartype message_id: queue.aio.operations_async.MessageIdOperations | ||
:param url: The URL of the service account, queue or message that is the | ||
targe of the desired operation. | ||
:type url: str | ||
""" | ||
|
||
def __init__( | ||
self, url, config=None, **kwargs): | ||
|
||
base_url = '{url}' | ||
self._config = config or AzureQueueStorageConfiguration(url, **kwargs) | ||
self._client = AsyncPipelineClient(base_url=base_url, config=self._config, **kwargs) | ||
|
||
client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} | ||
self.api_version = '2018-03-28' | ||
self._serialize = Serializer(client_models) | ||
self._deserialize = Deserializer(client_models) | ||
|
||
self.service = ServiceOperations( | ||
self._client, self._config, self._serialize, self._deserialize) | ||
self.queue = QueueOperations( | ||
self._client, self._config, self._serialize, self._deserialize) | ||
self.messages = MessagesOperations( | ||
self._client, self._config, self._serialize, self._deserialize) | ||
self.message_id = MessageIdOperations( | ||
self._client, self._config, self._serialize, self._deserialize) | ||
|
||
async def __aenter__(self): | ||
await self._client.__aenter__() | ||
return self | ||
async def __aexit__(self, *exc_details): | ||
await self._client.__aexit__(*exc_details) |
49 changes: 49 additions & 0 deletions
49
sdk/storage/azure-storage-queue/azure/storage/queue/_generated/aio/_configuration_async.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
# coding=utf-8 | ||
# -------------------------------------------------------------------------- | ||
# Code generated by Microsoft (R) AutoRest Code Generator. | ||
# Changes may cause incorrect behavior and will be lost if the code is | ||
# regenerated. | ||
# -------------------------------------------------------------------------- | ||
|
||
from azure.core.configuration import Configuration, ConnectionConfiguration | ||
from azure.core.pipeline import policies | ||
|
||
from ..version import VERSION | ||
|
||
|
||
class AzureQueueStorageConfiguration(Configuration): | ||
"""Configuration for AzureQueueStorage | ||
Note that all parameters used to create this instance are saved as instance | ||
attributes. | ||
:param url: The URL of the service account, queue or message that is the | ||
targe of the desired operation. | ||
:type url: str | ||
:ivar version: Specifies the version of the operation to use for this | ||
request. | ||
:type version: str | ||
""" | ||
|
||
def __init__(self, url, **kwargs): | ||
|
||
if url is None: | ||
raise ValueError("Parameter 'url' must not be None.") | ||
|
||
super(AzureQueueStorageConfiguration, self).__init__(**kwargs) | ||
self._configure(**kwargs) | ||
|
||
self.user_agent_policy.add_user_agent('azurequeuestorage/{}'.format(VERSION)) | ||
self.generate_client_request_id = True | ||
self.accept_language = None | ||
|
||
self.url = url | ||
self.version = "2018-03-28" | ||
|
||
def _configure(self, **kwargs): | ||
self.connection = ConnectionConfiguration(**kwargs) | ||
self.user_agent_policy = policies.UserAgentPolicy(**kwargs) | ||
self.headers_policy = policies.HeadersPolicy(**kwargs) | ||
self.proxy_policy = policies.ProxyPolicy(**kwargs) | ||
self.logging_policy = policies.NetworkTraceLoggingPolicy(**kwargs) | ||
self.retry_policy = policies.AsyncRetryPolicy(**kwargs) | ||
self.redirect_policy = policies.AsyncRedirectPolicy(**kwargs) |
18 changes: 18 additions & 0 deletions
18
...orage/azure-storage-queue/azure/storage/queue/_generated/aio/operations_async/__init__.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# coding=utf-8 | ||
# -------------------------------------------------------------------------- | ||
# Code generated by Microsoft (R) AutoRest Code Generator. | ||
# Changes may cause incorrect behavior and will be lost if the code is | ||
# regenerated. | ||
# -------------------------------------------------------------------------- | ||
|
||
from ._service_operations_async import ServiceOperations | ||
from ._queue_operations_async import QueueOperations | ||
from ._messages_operations_async import MessagesOperations | ||
from ._message_id_operations_async import MessageIdOperations | ||
|
||
__all__ = [ | ||
'ServiceOperations', | ||
'QueueOperations', | ||
'MessagesOperations', | ||
'MessageIdOperations', | ||
] |
Oops, something went wrong.