From 2a51e912680a3c6d70edf00b470c05feb8cdfa14 Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Mon, 12 Apr 2021 09:18:51 +0000 Subject: [PATCH] CodeGen from PR 13884 in Azure/azure-rest-api-specs healthcareapis t2 config (#13884) --- .../azure-mgmt-healthcareapis/MANIFEST.in | 1 + .../azure-mgmt-healthcareapis/_meta.json | 8 + .../mgmt/healthcareapis/_configuration.py | 2 +- .../azure/mgmt/healthcareapis/_metadata.json | 113 ++++++++++ .../azure/mgmt/healthcareapis/_version.py | 3 +- .../mgmt/healthcareapis/aio/_configuration.py | 2 +- .../_operation_results_operations.py | 4 +- .../aio/operations/_operations.py | 4 +- ...private_endpoint_connections_operations.py | 60 ++--- .../_private_link_resources_operations.py | 28 +-- .../aio/operations/_services_operations.py | 40 ++-- .../mgmt/healthcareapis/models/__init__.py | 26 ++- ...healthcare_apis_management_client_enums.py | 9 + .../mgmt/healthcareapis/models/_models.py | 189 +++++++++++++++- .../mgmt/healthcareapis/models/_models_py3.py | 209 +++++++++++++++++- .../_operation_results_operations.py | 4 +- .../healthcareapis/operations/_operations.py | 4 +- ...private_endpoint_connections_operations.py | 60 ++--- .../_private_link_resources_operations.py | 28 +-- .../operations/_services_operations.py | 40 ++-- 20 files changed, 670 insertions(+), 164 deletions(-) create mode 100644 sdk/healthcareapis/azure-mgmt-healthcareapis/_meta.json create mode 100644 sdk/healthcareapis/azure-mgmt-healthcareapis/azure/mgmt/healthcareapis/_metadata.json diff --git a/sdk/healthcareapis/azure-mgmt-healthcareapis/MANIFEST.in b/sdk/healthcareapis/azure-mgmt-healthcareapis/MANIFEST.in index a3cb07df8765..3a9b6517412b 100644 --- a/sdk/healthcareapis/azure-mgmt-healthcareapis/MANIFEST.in +++ b/sdk/healthcareapis/azure-mgmt-healthcareapis/MANIFEST.in @@ -1,3 +1,4 @@ +include _meta.json recursive-include tests *.py *.yaml include *.md include azure/__init__.py diff --git a/sdk/healthcareapis/azure-mgmt-healthcareapis/_meta.json b/sdk/healthcareapis/azure-mgmt-healthcareapis/_meta.json new file mode 100644 index 000000000000..1dd8c52e49c7 --- /dev/null +++ b/sdk/healthcareapis/azure-mgmt-healthcareapis/_meta.json @@ -0,0 +1,8 @@ +{ + "autorest": "3.0.6369", + "use": "@autorest/python@5.6.2", + "commit": "273cebe601c137222c802504425047845d4be409", + "repository_url": "https://github.com/Azure/azure-rest-api-specs", + "autorest_command": "autorest specification/healthcareapis/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.6.2 --version=3.0.6369", + "readme": "specification/healthcareapis/resource-manager/readme.md" +} \ No newline at end of file diff --git a/sdk/healthcareapis/azure-mgmt-healthcareapis/azure/mgmt/healthcareapis/_configuration.py b/sdk/healthcareapis/azure-mgmt-healthcareapis/azure/mgmt/healthcareapis/_configuration.py index fe730d86035d..12a172be523d 100644 --- a/sdk/healthcareapis/azure-mgmt-healthcareapis/azure/mgmt/healthcareapis/_configuration.py +++ b/sdk/healthcareapis/azure-mgmt-healthcareapis/azure/mgmt/healthcareapis/_configuration.py @@ -48,7 +48,7 @@ def __init__( self.credential = credential self.subscription_id = subscription_id - self.api_version = "2020-03-30" + self.api_version = "2021-01-11" self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default']) kwargs.setdefault('sdk_moniker', 'mgmt-healthcareapis/{}'.format(VERSION)) self._configure(**kwargs) diff --git a/sdk/healthcareapis/azure-mgmt-healthcareapis/azure/mgmt/healthcareapis/_metadata.json b/sdk/healthcareapis/azure-mgmt-healthcareapis/azure/mgmt/healthcareapis/_metadata.json new file mode 100644 index 000000000000..90bc0f84324b --- /dev/null +++ b/sdk/healthcareapis/azure-mgmt-healthcareapis/azure/mgmt/healthcareapis/_metadata.json @@ -0,0 +1,113 @@ +{ + "chosen_version": "2021-01-11", + "total_api_version_list": ["2021-01-11"], + "client": { + "name": "HealthcareApisManagementClient", + "filename": "_healthcare_apis_management_client", + "description": "Azure Healthcare APIs Client.", + "base_url": "\u0027https://management.azure.com\u0027", + "custom_base_url": null, + "azure_arm": true, + "has_lro_operations": true, + "client_side_validation": false, + "sync_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"ARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"HealthcareApisManagementClientConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}}}", + "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\": [\"HealthcareApisManagementClientConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}}}" + }, + "global_parameters": { + "sync": { + "credential": { + "signature": "credential, # type: \"TokenCredential\"", + "description": "Credential needed for the client to connect to Azure.", + "docstring_type": "~azure.core.credentials.TokenCredential", + "required": true + }, + "subscription_id": { + "signature": "subscription_id, # type: str", + "description": "The subscription identifier.", + "docstring_type": "str", + "required": true + } + }, + "async": { + "credential": { + "signature": "credential: \"AsyncTokenCredential\",", + "description": "Credential needed for the client to connect to Azure.", + "docstring_type": "~azure.core.credentials_async.AsyncTokenCredential", + "required": true + }, + "subscription_id": { + "signature": "subscription_id: str,", + "description": "The subscription identifier.", + "docstring_type": "str", + "required": true + } + }, + "constant": { + }, + "call": "credential, subscription_id", + "service_client_specific": { + "sync": { + "api_version": { + "signature": "api_version=None, # type: Optional[str]", + "description": "API version to use if no profile is provided, or if missing in profile.", + "docstring_type": "str", + "required": false + }, + "base_url": { + "signature": "base_url=None, # type: Optional[str]", + "description": "Service URL", + "docstring_type": "str", + "required": false + }, + "profile": { + "signature": "profile=KnownProfiles.default, # type: KnownProfiles", + "description": "A profile definition, from KnownProfiles to dict.", + "docstring_type": "azure.profiles.KnownProfiles", + "required": false + } + }, + "async": { + "api_version": { + "signature": "api_version: Optional[str] = None,", + "description": "API version to use if no profile is provided, or if missing in profile.", + "docstring_type": "str", + "required": false + }, + "base_url": { + "signature": "base_url: Optional[str] = None,", + "description": "Service URL", + "docstring_type": "str", + "required": false + }, + "profile": { + "signature": "profile: KnownProfiles = KnownProfiles.default,", + "description": "A profile definition, from KnownProfiles to dict.", + "docstring_type": "azure.profiles.KnownProfiles", + "required": false + } + } + } + }, + "config": { + "credential": true, + "credential_scopes": ["https://management.azure.com/.default"], + "credential_default_policy_type": "BearerTokenCredentialPolicy", + "credential_default_policy_type_has_async_version": true, + "credential_key_header_name": null, + "sync_imports": "{\"regular\": {\"azurecore\": {\"azure.core.configuration\": [\"Configuration\"], \"azure.core.pipeline\": [\"policies\"], \"azure.mgmt.core.policies\": [\"ARMHttpLoggingPolicy\"]}, \"local\": {\"._version\": [\"VERSION\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\"]}}, \"typing\": {\"azurecore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}}", + "async_imports": "{\"regular\": {\"azurecore\": {\"azure.core.configuration\": [\"Configuration\"], \"azure.core.pipeline\": [\"policies\"], \"azure.mgmt.core.policies\": [\"ARMHttpLoggingPolicy\"]}, \"local\": {\".._version\": [\"VERSION\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\"]}}, \"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"]}}}" + }, + "operation_groups": { + "services": "ServicesOperations", + "operations": "Operations", + "operation_results": "OperationResultsOperations", + "private_endpoint_connections": "PrivateEndpointConnectionsOperations", + "private_link_resources": "PrivateLinkResourcesOperations" + }, + "operation_mixins": { + "sync_imports": "None", + "async_imports": "None", + "operations": { + } + } +} \ No newline at end of file diff --git a/sdk/healthcareapis/azure-mgmt-healthcareapis/azure/mgmt/healthcareapis/_version.py b/sdk/healthcareapis/azure-mgmt-healthcareapis/azure/mgmt/healthcareapis/_version.py index 515f51c112dd..eae7c95b6fbd 100644 --- a/sdk/healthcareapis/azure-mgmt-healthcareapis/azure/mgmt/healthcareapis/_version.py +++ b/sdk/healthcareapis/azure-mgmt-healthcareapis/azure/mgmt/healthcareapis/_version.py @@ -6,5 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "1.0.0b1" - +VERSION = "0.1.0" diff --git a/sdk/healthcareapis/azure-mgmt-healthcareapis/azure/mgmt/healthcareapis/aio/_configuration.py b/sdk/healthcareapis/azure-mgmt-healthcareapis/azure/mgmt/healthcareapis/aio/_configuration.py index 49431960c0d4..416b4d5c686d 100644 --- a/sdk/healthcareapis/azure-mgmt-healthcareapis/azure/mgmt/healthcareapis/aio/_configuration.py +++ b/sdk/healthcareapis/azure-mgmt-healthcareapis/azure/mgmt/healthcareapis/aio/_configuration.py @@ -45,7 +45,7 @@ def __init__( self.credential = credential self.subscription_id = subscription_id - self.api_version = "2020-03-30" + self.api_version = "2021-01-11" self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default']) kwargs.setdefault('sdk_moniker', 'mgmt-healthcareapis/{}'.format(VERSION)) self._configure(**kwargs) diff --git a/sdk/healthcareapis/azure-mgmt-healthcareapis/azure/mgmt/healthcareapis/aio/operations/_operation_results_operations.py b/sdk/healthcareapis/azure-mgmt-healthcareapis/azure/mgmt/healthcareapis/aio/operations/_operation_results_operations.py index 965f2f3199f0..2309354ff99a 100644 --- a/sdk/healthcareapis/azure-mgmt-healthcareapis/azure/mgmt/healthcareapis/aio/operations/_operation_results_operations.py +++ b/sdk/healthcareapis/azure-mgmt-healthcareapis/azure/mgmt/healthcareapis/aio/operations/_operation_results_operations.py @@ -62,7 +62,7 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-03-30" + api_version = "2021-01-11" accept = "application/json" # Construct URL @@ -88,7 +88,7 @@ async def get( if response.status_code not in [200, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorDetails, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorDetails, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: diff --git a/sdk/healthcareapis/azure-mgmt-healthcareapis/azure/mgmt/healthcareapis/aio/operations/_operations.py b/sdk/healthcareapis/azure-mgmt-healthcareapis/azure/mgmt/healthcareapis/aio/operations/_operations.py index d83e28f6c414..f2fd73309074 100644 --- a/sdk/healthcareapis/azure-mgmt-healthcareapis/azure/mgmt/healthcareapis/aio/operations/_operations.py +++ b/sdk/healthcareapis/azure-mgmt-healthcareapis/azure/mgmt/healthcareapis/aio/operations/_operations.py @@ -57,7 +57,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-03-30" + api_version = "2021-01-11" accept = "application/json" def prepare_request(next_link=None): @@ -93,7 +93,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.ErrorDetails, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorDetails, 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/healthcareapis/azure-mgmt-healthcareapis/azure/mgmt/healthcareapis/aio/operations/_private_endpoint_connections_operations.py b/sdk/healthcareapis/azure-mgmt-healthcareapis/azure/mgmt/healthcareapis/aio/operations/_private_endpoint_connections_operations.py index 5f74a513e84b..3a08dd779b9a 100644 --- a/sdk/healthcareapis/azure-mgmt-healthcareapis/azure/mgmt/healthcareapis/aio/operations/_private_endpoint_connections_operations.py +++ b/sdk/healthcareapis/azure-mgmt-healthcareapis/azure/mgmt/healthcareapis/aio/operations/_private_endpoint_connections_operations.py @@ -48,7 +48,7 @@ def list_by_service( resource_group_name: str, resource_name: str, **kwargs - ) -> AsyncIterable["_models.PrivateEndpointConnectionListResult"]: + ) -> AsyncIterable["_models.PrivateEndpointConnectionListResultDescription"]: """Lists all private endpoint connections for a service. :param resource_group_name: The name of the resource group that contains the service instance. @@ -56,16 +56,16 @@ def list_by_service( :param resource_name: The name of the service instance. :type resource_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either PrivateEndpointConnectionListResult or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.healthcareapis.models.PrivateEndpointConnectionListResult] + :return: An iterator like instance of either PrivateEndpointConnectionListResultDescription or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.healthcareapis.models.PrivateEndpointConnectionListResultDescription] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateEndpointConnectionListResult"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateEndpointConnectionListResultDescription"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-03-30" + api_version = "2021-01-11" accept = "application/json" def prepare_request(next_link=None): @@ -94,7 +94,7 @@ def prepare_request(next_link=None): return request async def extract_data(pipeline_response): - deserialized = self._deserialize('PrivateEndpointConnectionListResult', pipeline_response) + deserialized = self._deserialize('PrivateEndpointConnectionListResultDescription', pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) @@ -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.ErrorDetails, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorDetails, 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( resource_name: str, private_endpoint_connection_name: str, **kwargs - ) -> "_models.PrivateEndpointConnection": + ) -> "_models.PrivateEndpointConnectionDescription": """Gets the specified private endpoint connection associated with the service. :param resource_group_name: The name of the resource group that contains the service instance. @@ -135,16 +135,16 @@ async def get( with the Azure resource. :type private_endpoint_connection_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: PrivateEndpointConnection, or the result of cls(response) - :rtype: ~azure.mgmt.healthcareapis.models.PrivateEndpointConnection + :return: PrivateEndpointConnectionDescription, or the result of cls(response) + :rtype: ~azure.mgmt.healthcareapis.models.PrivateEndpointConnectionDescription :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateEndpointConnection"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateEndpointConnectionDescription"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-03-30" + api_version = "2021-01-11" accept = "application/json" # Construct URL @@ -171,10 +171,10 @@ 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.ErrorDetails, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorDetails, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = self._deserialize('PrivateEndpointConnection', pipeline_response) + deserialized = self._deserialize('PrivateEndpointConnectionDescription', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) @@ -189,13 +189,13 @@ async def _create_or_update_initial( private_endpoint_connection_name: str, properties: "_models.PrivateEndpointConnection", **kwargs - ) -> "_models.PrivateEndpointConnection": - cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateEndpointConnection"] + ) -> "_models.PrivateEndpointConnectionDescription": + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateEndpointConnectionDescription"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-03-30" + api_version = "2021-01-11" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -227,10 +227,10 @@ async def _create_or_update_initial( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorDetails, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorDetails, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = self._deserialize('PrivateEndpointConnection', pipeline_response) + deserialized = self._deserialize('PrivateEndpointConnectionDescription', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) @@ -245,7 +245,7 @@ async def begin_create_or_update( private_endpoint_connection_name: str, properties: "_models.PrivateEndpointConnection", **kwargs - ) -> AsyncLROPoller["_models.PrivateEndpointConnection"]: + ) -> AsyncLROPoller["_models.PrivateEndpointConnectionDescription"]: """Update the state of the specified private endpoint connection associated with the service. :param resource_group_name: The name of the resource group that contains the service instance. @@ -259,16 +259,16 @@ async def begin_create_or_update( :type properties: ~azure.mgmt.healthcareapis.models.PrivateEndpointConnection :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: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or 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 PrivateEndpointConnection or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.healthcareapis.models.PrivateEndpointConnection] + :return: An instance of AsyncLROPoller that returns either PrivateEndpointConnectionDescription or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.healthcareapis.models.PrivateEndpointConnectionDescription] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateEndpointConnection"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateEndpointConnectionDescription"] lro_delay = kwargs.pop( 'polling_interval', self._config.polling_interval @@ -288,7 +288,7 @@ async def begin_create_or_update( kwargs.pop('content_type', None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize('PrivateEndpointConnection', pipeline_response) + deserialized = self._deserialize('PrivateEndpointConnectionDescription', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) @@ -327,7 +327,7 @@ async def _delete_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-03-30" + api_version = "2021-01-11" accept = "application/json" # Construct URL @@ -354,7 +354,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.ErrorDetails, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorDetails, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -380,8 +380,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: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or 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/healthcareapis/azure-mgmt-healthcareapis/azure/mgmt/healthcareapis/aio/operations/_private_link_resources_operations.py b/sdk/healthcareapis/azure-mgmt-healthcareapis/azure/mgmt/healthcareapis/aio/operations/_private_link_resources_operations.py index 7bf42fbf504f..ebf1345a020c 100644 --- a/sdk/healthcareapis/azure-mgmt-healthcareapis/azure/mgmt/healthcareapis/aio/operations/_private_link_resources_operations.py +++ b/sdk/healthcareapis/azure-mgmt-healthcareapis/azure/mgmt/healthcareapis/aio/operations/_private_link_resources_operations.py @@ -45,7 +45,7 @@ async def list_by_service( resource_group_name: str, resource_name: str, **kwargs - ) -> "_models.PrivateLinkResourceListResult": + ) -> "_models.PrivateLinkResourceListResultDescription": """Gets the private link resources that need to be created for a service. :param resource_group_name: The name of the resource group that contains the service instance. @@ -53,16 +53,16 @@ async def list_by_service( :param resource_name: The name of the service instance. :type resource_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: PrivateLinkResourceListResult, or the result of cls(response) - :rtype: ~azure.mgmt.healthcareapis.models.PrivateLinkResourceListResult + :return: PrivateLinkResourceListResultDescription, or the result of cls(response) + :rtype: ~azure.mgmt.healthcareapis.models.PrivateLinkResourceListResultDescription :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateLinkResourceListResult"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateLinkResourceListResultDescription"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-03-30" + api_version = "2021-01-11" accept = "application/json" # Construct URL @@ -88,10 +88,10 @@ async def list_by_service( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorDetails, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorDetails, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = self._deserialize('PrivateLinkResourceListResult', pipeline_response) + deserialized = self._deserialize('PrivateLinkResourceListResultDescription', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) @@ -105,7 +105,7 @@ async def get( resource_name: str, group_name: str, **kwargs - ) -> "_models.PrivateLinkResource": + ) -> "_models.PrivateLinkResourceDescription": """Gets a private link resource that need to be created for a service. :param resource_group_name: The name of the resource group that contains the service instance. @@ -115,16 +115,16 @@ async def get( :param group_name: The name of the private link resource group. :type group_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: PrivateLinkResource, or the result of cls(response) - :rtype: ~azure.mgmt.healthcareapis.models.PrivateLinkResource + :return: PrivateLinkResourceDescription, or the result of cls(response) + :rtype: ~azure.mgmt.healthcareapis.models.PrivateLinkResourceDescription :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateLinkResource"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateLinkResourceDescription"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-03-30" + api_version = "2021-01-11" accept = "application/json" # Construct URL @@ -151,10 +151,10 @@ 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.ErrorDetails, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorDetails, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = self._deserialize('PrivateLinkResource', pipeline_response) + deserialized = self._deserialize('PrivateLinkResourceDescription', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) diff --git a/sdk/healthcareapis/azure-mgmt-healthcareapis/azure/mgmt/healthcareapis/aio/operations/_services_operations.py b/sdk/healthcareapis/azure-mgmt-healthcareapis/azure/mgmt/healthcareapis/aio/operations/_services_operations.py index 930d5b02429d..8d572d9027af 100644 --- a/sdk/healthcareapis/azure-mgmt-healthcareapis/azure/mgmt/healthcareapis/aio/operations/_services_operations.py +++ b/sdk/healthcareapis/azure-mgmt-healthcareapis/azure/mgmt/healthcareapis/aio/operations/_services_operations.py @@ -65,7 +65,7 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-03-30" + api_version = "2021-01-11" accept = "application/json" # Construct URL @@ -91,7 +91,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.ErrorDetails, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorDetails, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('ServicesDescription', pipeline_response) @@ -114,7 +114,7 @@ async def _create_or_update_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-03-30" + api_version = "2021-01-11" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -145,7 +145,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.ErrorDetails, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorDetails, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -177,8 +177,8 @@ async def begin_create_or_update( :type service_description: ~azure.mgmt.healthcareapis.models.ServicesDescription :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: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or 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 ServicesDescription or the result of cls(response) @@ -243,7 +243,7 @@ async def _update_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-03-30" + api_version = "2021-01-11" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -274,7 +274,7 @@ async def _update_initial( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorDetails, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorDetails, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('ServicesDescription', pipeline_response) @@ -302,8 +302,8 @@ async def begin_update( :type service_patch_description: ~azure.mgmt.healthcareapis.models.ServicesPatchDescription :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: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or 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 ServicesDescription or the result of cls(response) @@ -367,7 +367,7 @@ async def _delete_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-03-30" + api_version = "2021-01-11" accept = "application/json" # Construct URL @@ -393,7 +393,7 @@ async def _delete_initial( if response.status_code not in [202, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorDetails, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorDetails, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -415,8 +415,8 @@ async def begin_delete( :type resource_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: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or 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) @@ -481,7 +481,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-03-30" + api_version = "2021-01-11" accept = "application/json" def prepare_request(next_link=None): @@ -521,7 +521,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.ErrorDetails, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorDetails, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -551,7 +551,7 @@ def list_by_resource_group( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-03-30" + api_version = "2021-01-11" accept = "application/json" def prepare_request(next_link=None): @@ -592,7 +592,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.ErrorDetails, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorDetails, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -623,7 +623,7 @@ async def check_name_availability( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-03-30" + api_version = "2021-01-11" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -652,7 +652,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.ErrorDetails, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorDetails, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('ServicesNameAvailabilityInfo', pipeline_response) diff --git a/sdk/healthcareapis/azure-mgmt-healthcareapis/azure/mgmt/healthcareapis/models/__init__.py b/sdk/healthcareapis/azure-mgmt-healthcareapis/azure/mgmt/healthcareapis/models/__init__.py index 7f173b923492..a6c01b942eb9 100644 --- a/sdk/healthcareapis/azure-mgmt-healthcareapis/azure/mgmt/healthcareapis/models/__init__.py +++ b/sdk/healthcareapis/azure-mgmt-healthcareapis/azure/mgmt/healthcareapis/models/__init__.py @@ -16,12 +16,15 @@ from ._models_py3 import OperationResultsDescription from ._models_py3 import PrivateEndpoint from ._models_py3 import PrivateEndpointConnection - from ._models_py3 import PrivateEndpointConnectionListResult + from ._models_py3 import PrivateEndpointConnectionDescription + from ._models_py3 import PrivateEndpointConnectionListResultDescription from ._models_py3 import PrivateLinkResource - from ._models_py3 import PrivateLinkResourceListResult + from ._models_py3 import PrivateLinkResourceDescription + from ._models_py3 import PrivateLinkResourceListResultDescription from ._models_py3 import PrivateLinkServiceConnectionState from ._models_py3 import Resource from ._models_py3 import ServiceAccessPolicyEntry + from ._models_py3 import ServiceAcrConfigurationInfo from ._models_py3 import ServiceAuthenticationConfigurationInfo from ._models_py3 import ServiceCorsConfigurationInfo from ._models_py3 import ServiceCosmosDbConfigurationInfo @@ -33,6 +36,7 @@ from ._models_py3 import ServicesProperties from ._models_py3 import ServicesResource from ._models_py3 import ServicesResourceIdentity + from ._models_py3 import SystemData except (SyntaxError, ImportError): from ._models import CheckNameAvailabilityParameters # type: ignore from ._models import ErrorDetails # type: ignore @@ -43,12 +47,15 @@ from ._models import OperationResultsDescription # type: ignore from ._models import PrivateEndpoint # type: ignore from ._models import PrivateEndpointConnection # type: ignore - from ._models import PrivateEndpointConnectionListResult # type: ignore + from ._models import PrivateEndpointConnectionDescription # type: ignore + from ._models import PrivateEndpointConnectionListResultDescription # type: ignore from ._models import PrivateLinkResource # type: ignore - from ._models import PrivateLinkResourceListResult # type: ignore + from ._models import PrivateLinkResourceDescription # type: ignore + from ._models import PrivateLinkResourceListResultDescription # type: ignore from ._models import PrivateLinkServiceConnectionState # type: ignore from ._models import Resource # type: ignore from ._models import ServiceAccessPolicyEntry # type: ignore + from ._models import ServiceAcrConfigurationInfo # type: ignore from ._models import ServiceAuthenticationConfigurationInfo # type: ignore from ._models import ServiceCorsConfigurationInfo # type: ignore from ._models import ServiceCosmosDbConfigurationInfo # type: ignore @@ -60,8 +67,10 @@ from ._models import ServicesProperties # type: ignore from ._models import ServicesResource # type: ignore from ._models import ServicesResourceIdentity # type: ignore + from ._models import SystemData # type: ignore from ._healthcare_apis_management_client_enums import ( + CreatedByType, Kind, ManagedServiceIdentityType, OperationResultStatus, @@ -82,12 +91,15 @@ 'OperationResultsDescription', 'PrivateEndpoint', 'PrivateEndpointConnection', - 'PrivateEndpointConnectionListResult', + 'PrivateEndpointConnectionDescription', + 'PrivateEndpointConnectionListResultDescription', 'PrivateLinkResource', - 'PrivateLinkResourceListResult', + 'PrivateLinkResourceDescription', + 'PrivateLinkResourceListResultDescription', 'PrivateLinkServiceConnectionState', 'Resource', 'ServiceAccessPolicyEntry', + 'ServiceAcrConfigurationInfo', 'ServiceAuthenticationConfigurationInfo', 'ServiceCorsConfigurationInfo', 'ServiceCosmosDbConfigurationInfo', @@ -99,6 +111,8 @@ 'ServicesProperties', 'ServicesResource', 'ServicesResourceIdentity', + 'SystemData', + 'CreatedByType', 'Kind', 'ManagedServiceIdentityType', 'OperationResultStatus', diff --git a/sdk/healthcareapis/azure-mgmt-healthcareapis/azure/mgmt/healthcareapis/models/_healthcare_apis_management_client_enums.py b/sdk/healthcareapis/azure-mgmt-healthcareapis/azure/mgmt/healthcareapis/models/_healthcare_apis_management_client_enums.py index c11bfd3cf544..0aacac2c32dd 100644 --- a/sdk/healthcareapis/azure-mgmt-healthcareapis/azure/mgmt/healthcareapis/models/_healthcare_apis_management_client_enums.py +++ b/sdk/healthcareapis/azure-mgmt-healthcareapis/azure/mgmt/healthcareapis/models/_healthcare_apis_management_client_enums.py @@ -26,6 +26,15 @@ 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 Kind(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): """The kind of the service. """ diff --git a/sdk/healthcareapis/azure-mgmt-healthcareapis/azure/mgmt/healthcareapis/models/_models.py b/sdk/healthcareapis/azure-mgmt-healthcareapis/azure/mgmt/healthcareapis/models/_models.py index 676788ca24d4..27922b1edca2 100644 --- a/sdk/healthcareapis/azure-mgmt-healthcareapis/azure/mgmt/healthcareapis/models/_models.py +++ b/sdk/healthcareapis/azure-mgmt-healthcareapis/azure/mgmt/healthcareapis/models/_models.py @@ -356,22 +356,75 @@ def __init__( self.provisioning_state = None -class PrivateEndpointConnectionListResult(msrest.serialization.Model): +class PrivateEndpointConnectionDescription(PrivateEndpointConnection): + """The Private Endpoint Connection resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :param private_endpoint: The resource of private end point. + :type private_endpoint: ~azure.mgmt.healthcareapis.models.PrivateEndpoint + :param private_link_service_connection_state: A collection of information about the state of + the connection between service consumer and provider. + :type private_link_service_connection_state: + ~azure.mgmt.healthcareapis.models.PrivateLinkServiceConnectionState + :ivar provisioning_state: The provisioning state of the private endpoint connection resource. + Possible values include: "Succeeded", "Creating", "Deleting", "Failed". + :vartype provisioning_state: str or + ~azure.mgmt.healthcareapis.models.PrivateEndpointConnectionProvisioningState + :ivar system_data: System metadata for this resource. + :vartype system_data: ~azure.mgmt.healthcareapis.models.SystemData + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'system_data': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'private_endpoint': {'key': 'properties.privateEndpoint', 'type': 'PrivateEndpoint'}, + 'private_link_service_connection_state': {'key': 'properties.privateLinkServiceConnectionState', 'type': 'PrivateLinkServiceConnectionState'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + } + + def __init__( + self, + **kwargs + ): + super(PrivateEndpointConnectionDescription, self).__init__(**kwargs) + self.system_data = None + + +class PrivateEndpointConnectionListResultDescription(msrest.serialization.Model): """List of private endpoint connection associated with the specified storage account. :param value: Array of private endpoint connections. - :type value: list[~azure.mgmt.healthcareapis.models.PrivateEndpointConnection] + :type value: list[~azure.mgmt.healthcareapis.models.PrivateEndpointConnectionDescription] """ _attribute_map = { - 'value': {'key': 'value', 'type': '[PrivateEndpointConnection]'}, + 'value': {'key': 'value', 'type': '[PrivateEndpointConnectionDescription]'}, } def __init__( self, **kwargs ): - super(PrivateEndpointConnectionListResult, self).__init__(**kwargs) + super(PrivateEndpointConnectionListResultDescription, self).__init__(**kwargs) self.value = kwargs.get('value', None) @@ -423,22 +476,72 @@ def __init__( self.required_zone_names = kwargs.get('required_zone_names', None) -class PrivateLinkResourceListResult(msrest.serialization.Model): +class PrivateLinkResourceDescription(PrivateLinkResource): + """The Private Endpoint Connection resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar group_id: The private link resource group id. + :vartype group_id: str + :ivar required_members: The private link resource required member names. + :vartype required_members: list[str] + :param required_zone_names: The private link resource Private link DNS zone name. + :type required_zone_names: list[str] + :ivar system_data: System metadata for this resource. + :vartype system_data: ~azure.mgmt.healthcareapis.models.SystemData + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'group_id': {'readonly': True}, + 'required_members': {'readonly': True}, + 'system_data': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + '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]'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + } + + def __init__( + self, + **kwargs + ): + super(PrivateLinkResourceDescription, self).__init__(**kwargs) + self.system_data = None + + +class PrivateLinkResourceListResultDescription(msrest.serialization.Model): """A list of private link resources. :param value: Array of private link resources. - :type value: list[~azure.mgmt.healthcareapis.models.PrivateLinkResource] + :type value: list[~azure.mgmt.healthcareapis.models.PrivateLinkResourceDescription] """ _attribute_map = { - 'value': {'key': 'value', 'type': '[PrivateLinkResource]'}, + 'value': {'key': 'value', 'type': '[PrivateLinkResourceDescription]'}, } def __init__( self, **kwargs ): - super(PrivateLinkResourceListResult, self).__init__(**kwargs) + super(PrivateLinkResourceListResultDescription, self).__init__(**kwargs) self.value = kwargs.get('value', None) @@ -497,6 +600,25 @@ def __init__( self.object_id = kwargs['object_id'] +class ServiceAcrConfigurationInfo(msrest.serialization.Model): + """Azure container registry configuration information. + + :param login_servers: The list of the ACR login servers. + :type login_servers: list[str] + """ + + _attribute_map = { + 'login_servers': {'key': 'loginServers', 'type': '[str]'}, + } + + def __init__( + self, + **kwargs + ): + super(ServiceAcrConfigurationInfo, self).__init__(**kwargs) + self.login_servers = kwargs.get('login_servers', None) + + class ServiceAuthenticationConfigurationInfo(msrest.serialization.Model): """Authentication configuration information. @@ -699,6 +821,8 @@ class ServicesDescription(ServicesResource): :type identity: ~azure.mgmt.healthcareapis.models.ServicesResourceIdentity :param properties: The common properties of a service. :type properties: ~azure.mgmt.healthcareapis.models.ServicesProperties + :ivar system_data: Metadata pertaining to creation and last modification of the resource. + :vartype system_data: ~azure.mgmt.healthcareapis.models.SystemData """ _validation = { @@ -707,6 +831,7 @@ class ServicesDescription(ServicesResource): 'type': {'readonly': True}, 'kind': {'required': True}, 'location': {'required': True}, + 'system_data': {'readonly': True}, } _attribute_map = { @@ -719,6 +844,7 @@ class ServicesDescription(ServicesResource): 'etag': {'key': 'etag', 'type': 'str'}, 'identity': {'key': 'identity', 'type': 'ServicesResourceIdentity'}, 'properties': {'key': 'properties', 'type': 'ServicesProperties'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, } def __init__( @@ -727,6 +853,7 @@ def __init__( ): super(ServicesDescription, self).__init__(**kwargs) self.properties = kwargs.get('properties', None) + self.system_data = None class ServicesDescriptionListResult(msrest.serialization.Model): @@ -839,6 +966,9 @@ class ServicesProperties(msrest.serialization.Model): :param public_network_access: Control permission for data plane traffic coming from public networks while private endpoint is enabled. Possible values include: "Enabled", "Disabled". :type public_network_access: str or ~azure.mgmt.healthcareapis.models.PublicNetworkAccess + :param acr_configuration: The azure container registry settings used for convert data operation + of the service instance. + :type acr_configuration: ~azure.mgmt.healthcareapis.models.ServiceAcrConfigurationInfo """ _validation = { @@ -854,6 +984,7 @@ class ServicesProperties(msrest.serialization.Model): 'export_configuration': {'key': 'exportConfiguration', 'type': 'ServiceExportConfigurationInfo'}, 'private_endpoint_connections': {'key': 'privateEndpointConnections', 'type': '[PrivateEndpointConnection]'}, 'public_network_access': {'key': 'publicNetworkAccess', 'type': 'str'}, + 'acr_configuration': {'key': 'acrConfiguration', 'type': 'ServiceAcrConfigurationInfo'}, } def __init__( @@ -869,6 +1000,7 @@ def __init__( self.export_configuration = kwargs.get('export_configuration', None) self.private_endpoint_connections = kwargs.get('private_endpoint_connections', None) self.public_network_access = kwargs.get('public_network_access', None) + self.acr_configuration = kwargs.get('acr_configuration', None) class ServicesResourceIdentity(msrest.serialization.Model): @@ -904,3 +1036,44 @@ def __init__( self.principal_id = None self.tenant_id = None self.type = kwargs.get('type', None) + + +class SystemData(msrest.serialization.Model): + """Metadata pertaining to creation and last modification of the resource. + + :param created_by: The identity that created the resource. + :type created_by: str + :param created_by_type: The type of identity that created the resource. Possible values + include: "User", "Application", "ManagedIdentity", "Key". + :type created_by_type: str or ~azure.mgmt.healthcareapis.models.CreatedByType + :param created_at: The timestamp of resource creation (UTC). + :type created_at: ~datetime.datetime + :param last_modified_by: The identity that last modified the resource. + :type last_modified_by: str + :param last_modified_by_type: The type of identity that last modified the resource. Possible + values include: "User", "Application", "ManagedIdentity", "Key". + :type last_modified_by_type: str or ~azure.mgmt.healthcareapis.models.CreatedByType + :param last_modified_at: The timestamp of resource last modification (UTC). + :type last_modified_at: ~datetime.datetime + """ + + _attribute_map = { + 'created_by': {'key': 'createdBy', 'type': 'str'}, + 'created_by_type': {'key': 'createdByType', 'type': 'str'}, + 'created_at': {'key': 'createdAt', 'type': 'iso-8601'}, + 'last_modified_by': {'key': 'lastModifiedBy', 'type': 'str'}, + 'last_modified_by_type': {'key': 'lastModifiedByType', 'type': 'str'}, + 'last_modified_at': {'key': 'lastModifiedAt', 'type': 'iso-8601'}, + } + + def __init__( + self, + **kwargs + ): + super(SystemData, self).__init__(**kwargs) + self.created_by = kwargs.get('created_by', None) + self.created_by_type = kwargs.get('created_by_type', None) + self.created_at = kwargs.get('created_at', None) + self.last_modified_by = kwargs.get('last_modified_by', None) + self.last_modified_by_type = kwargs.get('last_modified_by_type', None) + self.last_modified_at = kwargs.get('last_modified_at', None) diff --git a/sdk/healthcareapis/azure-mgmt-healthcareapis/azure/mgmt/healthcareapis/models/_models_py3.py b/sdk/healthcareapis/azure-mgmt-healthcareapis/azure/mgmt/healthcareapis/models/_models_py3.py index b525cb82e08f..3c80dbdd29bf 100644 --- a/sdk/healthcareapis/azure-mgmt-healthcareapis/azure/mgmt/healthcareapis/models/_models_py3.py +++ b/sdk/healthcareapis/azure-mgmt-healthcareapis/azure/mgmt/healthcareapis/models/_models_py3.py @@ -6,6 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +import datetime from typing import Dict, List, Optional, Union from azure.core.exceptions import HttpResponseError @@ -374,24 +375,80 @@ def __init__( self.provisioning_state = None -class PrivateEndpointConnectionListResult(msrest.serialization.Model): +class PrivateEndpointConnectionDescription(PrivateEndpointConnection): + """The Private Endpoint Connection resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :param private_endpoint: The resource of private end point. + :type private_endpoint: ~azure.mgmt.healthcareapis.models.PrivateEndpoint + :param private_link_service_connection_state: A collection of information about the state of + the connection between service consumer and provider. + :type private_link_service_connection_state: + ~azure.mgmt.healthcareapis.models.PrivateLinkServiceConnectionState + :ivar provisioning_state: The provisioning state of the private endpoint connection resource. + Possible values include: "Succeeded", "Creating", "Deleting", "Failed". + :vartype provisioning_state: str or + ~azure.mgmt.healthcareapis.models.PrivateEndpointConnectionProvisioningState + :ivar system_data: System metadata for this resource. + :vartype system_data: ~azure.mgmt.healthcareapis.models.SystemData + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'system_data': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'private_endpoint': {'key': 'properties.privateEndpoint', 'type': 'PrivateEndpoint'}, + 'private_link_service_connection_state': {'key': 'properties.privateLinkServiceConnectionState', 'type': 'PrivateLinkServiceConnectionState'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + } + + def __init__( + self, + *, + private_endpoint: Optional["PrivateEndpoint"] = None, + private_link_service_connection_state: Optional["PrivateLinkServiceConnectionState"] = None, + **kwargs + ): + super(PrivateEndpointConnectionDescription, self).__init__(private_endpoint=private_endpoint, private_link_service_connection_state=private_link_service_connection_state, **kwargs) + self.system_data = None + + +class PrivateEndpointConnectionListResultDescription(msrest.serialization.Model): """List of private endpoint connection associated with the specified storage account. :param value: Array of private endpoint connections. - :type value: list[~azure.mgmt.healthcareapis.models.PrivateEndpointConnection] + :type value: list[~azure.mgmt.healthcareapis.models.PrivateEndpointConnectionDescription] """ _attribute_map = { - 'value': {'key': 'value', 'type': '[PrivateEndpointConnection]'}, + 'value': {'key': 'value', 'type': '[PrivateEndpointConnectionDescription]'}, } def __init__( self, *, - value: Optional[List["PrivateEndpointConnection"]] = None, + value: Optional[List["PrivateEndpointConnectionDescription"]] = None, **kwargs ): - super(PrivateEndpointConnectionListResult, self).__init__(**kwargs) + super(PrivateEndpointConnectionListResultDescription, self).__init__(**kwargs) self.value = value @@ -445,24 +502,76 @@ def __init__( self.required_zone_names = required_zone_names -class PrivateLinkResourceListResult(msrest.serialization.Model): +class PrivateLinkResourceDescription(PrivateLinkResource): + """The Private Endpoint Connection resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar group_id: The private link resource group id. + :vartype group_id: str + :ivar required_members: The private link resource required member names. + :vartype required_members: list[str] + :param required_zone_names: The private link resource Private link DNS zone name. + :type required_zone_names: list[str] + :ivar system_data: System metadata for this resource. + :vartype system_data: ~azure.mgmt.healthcareapis.models.SystemData + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'group_id': {'readonly': True}, + 'required_members': {'readonly': True}, + 'system_data': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + '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]'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + } + + def __init__( + self, + *, + required_zone_names: Optional[List[str]] = None, + **kwargs + ): + super(PrivateLinkResourceDescription, self).__init__(required_zone_names=required_zone_names, **kwargs) + self.system_data = None + + +class PrivateLinkResourceListResultDescription(msrest.serialization.Model): """A list of private link resources. :param value: Array of private link resources. - :type value: list[~azure.mgmt.healthcareapis.models.PrivateLinkResource] + :type value: list[~azure.mgmt.healthcareapis.models.PrivateLinkResourceDescription] """ _attribute_map = { - 'value': {'key': 'value', 'type': '[PrivateLinkResource]'}, + 'value': {'key': 'value', 'type': '[PrivateLinkResourceDescription]'}, } def __init__( self, *, - value: Optional[List["PrivateLinkResource"]] = None, + value: Optional[List["PrivateLinkResourceDescription"]] = None, **kwargs ): - super(PrivateLinkResourceListResult, self).__init__(**kwargs) + super(PrivateLinkResourceListResultDescription, self).__init__(**kwargs) self.value = value @@ -527,6 +636,27 @@ def __init__( self.object_id = object_id +class ServiceAcrConfigurationInfo(msrest.serialization.Model): + """Azure container registry configuration information. + + :param login_servers: The list of the ACR login servers. + :type login_servers: list[str] + """ + + _attribute_map = { + 'login_servers': {'key': 'loginServers', 'type': '[str]'}, + } + + def __init__( + self, + *, + login_servers: Optional[List[str]] = None, + **kwargs + ): + super(ServiceAcrConfigurationInfo, self).__init__(**kwargs) + self.login_servers = login_servers + + class ServiceAuthenticationConfigurationInfo(msrest.serialization.Model): """Authentication configuration information. @@ -750,6 +880,8 @@ class ServicesDescription(ServicesResource): :type identity: ~azure.mgmt.healthcareapis.models.ServicesResourceIdentity :param properties: The common properties of a service. :type properties: ~azure.mgmt.healthcareapis.models.ServicesProperties + :ivar system_data: Metadata pertaining to creation and last modification of the resource. + :vartype system_data: ~azure.mgmt.healthcareapis.models.SystemData """ _validation = { @@ -758,6 +890,7 @@ class ServicesDescription(ServicesResource): 'type': {'readonly': True}, 'kind': {'required': True}, 'location': {'required': True}, + 'system_data': {'readonly': True}, } _attribute_map = { @@ -770,6 +903,7 @@ class ServicesDescription(ServicesResource): 'etag': {'key': 'etag', 'type': 'str'}, 'identity': {'key': 'identity', 'type': 'ServicesResourceIdentity'}, 'properties': {'key': 'properties', 'type': 'ServicesProperties'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, } def __init__( @@ -785,6 +919,7 @@ def __init__( ): super(ServicesDescription, self).__init__(kind=kind, location=location, tags=tags, etag=etag, identity=identity, **kwargs) self.properties = properties + self.system_data = None class ServicesDescriptionListResult(msrest.serialization.Model): @@ -905,6 +1040,9 @@ class ServicesProperties(msrest.serialization.Model): :param public_network_access: Control permission for data plane traffic coming from public networks while private endpoint is enabled. Possible values include: "Enabled", "Disabled". :type public_network_access: str or ~azure.mgmt.healthcareapis.models.PublicNetworkAccess + :param acr_configuration: The azure container registry settings used for convert data operation + of the service instance. + :type acr_configuration: ~azure.mgmt.healthcareapis.models.ServiceAcrConfigurationInfo """ _validation = { @@ -920,6 +1058,7 @@ class ServicesProperties(msrest.serialization.Model): 'export_configuration': {'key': 'exportConfiguration', 'type': 'ServiceExportConfigurationInfo'}, 'private_endpoint_connections': {'key': 'privateEndpointConnections', 'type': '[PrivateEndpointConnection]'}, 'public_network_access': {'key': 'publicNetworkAccess', 'type': 'str'}, + 'acr_configuration': {'key': 'acrConfiguration', 'type': 'ServiceAcrConfigurationInfo'}, } def __init__( @@ -932,6 +1071,7 @@ def __init__( export_configuration: Optional["ServiceExportConfigurationInfo"] = None, private_endpoint_connections: Optional[List["PrivateEndpointConnection"]] = None, public_network_access: Optional[Union[str, "PublicNetworkAccess"]] = None, + acr_configuration: Optional["ServiceAcrConfigurationInfo"] = None, **kwargs ): super(ServicesProperties, self).__init__(**kwargs) @@ -943,6 +1083,7 @@ def __init__( self.export_configuration = export_configuration self.private_endpoint_connections = private_endpoint_connections self.public_network_access = public_network_access + self.acr_configuration = acr_configuration class ServicesResourceIdentity(msrest.serialization.Model): @@ -980,3 +1121,51 @@ def __init__( self.principal_id = None self.tenant_id = None self.type = type + + +class SystemData(msrest.serialization.Model): + """Metadata pertaining to creation and last modification of the resource. + + :param created_by: The identity that created the resource. + :type created_by: str + :param created_by_type: The type of identity that created the resource. Possible values + include: "User", "Application", "ManagedIdentity", "Key". + :type created_by_type: str or ~azure.mgmt.healthcareapis.models.CreatedByType + :param created_at: The timestamp of resource creation (UTC). + :type created_at: ~datetime.datetime + :param last_modified_by: The identity that last modified the resource. + :type last_modified_by: str + :param last_modified_by_type: The type of identity that last modified the resource. Possible + values include: "User", "Application", "ManagedIdentity", "Key". + :type last_modified_by_type: str or ~azure.mgmt.healthcareapis.models.CreatedByType + :param last_modified_at: The timestamp of resource last modification (UTC). + :type last_modified_at: ~datetime.datetime + """ + + _attribute_map = { + 'created_by': {'key': 'createdBy', 'type': 'str'}, + 'created_by_type': {'key': 'createdByType', 'type': 'str'}, + 'created_at': {'key': 'createdAt', 'type': 'iso-8601'}, + 'last_modified_by': {'key': 'lastModifiedBy', 'type': 'str'}, + 'last_modified_by_type': {'key': 'lastModifiedByType', 'type': 'str'}, + 'last_modified_at': {'key': 'lastModifiedAt', 'type': 'iso-8601'}, + } + + def __init__( + self, + *, + created_by: Optional[str] = None, + created_by_type: Optional[Union[str, "CreatedByType"]] = None, + created_at: Optional[datetime.datetime] = None, + last_modified_by: Optional[str] = None, + last_modified_by_type: Optional[Union[str, "CreatedByType"]] = None, + last_modified_at: Optional[datetime.datetime] = None, + **kwargs + ): + super(SystemData, self).__init__(**kwargs) + self.created_by = created_by + self.created_by_type = created_by_type + self.created_at = created_at + self.last_modified_by = last_modified_by + self.last_modified_by_type = last_modified_by_type + self.last_modified_at = last_modified_at diff --git a/sdk/healthcareapis/azure-mgmt-healthcareapis/azure/mgmt/healthcareapis/operations/_operation_results_operations.py b/sdk/healthcareapis/azure-mgmt-healthcareapis/azure/mgmt/healthcareapis/operations/_operation_results_operations.py index 2fc5dcbe95bd..4205cc55042b 100644 --- a/sdk/healthcareapis/azure-mgmt-healthcareapis/azure/mgmt/healthcareapis/operations/_operation_results_operations.py +++ b/sdk/healthcareapis/azure-mgmt-healthcareapis/azure/mgmt/healthcareapis/operations/_operation_results_operations.py @@ -67,7 +67,7 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-03-30" + api_version = "2021-01-11" accept = "application/json" # Construct URL @@ -93,7 +93,7 @@ def get( if response.status_code not in [200, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorDetails, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorDetails, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: diff --git a/sdk/healthcareapis/azure-mgmt-healthcareapis/azure/mgmt/healthcareapis/operations/_operations.py b/sdk/healthcareapis/azure-mgmt-healthcareapis/azure/mgmt/healthcareapis/operations/_operations.py index f418924eb82e..1f68eb1936db 100644 --- a/sdk/healthcareapis/azure-mgmt-healthcareapis/azure/mgmt/healthcareapis/operations/_operations.py +++ b/sdk/healthcareapis/azure-mgmt-healthcareapis/azure/mgmt/healthcareapis/operations/_operations.py @@ -62,7 +62,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-03-30" + api_version = "2021-01-11" accept = "application/json" def prepare_request(next_link=None): @@ -98,7 +98,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.ErrorDetails, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorDetails, 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/healthcareapis/azure-mgmt-healthcareapis/azure/mgmt/healthcareapis/operations/_private_endpoint_connections_operations.py b/sdk/healthcareapis/azure-mgmt-healthcareapis/azure/mgmt/healthcareapis/operations/_private_endpoint_connections_operations.py index 8132b68c681e..e294f4dc3b03 100644 --- a/sdk/healthcareapis/azure-mgmt-healthcareapis/azure/mgmt/healthcareapis/operations/_private_endpoint_connections_operations.py +++ b/sdk/healthcareapis/azure-mgmt-healthcareapis/azure/mgmt/healthcareapis/operations/_private_endpoint_connections_operations.py @@ -53,7 +53,7 @@ def list_by_service( resource_name, # type: str **kwargs # type: Any ): - # type: (...) -> Iterable["_models.PrivateEndpointConnectionListResult"] + # type: (...) -> Iterable["_models.PrivateEndpointConnectionListResultDescription"] """Lists all private endpoint connections for a service. :param resource_group_name: The name of the resource group that contains the service instance. @@ -61,16 +61,16 @@ def list_by_service( :param resource_name: The name of the service instance. :type resource_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either PrivateEndpointConnectionListResult or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.healthcareapis.models.PrivateEndpointConnectionListResult] + :return: An iterator like instance of either PrivateEndpointConnectionListResultDescription or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.healthcareapis.models.PrivateEndpointConnectionListResultDescription] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateEndpointConnectionListResult"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateEndpointConnectionListResultDescription"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-03-30" + api_version = "2021-01-11" accept = "application/json" def prepare_request(next_link=None): @@ -99,7 +99,7 @@ def prepare_request(next_link=None): return request def extract_data(pipeline_response): - deserialized = self._deserialize('PrivateEndpointConnectionListResult', pipeline_response) + deserialized = self._deserialize('PrivateEndpointConnectionListResultDescription', pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) @@ -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.ErrorDetails, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorDetails, 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 @@ def get( private_endpoint_connection_name, # type: str **kwargs # type: Any ): - # type: (...) -> "_models.PrivateEndpointConnection" + # type: (...) -> "_models.PrivateEndpointConnectionDescription" """Gets the specified private endpoint connection associated with the service. :param resource_group_name: The name of the resource group that contains the service instance. @@ -141,16 +141,16 @@ def get( with the Azure resource. :type private_endpoint_connection_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: PrivateEndpointConnection, or the result of cls(response) - :rtype: ~azure.mgmt.healthcareapis.models.PrivateEndpointConnection + :return: PrivateEndpointConnectionDescription, or the result of cls(response) + :rtype: ~azure.mgmt.healthcareapis.models.PrivateEndpointConnectionDescription :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateEndpointConnection"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateEndpointConnectionDescription"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-03-30" + api_version = "2021-01-11" accept = "application/json" # Construct URL @@ -177,10 +177,10 @@ 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.ErrorDetails, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorDetails, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = self._deserialize('PrivateEndpointConnection', pipeline_response) + deserialized = self._deserialize('PrivateEndpointConnectionDescription', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) @@ -196,13 +196,13 @@ def _create_or_update_initial( properties, # type: "_models.PrivateEndpointConnection" **kwargs # type: Any ): - # type: (...) -> "_models.PrivateEndpointConnection" - cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateEndpointConnection"] + # type: (...) -> "_models.PrivateEndpointConnectionDescription" + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateEndpointConnectionDescription"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-03-30" + api_version = "2021-01-11" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -234,10 +234,10 @@ def _create_or_update_initial( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorDetails, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorDetails, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = self._deserialize('PrivateEndpointConnection', pipeline_response) + deserialized = self._deserialize('PrivateEndpointConnectionDescription', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) @@ -253,7 +253,7 @@ def begin_create_or_update( properties, # type: "_models.PrivateEndpointConnection" **kwargs # type: Any ): - # type: (...) -> LROPoller["_models.PrivateEndpointConnection"] + # type: (...) -> LROPoller["_models.PrivateEndpointConnectionDescription"] """Update the state of the specified private endpoint connection associated with the service. :param resource_group_name: The name of the resource group that contains the service instance. @@ -267,16 +267,16 @@ def begin_create_or_update( :type properties: ~azure.mgmt.healthcareapis.models.PrivateEndpointConnection :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: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or 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 PrivateEndpointConnection or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.healthcareapis.models.PrivateEndpointConnection] + :return: An instance of LROPoller that returns either PrivateEndpointConnectionDescription or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.healthcareapis.models.PrivateEndpointConnectionDescription] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateEndpointConnection"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateEndpointConnectionDescription"] lro_delay = kwargs.pop( 'polling_interval', self._config.polling_interval @@ -296,7 +296,7 @@ def begin_create_or_update( kwargs.pop('content_type', None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize('PrivateEndpointConnection', pipeline_response) + deserialized = self._deserialize('PrivateEndpointConnectionDescription', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) @@ -336,7 +336,7 @@ def _delete_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-03-30" + api_version = "2021-01-11" accept = "application/json" # Construct URL @@ -363,7 +363,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.ErrorDetails, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorDetails, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -390,8 +390,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: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or 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/healthcareapis/azure-mgmt-healthcareapis/azure/mgmt/healthcareapis/operations/_private_link_resources_operations.py b/sdk/healthcareapis/azure-mgmt-healthcareapis/azure/mgmt/healthcareapis/operations/_private_link_resources_operations.py index e490d5a45617..24c760337e9d 100644 --- a/sdk/healthcareapis/azure-mgmt-healthcareapis/azure/mgmt/healthcareapis/operations/_private_link_resources_operations.py +++ b/sdk/healthcareapis/azure-mgmt-healthcareapis/azure/mgmt/healthcareapis/operations/_private_link_resources_operations.py @@ -50,7 +50,7 @@ def list_by_service( resource_name, # type: str **kwargs # type: Any ): - # type: (...) -> "_models.PrivateLinkResourceListResult" + # type: (...) -> "_models.PrivateLinkResourceListResultDescription" """Gets the private link resources that need to be created for a service. :param resource_group_name: The name of the resource group that contains the service instance. @@ -58,16 +58,16 @@ def list_by_service( :param resource_name: The name of the service instance. :type resource_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: PrivateLinkResourceListResult, or the result of cls(response) - :rtype: ~azure.mgmt.healthcareapis.models.PrivateLinkResourceListResult + :return: PrivateLinkResourceListResultDescription, or the result of cls(response) + :rtype: ~azure.mgmt.healthcareapis.models.PrivateLinkResourceListResultDescription :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateLinkResourceListResult"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateLinkResourceListResultDescription"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-03-30" + api_version = "2021-01-11" accept = "application/json" # Construct URL @@ -93,10 +93,10 @@ def list_by_service( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorDetails, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorDetails, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = self._deserialize('PrivateLinkResourceListResult', pipeline_response) + deserialized = self._deserialize('PrivateLinkResourceListResultDescription', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) @@ -111,7 +111,7 @@ def get( group_name, # type: str **kwargs # type: Any ): - # type: (...) -> "_models.PrivateLinkResource" + # type: (...) -> "_models.PrivateLinkResourceDescription" """Gets a private link resource that need to be created for a service. :param resource_group_name: The name of the resource group that contains the service instance. @@ -121,16 +121,16 @@ def get( :param group_name: The name of the private link resource group. :type group_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: PrivateLinkResource, or the result of cls(response) - :rtype: ~azure.mgmt.healthcareapis.models.PrivateLinkResource + :return: PrivateLinkResourceDescription, or the result of cls(response) + :rtype: ~azure.mgmt.healthcareapis.models.PrivateLinkResourceDescription :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateLinkResource"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateLinkResourceDescription"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-03-30" + api_version = "2021-01-11" accept = "application/json" # Construct URL @@ -157,10 +157,10 @@ 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.ErrorDetails, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorDetails, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = self._deserialize('PrivateLinkResource', pipeline_response) + deserialized = self._deserialize('PrivateLinkResourceDescription', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) diff --git a/sdk/healthcareapis/azure-mgmt-healthcareapis/azure/mgmt/healthcareapis/operations/_services_operations.py b/sdk/healthcareapis/azure-mgmt-healthcareapis/azure/mgmt/healthcareapis/operations/_services_operations.py index f4301322dee3..ccf9f1793c7c 100644 --- a/sdk/healthcareapis/azure-mgmt-healthcareapis/azure/mgmt/healthcareapis/operations/_services_operations.py +++ b/sdk/healthcareapis/azure-mgmt-healthcareapis/azure/mgmt/healthcareapis/operations/_services_operations.py @@ -70,7 +70,7 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-03-30" + api_version = "2021-01-11" accept = "application/json" # Construct URL @@ -96,7 +96,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.ErrorDetails, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorDetails, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('ServicesDescription', pipeline_response) @@ -120,7 +120,7 @@ def _create_or_update_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-03-30" + api_version = "2021-01-11" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -151,7 +151,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.ErrorDetails, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorDetails, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -184,8 +184,8 @@ def begin_create_or_update( :type service_description: ~azure.mgmt.healthcareapis.models.ServicesDescription :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: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or 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 ServicesDescription or the result of cls(response) @@ -251,7 +251,7 @@ def _update_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-03-30" + api_version = "2021-01-11" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -282,7 +282,7 @@ def _update_initial( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorDetails, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorDetails, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('ServicesDescription', pipeline_response) @@ -311,8 +311,8 @@ def begin_update( :type service_patch_description: ~azure.mgmt.healthcareapis.models.ServicesPatchDescription :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: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or 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 ServicesDescription or the result of cls(response) @@ -377,7 +377,7 @@ def _delete_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-03-30" + api_version = "2021-01-11" accept = "application/json" # Construct URL @@ -403,7 +403,7 @@ def _delete_initial( if response.status_code not in [202, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorDetails, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorDetails, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -426,8 +426,8 @@ def begin_delete( :type resource_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: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or 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) @@ -493,7 +493,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-03-30" + api_version = "2021-01-11" accept = "application/json" def prepare_request(next_link=None): @@ -533,7 +533,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.ErrorDetails, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorDetails, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -564,7 +564,7 @@ def list_by_resource_group( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-03-30" + api_version = "2021-01-11" accept = "application/json" def prepare_request(next_link=None): @@ -605,7 +605,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.ErrorDetails, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorDetails, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -637,7 +637,7 @@ def check_name_availability( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-03-30" + api_version = "2021-01-11" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -666,7 +666,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.ErrorDetails, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorDetails, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('ServicesNameAvailabilityInfo', pipeline_response)