From e67fe6b082e1723ad79c75a8d82d365dc34ef274 Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Fri, 20 Nov 2020 09:34:20 +0000 Subject: [PATCH] CodeGen from PR 11722 in Azure/azure-rest-api-specs [T2] datalakestore for python track2 (#11722) * python track2 * python.md --- ...ta_lake_store_account_management_client.py | 1 - .../azure/mgmt/datalake/store/_metadata.json | 66 +++++++++++++++++ ...ta_lake_store_account_management_client.py | 1 - .../aio/operations/_accounts_operations.py | 70 ++++++++++++------- .../operations/_firewall_rules_operations.py | 24 +++---- .../aio/operations/_locations_operations.py | 12 ++-- .../store/aio/operations/_operations.py | 8 +-- .../_trusted_id_providers_operations.py | 24 +++---- .../_virtual_network_rules_operations.py | 24 +++---- .../store/operations/_accounts_operations.py | 70 ++++++++++++------- .../operations/_firewall_rules_operations.py | 24 +++---- .../store/operations/_locations_operations.py | 12 ++-- .../datalake/store/operations/_operations.py | 8 +-- .../_trusted_id_providers_operations.py | 24 +++---- .../_virtual_network_rules_operations.py | 24 +++---- 15 files changed, 246 insertions(+), 146 deletions(-) create mode 100644 sdk/datalake/azure-mgmt-datalake-store/azure/mgmt/datalake/store/_metadata.json diff --git a/sdk/datalake/azure-mgmt-datalake-store/azure/mgmt/datalake/store/_data_lake_store_account_management_client.py b/sdk/datalake/azure-mgmt-datalake-store/azure/mgmt/datalake/store/_data_lake_store_account_management_client.py index 934e59bc9590..021ed8fc9410 100644 --- a/sdk/datalake/azure-mgmt-datalake-store/azure/mgmt/datalake/store/_data_lake_store_account_management_client.py +++ b/sdk/datalake/azure-mgmt-datalake-store/azure/mgmt/datalake/store/_data_lake_store_account_management_client.py @@ -65,7 +65,6 @@ 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.accounts = AccountsOperations( diff --git a/sdk/datalake/azure-mgmt-datalake-store/azure/mgmt/datalake/store/_metadata.json b/sdk/datalake/azure-mgmt-datalake-store/azure/mgmt/datalake/store/_metadata.json new file mode 100644 index 000000000000..ea7328e5ffa4 --- /dev/null +++ b/sdk/datalake/azure-mgmt-datalake-store/azure/mgmt/datalake/store/_metadata.json @@ -0,0 +1,66 @@ +{ + "chosen_version": "2016-11-01", + "total_api_version_list": ["2016-11-01"], + "client": { + "name": "DataLakeStoreAccountManagementClient", + "filename": "_data_lake_store_account_management_client", + "description": "Creates an Azure Data Lake Store account management client.", + "base_url": "\u0027https://management.azure.com\u0027", + "custom_base_url": null, + "azure_arm": true, + "has_lro_operations": true, + "client_side_validation": true + }, + "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": "Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.", + "docstring_type": "str", + "required": true + } + }, + "async": { + "credential": { + "signature": "credential, # type: \"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, # type: str", + "description": "Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.", + "docstring_type": "str", + "required": true + } + }, + "constant": { + }, + "call": "credential, subscription_id" + }, + "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 + }, + "operation_groups": { + "accounts": "AccountsOperations", + "firewall_rules": "FirewallRulesOperations", + "virtual_network_rules": "VirtualNetworkRulesOperations", + "trusted_id_providers": "TrustedIdProvidersOperations", + "operations": "Operations", + "locations": "LocationsOperations" + }, + "operation_mixins": { + }, + "sync_imports": "None", + "async_imports": "None" +} \ No newline at end of file diff --git a/sdk/datalake/azure-mgmt-datalake-store/azure/mgmt/datalake/store/aio/_data_lake_store_account_management_client.py b/sdk/datalake/azure-mgmt-datalake-store/azure/mgmt/datalake/store/aio/_data_lake_store_account_management_client.py index 36e16b7000ac..051889c580ad 100644 --- a/sdk/datalake/azure-mgmt-datalake-store/azure/mgmt/datalake/store/aio/_data_lake_store_account_management_client.py +++ b/sdk/datalake/azure-mgmt-datalake-store/azure/mgmt/datalake/store/aio/_data_lake_store_account_management_client.py @@ -62,7 +62,6 @@ 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.accounts = AccountsOperations( diff --git a/sdk/datalake/azure-mgmt-datalake-store/azure/mgmt/datalake/store/aio/operations/_accounts_operations.py b/sdk/datalake/azure-mgmt-datalake-store/azure/mgmt/datalake/store/aio/operations/_accounts_operations.py index 722d72f4c1f4..b621b395bb90 100644 --- a/sdk/datalake/azure-mgmt-datalake-store/azure/mgmt/datalake/store/aio/operations/_accounts_operations.py +++ b/sdk/datalake/azure-mgmt-datalake-store/azure/mgmt/datalake/store/aio/operations/_accounts_operations.py @@ -16,7 +16,7 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling -from ... import models +from ... import models as _models T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -35,7 +35,7 @@ class AccountsOperations: :param deserializer: An object model deserializer. """ - models = models + models = _models def __init__(self, client, config, serializer, deserializer) -> None: self._client = client @@ -52,7 +52,7 @@ def list( orderby: Optional[str] = None, count: Optional[bool] = None, **kwargs - ) -> AsyncIterable["models.DataLakeStoreAccountListResult"]: + ) -> AsyncIterable["_models.DataLakeStoreAccountListResult"]: """Lists the Data Lake Store accounts within the subscription. The response includes a link to the next page of results, if any. @@ -77,7 +77,7 @@ def list( :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.datalake.store.models.DataLakeStoreAccountListResult] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["models.DataLakeStoreAccountListResult"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.DataLakeStoreAccountListResult"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } @@ -154,7 +154,7 @@ def list_by_resource_group( orderby: Optional[str] = None, count: Optional[bool] = None, **kwargs - ) -> AsyncIterable["models.DataLakeStoreAccountListResult"]: + ) -> AsyncIterable["_models.DataLakeStoreAccountListResult"]: """Lists the Data Lake Store accounts within a specific resource group. The response includes a link to the next page of results, if any. @@ -181,7 +181,7 @@ def list_by_resource_group( :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.datalake.store.models.DataLakeStoreAccountListResult] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["models.DataLakeStoreAccountListResult"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.DataLakeStoreAccountListResult"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } @@ -253,10 +253,10 @@ async def _create_initial( self, resource_group_name: str, account_name: str, - parameters: "models.CreateDataLakeStoreAccountParameters", + parameters: "_models.CreateDataLakeStoreAccountParameters", **kwargs - ) -> "models.DataLakeStoreAccount": - cls = kwargs.pop('cls', None) # type: ClsType["models.DataLakeStoreAccount"] + ) -> "_models.DataLakeStoreAccount": + cls = kwargs.pop('cls', None) # type: ClsType["_models.DataLakeStoreAccount"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } @@ -310,9 +310,9 @@ async def begin_create( self, resource_group_name: str, account_name: str, - parameters: "models.CreateDataLakeStoreAccountParameters", + parameters: "_models.CreateDataLakeStoreAccountParameters", **kwargs - ) -> AsyncLROPoller["models.DataLakeStoreAccount"]: + ) -> AsyncLROPoller["_models.DataLakeStoreAccount"]: """Creates the specified Data Lake Store account. :param resource_group_name: The name of the Azure resource group. @@ -332,7 +332,7 @@ async def begin_create( :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["models.DataLakeStoreAccount"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.DataLakeStoreAccount"] lro_delay = kwargs.pop( 'polling_interval', self._config.polling_interval @@ -357,7 +357,13 @@ def get_long_running_output(pipeline_response): return cls(pipeline_response, deserialized, {}) return deserialized - if polling is True: polling_method = AsyncARMPolling(lro_delay, **kwargs) + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'accountName': self._serialize.url("account_name", account_name, 'str'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = AsyncNoPolling() else: polling_method = polling if cont_token: @@ -376,7 +382,7 @@ async def get( resource_group_name: str, account_name: str, **kwargs - ) -> "models.DataLakeStoreAccount": + ) -> "_models.DataLakeStoreAccount": """Gets the specified Data Lake Store account. :param resource_group_name: The name of the Azure resource group. @@ -388,7 +394,7 @@ async def get( :rtype: ~azure.mgmt.datalake.store.models.DataLakeStoreAccount :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["models.DataLakeStoreAccount"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.DataLakeStoreAccount"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } @@ -433,10 +439,10 @@ async def _update_initial( self, resource_group_name: str, account_name: str, - parameters: "models.UpdateDataLakeStoreAccountParameters", + parameters: "_models.UpdateDataLakeStoreAccountParameters", **kwargs - ) -> "models.DataLakeStoreAccount": - cls = kwargs.pop('cls', None) # type: ClsType["models.DataLakeStoreAccount"] + ) -> "_models.DataLakeStoreAccount": + cls = kwargs.pop('cls', None) # type: ClsType["_models.DataLakeStoreAccount"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } @@ -493,9 +499,9 @@ async def begin_update( self, resource_group_name: str, account_name: str, - parameters: "models.UpdateDataLakeStoreAccountParameters", + parameters: "_models.UpdateDataLakeStoreAccountParameters", **kwargs - ) -> AsyncLROPoller["models.DataLakeStoreAccount"]: + ) -> AsyncLROPoller["_models.DataLakeStoreAccount"]: """Updates the specified Data Lake Store account information. :param resource_group_name: The name of the Azure resource group. @@ -515,7 +521,7 @@ async def begin_update( :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["models.DataLakeStoreAccount"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.DataLakeStoreAccount"] lro_delay = kwargs.pop( 'polling_interval', self._config.polling_interval @@ -540,7 +546,13 @@ def get_long_running_output(pipeline_response): return cls(pipeline_response, deserialized, {}) return deserialized - if polling is True: polling_method = AsyncARMPolling(lro_delay, **kwargs) + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'accountName': self._serialize.url("account_name", account_name, 'str'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = AsyncNoPolling() else: polling_method = polling if cont_token: @@ -640,7 +652,13 @@ def get_long_running_output(pipeline_response): if cls: return cls(pipeline_response, None, {}) - if polling is True: polling_method = AsyncARMPolling(lro_delay, **kwargs) + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'accountName': self._serialize.url("account_name", account_name, 'str'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = AsyncNoPolling() else: polling_method = polling if cont_token: @@ -713,7 +731,7 @@ async def check_name_availability( location: str, name: str, **kwargs - ) -> "models.NameAvailabilityInformation": + ) -> "_models.NameAvailabilityInformation": """Checks whether the specified account name is available or taken. :param location: The resource location without whitespace. @@ -725,13 +743,13 @@ async def check_name_availability( :rtype: ~azure.mgmt.datalake.store.models.NameAvailabilityInformation :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["models.NameAvailabilityInformation"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.NameAvailabilityInformation"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - _parameters = models.CheckNameAvailabilityParameters(name=name) + _parameters = _models.CheckNameAvailabilityParameters(name=name) api_version = "2016-11-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" diff --git a/sdk/datalake/azure-mgmt-datalake-store/azure/mgmt/datalake/store/aio/operations/_firewall_rules_operations.py b/sdk/datalake/azure-mgmt-datalake-store/azure/mgmt/datalake/store/aio/operations/_firewall_rules_operations.py index 1ceec9e94b92..5d577417ac91 100644 --- a/sdk/datalake/azure-mgmt-datalake-store/azure/mgmt/datalake/store/aio/operations/_firewall_rules_operations.py +++ b/sdk/datalake/azure-mgmt-datalake-store/azure/mgmt/datalake/store/aio/operations/_firewall_rules_operations.py @@ -14,7 +14,7 @@ from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest from azure.mgmt.core.exceptions import ARMErrorFormat -from ... import models +from ... import models as _models T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -33,7 +33,7 @@ class FirewallRulesOperations: :param deserializer: An object model deserializer. """ - models = models + models = _models def __init__(self, client, config, serializer, deserializer) -> None: self._client = client @@ -46,7 +46,7 @@ def list_by_account( resource_group_name: str, account_name: str, **kwargs - ) -> AsyncIterable["models.FirewallRuleListResult"]: + ) -> AsyncIterable["_models.FirewallRuleListResult"]: """Lists the Data Lake Store firewall rules within the specified Data Lake Store account. :param resource_group_name: The name of the Azure resource group. @@ -58,7 +58,7 @@ def list_by_account( :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.datalake.store.models.FirewallRuleListResult] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["models.FirewallRuleListResult"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.FirewallRuleListResult"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } @@ -123,7 +123,7 @@ async def create_or_update( start_ip_address: str, end_ip_address: str, **kwargs - ) -> "models.FirewallRule": + ) -> "_models.FirewallRule": """Creates or updates the specified firewall rule. During update, the firewall rule with the specified name will be replaced with this new firewall rule. @@ -144,13 +144,13 @@ async def create_or_update( :rtype: ~azure.mgmt.datalake.store.models.FirewallRule :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["models.FirewallRule"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.FirewallRule"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - _parameters = models.CreateOrUpdateFirewallRuleParameters(start_ip_address=start_ip_address, end_ip_address=end_ip_address) + _parameters = _models.CreateOrUpdateFirewallRuleParameters(start_ip_address=start_ip_address, end_ip_address=end_ip_address) api_version = "2016-11-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -199,7 +199,7 @@ async def get( account_name: str, firewall_rule_name: str, **kwargs - ) -> "models.FirewallRule": + ) -> "_models.FirewallRule": """Gets the specified Data Lake Store firewall rule. :param resource_group_name: The name of the Azure resource group. @@ -213,7 +213,7 @@ async def get( :rtype: ~azure.mgmt.datalake.store.models.FirewallRule :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["models.FirewallRule"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.FirewallRule"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } @@ -263,7 +263,7 @@ async def update( start_ip_address: Optional[str] = None, end_ip_address: Optional[str] = None, **kwargs - ) -> "models.FirewallRule": + ) -> "_models.FirewallRule": """Updates the specified firewall rule. :param resource_group_name: The name of the Azure resource group. @@ -283,13 +283,13 @@ async def update( :rtype: ~azure.mgmt.datalake.store.models.FirewallRule :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["models.FirewallRule"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.FirewallRule"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - _parameters = models.UpdateFirewallRuleParameters(start_ip_address=start_ip_address, end_ip_address=end_ip_address) + _parameters = _models.UpdateFirewallRuleParameters(start_ip_address=start_ip_address, end_ip_address=end_ip_address) api_version = "2016-11-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" diff --git a/sdk/datalake/azure-mgmt-datalake-store/azure/mgmt/datalake/store/aio/operations/_locations_operations.py b/sdk/datalake/azure-mgmt-datalake-store/azure/mgmt/datalake/store/aio/operations/_locations_operations.py index e88244ad1f59..6344204350ce 100644 --- a/sdk/datalake/azure-mgmt-datalake-store/azure/mgmt/datalake/store/aio/operations/_locations_operations.py +++ b/sdk/datalake/azure-mgmt-datalake-store/azure/mgmt/datalake/store/aio/operations/_locations_operations.py @@ -14,7 +14,7 @@ from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest from azure.mgmt.core.exceptions import ARMErrorFormat -from ... import models +from ... import models as _models T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -33,7 +33,7 @@ class LocationsOperations: :param deserializer: An object model deserializer. """ - models = models + models = _models def __init__(self, client, config, serializer, deserializer) -> None: self._client = client @@ -45,7 +45,7 @@ async def get_capability( self, location: str, **kwargs - ) -> Optional["models.CapabilityInformation"]: + ) -> Optional["_models.CapabilityInformation"]: """Gets subscription-level properties and limits for Data Lake Store specified by resource location. @@ -56,7 +56,7 @@ async def get_capability( :rtype: ~azure.mgmt.datalake.store.models.CapabilityInformation or None :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType[Optional["models.CapabilityInformation"]] + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.CapabilityInformation"]] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } @@ -102,7 +102,7 @@ def get_usage( self, location: str, **kwargs - ) -> AsyncIterable["models.UsageListResult"]: + ) -> AsyncIterable["_models.UsageListResult"]: """Gets the current usage count and the limit for the resources of the location under the subscription. @@ -113,7 +113,7 @@ def get_usage( :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.datalake.store.models.UsageListResult] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["models.UsageListResult"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.UsageListResult"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } diff --git a/sdk/datalake/azure-mgmt-datalake-store/azure/mgmt/datalake/store/aio/operations/_operations.py b/sdk/datalake/azure-mgmt-datalake-store/azure/mgmt/datalake/store/aio/operations/_operations.py index 5610492643d1..0252f15cbccf 100644 --- a/sdk/datalake/azure-mgmt-datalake-store/azure/mgmt/datalake/store/aio/operations/_operations.py +++ b/sdk/datalake/azure-mgmt-datalake-store/azure/mgmt/datalake/store/aio/operations/_operations.py @@ -13,7 +13,7 @@ from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest from azure.mgmt.core.exceptions import ARMErrorFormat -from ... import models +from ... import models as _models T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -32,7 +32,7 @@ class Operations: :param deserializer: An object model deserializer. """ - models = models + models = _models def __init__(self, client, config, serializer, deserializer) -> None: self._client = client @@ -43,7 +43,7 @@ def __init__(self, client, config, serializer, deserializer) -> None: async def list( self, **kwargs - ) -> "models.OperationListResult": + ) -> "_models.OperationListResult": """Lists all of the available Data Lake Store REST API operations. :keyword callable cls: A custom type or function that will be passed the direct response @@ -51,7 +51,7 @@ async def list( :rtype: ~azure.mgmt.datalake.store.models.OperationListResult :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["models.OperationListResult"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.OperationListResult"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } diff --git a/sdk/datalake/azure-mgmt-datalake-store/azure/mgmt/datalake/store/aio/operations/_trusted_id_providers_operations.py b/sdk/datalake/azure-mgmt-datalake-store/azure/mgmt/datalake/store/aio/operations/_trusted_id_providers_operations.py index a97499dc564a..4034e340e728 100644 --- a/sdk/datalake/azure-mgmt-datalake-store/azure/mgmt/datalake/store/aio/operations/_trusted_id_providers_operations.py +++ b/sdk/datalake/azure-mgmt-datalake-store/azure/mgmt/datalake/store/aio/operations/_trusted_id_providers_operations.py @@ -14,7 +14,7 @@ from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest from azure.mgmt.core.exceptions import ARMErrorFormat -from ... import models +from ... import models as _models T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -33,7 +33,7 @@ class TrustedIdProvidersOperations: :param deserializer: An object model deserializer. """ - models = models + models = _models def __init__(self, client, config, serializer, deserializer) -> None: self._client = client @@ -46,7 +46,7 @@ def list_by_account( resource_group_name: str, account_name: str, **kwargs - ) -> AsyncIterable["models.TrustedIdProviderListResult"]: + ) -> AsyncIterable["_models.TrustedIdProviderListResult"]: """Lists the Data Lake Store trusted identity providers within the specified Data Lake Store account. @@ -59,7 +59,7 @@ def list_by_account( :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.datalake.store.models.TrustedIdProviderListResult] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["models.TrustedIdProviderListResult"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.TrustedIdProviderListResult"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } @@ -123,7 +123,7 @@ async def create_or_update( trusted_id_provider_name: str, id_provider: str, **kwargs - ) -> "models.TrustedIdProvider": + ) -> "_models.TrustedIdProvider": """Creates or updates the specified trusted identity provider. During update, the trusted identity provider with the specified name will be replaced with this new provider. @@ -141,13 +141,13 @@ async def create_or_update( :rtype: ~azure.mgmt.datalake.store.models.TrustedIdProvider :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["models.TrustedIdProvider"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.TrustedIdProvider"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - _parameters = models.CreateOrUpdateTrustedIdProviderParameters(id_provider=id_provider) + _parameters = _models.CreateOrUpdateTrustedIdProviderParameters(id_provider=id_provider) api_version = "2016-11-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -196,7 +196,7 @@ async def get( account_name: str, trusted_id_provider_name: str, **kwargs - ) -> "models.TrustedIdProvider": + ) -> "_models.TrustedIdProvider": """Gets the specified Data Lake Store trusted identity provider. :param resource_group_name: The name of the Azure resource group. @@ -210,7 +210,7 @@ async def get( :rtype: ~azure.mgmt.datalake.store.models.TrustedIdProvider :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["models.TrustedIdProvider"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.TrustedIdProvider"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } @@ -259,7 +259,7 @@ async def update( trusted_id_provider_name: str, id_provider: Optional[str] = None, **kwargs - ) -> "models.TrustedIdProvider": + ) -> "_models.TrustedIdProvider": """Updates the specified trusted identity provider. :param resource_group_name: The name of the Azure resource group. @@ -276,13 +276,13 @@ async def update( :rtype: ~azure.mgmt.datalake.store.models.TrustedIdProvider :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["models.TrustedIdProvider"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.TrustedIdProvider"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - _parameters = models.UpdateTrustedIdProviderParameters(id_provider=id_provider) + _parameters = _models.UpdateTrustedIdProviderParameters(id_provider=id_provider) api_version = "2016-11-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" diff --git a/sdk/datalake/azure-mgmt-datalake-store/azure/mgmt/datalake/store/aio/operations/_virtual_network_rules_operations.py b/sdk/datalake/azure-mgmt-datalake-store/azure/mgmt/datalake/store/aio/operations/_virtual_network_rules_operations.py index de9d6876d951..4141147aeddf 100644 --- a/sdk/datalake/azure-mgmt-datalake-store/azure/mgmt/datalake/store/aio/operations/_virtual_network_rules_operations.py +++ b/sdk/datalake/azure-mgmt-datalake-store/azure/mgmt/datalake/store/aio/operations/_virtual_network_rules_operations.py @@ -14,7 +14,7 @@ from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest from azure.mgmt.core.exceptions import ARMErrorFormat -from ... import models +from ... import models as _models T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -33,7 +33,7 @@ class VirtualNetworkRulesOperations: :param deserializer: An object model deserializer. """ - models = models + models = _models def __init__(self, client, config, serializer, deserializer) -> None: self._client = client @@ -46,7 +46,7 @@ def list_by_account( resource_group_name: str, account_name: str, **kwargs - ) -> AsyncIterable["models.VirtualNetworkRuleListResult"]: + ) -> AsyncIterable["_models.VirtualNetworkRuleListResult"]: """Lists the Data Lake Store virtual network rules within the specified Data Lake Store account. :param resource_group_name: The name of the Azure resource group. @@ -58,7 +58,7 @@ def list_by_account( :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.datalake.store.models.VirtualNetworkRuleListResult] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["models.VirtualNetworkRuleListResult"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualNetworkRuleListResult"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } @@ -122,7 +122,7 @@ async def create_or_update( virtual_network_rule_name: str, subnet_id: str, **kwargs - ) -> "models.VirtualNetworkRule": + ) -> "_models.VirtualNetworkRule": """Creates or updates the specified virtual network rule. During update, the virtual network rule with the specified name will be replaced with this new virtual network rule. @@ -139,13 +139,13 @@ async def create_or_update( :rtype: ~azure.mgmt.datalake.store.models.VirtualNetworkRule :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["models.VirtualNetworkRule"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualNetworkRule"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - _parameters = models.CreateOrUpdateVirtualNetworkRuleParameters(subnet_id=subnet_id) + _parameters = _models.CreateOrUpdateVirtualNetworkRuleParameters(subnet_id=subnet_id) api_version = "2016-11-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -194,7 +194,7 @@ async def get( account_name: str, virtual_network_rule_name: str, **kwargs - ) -> "models.VirtualNetworkRule": + ) -> "_models.VirtualNetworkRule": """Gets the specified Data Lake Store virtual network rule. :param resource_group_name: The name of the Azure resource group. @@ -208,7 +208,7 @@ async def get( :rtype: ~azure.mgmt.datalake.store.models.VirtualNetworkRule :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["models.VirtualNetworkRule"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualNetworkRule"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } @@ -257,7 +257,7 @@ async def update( virtual_network_rule_name: str, subnet_id: Optional[str] = None, **kwargs - ) -> "models.VirtualNetworkRule": + ) -> "_models.VirtualNetworkRule": """Updates the specified virtual network rule. :param resource_group_name: The name of the Azure resource group. @@ -273,13 +273,13 @@ async def update( :rtype: ~azure.mgmt.datalake.store.models.VirtualNetworkRule :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["models.VirtualNetworkRule"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualNetworkRule"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - _parameters = models.UpdateVirtualNetworkRuleParameters(subnet_id=subnet_id) + _parameters = _models.UpdateVirtualNetworkRuleParameters(subnet_id=subnet_id) api_version = "2016-11-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" diff --git a/sdk/datalake/azure-mgmt-datalake-store/azure/mgmt/datalake/store/operations/_accounts_operations.py b/sdk/datalake/azure-mgmt-datalake-store/azure/mgmt/datalake/store/operations/_accounts_operations.py index cddb9dc0ec5a..ced1fa906ea7 100644 --- a/sdk/datalake/azure-mgmt-datalake-store/azure/mgmt/datalake/store/operations/_accounts_operations.py +++ b/sdk/datalake/azure-mgmt-datalake-store/azure/mgmt/datalake/store/operations/_accounts_operations.py @@ -16,7 +16,7 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from azure.mgmt.core.polling.arm_polling import ARMPolling -from .. import models +from .. import models as _models if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports @@ -39,7 +39,7 @@ class AccountsOperations(object): :param deserializer: An object model deserializer. """ - models = models + models = _models def __init__(self, client, config, serializer, deserializer): self._client = client @@ -57,7 +57,7 @@ def list( count=None, # type: Optional[bool] **kwargs # type: Any ): - # type: (...) -> Iterable["models.DataLakeStoreAccountListResult"] + # type: (...) -> Iterable["_models.DataLakeStoreAccountListResult"] """Lists the Data Lake Store accounts within the subscription. The response includes a link to the next page of results, if any. @@ -82,7 +82,7 @@ def list( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.datalake.store.models.DataLakeStoreAccountListResult] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["models.DataLakeStoreAccountListResult"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.DataLakeStoreAccountListResult"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } @@ -160,7 +160,7 @@ def list_by_resource_group( count=None, # type: Optional[bool] **kwargs # type: Any ): - # type: (...) -> Iterable["models.DataLakeStoreAccountListResult"] + # type: (...) -> Iterable["_models.DataLakeStoreAccountListResult"] """Lists the Data Lake Store accounts within a specific resource group. The response includes a link to the next page of results, if any. @@ -187,7 +187,7 @@ def list_by_resource_group( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.datalake.store.models.DataLakeStoreAccountListResult] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["models.DataLakeStoreAccountListResult"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.DataLakeStoreAccountListResult"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } @@ -259,11 +259,11 @@ def _create_initial( self, resource_group_name, # type: str account_name, # type: str - parameters, # type: "models.CreateDataLakeStoreAccountParameters" + parameters, # type: "_models.CreateDataLakeStoreAccountParameters" **kwargs # type: Any ): - # type: (...) -> "models.DataLakeStoreAccount" - cls = kwargs.pop('cls', None) # type: ClsType["models.DataLakeStoreAccount"] + # type: (...) -> "_models.DataLakeStoreAccount" + cls = kwargs.pop('cls', None) # type: ClsType["_models.DataLakeStoreAccount"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } @@ -317,10 +317,10 @@ def begin_create( self, resource_group_name, # type: str account_name, # type: str - parameters, # type: "models.CreateDataLakeStoreAccountParameters" + parameters, # type: "_models.CreateDataLakeStoreAccountParameters" **kwargs # type: Any ): - # type: (...) -> LROPoller["models.DataLakeStoreAccount"] + # type: (...) -> LROPoller["_models.DataLakeStoreAccount"] """Creates the specified Data Lake Store account. :param resource_group_name: The name of the Azure resource group. @@ -340,7 +340,7 @@ def begin_create( :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["models.DataLakeStoreAccount"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.DataLakeStoreAccount"] lro_delay = kwargs.pop( 'polling_interval', self._config.polling_interval @@ -365,7 +365,13 @@ def get_long_running_output(pipeline_response): return cls(pipeline_response, deserialized, {}) return deserialized - if polling is True: polling_method = ARMPolling(lro_delay, **kwargs) + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'accountName': self._serialize.url("account_name", account_name, 'str'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = NoPolling() else: polling_method = polling if cont_token: @@ -385,7 +391,7 @@ def get( account_name, # type: str **kwargs # type: Any ): - # type: (...) -> "models.DataLakeStoreAccount" + # type: (...) -> "_models.DataLakeStoreAccount" """Gets the specified Data Lake Store account. :param resource_group_name: The name of the Azure resource group. @@ -397,7 +403,7 @@ def get( :rtype: ~azure.mgmt.datalake.store.models.DataLakeStoreAccount :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["models.DataLakeStoreAccount"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.DataLakeStoreAccount"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } @@ -442,11 +448,11 @@ def _update_initial( self, resource_group_name, # type: str account_name, # type: str - parameters, # type: "models.UpdateDataLakeStoreAccountParameters" + parameters, # type: "_models.UpdateDataLakeStoreAccountParameters" **kwargs # type: Any ): - # type: (...) -> "models.DataLakeStoreAccount" - cls = kwargs.pop('cls', None) # type: ClsType["models.DataLakeStoreAccount"] + # type: (...) -> "_models.DataLakeStoreAccount" + cls = kwargs.pop('cls', None) # type: ClsType["_models.DataLakeStoreAccount"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } @@ -503,10 +509,10 @@ def begin_update( self, resource_group_name, # type: str account_name, # type: str - parameters, # type: "models.UpdateDataLakeStoreAccountParameters" + parameters, # type: "_models.UpdateDataLakeStoreAccountParameters" **kwargs # type: Any ): - # type: (...) -> LROPoller["models.DataLakeStoreAccount"] + # type: (...) -> LROPoller["_models.DataLakeStoreAccount"] """Updates the specified Data Lake Store account information. :param resource_group_name: The name of the Azure resource group. @@ -526,7 +532,7 @@ def begin_update( :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["models.DataLakeStoreAccount"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.DataLakeStoreAccount"] lro_delay = kwargs.pop( 'polling_interval', self._config.polling_interval @@ -551,7 +557,13 @@ def get_long_running_output(pipeline_response): return cls(pipeline_response, deserialized, {}) return deserialized - if polling is True: polling_method = ARMPolling(lro_delay, **kwargs) + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'accountName': self._serialize.url("account_name", account_name, 'str'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = NoPolling() else: polling_method = polling if cont_token: @@ -653,7 +665,13 @@ def get_long_running_output(pipeline_response): if cls: return cls(pipeline_response, None, {}) - if polling is True: polling_method = ARMPolling(lro_delay, **kwargs) + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'accountName': self._serialize.url("account_name", account_name, 'str'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = NoPolling() else: polling_method = polling if cont_token: @@ -728,7 +746,7 @@ def check_name_availability( name, # type: str **kwargs # type: Any ): - # type: (...) -> "models.NameAvailabilityInformation" + # type: (...) -> "_models.NameAvailabilityInformation" """Checks whether the specified account name is available or taken. :param location: The resource location without whitespace. @@ -740,13 +758,13 @@ def check_name_availability( :rtype: ~azure.mgmt.datalake.store.models.NameAvailabilityInformation :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["models.NameAvailabilityInformation"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.NameAvailabilityInformation"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - _parameters = models.CheckNameAvailabilityParameters(name=name) + _parameters = _models.CheckNameAvailabilityParameters(name=name) api_version = "2016-11-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" diff --git a/sdk/datalake/azure-mgmt-datalake-store/azure/mgmt/datalake/store/operations/_firewall_rules_operations.py b/sdk/datalake/azure-mgmt-datalake-store/azure/mgmt/datalake/store/operations/_firewall_rules_operations.py index acbf35ef149a..27e946694b6c 100644 --- a/sdk/datalake/azure-mgmt-datalake-store/azure/mgmt/datalake/store/operations/_firewall_rules_operations.py +++ b/sdk/datalake/azure-mgmt-datalake-store/azure/mgmt/datalake/store/operations/_firewall_rules_operations.py @@ -14,7 +14,7 @@ from azure.core.pipeline.transport import HttpRequest, HttpResponse from azure.mgmt.core.exceptions import ARMErrorFormat -from .. import models +from .. import models as _models if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports @@ -37,7 +37,7 @@ class FirewallRulesOperations(object): :param deserializer: An object model deserializer. """ - models = models + models = _models def __init__(self, client, config, serializer, deserializer): self._client = client @@ -51,7 +51,7 @@ def list_by_account( account_name, # type: str **kwargs # type: Any ): - # type: (...) -> Iterable["models.FirewallRuleListResult"] + # type: (...) -> Iterable["_models.FirewallRuleListResult"] """Lists the Data Lake Store firewall rules within the specified Data Lake Store account. :param resource_group_name: The name of the Azure resource group. @@ -63,7 +63,7 @@ def list_by_account( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.datalake.store.models.FirewallRuleListResult] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["models.FirewallRuleListResult"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.FirewallRuleListResult"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } @@ -129,7 +129,7 @@ def create_or_update( end_ip_address, # type: str **kwargs # type: Any ): - # type: (...) -> "models.FirewallRule" + # type: (...) -> "_models.FirewallRule" """Creates or updates the specified firewall rule. During update, the firewall rule with the specified name will be replaced with this new firewall rule. @@ -150,13 +150,13 @@ def create_or_update( :rtype: ~azure.mgmt.datalake.store.models.FirewallRule :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["models.FirewallRule"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.FirewallRule"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - _parameters = models.CreateOrUpdateFirewallRuleParameters(start_ip_address=start_ip_address, end_ip_address=end_ip_address) + _parameters = _models.CreateOrUpdateFirewallRuleParameters(start_ip_address=start_ip_address, end_ip_address=end_ip_address) api_version = "2016-11-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -206,7 +206,7 @@ def get( firewall_rule_name, # type: str **kwargs # type: Any ): - # type: (...) -> "models.FirewallRule" + # type: (...) -> "_models.FirewallRule" """Gets the specified Data Lake Store firewall rule. :param resource_group_name: The name of the Azure resource group. @@ -220,7 +220,7 @@ def get( :rtype: ~azure.mgmt.datalake.store.models.FirewallRule :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["models.FirewallRule"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.FirewallRule"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } @@ -271,7 +271,7 @@ def update( end_ip_address=None, # type: Optional[str] **kwargs # type: Any ): - # type: (...) -> "models.FirewallRule" + # type: (...) -> "_models.FirewallRule" """Updates the specified firewall rule. :param resource_group_name: The name of the Azure resource group. @@ -291,13 +291,13 @@ def update( :rtype: ~azure.mgmt.datalake.store.models.FirewallRule :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["models.FirewallRule"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.FirewallRule"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - _parameters = models.UpdateFirewallRuleParameters(start_ip_address=start_ip_address, end_ip_address=end_ip_address) + _parameters = _models.UpdateFirewallRuleParameters(start_ip_address=start_ip_address, end_ip_address=end_ip_address) api_version = "2016-11-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" diff --git a/sdk/datalake/azure-mgmt-datalake-store/azure/mgmt/datalake/store/operations/_locations_operations.py b/sdk/datalake/azure-mgmt-datalake-store/azure/mgmt/datalake/store/operations/_locations_operations.py index d9afc41f2f31..4a1679b8c521 100644 --- a/sdk/datalake/azure-mgmt-datalake-store/azure/mgmt/datalake/store/operations/_locations_operations.py +++ b/sdk/datalake/azure-mgmt-datalake-store/azure/mgmt/datalake/store/operations/_locations_operations.py @@ -14,7 +14,7 @@ from azure.core.pipeline.transport import HttpRequest, HttpResponse from azure.mgmt.core.exceptions import ARMErrorFormat -from .. import models +from .. import models as _models if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports @@ -37,7 +37,7 @@ class LocationsOperations(object): :param deserializer: An object model deserializer. """ - models = models + models = _models def __init__(self, client, config, serializer, deserializer): self._client = client @@ -50,7 +50,7 @@ def get_capability( location, # type: str **kwargs # type: Any ): - # type: (...) -> Optional["models.CapabilityInformation"] + # type: (...) -> Optional["_models.CapabilityInformation"] """Gets subscription-level properties and limits for Data Lake Store specified by resource location. @@ -61,7 +61,7 @@ def get_capability( :rtype: ~azure.mgmt.datalake.store.models.CapabilityInformation or None :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType[Optional["models.CapabilityInformation"]] + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.CapabilityInformation"]] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } @@ -108,7 +108,7 @@ def get_usage( location, # type: str **kwargs # type: Any ): - # type: (...) -> Iterable["models.UsageListResult"] + # type: (...) -> Iterable["_models.UsageListResult"] """Gets the current usage count and the limit for the resources of the location under the subscription. @@ -119,7 +119,7 @@ def get_usage( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.datalake.store.models.UsageListResult] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["models.UsageListResult"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.UsageListResult"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } diff --git a/sdk/datalake/azure-mgmt-datalake-store/azure/mgmt/datalake/store/operations/_operations.py b/sdk/datalake/azure-mgmt-datalake-store/azure/mgmt/datalake/store/operations/_operations.py index f6e6a23ad858..525307da8bba 100644 --- a/sdk/datalake/azure-mgmt-datalake-store/azure/mgmt/datalake/store/operations/_operations.py +++ b/sdk/datalake/azure-mgmt-datalake-store/azure/mgmt/datalake/store/operations/_operations.py @@ -13,7 +13,7 @@ from azure.core.pipeline.transport import HttpRequest, HttpResponse from azure.mgmt.core.exceptions import ARMErrorFormat -from .. import models +from .. import models as _models if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports @@ -36,7 +36,7 @@ class Operations(object): :param deserializer: An object model deserializer. """ - models = models + models = _models def __init__(self, client, config, serializer, deserializer): self._client = client @@ -48,7 +48,7 @@ def list( self, **kwargs # type: Any ): - # type: (...) -> "models.OperationListResult" + # type: (...) -> "_models.OperationListResult" """Lists all of the available Data Lake Store REST API operations. :keyword callable cls: A custom type or function that will be passed the direct response @@ -56,7 +56,7 @@ def list( :rtype: ~azure.mgmt.datalake.store.models.OperationListResult :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["models.OperationListResult"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.OperationListResult"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } diff --git a/sdk/datalake/azure-mgmt-datalake-store/azure/mgmt/datalake/store/operations/_trusted_id_providers_operations.py b/sdk/datalake/azure-mgmt-datalake-store/azure/mgmt/datalake/store/operations/_trusted_id_providers_operations.py index 59dc8df399fb..e23c76d29997 100644 --- a/sdk/datalake/azure-mgmt-datalake-store/azure/mgmt/datalake/store/operations/_trusted_id_providers_operations.py +++ b/sdk/datalake/azure-mgmt-datalake-store/azure/mgmt/datalake/store/operations/_trusted_id_providers_operations.py @@ -14,7 +14,7 @@ from azure.core.pipeline.transport import HttpRequest, HttpResponse from azure.mgmt.core.exceptions import ARMErrorFormat -from .. import models +from .. import models as _models if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports @@ -37,7 +37,7 @@ class TrustedIdProvidersOperations(object): :param deserializer: An object model deserializer. """ - models = models + models = _models def __init__(self, client, config, serializer, deserializer): self._client = client @@ -51,7 +51,7 @@ def list_by_account( account_name, # type: str **kwargs # type: Any ): - # type: (...) -> Iterable["models.TrustedIdProviderListResult"] + # type: (...) -> Iterable["_models.TrustedIdProviderListResult"] """Lists the Data Lake Store trusted identity providers within the specified Data Lake Store account. @@ -64,7 +64,7 @@ def list_by_account( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.datalake.store.models.TrustedIdProviderListResult] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["models.TrustedIdProviderListResult"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.TrustedIdProviderListResult"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } @@ -129,7 +129,7 @@ def create_or_update( id_provider, # type: str **kwargs # type: Any ): - # type: (...) -> "models.TrustedIdProvider" + # type: (...) -> "_models.TrustedIdProvider" """Creates or updates the specified trusted identity provider. During update, the trusted identity provider with the specified name will be replaced with this new provider. @@ -147,13 +147,13 @@ def create_or_update( :rtype: ~azure.mgmt.datalake.store.models.TrustedIdProvider :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["models.TrustedIdProvider"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.TrustedIdProvider"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - _parameters = models.CreateOrUpdateTrustedIdProviderParameters(id_provider=id_provider) + _parameters = _models.CreateOrUpdateTrustedIdProviderParameters(id_provider=id_provider) api_version = "2016-11-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -203,7 +203,7 @@ def get( trusted_id_provider_name, # type: str **kwargs # type: Any ): - # type: (...) -> "models.TrustedIdProvider" + # type: (...) -> "_models.TrustedIdProvider" """Gets the specified Data Lake Store trusted identity provider. :param resource_group_name: The name of the Azure resource group. @@ -217,7 +217,7 @@ def get( :rtype: ~azure.mgmt.datalake.store.models.TrustedIdProvider :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["models.TrustedIdProvider"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.TrustedIdProvider"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } @@ -267,7 +267,7 @@ def update( id_provider=None, # type: Optional[str] **kwargs # type: Any ): - # type: (...) -> "models.TrustedIdProvider" + # type: (...) -> "_models.TrustedIdProvider" """Updates the specified trusted identity provider. :param resource_group_name: The name of the Azure resource group. @@ -284,13 +284,13 @@ def update( :rtype: ~azure.mgmt.datalake.store.models.TrustedIdProvider :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["models.TrustedIdProvider"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.TrustedIdProvider"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - _parameters = models.UpdateTrustedIdProviderParameters(id_provider=id_provider) + _parameters = _models.UpdateTrustedIdProviderParameters(id_provider=id_provider) api_version = "2016-11-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" diff --git a/sdk/datalake/azure-mgmt-datalake-store/azure/mgmt/datalake/store/operations/_virtual_network_rules_operations.py b/sdk/datalake/azure-mgmt-datalake-store/azure/mgmt/datalake/store/operations/_virtual_network_rules_operations.py index 81b6e7bd648f..95204824fac4 100644 --- a/sdk/datalake/azure-mgmt-datalake-store/azure/mgmt/datalake/store/operations/_virtual_network_rules_operations.py +++ b/sdk/datalake/azure-mgmt-datalake-store/azure/mgmt/datalake/store/operations/_virtual_network_rules_operations.py @@ -14,7 +14,7 @@ from azure.core.pipeline.transport import HttpRequest, HttpResponse from azure.mgmt.core.exceptions import ARMErrorFormat -from .. import models +from .. import models as _models if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports @@ -37,7 +37,7 @@ class VirtualNetworkRulesOperations(object): :param deserializer: An object model deserializer. """ - models = models + models = _models def __init__(self, client, config, serializer, deserializer): self._client = client @@ -51,7 +51,7 @@ def list_by_account( account_name, # type: str **kwargs # type: Any ): - # type: (...) -> Iterable["models.VirtualNetworkRuleListResult"] + # type: (...) -> Iterable["_models.VirtualNetworkRuleListResult"] """Lists the Data Lake Store virtual network rules within the specified Data Lake Store account. :param resource_group_name: The name of the Azure resource group. @@ -63,7 +63,7 @@ def list_by_account( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.datalake.store.models.VirtualNetworkRuleListResult] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["models.VirtualNetworkRuleListResult"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualNetworkRuleListResult"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } @@ -128,7 +128,7 @@ def create_or_update( subnet_id, # type: str **kwargs # type: Any ): - # type: (...) -> "models.VirtualNetworkRule" + # type: (...) -> "_models.VirtualNetworkRule" """Creates or updates the specified virtual network rule. During update, the virtual network rule with the specified name will be replaced with this new virtual network rule. @@ -145,13 +145,13 @@ def create_or_update( :rtype: ~azure.mgmt.datalake.store.models.VirtualNetworkRule :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["models.VirtualNetworkRule"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualNetworkRule"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - _parameters = models.CreateOrUpdateVirtualNetworkRuleParameters(subnet_id=subnet_id) + _parameters = _models.CreateOrUpdateVirtualNetworkRuleParameters(subnet_id=subnet_id) api_version = "2016-11-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -201,7 +201,7 @@ def get( virtual_network_rule_name, # type: str **kwargs # type: Any ): - # type: (...) -> "models.VirtualNetworkRule" + # type: (...) -> "_models.VirtualNetworkRule" """Gets the specified Data Lake Store virtual network rule. :param resource_group_name: The name of the Azure resource group. @@ -215,7 +215,7 @@ def get( :rtype: ~azure.mgmt.datalake.store.models.VirtualNetworkRule :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["models.VirtualNetworkRule"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualNetworkRule"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } @@ -265,7 +265,7 @@ def update( subnet_id=None, # type: Optional[str] **kwargs # type: Any ): - # type: (...) -> "models.VirtualNetworkRule" + # type: (...) -> "_models.VirtualNetworkRule" """Updates the specified virtual network rule. :param resource_group_name: The name of the Azure resource group. @@ -281,13 +281,13 @@ def update( :rtype: ~azure.mgmt.datalake.store.models.VirtualNetworkRule :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["models.VirtualNetworkRule"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualNetworkRule"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - _parameters = models.UpdateVirtualNetworkRuleParameters(subnet_id=subnet_id) + _parameters = _models.UpdateVirtualNetworkRuleParameters(subnet_id=subnet_id) api_version = "2016-11-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json"