Skip to content

Commit 5605845

Browse files
author
SDKAuto
committed
CodeGen from PR 3633 in test-repo-billy/azure-rest-api-specs
Merge e264abbfa0513f2f1c0422ae562a86d9d58adb70 into 76bf8250a833bba98aa233f0d27fa900ce05aaa0
1 parent 7322d02 commit 5605845

File tree

12 files changed

+660
-328
lines changed

12 files changed

+660
-328
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": "cb6cc29ff6237a582731478a1788985fdc79e32b",
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/__init__.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -744,8 +744,10 @@
744744
TarGZipReadSettings,
745745
TarReadSettings,
746746
TeamDeskLinkedService,
747+
TeradataImportCommand,
747748
TeradataLinkedService,
748749
TeradataPartitionSettings,
750+
TeradataSink,
749751
TeradataSource,
750752
TeradataTableDataset,
751753
TextFormat,
@@ -847,6 +849,7 @@
847849
GoogleAdWordsAuthenticationType,
848850
GoogleBigQueryAuthenticationType,
849851
GoogleBigQueryV2AuthenticationType,
852+
GreenplumAuthenticationType,
850853
HBaseAuthenticationType,
851854
HDInsightActivityDebugInfoOption,
852855
HdiNodeTypes,
@@ -877,6 +880,7 @@
877880
NotebookReferenceType,
878881
ODataAadServicePrincipalCredentialType,
879882
ODataAuthenticationType,
883+
OracleAuthenticationType,
880884
OraclePartitionOption,
881885
OrcCompressionCodec,
882886
ParameterType,
@@ -1671,8 +1675,10 @@
16711675
"TarGZipReadSettings",
16721676
"TarReadSettings",
16731677
"TeamDeskLinkedService",
1678+
"TeradataImportCommand",
16741679
"TeradataLinkedService",
16751680
"TeradataPartitionSettings",
1681+
"TeradataSink",
16761682
"TeradataSource",
16771683
"TeradataTableDataset",
16781684
"TextFormat",
@@ -1771,6 +1777,7 @@
17711777
"GoogleAdWordsAuthenticationType",
17721778
"GoogleBigQueryAuthenticationType",
17731779
"GoogleBigQueryV2AuthenticationType",
1780+
"GreenplumAuthenticationType",
17741781
"HBaseAuthenticationType",
17751782
"HDInsightActivityDebugInfoOption",
17761783
"HdiNodeTypes",
@@ -1801,6 +1808,7 @@
18011808
"NotebookReferenceType",
18021809
"ODataAadServicePrincipalCredentialType",
18031810
"ODataAuthenticationType",
1811+
"OracleAuthenticationType",
18041812
"OraclePartitionOption",
18051813
"OrcCompressionCodec",
18061814
"ParameterType",

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

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -377,6 +377,12 @@ class GoogleBigQueryV2AuthenticationType(str, Enum, metaclass=CaseInsensitiveEnu
377377
USER_AUTHENTICATION = "UserAuthentication"
378378

379379

380+
class GreenplumAuthenticationType(str, Enum, metaclass=CaseInsensitiveEnumMeta):
381+
"""The authentication type to use. Type: string. Only used for V2."""
382+
383+
BASIC = "Basic"
384+
385+
380386
class HBaseAuthenticationType(str, Enum, metaclass=CaseInsensitiveEnumMeta):
381387
"""The authentication mechanism to use to connect to the HBase server."""
382388

@@ -620,6 +626,12 @@ class ODataAuthenticationType(str, Enum, metaclass=CaseInsensitiveEnumMeta):
620626
MANAGED_SERVICE_IDENTITY = "ManagedServiceIdentity"
621627

622628

629+
class OracleAuthenticationType(str, Enum, metaclass=CaseInsensitiveEnumMeta):
630+
"""Authentication type for connecting to the Oracle database. Only used for Version 2.0."""
631+
632+
BASIC = "Basic"
633+
634+
623635
class OraclePartitionOption(str, Enum, metaclass=CaseInsensitiveEnumMeta):
624636
"""The partition mechanism that will be used for Oracle read in parallel."""
625637

0 commit comments

Comments
 (0)