Skip to content
Closed
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
11 changes: 7 additions & 4 deletions sdk/storage/azure-mgmt-storagesync/_meta.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
{
"autorest": "3.0.6369",
"use": "@autorest/[email protected]",
"commit": "18ed65c7581a1142c0015451e4d61ef0a3797268",
"autorest": "3.4.5",
"use": [
"@autorest/[email protected]",
"@autorest/[email protected]"
],
"commit": "96fbe584e334a744ee95fa56bc98d3d4cdfb6cfd",
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
"autorest_command": "autorest specification/storagesync/resource-manager/readme.md --multiapi --python --python-mode=update --python-sdks-folder=/home/vsts/work/1/s/azure-sdk-for-python/sdk --track2 --use=@autorest/python@5.6.2 --version=3.0.6369",
"autorest_command": "autorest specification/storagesync/resource-manager/readme.md --multiapi --python --python-mode=update --python-sdks-folder=/home/vsts/work/1/s/azure-sdk-for-python/sdk --track2 --use=@autorest/python@5.8.4 --use=@autorest/[email protected].2 --version=3.4.5",
"readme": "specification/storagesync/resource-manager/readme.md"
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
"azure_arm": true,
"has_lro_operations": true,
"client_side_validation": false,
"sync_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"ARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"MicrosoftStorageSyncConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}}}",
"async_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"AsyncARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"MicrosoftStorageSyncConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}}}"
"sync_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"ARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"MicrosoftStorageSyncConfiguration\"], \"._operations_mixin\": [\"MicrosoftStorageSyncOperationsMixin\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}, \"azurecore\": {\"azure.core.pipeline.transport\": [\"HttpRequest\", \"HttpResponse\"]}}}",
"async_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"AsyncARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"MicrosoftStorageSyncConfiguration\"], \"._operations_mixin\": [\"MicrosoftStorageSyncOperationsMixin\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}, \"azurecore\": {\"azure.core.pipeline.transport\": [\"AsyncHttpResponse\", \"HttpRequest\"]}}}"
},
"global_parameters": {
"sync": {
Expand Down Expand Up @@ -110,9 +110,21 @@
"operation_status": "OperationStatusOperations"
},
"operation_mixins": {
"sync_imports": "None",
"async_imports": "None",
"sync_imports": "{\"regular\": {\"azurecore\": {\"azure.core.exceptions\": [\"ClientAuthenticationError\", \"HttpResponseError\", \"ResourceExistsError\", \"ResourceNotFoundError\", \"map_error\"], \"azure.mgmt.core.exceptions\": [\"ARMErrorFormat\"], \"azure.core.pipeline\": [\"PipelineResponse\"], \"azure.core.pipeline.transport\": [\"HttpRequest\", \"HttpResponse\"]}, \"stdlib\": {\"warnings\": [null]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Callable\", \"Dict\", \"Generic\", \"Optional\", \"TypeVar\"]}}}",
"async_imports": "{\"regular\": {\"azurecore\": {\"azure.core.exceptions\": [\"ClientAuthenticationError\", \"HttpResponseError\", \"ResourceExistsError\", \"ResourceNotFoundError\", \"map_error\"], \"azure.mgmt.core.exceptions\": [\"ARMErrorFormat\"], \"azure.core.pipeline\": [\"PipelineResponse\"], \"azure.core.pipeline.transport\": [\"AsyncHttpResponse\", \"HttpRequest\"]}, \"stdlib\": {\"warnings\": [null]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Callable\", \"Dict\", \"Generic\", \"Optional\", \"TypeVar\"]}}}",
"operations": {
"location_operation_status" : {
"sync": {
"signature": "def location_operation_status(\n self,\n location_name, # type: str\n operation_id, # type: str\n **kwargs # type: Any\n):\n",
"doc": "\"\"\"Get Operation status.\n\n:param location_name: The desired region to obtain information from.\n:type location_name: str\n:param operation_id: operation Id.\n:type operation_id: str\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: LocationOperationStatus, or the result of cls(response)\n:rtype: ~azure.mgmt.storagesync.models.LocationOperationStatus\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\""
},
"async": {
"coroutine": true,
"signature": "async def location_operation_status(\n self,\n location_name: str,\n operation_id: str,\n **kwargs: Any\n) -\u003e \"_models.LocationOperationStatus\":\n",
"doc": "\"\"\"Get Operation status.\n\n:param location_name: The desired region to obtain information from.\n:type location_name: str\n:param operation_id: operation Id.\n:type operation_id: str\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: LocationOperationStatus, or the result of cls(response)\n:rtype: ~azure.mgmt.storagesync.models.LocationOperationStatus\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\""
},
"call": "location_name, operation_id"
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
from typing import Any, Optional

from azure.core.credentials import TokenCredential
from azure.core.pipeline.transport import HttpRequest, HttpResponse

from ._configuration import MicrosoftStorageSyncConfiguration
from .operations import Operations
Expand All @@ -28,10 +29,11 @@
from .operations import RegisteredServersOperations
from .operations import WorkflowsOperations
from .operations import OperationStatusOperations
from .operations import MicrosoftStorageSyncOperationsMixin
from . import models


class MicrosoftStorageSync(object):
class MicrosoftStorageSync(MicrosoftStorageSyncOperationsMixin):
"""Microsoft Storage Sync Service API.

:ivar operations: Operations operations
Expand Down Expand Up @@ -101,6 +103,24 @@ def __init__(
self.operation_status = OperationStatusOperations(
self._client, self._config, self._serialize, self._deserialize)

def _send_request(self, http_request, **kwargs):
# type: (HttpRequest, Any) -> HttpResponse
"""Runs the network request through the client's chained policies.

:param http_request: The network request you want to make. Required.
:type http_request: ~azure.core.pipeline.transport.HttpRequest
:keyword bool stream: Whether the response payload will be streamed. Defaults to True.
:return: The response of your network call. Does not do error handling on your response.
:rtype: ~azure.core.pipeline.transport.HttpResponse
"""
path_format_arguments = {
'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1),
}
http_request.url = self._client.format_url(http_request.url, **path_format_arguments)
stream = kwargs.pop("stream", True)
pipeline_response = self._client._pipeline.run(http_request, stream=stream, **kwargs)
return pipeline_response.http_response

def close(self):
# type: () -> None
self._client.close()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------

VERSION = "1.0.0"
VERSION = "1.0.0b1"
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

from typing import Any, Optional, TYPE_CHECKING

from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest
from azure.mgmt.core import AsyncARMPipelineClient
from msrest import Deserializer, Serializer

Expand All @@ -26,10 +27,11 @@
from .operations import RegisteredServersOperations
from .operations import WorkflowsOperations
from .operations import OperationStatusOperations
from .operations import MicrosoftStorageSyncOperationsMixin
from .. import models


class MicrosoftStorageSync(object):
class MicrosoftStorageSync(MicrosoftStorageSyncOperationsMixin):
"""Microsoft Storage Sync Service API.

:ivar operations: Operations operations
Expand Down Expand Up @@ -98,6 +100,23 @@ def __init__(
self.operation_status = OperationStatusOperations(
self._client, self._config, self._serialize, self._deserialize)

async def _send_request(self, http_request: HttpRequest, **kwargs: Any) -> AsyncHttpResponse:
"""Runs the network request through the client's chained policies.

:param http_request: The network request you want to make. Required.
:type http_request: ~azure.core.pipeline.transport.HttpRequest
:keyword bool stream: Whether the response payload will be streamed. Defaults to True.
:return: The response of your network call. Does not do error handling on your response.
:rtype: ~azure.core.pipeline.transport.AsyncHttpResponse
"""
path_format_arguments = {
'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1),
}
http_request.url = self._client.format_url(http_request.url, **path_format_arguments)
stream = kwargs.pop("stream", True)
pipeline_response = await self._client._pipeline.run(http_request, stream=stream, **kwargs)
return pipeline_response.http_response

async def close(self) -> None:
await self._client.close()

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
from ._registered_servers_operations import RegisteredServersOperations
from ._workflows_operations import WorkflowsOperations
from ._operation_status_operations import OperationStatusOperations
from ._microsoft_storage_sync_operations import MicrosoftStorageSyncOperationsMixin

__all__ = [
'Operations',
Expand All @@ -28,4 +29,5 @@
'RegisteredServersOperations',
'WorkflowsOperations',
'OperationStatusOperations',
'MicrosoftStorageSyncOperationsMixin',
]
Loading