Skip to content

Commit 8a5e400

Browse files
author
SDKAuto
committed
CodeGen from PR 3586 in test-repo-billy/azure-rest-api-specs
Merge cca90544e90d4a8d4a69dfefbd54920953ac12bd into 44a004e6060634500ded92d52ef25a61929e62a8
1 parent b5d45cc commit 8a5e400

File tree

10 files changed

+51
-282
lines changed

10 files changed

+51
-282
lines changed
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
{
2-
"commit": "f06cffbda682a8cd225a8b16bc6f000d26d01612",
3-
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
2+
"commit": "d39e94d4705a40e02e7e5aa7da5c56ead9291775",
3+
"repository_url": "https://github.com/test-repo-billy/azure-rest-api-specs",
44
"autorest": "3.10.2",
55
"use": [
6-
"@autorest/python@6.26.4",
6+
"@autorest/python@6.27.4",
77
"@autorest/[email protected]"
88
],
9-
"autorest_command": "autorest specification/datafactory/resource-manager/readme.md --generate-sample=True --generate-test=True --include-x-ms-examples-original-file=True --python --python-sdks-folder=/mnt/vss/_work/1/azure-sdk-for-python/sdk --use=@autorest/python@6.26.4 --use=@autorest/[email protected] --version=3.10.2 --version-tolerant=False",
9+
"autorest_command": "autorest specification/datafactory/resource-manager/readme.md --generate-sample=True --generate-test=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.27.4 --use=@autorest/[email protected] --version=3.10.2 --version-tolerant=False",
1010
"readme": "specification/datafactory/resource-manager/readme.md"
1111
}

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

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -310,7 +310,7 @@ def _create_xml_node(tag, prefix=None, ns=None):
310310
return ET.Element(tag)
311311

312312

313-
class Model(object):
313+
class Model:
314314
"""Mixin for all client request body/response body models to support
315315
serialization and deserialization.
316316
"""
@@ -563,7 +563,7 @@ def _decode_attribute_map_key(key):
563563
return key.replace("\\.", ".")
564564

565565

566-
class Serializer(object): # pylint: disable=too-many-public-methods
566+
class Serializer: # pylint: disable=too-many-public-methods
567567
"""Request object model serializer."""
568568

569569
basic_types = {str: "str", int: "int", bool: "bool", float: "float"}
@@ -1441,7 +1441,7 @@ def xml_key_extractor(attr, attr_desc, data): # pylint: disable=unused-argument
14411441
return children[0]
14421442

14431443

1444-
class Deserializer(object):
1444+
class Deserializer:
14451445
"""Response object model deserializer.
14461446
14471447
:param dict classes: Class type dictionary for deserializing complex types.
@@ -1683,17 +1683,21 @@ def _instantiate_model(self, response, attrs, additional_properties=None):
16831683
subtype = getattr(response, "_subtype_map", {})
16841684
try:
16851685
readonly = [
1686-
k for k, v in response._validation.items() if v.get("readonly") # pylint: disable=protected-access
1686+
k
1687+
for k, v in response._validation.items() # pylint: disable=protected-access # type: ignore
1688+
if v.get("readonly")
16871689
]
16881690
const = [
1689-
k for k, v in response._validation.items() if v.get("constant") # pylint: disable=protected-access
1691+
k
1692+
for k, v in response._validation.items() # pylint: disable=protected-access # type: ignore
1693+
if v.get("constant")
16901694
]
16911695
kwargs = {k: v for k, v in attrs.items() if k not in subtype and k not in readonly + const}
16921696
response_obj = response(**kwargs)
16931697
for attr in readonly:
16941698
setattr(response_obj, attr, attrs.get(attr))
16951699
if additional_properties:
1696-
response_obj.additional_properties = additional_properties
1700+
response_obj.additional_properties = additional_properties # type: ignore
16971701
return response_obj
16981702
except TypeError as err:
16991703
msg = "Unable to deserialize {} into model {}. ".format(kwargs, response) # type: ignore

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 = "9.1.0"
9+
VERSION = "1.0.0"

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

Lines changed: 0 additions & 75 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@
3535
build_get_git_hub_access_token_request,
3636
build_get_request,
3737
build_list_by_resource_group_request,
38-
build_list_request,
3938
build_update_request,
4039
)
4140

@@ -66,80 +65,6 @@ def __init__(self, *args, **kwargs) -> None:
6665
self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer")
6766
self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer")
6867

69-
@distributed_trace
70-
def list(self, **kwargs: Any) -> AsyncIterable["_models.Factory"]:
71-
"""Lists factories under the specified subscription.
72-
73-
:return: An iterator like instance of either Factory or the result of cls(response)
74-
:rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.datafactory.models.Factory]
75-
:raises ~azure.core.exceptions.HttpResponseError:
76-
"""
77-
_headers = kwargs.pop("headers", {}) or {}
78-
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
79-
80-
api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
81-
cls: ClsType[_models.FactoryListResponse] = kwargs.pop("cls", None)
82-
83-
error_map: MutableMapping = {
84-
401: ClientAuthenticationError,
85-
404: ResourceNotFoundError,
86-
409: ResourceExistsError,
87-
304: ResourceNotModifiedError,
88-
}
89-
error_map.update(kwargs.pop("error_map", {}) or {})
90-
91-
def prepare_request(next_link=None):
92-
if not next_link:
93-
94-
_request = build_list_request(
95-
subscription_id=self._config.subscription_id,
96-
api_version=api_version,
97-
headers=_headers,
98-
params=_params,
99-
)
100-
_request.url = self._client.format_url(_request.url)
101-
102-
else:
103-
# make call to next link with the client's api-version
104-
_parsed_next_link = urllib.parse.urlparse(next_link)
105-
_next_request_params = case_insensitive_dict(
106-
{
107-
key: [urllib.parse.quote(v) for v in value]
108-
for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items()
109-
}
110-
)
111-
_next_request_params["api-version"] = self._config.api_version
112-
_request = HttpRequest(
113-
"GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params
114-
)
115-
_request.url = self._client.format_url(_request.url)
116-
_request.method = "GET"
117-
return _request
118-
119-
async def extract_data(pipeline_response):
120-
deserialized = self._deserialize("FactoryListResponse", pipeline_response)
121-
list_of_elem = deserialized.value
122-
if cls:
123-
list_of_elem = cls(list_of_elem) # type: ignore
124-
return deserialized.next_link or None, AsyncList(list_of_elem)
125-
126-
async def get_next(next_link=None):
127-
_request = prepare_request(next_link)
128-
129-
_stream = False
130-
pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access
131-
_request, stream=_stream, **kwargs
132-
)
133-
response = pipeline_response.http_response
134-
135-
if response.status_code not in [200]:
136-
map_error(status_code=response.status_code, response=response, error_map=error_map)
137-
raise HttpResponseError(response=response, error_format=ARMErrorFormat)
138-
139-
return pipeline_response
140-
141-
return AsyncItemPaged(get_next, extract_data)
142-
14368
@overload
14469
async def configure_factory_repo(
14570
self,

sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/_models_py3.py

Lines changed: 33 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -5587,9 +5587,9 @@ class AvroWriteSettings(FormatWriteSettings):
55875587
:ivar max_rows_per_file: Limit the written file's row count to be smaller than or equal to the
55885588
specified count. Type: integer (or Expression with resultType integer).
55895589
:vartype max_rows_per_file: JSON
5590-
:ivar file_name_prefix: Specifies the file name pattern
5591-
:code:`<fileNamePrefix>`_:code:`<fileIndex>`.:code:`<fileExtension>` when copy from non-file
5592-
based store without partitionOptions. Type: string (or Expression with resultType string).
5590+
:ivar file_name_prefix: Specifies the file name pattern :code:`<fileNamePrefix>`_\\
5591+
:code:`<fileIndex>`.\\ :code:`<fileExtension>` when copy from non-file based store without
5592+
partitionOptions. Type: string (or Expression with resultType string).
55935593
:vartype file_name_prefix: JSON
55945594
"""
55955595

@@ -5627,9 +5627,9 @@ def __init__(
56275627
:keyword max_rows_per_file: Limit the written file's row count to be smaller than or equal to
56285628
the specified count. Type: integer (or Expression with resultType integer).
56295629
:paramtype max_rows_per_file: JSON
5630-
:keyword file_name_prefix: Specifies the file name pattern
5631-
:code:`<fileNamePrefix>`_:code:`<fileIndex>`.:code:`<fileExtension>` when copy from non-file
5632-
based store without partitionOptions. Type: string (or Expression with resultType string).
5630+
:keyword file_name_prefix: Specifies the file name pattern :code:`<fileNamePrefix>`_\\
5631+
:code:`<fileIndex>`.\\ :code:`<fileExtension>` when copy from non-file based store without
5632+
partitionOptions. Type: string (or Expression with resultType string).
56335633
:paramtype file_name_prefix: JSON
56345634
"""
56355635
super().__init__(additional_properties=additional_properties, **kwargs)
@@ -8575,8 +8575,8 @@ class AzureDataExplorerLinkedService(LinkedService):
85758575
:ivar annotations: List of tags that can be used for describing the linked service.
85768576
:vartype annotations: list[JSON]
85778577
:ivar endpoint: The endpoint of Azure Data Explorer (the engine's endpoint). URL will be in the
8578-
format https://:code:`<clusterName>`.:code:`<regionName>`.kusto.windows.net. Type: string (or
8579-
Expression with resultType string). Required.
8578+
format https://\\ :code:`<clusterName>`.\\ :code:`<regionName>`.kusto.windows.net. Type: string
8579+
(or Expression with resultType string). Required.
85808580
:vartype endpoint: JSON
85818581
:ivar service_principal_id: The ID of the service principal used to authenticate against Azure
85828582
Data Explorer. Type: string (or Expression with resultType string).
@@ -8648,8 +8648,8 @@ def __init__(
86488648
:keyword annotations: List of tags that can be used for describing the linked service.
86498649
:paramtype annotations: list[JSON]
86508650
:keyword endpoint: The endpoint of Azure Data Explorer (the engine's endpoint). URL will be in
8651-
the format https://:code:`<clusterName>`.:code:`<regionName>`.kusto.windows.net. Type: string
8652-
(or Expression with resultType string). Required.
8651+
the format https://\\ :code:`<clusterName>`.\\ :code:`<regionName>`.kusto.windows.net. Type:
8652+
string (or Expression with resultType string). Required.
86538653
:paramtype endpoint: JSON
86548654
:keyword service_principal_id: The ID of the service principal used to authenticate against
86558655
Azure Data Explorer. Type: string (or Expression with resultType string).
@@ -10566,7 +10566,7 @@ class AzureFunctionLinkedService(LinkedService):
1056610566
:ivar annotations: List of tags that can be used for describing the linked service.
1056710567
:vartype annotations: list[JSON]
1056810568
:ivar function_app_url: The endpoint of the Azure Function App. URL will be in the format
10569-
https://:code:`<accountName>`.azurewebsites.net. Type: string (or Expression with resultType
10569+
https://\\ :code:`<accountName>`.azurewebsites.net. Type: string (or Expression with resultType
1057010570
string). Required.
1057110571
:vartype function_app_url: JSON
1057210572
:ivar function_key: Function or Host key for Azure Function App.
@@ -10637,7 +10637,7 @@ def __init__(
1063710637
:keyword annotations: List of tags that can be used for describing the linked service.
1063810638
:paramtype annotations: list[JSON]
1063910639
:keyword function_app_url: The endpoint of the Azure Function App. URL will be in the format
10640-
https://:code:`<accountName>`.azurewebsites.net. Type: string (or Expression with resultType
10640+
https://\\ :code:`<accountName>`.azurewebsites.net. Type: string (or Expression with resultType
1064110641
string). Required.
1064210642
:paramtype function_app_url: JSON
1064310643
:keyword function_key: Function or Host key for Azure Function App.
@@ -16485,8 +16485,8 @@ class AzureSynapseArtifactsLinkedService(LinkedService):
1648516485
:vartype parameters: dict[str, ~azure.mgmt.datafactory.models.ParameterSpecification]
1648616486
:ivar annotations: List of tags that can be used for describing the linked service.
1648716487
:vartype annotations: list[JSON]
16488-
:ivar endpoint: https://:code:`<workspacename>`.dev.azuresynapse.net, Azure Synapse Analytics
16489-
workspace URL. Type: string (or Expression with resultType string). Required.
16488+
:ivar endpoint: https://\\ :code:`<workspacename>`.dev.azuresynapse.net, Azure Synapse
16489+
Analytics workspace URL. Type: string (or Expression with resultType string). Required.
1649016490
:vartype endpoint: JSON
1649116491
:ivar authentication: Required to specify MSI, if using system assigned managed identity as
1649216492
authentication method. Type: string (or Expression with resultType string).
@@ -16543,7 +16543,7 @@ def __init__(
1654316543
:paramtype parameters: dict[str, ~azure.mgmt.datafactory.models.ParameterSpecification]
1654416544
:keyword annotations: List of tags that can be used for describing the linked service.
1654516545
:paramtype annotations: list[JSON]
16546-
:keyword endpoint: https://:code:`<workspacename>`.dev.azuresynapse.net, Azure Synapse
16546+
:keyword endpoint: https://\\ :code:`<workspacename>`.dev.azuresynapse.net, Azure Synapse
1654716547
Analytics workspace URL. Type: string (or Expression with resultType string). Required.
1654816548
:paramtype endpoint: JSON
1654916549
:keyword authentication: Required to specify MSI, if using system assigned managed identity as
@@ -25271,9 +25271,9 @@ class DelimitedTextWriteSettings(FormatWriteSettings):
2527125271
:ivar max_rows_per_file: Limit the written file's row count to be smaller than or equal to the
2527225272
specified count. Type: integer (or Expression with resultType integer).
2527325273
:vartype max_rows_per_file: JSON
25274-
:ivar file_name_prefix: Specifies the file name pattern
25275-
:code:`<fileNamePrefix>`_:code:`<fileIndex>`.:code:`<fileExtension>` when copy from non-file
25276-
based store without partitionOptions. Type: string (or Expression with resultType string).
25274+
:ivar file_name_prefix: Specifies the file name pattern :code:`<fileNamePrefix>`_\\
25275+
:code:`<fileIndex>`.\\ :code:`<fileExtension>` when copy from non-file based store without
25276+
partitionOptions. Type: string (or Expression with resultType string).
2527725277
:vartype file_name_prefix: JSON
2527825278
"""
2527925279

@@ -25314,9 +25314,9 @@ def __init__(
2531425314
:keyword max_rows_per_file: Limit the written file's row count to be smaller than or equal to
2531525315
the specified count. Type: integer (or Expression with resultType integer).
2531625316
:paramtype max_rows_per_file: JSON
25317-
:keyword file_name_prefix: Specifies the file name pattern
25318-
:code:`<fileNamePrefix>`_:code:`<fileIndex>`.:code:`<fileExtension>` when copy from non-file
25319-
based store without partitionOptions. Type: string (or Expression with resultType string).
25317+
:keyword file_name_prefix: Specifies the file name pattern :code:`<fileNamePrefix>`_\\
25318+
:code:`<fileIndex>`.\\ :code:`<fileExtension>` when copy from non-file based store without
25319+
partitionOptions. Type: string (or Expression with resultType string).
2532025320
:paramtype file_name_prefix: JSON
2532125321
"""
2532225322
super().__init__(additional_properties=additional_properties, **kwargs)
@@ -50084,9 +50084,9 @@ class OrcWriteSettings(FormatWriteSettings):
5008450084
:ivar max_rows_per_file: Limit the written file's row count to be smaller than or equal to the
5008550085
specified count. Type: integer (or Expression with resultType integer).
5008650086
:vartype max_rows_per_file: JSON
50087-
:ivar file_name_prefix: Specifies the file name pattern
50088-
:code:`<fileNamePrefix>`_:code:`<fileIndex>`.:code:`<fileExtension>` when copy from non-file
50089-
based store without partitionOptions. Type: string (or Expression with resultType string).
50087+
:ivar file_name_prefix: Specifies the file name pattern :code:`<fileNamePrefix>`_\\
50088+
:code:`<fileIndex>`.\\ :code:`<fileExtension>` when copy from non-file based store without
50089+
partitionOptions. Type: string (or Expression with resultType string).
5009050090
:vartype file_name_prefix: JSON
5009150091
"""
5009250092

@@ -50116,9 +50116,9 @@ def __init__(
5011650116
:keyword max_rows_per_file: Limit the written file's row count to be smaller than or equal to
5011750117
the specified count. Type: integer (or Expression with resultType integer).
5011850118
:paramtype max_rows_per_file: JSON
50119-
:keyword file_name_prefix: Specifies the file name pattern
50120-
:code:`<fileNamePrefix>`_:code:`<fileIndex>`.:code:`<fileExtension>` when copy from non-file
50121-
based store without partitionOptions. Type: string (or Expression with resultType string).
50119+
:keyword file_name_prefix: Specifies the file name pattern :code:`<fileNamePrefix>`_\\
50120+
:code:`<fileIndex>`.\\ :code:`<fileExtension>` when copy from non-file based store without
50121+
partitionOptions. Type: string (or Expression with resultType string).
5012250122
:paramtype file_name_prefix: JSON
5012350123
"""
5012450124
super().__init__(additional_properties=additional_properties, **kwargs)
@@ -50638,9 +50638,9 @@ class ParquetWriteSettings(FormatWriteSettings):
5063850638
:ivar max_rows_per_file: Limit the written file's row count to be smaller than or equal to the
5063950639
specified count. Type: integer (or Expression with resultType integer).
5064050640
:vartype max_rows_per_file: JSON
50641-
:ivar file_name_prefix: Specifies the file name pattern
50642-
:code:`<fileNamePrefix>`_:code:`<fileIndex>`.:code:`<fileExtension>` when copy from non-file
50643-
based store without partitionOptions. Type: string (or Expression with resultType string).
50641+
:ivar file_name_prefix: Specifies the file name pattern :code:`<fileNamePrefix>`_\\
50642+
:code:`<fileIndex>`.\\ :code:`<fileExtension>` when copy from non-file based store without
50643+
partitionOptions. Type: string (or Expression with resultType string).
5064450644
:vartype file_name_prefix: JSON
5064550645
"""
5064650646

@@ -50670,9 +50670,9 @@ def __init__(
5067050670
:keyword max_rows_per_file: Limit the written file's row count to be smaller than or equal to
5067150671
the specified count. Type: integer (or Expression with resultType integer).
5067250672
:paramtype max_rows_per_file: JSON
50673-
:keyword file_name_prefix: Specifies the file name pattern
50674-
:code:`<fileNamePrefix>`_:code:`<fileIndex>`.:code:`<fileExtension>` when copy from non-file
50675-
based store without partitionOptions. Type: string (or Expression with resultType string).
50673+
:keyword file_name_prefix: Specifies the file name pattern :code:`<fileNamePrefix>`_\\
50674+
:code:`<fileIndex>`.\\ :code:`<fileExtension>` when copy from non-file based store without
50675+
partitionOptions. Type: string (or Expression with resultType string).
5067650676
:paramtype file_name_prefix: JSON
5067750677
"""
5067850678
super().__init__(additional_properties=additional_properties, **kwargs)

0 commit comments

Comments
 (0)