From e8780b212d7547ab543e76b975ae4448df0c75ae Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Fri, 9 Jul 2021 01:12:24 +0000 Subject: [PATCH] CodeGen from PR 15129 in Azure/azure-rest-api-specs Merge da9a6ae011fc33a657604fe286b6a892a475b7ec into d1bf50cdfe096cc06eeb66df9f682653241772cc --- sdk/purview/azure-mgmt-purview/MANIFEST.in | 1 + sdk/purview/azure-mgmt-purview/_meta.json | 11 + .../azure/mgmt/purview/_metadata.json | 62 +- .../purview/_purview_management_client.py | 20 + .../purview/aio/_purview_management_client.py | 19 + .../aio/operations/_accounts_operations.py | 50 +- .../_default_accounts_operations.py | 16 +- .../purview/aio/operations/_operations.py | 4 +- ...private_endpoint_connections_operations.py | 22 +- .../_private_link_resources_operations.py | 8 +- .../azure/mgmt/purview/models/__init__.py | 28 +- .../azure/mgmt/purview/models/_models.py | 596 ++++++++--------- .../azure/mgmt/purview/models/_models_py3.py | 608 +++++++++--------- .../_purview_management_client_enums.py | 20 + .../operations/_accounts_operations.py | 28 +- .../_default_accounts_operations.py | 10 +- .../mgmt/purview/operations/_operations.py | 2 +- ...private_endpoint_connections_operations.py | 12 +- .../_private_link_resources_operations.py | 4 +- 19 files changed, 793 insertions(+), 728 deletions(-) create mode 100644 sdk/purview/azure-mgmt-purview/_meta.json diff --git a/sdk/purview/azure-mgmt-purview/MANIFEST.in b/sdk/purview/azure-mgmt-purview/MANIFEST.in index a3cb07df8765..3a9b6517412b 100644 --- a/sdk/purview/azure-mgmt-purview/MANIFEST.in +++ b/sdk/purview/azure-mgmt-purview/MANIFEST.in @@ -1,3 +1,4 @@ +include _meta.json recursive-include tests *.py *.yaml include *.md include azure/__init__.py diff --git a/sdk/purview/azure-mgmt-purview/_meta.json b/sdk/purview/azure-mgmt-purview/_meta.json new file mode 100644 index 000000000000..449a387f0e00 --- /dev/null +++ b/sdk/purview/azure-mgmt-purview/_meta.json @@ -0,0 +1,11 @@ +{ + "autorest": "3.4.2", + "use": [ + "@autorest/python@5.8.1", + "@autorest/modelerfour@4.19.2" + ], + "commit": "7a0bf4fe4051c1aa54f531b2f1944cdf51f831f2", + "repository_url": "https://github.com/Azure/azure-rest-api-specs", + "autorest_command": "autorest specification/purview/resource-manager/readme.md --multiapi --python --python-mode=update --python-sdks-folder=/home/vsts/work/1/s/azure-sdk-for-python/sdk --track2 --use=@autorest/python@5.8.1 --use=@autorest/modelerfour@4.19.2 --version=3.4.2", + "readme": "specification/purview/resource-manager/readme.md" +} \ No newline at end of file diff --git a/sdk/purview/azure-mgmt-purview/azure/mgmt/purview/_metadata.json b/sdk/purview/azure-mgmt-purview/azure/mgmt/purview/_metadata.json index 063b7d675577..9bb31c97eef7 100644 --- a/sdk/purview/azure-mgmt-purview/azure/mgmt/purview/_metadata.json +++ b/sdk/purview/azure-mgmt-purview/azure/mgmt/purview/_metadata.json @@ -9,7 +9,9 @@ "custom_base_url": null, "azure_arm": true, "has_lro_operations": true, - "client_side_validation": true + "client_side_validation": false, + "sync_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"ARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"PurviewManagementClientConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}, \"azurecore\": {\"azure.core.pipeline.transport\": [\"HttpRequest\", \"HttpResponse\"]}}}", + "async_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"AsyncARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"PurviewManagementClientConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}, \"azurecore\": {\"azure.core.pipeline.transport\": [\"AsyncHttpResponse\", \"HttpRequest\"]}}}" }, "global_parameters": { "sync": { @@ -28,13 +30,13 @@ }, "async": { "credential": { - "signature": "credential, # type: \"AsyncTokenCredential\"", + "signature": "credential: \"AsyncTokenCredential\",", "description": "Credential needed for the client to connect to Azure.", "docstring_type": "~azure.core.credentials_async.AsyncTokenCredential", "required": true }, "subscription_id": { - "signature": "subscription_id, # type: str", + "signature": "subscription_id: str,", "description": "The subscription identifier.", "docstring_type": "str", "required": true @@ -42,14 +44,58 @@ }, "constant": { }, - "call": "credential, subscription_id" + "call": "credential, subscription_id", + "service_client_specific": { + "sync": { + "api_version": { + "signature": "api_version=None, # type: Optional[str]", + "description": "API version to use if no profile is provided, or if missing in profile.", + "docstring_type": "str", + "required": false + }, + "base_url": { + "signature": "base_url=None, # type: Optional[str]", + "description": "Service URL", + "docstring_type": "str", + "required": false + }, + "profile": { + "signature": "profile=KnownProfiles.default, # type: KnownProfiles", + "description": "A profile definition, from KnownProfiles to dict.", + "docstring_type": "azure.profiles.KnownProfiles", + "required": false + } + }, + "async": { + "api_version": { + "signature": "api_version: Optional[str] = None,", + "description": "API version to use if no profile is provided, or if missing in profile.", + "docstring_type": "str", + "required": false + }, + "base_url": { + "signature": "base_url: Optional[str] = None,", + "description": "Service URL", + "docstring_type": "str", + "required": false + }, + "profile": { + "signature": "profile: KnownProfiles = KnownProfiles.default,", + "description": "A profile definition, from KnownProfiles to dict.", + "docstring_type": "azure.profiles.KnownProfiles", + "required": false + } + } + } }, "config": { "credential": true, "credential_scopes": ["https://management.azure.com/.default"], "credential_default_policy_type": "BearerTokenCredentialPolicy", "credential_default_policy_type_has_async_version": true, - "credential_key_header_name": null + "credential_key_header_name": null, + "sync_imports": "{\"regular\": {\"azurecore\": {\"azure.core.configuration\": [\"Configuration\"], \"azure.core.pipeline\": [\"policies\"], \"azure.mgmt.core.policies\": [\"ARMHttpLoggingPolicy\"]}, \"local\": {\"._version\": [\"VERSION\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\"]}}, \"typing\": {\"azurecore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}}", + "async_imports": "{\"regular\": {\"azurecore\": {\"azure.core.configuration\": [\"Configuration\"], \"azure.core.pipeline\": [\"policies\"], \"azure.mgmt.core.policies\": [\"ARMHttpLoggingPolicy\"]}, \"local\": {\".._version\": [\"VERSION\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\"]}}, \"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"]}}}" }, "operation_groups": { "accounts": "AccountsOperations", @@ -57,9 +103,5 @@ "operations": "Operations", "private_endpoint_connections": "PrivateEndpointConnectionsOperations", "private_link_resources": "PrivateLinkResourcesOperations" - }, - "operation_mixins": { - }, - "sync_imports": "None", - "async_imports": "None" + } } \ No newline at end of file diff --git a/sdk/purview/azure-mgmt-purview/azure/mgmt/purview/_purview_management_client.py b/sdk/purview/azure-mgmt-purview/azure/mgmt/purview/_purview_management_client.py index 50148e1f1238..0c4cbaf22df6 100644 --- a/sdk/purview/azure-mgmt-purview/azure/mgmt/purview/_purview_management_client.py +++ b/sdk/purview/azure-mgmt-purview/azure/mgmt/purview/_purview_management_client.py @@ -16,6 +16,7 @@ from typing import Any, Optional from azure.core.credentials import TokenCredential + from azure.core.pipeline.transport import HttpRequest, HttpResponse from ._configuration import PurviewManagementClientConfiguration from .operations import AccountsOperations @@ -62,6 +63,7 @@ def __init__( client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} self._serialize = Serializer(client_models) + self._serialize.client_side_validation = False self._deserialize = Deserializer(client_models) self.accounts = AccountsOperations( @@ -75,6 +77,24 @@ def __init__( self.private_link_resources = PrivateLinkResourcesOperations( self._client, self._config, self._serialize, self._deserialize) + def _send_request(self, http_request, **kwargs): + # type: (HttpRequest, Any) -> HttpResponse + """Runs the network request through the client's chained policies. + + :param http_request: The network request you want to make. Required. + :type http_request: ~azure.core.pipeline.transport.HttpRequest + :keyword bool stream: Whether the response payload will be streamed. Defaults to True. + :return: The response of your network call. Does not do error handling on your response. + :rtype: ~azure.core.pipeline.transport.HttpResponse + """ + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + http_request.url = self._client.format_url(http_request.url, **path_format_arguments) + stream = kwargs.pop("stream", True) + pipeline_response = self._client._pipeline.run(http_request, stream=stream, **kwargs) + return pipeline_response.http_response + def close(self): # type: () -> None self._client.close() diff --git a/sdk/purview/azure-mgmt-purview/azure/mgmt/purview/aio/_purview_management_client.py b/sdk/purview/azure-mgmt-purview/azure/mgmt/purview/aio/_purview_management_client.py index ef650f5d042a..7d856ac75df6 100644 --- a/sdk/purview/azure-mgmt-purview/azure/mgmt/purview/aio/_purview_management_client.py +++ b/sdk/purview/azure-mgmt-purview/azure/mgmt/purview/aio/_purview_management_client.py @@ -8,6 +8,7 @@ from typing import Any, Optional, TYPE_CHECKING +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest from azure.mgmt.core import AsyncARMPipelineClient from msrest import Deserializer, Serializer @@ -59,6 +60,7 @@ def __init__( client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} self._serialize = Serializer(client_models) + self._serialize.client_side_validation = False self._deserialize = Deserializer(client_models) self.accounts = AccountsOperations( @@ -72,6 +74,23 @@ def __init__( self.private_link_resources = PrivateLinkResourcesOperations( self._client, self._config, self._serialize, self._deserialize) + async def _send_request(self, http_request: HttpRequest, **kwargs: Any) -> AsyncHttpResponse: + """Runs the network request through the client's chained policies. + + :param http_request: The network request you want to make. Required. + :type http_request: ~azure.core.pipeline.transport.HttpRequest + :keyword bool stream: Whether the response payload will be streamed. Defaults to True. + :return: The response of your network call. Does not do error handling on your response. + :rtype: ~azure.core.pipeline.transport.AsyncHttpResponse + """ + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + http_request.url = self._client.format_url(http_request.url, **path_format_arguments) + stream = kwargs.pop("stream", True) + pipeline_response = await self._client._pipeline.run(http_request, stream=stream, **kwargs) + return pipeline_response.http_response + async def close(self) -> None: await self._client.close() diff --git a/sdk/purview/azure-mgmt-purview/azure/mgmt/purview/aio/operations/_accounts_operations.py b/sdk/purview/azure-mgmt-purview/azure/mgmt/purview/aio/operations/_accounts_operations.py index 9faa886a3e52..1316deff7706 100644 --- a/sdk/purview/azure-mgmt-purview/azure/mgmt/purview/aio/operations/_accounts_operations.py +++ b/sdk/purview/azure-mgmt-purview/azure/mgmt/purview/aio/operations/_accounts_operations.py @@ -47,7 +47,7 @@ def list_by_resource_group( self, resource_group_name: str, skip_token: Optional[str] = None, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.AccountList"]: """Gets the accounts resources by resource group. @@ -110,7 +110,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.ErrorResponseModel, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponseModel, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -124,7 +124,7 @@ async def get_next(next_link=None): def list_by_subscription( self, skip_token: Optional[str] = None, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.AccountList"]: """Gets the accounts resources by subscription. @@ -184,7 +184,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.ErrorResponseModel, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponseModel, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -199,7 +199,7 @@ async def get( self, resource_group_name: str, account_name: str, - **kwargs + **kwargs: Any ) -> "_models.Account": """Gets the account resource. @@ -245,7 +245,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.ErrorResponseModel, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponseModel, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('Account', pipeline_response) @@ -261,7 +261,7 @@ async def _create_or_update_initial( resource_group_name: str, account_name: str, account: "_models.Account", - **kwargs + **kwargs: Any ) -> "_models.Account": cls = kwargs.pop('cls', None) # type: ClsType["_models.Account"] error_map = { @@ -299,7 +299,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.ErrorResponseModel, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponseModel, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -319,7 +319,7 @@ async def begin_create_or_update( resource_group_name: str, account_name: str, account: "_models.Account", - **kwargs + **kwargs: Any ) -> AsyncLROPoller["_models.Account"]: """Create or update an account resource. @@ -333,8 +333,8 @@ async def begin_create_or_update( :type account: ~azure.mgmt.purview.models.Account :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either Account or the result of cls(response) @@ -391,7 +391,7 @@ async def _delete_initial( self, resource_group_name: str, account_name: str, - **kwargs + **kwargs: Any ) -> None: cls = kwargs.pop('cls', None) # type: ClsType[None] error_map = { @@ -424,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.ErrorResponseModel, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponseModel, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -436,7 +436,7 @@ async def begin_delete( self, resource_group_name: str, account_name: str, - **kwargs + **kwargs: Any ) -> AsyncLROPoller[None]: """Deletes the account resource. @@ -448,8 +448,8 @@ async def begin_delete( :type account_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) @@ -503,7 +503,7 @@ async def _update_initial( resource_group_name: str, account_name: str, account_update_parameters: "_models.AccountUpdateParameters", - **kwargs + **kwargs: Any ) -> "_models.Account": cls = kwargs.pop('cls', None) # type: ClsType["_models.Account"] error_map = { @@ -541,7 +541,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.ErrorResponseModel, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponseModel, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -561,7 +561,7 @@ async def begin_update( resource_group_name: str, account_name: str, account_update_parameters: "_models.AccountUpdateParameters", - **kwargs + **kwargs: Any ) -> AsyncLROPoller["_models.Account"]: """Patches the account resource. @@ -575,8 +575,8 @@ async def begin_update( :type account_update_parameters: ~azure.mgmt.purview.models.AccountUpdateParameters :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either Account or the result of cls(response) @@ -633,7 +633,7 @@ async def list_keys( self, resource_group_name: str, account_name: str, - **kwargs + **kwargs: Any ) -> "_models.AccessKeys": """Lists the keys asynchronous. @@ -679,7 +679,7 @@ async def list_keys( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponseModel, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponseModel, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('AccessKeys', pipeline_response) @@ -693,7 +693,7 @@ async def list_keys( async def check_name_availability( self, check_name_availability_request: "_models.CheckNameAvailabilityRequest", - **kwargs + **kwargs: Any ) -> "_models.CheckNameAvailabilityResult": """Checks the account name availability. @@ -740,7 +740,7 @@ async def check_name_availability( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponseModel, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponseModel, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('CheckNameAvailabilityResult', pipeline_response) diff --git a/sdk/purview/azure-mgmt-purview/azure/mgmt/purview/aio/operations/_default_accounts_operations.py b/sdk/purview/azure-mgmt-purview/azure/mgmt/purview/aio/operations/_default_accounts_operations.py index 3df9a2115bac..a81e40643e56 100644 --- a/sdk/purview/azure-mgmt-purview/azure/mgmt/purview/aio/operations/_default_accounts_operations.py +++ b/sdk/purview/azure-mgmt-purview/azure/mgmt/purview/aio/operations/_default_accounts_operations.py @@ -45,7 +45,7 @@ async def get( scope_tenant_id: str, scope_type: Union[str, "_models.ScopeType"], scope: Optional[str] = None, - **kwargs + **kwargs: Any ) -> "_models.DefaultAccountPayload": """Gets the default account information set for the scope. @@ -92,7 +92,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.ErrorResponseModel, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponseModel, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('DefaultAccountPayload', pipeline_response) @@ -106,11 +106,11 @@ async def get( async def set( self, default_account_payload: "_models.DefaultAccountPayload", - **kwargs + **kwargs: Any ) -> "_models.DefaultAccountPayload": """Sets the default account for the scope. - Set the default account for the scope. + Sets the default account for the scope. :param default_account_payload: The payload containing the default account information and the scope. @@ -150,7 +150,7 @@ async def set( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponseModel, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponseModel, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('DefaultAccountPayload', pipeline_response) @@ -166,11 +166,11 @@ async def remove( scope_tenant_id: str, scope_type: Union[str, "_models.ScopeType"], scope: Optional[str] = None, - **kwargs + **kwargs: Any ) -> None: """Removes the default account from the scope. - Remove the default account from the scope. + Removes the default account from the scope. :param scope_tenant_id: The tenant ID. :type scope_tenant_id: str @@ -213,7 +213,7 @@ async def remove( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponseModel, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponseModel, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: diff --git a/sdk/purview/azure-mgmt-purview/azure/mgmt/purview/aio/operations/_operations.py b/sdk/purview/azure-mgmt-purview/azure/mgmt/purview/aio/operations/_operations.py index cbde10d66c08..deb95315c412 100644 --- a/sdk/purview/azure-mgmt-purview/azure/mgmt/purview/aio/operations/_operations.py +++ b/sdk/purview/azure-mgmt-purview/azure/mgmt/purview/aio/operations/_operations.py @@ -43,7 +43,7 @@ def __init__(self, client, config, serializer, deserializer) -> None: def list( self, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.OperationList"]: """Lists the available operations. @@ -95,7 +95,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.ErrorResponseModel, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponseModel, 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/purview/azure-mgmt-purview/azure/mgmt/purview/aio/operations/_private_endpoint_connections_operations.py b/sdk/purview/azure-mgmt-purview/azure/mgmt/purview/aio/operations/_private_endpoint_connections_operations.py index c6563831981f..9e56c4007335 100644 --- a/sdk/purview/azure-mgmt-purview/azure/mgmt/purview/aio/operations/_private_endpoint_connections_operations.py +++ b/sdk/purview/azure-mgmt-purview/azure/mgmt/purview/aio/operations/_private_endpoint_connections_operations.py @@ -48,7 +48,7 @@ def list_by_account( resource_group_name: str, account_name: str, skip_token: Optional[str] = None, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.PrivateEndpointConnectionList"]: """Gets private endpoint connections. @@ -114,7 +114,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.ErrorResponseModel, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponseModel, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -130,7 +130,7 @@ async def get( resource_group_name: str, account_name: str, private_endpoint_connection_name: str, - **kwargs + **kwargs: Any ) -> "_models.PrivateEndpointConnection": """Gets private endpoint connection information. @@ -179,7 +179,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.ErrorResponseModel, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponseModel, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('PrivateEndpointConnection', pipeline_response) @@ -196,7 +196,7 @@ async def create_or_update( account_name: str, private_endpoint_connection_name: str, request: "_models.PrivateEndpointConnection", - **kwargs + **kwargs: Any ) -> "_models.PrivateEndpointConnection": """Approves/Rejects private endpoint connection request. @@ -252,7 +252,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.ErrorResponseModel, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponseModel, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -272,7 +272,7 @@ async def _delete_initial( resource_group_name: str, account_name: str, private_endpoint_connection_name: str, - **kwargs + **kwargs: Any ) -> None: cls = kwargs.pop('cls', None) # type: ClsType[None] error_map = { @@ -306,7 +306,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.ErrorResponseModel, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponseModel, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -319,7 +319,7 @@ async def begin_delete( resource_group_name: str, account_name: str, private_endpoint_connection_name: str, - **kwargs + **kwargs: Any ) -> AsyncLROPoller[None]: """Deletes private endpoint connection. @@ -333,8 +333,8 @@ async def begin_delete( :type private_endpoint_connection_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) diff --git a/sdk/purview/azure-mgmt-purview/azure/mgmt/purview/aio/operations/_private_link_resources_operations.py b/sdk/purview/azure-mgmt-purview/azure/mgmt/purview/aio/operations/_private_link_resources_operations.py index 298971badec3..3e07fb72b362 100644 --- a/sdk/purview/azure-mgmt-purview/azure/mgmt/purview/aio/operations/_private_link_resources_operations.py +++ b/sdk/purview/azure-mgmt-purview/azure/mgmt/purview/aio/operations/_private_link_resources_operations.py @@ -45,7 +45,7 @@ def list_by_account( self, resource_group_name: str, account_name: str, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.PrivateLinkResourceList"]: """Gets a list of privately linkable resources for an account. @@ -107,7 +107,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.ErrorResponseModel, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponseModel, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -123,7 +123,7 @@ async def get_by_group_id( resource_group_name: str, account_name: str, group_id: str, - **kwargs + **kwargs: Any ) -> "_models.PrivateLinkResource": """Gets a privately linkable resources for an account with given group identifier. @@ -172,7 +172,7 @@ async def get_by_group_id( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponseModel, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponseModel, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('PrivateLinkResource', pipeline_response) diff --git a/sdk/purview/azure-mgmt-purview/azure/mgmt/purview/models/__init__.py b/sdk/purview/azure-mgmt-purview/azure/mgmt/purview/models/__init__.py index 1504d97411a5..0d724813edc3 100644 --- a/sdk/purview/azure-mgmt-purview/azure/mgmt/purview/models/__init__.py +++ b/sdk/purview/azure-mgmt-purview/azure/mgmt/purview/models/__init__.py @@ -11,18 +11,16 @@ from ._models_py3 import Account from ._models_py3 import AccountEndpoints from ._models_py3 import AccountList + from ._models_py3 import AccountProperties from ._models_py3 import AccountPropertiesEndpoints from ._models_py3 import AccountPropertiesManagedResources + from ._models_py3 import AccountPropertiesSystemData from ._models_py3 import AccountSku from ._models_py3 import AccountUpdateParameters from ._models_py3 import CheckNameAvailabilityRequest from ._models_py3 import CheckNameAvailabilityResult from ._models_py3 import CloudConnectors from ._models_py3 import DefaultAccountPayload - from ._models_py3 import DeletedAccount - from ._models_py3 import DeletedAccountList - from ._models_py3 import DeletedAccountProperties - from ._models_py3 import DeletedAccountPropertiesAutoGenerated from ._models_py3 import DimensionProperties from ._models_py3 import ErrorModel from ._models_py3 import ErrorResponseModel @@ -40,26 +38,26 @@ from ._models_py3 import PrivateEndpointConnectionList from ._models_py3 import PrivateLinkResource from ._models_py3 import PrivateLinkResourceList + from ._models_py3 import PrivateLinkResourceProperties from ._models_py3 import PrivateLinkServiceConnectionState from ._models_py3 import ProxyResource + from ._models_py3 import SystemData from ._models_py3 import TrackedResource except (SyntaxError, ImportError): from ._models import AccessKeys # type: ignore from ._models import Account # type: ignore from ._models import AccountEndpoints # type: ignore from ._models import AccountList # type: ignore + from ._models import AccountProperties # type: ignore from ._models import AccountPropertiesEndpoints # type: ignore from ._models import AccountPropertiesManagedResources # type: ignore + from ._models import AccountPropertiesSystemData # type: ignore from ._models import AccountSku # type: ignore from ._models import AccountUpdateParameters # type: ignore from ._models import CheckNameAvailabilityRequest # type: ignore from ._models import CheckNameAvailabilityResult # type: ignore from ._models import CloudConnectors # type: ignore from ._models import DefaultAccountPayload # type: ignore - from ._models import DeletedAccount # type: ignore - from ._models import DeletedAccountList # type: ignore - from ._models import DeletedAccountProperties # type: ignore - from ._models import DeletedAccountPropertiesAutoGenerated # type: ignore from ._models import DimensionProperties # type: ignore from ._models import ErrorModel # type: ignore from ._models import ErrorResponseModel # type: ignore @@ -77,11 +75,15 @@ from ._models import PrivateEndpointConnectionList # type: ignore from ._models import PrivateLinkResource # type: ignore from ._models import PrivateLinkResourceList # type: ignore + from ._models import PrivateLinkResourceProperties # type: ignore from ._models import PrivateLinkServiceConnectionState # type: ignore from ._models import ProxyResource # type: ignore + from ._models import SystemData # type: ignore from ._models import TrackedResource # type: ignore from ._purview_management_client_enums import ( + CreatedByType, + LastModifiedByType, Name, ProvisioningState, PublicNetworkAccess, @@ -96,18 +98,16 @@ 'Account', 'AccountEndpoints', 'AccountList', + 'AccountProperties', 'AccountPropertiesEndpoints', 'AccountPropertiesManagedResources', + 'AccountPropertiesSystemData', 'AccountSku', 'AccountUpdateParameters', 'CheckNameAvailabilityRequest', 'CheckNameAvailabilityResult', 'CloudConnectors', 'DefaultAccountPayload', - 'DeletedAccount', - 'DeletedAccountList', - 'DeletedAccountProperties', - 'DeletedAccountPropertiesAutoGenerated', 'DimensionProperties', 'ErrorModel', 'ErrorResponseModel', @@ -125,9 +125,13 @@ 'PrivateEndpointConnectionList', 'PrivateLinkResource', 'PrivateLinkResourceList', + 'PrivateLinkResourceProperties', 'PrivateLinkServiceConnectionState', 'ProxyResource', + 'SystemData', 'TrackedResource', + 'CreatedByType', + 'LastModifiedByType', 'Name', 'ProvisioningState', 'PublicNetworkAccess', diff --git a/sdk/purview/azure-mgmt-purview/azure/mgmt/purview/models/_models.py b/sdk/purview/azure-mgmt-purview/azure/mgmt/purview/models/_models.py index 9e52cf2abfb5..f7c742618d68 100644 --- a/sdk/purview/azure-mgmt-purview/azure/mgmt/purview/models/_models.py +++ b/sdk/purview/azure-mgmt-purview/azure/mgmt/purview/models/_models.py @@ -109,11 +109,13 @@ class Account(TrackedResource): :ivar created_by_object_id: Gets the creators of the entity's object id. :vartype created_by_object_id: str :ivar endpoints: The URIs that are the public endpoints of the account. - :vartype endpoints: ~azure.mgmt.purview.models.AccountEndpoints + :vartype endpoints: ~azure.mgmt.purview.models.AccountPropertiesEndpoints :ivar friendly_name: Gets or sets the friendly name. :vartype friendly_name: str + :param managed_resource_group_name: Gets or sets the managed resource group name. + :type managed_resource_group_name: str :ivar managed_resources: Gets the resource identifiers of the managed resources. - :vartype managed_resources: ~azure.mgmt.purview.models.ManagedResources + :vartype managed_resources: ~azure.mgmt.purview.models.AccountPropertiesManagedResources :ivar private_endpoint_connections: Gets the private endpoint connections information. :vartype private_endpoint_connections: list[~azure.mgmt.purview.models.PrivateEndpointConnection] @@ -122,8 +124,10 @@ class Account(TrackedResource): "Succeeded". :vartype provisioning_state: str or ~azure.mgmt.purview.models.ProvisioningState :param public_network_access: Gets or sets the public network access. Possible values include: - "NotSpecified", "Enabled", "Disabled". + "NotSpecified", "Enabled", "Disabled". Default value: "Enabled". :type public_network_access: str or ~azure.mgmt.purview.models.PublicNetworkAccess + :ivar system_data: Metadata pertaining to creation and last modification of the resource. + :vartype system_data: ~azure.mgmt.purview.models.AccountPropertiesSystemData """ _validation = { @@ -138,6 +142,7 @@ class Account(TrackedResource): 'managed_resources': {'readonly': True}, 'private_endpoint_connections': {'readonly': True}, 'provisioning_state': {'readonly': True}, + 'system_data': {'readonly': True}, } _attribute_map = { @@ -152,12 +157,14 @@ class Account(TrackedResource): 'created_at': {'key': 'properties.createdAt', 'type': 'iso-8601'}, 'created_by': {'key': 'properties.createdBy', 'type': 'str'}, 'created_by_object_id': {'key': 'properties.createdByObjectId', 'type': 'str'}, - 'endpoints': {'key': 'properties.endpoints', 'type': 'AccountEndpoints'}, + 'endpoints': {'key': 'properties.endpoints', 'type': 'AccountPropertiesEndpoints'}, 'friendly_name': {'key': 'properties.friendlyName', 'type': 'str'}, - 'managed_resources': {'key': 'properties.managedResources', 'type': 'ManagedResources'}, + 'managed_resource_group_name': {'key': 'properties.managedResourceGroupName', 'type': 'str'}, + 'managed_resources': {'key': 'properties.managedResources', 'type': 'AccountPropertiesManagedResources'}, 'private_endpoint_connections': {'key': 'properties.privateEndpointConnections', 'type': '[PrivateEndpointConnection]'}, 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, 'public_network_access': {'key': 'properties.publicNetworkAccess', 'type': 'str'}, + 'system_data': {'key': 'properties.systemData', 'type': 'AccountPropertiesSystemData'}, } def __init__( @@ -172,10 +179,12 @@ def __init__( self.created_by_object_id = None self.endpoints = None self.friendly_name = None + self.managed_resource_group_name = kwargs.get('managed_resource_group_name', None) self.managed_resources = None self.private_endpoint_connections = None self.provisioning_state = None - self.public_network_access = kwargs.get('public_network_access', None) + self.public_network_access = kwargs.get('public_network_access', "Enabled") + self.system_data = None class AccountEndpoints(msrest.serialization.Model): @@ -246,6 +255,88 @@ def __init__( self.value = kwargs['value'] +class AccountProperties(msrest.serialization.Model): + """The account properties. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param cloud_connectors: Cloud connectors. + External cloud identifier used as part of scanning configuration. + :type cloud_connectors: ~azure.mgmt.purview.models.CloudConnectors + :ivar created_at: Gets the time at which the entity was created. + :vartype created_at: ~datetime.datetime + :ivar created_by: Gets the creator of the entity. + :vartype created_by: str + :ivar created_by_object_id: Gets the creators of the entity's object id. + :vartype created_by_object_id: str + :ivar endpoints: The URIs that are the public endpoints of the account. + :vartype endpoints: ~azure.mgmt.purview.models.AccountPropertiesEndpoints + :ivar friendly_name: Gets or sets the friendly name. + :vartype friendly_name: str + :param managed_resource_group_name: Gets or sets the managed resource group name. + :type managed_resource_group_name: str + :ivar managed_resources: Gets the resource identifiers of the managed resources. + :vartype managed_resources: ~azure.mgmt.purview.models.AccountPropertiesManagedResources + :ivar private_endpoint_connections: Gets the private endpoint connections information. + :vartype private_endpoint_connections: + list[~azure.mgmt.purview.models.PrivateEndpointConnection] + :ivar provisioning_state: Gets or sets the state of the provisioning. Possible values include: + "Unknown", "Creating", "Moving", "Deleting", "SoftDeleting", "SoftDeleted", "Failed", + "Succeeded". + :vartype provisioning_state: str or ~azure.mgmt.purview.models.ProvisioningState + :param public_network_access: Gets or sets the public network access. Possible values include: + "NotSpecified", "Enabled", "Disabled". Default value: "Enabled". + :type public_network_access: str or ~azure.mgmt.purview.models.PublicNetworkAccess + :ivar system_data: Metadata pertaining to creation and last modification of the resource. + :vartype system_data: ~azure.mgmt.purview.models.AccountPropertiesSystemData + """ + + _validation = { + 'created_at': {'readonly': True}, + 'created_by': {'readonly': True}, + 'created_by_object_id': {'readonly': True}, + 'endpoints': {'readonly': True}, + 'friendly_name': {'readonly': True}, + 'managed_resources': {'readonly': True}, + 'private_endpoint_connections': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'system_data': {'readonly': True}, + } + + _attribute_map = { + 'cloud_connectors': {'key': 'cloudConnectors', 'type': 'CloudConnectors'}, + 'created_at': {'key': 'createdAt', 'type': 'iso-8601'}, + 'created_by': {'key': 'createdBy', 'type': 'str'}, + 'created_by_object_id': {'key': 'createdByObjectId', 'type': 'str'}, + 'endpoints': {'key': 'endpoints', 'type': 'AccountPropertiesEndpoints'}, + 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, + 'managed_resource_group_name': {'key': 'managedResourceGroupName', 'type': 'str'}, + 'managed_resources': {'key': 'managedResources', 'type': 'AccountPropertiesManagedResources'}, + 'private_endpoint_connections': {'key': 'privateEndpointConnections', 'type': '[PrivateEndpointConnection]'}, + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + 'public_network_access': {'key': 'publicNetworkAccess', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'AccountPropertiesSystemData'}, + } + + def __init__( + self, + **kwargs + ): + super(AccountProperties, self).__init__(**kwargs) + self.cloud_connectors = kwargs.get('cloud_connectors', None) + self.created_at = None + self.created_by = None + self.created_by_object_id = None + self.endpoints = None + self.friendly_name = None + self.managed_resource_group_name = kwargs.get('managed_resource_group_name', None) + self.managed_resources = None + self.private_endpoint_connections = None + self.provisioning_state = None + self.public_network_access = kwargs.get('public_network_access', "Enabled") + self.system_data = None + + class AccountPropertiesEndpoints(AccountEndpoints): """The URIs that are the public endpoints of the account. @@ -347,6 +438,104 @@ def __init__( super(AccountPropertiesManagedResources, self).__init__(**kwargs) +class SystemData(msrest.serialization.Model): + """Metadata pertaining to creation and last modification of the resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar created_at: The timestamp of resource creation (UTC). + :vartype created_at: ~datetime.datetime + :ivar created_by: The identity that created the resource. + :vartype created_by: str + :ivar created_by_type: The type of identity that created the resource. Possible values include: + "User", "Application", "ManagedIdentity", "Key". + :vartype created_by_type: str or ~azure.mgmt.purview.models.CreatedByType + :ivar last_modified_at: The timestamp of the last modification the resource (UTC). + :vartype last_modified_at: ~datetime.datetime + :ivar last_modified_by: The identity that last modified the resource. + :vartype last_modified_by: str + :ivar last_modified_by_type: The type of identity that last modified the resource. Possible + values include: "User", "Application", "ManagedIdentity", "Key". + :vartype last_modified_by_type: str or ~azure.mgmt.purview.models.LastModifiedByType + """ + + _validation = { + 'created_at': {'readonly': True}, + 'created_by': {'readonly': True}, + 'created_by_type': {'readonly': True}, + 'last_modified_at': {'readonly': True}, + 'last_modified_by': {'readonly': True}, + 'last_modified_by_type': {'readonly': True}, + } + + _attribute_map = { + 'created_at': {'key': 'createdAt', 'type': 'iso-8601'}, + 'created_by': {'key': 'createdBy', 'type': 'str'}, + 'created_by_type': {'key': 'createdByType', 'type': 'str'}, + 'last_modified_at': {'key': 'lastModifiedAt', 'type': 'iso-8601'}, + 'last_modified_by': {'key': 'lastModifiedBy', 'type': 'str'}, + 'last_modified_by_type': {'key': 'lastModifiedByType', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(SystemData, self).__init__(**kwargs) + self.created_at = None + self.created_by = None + self.created_by_type = None + self.last_modified_at = None + self.last_modified_by = None + self.last_modified_by_type = None + + +class AccountPropertiesSystemData(SystemData): + """Metadata pertaining to creation and last modification of the resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar created_at: The timestamp of resource creation (UTC). + :vartype created_at: ~datetime.datetime + :ivar created_by: The identity that created the resource. + :vartype created_by: str + :ivar created_by_type: The type of identity that created the resource. Possible values include: + "User", "Application", "ManagedIdentity", "Key". + :vartype created_by_type: str or ~azure.mgmt.purview.models.CreatedByType + :ivar last_modified_at: The timestamp of the last modification the resource (UTC). + :vartype last_modified_at: ~datetime.datetime + :ivar last_modified_by: The identity that last modified the resource. + :vartype last_modified_by: str + :ivar last_modified_by_type: The type of identity that last modified the resource. Possible + values include: "User", "Application", "ManagedIdentity", "Key". + :vartype last_modified_by_type: str or ~azure.mgmt.purview.models.LastModifiedByType + """ + + _validation = { + 'created_at': {'readonly': True}, + 'created_by': {'readonly': True}, + 'created_by_type': {'readonly': True}, + 'last_modified_at': {'readonly': True}, + 'last_modified_by': {'readonly': True}, + 'last_modified_by_type': {'readonly': True}, + } + + _attribute_map = { + 'created_at': {'key': 'createdAt', 'type': 'iso-8601'}, + 'created_by': {'key': 'createdBy', 'type': 'str'}, + 'created_by_type': {'key': 'createdByType', 'type': 'str'}, + 'last_modified_at': {'key': 'lastModifiedAt', 'type': 'iso-8601'}, + 'last_modified_by': {'key': 'lastModifiedBy', 'type': 'str'}, + 'last_modified_by_type': {'key': 'lastModifiedByType', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(AccountPropertiesSystemData, self).__init__(**kwargs) + + class AccountSku(msrest.serialization.Model): """The Sku. @@ -373,60 +562,15 @@ def __init__( class AccountUpdateParameters(msrest.serialization.Model): """The account update properties. - Variables are only populated by the server, and will be ignored when sending a request. - + :param properties: The account properties. + :type properties: ~azure.mgmt.purview.models.AccountProperties :param tags: A set of tags. Tags on the azure resource. :type tags: dict[str, str] - :param cloud_connectors: Cloud connectors. - External cloud identifier used as part of scanning configuration. - :type cloud_connectors: ~azure.mgmt.purview.models.CloudConnectors - :ivar created_at: Gets the time at which the entity was created. - :vartype created_at: ~datetime.datetime - :ivar created_by: Gets the creator of the entity. - :vartype created_by: str - :ivar created_by_object_id: Gets the creators of the entity's object id. - :vartype created_by_object_id: str - :ivar endpoints: The URIs that are the public endpoints of the account. - :vartype endpoints: ~azure.mgmt.purview.models.AccountEndpoints - :ivar friendly_name: Gets or sets the friendly name. - :vartype friendly_name: str - :ivar managed_resources: Gets the resource identifiers of the managed resources. - :vartype managed_resources: ~azure.mgmt.purview.models.ManagedResources - :ivar private_endpoint_connections: Gets the private endpoint connections information. - :vartype private_endpoint_connections: - list[~azure.mgmt.purview.models.PrivateEndpointConnection] - :ivar provisioning_state: Gets or sets the state of the provisioning. Possible values include: - "Unknown", "Creating", "Moving", "Deleting", "SoftDeleting", "SoftDeleted", "Failed", - "Succeeded". - :vartype provisioning_state: str or ~azure.mgmt.purview.models.ProvisioningState - :param public_network_access: Gets or sets the public network access. Possible values include: - "NotSpecified", "Enabled", "Disabled". - :type public_network_access: str or ~azure.mgmt.purview.models.PublicNetworkAccess """ - _validation = { - 'created_at': {'readonly': True}, - 'created_by': {'readonly': True}, - 'created_by_object_id': {'readonly': True}, - 'endpoints': {'readonly': True}, - 'friendly_name': {'readonly': True}, - 'managed_resources': {'readonly': True}, - 'private_endpoint_connections': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - } - _attribute_map = { + 'properties': {'key': 'properties', 'type': 'AccountProperties'}, 'tags': {'key': 'tags', 'type': '{str}'}, - 'cloud_connectors': {'key': 'properties.cloudConnectors', 'type': 'CloudConnectors'}, - 'created_at': {'key': 'properties.createdAt', 'type': 'iso-8601'}, - 'created_by': {'key': 'properties.createdBy', 'type': 'str'}, - 'created_by_object_id': {'key': 'properties.createdByObjectId', 'type': 'str'}, - 'endpoints': {'key': 'properties.endpoints', 'type': 'AccountEndpoints'}, - 'friendly_name': {'key': 'properties.friendlyName', 'type': 'str'}, - 'managed_resources': {'key': 'properties.managedResources', 'type': 'ManagedResources'}, - 'private_endpoint_connections': {'key': 'properties.privateEndpointConnections', 'type': '[PrivateEndpointConnection]'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'public_network_access': {'key': 'properties.publicNetworkAccess', 'type': 'str'}, } def __init__( @@ -434,17 +578,8 @@ def __init__( **kwargs ): super(AccountUpdateParameters, self).__init__(**kwargs) + self.properties = kwargs.get('properties', None) self.tags = kwargs.get('tags', None) - self.cloud_connectors = kwargs.get('cloud_connectors', None) - self.created_at = None - self.created_by = None - self.created_by_object_id = None - self.endpoints = None - self.friendly_name = None - self.managed_resources = None - self.private_endpoint_connections = None - self.provisioning_state = None - self.public_network_access = kwargs.get('public_network_access', None) class CheckNameAvailabilityRequest(msrest.serialization.Model): @@ -499,7 +634,7 @@ def __init__( class CloudConnectors(msrest.serialization.Model): - """Properties for configuring third party cloud connections. + """CloudConnectors. Variables are only populated by the server, and will be ignored when sending a request. @@ -564,230 +699,6 @@ def __init__( self.subscription_id = kwargs.get('subscription_id', None) -class ProxyResource(msrest.serialization.Model): - """Proxy Azure Resource. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar id: Gets or sets the identifier. - :vartype id: str - :ivar name: Gets or sets the name. - :vartype name: str - :ivar type: Gets or sets the type. - :vartype type: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(ProxyResource, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - - -class DeletedAccount(ProxyResource): - """Soft Deleted Account resource. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar id: Gets or sets the identifier. - :vartype id: str - :ivar name: Gets or sets the name. - :vartype name: str - :ivar type: Gets or sets the type. - :vartype type: str - :ivar account_id: Gets the account identifier associated with resource. - :vartype account_id: str - :ivar deleted_by: Gets the user identifier that deleted resource. - :vartype deleted_by: str - :ivar deletion_date: Gets the time at which the resource was soft deleted. - :vartype deletion_date: ~datetime.datetime - :ivar location: Gets the resource location. - :vartype location: str - :ivar scheduled_purge_date: Gets the scheduled purge datetime. - :vartype scheduled_purge_date: ~datetime.datetime - :ivar tags: A set of tags. Gets the account tags. - :vartype tags: dict[str, str] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'account_id': {'readonly': True}, - 'deleted_by': {'readonly': True}, - 'deletion_date': {'readonly': True}, - 'location': {'readonly': True}, - 'scheduled_purge_date': {'readonly': True}, - 'tags': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'account_id': {'key': 'properties.accountId', 'type': 'str'}, - 'deleted_by': {'key': 'properties.deletedBy', 'type': 'str'}, - 'deletion_date': {'key': 'properties.deletionDate', 'type': 'iso-8601'}, - 'location': {'key': 'properties.location', 'type': 'str'}, - 'scheduled_purge_date': {'key': 'properties.scheduledPurgeDate', 'type': 'iso-8601'}, - 'tags': {'key': 'properties.tags', 'type': '{str}'}, - } - - def __init__( - self, - **kwargs - ): - super(DeletedAccount, self).__init__(**kwargs) - self.account_id = None - self.deleted_by = None - self.deletion_date = None - self.location = None - self.scheduled_purge_date = None - self.tags = None - - -class DeletedAccountList(msrest.serialization.Model): - """Paged list of soft deleted account resources. - - All required parameters must be populated in order to send to Azure. - - :param count: Total item count. - :type count: long - :param next_link: The Url of next result page. - :type next_link: str - :param value: Required. Collection of items of type results. - :type value: list[~azure.mgmt.purview.models.DeletedAccount] - """ - - _validation = { - 'value': {'required': True}, - } - - _attribute_map = { - 'count': {'key': 'count', 'type': 'long'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'value': {'key': 'value', 'type': '[DeletedAccount]'}, - } - - def __init__( - self, - **kwargs - ): - super(DeletedAccountList, self).__init__(**kwargs) - self.count = kwargs.get('count', None) - self.next_link = kwargs.get('next_link', None) - self.value = kwargs['value'] - - -class DeletedAccountProperties(msrest.serialization.Model): - """The soft deleted account properties. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar account_id: Gets the account identifier associated with resource. - :vartype account_id: str - :ivar deleted_by: Gets the user identifier that deleted resource. - :vartype deleted_by: str - :ivar deletion_date: Gets the time at which the resource was soft deleted. - :vartype deletion_date: ~datetime.datetime - :ivar location: Gets the resource location. - :vartype location: str - :ivar scheduled_purge_date: Gets the scheduled purge datetime. - :vartype scheduled_purge_date: ~datetime.datetime - :ivar tags: A set of tags. Gets the account tags. - :vartype tags: dict[str, str] - """ - - _validation = { - 'account_id': {'readonly': True}, - 'deleted_by': {'readonly': True}, - 'deletion_date': {'readonly': True}, - 'location': {'readonly': True}, - 'scheduled_purge_date': {'readonly': True}, - 'tags': {'readonly': True}, - } - - _attribute_map = { - 'account_id': {'key': 'accountId', 'type': 'str'}, - 'deleted_by': {'key': 'deletedBy', 'type': 'str'}, - 'deletion_date': {'key': 'deletionDate', 'type': 'iso-8601'}, - 'location': {'key': 'location', 'type': 'str'}, - 'scheduled_purge_date': {'key': 'scheduledPurgeDate', 'type': 'iso-8601'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__( - self, - **kwargs - ): - super(DeletedAccountProperties, self).__init__(**kwargs) - self.account_id = None - self.deleted_by = None - self.deletion_date = None - self.location = None - self.scheduled_purge_date = None - self.tags = None - - -class DeletedAccountPropertiesAutoGenerated(DeletedAccountProperties): - """Gets or sets the properties. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar account_id: Gets the account identifier associated with resource. - :vartype account_id: str - :ivar deleted_by: Gets the user identifier that deleted resource. - :vartype deleted_by: str - :ivar deletion_date: Gets the time at which the resource was soft deleted. - :vartype deletion_date: ~datetime.datetime - :ivar location: Gets the resource location. - :vartype location: str - :ivar scheduled_purge_date: Gets the scheduled purge datetime. - :vartype scheduled_purge_date: ~datetime.datetime - :ivar tags: A set of tags. Gets the account tags. - :vartype tags: dict[str, str] - """ - - _validation = { - 'account_id': {'readonly': True}, - 'deleted_by': {'readonly': True}, - 'deletion_date': {'readonly': True}, - 'location': {'readonly': True}, - 'scheduled_purge_date': {'readonly': True}, - 'tags': {'readonly': True}, - } - - _attribute_map = { - 'account_id': {'key': 'accountId', 'type': 'str'}, - 'deleted_by': {'key': 'deletedBy', 'type': 'str'}, - 'deletion_date': {'key': 'deletionDate', 'type': 'iso-8601'}, - 'location': {'key': 'location', 'type': 'str'}, - 'scheduled_purge_date': {'key': 'scheduledPurgeDate', 'type': 'iso-8601'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__( - self, - **kwargs - ): - super(DeletedAccountPropertiesAutoGenerated, self).__init__(**kwargs) - - class DimensionProperties(msrest.serialization.Model): """properties for dimension. @@ -862,7 +773,7 @@ class ErrorResponseModel(msrest.serialization.Model): Variables are only populated by the server, and will be ignored when sending a request. :ivar error: Gets or sets the error. - :vartype error: ~azure.mgmt.purview.models.ErrorModel + :vartype error: ~azure.mgmt.purview.models.ErrorResponseModelError """ _validation = { @@ -870,7 +781,7 @@ class ErrorResponseModel(msrest.serialization.Model): } _attribute_map = { - 'error': {'key': 'error', 'type': 'ErrorModel'}, + 'error': {'key': 'error', 'type': 'ErrorResponseModelError'}, } def __init__( @@ -1185,6 +1096,41 @@ def __init__( self.id = kwargs.get('id', None) +class ProxyResource(msrest.serialization.Model): + """Proxy Azure Resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Gets or sets the identifier. + :vartype id: str + :ivar name: Gets or sets the name. + :vartype name: str + :ivar type: Gets or sets the type. + :vartype type: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ProxyResource, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + + class PrivateEndpointConnection(ProxyResource): """A private endpoint connection class. @@ -1264,42 +1210,33 @@ def __init__( self.value = kwargs['value'] -class PrivateLinkResource(ProxyResource): +class PrivateLinkResource(msrest.serialization.Model): """A privately linkable resource. Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: Gets or sets the identifier. + :ivar id: The private link resource identifier. :vartype id: str - :ivar name: Gets or sets the name. + :ivar name: The private link resource name. :vartype name: str - :ivar type: Gets or sets the type. + :ivar properties: The private link resource properties. + :vartype properties: ~azure.mgmt.purview.models.PrivateLinkResourceProperties + :ivar type: The private link resource type. :vartype type: str - :ivar group_id: The private link resource group identifier. - :vartype group_id: str - :ivar required_members: This translates to how many Private IPs should be created for each - privately linkable resource. - :vartype required_members: list[str] - :ivar required_zone_names: The required zone names for private link resource. - :vartype required_zone_names: list[str] """ _validation = { 'id': {'readonly': True}, 'name': {'readonly': True}, + 'properties': {'readonly': True}, 'type': {'readonly': True}, - 'group_id': {'readonly': True}, - 'required_members': {'readonly': True}, - 'required_zone_names': {'readonly': True}, } _attribute_map = { 'id': {'key': 'id', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'PrivateLinkResourceProperties'}, 'type': {'key': 'type', 'type': 'str'}, - 'group_id': {'key': 'properties.groupId', 'type': 'str'}, - 'required_members': {'key': 'properties.requiredMembers', 'type': '[str]'}, - 'required_zone_names': {'key': 'properties.requiredZoneNames', 'type': '[str]'}, } def __init__( @@ -1307,9 +1244,10 @@ def __init__( **kwargs ): super(PrivateLinkResource, self).__init__(**kwargs) - self.group_id = None - self.required_members = None - self.required_zone_names = None + self.id = None + self.name = None + self.properties = None + self.type = None class PrivateLinkResourceList(msrest.serialization.Model): @@ -1345,6 +1283,42 @@ def __init__( self.value = kwargs['value'] +class PrivateLinkResourceProperties(msrest.serialization.Model): + """A privately linkable resource properties. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar group_id: The private link resource group identifier. + :vartype group_id: str + :ivar required_members: This translates to how many Private IPs should be created for each + privately linkable resource. + :vartype required_members: list[str] + :ivar required_zone_names: The required zone names for private link resource. + :vartype required_zone_names: list[str] + """ + + _validation = { + 'group_id': {'readonly': True}, + 'required_members': {'readonly': True}, + 'required_zone_names': {'readonly': True}, + } + + _attribute_map = { + 'group_id': {'key': 'groupId', 'type': 'str'}, + 'required_members': {'key': 'requiredMembers', 'type': '[str]'}, + 'required_zone_names': {'key': 'requiredZoneNames', 'type': '[str]'}, + } + + def __init__( + self, + **kwargs + ): + super(PrivateLinkResourceProperties, self).__init__(**kwargs) + self.group_id = None + self.required_members = None + self.required_zone_names = None + + class PrivateLinkServiceConnectionState(msrest.serialization.Model): """The private link service connection state. diff --git a/sdk/purview/azure-mgmt-purview/azure/mgmt/purview/models/_models_py3.py b/sdk/purview/azure-mgmt-purview/azure/mgmt/purview/models/_models_py3.py index 43cbc94109bb..a59bdc6a9755 100644 --- a/sdk/purview/azure-mgmt-purview/azure/mgmt/purview/models/_models_py3.py +++ b/sdk/purview/azure-mgmt-purview/azure/mgmt/purview/models/_models_py3.py @@ -120,11 +120,13 @@ class Account(TrackedResource): :ivar created_by_object_id: Gets the creators of the entity's object id. :vartype created_by_object_id: str :ivar endpoints: The URIs that are the public endpoints of the account. - :vartype endpoints: ~azure.mgmt.purview.models.AccountEndpoints + :vartype endpoints: ~azure.mgmt.purview.models.AccountPropertiesEndpoints :ivar friendly_name: Gets or sets the friendly name. :vartype friendly_name: str + :param managed_resource_group_name: Gets or sets the managed resource group name. + :type managed_resource_group_name: str :ivar managed_resources: Gets the resource identifiers of the managed resources. - :vartype managed_resources: ~azure.mgmt.purview.models.ManagedResources + :vartype managed_resources: ~azure.mgmt.purview.models.AccountPropertiesManagedResources :ivar private_endpoint_connections: Gets the private endpoint connections information. :vartype private_endpoint_connections: list[~azure.mgmt.purview.models.PrivateEndpointConnection] @@ -133,8 +135,10 @@ class Account(TrackedResource): "Succeeded". :vartype provisioning_state: str or ~azure.mgmt.purview.models.ProvisioningState :param public_network_access: Gets or sets the public network access. Possible values include: - "NotSpecified", "Enabled", "Disabled". + "NotSpecified", "Enabled", "Disabled". Default value: "Enabled". :type public_network_access: str or ~azure.mgmt.purview.models.PublicNetworkAccess + :ivar system_data: Metadata pertaining to creation and last modification of the resource. + :vartype system_data: ~azure.mgmt.purview.models.AccountPropertiesSystemData """ _validation = { @@ -149,6 +153,7 @@ class Account(TrackedResource): 'managed_resources': {'readonly': True}, 'private_endpoint_connections': {'readonly': True}, 'provisioning_state': {'readonly': True}, + 'system_data': {'readonly': True}, } _attribute_map = { @@ -163,12 +168,14 @@ class Account(TrackedResource): 'created_at': {'key': 'properties.createdAt', 'type': 'iso-8601'}, 'created_by': {'key': 'properties.createdBy', 'type': 'str'}, 'created_by_object_id': {'key': 'properties.createdByObjectId', 'type': 'str'}, - 'endpoints': {'key': 'properties.endpoints', 'type': 'AccountEndpoints'}, + 'endpoints': {'key': 'properties.endpoints', 'type': 'AccountPropertiesEndpoints'}, 'friendly_name': {'key': 'properties.friendlyName', 'type': 'str'}, - 'managed_resources': {'key': 'properties.managedResources', 'type': 'ManagedResources'}, + 'managed_resource_group_name': {'key': 'properties.managedResourceGroupName', 'type': 'str'}, + 'managed_resources': {'key': 'properties.managedResources', 'type': 'AccountPropertiesManagedResources'}, 'private_endpoint_connections': {'key': 'properties.privateEndpointConnections', 'type': '[PrivateEndpointConnection]'}, 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, 'public_network_access': {'key': 'properties.publicNetworkAccess', 'type': 'str'}, + 'system_data': {'key': 'properties.systemData', 'type': 'AccountPropertiesSystemData'}, } def __init__( @@ -179,7 +186,8 @@ def __init__( tags: Optional[Dict[str, str]] = None, sku: Optional["AccountSku"] = None, cloud_connectors: Optional["CloudConnectors"] = None, - public_network_access: Optional[Union[str, "PublicNetworkAccess"]] = None, + managed_resource_group_name: Optional[str] = None, + public_network_access: Optional[Union[str, "PublicNetworkAccess"]] = "Enabled", **kwargs ): super(Account, self).__init__(identity=identity, location=location, tags=tags, **kwargs) @@ -190,10 +198,12 @@ def __init__( self.created_by_object_id = None self.endpoints = None self.friendly_name = None + self.managed_resource_group_name = managed_resource_group_name self.managed_resources = None self.private_endpoint_connections = None self.provisioning_state = None self.public_network_access = public_network_access + self.system_data = None class AccountEndpoints(msrest.serialization.Model): @@ -268,6 +278,92 @@ def __init__( self.value = value +class AccountProperties(msrest.serialization.Model): + """The account properties. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param cloud_connectors: Cloud connectors. + External cloud identifier used as part of scanning configuration. + :type cloud_connectors: ~azure.mgmt.purview.models.CloudConnectors + :ivar created_at: Gets the time at which the entity was created. + :vartype created_at: ~datetime.datetime + :ivar created_by: Gets the creator of the entity. + :vartype created_by: str + :ivar created_by_object_id: Gets the creators of the entity's object id. + :vartype created_by_object_id: str + :ivar endpoints: The URIs that are the public endpoints of the account. + :vartype endpoints: ~azure.mgmt.purview.models.AccountPropertiesEndpoints + :ivar friendly_name: Gets or sets the friendly name. + :vartype friendly_name: str + :param managed_resource_group_name: Gets or sets the managed resource group name. + :type managed_resource_group_name: str + :ivar managed_resources: Gets the resource identifiers of the managed resources. + :vartype managed_resources: ~azure.mgmt.purview.models.AccountPropertiesManagedResources + :ivar private_endpoint_connections: Gets the private endpoint connections information. + :vartype private_endpoint_connections: + list[~azure.mgmt.purview.models.PrivateEndpointConnection] + :ivar provisioning_state: Gets or sets the state of the provisioning. Possible values include: + "Unknown", "Creating", "Moving", "Deleting", "SoftDeleting", "SoftDeleted", "Failed", + "Succeeded". + :vartype provisioning_state: str or ~azure.mgmt.purview.models.ProvisioningState + :param public_network_access: Gets or sets the public network access. Possible values include: + "NotSpecified", "Enabled", "Disabled". Default value: "Enabled". + :type public_network_access: str or ~azure.mgmt.purview.models.PublicNetworkAccess + :ivar system_data: Metadata pertaining to creation and last modification of the resource. + :vartype system_data: ~azure.mgmt.purview.models.AccountPropertiesSystemData + """ + + _validation = { + 'created_at': {'readonly': True}, + 'created_by': {'readonly': True}, + 'created_by_object_id': {'readonly': True}, + 'endpoints': {'readonly': True}, + 'friendly_name': {'readonly': True}, + 'managed_resources': {'readonly': True}, + 'private_endpoint_connections': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'system_data': {'readonly': True}, + } + + _attribute_map = { + 'cloud_connectors': {'key': 'cloudConnectors', 'type': 'CloudConnectors'}, + 'created_at': {'key': 'createdAt', 'type': 'iso-8601'}, + 'created_by': {'key': 'createdBy', 'type': 'str'}, + 'created_by_object_id': {'key': 'createdByObjectId', 'type': 'str'}, + 'endpoints': {'key': 'endpoints', 'type': 'AccountPropertiesEndpoints'}, + 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, + 'managed_resource_group_name': {'key': 'managedResourceGroupName', 'type': 'str'}, + 'managed_resources': {'key': 'managedResources', 'type': 'AccountPropertiesManagedResources'}, + 'private_endpoint_connections': {'key': 'privateEndpointConnections', 'type': '[PrivateEndpointConnection]'}, + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + 'public_network_access': {'key': 'publicNetworkAccess', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'AccountPropertiesSystemData'}, + } + + def __init__( + self, + *, + cloud_connectors: Optional["CloudConnectors"] = None, + managed_resource_group_name: Optional[str] = None, + public_network_access: Optional[Union[str, "PublicNetworkAccess"]] = "Enabled", + **kwargs + ): + super(AccountProperties, self).__init__(**kwargs) + self.cloud_connectors = cloud_connectors + self.created_at = None + self.created_by = None + self.created_by_object_id = None + self.endpoints = None + self.friendly_name = None + self.managed_resource_group_name = managed_resource_group_name + self.managed_resources = None + self.private_endpoint_connections = None + self.provisioning_state = None + self.public_network_access = public_network_access + self.system_data = None + + class AccountPropertiesEndpoints(AccountEndpoints): """The URIs that are the public endpoints of the account. @@ -369,6 +465,104 @@ def __init__( super(AccountPropertiesManagedResources, self).__init__(**kwargs) +class SystemData(msrest.serialization.Model): + """Metadata pertaining to creation and last modification of the resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar created_at: The timestamp of resource creation (UTC). + :vartype created_at: ~datetime.datetime + :ivar created_by: The identity that created the resource. + :vartype created_by: str + :ivar created_by_type: The type of identity that created the resource. Possible values include: + "User", "Application", "ManagedIdentity", "Key". + :vartype created_by_type: str or ~azure.mgmt.purview.models.CreatedByType + :ivar last_modified_at: The timestamp of the last modification the resource (UTC). + :vartype last_modified_at: ~datetime.datetime + :ivar last_modified_by: The identity that last modified the resource. + :vartype last_modified_by: str + :ivar last_modified_by_type: The type of identity that last modified the resource. Possible + values include: "User", "Application", "ManagedIdentity", "Key". + :vartype last_modified_by_type: str or ~azure.mgmt.purview.models.LastModifiedByType + """ + + _validation = { + 'created_at': {'readonly': True}, + 'created_by': {'readonly': True}, + 'created_by_type': {'readonly': True}, + 'last_modified_at': {'readonly': True}, + 'last_modified_by': {'readonly': True}, + 'last_modified_by_type': {'readonly': True}, + } + + _attribute_map = { + 'created_at': {'key': 'createdAt', 'type': 'iso-8601'}, + 'created_by': {'key': 'createdBy', 'type': 'str'}, + 'created_by_type': {'key': 'createdByType', 'type': 'str'}, + 'last_modified_at': {'key': 'lastModifiedAt', 'type': 'iso-8601'}, + 'last_modified_by': {'key': 'lastModifiedBy', 'type': 'str'}, + 'last_modified_by_type': {'key': 'lastModifiedByType', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(SystemData, self).__init__(**kwargs) + self.created_at = None + self.created_by = None + self.created_by_type = None + self.last_modified_at = None + self.last_modified_by = None + self.last_modified_by_type = None + + +class AccountPropertiesSystemData(SystemData): + """Metadata pertaining to creation and last modification of the resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar created_at: The timestamp of resource creation (UTC). + :vartype created_at: ~datetime.datetime + :ivar created_by: The identity that created the resource. + :vartype created_by: str + :ivar created_by_type: The type of identity that created the resource. Possible values include: + "User", "Application", "ManagedIdentity", "Key". + :vartype created_by_type: str or ~azure.mgmt.purview.models.CreatedByType + :ivar last_modified_at: The timestamp of the last modification the resource (UTC). + :vartype last_modified_at: ~datetime.datetime + :ivar last_modified_by: The identity that last modified the resource. + :vartype last_modified_by: str + :ivar last_modified_by_type: The type of identity that last modified the resource. Possible + values include: "User", "Application", "ManagedIdentity", "Key". + :vartype last_modified_by_type: str or ~azure.mgmt.purview.models.LastModifiedByType + """ + + _validation = { + 'created_at': {'readonly': True}, + 'created_by': {'readonly': True}, + 'created_by_type': {'readonly': True}, + 'last_modified_at': {'readonly': True}, + 'last_modified_by': {'readonly': True}, + 'last_modified_by_type': {'readonly': True}, + } + + _attribute_map = { + 'created_at': {'key': 'createdAt', 'type': 'iso-8601'}, + 'created_by': {'key': 'createdBy', 'type': 'str'}, + 'created_by_type': {'key': 'createdByType', 'type': 'str'}, + 'last_modified_at': {'key': 'lastModifiedAt', 'type': 'iso-8601'}, + 'last_modified_by': {'key': 'lastModifiedBy', 'type': 'str'}, + 'last_modified_by_type': {'key': 'lastModifiedByType', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(AccountPropertiesSystemData, self).__init__(**kwargs) + + class AccountSku(msrest.serialization.Model): """The Sku. @@ -398,82 +592,27 @@ def __init__( class AccountUpdateParameters(msrest.serialization.Model): """The account update properties. - Variables are only populated by the server, and will be ignored when sending a request. - + :param properties: The account properties. + :type properties: ~azure.mgmt.purview.models.AccountProperties :param tags: A set of tags. Tags on the azure resource. :type tags: dict[str, str] - :param cloud_connectors: Cloud connectors. - External cloud identifier used as part of scanning configuration. - :type cloud_connectors: ~azure.mgmt.purview.models.CloudConnectors - :ivar created_at: Gets the time at which the entity was created. - :vartype created_at: ~datetime.datetime - :ivar created_by: Gets the creator of the entity. - :vartype created_by: str - :ivar created_by_object_id: Gets the creators of the entity's object id. - :vartype created_by_object_id: str - :ivar endpoints: The URIs that are the public endpoints of the account. - :vartype endpoints: ~azure.mgmt.purview.models.AccountEndpoints - :ivar friendly_name: Gets or sets the friendly name. - :vartype friendly_name: str - :ivar managed_resources: Gets the resource identifiers of the managed resources. - :vartype managed_resources: ~azure.mgmt.purview.models.ManagedResources - :ivar private_endpoint_connections: Gets the private endpoint connections information. - :vartype private_endpoint_connections: - list[~azure.mgmt.purview.models.PrivateEndpointConnection] - :ivar provisioning_state: Gets or sets the state of the provisioning. Possible values include: - "Unknown", "Creating", "Moving", "Deleting", "SoftDeleting", "SoftDeleted", "Failed", - "Succeeded". - :vartype provisioning_state: str or ~azure.mgmt.purview.models.ProvisioningState - :param public_network_access: Gets or sets the public network access. Possible values include: - "NotSpecified", "Enabled", "Disabled". - :type public_network_access: str or ~azure.mgmt.purview.models.PublicNetworkAccess """ - _validation = { - 'created_at': {'readonly': True}, - 'created_by': {'readonly': True}, - 'created_by_object_id': {'readonly': True}, - 'endpoints': {'readonly': True}, - 'friendly_name': {'readonly': True}, - 'managed_resources': {'readonly': True}, - 'private_endpoint_connections': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - } - _attribute_map = { + 'properties': {'key': 'properties', 'type': 'AccountProperties'}, 'tags': {'key': 'tags', 'type': '{str}'}, - 'cloud_connectors': {'key': 'properties.cloudConnectors', 'type': 'CloudConnectors'}, - 'created_at': {'key': 'properties.createdAt', 'type': 'iso-8601'}, - 'created_by': {'key': 'properties.createdBy', 'type': 'str'}, - 'created_by_object_id': {'key': 'properties.createdByObjectId', 'type': 'str'}, - 'endpoints': {'key': 'properties.endpoints', 'type': 'AccountEndpoints'}, - 'friendly_name': {'key': 'properties.friendlyName', 'type': 'str'}, - 'managed_resources': {'key': 'properties.managedResources', 'type': 'ManagedResources'}, - 'private_endpoint_connections': {'key': 'properties.privateEndpointConnections', 'type': '[PrivateEndpointConnection]'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'public_network_access': {'key': 'properties.publicNetworkAccess', 'type': 'str'}, } def __init__( self, *, + properties: Optional["AccountProperties"] = None, tags: Optional[Dict[str, str]] = None, - cloud_connectors: Optional["CloudConnectors"] = None, - public_network_access: Optional[Union[str, "PublicNetworkAccess"]] = None, **kwargs ): super(AccountUpdateParameters, self).__init__(**kwargs) + self.properties = properties self.tags = tags - self.cloud_connectors = cloud_connectors - self.created_at = None - self.created_by = None - self.created_by_object_id = None - self.endpoints = None - self.friendly_name = None - self.managed_resources = None - self.private_endpoint_connections = None - self.provisioning_state = None - self.public_network_access = public_network_access class CheckNameAvailabilityRequest(msrest.serialization.Model): @@ -535,7 +674,7 @@ def __init__( class CloudConnectors(msrest.serialization.Model): - """Properties for configuring third party cloud connections. + """CloudConnectors. Variables are only populated by the server, and will be ignored when sending a request. @@ -607,234 +746,6 @@ def __init__( self.subscription_id = subscription_id -class ProxyResource(msrest.serialization.Model): - """Proxy Azure Resource. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar id: Gets or sets the identifier. - :vartype id: str - :ivar name: Gets or sets the name. - :vartype name: str - :ivar type: Gets or sets the type. - :vartype type: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(ProxyResource, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - - -class DeletedAccount(ProxyResource): - """Soft Deleted Account resource. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar id: Gets or sets the identifier. - :vartype id: str - :ivar name: Gets or sets the name. - :vartype name: str - :ivar type: Gets or sets the type. - :vartype type: str - :ivar account_id: Gets the account identifier associated with resource. - :vartype account_id: str - :ivar deleted_by: Gets the user identifier that deleted resource. - :vartype deleted_by: str - :ivar deletion_date: Gets the time at which the resource was soft deleted. - :vartype deletion_date: ~datetime.datetime - :ivar location: Gets the resource location. - :vartype location: str - :ivar scheduled_purge_date: Gets the scheduled purge datetime. - :vartype scheduled_purge_date: ~datetime.datetime - :ivar tags: A set of tags. Gets the account tags. - :vartype tags: dict[str, str] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'account_id': {'readonly': True}, - 'deleted_by': {'readonly': True}, - 'deletion_date': {'readonly': True}, - 'location': {'readonly': True}, - 'scheduled_purge_date': {'readonly': True}, - 'tags': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'account_id': {'key': 'properties.accountId', 'type': 'str'}, - 'deleted_by': {'key': 'properties.deletedBy', 'type': 'str'}, - 'deletion_date': {'key': 'properties.deletionDate', 'type': 'iso-8601'}, - 'location': {'key': 'properties.location', 'type': 'str'}, - 'scheduled_purge_date': {'key': 'properties.scheduledPurgeDate', 'type': 'iso-8601'}, - 'tags': {'key': 'properties.tags', 'type': '{str}'}, - } - - def __init__( - self, - **kwargs - ): - super(DeletedAccount, self).__init__(**kwargs) - self.account_id = None - self.deleted_by = None - self.deletion_date = None - self.location = None - self.scheduled_purge_date = None - self.tags = None - - -class DeletedAccountList(msrest.serialization.Model): - """Paged list of soft deleted account resources. - - All required parameters must be populated in order to send to Azure. - - :param count: Total item count. - :type count: long - :param next_link: The Url of next result page. - :type next_link: str - :param value: Required. Collection of items of type results. - :type value: list[~azure.mgmt.purview.models.DeletedAccount] - """ - - _validation = { - 'value': {'required': True}, - } - - _attribute_map = { - 'count': {'key': 'count', 'type': 'long'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'value': {'key': 'value', 'type': '[DeletedAccount]'}, - } - - def __init__( - self, - *, - value: List["DeletedAccount"], - count: Optional[int] = None, - next_link: Optional[str] = None, - **kwargs - ): - super(DeletedAccountList, self).__init__(**kwargs) - self.count = count - self.next_link = next_link - self.value = value - - -class DeletedAccountProperties(msrest.serialization.Model): - """The soft deleted account properties. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar account_id: Gets the account identifier associated with resource. - :vartype account_id: str - :ivar deleted_by: Gets the user identifier that deleted resource. - :vartype deleted_by: str - :ivar deletion_date: Gets the time at which the resource was soft deleted. - :vartype deletion_date: ~datetime.datetime - :ivar location: Gets the resource location. - :vartype location: str - :ivar scheduled_purge_date: Gets the scheduled purge datetime. - :vartype scheduled_purge_date: ~datetime.datetime - :ivar tags: A set of tags. Gets the account tags. - :vartype tags: dict[str, str] - """ - - _validation = { - 'account_id': {'readonly': True}, - 'deleted_by': {'readonly': True}, - 'deletion_date': {'readonly': True}, - 'location': {'readonly': True}, - 'scheduled_purge_date': {'readonly': True}, - 'tags': {'readonly': True}, - } - - _attribute_map = { - 'account_id': {'key': 'accountId', 'type': 'str'}, - 'deleted_by': {'key': 'deletedBy', 'type': 'str'}, - 'deletion_date': {'key': 'deletionDate', 'type': 'iso-8601'}, - 'location': {'key': 'location', 'type': 'str'}, - 'scheduled_purge_date': {'key': 'scheduledPurgeDate', 'type': 'iso-8601'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__( - self, - **kwargs - ): - super(DeletedAccountProperties, self).__init__(**kwargs) - self.account_id = None - self.deleted_by = None - self.deletion_date = None - self.location = None - self.scheduled_purge_date = None - self.tags = None - - -class DeletedAccountPropertiesAutoGenerated(DeletedAccountProperties): - """Gets or sets the properties. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar account_id: Gets the account identifier associated with resource. - :vartype account_id: str - :ivar deleted_by: Gets the user identifier that deleted resource. - :vartype deleted_by: str - :ivar deletion_date: Gets the time at which the resource was soft deleted. - :vartype deletion_date: ~datetime.datetime - :ivar location: Gets the resource location. - :vartype location: str - :ivar scheduled_purge_date: Gets the scheduled purge datetime. - :vartype scheduled_purge_date: ~datetime.datetime - :ivar tags: A set of tags. Gets the account tags. - :vartype tags: dict[str, str] - """ - - _validation = { - 'account_id': {'readonly': True}, - 'deleted_by': {'readonly': True}, - 'deletion_date': {'readonly': True}, - 'location': {'readonly': True}, - 'scheduled_purge_date': {'readonly': True}, - 'tags': {'readonly': True}, - } - - _attribute_map = { - 'account_id': {'key': 'accountId', 'type': 'str'}, - 'deleted_by': {'key': 'deletedBy', 'type': 'str'}, - 'deletion_date': {'key': 'deletionDate', 'type': 'iso-8601'}, - 'location': {'key': 'location', 'type': 'str'}, - 'scheduled_purge_date': {'key': 'scheduledPurgeDate', 'type': 'iso-8601'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__( - self, - **kwargs - ): - super(DeletedAccountPropertiesAutoGenerated, self).__init__(**kwargs) - - class DimensionProperties(msrest.serialization.Model): """properties for dimension. @@ -913,7 +824,7 @@ class ErrorResponseModel(msrest.serialization.Model): Variables are only populated by the server, and will be ignored when sending a request. :ivar error: Gets or sets the error. - :vartype error: ~azure.mgmt.purview.models.ErrorModel + :vartype error: ~azure.mgmt.purview.models.ErrorResponseModelError """ _validation = { @@ -921,7 +832,7 @@ class ErrorResponseModel(msrest.serialization.Model): } _attribute_map = { - 'error': {'key': 'error', 'type': 'ErrorModel'}, + 'error': {'key': 'error', 'type': 'ErrorResponseModelError'}, } def __init__( @@ -1275,6 +1186,41 @@ def __init__( self.id = id +class ProxyResource(msrest.serialization.Model): + """Proxy Azure Resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Gets or sets the identifier. + :vartype id: str + :ivar name: Gets or sets the name. + :vartype name: str + :ivar type: Gets or sets the type. + :vartype type: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ProxyResource, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + + class PrivateEndpointConnection(ProxyResource): """A private endpoint connection class. @@ -1361,42 +1307,33 @@ def __init__( self.value = value -class PrivateLinkResource(ProxyResource): +class PrivateLinkResource(msrest.serialization.Model): """A privately linkable resource. Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: Gets or sets the identifier. + :ivar id: The private link resource identifier. :vartype id: str - :ivar name: Gets or sets the name. + :ivar name: The private link resource name. :vartype name: str - :ivar type: Gets or sets the type. + :ivar properties: The private link resource properties. + :vartype properties: ~azure.mgmt.purview.models.PrivateLinkResourceProperties + :ivar type: The private link resource type. :vartype type: str - :ivar group_id: The private link resource group identifier. - :vartype group_id: str - :ivar required_members: This translates to how many Private IPs should be created for each - privately linkable resource. - :vartype required_members: list[str] - :ivar required_zone_names: The required zone names for private link resource. - :vartype required_zone_names: list[str] """ _validation = { 'id': {'readonly': True}, 'name': {'readonly': True}, + 'properties': {'readonly': True}, 'type': {'readonly': True}, - 'group_id': {'readonly': True}, - 'required_members': {'readonly': True}, - 'required_zone_names': {'readonly': True}, } _attribute_map = { 'id': {'key': 'id', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'PrivateLinkResourceProperties'}, 'type': {'key': 'type', 'type': 'str'}, - 'group_id': {'key': 'properties.groupId', 'type': 'str'}, - 'required_members': {'key': 'properties.requiredMembers', 'type': '[str]'}, - 'required_zone_names': {'key': 'properties.requiredZoneNames', 'type': '[str]'}, } def __init__( @@ -1404,9 +1341,10 @@ def __init__( **kwargs ): super(PrivateLinkResource, self).__init__(**kwargs) - self.group_id = None - self.required_members = None - self.required_zone_names = None + self.id = None + self.name = None + self.properties = None + self.type = None class PrivateLinkResourceList(msrest.serialization.Model): @@ -1446,6 +1384,42 @@ def __init__( self.value = value +class PrivateLinkResourceProperties(msrest.serialization.Model): + """A privately linkable resource properties. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar group_id: The private link resource group identifier. + :vartype group_id: str + :ivar required_members: This translates to how many Private IPs should be created for each + privately linkable resource. + :vartype required_members: list[str] + :ivar required_zone_names: The required zone names for private link resource. + :vartype required_zone_names: list[str] + """ + + _validation = { + 'group_id': {'readonly': True}, + 'required_members': {'readonly': True}, + 'required_zone_names': {'readonly': True}, + } + + _attribute_map = { + 'group_id': {'key': 'groupId', 'type': 'str'}, + 'required_members': {'key': 'requiredMembers', 'type': '[str]'}, + 'required_zone_names': {'key': 'requiredZoneNames', 'type': '[str]'}, + } + + def __init__( + self, + **kwargs + ): + super(PrivateLinkResourceProperties, self).__init__(**kwargs) + self.group_id = None + self.required_members = None + self.required_zone_names = None + + class PrivateLinkServiceConnectionState(msrest.serialization.Model): """The private link service connection state. diff --git a/sdk/purview/azure-mgmt-purview/azure/mgmt/purview/models/_purview_management_client_enums.py b/sdk/purview/azure-mgmt-purview/azure/mgmt/purview/models/_purview_management_client_enums.py index 76998be29c9b..02dfd568a82c 100644 --- a/sdk/purview/azure-mgmt-purview/azure/mgmt/purview/models/_purview_management_client_enums.py +++ b/sdk/purview/azure-mgmt-purview/azure/mgmt/purview/models/_purview_management_client_enums.py @@ -26,6 +26,24 @@ def __getattr__(cls, name): raise AttributeError(name) +class CreatedByType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The type of identity that created the resource. + """ + + USER = "User" + APPLICATION = "Application" + MANAGED_IDENTITY = "ManagedIdentity" + KEY = "Key" + +class LastModifiedByType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The type of identity that last modified the resource. + """ + + USER = "User" + APPLICATION = "Application" + MANAGED_IDENTITY = "ManagedIdentity" + KEY = "Key" + class Name(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): """Gets or sets the sku name. """ @@ -61,6 +79,8 @@ class Reason(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): ALREADY_EXISTS = "AlreadyExists" class ScopeType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The scope where the default account is set. + """ TENANT = "Tenant" SUBSCRIPTION = "Subscription" diff --git a/sdk/purview/azure-mgmt-purview/azure/mgmt/purview/operations/_accounts_operations.py b/sdk/purview/azure-mgmt-purview/azure/mgmt/purview/operations/_accounts_operations.py index 480df79a5593..a10453b617a1 100644 --- a/sdk/purview/azure-mgmt-purview/azure/mgmt/purview/operations/_accounts_operations.py +++ b/sdk/purview/azure-mgmt-purview/azure/mgmt/purview/operations/_accounts_operations.py @@ -115,7 +115,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.ErrorResponseModel, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponseModel, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -190,7 +190,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.ErrorResponseModel, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponseModel, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -252,7 +252,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.ErrorResponseModel, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponseModel, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('Account', pipeline_response) @@ -307,7 +307,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.ErrorResponseModel, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponseModel, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -342,8 +342,8 @@ def begin_create_or_update( :type account: ~azure.mgmt.purview.models.Account :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either Account or the result of cls(response) @@ -434,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.ErrorResponseModel, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponseModel, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -459,8 +459,8 @@ def begin_delete( :type account_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either None or the result of cls(response) @@ -553,7 +553,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.ErrorResponseModel, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponseModel, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -588,8 +588,8 @@ def begin_update( :type account_update_parameters: ~azure.mgmt.purview.models.AccountUpdateParameters :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either Account or the result of cls(response) @@ -693,7 +693,7 @@ def list_keys( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponseModel, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponseModel, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('AccessKeys', pipeline_response) @@ -755,7 +755,7 @@ def check_name_availability( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponseModel, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponseModel, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('CheckNameAvailabilityResult', pipeline_response) diff --git a/sdk/purview/azure-mgmt-purview/azure/mgmt/purview/operations/_default_accounts_operations.py b/sdk/purview/azure-mgmt-purview/azure/mgmt/purview/operations/_default_accounts_operations.py index 213d47843ac5..19e7ee422007 100644 --- a/sdk/purview/azure-mgmt-purview/azure/mgmt/purview/operations/_default_accounts_operations.py +++ b/sdk/purview/azure-mgmt-purview/azure/mgmt/purview/operations/_default_accounts_operations.py @@ -97,7 +97,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.ErrorResponseModel, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponseModel, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('DefaultAccountPayload', pipeline_response) @@ -116,7 +116,7 @@ def set( # type: (...) -> "_models.DefaultAccountPayload" """Sets the default account for the scope. - Set the default account for the scope. + Sets the default account for the scope. :param default_account_payload: The payload containing the default account information and the scope. @@ -156,7 +156,7 @@ def set( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponseModel, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponseModel, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('DefaultAccountPayload', pipeline_response) @@ -177,7 +177,7 @@ def remove( # type: (...) -> None """Removes the default account from the scope. - Remove the default account from the scope. + Removes the default account from the scope. :param scope_tenant_id: The tenant ID. :type scope_tenant_id: str @@ -220,7 +220,7 @@ def remove( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponseModel, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponseModel, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: diff --git a/sdk/purview/azure-mgmt-purview/azure/mgmt/purview/operations/_operations.py b/sdk/purview/azure-mgmt-purview/azure/mgmt/purview/operations/_operations.py index fd7c0023bb2d..1beb4ced9c5d 100644 --- a/sdk/purview/azure-mgmt-purview/azure/mgmt/purview/operations/_operations.py +++ b/sdk/purview/azure-mgmt-purview/azure/mgmt/purview/operations/_operations.py @@ -100,7 +100,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.ErrorResponseModel, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponseModel, 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/purview/azure-mgmt-purview/azure/mgmt/purview/operations/_private_endpoint_connections_operations.py b/sdk/purview/azure-mgmt-purview/azure/mgmt/purview/operations/_private_endpoint_connections_operations.py index 948ad0930b3f..a4433861f013 100644 --- a/sdk/purview/azure-mgmt-purview/azure/mgmt/purview/operations/_private_endpoint_connections_operations.py +++ b/sdk/purview/azure-mgmt-purview/azure/mgmt/purview/operations/_private_endpoint_connections_operations.py @@ -119,7 +119,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.ErrorResponseModel, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponseModel, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -185,7 +185,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.ErrorResponseModel, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponseModel, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('PrivateEndpointConnection', pipeline_response) @@ -259,7 +259,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.ErrorResponseModel, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponseModel, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -314,7 +314,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.ErrorResponseModel, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponseModel, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -342,8 +342,8 @@ def begin_delete( :type private_endpoint_connection_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either None or the result of cls(response) diff --git a/sdk/purview/azure-mgmt-purview/azure/mgmt/purview/operations/_private_link_resources_operations.py b/sdk/purview/azure-mgmt-purview/azure/mgmt/purview/operations/_private_link_resources_operations.py index 60b056ce9031..fc4c90061e05 100644 --- a/sdk/purview/azure-mgmt-purview/azure/mgmt/purview/operations/_private_link_resources_operations.py +++ b/sdk/purview/azure-mgmt-purview/azure/mgmt/purview/operations/_private_link_resources_operations.py @@ -112,7 +112,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.ErrorResponseModel, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponseModel, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -178,7 +178,7 @@ def get_by_group_id( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponseModel, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponseModel, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('PrivateLinkResource', pipeline_response)