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

Generate files autorest layer #5926

Merged
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 AzureFileStorageConfiguration
from ._azure_file_storage import AzureFileStorage
__all__ = ['AzureFileStorage', 'AzureFileStorageConfiguration']

from .version import VERSION

__version__ = VERSION

Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
# 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 AzureFileStorageConfiguration
from azure.core.exceptions import map_error
from .operations import ServiceOperations
from .operations import ShareOperations
from .operations import DirectoryOperations
from .operations import FileOperations
from . import models


class AzureFileStorage(object):
"""AzureFileStorage


:ivar service: Service operations
:vartype service: file.operations.ServiceOperations
:ivar share: Share operations
:vartype share: file.operations.ShareOperations
:ivar directory: Directory operations
:vartype directory: file.operations.DirectoryOperations
:ivar file: File operations
:vartype file: file.operations.FileOperations

:param version: Specifies the version of the operation to use for this
request.
:type version: str
:param url: The URL of the service account, share, directory or file that
is the target of the desired operation.
:type url: str
"""

def __init__(self, version, url, config=None, **kwargs):

base_url = '{url}'
self._config = config or AzureFileStorageConfiguration(version, 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-11-09'
self._serialize = Serializer(client_models)
self._deserialize = Deserializer(client_models)

self.service = ServiceOperations(
self._client, self._config, self._serialize, self._deserialize)
self.share = ShareOperations(
self._client, self._config, self._serialize, self._deserialize)
self.directory = DirectoryOperations(
self._client, self._config, self._serialize, self._deserialize)
self.file = FileOperations(
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,52 @@
# 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 AzureFileStorageConfiguration(Configuration):
"""Configuration for AzureFileStorage
Note that all parameters used to create this instance are saved as instance
attributes.

:param version: Specifies the version of the operation to use for this
request.
:type version: str
:param url: The URL of the service account, share, directory or file that
is the target of the desired operation.
:type url: str
"""

def __init__(self, version, url, **kwargs):

if version is None:
raise ValueError("Parameter 'version' must not be None.")
if url is None:
raise ValueError("Parameter 'url' must not be None.")

super(AzureFileStorageConfiguration, self).__init__(**kwargs)
self._configure(**kwargs)

self.user_agent_policy.add_user_agent('azurefilestorage/{}'.format(VERSION))
self.generate_client_request_id = True
self.accept_language = None

self.version = version
self.url = url

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_file_storage_async import AzureFileStorage
from ._configuration_async import AzureFileStorageConfiguration
__all__ = ['AzureFileStorage', 'AzureFileStorageConfiguration']
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
# 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 AzureFileStorageConfiguration
from azure.core.exceptions import map_error
from .operations_async import ServiceOperations
from .operations_async import ShareOperations
from .operations_async import DirectoryOperations
from .operations_async import FileOperations
from .. import models


class AzureFileStorage(object):
"""AzureFileStorage


:ivar service: Service operations
:vartype service: file.aio.operations_async.ServiceOperations
:ivar share: Share operations
:vartype share: file.aio.operations_async.ShareOperations
:ivar directory: Directory operations
:vartype directory: file.aio.operations_async.DirectoryOperations
:ivar file: File operations
:vartype file: file.aio.operations_async.FileOperations

:param version: Specifies the version of the operation to use for this
request.
:type version: str
:param url: The URL of the service account, share, directory or file that
is the target of the desired operation.
:type url: str
"""

def __init__(
self, version, url, config=None, **kwargs):

base_url = '{url}'
self._config = config or AzureFileStorageConfiguration(version, 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-11-09'
self._serialize = Serializer(client_models)
self._deserialize = Deserializer(client_models)

self.service = ServiceOperations(
self._client, self._config, self._serialize, self._deserialize)
self.share = ShareOperations(
self._client, self._config, self._serialize, self._deserialize)
self.directory = DirectoryOperations(
self._client, self._config, self._serialize, self._deserialize)
self.file = FileOperations(
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,51 @@
# 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 AzureFileStorageConfiguration(Configuration):
"""Configuration for AzureFileStorage
Note that all parameters used to create this instance are saved as instance
attributes.

:param version: Specifies the version of the operation to use for this
request.
:type version: str
:param url: The URL of the service account, share, directory or file that
is the target of the desired operation.
:type url: str
"""

def __init__(self, version, url, **kwargs):

if version is None:
raise ValueError("Parameter 'version' must not be None.")
if url is None:
raise ValueError("Parameter 'url' must not be None.")

super(AzureFileStorageConfiguration, self).__init__(**kwargs)
self._configure(**kwargs)

self.user_agent_policy.add_user_agent('azurefilestorage/{}'.format(VERSION))
self.generate_client_request_id = True
self.accept_language = None

self.version = version
self.url = url

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 ._share_operations_async import ShareOperations
from ._directory_operations_async import DirectoryOperations
from ._file_operations_async import FileOperations

__all__ = [
'ServiceOperations',
'ShareOperations',
'DirectoryOperations',
'FileOperations',
]
Loading