Skip to content

Commit

Permalink
CodeGen from PR 14925 in Azure/azure-rest-api-specs
Browse files Browse the repository at this point in the history
Merge 67bd6fd036ed21324f51a6d12218eaad7eef1fb8 into 6670354
  • Loading branch information
SDKAuto committed Jul 1, 2021
1 parent a8c9c6c commit 6eb19ec
Show file tree
Hide file tree
Showing 40 changed files with 13,058 additions and 9,005 deletions.
1 change: 1 addition & 0 deletions sdk/datafactory/azure-mgmt-datafactory/MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
include _meta.json
recursive-include tests *.py *.yaml
include *.md
include azure/__init__.py
Expand Down
11 changes: 11 additions & 0 deletions sdk/datafactory/azure-mgmt-datafactory/_meta.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"autorest": "3.4.2",
"use": [
"@autorest/python@5.8.1",
"@autorest/modelerfour@4.19.2"
],
"commit": "624245fd656bc61f92ee25ec2326d4753aa26776",
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
"autorest_command": "autorest specification/datafactory/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/python@5.8.1 --use=@autorest/modelerfour@4.19.2 --version=3.4.2",
"readme": "specification/datafactory/resource-manager/readme.md"
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
from typing import Any, Optional

from azure.core.credentials import TokenCredential
from azure.core.pipeline.transport import HttpRequest, HttpResponse

from ._configuration import DataFactoryManagementClientConfiguration
from .operations import Operations
Expand All @@ -35,6 +36,9 @@
from .operations import DataFlowDebugSessionOperations
from .operations import ManagedVirtualNetworksOperations
from .operations import ManagedPrivateEndpointsOperations
from .operations import PrivateEndPointConnectionsOperations
from .operations import PrivateEndpointConnectionOperations
from .operations import PrivateLinkResourcesOperations
from . import models


Expand Down Expand Up @@ -75,6 +79,12 @@ class DataFactoryManagementClient(object):
:vartype managed_virtual_networks: azure.mgmt.datafactory.operations.ManagedVirtualNetworksOperations
:ivar managed_private_endpoints: ManagedPrivateEndpointsOperations operations
:vartype managed_private_endpoints: azure.mgmt.datafactory.operations.ManagedPrivateEndpointsOperations
:ivar private_end_point_connections: PrivateEndPointConnectionsOperations operations
:vartype private_end_point_connections: azure.mgmt.datafactory.operations.PrivateEndPointConnectionsOperations
:ivar private_endpoint_connection: PrivateEndpointConnectionOperations operations
:vartype private_endpoint_connection: azure.mgmt.datafactory.operations.PrivateEndpointConnectionOperations
:ivar private_link_resources: PrivateLinkResourcesOperations operations
:vartype private_link_resources: azure.mgmt.datafactory.operations.PrivateLinkResourcesOperations
:param credential: Credential needed for the client to connect to Azure.
:type credential: ~azure.core.credentials.TokenCredential
:param subscription_id: The subscription identifier.
Expand All @@ -98,6 +108,7 @@ def __init__(

client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)}
self._serialize = Serializer(client_models)
self._serialize.client_side_validation = False
self._deserialize = Deserializer(client_models)

self.operations = Operations(
Expand Down Expand Up @@ -134,6 +145,30 @@ def __init__(
self._client, self._config, self._serialize, self._deserialize)
self.managed_private_endpoints = ManagedPrivateEndpointsOperations(
self._client, self._config, self._serialize, self._deserialize)
self.private_end_point_connections = PrivateEndPointConnectionsOperations(
self._client, self._config, self._serialize, self._deserialize)
self.private_endpoint_connection = PrivateEndpointConnectionOperations(
self._client, self._config, self._serialize, self._deserialize)
self.private_link_resources = PrivateLinkResourcesOperations(
self._client, self._config, self._serialize, self._deserialize)

def _send_request(self, http_request, **kwargs):
# type: (HttpRequest, Any) -> HttpResponse
"""Runs the network request through the client's chained policies.
:param http_request: The network request you want to make. Required.
:type http_request: ~azure.core.pipeline.transport.HttpRequest
:keyword bool stream: Whether the response payload will be streamed. Defaults to True.
:return: The response of your network call. Does not do error handling on your response.
:rtype: ~azure.core.pipeline.transport.HttpResponse
"""
path_format_arguments = {
'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'),
}
http_request.url = self._client.format_url(http_request.url, **path_format_arguments)
stream = kwargs.pop("stream", True)
pipeline_response = self._client._pipeline.run(http_request, stream=stream, **kwargs)
return pipeline_response.http_response

def close(self):
# type: () -> None
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,122 @@
{
"chosen_version": "2018-06-01",
"total_api_version_list": ["2018-06-01"],
"client": {
"name": "DataFactoryManagementClient",
"filename": "_data_factory_management_client",
"description": "The Azure Data Factory V2 management API provides a RESTful set of web services that interact with Azure Data Factory V2 services.",
"base_url": "\u0027https://management.azure.com\u0027",
"custom_base_url": null,
"azure_arm": true,
"has_lro_operations": true,
"client_side_validation": false,
"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\": [\"DataFactoryManagementClientConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}, \"azurecore\": {\"azure.core.pipeline.transport\": [\"HttpRequest\", \"HttpResponse\"]}}}",
"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\": [\"DataFactoryManagementClientConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}, \"azurecore\": {\"azure.core.pipeline.transport\": [\"AsyncHttpResponse\", \"HttpRequest\"]}}}"
},
"global_parameters": {
"sync": {
"credential": {
"signature": "credential, # type: \"TokenCredential\"",
"description": "Credential needed for the client to connect to Azure.",
"docstring_type": "~azure.core.credentials.TokenCredential",
"required": true
},
"subscription_id": {
"signature": "subscription_id, # type: str",
"description": "The subscription identifier.",
"docstring_type": "str",
"required": true
}
},
"async": {
"credential": {
"signature": "credential: \"AsyncTokenCredential\",",
"description": "Credential needed for the client to connect to Azure.",
"docstring_type": "~azure.core.credentials_async.AsyncTokenCredential",
"required": true
},
"subscription_id": {
"signature": "subscription_id: str,",
"description": "The subscription identifier.",
"docstring_type": "str",
"required": true
}
},
"constant": {
},
"call": "credential, subscription_id",
"service_client_specific": {
"sync": {
"api_version": {
"signature": "api_version=None, # type: Optional[str]",
"description": "API version to use if no profile is provided, or if missing in profile.",
"docstring_type": "str",
"required": false
},
"base_url": {
"signature": "base_url=None, # type: Optional[str]",
"description": "Service URL",
"docstring_type": "str",
"required": false
},
"profile": {
"signature": "profile=KnownProfiles.default, # type: KnownProfiles",
"description": "A profile definition, from KnownProfiles to dict.",
"docstring_type": "azure.profiles.KnownProfiles",
"required": false
}
},
"async": {
"api_version": {
"signature": "api_version: Optional[str] = None,",
"description": "API version to use if no profile is provided, or if missing in profile.",
"docstring_type": "str",
"required": false
},
"base_url": {
"signature": "base_url: Optional[str] = None,",
"description": "Service URL",
"docstring_type": "str",
"required": false
},
"profile": {
"signature": "profile: KnownProfiles = KnownProfiles.default,",
"description": "A profile definition, from KnownProfiles to dict.",
"docstring_type": "azure.profiles.KnownProfiles",
"required": false
}
}
}
},
"config": {
"credential": true,
"credential_scopes": ["https://management.azure.com/.default"],
"credential_default_policy_type": "BearerTokenCredentialPolicy",
"credential_default_policy_type_has_async_version": true,
"credential_key_header_name": null,
"sync_imports": "{\"regular\": {\"azurecore\": {\"azure.core.configuration\": [\"Configuration\"], \"azure.core.pipeline\": [\"policies\"], \"azure.mgmt.core.policies\": [\"ARMHttpLoggingPolicy\"]}, \"local\": {\"._version\": [\"VERSION\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\"]}}, \"typing\": {\"azurecore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}}",
"async_imports": "{\"regular\": {\"azurecore\": {\"azure.core.configuration\": [\"Configuration\"], \"azure.core.pipeline\": [\"policies\"], \"azure.mgmt.core.policies\": [\"ARMHttpLoggingPolicy\"]}, \"local\": {\".._version\": [\"VERSION\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\"]}}, \"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"]}}}"
},
"operation_groups": {
"operations": "Operations",
"factories": "FactoriesOperations",
"exposure_control": "ExposureControlOperations",
"integration_runtimes": "IntegrationRuntimesOperations",
"integration_runtime_object_metadata": "IntegrationRuntimeObjectMetadataOperations",
"integration_runtime_nodes": "IntegrationRuntimeNodesOperations",
"linked_services": "LinkedServicesOperations",
"datasets": "DatasetsOperations",
"pipelines": "PipelinesOperations",
"pipeline_runs": "PipelineRunsOperations",
"activity_runs": "ActivityRunsOperations",
"triggers": "TriggersOperations",
"trigger_runs": "TriggerRunsOperations",
"data_flows": "DataFlowsOperations",
"data_flow_debug_session": "DataFlowDebugSessionOperations",
"managed_virtual_networks": "ManagedVirtualNetworksOperations",
"managed_private_endpoints": "ManagedPrivateEndpointsOperations",
"private_end_point_connections": "PrivateEndPointConnectionsOperations",
"private_endpoint_connection": "PrivateEndpointConnectionOperations",
"private_link_resources": "PrivateLinkResourcesOperations"
}
}
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 = "1.1.0"
VERSION = "1.0.0"
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

from typing import Any, Optional, TYPE_CHECKING

from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest
from azure.mgmt.core import AsyncARMPipelineClient
from msrest import Deserializer, Serializer

Expand All @@ -33,6 +34,9 @@
from .operations import DataFlowDebugSessionOperations
from .operations import ManagedVirtualNetworksOperations
from .operations import ManagedPrivateEndpointsOperations
from .operations import PrivateEndPointConnectionsOperations
from .operations import PrivateEndpointConnectionOperations
from .operations import PrivateLinkResourcesOperations
from .. import models


Expand Down Expand Up @@ -73,6 +77,12 @@ class DataFactoryManagementClient(object):
:vartype managed_virtual_networks: azure.mgmt.datafactory.aio.operations.ManagedVirtualNetworksOperations
:ivar managed_private_endpoints: ManagedPrivateEndpointsOperations operations
:vartype managed_private_endpoints: azure.mgmt.datafactory.aio.operations.ManagedPrivateEndpointsOperations
:ivar private_end_point_connections: PrivateEndPointConnectionsOperations operations
:vartype private_end_point_connections: azure.mgmt.datafactory.aio.operations.PrivateEndPointConnectionsOperations
:ivar private_endpoint_connection: PrivateEndpointConnectionOperations operations
:vartype private_endpoint_connection: azure.mgmt.datafactory.aio.operations.PrivateEndpointConnectionOperations
:ivar private_link_resources: PrivateLinkResourcesOperations operations
:vartype private_link_resources: azure.mgmt.datafactory.aio.operations.PrivateLinkResourcesOperations
:param credential: Credential needed for the client to connect to Azure.
:type credential: ~azure.core.credentials_async.AsyncTokenCredential
:param subscription_id: The subscription identifier.
Expand All @@ -95,6 +105,7 @@ def __init__(

client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)}
self._serialize = Serializer(client_models)
self._serialize.client_side_validation = False
self._deserialize = Deserializer(client_models)

self.operations = Operations(
Expand Down Expand Up @@ -131,6 +142,29 @@ def __init__(
self._client, self._config, self._serialize, self._deserialize)
self.managed_private_endpoints = ManagedPrivateEndpointsOperations(
self._client, self._config, self._serialize, self._deserialize)
self.private_end_point_connections = PrivateEndPointConnectionsOperations(
self._client, self._config, self._serialize, self._deserialize)
self.private_endpoint_connection = PrivateEndpointConnectionOperations(
self._client, self._config, self._serialize, self._deserialize)
self.private_link_resources = PrivateLinkResourcesOperations(
self._client, self._config, self._serialize, self._deserialize)

async def _send_request(self, http_request: HttpRequest, **kwargs: Any) -> AsyncHttpResponse:
"""Runs the network request through the client's chained policies.
:param http_request: The network request you want to make. Required.
:type http_request: ~azure.core.pipeline.transport.HttpRequest
:keyword bool stream: Whether the response payload will be streamed. Defaults to True.
:return: The response of your network call. Does not do error handling on your response.
:rtype: ~azure.core.pipeline.transport.AsyncHttpResponse
"""
path_format_arguments = {
'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'),
}
http_request.url = self._client.format_url(http_request.url, **path_format_arguments)
stream = kwargs.pop("stream", True)
pipeline_response = await self._client._pipeline.run(http_request, stream=stream, **kwargs)
return pipeline_response.http_response

async def close(self) -> None:
await self._client.close()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@
from ._data_flow_debug_session_operations import DataFlowDebugSessionOperations
from ._managed_virtual_networks_operations import ManagedVirtualNetworksOperations
from ._managed_private_endpoints_operations import ManagedPrivateEndpointsOperations
from ._private_end_point_connections_operations import PrivateEndPointConnectionsOperations
from ._private_endpoint_connection_operations import PrivateEndpointConnectionOperations
from ._private_link_resources_operations import PrivateLinkResourcesOperations

__all__ = [
'Operations',
Expand All @@ -42,4 +45,7 @@
'DataFlowDebugSessionOperations',
'ManagedVirtualNetworksOperations',
'ManagedPrivateEndpointsOperations',
'PrivateEndPointConnectionsOperations',
'PrivateEndpointConnectionOperations',
'PrivateLinkResourcesOperations',
]
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ async def query_by_pipeline_run(
factory_name: str,
run_id: str,
filter_parameters: "_models.RunFilterParameters",
**kwargs
**kwargs: Any
) -> "_models.ActivityRunsQueryResponse":
"""Query activity runs based on input filter conditions.
Expand Down
Loading

0 comments on commit 6eb19ec

Please sign in to comment.