Skip to content

Commit 0d05849

Browse files
author
SDKAuto
committed
CodeGen from PR 14005 in Azure/azure-rest-api-specs
Merge 5017e0427d4c8f10751294dcc6059737f30ce19d into bff78c12eca3ca6212bfd61ea6a898643ebc2c72
1 parent 4af5950 commit 0d05849

File tree

8 files changed

+623
-164
lines changed

8 files changed

+623
-164
lines changed
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
{
2-
"autorest": "3.0.6369",
3-
"use": "@autorest/[email protected].2",
4-
"commit": "18ed65c7581a1142c0015451e4d61ef0a3797268",
2+
"autorest": "3.3.0",
3+
"use": "@autorest/[email protected].6",
4+
"commit": "7a3162a8ad5dcb464b0b38cf59d1b9c75d51b3ae",
55
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
6-
"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/[email protected].2 --version=3.0.6369",
6+
"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/[email protected].6 --version=3.3.0",
77
"readme": "specification/storagesync/resource-manager/readme.md"
88
}

sdk/storage/azure-mgmt-storagesync/azure/mgmt/storagesync/_metadata.json

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@
1010
"azure_arm": true,
1111
"has_lro_operations": true,
1212
"client_side_validation": false,
13-
"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\"]}}}",
14-
"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\"]}}}"
13+
"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\"]}, \"azurecore\": {\"azure.core.pipeline.transport\": [\"HttpRequest\", \"HttpResponse\"]}}}",
14+
"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\"]}, \"azurecore\": {\"azure.core.pipeline.transport\": [\"AsyncHttpResponse\", \"HttpRequest\"]}}}"
1515
},
1616
"global_parameters": {
1717
"sync": {
@@ -108,11 +108,5 @@
108108
"registered_servers": "RegisteredServersOperations",
109109
"workflows": "WorkflowsOperations",
110110
"operation_status": "OperationStatusOperations"
111-
},
112-
"operation_mixins": {
113-
"sync_imports": "None",
114-
"async_imports": "None",
115-
"operations": {
116-
}
117111
}
118112
}

sdk/storage/azure-mgmt-storagesync/azure/mgmt/storagesync/_microsoft_storage_sync.py

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
from typing import Any, Optional
1717

1818
from azure.core.credentials import TokenCredential
19+
from azure.core.pipeline.transport import HttpRequest, HttpResponse
1920

2021
from ._configuration import MicrosoftStorageSyncConfiguration
2122
from .operations import Operations
@@ -101,6 +102,24 @@ def __init__(
101102
self.operation_status = OperationStatusOperations(
102103
self._client, self._config, self._serialize, self._deserialize)
103104

105+
def _send_request(self, http_request, **kwargs):
106+
# type: (HttpRequest, Any) -> HttpResponse
107+
"""Runs the network request through the client's chained policies.
108+
109+
:param http_request: The network request you want to make. Required.
110+
:type http_request: ~azure.core.pipeline.transport.HttpRequest
111+
:keyword bool stream: Whether the response payload will be streamed. Defaults to True.
112+
:return: The response of your network call. Does not do error handling on your response.
113+
:rtype: ~azure.core.pipeline.transport.HttpResponse
114+
"""
115+
path_format_arguments = {
116+
'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1),
117+
}
118+
http_request.url = self._client.format_url(http_request.url, **path_format_arguments)
119+
stream = kwargs.pop("stream", True)
120+
pipeline_response = self._client._pipeline.run(http_request, stream=stream, **kwargs)
121+
return pipeline_response.http_response
122+
104123
def close(self):
105124
# type: () -> None
106125
self._client.close()

sdk/storage/azure-mgmt-storagesync/azure/mgmt/storagesync/aio/_microsoft_storage_sync.py

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88

99
from typing import Any, Optional, TYPE_CHECKING
1010

11+
from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest
1112
from azure.mgmt.core import AsyncARMPipelineClient
1213
from msrest import Deserializer, Serializer
1314

@@ -98,6 +99,23 @@ def __init__(
9899
self.operation_status = OperationStatusOperations(
99100
self._client, self._config, self._serialize, self._deserialize)
100101

102+
async def _send_request(self, http_request: HttpRequest, **kwargs: Any) -> AsyncHttpResponse:
103+
"""Runs the network request through the client's chained policies.
104+
105+
:param http_request: The network request you want to make. Required.
106+
:type http_request: ~azure.core.pipeline.transport.HttpRequest
107+
:keyword bool stream: Whether the response payload will be streamed. Defaults to True.
108+
:return: The response of your network call. Does not do error handling on your response.
109+
:rtype: ~azure.core.pipeline.transport.AsyncHttpResponse
110+
"""
111+
path_format_arguments = {
112+
'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1),
113+
}
114+
http_request.url = self._client.format_url(http_request.url, **path_format_arguments)
115+
stream = kwargs.pop("stream", True)
116+
pipeline_response = await self._client._pipeline.run(http_request, stream=stream, **kwargs)
117+
return pipeline_response.http_response
118+
101119
async def close(self) -> None:
102120
await self._client.close()
103121

sdk/storage/azure-mgmt-storagesync/azure/mgmt/storagesync/models/__init__.py

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,10 @@
1212
from ._models_py3 import CheckNameAvailabilityResult
1313
from ._models_py3 import CloudEndpoint
1414
from ._models_py3 import CloudEndpointArray
15+
from ._models_py3 import CloudEndpointChangeEnumerationActivity
16+
from ._models_py3 import CloudEndpointChangeEnumerationStatus
1517
from ._models_py3 import CloudEndpointCreateParameters
18+
from ._models_py3 import CloudEndpointLastChangeEnumerationStatus
1619
from ._models_py3 import CloudTieringCachePerformance
1720
from ._models_py3 import CloudTieringDatePolicyStatus
1821
from ._models_py3 import CloudTieringFilesNotTiering
@@ -80,7 +83,10 @@
8083
from ._models import CheckNameAvailabilityResult # type: ignore
8184
from ._models import CloudEndpoint # type: ignore
8285
from ._models import CloudEndpointArray # type: ignore
86+
from ._models import CloudEndpointChangeEnumerationActivity # type: ignore
87+
from ._models import CloudEndpointChangeEnumerationStatus # type: ignore
8388
from ._models import CloudEndpointCreateParameters # type: ignore
89+
from ._models import CloudEndpointLastChangeEnumerationStatus # type: ignore
8490
from ._models import CloudTieringCachePerformance # type: ignore
8591
from ._models import CloudTieringDatePolicyStatus # type: ignore
8692
from ._models import CloudTieringFilesNotTiering # type: ignore
@@ -145,9 +151,12 @@
145151

146152
from ._microsoft_storage_sync_enums import (
147153
ChangeDetectionMode,
154+
CloudEndpointChangeEnumerationActivityState,
155+
CloudEndpointChangeEnumerationTotalCountsState,
148156
FeatureStatus,
149157
IncomingTrafficPolicy,
150158
InitialDownloadPolicy,
159+
InitialUploadPolicy,
151160
LocalCacheMode,
152161
NameAvailabilityReason,
153162
OperationDirection,
@@ -169,7 +178,10 @@
169178
'CheckNameAvailabilityResult',
170179
'CloudEndpoint',
171180
'CloudEndpointArray',
181+
'CloudEndpointChangeEnumerationActivity',
182+
'CloudEndpointChangeEnumerationStatus',
172183
'CloudEndpointCreateParameters',
184+
'CloudEndpointLastChangeEnumerationStatus',
173185
'CloudTieringCachePerformance',
174186
'CloudTieringDatePolicyStatus',
175187
'CloudTieringFilesNotTiering',
@@ -232,9 +244,12 @@
232244
'Workflow',
233245
'WorkflowArray',
234246
'ChangeDetectionMode',
247+
'CloudEndpointChangeEnumerationActivityState',
248+
'CloudEndpointChangeEnumerationTotalCountsState',
235249
'FeatureStatus',
236250
'IncomingTrafficPolicy',
237251
'InitialDownloadPolicy',
252+
'InitialUploadPolicy',
238253
'LocalCacheMode',
239254
'NameAvailabilityReason',
240255
'OperationDirection',

sdk/storage/azure-mgmt-storagesync/azure/mgmt/storagesync/models/_microsoft_storage_sync_enums.py

Lines changed: 23 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,20 @@ class ChangeDetectionMode(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)):
3333
DEFAULT = "Default"
3434
RECURSIVE = "Recursive"
3535

36+
class CloudEndpointChangeEnumerationActivityState(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)):
37+
"""State of change enumeration activity
38+
"""
39+
40+
INITIAL_ENUMERATION_IN_PROGRESS = "InitialEnumerationInProgress"
41+
ENUMERATION_IN_PROGRESS = "EnumerationInProgress"
42+
43+
class CloudEndpointChangeEnumerationTotalCountsState(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)):
44+
"""State of the total counts of change enumeration activity
45+
"""
46+
47+
CALCULATING = "Calculating"
48+
FINAL = "Final"
49+
3650
class FeatureStatus(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)):
3751
"""Type of the Feature Status
3852
"""
@@ -55,9 +69,16 @@ class InitialDownloadPolicy(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum))
5569
NAMESPACE_THEN_MODIFIED_FILES = "NamespaceThenModifiedFiles"
5670
AVOID_TIERED_FILES = "AvoidTieredFiles"
5771

72+
class InitialUploadPolicy(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)):
73+
"""Policy for how the initial upload sync session is performed.
74+
"""
75+
76+
SERVER_AUTHORITATIVE = "ServerAuthoritative"
77+
MERGE = "Merge"
78+
5879
class LocalCacheMode(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)):
59-
"""Policy for enabling follow-the-sun business models: link local cache to cloud behavior to pre-
60-
populate before local access.
80+
"""Policy for enabling follow-the-sun business models: link local cache to cloud behavior to
81+
pre-populate before local access.
6182
"""
6283

6384
DOWNLOAD_NEW_AND_MODIFIED_FILES = "DownloadNewAndModifiedFiles"

0 commit comments

Comments
 (0)