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
8 changes: 4 additions & 4 deletions sdk/datafactory/azure-mgmt-datafactory/_meta.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"commit": "f06cffbda682a8cd225a8b16bc6f000d26d01612",
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
"commit": "e71a9e3decb8471e4546082109e720c09d227753",
"repository_url": "https://github.com/test-repo-billy/azure-rest-api-specs",
"autorest": "3.10.2",
"use": [
"@autorest/python@6.26.4",
"@autorest/python@6.27.4",
"@autorest/[email protected]"
],
"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",
"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",
"readme": "specification/datafactory/resource-manager/readme.md"
}
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,7 @@ def _create_xml_node(tag, prefix=None, ns=None):
return ET.Element(tag)


class Model(object):
class Model:
"""Mixin for all client request body/response body models to support
serialization and deserialization.
"""
Expand Down Expand Up @@ -563,7 +563,7 @@ def _decode_attribute_map_key(key):
return key.replace("\\.", ".")


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

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


class Deserializer(object):
class Deserializer:
"""Response object model deserializer.

:param dict classes: Class type dictionary for deserializing complex types.
Expand Down Expand Up @@ -1683,17 +1683,21 @@ def _instantiate_model(self, response, attrs, additional_properties=None):
subtype = getattr(response, "_subtype_map", {})
try:
readonly = [
k for k, v in response._validation.items() if v.get("readonly") # pylint: disable=protected-access
k
for k, v in response._validation.items() # pylint: disable=protected-access # type: ignore
if v.get("readonly")
]
const = [
k for k, v in response._validation.items() if v.get("constant") # pylint: disable=protected-access
k
for k, v in response._validation.items() # pylint: disable=protected-access # type: ignore
if v.get("constant")
]
kwargs = {k: v for k, v in attrs.items() if k not in subtype and k not in readonly + const}
response_obj = response(**kwargs)
for attr in readonly:
setattr(response_obj, attr, attrs.get(attr))
if additional_properties:
response_obj.additional_properties = additional_properties
response_obj.additional_properties = additional_properties # type: ignore
return response_obj
except TypeError as err:
msg = "Unable to deserialize {} into model {}. ".format(kwargs, response) # type: ignore
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 = "9.1.0"
VERSION = "1.0.0"
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@
build_get_git_hub_access_token_request,
build_get_request,
build_list_by_resource_group_request,
build_list_request,
build_update_request,
)

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

@distributed_trace
def list(self, **kwargs: Any) -> AsyncIterable["_models.Factory"]:
"""Lists factories under the specified subscription.

:return: An iterator like instance of either Factory or the result of cls(response)
:rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.datafactory.models.Factory]
:raises ~azure.core.exceptions.HttpResponseError:
"""
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})

api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[_models.FactoryListResponse] = kwargs.pop("cls", None)

error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
304: ResourceNotModifiedError,
}
error_map.update(kwargs.pop("error_map", {}) or {})

def prepare_request(next_link=None):
if not next_link:

_request = build_list_request(
subscription_id=self._config.subscription_id,
api_version=api_version,
headers=_headers,
params=_params,
)
_request.url = self._client.format_url(_request.url)

else:
# make call to next link with the client's api-version
_parsed_next_link = urllib.parse.urlparse(next_link)
_next_request_params = case_insensitive_dict(
{
key: [urllib.parse.quote(v) for v in value]
for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items()
}
)
_next_request_params["api-version"] = self._config.api_version
_request = HttpRequest(
"GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params
)
_request.url = self._client.format_url(_request.url)
_request.method = "GET"
return _request

async def extract_data(pipeline_response):
deserialized = self._deserialize("FactoryListResponse", pipeline_response)
list_of_elem = deserialized.value
if cls:
list_of_elem = cls(list_of_elem) # type: ignore
return deserialized.next_link or None, AsyncList(list_of_elem)

async def get_next(next_link=None):
_request = prepare_request(next_link)

_stream = False
pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access
_request, stream=_stream, **kwargs
)
response = pipeline_response.http_response

if response.status_code not in [200]:
map_error(status_code=response.status_code, response=response, error_map=error_map)
raise HttpResponseError(response=response, error_format=ARMErrorFormat)

return pipeline_response

return AsyncItemPaged(get_next, extract_data)

@overload
async def configure_factory_repo(
self,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5587,9 +5587,9 @@ class AvroWriteSettings(FormatWriteSettings):
:ivar max_rows_per_file: Limit the written file's row count to be smaller than or equal to the
specified count. Type: integer (or Expression with resultType integer).
:vartype max_rows_per_file: JSON
:ivar file_name_prefix: Specifies the file name pattern
:code:`<fileNamePrefix>`_:code:`<fileIndex>`.:code:`<fileExtension>` when copy from non-file
based store without partitionOptions. Type: string (or Expression with resultType string).
:ivar file_name_prefix: Specifies the file name pattern :code:`<fileNamePrefix>`_\\
:code:`<fileIndex>`.\\ :code:`<fileExtension>` when copy from non-file based store without
partitionOptions. Type: string (or Expression with resultType string).
:vartype file_name_prefix: JSON
"""

Expand Down Expand Up @@ -5627,9 +5627,9 @@ def __init__(
:keyword max_rows_per_file: Limit the written file's row count to be smaller than or equal to
the specified count. Type: integer (or Expression with resultType integer).
:paramtype max_rows_per_file: JSON
:keyword file_name_prefix: Specifies the file name pattern
:code:`<fileNamePrefix>`_:code:`<fileIndex>`.:code:`<fileExtension>` when copy from non-file
based store without partitionOptions. Type: string (or Expression with resultType string).
:keyword file_name_prefix: Specifies the file name pattern :code:`<fileNamePrefix>`_\\
:code:`<fileIndex>`.\\ :code:`<fileExtension>` when copy from non-file based store without
partitionOptions. Type: string (or Expression with resultType string).
:paramtype file_name_prefix: JSON
"""
super().__init__(additional_properties=additional_properties, **kwargs)
Expand Down Expand Up @@ -8575,8 +8575,8 @@ class AzureDataExplorerLinkedService(LinkedService):
:ivar annotations: List of tags that can be used for describing the linked service.
:vartype annotations: list[JSON]
:ivar endpoint: The endpoint of Azure Data Explorer (the engine's endpoint). URL will be in the
format https://:code:`<clusterName>`.:code:`<regionName>`.kusto.windows.net. Type: string (or
Expression with resultType string). Required.
format https://\\ :code:`<clusterName>`.\\ :code:`<regionName>`.kusto.windows.net. Type: string
(or Expression with resultType string). Required.
:vartype endpoint: JSON
:ivar service_principal_id: The ID of the service principal used to authenticate against Azure
Data Explorer. Type: string (or Expression with resultType string).
Expand Down Expand Up @@ -8648,8 +8648,8 @@ def __init__(
:keyword annotations: List of tags that can be used for describing the linked service.
:paramtype annotations: list[JSON]
:keyword endpoint: The endpoint of Azure Data Explorer (the engine's endpoint). URL will be in
the format https://:code:`<clusterName>`.:code:`<regionName>`.kusto.windows.net. Type: string
(or Expression with resultType string). Required.
the format https://\\ :code:`<clusterName>`.\\ :code:`<regionName>`.kusto.windows.net. Type:
string (or Expression with resultType string). Required.
:paramtype endpoint: JSON
:keyword service_principal_id: The ID of the service principal used to authenticate against
Azure Data Explorer. Type: string (or Expression with resultType string).
Expand Down Expand Up @@ -10566,7 +10566,7 @@ class AzureFunctionLinkedService(LinkedService):
:ivar annotations: List of tags that can be used for describing the linked service.
:vartype annotations: list[JSON]
:ivar function_app_url: The endpoint of the Azure Function App. URL will be in the format
https://:code:`<accountName>`.azurewebsites.net. Type: string (or Expression with resultType
https://\\ :code:`<accountName>`.azurewebsites.net. Type: string (or Expression with resultType
string). Required.
:vartype function_app_url: JSON
:ivar function_key: Function or Host key for Azure Function App.
Expand Down Expand Up @@ -10637,7 +10637,7 @@ def __init__(
:keyword annotations: List of tags that can be used for describing the linked service.
:paramtype annotations: list[JSON]
:keyword function_app_url: The endpoint of the Azure Function App. URL will be in the format
https://:code:`<accountName>`.azurewebsites.net. Type: string (or Expression with resultType
https://\\ :code:`<accountName>`.azurewebsites.net. Type: string (or Expression with resultType
string). Required.
:paramtype function_app_url: JSON
:keyword function_key: Function or Host key for Azure Function App.
Expand Down Expand Up @@ -16485,8 +16485,8 @@ class AzureSynapseArtifactsLinkedService(LinkedService):
:vartype parameters: dict[str, ~azure.mgmt.datafactory.models.ParameterSpecification]
:ivar annotations: List of tags that can be used for describing the linked service.
:vartype annotations: list[JSON]
:ivar endpoint: https://:code:`<workspacename>`.dev.azuresynapse.net, Azure Synapse Analytics
workspace URL. Type: string (or Expression with resultType string). Required.
:ivar endpoint: https://\\ :code:`<workspacename>`.dev.azuresynapse.net, Azure Synapse
Analytics workspace URL. Type: string (or Expression with resultType string). Required.
:vartype endpoint: JSON
:ivar authentication: Required to specify MSI, if using system assigned managed identity as
authentication method. Type: string (or Expression with resultType string).
Expand Down Expand Up @@ -16543,7 +16543,7 @@ def __init__(
:paramtype parameters: dict[str, ~azure.mgmt.datafactory.models.ParameterSpecification]
:keyword annotations: List of tags that can be used for describing the linked service.
:paramtype annotations: list[JSON]
:keyword endpoint: https://:code:`<workspacename>`.dev.azuresynapse.net, Azure Synapse
:keyword endpoint: https://\\ :code:`<workspacename>`.dev.azuresynapse.net, Azure Synapse
Analytics workspace URL. Type: string (or Expression with resultType string). Required.
:paramtype endpoint: JSON
:keyword authentication: Required to specify MSI, if using system assigned managed identity as
Expand Down Expand Up @@ -25271,9 +25271,9 @@ class DelimitedTextWriteSettings(FormatWriteSettings):
:ivar max_rows_per_file: Limit the written file's row count to be smaller than or equal to the
specified count. Type: integer (or Expression with resultType integer).
:vartype max_rows_per_file: JSON
:ivar file_name_prefix: Specifies the file name pattern
:code:`<fileNamePrefix>`_:code:`<fileIndex>`.:code:`<fileExtension>` when copy from non-file
based store without partitionOptions. Type: string (or Expression with resultType string).
:ivar file_name_prefix: Specifies the file name pattern :code:`<fileNamePrefix>`_\\
:code:`<fileIndex>`.\\ :code:`<fileExtension>` when copy from non-file based store without
partitionOptions. Type: string (or Expression with resultType string).
:vartype file_name_prefix: JSON
"""

Expand Down Expand Up @@ -25314,9 +25314,9 @@ def __init__(
:keyword max_rows_per_file: Limit the written file's row count to be smaller than or equal to
the specified count. Type: integer (or Expression with resultType integer).
:paramtype max_rows_per_file: JSON
:keyword file_name_prefix: Specifies the file name pattern
:code:`<fileNamePrefix>`_:code:`<fileIndex>`.:code:`<fileExtension>` when copy from non-file
based store without partitionOptions. Type: string (or Expression with resultType string).
:keyword file_name_prefix: Specifies the file name pattern :code:`<fileNamePrefix>`_\\
:code:`<fileIndex>`.\\ :code:`<fileExtension>` when copy from non-file based store without
partitionOptions. Type: string (or Expression with resultType string).
:paramtype file_name_prefix: JSON
"""
super().__init__(additional_properties=additional_properties, **kwargs)
Expand Down Expand Up @@ -50084,9 +50084,9 @@ class OrcWriteSettings(FormatWriteSettings):
:ivar max_rows_per_file: Limit the written file's row count to be smaller than or equal to the
specified count. Type: integer (or Expression with resultType integer).
:vartype max_rows_per_file: JSON
:ivar file_name_prefix: Specifies the file name pattern
:code:`<fileNamePrefix>`_:code:`<fileIndex>`.:code:`<fileExtension>` when copy from non-file
based store without partitionOptions. Type: string (or Expression with resultType string).
:ivar file_name_prefix: Specifies the file name pattern :code:`<fileNamePrefix>`_\\
:code:`<fileIndex>`.\\ :code:`<fileExtension>` when copy from non-file based store without
partitionOptions. Type: string (or Expression with resultType string).
:vartype file_name_prefix: JSON
"""

Expand Down Expand Up @@ -50116,9 +50116,9 @@ def __init__(
:keyword max_rows_per_file: Limit the written file's row count to be smaller than or equal to
the specified count. Type: integer (or Expression with resultType integer).
:paramtype max_rows_per_file: JSON
:keyword file_name_prefix: Specifies the file name pattern
:code:`<fileNamePrefix>`_:code:`<fileIndex>`.:code:`<fileExtension>` when copy from non-file
based store without partitionOptions. Type: string (or Expression with resultType string).
:keyword file_name_prefix: Specifies the file name pattern :code:`<fileNamePrefix>`_\\
:code:`<fileIndex>`.\\ :code:`<fileExtension>` when copy from non-file based store without
partitionOptions. Type: string (or Expression with resultType string).
:paramtype file_name_prefix: JSON
"""
super().__init__(additional_properties=additional_properties, **kwargs)
Expand Down Expand Up @@ -50638,9 +50638,9 @@ class ParquetWriteSettings(FormatWriteSettings):
:ivar max_rows_per_file: Limit the written file's row count to be smaller than or equal to the
specified count. Type: integer (or Expression with resultType integer).
:vartype max_rows_per_file: JSON
:ivar file_name_prefix: Specifies the file name pattern
:code:`<fileNamePrefix>`_:code:`<fileIndex>`.:code:`<fileExtension>` when copy from non-file
based store without partitionOptions. Type: string (or Expression with resultType string).
:ivar file_name_prefix: Specifies the file name pattern :code:`<fileNamePrefix>`_\\
:code:`<fileIndex>`.\\ :code:`<fileExtension>` when copy from non-file based store without
partitionOptions. Type: string (or Expression with resultType string).
:vartype file_name_prefix: JSON
"""

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