Skip to content

Commit 0d7330b

Browse files
author
SDKAuto
committed
CodeGen from PR 23479 in Azure/azure-rest-api-specs
Merge 30467997bc7c92669a1d4ed3ed56116d9d666931 into 4b17bff0ac8be6195cedad3cb98fb32e88d0f7bb
1 parent 4376081 commit 0d7330b

File tree

54 files changed

+779
-1178
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

54 files changed

+779
-1178
lines changed
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
{
2-
"commit": "d70ba571ddb519a63aa2ad96a96faff04647f81c",
2+
"commit": "84e89244be5b233eb4d3bb0b4d7d75728ab60324",
33
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
44
"autorest": "3.9.2",
55
"use": [
6-
"@autorest/python@6.4.0",
6+
"@autorest/python@6.4.8",
77
"@autorest/modelerfour@4.24.3"
88
],
9-
"autorest_command": "autorest specification/datafactory/resource-manager/readme.md --generate-sample=True --include-x-ms-examples-original-file=True --python --python-sdks-folder=/home/vsts/work/1/azure-sdk-for-python/sdk --use=@autorest/python@6.4.0 --use=@autorest/modelerfour@4.24.3 --version=3.9.2 --version-tolerant=False",
9+
"autorest_command": "autorest specification/datafactory/resource-manager/readme.md --generate-sample=True --include-x-ms-examples-original-file=True --python --python-sdks-folder=/mnt/vss/_work/1/s/azure-sdk-for-python/sdk --use=@autorest/python@6.4.8 --use=@autorest/modelerfour@4.24.3 --version=3.9.2 --version-tolerant=False",
1010
"readme": "specification/datafactory/resource-manager/readme.md"
1111
}

sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/_configuration.py

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
77
# --------------------------------------------------------------------------
88

9-
import sys
109
from typing import Any, TYPE_CHECKING
1110

1211
from azure.core.configuration import Configuration
@@ -15,11 +14,6 @@
1514

1615
from ._version import VERSION
1716

18-
if sys.version_info >= (3, 8):
19-
from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports
20-
else:
21-
from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports
22-
2317
if TYPE_CHECKING:
2418
# pylint: disable=unused-import,ungrouped-imports
2519
from azure.core.credentials import TokenCredential
@@ -42,7 +36,7 @@ class DataFactoryManagementClientConfiguration(Configuration): # pylint: disabl
4236

4337
def __init__(self, credential: "TokenCredential", subscription_id: str, **kwargs: Any) -> None:
4438
super(DataFactoryManagementClientConfiguration, self).__init__(**kwargs)
45-
api_version: Literal["2018-06-01"] = kwargs.pop("api_version", "2018-06-01")
39+
api_version: str = kwargs.pop("api_version", "2018-06-01")
4640

4741
if credential is None:
4842
raise ValueError("Parameter 'credential' must not be None.")

sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/_data_factory_management_client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ def __init__(
126126
self._config = DataFactoryManagementClientConfiguration(
127127
credential=credential, subscription_id=subscription_id, **kwargs
128128
)
129-
self._client = ARMPipelineClient(base_url=base_url, config=self._config, **kwargs)
129+
self._client: ARMPipelineClient = ARMPipelineClient(base_url=base_url, config=self._config, **kwargs)
130130

131131
client_models = {k: v for k, v in _models.__dict__.items() if isinstance(v, type)}
132132
self._serialize = Serializer(client_models)

sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/_serialization.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -629,7 +629,7 @@ def _serialize(self, target_obj, data_type=None, **kwargs):
629629
if xml_desc.get("attr", False):
630630
if xml_ns:
631631
ET.register_namespace(xml_prefix, xml_ns)
632-
xml_name = "{}{}".format(xml_ns, xml_name)
632+
xml_name = "{{{}}}{}".format(xml_ns, xml_name)
633633
serialized.set(xml_name, new_attr) # type: ignore
634634
continue
635635
if xml_desc.get("text", False):
@@ -1271,7 +1271,7 @@ def _extract_name_from_internal_type(internal_type):
12711271
xml_name = internal_type_xml_map.get("name", internal_type.__name__)
12721272
xml_ns = internal_type_xml_map.get("ns", None)
12731273
if xml_ns:
1274-
xml_name = "{}{}".format(xml_ns, xml_name)
1274+
xml_name = "{{{}}}{}".format(xml_ns, xml_name)
12751275
return xml_name
12761276

12771277

@@ -1295,7 +1295,7 @@ def xml_key_extractor(attr, attr_desc, data):
12951295
# Integrate namespace if necessary
12961296
xml_ns = xml_desc.get("ns", internal_type_xml_map.get("ns", None))
12971297
if xml_ns:
1298-
xml_name = "{}{}".format(xml_ns, xml_name)
1298+
xml_name = "{{{}}}{}".format(xml_ns, xml_name)
12991299

13001300
# If it's an attribute, that's simple
13011301
if xml_desc.get("attr", False):

sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/_version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@
66
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
77
# --------------------------------------------------------------------------
88

9-
VERSION = "3.1.0"
9+
VERSION = "1.0.0"

sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/aio/_configuration.py

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
77
# --------------------------------------------------------------------------
88

9-
import sys
109
from typing import Any, TYPE_CHECKING
1110

1211
from azure.core.configuration import Configuration
@@ -15,11 +14,6 @@
1514

1615
from .._version import VERSION
1716

18-
if sys.version_info >= (3, 8):
19-
from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports
20-
else:
21-
from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports
22-
2317
if TYPE_CHECKING:
2418
# pylint: disable=unused-import,ungrouped-imports
2519
from azure.core.credentials_async import AsyncTokenCredential
@@ -42,7 +36,7 @@ class DataFactoryManagementClientConfiguration(Configuration): # pylint: disabl
4236

4337
def __init__(self, credential: "AsyncTokenCredential", subscription_id: str, **kwargs: Any) -> None:
4438
super(DataFactoryManagementClientConfiguration, self).__init__(**kwargs)
45-
api_version: Literal["2018-06-01"] = kwargs.pop("api_version", "2018-06-01")
39+
api_version: str = kwargs.pop("api_version", "2018-06-01")
4640

4741
if credential is None:
4842
raise ValueError("Parameter 'credential' must not be None.")

sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/aio/_data_factory_management_client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ def __init__(
127127
self._config = DataFactoryManagementClientConfiguration(
128128
credential=credential, subscription_id=subscription_id, **kwargs
129129
)
130-
self._client = AsyncARMPipelineClient(base_url=base_url, config=self._config, **kwargs)
130+
self._client: AsyncARMPipelineClient = AsyncARMPipelineClient(base_url=base_url, config=self._config, **kwargs)
131131

132132
client_models = {k: v for k, v in _models.__dict__.items() if isinstance(v, type)}
133133
self._serialize = Serializer(client_models)

sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/aio/operations/_activity_runs_operations.py

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
# Code generated by Microsoft (R) AutoRest Code Generator.
77
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
88
# --------------------------------------------------------------------------
9-
import sys
109
from typing import Any, Callable, Dict, IO, Optional, TypeVar, Union, overload
1110

1211
from azure.core.exceptions import (
@@ -28,10 +27,6 @@
2827
from ..._vendor import _convert_request
2928
from ...operations._activity_runs_operations import build_query_by_pipeline_run_request
3029

31-
if sys.version_info >= (3, 8):
32-
from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports
33-
else:
34-
from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports
3530
T = TypeVar("T")
3631
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]]
3732

@@ -154,9 +149,7 @@ async def query_by_pipeline_run(
154149
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
155150
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
156151

157-
api_version: Literal["2018-06-01"] = kwargs.pop(
158-
"api_version", _params.pop("api-version", self._config.api_version)
159-
)
152+
api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
160153
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
161154
cls: ClsType[_models.ActivityRunsQueryResponse] = kwargs.pop("cls", None)
162155

@@ -184,8 +177,9 @@ async def query_by_pipeline_run(
184177
request = _convert_request(request)
185178
request.url = self._client.format_url(request.url)
186179

180+
_stream = False
187181
pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access
188-
request, stream=False, **kwargs
182+
request, stream=_stream, **kwargs
189183
)
190184

191185
response = pipeline_response.http_response

sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/aio/operations/_credential_operations_operations.py

Lines changed: 12 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
# Code generated by Microsoft (R) AutoRest Code Generator.
77
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
88
# --------------------------------------------------------------------------
9-
import sys
109
from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, overload
1110
import urllib.parse
1211

@@ -36,10 +35,6 @@
3635
build_list_by_factory_request,
3736
)
3837

39-
if sys.version_info >= (3, 8):
40-
from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports
41-
else:
42-
from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports
4338
T = TypeVar("T")
4439
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]]
4540

@@ -83,9 +78,7 @@ def list_by_factory(
8378
_headers = kwargs.pop("headers", {}) or {}
8479
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
8580

86-
api_version: Literal["2018-06-01"] = kwargs.pop(
87-
"api_version", _params.pop("api-version", self._config.api_version)
88-
)
81+
api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
8982
cls: ClsType[_models.CredentialListResponse] = kwargs.pop("cls", None)
9083

9184
error_map = {
@@ -139,8 +132,9 @@ async def extract_data(pipeline_response):
139132
async def get_next(next_link=None):
140133
request = prepare_request(next_link)
141134

135+
_stream = False
142136
pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access
143-
request, stream=False, **kwargs
137+
request, stream=_stream, **kwargs
144138
)
145139
response = pipeline_response.http_response
146140

@@ -267,9 +261,7 @@ async def create_or_update(
267261
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
268262
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
269263

270-
api_version: Literal["2018-06-01"] = kwargs.pop(
271-
"api_version", _params.pop("api-version", self._config.api_version)
272-
)
264+
api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
273265
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
274266
cls: ClsType[_models.ManagedIdentityCredentialResource] = kwargs.pop("cls", None)
275267

@@ -298,8 +290,9 @@ async def create_or_update(
298290
request = _convert_request(request)
299291
request.url = self._client.format_url(request.url)
300292

293+
_stream = False
301294
pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access
302-
request, stream=False, **kwargs
295+
request, stream=_stream, **kwargs
303296
)
304297

305298
response = pipeline_response.http_response
@@ -356,9 +349,7 @@ async def get(
356349
_headers = kwargs.pop("headers", {}) or {}
357350
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
358351

359-
api_version: Literal["2018-06-01"] = kwargs.pop(
360-
"api_version", _params.pop("api-version", self._config.api_version)
361-
)
352+
api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
362353
cls: ClsType[Optional[_models.ManagedIdentityCredentialResource]] = kwargs.pop("cls", None)
363354

364355
request = build_get_request(
@@ -375,8 +366,9 @@ async def get(
375366
request = _convert_request(request)
376367
request.url = self._client.format_url(request.url)
377368

369+
_stream = False
378370
pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access
379-
request, stream=False, **kwargs
371+
request, stream=_stream, **kwargs
380372
)
381373

382374
response = pipeline_response.http_response
@@ -426,9 +418,7 @@ async def delete( # pylint: disable=inconsistent-return-statements
426418
_headers = kwargs.pop("headers", {}) or {}
427419
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
428420

429-
api_version: Literal["2018-06-01"] = kwargs.pop(
430-
"api_version", _params.pop("api-version", self._config.api_version)
431-
)
421+
api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
432422
cls: ClsType[None] = kwargs.pop("cls", None)
433423

434424
request = build_delete_request(
@@ -444,8 +434,9 @@ async def delete( # pylint: disable=inconsistent-return-statements
444434
request = _convert_request(request)
445435
request.url = self._client.format_url(request.url)
446436

437+
_stream = False
447438
pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access
448-
request, stream=False, **kwargs
439+
request, stream=_stream, **kwargs
449440
)
450441

451442
response = pipeline_response.http_response

0 commit comments

Comments
 (0)