From 17006320c3c8db67ce571b308154176f7344ec2b Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Tue, 24 Nov 2020 03:38:23 +0000 Subject: [PATCH] CodeGen from PR 11793 in Azure/azure-rest-api-specs Merge 8f6dcce300a0e071507028daa1d9df971225935c into d4d7ea6c660f853323ce6dc0ab9f3c239767169c --- .../azure/mgmt/streamanalytics/__init__.py | 3 - .../mgmt/streamanalytics/_configuration.py | 3 +- .../azure/mgmt/streamanalytics/_metadata.json | 15 ++-- .../_stream_analytics_management_client.py | 1 - .../streamanalytics/aio/_configuration.py | 3 +- .../_stream_analytics_management_client.py | 1 - .../aio/operations/_clusters_operations.py | 82 +++++++++++-------- .../aio/operations/_functions_operations.py | 51 +++++++----- .../aio/operations/_inputs_operations.py | 45 +++++----- .../aio/operations/_operations.py | 8 +- .../aio/operations/_outputs_operations.py | 45 +++++----- .../_private_endpoints_operations.py | 35 ++++---- .../operations/_streaming_jobs_operations.py | 70 ++++++++++------ .../operations/_subscriptions_operations.py | 8 +- .../operations/_transformations_operations.py | 20 ++--- .../mgmt/streamanalytics/models/_models.py | 7 +- .../streamanalytics/models/_models_py3.py | 8 +- .../operations/_clusters_operations.py | 82 +++++++++++-------- .../operations/_functions_operations.py | 51 +++++++----- .../operations/_inputs_operations.py | 45 +++++----- .../streamanalytics/operations/_operations.py | 8 +- .../operations/_outputs_operations.py | 45 +++++----- .../_private_endpoints_operations.py | 35 ++++---- .../operations/_streaming_jobs_operations.py | 70 ++++++++++------ .../operations/_subscriptions_operations.py | 8 +- .../operations/_transformations_operations.py | 20 ++--- 26 files changed, 451 insertions(+), 318 deletions(-) diff --git a/sdk/streamanalytics/azure-mgmt-streamanalytics/azure/mgmt/streamanalytics/__init__.py b/sdk/streamanalytics/azure-mgmt-streamanalytics/azure/mgmt/streamanalytics/__init__.py index 83390f96aa83..ba78157ade49 100644 --- a/sdk/streamanalytics/azure-mgmt-streamanalytics/azure/mgmt/streamanalytics/__init__.py +++ b/sdk/streamanalytics/azure-mgmt-streamanalytics/azure/mgmt/streamanalytics/__init__.py @@ -7,9 +7,6 @@ # -------------------------------------------------------------------------- from ._stream_analytics_management_client import StreamAnalyticsManagementClient -from ._version import VERSION - -__version__ = VERSION __all__ = ['StreamAnalyticsManagementClient'] try: diff --git a/sdk/streamanalytics/azure-mgmt-streamanalytics/azure/mgmt/streamanalytics/_configuration.py b/sdk/streamanalytics/azure-mgmt-streamanalytics/azure/mgmt/streamanalytics/_configuration.py index 1034fe20616d..8175eb1533cd 100644 --- a/sdk/streamanalytics/azure-mgmt-streamanalytics/azure/mgmt/streamanalytics/_configuration.py +++ b/sdk/streamanalytics/azure-mgmt-streamanalytics/azure/mgmt/streamanalytics/_configuration.py @@ -12,14 +12,13 @@ from azure.core.pipeline import policies from azure.mgmt.core.policies import ARMHttpLoggingPolicy -from ._version import VERSION - if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports from typing import Any from azure.core.credentials import TokenCredential +VERSION = "unknown" class StreamAnalyticsManagementClientConfiguration(Configuration): """Configuration for StreamAnalyticsManagementClient. diff --git a/sdk/streamanalytics/azure-mgmt-streamanalytics/azure/mgmt/streamanalytics/_metadata.json b/sdk/streamanalytics/azure-mgmt-streamanalytics/azure/mgmt/streamanalytics/_metadata.json index 5ff7c85f8f06..29ba4aac7803 100644 --- a/sdk/streamanalytics/azure-mgmt-streamanalytics/azure/mgmt/streamanalytics/_metadata.json +++ b/sdk/streamanalytics/azure-mgmt-streamanalytics/azure/mgmt/streamanalytics/_metadata.json @@ -8,32 +8,33 @@ "base_url": "\u0027https://management.azure.com\u0027", "custom_base_url": null, "azure_arm": true, - "has_lro_operations": true + "has_lro_operations": true, + "client_side_validation": true }, "global_parameters": { - "sync_method": { + "sync": { "credential": { - "method_signature": "credential, # type: \"TokenCredential\"", + "signature": "credential, # type: \"TokenCredential\"", "description": "Credential needed for the client to connect to Azure.", "docstring_type": "~azure.core.credentials.TokenCredential", "required": true }, "subscription_id": { - "method_signature": "subscription_id, # type: str", + "signature": "subscription_id, # type: str", "description": "The ID of the target subscription.", "docstring_type": "str", "required": true } }, - "async_method": { + "async": { "credential": { - "method_signature": "credential, # type: \"AsyncTokenCredential\"", + "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": { - "method_signature": "subscription_id, # type: str", + "signature": "subscription_id, # type: str", "description": "The ID of the target subscription.", "docstring_type": "str", "required": true diff --git a/sdk/streamanalytics/azure-mgmt-streamanalytics/azure/mgmt/streamanalytics/_stream_analytics_management_client.py b/sdk/streamanalytics/azure-mgmt-streamanalytics/azure/mgmt/streamanalytics/_stream_analytics_management_client.py index 7322c3fb1613..1744532ef425 100644 --- a/sdk/streamanalytics/azure-mgmt-streamanalytics/azure/mgmt/streamanalytics/_stream_analytics_management_client.py +++ b/sdk/streamanalytics/azure-mgmt-streamanalytics/azure/mgmt/streamanalytics/_stream_analytics_management_client.py @@ -74,7 +74,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.functions = FunctionsOperations( diff --git a/sdk/streamanalytics/azure-mgmt-streamanalytics/azure/mgmt/streamanalytics/aio/_configuration.py b/sdk/streamanalytics/azure-mgmt-streamanalytics/azure/mgmt/streamanalytics/aio/_configuration.py index 444e27397d52..1f0b943b7612 100644 --- a/sdk/streamanalytics/azure-mgmt-streamanalytics/azure/mgmt/streamanalytics/aio/_configuration.py +++ b/sdk/streamanalytics/azure-mgmt-streamanalytics/azure/mgmt/streamanalytics/aio/_configuration.py @@ -12,12 +12,11 @@ from azure.core.pipeline import policies from azure.mgmt.core.policies import ARMHttpLoggingPolicy -from .._version import VERSION - if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials_async import AsyncTokenCredential +VERSION = "unknown" class StreamAnalyticsManagementClientConfiguration(Configuration): """Configuration for StreamAnalyticsManagementClient. diff --git a/sdk/streamanalytics/azure-mgmt-streamanalytics/azure/mgmt/streamanalytics/aio/_stream_analytics_management_client.py b/sdk/streamanalytics/azure-mgmt-streamanalytics/azure/mgmt/streamanalytics/aio/_stream_analytics_management_client.py index 99472b9429a0..018ac903f6a6 100644 --- a/sdk/streamanalytics/azure-mgmt-streamanalytics/azure/mgmt/streamanalytics/aio/_stream_analytics_management_client.py +++ b/sdk/streamanalytics/azure-mgmt-streamanalytics/azure/mgmt/streamanalytics/aio/_stream_analytics_management_client.py @@ -71,7 +71,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.functions = FunctionsOperations( diff --git a/sdk/streamanalytics/azure-mgmt-streamanalytics/azure/mgmt/streamanalytics/aio/operations/_clusters_operations.py b/sdk/streamanalytics/azure-mgmt-streamanalytics/azure/mgmt/streamanalytics/aio/operations/_clusters_operations.py index 29088ce6710f..406741229582 100644 --- a/sdk/streamanalytics/azure-mgmt-streamanalytics/azure/mgmt/streamanalytics/aio/operations/_clusters_operations.py +++ b/sdk/streamanalytics/azure-mgmt-streamanalytics/azure/mgmt/streamanalytics/aio/operations/_clusters_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 ClustersOperations: :param deserializer: An object model deserializer. """ - models = models + models = _models def __init__(self, client, config, serializer, deserializer) -> None: self._client = client @@ -47,12 +47,12 @@ async def _create_or_update_initial( self, resource_group_name: str, cluster_name: str, - cluster: "models.Cluster", + cluster: "_models.Cluster", if_match: Optional[str] = None, if_none_match: Optional[str] = None, **kwargs - ) -> "models.Cluster": - cls = kwargs.pop('cls', None) # type: ClsType["models.Cluster"] + ) -> "_models.Cluster": + cls = kwargs.pop('cls', None) # type: ClsType["_models.Cluster"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } @@ -92,7 +92,7 @@ async def _create_or_update_initial( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(models.Error, response) + error = self._deserialize(_models.Error, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -111,11 +111,11 @@ async def begin_create_or_update( self, resource_group_name: str, cluster_name: str, - cluster: "models.Cluster", + cluster: "_models.Cluster", if_match: Optional[str] = None, if_none_match: Optional[str] = None, **kwargs - ) -> AsyncLROPoller["models.Cluster"]: + ) -> AsyncLROPoller["_models.Cluster"]: """Creates a Stream Analytics Cluster or replaces an already existing cluster. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -143,7 +143,7 @@ async def begin_create_or_update( :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["models.Cluster"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.Cluster"] lro_delay = kwargs.pop( 'polling_interval', self._config.polling_interval @@ -170,7 +170,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', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'clusterName': self._serialize.url("cluster_name", cluster_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: @@ -188,11 +194,11 @@ async def _update_initial( self, resource_group_name: str, cluster_name: str, - cluster: "models.Cluster", + cluster: "_models.Cluster", if_match: Optional[str] = None, **kwargs - ) -> Optional["models.Cluster"]: - cls = kwargs.pop('cls', None) # type: ClsType[Optional["models.Cluster"]] + ) -> Optional["_models.Cluster"]: + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.Cluster"]] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } @@ -230,7 +236,7 @@ async def _update_initial( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(models.Error, response) + error = self._deserialize(_models.Error, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = None @@ -247,10 +253,10 @@ async def begin_update( self, resource_group_name: str, cluster_name: str, - cluster: "models.Cluster", + cluster: "_models.Cluster", if_match: Optional[str] = None, **kwargs - ) -> AsyncLROPoller["models.Cluster"]: + ) -> AsyncLROPoller["_models.Cluster"]: """Updates an existing cluster. This can be used to partially update (ie. update one or two properties) a cluster without affecting the rest of the cluster definition. @@ -276,7 +282,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.Cluster"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.Cluster"] lro_delay = kwargs.pop( 'polling_interval', self._config.polling_interval @@ -302,7 +308,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', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'clusterName': self._serialize.url("cluster_name", cluster_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: @@ -321,7 +333,7 @@ async def get( resource_group_name: str, cluster_name: str, **kwargs - ) -> "models.Cluster": + ) -> "_models.Cluster": """Gets information about the specified cluster. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -333,7 +345,7 @@ async def get( :rtype: ~stream_analytics_management_client.models.Cluster :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["models.Cluster"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.Cluster"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } @@ -364,7 +376,7 @@ async def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(models.Error, response) + error = self._deserialize(_models.Error, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('Cluster', pipeline_response) @@ -412,7 +424,7 @@ async def _delete_initial( if response.status_code not in [200, 202, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(models.Error, response) + error = self._deserialize(_models.Error, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -464,7 +476,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', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'clusterName': self._serialize.url("cluster_name", cluster_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: @@ -481,7 +499,7 @@ def get_long_running_output(pipeline_response): def list_by_subscription( self, **kwargs - ) -> AsyncIterable["models.ClusterListResult"]: + ) -> AsyncIterable["_models.ClusterListResult"]: """Lists all of the clusters in the given subscription. :keyword callable cls: A custom type or function that will be passed the direct response @@ -489,7 +507,7 @@ def list_by_subscription( :rtype: ~azure.core.async_paging.AsyncItemPaged[~stream_analytics_management_client.models.ClusterListResult] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["models.ClusterListResult"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.ClusterListResult"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } @@ -534,7 +552,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(models.Error, response) + error = self._deserialize(_models.Error, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -549,7 +567,7 @@ def list_by_resource_group( self, resource_group_name: str, **kwargs - ) -> AsyncIterable["models.ClusterListResult"]: + ) -> AsyncIterable["_models.ClusterListResult"]: """Lists all of the clusters in the given resource group. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -559,7 +577,7 @@ def list_by_resource_group( :rtype: ~azure.core.async_paging.AsyncItemPaged[~stream_analytics_management_client.models.ClusterListResult] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["models.ClusterListResult"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.ClusterListResult"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } @@ -605,7 +623,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(models.Error, response) + error = self._deserialize(_models.Error, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -621,7 +639,7 @@ def list_streaming_jobs( resource_group_name: str, cluster_name: str, **kwargs - ) -> AsyncIterable["models.ClusterJobListResult"]: + ) -> AsyncIterable["_models.ClusterJobListResult"]: """Lists all of the streaming jobs in the given cluster. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -633,7 +651,7 @@ def list_streaming_jobs( :rtype: ~azure.core.async_paging.AsyncItemPaged[~stream_analytics_management_client.models.ClusterJobListResult] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["models.ClusterJobListResult"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.ClusterJobListResult"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } @@ -680,7 +698,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(models.Error, response) + error = self._deserialize(_models.Error, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) diff --git a/sdk/streamanalytics/azure-mgmt-streamanalytics/azure/mgmt/streamanalytics/aio/operations/_functions_operations.py b/sdk/streamanalytics/azure-mgmt-streamanalytics/azure/mgmt/streamanalytics/aio/operations/_functions_operations.py index 1d04fcab6693..edc64c822ade 100644 --- a/sdk/streamanalytics/azure-mgmt-streamanalytics/azure/mgmt/streamanalytics/aio/operations/_functions_operations.py +++ b/sdk/streamanalytics/azure-mgmt-streamanalytics/azure/mgmt/streamanalytics/aio/operations/_functions_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 FunctionsOperations: :param deserializer: An object model deserializer. """ - models = models + models = _models def __init__(self, client, config, serializer, deserializer) -> None: self._client = client @@ -48,11 +48,11 @@ async def create_or_replace( resource_group_name: str, job_name: str, function_name: str, - function: "models.Function", + function: "_models.Function", if_match: Optional[str] = None, if_none_match: Optional[str] = None, **kwargs - ) -> "models.Function": + ) -> "_models.Function": """Creates a function or replaces an already existing function under an existing streaming job. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -76,7 +76,7 @@ async def create_or_replace( :rtype: ~stream_analytics_management_client.models.Function :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["models.Function"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.Function"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } @@ -139,10 +139,10 @@ async def update( resource_group_name: str, job_name: str, function_name: str, - function: "models.Function", + function: "_models.Function", if_match: Optional[str] = None, **kwargs - ) -> "models.Function": + ) -> "_models.Function": """Updates an existing function under an existing streaming job. This can be used to partially update (ie. update one or two properties) a function without affecting the rest the job or function definition. @@ -167,7 +167,7 @@ async def update( :rtype: ~stream_analytics_management_client.models.Function :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["models.Function"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.Function"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } @@ -281,7 +281,7 @@ async def get( job_name: str, function_name: str, **kwargs - ) -> "models.Function": + ) -> "_models.Function": """Gets details about the specified function. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -295,7 +295,7 @@ async def get( :rtype: ~stream_analytics_management_client.models.Function :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["models.Function"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.Function"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } @@ -345,7 +345,7 @@ def list_by_streaming_job( job_name: str, select: Optional[str] = None, **kwargs - ) -> AsyncIterable["models.FunctionListResult"]: + ) -> AsyncIterable["_models.FunctionListResult"]: """Lists all of the functions under the specified streaming job. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -361,7 +361,7 @@ def list_by_streaming_job( :rtype: ~azure.core.async_paging.AsyncItemPaged[~stream_analytics_management_client.models.FunctionListResult] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["models.FunctionListResult"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.FunctionListResult"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } @@ -425,10 +425,10 @@ async def _test_initial( resource_group_name: str, job_name: str, function_name: str, - function: Optional["models.Function"] = None, + function: Optional["_models.Function"] = None, **kwargs - ) -> Optional["models.ResourceTestStatus"]: - cls = kwargs.pop('cls', None) # type: ClsType[Optional["models.ResourceTestStatus"]] + ) -> Optional["_models.ResourceTestStatus"]: + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.ResourceTestStatus"]] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } @@ -485,9 +485,9 @@ async def begin_test( resource_group_name: str, job_name: str, function_name: str, - function: Optional["models.Function"] = None, + function: Optional["_models.Function"] = None, **kwargs - ) -> AsyncLROPoller["models.ResourceTestStatus"]: + ) -> AsyncLROPoller["_models.ResourceTestStatus"]: """Tests if the information provided for a function is valid. This can range from testing the connection to the underlying web service behind the function or making sure the function code provided is syntactically correct. @@ -515,7 +515,7 @@ async def begin_test( :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["models.ResourceTestStatus"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.ResourceTestStatus"] lro_delay = kwargs.pop( 'polling_interval', self._config.polling_interval @@ -541,7 +541,14 @@ 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', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'jobName': self._serialize.url("job_name", job_name, 'str'), + 'functionName': self._serialize.url("function_name", function_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: @@ -560,9 +567,9 @@ async def retrieve_default_definition( resource_group_name: str, job_name: str, function_name: str, - function_retrieve_default_definition_parameters: Optional["models.FunctionRetrieveDefaultDefinitionParameters"] = None, + function_retrieve_default_definition_parameters: Optional["_models.FunctionRetrieveDefaultDefinitionParameters"] = None, **kwargs - ) -> "models.Function": + ) -> "_models.Function": """Retrieves the default definition of a function based on the parameters specified. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -579,7 +586,7 @@ async def retrieve_default_definition( :rtype: ~stream_analytics_management_client.models.Function :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["models.Function"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.Function"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } diff --git a/sdk/streamanalytics/azure-mgmt-streamanalytics/azure/mgmt/streamanalytics/aio/operations/_inputs_operations.py b/sdk/streamanalytics/azure-mgmt-streamanalytics/azure/mgmt/streamanalytics/aio/operations/_inputs_operations.py index f7451e9e8aab..262c8509922d 100644 --- a/sdk/streamanalytics/azure-mgmt-streamanalytics/azure/mgmt/streamanalytics/aio/operations/_inputs_operations.py +++ b/sdk/streamanalytics/azure-mgmt-streamanalytics/azure/mgmt/streamanalytics/aio/operations/_inputs_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 InputsOperations: :param deserializer: An object model deserializer. """ - models = models + models = _models def __init__(self, client, config, serializer, deserializer) -> None: self._client = client @@ -48,11 +48,11 @@ async def create_or_replace( resource_group_name: str, job_name: str, input_name: str, - input: "models.Input", + input: "_models.Input", if_match: Optional[str] = None, if_none_match: Optional[str] = None, **kwargs - ) -> "models.Input": + ) -> "_models.Input": """Creates an input or replaces an already existing input under an existing streaming job. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -75,7 +75,7 @@ async def create_or_replace( :rtype: ~stream_analytics_management_client.models.Input :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["models.Input"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.Input"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } @@ -138,10 +138,10 @@ async def update( resource_group_name: str, job_name: str, input_name: str, - input: "models.Input", + input: "_models.Input", if_match: Optional[str] = None, **kwargs - ) -> "models.Input": + ) -> "_models.Input": """Updates an existing input under an existing streaming job. This can be used to partially update (ie. update one or two properties) an input without affecting the rest the job or input definition. @@ -165,7 +165,7 @@ async def update( :rtype: ~stream_analytics_management_client.models.Input :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["models.Input"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.Input"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } @@ -279,7 +279,7 @@ async def get( job_name: str, input_name: str, **kwargs - ) -> "models.Input": + ) -> "_models.Input": """Gets details about the specified input. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -293,7 +293,7 @@ async def get( :rtype: ~stream_analytics_management_client.models.Input :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["models.Input"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.Input"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } @@ -343,7 +343,7 @@ def list_by_streaming_job( job_name: str, select: Optional[str] = None, **kwargs - ) -> AsyncIterable["models.InputListResult"]: + ) -> AsyncIterable["_models.InputListResult"]: """Lists all of the inputs under the specified streaming job. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -359,7 +359,7 @@ def list_by_streaming_job( :rtype: ~azure.core.async_paging.AsyncItemPaged[~stream_analytics_management_client.models.InputListResult] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["models.InputListResult"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.InputListResult"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } @@ -423,10 +423,10 @@ async def _test_initial( resource_group_name: str, job_name: str, input_name: str, - input: Optional["models.Input"] = None, + input: Optional["_models.Input"] = None, **kwargs - ) -> Optional["models.ResourceTestStatus"]: - cls = kwargs.pop('cls', None) # type: ClsType[Optional["models.ResourceTestStatus"]] + ) -> Optional["_models.ResourceTestStatus"]: + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.ResourceTestStatus"]] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } @@ -483,9 +483,9 @@ async def begin_test( resource_group_name: str, job_name: str, input_name: str, - input: Optional["models.Input"] = None, + input: Optional["_models.Input"] = None, **kwargs - ) -> AsyncLROPoller["models.ResourceTestStatus"]: + ) -> AsyncLROPoller["_models.ResourceTestStatus"]: """Tests whether an input’s datasource is reachable and usable by the Azure Stream Analytics service. @@ -512,7 +512,7 @@ async def begin_test( :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["models.ResourceTestStatus"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.ResourceTestStatus"] lro_delay = kwargs.pop( 'polling_interval', self._config.polling_interval @@ -538,7 +538,14 @@ 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', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'jobName': self._serialize.url("job_name", job_name, 'str'), + 'inputName': self._serialize.url("input_name", input_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: diff --git a/sdk/streamanalytics/azure-mgmt-streamanalytics/azure/mgmt/streamanalytics/aio/operations/_operations.py b/sdk/streamanalytics/azure-mgmt-streamanalytics/azure/mgmt/streamanalytics/aio/operations/_operations.py index 6e073694446f..236f088063db 100644 --- a/sdk/streamanalytics/azure-mgmt-streamanalytics/azure/mgmt/streamanalytics/aio/operations/_operations.py +++ b/sdk/streamanalytics/azure-mgmt-streamanalytics/azure/mgmt/streamanalytics/aio/operations/_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 Operations: :param deserializer: An object model deserializer. """ - models = models + models = _models def __init__(self, client, config, serializer, deserializer) -> None: self._client = client @@ -44,7 +44,7 @@ def __init__(self, client, config, serializer, deserializer) -> None: def list( self, **kwargs - ) -> AsyncIterable["models.OperationListResult"]: + ) -> AsyncIterable["_models.OperationListResult"]: """Lists all of the available Stream Analytics related operations. :keyword callable cls: A custom type or function that will be passed the direct response @@ -52,7 +52,7 @@ def list( :rtype: ~azure.core.async_paging.AsyncItemPaged[~stream_analytics_management_client.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/streamanalytics/azure-mgmt-streamanalytics/azure/mgmt/streamanalytics/aio/operations/_outputs_operations.py b/sdk/streamanalytics/azure-mgmt-streamanalytics/azure/mgmt/streamanalytics/aio/operations/_outputs_operations.py index a9d08028e8aa..71624b0c477c 100644 --- a/sdk/streamanalytics/azure-mgmt-streamanalytics/azure/mgmt/streamanalytics/aio/operations/_outputs_operations.py +++ b/sdk/streamanalytics/azure-mgmt-streamanalytics/azure/mgmt/streamanalytics/aio/operations/_outputs_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 OutputsOperations: :param deserializer: An object model deserializer. """ - models = models + models = _models def __init__(self, client, config, serializer, deserializer) -> None: self._client = client @@ -48,11 +48,11 @@ async def create_or_replace( resource_group_name: str, job_name: str, output_name: str, - output: "models.Output", + output: "_models.Output", if_match: Optional[str] = None, if_none_match: Optional[str] = None, **kwargs - ) -> "models.Output": + ) -> "_models.Output": """Creates an output or replaces an already existing output under an existing streaming job. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -76,7 +76,7 @@ async def create_or_replace( :rtype: ~stream_analytics_management_client.models.Output :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["models.Output"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.Output"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } @@ -139,10 +139,10 @@ async def update( resource_group_name: str, job_name: str, output_name: str, - output: "models.Output", + output: "_models.Output", if_match: Optional[str] = None, **kwargs - ) -> "models.Output": + ) -> "_models.Output": """Updates an existing output under an existing streaming job. This can be used to partially update (ie. update one or two properties) an output without affecting the rest the job or output definition. @@ -167,7 +167,7 @@ async def update( :rtype: ~stream_analytics_management_client.models.Output :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["models.Output"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.Output"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } @@ -281,7 +281,7 @@ async def get( job_name: str, output_name: str, **kwargs - ) -> "models.Output": + ) -> "_models.Output": """Gets details about the specified output. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -295,7 +295,7 @@ async def get( :rtype: ~stream_analytics_management_client.models.Output :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["models.Output"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.Output"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } @@ -345,7 +345,7 @@ def list_by_streaming_job( job_name: str, select: Optional[str] = None, **kwargs - ) -> AsyncIterable["models.OutputListResult"]: + ) -> AsyncIterable["_models.OutputListResult"]: """Lists all of the outputs under the specified streaming job. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -361,7 +361,7 @@ def list_by_streaming_job( :rtype: ~azure.core.async_paging.AsyncItemPaged[~stream_analytics_management_client.models.OutputListResult] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["models.OutputListResult"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.OutputListResult"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } @@ -425,10 +425,10 @@ async def _test_initial( resource_group_name: str, job_name: str, output_name: str, - output: Optional["models.Output"] = None, + output: Optional["_models.Output"] = None, **kwargs - ) -> Optional["models.ResourceTestStatus"]: - cls = kwargs.pop('cls', None) # type: ClsType[Optional["models.ResourceTestStatus"]] + ) -> Optional["_models.ResourceTestStatus"]: + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.ResourceTestStatus"]] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } @@ -485,9 +485,9 @@ async def begin_test( resource_group_name: str, job_name: str, output_name: str, - output: Optional["models.Output"] = None, + output: Optional["_models.Output"] = None, **kwargs - ) -> AsyncLROPoller["models.ResourceTestStatus"]: + ) -> AsyncLROPoller["_models.ResourceTestStatus"]: """Tests whether an output’s datasource is reachable and usable by the Azure Stream Analytics service. @@ -514,7 +514,7 @@ async def begin_test( :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["models.ResourceTestStatus"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.ResourceTestStatus"] lro_delay = kwargs.pop( 'polling_interval', self._config.polling_interval @@ -540,7 +540,14 @@ 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', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'jobName': self._serialize.url("job_name", job_name, 'str'), + 'outputName': self._serialize.url("output_name", output_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: diff --git a/sdk/streamanalytics/azure-mgmt-streamanalytics/azure/mgmt/streamanalytics/aio/operations/_private_endpoints_operations.py b/sdk/streamanalytics/azure-mgmt-streamanalytics/azure/mgmt/streamanalytics/aio/operations/_private_endpoints_operations.py index ba2975090858..027a945f800a 100644 --- a/sdk/streamanalytics/azure-mgmt-streamanalytics/azure/mgmt/streamanalytics/aio/operations/_private_endpoints_operations.py +++ b/sdk/streamanalytics/azure-mgmt-streamanalytics/azure/mgmt/streamanalytics/aio/operations/_private_endpoints_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 PrivateEndpointsOperations: :param deserializer: An object model deserializer. """ - models = models + models = _models def __init__(self, client, config, serializer, deserializer) -> None: self._client = client @@ -48,11 +48,11 @@ async def create_or_update( resource_group_name: str, cluster_name: str, private_endpoint_name: str, - private_endpoint: "models.PrivateEndpoint", + private_endpoint: "_models.PrivateEndpoint", if_match: Optional[str] = None, if_none_match: Optional[str] = None, **kwargs - ) -> "models.PrivateEndpoint": + ) -> "_models.PrivateEndpoint": """Creates a Stream Analytics Private Endpoint or replaces an already existing Private Endpoint. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -76,7 +76,7 @@ async def create_or_update( :rtype: ~stream_analytics_management_client.models.PrivateEndpoint :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["models.PrivateEndpoint"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateEndpoint"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } @@ -117,7 +117,7 @@ async def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(models.Error, response) + error = self._deserialize(_models.Error, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -138,7 +138,7 @@ async def get( cluster_name: str, private_endpoint_name: str, **kwargs - ) -> "models.PrivateEndpoint": + ) -> "_models.PrivateEndpoint": """Gets information about the specified Private Endpoint. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -152,7 +152,7 @@ async def get( :rtype: ~stream_analytics_management_client.models.PrivateEndpoint :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["models.PrivateEndpoint"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateEndpoint"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } @@ -184,7 +184,7 @@ async def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(models.Error, response) + error = self._deserialize(_models.Error, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('PrivateEndpoint', pipeline_response) @@ -234,7 +234,7 @@ async def _delete_initial( if response.status_code not in [200, 202, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(models.Error, response) + error = self._deserialize(_models.Error, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -290,7 +290,14 @@ 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', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'clusterName': self._serialize.url("cluster_name", cluster_name, 'str'), + 'privateEndpointName': self._serialize.url("private_endpoint_name", private_endpoint_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: @@ -309,7 +316,7 @@ def list_by_cluster( resource_group_name: str, cluster_name: str, **kwargs - ) -> AsyncIterable["models.PrivateEndpointListResult"]: + ) -> AsyncIterable["_models.PrivateEndpointListResult"]: """Lists the private endpoints in the cluster. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -321,7 +328,7 @@ def list_by_cluster( :rtype: ~azure.core.async_paging.AsyncItemPaged[~stream_analytics_management_client.models.PrivateEndpointListResult] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["models.PrivateEndpointListResult"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateEndpointListResult"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } @@ -368,7 +375,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(models.Error, response) + error = self._deserialize(_models.Error, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) diff --git a/sdk/streamanalytics/azure-mgmt-streamanalytics/azure/mgmt/streamanalytics/aio/operations/_streaming_jobs_operations.py b/sdk/streamanalytics/azure-mgmt-streamanalytics/azure/mgmt/streamanalytics/aio/operations/_streaming_jobs_operations.py index d6cdd13560d3..2b2a3b3a5ee7 100644 --- a/sdk/streamanalytics/azure-mgmt-streamanalytics/azure/mgmt/streamanalytics/aio/operations/_streaming_jobs_operations.py +++ b/sdk/streamanalytics/azure-mgmt-streamanalytics/azure/mgmt/streamanalytics/aio/operations/_streaming_jobs_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 StreamingJobsOperations: :param deserializer: An object model deserializer. """ - models = models + models = _models def __init__(self, client, config, serializer, deserializer) -> None: self._client = client @@ -47,12 +47,12 @@ async def _create_or_replace_initial( self, resource_group_name: str, job_name: str, - streaming_job: "models.StreamingJob", + streaming_job: "_models.StreamingJob", if_match: Optional[str] = None, if_none_match: Optional[str] = None, **kwargs - ) -> "models.StreamingJob": - cls = kwargs.pop('cls', None) # type: ClsType["models.StreamingJob"] + ) -> "_models.StreamingJob": + cls = kwargs.pop('cls', None) # type: ClsType["_models.StreamingJob"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } @@ -113,11 +113,11 @@ async def begin_create_or_replace( self, resource_group_name: str, job_name: str, - streaming_job: "models.StreamingJob", + streaming_job: "_models.StreamingJob", if_match: Optional[str] = None, if_none_match: Optional[str] = None, **kwargs - ) -> AsyncLROPoller["models.StreamingJob"]: + ) -> AsyncLROPoller["_models.StreamingJob"]: """Creates a streaming job or replaces an already existing streaming job. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -146,7 +146,7 @@ async def begin_create_or_replace( :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["models.StreamingJob"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.StreamingJob"] lro_delay = kwargs.pop( 'polling_interval', self._config.polling_interval @@ -176,7 +176,13 @@ def get_long_running_output(pipeline_response): return cls(pipeline_response, deserialized, response_headers) 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', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'jobName': self._serialize.url("job_name", job_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: @@ -194,10 +200,10 @@ async def update( self, resource_group_name: str, job_name: str, - streaming_job: "models.StreamingJob", + streaming_job: "_models.StreamingJob", if_match: Optional[str] = None, **kwargs - ) -> "models.StreamingJob": + ) -> "_models.StreamingJob": """Updates an existing streaming job. This can be used to partially update (ie. update one or two properties) a streaming job without affecting the rest the job definition. @@ -219,7 +225,7 @@ async def update( :rtype: ~stream_analytics_management_client.models.StreamingJob :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["models.StreamingJob"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.StreamingJob"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } @@ -355,7 +361,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', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'jobName': self._serialize.url("job_name", job_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: @@ -375,7 +387,7 @@ async def get( job_name: str, expand: Optional[str] = None, **kwargs - ) -> "models.StreamingJob": + ) -> "_models.StreamingJob": """Gets details about the specified streaming job. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -392,7 +404,7 @@ async def get( :rtype: ~stream_analytics_management_client.models.StreamingJob :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["models.StreamingJob"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.StreamingJob"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } @@ -442,7 +454,7 @@ def list_by_resource_group( resource_group_name: str, expand: Optional[str] = None, **kwargs - ) -> AsyncIterable["models.StreamingJobListResult"]: + ) -> AsyncIterable["_models.StreamingJobListResult"]: """Lists all of the streaming jobs in the specified resource group. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -457,7 +469,7 @@ def list_by_resource_group( :rtype: ~azure.core.async_paging.AsyncItemPaged[~stream_analytics_management_client.models.StreamingJobListResult] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["models.StreamingJobListResult"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.StreamingJobListResult"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } @@ -519,7 +531,7 @@ def list( self, expand: Optional[str] = None, **kwargs - ) -> AsyncIterable["models.StreamingJobListResult"]: + ) -> AsyncIterable["_models.StreamingJobListResult"]: """Lists all of the streaming jobs in the given subscription. :param expand: The $expand OData query parameter. This is a comma-separated list of additional @@ -532,7 +544,7 @@ def list( :rtype: ~azure.core.async_paging.AsyncItemPaged[~stream_analytics_management_client.models.StreamingJobListResult] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["models.StreamingJobListResult"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.StreamingJobListResult"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } @@ -593,7 +605,7 @@ async def _start_initial( self, resource_group_name: str, job_name: str, - start_job_parameters: Optional["models.StartStreamingJobParameters"] = None, + start_job_parameters: Optional["_models.StartStreamingJobParameters"] = None, **kwargs ) -> None: cls = kwargs.pop('cls', None) # type: ClsType[None] @@ -644,7 +656,7 @@ async def begin_start( self, resource_group_name: str, job_name: str, - start_job_parameters: Optional["models.StartStreamingJobParameters"] = None, + start_job_parameters: Optional["_models.StartStreamingJobParameters"] = None, **kwargs ) -> AsyncLROPoller[None]: """Starts a streaming job. Once a job is started it will start processing input events and produce @@ -689,7 +701,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', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'jobName': self._serialize.url("job_name", job_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: @@ -790,7 +808,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', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'jobName': self._serialize.url("job_name", job_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: diff --git a/sdk/streamanalytics/azure-mgmt-streamanalytics/azure/mgmt/streamanalytics/aio/operations/_subscriptions_operations.py b/sdk/streamanalytics/azure-mgmt-streamanalytics/azure/mgmt/streamanalytics/aio/operations/_subscriptions_operations.py index 7a94e1139245..bba8a78d4abd 100644 --- a/sdk/streamanalytics/azure-mgmt-streamanalytics/azure/mgmt/streamanalytics/aio/operations/_subscriptions_operations.py +++ b/sdk/streamanalytics/azure-mgmt-streamanalytics/azure/mgmt/streamanalytics/aio/operations/_subscriptions_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 SubscriptionsOperations: :param deserializer: An object model deserializer. """ - models = models + models = _models def __init__(self, client, config, serializer, deserializer) -> None: self._client = client @@ -44,7 +44,7 @@ async def list_quotas( self, location: str, **kwargs - ) -> "models.SubscriptionQuotasListResult": + ) -> "_models.SubscriptionQuotasListResult": """Retrieves the subscription's current quota information in a particular region. :param location: The region in which to retrieve the subscription's quota information. You can @@ -56,7 +56,7 @@ async def list_quotas( :rtype: ~stream_analytics_management_client.models.SubscriptionQuotasListResult :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["models.SubscriptionQuotasListResult"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.SubscriptionQuotasListResult"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } diff --git a/sdk/streamanalytics/azure-mgmt-streamanalytics/azure/mgmt/streamanalytics/aio/operations/_transformations_operations.py b/sdk/streamanalytics/azure-mgmt-streamanalytics/azure/mgmt/streamanalytics/aio/operations/_transformations_operations.py index 066f372f8baa..d52576bf256b 100644 --- a/sdk/streamanalytics/azure-mgmt-streamanalytics/azure/mgmt/streamanalytics/aio/operations/_transformations_operations.py +++ b/sdk/streamanalytics/azure-mgmt-streamanalytics/azure/mgmt/streamanalytics/aio/operations/_transformations_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 TransformationsOperations: :param deserializer: An object model deserializer. """ - models = models + models = _models def __init__(self, client, config, serializer, deserializer) -> None: self._client = client @@ -45,11 +45,11 @@ async def create_or_replace( resource_group_name: str, job_name: str, transformation_name: str, - transformation: "models.Transformation", + transformation: "_models.Transformation", if_match: Optional[str] = None, if_none_match: Optional[str] = None, **kwargs - ) -> "models.Transformation": + ) -> "_models.Transformation": """Creates a transformation or replaces an already existing transformation under an existing streaming job. @@ -75,7 +75,7 @@ async def create_or_replace( :rtype: ~stream_analytics_management_client.models.Transformation :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["models.Transformation"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.Transformation"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } @@ -138,10 +138,10 @@ async def update( resource_group_name: str, job_name: str, transformation_name: str, - transformation: "models.Transformation", + transformation: "_models.Transformation", if_match: Optional[str] = None, **kwargs - ) -> "models.Transformation": + ) -> "_models.Transformation": """Updates an existing transformation under an existing streaming job. This can be used to partially update (ie. update one or two properties) a transformation without affecting the rest the job or transformation definition. @@ -167,7 +167,7 @@ async def update( :rtype: ~stream_analytics_management_client.models.Transformation :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["models.Transformation"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.Transformation"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } @@ -224,7 +224,7 @@ async def get( job_name: str, transformation_name: str, **kwargs - ) -> "models.Transformation": + ) -> "_models.Transformation": """Gets details about the specified transformation. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -238,7 +238,7 @@ async def get( :rtype: ~stream_analytics_management_client.models.Transformation :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["models.Transformation"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.Transformation"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } diff --git a/sdk/streamanalytics/azure-mgmt-streamanalytics/azure/mgmt/streamanalytics/models/_models.py b/sdk/streamanalytics/azure-mgmt-streamanalytics/azure/mgmt/streamanalytics/models/_models.py index 100ff571855a..8c91ac57d105 100644 --- a/sdk/streamanalytics/azure-mgmt-streamanalytics/azure/mgmt/streamanalytics/models/_models.py +++ b/sdk/streamanalytics/azure-mgmt-streamanalytics/azure/mgmt/streamanalytics/models/_models.py @@ -4404,10 +4404,10 @@ class StreamingJob(TrackedResource): :param job_storage_account: The properties that are associated with an Azure Storage account with MSI. :type job_storage_account: ~stream_analytics_management_client.models.JobStorageAccount - :ivar content_storage_policy: Valid values are JobStorageAccount and SystemAccount. If set to + :param content_storage_policy: Valid values are JobStorageAccount and SystemAccount. If set to JobStorageAccount, this requires the user to also specify jobStorageAccount property. . Possible values include: "SystemAccount", "JobStorageAccount". - :vartype content_storage_policy: str or + :type content_storage_policy: str or ~stream_analytics_management_client.models.ContentStoragePolicy :param externals: The storage account where the custom code artifacts are located. :type externals: ~stream_analytics_management_client.models.External @@ -4425,7 +4425,6 @@ class StreamingJob(TrackedResource): 'last_output_event_time': {'readonly': True}, 'created_date': {'readonly': True}, 'etag': {'readonly': True}, - 'content_storage_policy': {'readonly': True}, } _attribute_map = { @@ -4488,7 +4487,7 @@ def __init__( self.functions = kwargs.get('functions', None) self.etag = None self.job_storage_account = kwargs.get('job_storage_account', None) - self.content_storage_policy = None + self.content_storage_policy = kwargs.get('content_storage_policy', None) self.externals = kwargs.get('externals', None) self.cluster = kwargs.get('cluster', None) diff --git a/sdk/streamanalytics/azure-mgmt-streamanalytics/azure/mgmt/streamanalytics/models/_models_py3.py b/sdk/streamanalytics/azure-mgmt-streamanalytics/azure/mgmt/streamanalytics/models/_models_py3.py index aa07f713986e..8760cc5856f0 100644 --- a/sdk/streamanalytics/azure-mgmt-streamanalytics/azure/mgmt/streamanalytics/models/_models_py3.py +++ b/sdk/streamanalytics/azure-mgmt-streamanalytics/azure/mgmt/streamanalytics/models/_models_py3.py @@ -4824,10 +4824,10 @@ class StreamingJob(TrackedResource): :param job_storage_account: The properties that are associated with an Azure Storage account with MSI. :type job_storage_account: ~stream_analytics_management_client.models.JobStorageAccount - :ivar content_storage_policy: Valid values are JobStorageAccount and SystemAccount. If set to + :param content_storage_policy: Valid values are JobStorageAccount and SystemAccount. If set to JobStorageAccount, this requires the user to also specify jobStorageAccount property. . Possible values include: "SystemAccount", "JobStorageAccount". - :vartype content_storage_policy: str or + :type content_storage_policy: str or ~stream_analytics_management_client.models.ContentStoragePolicy :param externals: The storage account where the custom code artifacts are located. :type externals: ~stream_analytics_management_client.models.External @@ -4845,7 +4845,6 @@ class StreamingJob(TrackedResource): 'last_output_event_time': {'readonly': True}, 'created_date': {'readonly': True}, 'etag': {'readonly': True}, - 'content_storage_policy': {'readonly': True}, } _attribute_map = { @@ -4902,6 +4901,7 @@ def __init__( outputs: Optional[List["Output"]] = None, functions: Optional[List["Function"]] = None, job_storage_account: Optional["JobStorageAccount"] = None, + content_storage_policy: Optional[Union[str, "ContentStoragePolicy"]] = None, externals: Optional["External"] = None, cluster: Optional["ClusterInfo"] = None, **kwargs @@ -4929,7 +4929,7 @@ def __init__( self.functions = functions self.etag = None self.job_storage_account = job_storage_account - self.content_storage_policy = None + self.content_storage_policy = content_storage_policy self.externals = externals self.cluster = cluster diff --git a/sdk/streamanalytics/azure-mgmt-streamanalytics/azure/mgmt/streamanalytics/operations/_clusters_operations.py b/sdk/streamanalytics/azure-mgmt-streamanalytics/azure/mgmt/streamanalytics/operations/_clusters_operations.py index 2b0d23f60677..7c2a7bd19228 100644 --- a/sdk/streamanalytics/azure-mgmt-streamanalytics/azure/mgmt/streamanalytics/operations/_clusters_operations.py +++ b/sdk/streamanalytics/azure-mgmt-streamanalytics/azure/mgmt/streamanalytics/operations/_clusters_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 ClustersOperations(object): :param deserializer: An object model deserializer. """ - models = models + models = _models def __init__(self, client, config, serializer, deserializer): self._client = client @@ -51,13 +51,13 @@ def _create_or_update_initial( self, resource_group_name, # type: str cluster_name, # type: str - cluster, # type: "models.Cluster" + cluster, # type: "_models.Cluster" if_match=None, # type: Optional[str] if_none_match=None, # type: Optional[str] **kwargs # type: Any ): - # type: (...) -> "models.Cluster" - cls = kwargs.pop('cls', None) # type: ClsType["models.Cluster"] + # type: (...) -> "_models.Cluster" + cls = kwargs.pop('cls', None) # type: ClsType["_models.Cluster"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } @@ -97,7 +97,7 @@ def _create_or_update_initial( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(models.Error, response) + error = self._deserialize(_models.Error, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -116,12 +116,12 @@ def begin_create_or_update( self, resource_group_name, # type: str cluster_name, # type: str - cluster, # type: "models.Cluster" + cluster, # type: "_models.Cluster" if_match=None, # type: Optional[str] if_none_match=None, # type: Optional[str] **kwargs # type: Any ): - # type: (...) -> LROPoller["models.Cluster"] + # type: (...) -> LROPoller["_models.Cluster"] """Creates a Stream Analytics Cluster or replaces an already existing cluster. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -149,7 +149,7 @@ def begin_create_or_update( :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["models.Cluster"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.Cluster"] lro_delay = kwargs.pop( 'polling_interval', self._config.polling_interval @@ -176,7 +176,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', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'clusterName': self._serialize.url("cluster_name", cluster_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: @@ -194,12 +200,12 @@ def _update_initial( self, resource_group_name, # type: str cluster_name, # type: str - cluster, # type: "models.Cluster" + cluster, # type: "_models.Cluster" if_match=None, # type: Optional[str] **kwargs # type: Any ): - # type: (...) -> Optional["models.Cluster"] - cls = kwargs.pop('cls', None) # type: ClsType[Optional["models.Cluster"]] + # type: (...) -> Optional["_models.Cluster"] + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.Cluster"]] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } @@ -237,7 +243,7 @@ def _update_initial( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(models.Error, response) + error = self._deserialize(_models.Error, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = None @@ -254,11 +260,11 @@ def begin_update( self, resource_group_name, # type: str cluster_name, # type: str - cluster, # type: "models.Cluster" + cluster, # type: "_models.Cluster" if_match=None, # type: Optional[str] **kwargs # type: Any ): - # type: (...) -> LROPoller["models.Cluster"] + # type: (...) -> LROPoller["_models.Cluster"] """Updates an existing cluster. This can be used to partially update (ie. update one or two properties) a cluster without affecting the rest of the cluster definition. @@ -284,7 +290,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.Cluster"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.Cluster"] lro_delay = kwargs.pop( 'polling_interval', self._config.polling_interval @@ -310,7 +316,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', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'clusterName': self._serialize.url("cluster_name", cluster_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: @@ -330,7 +342,7 @@ def get( cluster_name, # type: str **kwargs # type: Any ): - # type: (...) -> "models.Cluster" + # type: (...) -> "_models.Cluster" """Gets information about the specified cluster. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -342,7 +354,7 @@ def get( :rtype: ~stream_analytics_management_client.models.Cluster :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["models.Cluster"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.Cluster"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } @@ -373,7 +385,7 @@ def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(models.Error, response) + error = self._deserialize(_models.Error, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('Cluster', pipeline_response) @@ -422,7 +434,7 @@ def _delete_initial( if response.status_code not in [200, 202, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(models.Error, response) + error = self._deserialize(_models.Error, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -475,7 +487,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', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'clusterName': self._serialize.url("cluster_name", cluster_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: @@ -493,7 +511,7 @@ def list_by_subscription( self, **kwargs # type: Any ): - # type: (...) -> Iterable["models.ClusterListResult"] + # type: (...) -> Iterable["_models.ClusterListResult"] """Lists all of the clusters in the given subscription. :keyword callable cls: A custom type or function that will be passed the direct response @@ -501,7 +519,7 @@ def list_by_subscription( :rtype: ~azure.core.paging.ItemPaged[~stream_analytics_management_client.models.ClusterListResult] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["models.ClusterListResult"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.ClusterListResult"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } @@ -546,7 +564,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(models.Error, response) + error = self._deserialize(_models.Error, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -562,7 +580,7 @@ def list_by_resource_group( resource_group_name, # type: str **kwargs # type: Any ): - # type: (...) -> Iterable["models.ClusterListResult"] + # type: (...) -> Iterable["_models.ClusterListResult"] """Lists all of the clusters in the given resource group. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -572,7 +590,7 @@ def list_by_resource_group( :rtype: ~azure.core.paging.ItemPaged[~stream_analytics_management_client.models.ClusterListResult] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["models.ClusterListResult"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.ClusterListResult"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } @@ -618,7 +636,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(models.Error, response) + error = self._deserialize(_models.Error, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -635,7 +653,7 @@ def list_streaming_jobs( cluster_name, # type: str **kwargs # type: Any ): - # type: (...) -> Iterable["models.ClusterJobListResult"] + # type: (...) -> Iterable["_models.ClusterJobListResult"] """Lists all of the streaming jobs in the given cluster. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -647,7 +665,7 @@ def list_streaming_jobs( :rtype: ~azure.core.paging.ItemPaged[~stream_analytics_management_client.models.ClusterJobListResult] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["models.ClusterJobListResult"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.ClusterJobListResult"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } @@ -694,7 +712,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(models.Error, response) + error = self._deserialize(_models.Error, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) diff --git a/sdk/streamanalytics/azure-mgmt-streamanalytics/azure/mgmt/streamanalytics/operations/_functions_operations.py b/sdk/streamanalytics/azure-mgmt-streamanalytics/azure/mgmt/streamanalytics/operations/_functions_operations.py index 31063c85850b..e84899de063b 100644 --- a/sdk/streamanalytics/azure-mgmt-streamanalytics/azure/mgmt/streamanalytics/operations/_functions_operations.py +++ b/sdk/streamanalytics/azure-mgmt-streamanalytics/azure/mgmt/streamanalytics/operations/_functions_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 FunctionsOperations(object): :param deserializer: An object model deserializer. """ - models = models + models = _models def __init__(self, client, config, serializer, deserializer): self._client = client @@ -52,12 +52,12 @@ def create_or_replace( resource_group_name, # type: str job_name, # type: str function_name, # type: str - function, # type: "models.Function" + function, # type: "_models.Function" if_match=None, # type: Optional[str] if_none_match=None, # type: Optional[str] **kwargs # type: Any ): - # type: (...) -> "models.Function" + # type: (...) -> "_models.Function" """Creates a function or replaces an already existing function under an existing streaming job. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -81,7 +81,7 @@ def create_or_replace( :rtype: ~stream_analytics_management_client.models.Function :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["models.Function"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.Function"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } @@ -144,11 +144,11 @@ def update( resource_group_name, # type: str job_name, # type: str function_name, # type: str - function, # type: "models.Function" + function, # type: "_models.Function" if_match=None, # type: Optional[str] **kwargs # type: Any ): - # type: (...) -> "models.Function" + # type: (...) -> "_models.Function" """Updates an existing function under an existing streaming job. This can be used to partially update (ie. update one or two properties) a function without affecting the rest the job or function definition. @@ -173,7 +173,7 @@ def update( :rtype: ~stream_analytics_management_client.models.Function :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["models.Function"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.Function"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } @@ -289,7 +289,7 @@ def get( function_name, # type: str **kwargs # type: Any ): - # type: (...) -> "models.Function" + # type: (...) -> "_models.Function" """Gets details about the specified function. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -303,7 +303,7 @@ def get( :rtype: ~stream_analytics_management_client.models.Function :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["models.Function"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.Function"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } @@ -354,7 +354,7 @@ def list_by_streaming_job( select=None, # type: Optional[str] **kwargs # type: Any ): - # type: (...) -> Iterable["models.FunctionListResult"] + # type: (...) -> Iterable["_models.FunctionListResult"] """Lists all of the functions under the specified streaming job. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -370,7 +370,7 @@ def list_by_streaming_job( :rtype: ~azure.core.paging.ItemPaged[~stream_analytics_management_client.models.FunctionListResult] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["models.FunctionListResult"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.FunctionListResult"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } @@ -434,11 +434,11 @@ def _test_initial( resource_group_name, # type: str job_name, # type: str function_name, # type: str - function=None, # type: Optional["models.Function"] + function=None, # type: Optional["_models.Function"] **kwargs # type: Any ): - # type: (...) -> Optional["models.ResourceTestStatus"] - cls = kwargs.pop('cls', None) # type: ClsType[Optional["models.ResourceTestStatus"]] + # type: (...) -> Optional["_models.ResourceTestStatus"] + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.ResourceTestStatus"]] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } @@ -495,10 +495,10 @@ def begin_test( resource_group_name, # type: str job_name, # type: str function_name, # type: str - function=None, # type: Optional["models.Function"] + function=None, # type: Optional["_models.Function"] **kwargs # type: Any ): - # type: (...) -> LROPoller["models.ResourceTestStatus"] + # type: (...) -> LROPoller["_models.ResourceTestStatus"] """Tests if the information provided for a function is valid. This can range from testing the connection to the underlying web service behind the function or making sure the function code provided is syntactically correct. @@ -526,7 +526,7 @@ def begin_test( :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["models.ResourceTestStatus"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.ResourceTestStatus"] lro_delay = kwargs.pop( 'polling_interval', self._config.polling_interval @@ -552,7 +552,14 @@ 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', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'jobName': self._serialize.url("job_name", job_name, 'str'), + 'functionName': self._serialize.url("function_name", function_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: @@ -571,10 +578,10 @@ def retrieve_default_definition( resource_group_name, # type: str job_name, # type: str function_name, # type: str - function_retrieve_default_definition_parameters=None, # type: Optional["models.FunctionRetrieveDefaultDefinitionParameters"] + function_retrieve_default_definition_parameters=None, # type: Optional["_models.FunctionRetrieveDefaultDefinitionParameters"] **kwargs # type: Any ): - # type: (...) -> "models.Function" + # type: (...) -> "_models.Function" """Retrieves the default definition of a function based on the parameters specified. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -591,7 +598,7 @@ def retrieve_default_definition( :rtype: ~stream_analytics_management_client.models.Function :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["models.Function"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.Function"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } diff --git a/sdk/streamanalytics/azure-mgmt-streamanalytics/azure/mgmt/streamanalytics/operations/_inputs_operations.py b/sdk/streamanalytics/azure-mgmt-streamanalytics/azure/mgmt/streamanalytics/operations/_inputs_operations.py index 890d33f1b8b1..2396fbe46974 100644 --- a/sdk/streamanalytics/azure-mgmt-streamanalytics/azure/mgmt/streamanalytics/operations/_inputs_operations.py +++ b/sdk/streamanalytics/azure-mgmt-streamanalytics/azure/mgmt/streamanalytics/operations/_inputs_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 InputsOperations(object): :param deserializer: An object model deserializer. """ - models = models + models = _models def __init__(self, client, config, serializer, deserializer): self._client = client @@ -52,12 +52,12 @@ def create_or_replace( resource_group_name, # type: str job_name, # type: str input_name, # type: str - input, # type: "models.Input" + input, # type: "_models.Input" if_match=None, # type: Optional[str] if_none_match=None, # type: Optional[str] **kwargs # type: Any ): - # type: (...) -> "models.Input" + # type: (...) -> "_models.Input" """Creates an input or replaces an already existing input under an existing streaming job. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -80,7 +80,7 @@ def create_or_replace( :rtype: ~stream_analytics_management_client.models.Input :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["models.Input"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.Input"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } @@ -143,11 +143,11 @@ def update( resource_group_name, # type: str job_name, # type: str input_name, # type: str - input, # type: "models.Input" + input, # type: "_models.Input" if_match=None, # type: Optional[str] **kwargs # type: Any ): - # type: (...) -> "models.Input" + # type: (...) -> "_models.Input" """Updates an existing input under an existing streaming job. This can be used to partially update (ie. update one or two properties) an input without affecting the rest the job or input definition. @@ -171,7 +171,7 @@ def update( :rtype: ~stream_analytics_management_client.models.Input :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["models.Input"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.Input"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } @@ -287,7 +287,7 @@ def get( input_name, # type: str **kwargs # type: Any ): - # type: (...) -> "models.Input" + # type: (...) -> "_models.Input" """Gets details about the specified input. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -301,7 +301,7 @@ def get( :rtype: ~stream_analytics_management_client.models.Input :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["models.Input"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.Input"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } @@ -352,7 +352,7 @@ def list_by_streaming_job( select=None, # type: Optional[str] **kwargs # type: Any ): - # type: (...) -> Iterable["models.InputListResult"] + # type: (...) -> Iterable["_models.InputListResult"] """Lists all of the inputs under the specified streaming job. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -368,7 +368,7 @@ def list_by_streaming_job( :rtype: ~azure.core.paging.ItemPaged[~stream_analytics_management_client.models.InputListResult] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["models.InputListResult"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.InputListResult"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } @@ -432,11 +432,11 @@ def _test_initial( resource_group_name, # type: str job_name, # type: str input_name, # type: str - input=None, # type: Optional["models.Input"] + input=None, # type: Optional["_models.Input"] **kwargs # type: Any ): - # type: (...) -> Optional["models.ResourceTestStatus"] - cls = kwargs.pop('cls', None) # type: ClsType[Optional["models.ResourceTestStatus"]] + # type: (...) -> Optional["_models.ResourceTestStatus"] + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.ResourceTestStatus"]] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } @@ -493,10 +493,10 @@ def begin_test( resource_group_name, # type: str job_name, # type: str input_name, # type: str - input=None, # type: Optional["models.Input"] + input=None, # type: Optional["_models.Input"] **kwargs # type: Any ): - # type: (...) -> LROPoller["models.ResourceTestStatus"] + # type: (...) -> LROPoller["_models.ResourceTestStatus"] """Tests whether an input’s datasource is reachable and usable by the Azure Stream Analytics service. @@ -523,7 +523,7 @@ def begin_test( :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["models.ResourceTestStatus"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.ResourceTestStatus"] lro_delay = kwargs.pop( 'polling_interval', self._config.polling_interval @@ -549,7 +549,14 @@ 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', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'jobName': self._serialize.url("job_name", job_name, 'str'), + 'inputName': self._serialize.url("input_name", input_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: diff --git a/sdk/streamanalytics/azure-mgmt-streamanalytics/azure/mgmt/streamanalytics/operations/_operations.py b/sdk/streamanalytics/azure-mgmt-streamanalytics/azure/mgmt/streamanalytics/operations/_operations.py index 1a63db586859..d1bd5ef89a59 100644 --- a/sdk/streamanalytics/azure-mgmt-streamanalytics/azure/mgmt/streamanalytics/operations/_operations.py +++ b/sdk/streamanalytics/azure-mgmt-streamanalytics/azure/mgmt/streamanalytics/operations/_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 Operations(object): :param deserializer: An object model deserializer. """ - models = models + models = _models def __init__(self, client, config, serializer, deserializer): self._client = client @@ -49,7 +49,7 @@ def list( self, **kwargs # type: Any ): - # type: (...) -> Iterable["models.OperationListResult"] + # type: (...) -> Iterable["_models.OperationListResult"] """Lists all of the available Stream Analytics related operations. :keyword callable cls: A custom type or function that will be passed the direct response @@ -57,7 +57,7 @@ def list( :rtype: ~azure.core.paging.ItemPaged[~stream_analytics_management_client.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/streamanalytics/azure-mgmt-streamanalytics/azure/mgmt/streamanalytics/operations/_outputs_operations.py b/sdk/streamanalytics/azure-mgmt-streamanalytics/azure/mgmt/streamanalytics/operations/_outputs_operations.py index a18f17686979..9a106977a69c 100644 --- a/sdk/streamanalytics/azure-mgmt-streamanalytics/azure/mgmt/streamanalytics/operations/_outputs_operations.py +++ b/sdk/streamanalytics/azure-mgmt-streamanalytics/azure/mgmt/streamanalytics/operations/_outputs_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 OutputsOperations(object): :param deserializer: An object model deserializer. """ - models = models + models = _models def __init__(self, client, config, serializer, deserializer): self._client = client @@ -52,12 +52,12 @@ def create_or_replace( resource_group_name, # type: str job_name, # type: str output_name, # type: str - output, # type: "models.Output" + output, # type: "_models.Output" if_match=None, # type: Optional[str] if_none_match=None, # type: Optional[str] **kwargs # type: Any ): - # type: (...) -> "models.Output" + # type: (...) -> "_models.Output" """Creates an output or replaces an already existing output under an existing streaming job. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -81,7 +81,7 @@ def create_or_replace( :rtype: ~stream_analytics_management_client.models.Output :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["models.Output"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.Output"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } @@ -144,11 +144,11 @@ def update( resource_group_name, # type: str job_name, # type: str output_name, # type: str - output, # type: "models.Output" + output, # type: "_models.Output" if_match=None, # type: Optional[str] **kwargs # type: Any ): - # type: (...) -> "models.Output" + # type: (...) -> "_models.Output" """Updates an existing output under an existing streaming job. This can be used to partially update (ie. update one or two properties) an output without affecting the rest the job or output definition. @@ -173,7 +173,7 @@ def update( :rtype: ~stream_analytics_management_client.models.Output :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["models.Output"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.Output"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } @@ -289,7 +289,7 @@ def get( output_name, # type: str **kwargs # type: Any ): - # type: (...) -> "models.Output" + # type: (...) -> "_models.Output" """Gets details about the specified output. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -303,7 +303,7 @@ def get( :rtype: ~stream_analytics_management_client.models.Output :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["models.Output"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.Output"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } @@ -354,7 +354,7 @@ def list_by_streaming_job( select=None, # type: Optional[str] **kwargs # type: Any ): - # type: (...) -> Iterable["models.OutputListResult"] + # type: (...) -> Iterable["_models.OutputListResult"] """Lists all of the outputs under the specified streaming job. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -370,7 +370,7 @@ def list_by_streaming_job( :rtype: ~azure.core.paging.ItemPaged[~stream_analytics_management_client.models.OutputListResult] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["models.OutputListResult"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.OutputListResult"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } @@ -434,11 +434,11 @@ def _test_initial( resource_group_name, # type: str job_name, # type: str output_name, # type: str - output=None, # type: Optional["models.Output"] + output=None, # type: Optional["_models.Output"] **kwargs # type: Any ): - # type: (...) -> Optional["models.ResourceTestStatus"] - cls = kwargs.pop('cls', None) # type: ClsType[Optional["models.ResourceTestStatus"]] + # type: (...) -> Optional["_models.ResourceTestStatus"] + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.ResourceTestStatus"]] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } @@ -495,10 +495,10 @@ def begin_test( resource_group_name, # type: str job_name, # type: str output_name, # type: str - output=None, # type: Optional["models.Output"] + output=None, # type: Optional["_models.Output"] **kwargs # type: Any ): - # type: (...) -> LROPoller["models.ResourceTestStatus"] + # type: (...) -> LROPoller["_models.ResourceTestStatus"] """Tests whether an output’s datasource is reachable and usable by the Azure Stream Analytics service. @@ -525,7 +525,7 @@ def begin_test( :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["models.ResourceTestStatus"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.ResourceTestStatus"] lro_delay = kwargs.pop( 'polling_interval', self._config.polling_interval @@ -551,7 +551,14 @@ 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', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'jobName': self._serialize.url("job_name", job_name, 'str'), + 'outputName': self._serialize.url("output_name", output_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: diff --git a/sdk/streamanalytics/azure-mgmt-streamanalytics/azure/mgmt/streamanalytics/operations/_private_endpoints_operations.py b/sdk/streamanalytics/azure-mgmt-streamanalytics/azure/mgmt/streamanalytics/operations/_private_endpoints_operations.py index e194d816d90c..fd727eefa71f 100644 --- a/sdk/streamanalytics/azure-mgmt-streamanalytics/azure/mgmt/streamanalytics/operations/_private_endpoints_operations.py +++ b/sdk/streamanalytics/azure-mgmt-streamanalytics/azure/mgmt/streamanalytics/operations/_private_endpoints_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 PrivateEndpointsOperations(object): :param deserializer: An object model deserializer. """ - models = models + models = _models def __init__(self, client, config, serializer, deserializer): self._client = client @@ -52,12 +52,12 @@ def create_or_update( resource_group_name, # type: str cluster_name, # type: str private_endpoint_name, # type: str - private_endpoint, # type: "models.PrivateEndpoint" + private_endpoint, # type: "_models.PrivateEndpoint" if_match=None, # type: Optional[str] if_none_match=None, # type: Optional[str] **kwargs # type: Any ): - # type: (...) -> "models.PrivateEndpoint" + # type: (...) -> "_models.PrivateEndpoint" """Creates a Stream Analytics Private Endpoint or replaces an already existing Private Endpoint. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -81,7 +81,7 @@ def create_or_update( :rtype: ~stream_analytics_management_client.models.PrivateEndpoint :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["models.PrivateEndpoint"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateEndpoint"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } @@ -122,7 +122,7 @@ def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(models.Error, response) + error = self._deserialize(_models.Error, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -144,7 +144,7 @@ def get( private_endpoint_name, # type: str **kwargs # type: Any ): - # type: (...) -> "models.PrivateEndpoint" + # type: (...) -> "_models.PrivateEndpoint" """Gets information about the specified Private Endpoint. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -158,7 +158,7 @@ def get( :rtype: ~stream_analytics_management_client.models.PrivateEndpoint :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["models.PrivateEndpoint"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateEndpoint"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } @@ -190,7 +190,7 @@ def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(models.Error, response) + error = self._deserialize(_models.Error, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('PrivateEndpoint', pipeline_response) @@ -241,7 +241,7 @@ def _delete_initial( if response.status_code not in [200, 202, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(models.Error, response) + error = self._deserialize(_models.Error, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -298,7 +298,14 @@ 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', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'clusterName': self._serialize.url("cluster_name", cluster_name, 'str'), + 'privateEndpointName': self._serialize.url("private_endpoint_name", private_endpoint_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: @@ -318,7 +325,7 @@ def list_by_cluster( cluster_name, # type: str **kwargs # type: Any ): - # type: (...) -> Iterable["models.PrivateEndpointListResult"] + # type: (...) -> Iterable["_models.PrivateEndpointListResult"] """Lists the private endpoints in the cluster. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -330,7 +337,7 @@ def list_by_cluster( :rtype: ~azure.core.paging.ItemPaged[~stream_analytics_management_client.models.PrivateEndpointListResult] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["models.PrivateEndpointListResult"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateEndpointListResult"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } @@ -377,7 +384,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(models.Error, response) + error = self._deserialize(_models.Error, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) diff --git a/sdk/streamanalytics/azure-mgmt-streamanalytics/azure/mgmt/streamanalytics/operations/_streaming_jobs_operations.py b/sdk/streamanalytics/azure-mgmt-streamanalytics/azure/mgmt/streamanalytics/operations/_streaming_jobs_operations.py index f3228537a7ed..bea62e4066fb 100644 --- a/sdk/streamanalytics/azure-mgmt-streamanalytics/azure/mgmt/streamanalytics/operations/_streaming_jobs_operations.py +++ b/sdk/streamanalytics/azure-mgmt-streamanalytics/azure/mgmt/streamanalytics/operations/_streaming_jobs_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 StreamingJobsOperations(object): :param deserializer: An object model deserializer. """ - models = models + models = _models def __init__(self, client, config, serializer, deserializer): self._client = client @@ -51,13 +51,13 @@ def _create_or_replace_initial( self, resource_group_name, # type: str job_name, # type: str - streaming_job, # type: "models.StreamingJob" + streaming_job, # type: "_models.StreamingJob" if_match=None, # type: Optional[str] if_none_match=None, # type: Optional[str] **kwargs # type: Any ): - # type: (...) -> "models.StreamingJob" - cls = kwargs.pop('cls', None) # type: ClsType["models.StreamingJob"] + # type: (...) -> "_models.StreamingJob" + cls = kwargs.pop('cls', None) # type: ClsType["_models.StreamingJob"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } @@ -118,12 +118,12 @@ def begin_create_or_replace( self, resource_group_name, # type: str job_name, # type: str - streaming_job, # type: "models.StreamingJob" + streaming_job, # type: "_models.StreamingJob" if_match=None, # type: Optional[str] if_none_match=None, # type: Optional[str] **kwargs # type: Any ): - # type: (...) -> LROPoller["models.StreamingJob"] + # type: (...) -> LROPoller["_models.StreamingJob"] """Creates a streaming job or replaces an already existing streaming job. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -152,7 +152,7 @@ def begin_create_or_replace( :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["models.StreamingJob"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.StreamingJob"] lro_delay = kwargs.pop( 'polling_interval', self._config.polling_interval @@ -182,7 +182,13 @@ def get_long_running_output(pipeline_response): return cls(pipeline_response, deserialized, response_headers) 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', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'jobName': self._serialize.url("job_name", job_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: @@ -200,11 +206,11 @@ def update( self, resource_group_name, # type: str job_name, # type: str - streaming_job, # type: "models.StreamingJob" + streaming_job, # type: "_models.StreamingJob" if_match=None, # type: Optional[str] **kwargs # type: Any ): - # type: (...) -> "models.StreamingJob" + # type: (...) -> "_models.StreamingJob" """Updates an existing streaming job. This can be used to partially update (ie. update one or two properties) a streaming job without affecting the rest the job definition. @@ -226,7 +232,7 @@ def update( :rtype: ~stream_analytics_management_client.models.StreamingJob :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["models.StreamingJob"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.StreamingJob"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } @@ -364,7 +370,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', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'jobName': self._serialize.url("job_name", job_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 +397,7 @@ def get( expand=None, # type: Optional[str] **kwargs # type: Any ): - # type: (...) -> "models.StreamingJob" + # type: (...) -> "_models.StreamingJob" """Gets details about the specified streaming job. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -402,7 +414,7 @@ def get( :rtype: ~stream_analytics_management_client.models.StreamingJob :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["models.StreamingJob"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.StreamingJob"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } @@ -453,7 +465,7 @@ def list_by_resource_group( expand=None, # type: Optional[str] **kwargs # type: Any ): - # type: (...) -> Iterable["models.StreamingJobListResult"] + # type: (...) -> Iterable["_models.StreamingJobListResult"] """Lists all of the streaming jobs in the specified resource group. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -468,7 +480,7 @@ def list_by_resource_group( :rtype: ~azure.core.paging.ItemPaged[~stream_analytics_management_client.models.StreamingJobListResult] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["models.StreamingJobListResult"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.StreamingJobListResult"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } @@ -531,7 +543,7 @@ def list( expand=None, # type: Optional[str] **kwargs # type: Any ): - # type: (...) -> Iterable["models.StreamingJobListResult"] + # type: (...) -> Iterable["_models.StreamingJobListResult"] """Lists all of the streaming jobs in the given subscription. :param expand: The $expand OData query parameter. This is a comma-separated list of additional @@ -544,7 +556,7 @@ def list( :rtype: ~azure.core.paging.ItemPaged[~stream_analytics_management_client.models.StreamingJobListResult] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["models.StreamingJobListResult"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.StreamingJobListResult"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } @@ -605,7 +617,7 @@ def _start_initial( self, resource_group_name, # type: str job_name, # type: str - start_job_parameters=None, # type: Optional["models.StartStreamingJobParameters"] + start_job_parameters=None, # type: Optional["_models.StartStreamingJobParameters"] **kwargs # type: Any ): # type: (...) -> None @@ -657,7 +669,7 @@ def begin_start( self, resource_group_name, # type: str job_name, # type: str - start_job_parameters=None, # type: Optional["models.StartStreamingJobParameters"] + start_job_parameters=None, # type: Optional["_models.StartStreamingJobParameters"] **kwargs # type: Any ): # type: (...) -> LROPoller[None] @@ -703,7 +715,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', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'jobName': self._serialize.url("job_name", job_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: @@ -806,7 +824,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', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'jobName': self._serialize.url("job_name", job_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: diff --git a/sdk/streamanalytics/azure-mgmt-streamanalytics/azure/mgmt/streamanalytics/operations/_subscriptions_operations.py b/sdk/streamanalytics/azure-mgmt-streamanalytics/azure/mgmt/streamanalytics/operations/_subscriptions_operations.py index 81d2bbf70cdb..43566debf018 100644 --- a/sdk/streamanalytics/azure-mgmt-streamanalytics/azure/mgmt/streamanalytics/operations/_subscriptions_operations.py +++ b/sdk/streamanalytics/azure-mgmt-streamanalytics/azure/mgmt/streamanalytics/operations/_subscriptions_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 SubscriptionsOperations(object): :param deserializer: An object model deserializer. """ - models = models + models = _models def __init__(self, client, config, serializer, deserializer): self._client = client @@ -49,7 +49,7 @@ def list_quotas( location, # type: str **kwargs # type: Any ): - # type: (...) -> "models.SubscriptionQuotasListResult" + # type: (...) -> "_models.SubscriptionQuotasListResult" """Retrieves the subscription's current quota information in a particular region. :param location: The region in which to retrieve the subscription's quota information. You can @@ -61,7 +61,7 @@ def list_quotas( :rtype: ~stream_analytics_management_client.models.SubscriptionQuotasListResult :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["models.SubscriptionQuotasListResult"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.SubscriptionQuotasListResult"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } diff --git a/sdk/streamanalytics/azure-mgmt-streamanalytics/azure/mgmt/streamanalytics/operations/_transformations_operations.py b/sdk/streamanalytics/azure-mgmt-streamanalytics/azure/mgmt/streamanalytics/operations/_transformations_operations.py index 49f318e3a748..29a7d238ede5 100644 --- a/sdk/streamanalytics/azure-mgmt-streamanalytics/azure/mgmt/streamanalytics/operations/_transformations_operations.py +++ b/sdk/streamanalytics/azure-mgmt-streamanalytics/azure/mgmt/streamanalytics/operations/_transformations_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 TransformationsOperations(object): :param deserializer: An object model deserializer. """ - models = models + models = _models def __init__(self, client, config, serializer, deserializer): self._client = client @@ -49,12 +49,12 @@ def create_or_replace( resource_group_name, # type: str job_name, # type: str transformation_name, # type: str - transformation, # type: "models.Transformation" + transformation, # type: "_models.Transformation" if_match=None, # type: Optional[str] if_none_match=None, # type: Optional[str] **kwargs # type: Any ): - # type: (...) -> "models.Transformation" + # type: (...) -> "_models.Transformation" """Creates a transformation or replaces an already existing transformation under an existing streaming job. @@ -80,7 +80,7 @@ def create_or_replace( :rtype: ~stream_analytics_management_client.models.Transformation :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["models.Transformation"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.Transformation"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } @@ -143,11 +143,11 @@ def update( resource_group_name, # type: str job_name, # type: str transformation_name, # type: str - transformation, # type: "models.Transformation" + transformation, # type: "_models.Transformation" if_match=None, # type: Optional[str] **kwargs # type: Any ): - # type: (...) -> "models.Transformation" + # type: (...) -> "_models.Transformation" """Updates an existing transformation under an existing streaming job. This can be used to partially update (ie. update one or two properties) a transformation without affecting the rest the job or transformation definition. @@ -173,7 +173,7 @@ def update( :rtype: ~stream_analytics_management_client.models.Transformation :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["models.Transformation"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.Transformation"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } @@ -231,7 +231,7 @@ def get( transformation_name, # type: str **kwargs # type: Any ): - # type: (...) -> "models.Transformation" + # type: (...) -> "_models.Transformation" """Gets details about the specified transformation. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -245,7 +245,7 @@ def get( :rtype: ~stream_analytics_management_client.models.Transformation :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["models.Transformation"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.Transformation"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError }