Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Storage Queues] Add autorest layer to storage queues #5687

Merged
merged 2 commits into from
Jun 5, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
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
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

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)
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)
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']
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)
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)
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',
]
Loading