diff --git a/sdk/azure-mgmt-healthcareapis/azure/mgmt/healthcareapis/healthcare_apis_management_client.py b/sdk/azure-mgmt-healthcareapis/azure/mgmt/healthcareapis/healthcare_apis_management_client.py index 5a1712d2c4fb..c51f1ab6a385 100644 --- a/sdk/azure-mgmt-healthcareapis/azure/mgmt/healthcareapis/healthcare_apis_management_client.py +++ b/sdk/azure-mgmt-healthcareapis/azure/mgmt/healthcareapis/healthcare_apis_management_client.py @@ -16,7 +16,6 @@ from .operations.services_operations import ServicesOperations from .operations.operations import Operations from .operations.operation_results_operations import OperationResultsOperations -from .operations.move_resources_status_operations import MoveResourcesStatusOperations from . import models @@ -64,8 +63,6 @@ class HealthcareApisManagementClient(SDKClient): :vartype operations: azure.mgmt.healthcareapis.operations.Operations :ivar operation_results: OperationResults operations :vartype operation_results: azure.mgmt.healthcareapis.operations.OperationResultsOperations - :ivar move_resources_status: MoveResourcesStatus operations - :vartype move_resources_status: azure.mgmt.healthcareapis.operations.MoveResourcesStatusOperations :param credentials: Credentials needed for the client to connect to Azure. :type credentials: :mod:`A msrestazure Credentials @@ -92,5 +89,3 @@ def __init__( self._client, self.config, self._serialize, self._deserialize) self.operation_results = OperationResultsOperations( self._client, self.config, self._serialize, self._deserialize) - self.move_resources_status = MoveResourcesStatusOperations( - self._client, self.config, self._serialize, self._deserialize) diff --git a/sdk/azure-mgmt-healthcareapis/azure/mgmt/healthcareapis/models/__init__.py b/sdk/azure-mgmt-healthcareapis/azure/mgmt/healthcareapis/models/__init__.py index 7233ddf5c075..841c4d44f4f8 100644 --- a/sdk/azure-mgmt-healthcareapis/azure/mgmt/healthcareapis/models/__init__.py +++ b/sdk/azure-mgmt-healthcareapis/azure/mgmt/healthcareapis/models/__init__.py @@ -12,6 +12,8 @@ try: from .service_access_policy_entry_py3 import ServiceAccessPolicyEntry from .service_cosmos_db_configuration_info_py3 import ServiceCosmosDbConfigurationInfo + from .service_authentication_configuration_info_py3 import ServiceAuthenticationConfigurationInfo + from .service_cors_configuration_info_py3 import ServiceCorsConfigurationInfo from .services_properties_py3 import ServicesProperties from .services_description_py3 import ServicesDescription from .services_patch_description_py3 import ServicesPatchDescription @@ -22,11 +24,12 @@ from .operation_py3 import Operation from .check_name_availability_parameters_py3 import CheckNameAvailabilityParameters from .services_name_availability_info_py3 import ServicesNameAvailabilityInfo - from .move_resources_parameters_py3 import MoveResourcesParameters from .operation_results_description_py3 import OperationResultsDescription except (SyntaxError, ImportError): from .service_access_policy_entry import ServiceAccessPolicyEntry from .service_cosmos_db_configuration_info import ServiceCosmosDbConfigurationInfo + from .service_authentication_configuration_info import ServiceAuthenticationConfigurationInfo + from .service_cors_configuration_info import ServiceCorsConfigurationInfo from .services_properties import ServicesProperties from .services_description import ServicesDescription from .services_patch_description import ServicesPatchDescription @@ -37,7 +40,6 @@ from .operation import Operation from .check_name_availability_parameters import CheckNameAvailabilityParameters from .services_name_availability_info import ServicesNameAvailabilityInfo - from .move_resources_parameters import MoveResourcesParameters from .operation_results_description import OperationResultsDescription from .services_description_paged import ServicesDescriptionPaged from .operation_paged import OperationPaged @@ -50,6 +52,8 @@ __all__ = [ 'ServiceAccessPolicyEntry', 'ServiceCosmosDbConfigurationInfo', + 'ServiceAuthenticationConfigurationInfo', + 'ServiceCorsConfigurationInfo', 'ServicesProperties', 'ServicesDescription', 'ServicesPatchDescription', @@ -60,7 +64,6 @@ 'Operation', 'CheckNameAvailabilityParameters', 'ServicesNameAvailabilityInfo', - 'MoveResourcesParameters', 'OperationResultsDescription', 'ServicesDescriptionPaged', 'OperationPaged', diff --git a/sdk/azure-mgmt-healthcareapis/azure/mgmt/healthcareapis/models/move_resources_parameters.py b/sdk/azure-mgmt-healthcareapis/azure/mgmt/healthcareapis/models/move_resources_parameters.py deleted file mode 100644 index 0aa0a27f20d4..000000000000 --- a/sdk/azure-mgmt-healthcareapis/azure/mgmt/healthcareapis/models/move_resources_parameters.py +++ /dev/null @@ -1,46 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class MoveResourcesParameters(Model): - """Input values. - - All required parameters must be populated in order to send to Azure. - - :param target_subscription_id: Required. The target subscription to move - resources to. - :type target_subscription_id: str - :param target_resource_group_name: Required. The target resource group to - move resources to. - :type target_resource_group_name: str - :param resource_ids_to_move: Required. The list of resources to move. - :type resource_ids_to_move: list[str] - """ - - _validation = { - 'target_subscription_id': {'required': True}, - 'target_resource_group_name': {'required': True}, - 'resource_ids_to_move': {'required': True, 'max_items': 250, 'min_items': 1}, - } - - _attribute_map = { - 'target_subscription_id': {'key': 'targetSubscriptionId', 'type': 'str'}, - 'target_resource_group_name': {'key': 'targetResourceGroupName', 'type': 'str'}, - 'resource_ids_to_move': {'key': 'resourceIdsToMove', 'type': '[str]'}, - } - - def __init__(self, **kwargs): - super(MoveResourcesParameters, self).__init__(**kwargs) - self.target_subscription_id = kwargs.get('target_subscription_id', None) - self.target_resource_group_name = kwargs.get('target_resource_group_name', None) - self.resource_ids_to_move = kwargs.get('resource_ids_to_move', None) diff --git a/sdk/azure-mgmt-healthcareapis/azure/mgmt/healthcareapis/models/move_resources_parameters_py3.py b/sdk/azure-mgmt-healthcareapis/azure/mgmt/healthcareapis/models/move_resources_parameters_py3.py deleted file mode 100644 index dcf27bd7df97..000000000000 --- a/sdk/azure-mgmt-healthcareapis/azure/mgmt/healthcareapis/models/move_resources_parameters_py3.py +++ /dev/null @@ -1,46 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class MoveResourcesParameters(Model): - """Input values. - - All required parameters must be populated in order to send to Azure. - - :param target_subscription_id: Required. The target subscription to move - resources to. - :type target_subscription_id: str - :param target_resource_group_name: Required. The target resource group to - move resources to. - :type target_resource_group_name: str - :param resource_ids_to_move: Required. The list of resources to move. - :type resource_ids_to_move: list[str] - """ - - _validation = { - 'target_subscription_id': {'required': True}, - 'target_resource_group_name': {'required': True}, - 'resource_ids_to_move': {'required': True, 'max_items': 250, 'min_items': 1}, - } - - _attribute_map = { - 'target_subscription_id': {'key': 'targetSubscriptionId', 'type': 'str'}, - 'target_resource_group_name': {'key': 'targetResourceGroupName', 'type': 'str'}, - 'resource_ids_to_move': {'key': 'resourceIdsToMove', 'type': '[str]'}, - } - - def __init__(self, *, target_subscription_id: str, target_resource_group_name: str, resource_ids_to_move, **kwargs) -> None: - super(MoveResourcesParameters, self).__init__(**kwargs) - self.target_subscription_id = target_subscription_id - self.target_resource_group_name = target_resource_group_name - self.resource_ids_to_move = resource_ids_to_move diff --git a/sdk/azure-mgmt-healthcareapis/azure/mgmt/healthcareapis/models/service_authentication_configuration_info.py b/sdk/azure-mgmt-healthcareapis/azure/mgmt/healthcareapis/models/service_authentication_configuration_info.py new file mode 100644 index 000000000000..721c66ca2ee9 --- /dev/null +++ b/sdk/azure-mgmt-healthcareapis/azure/mgmt/healthcareapis/models/service_authentication_configuration_info.py @@ -0,0 +1,36 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ServiceAuthenticationConfigurationInfo(Model): + """Authentication configuration information. + + :param authority: The authority url for the service + :type authority: str + :param audience: The audience url for the service + :type audience: str + :param smart_proxy_enabled: If the SMART on FHIR proxy is enabled + :type smart_proxy_enabled: bool + """ + + _attribute_map = { + 'authority': {'key': 'authority', 'type': 'str'}, + 'audience': {'key': 'audience', 'type': 'str'}, + 'smart_proxy_enabled': {'key': 'smartProxyEnabled', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(ServiceAuthenticationConfigurationInfo, self).__init__(**kwargs) + self.authority = kwargs.get('authority', None) + self.audience = kwargs.get('audience', None) + self.smart_proxy_enabled = kwargs.get('smart_proxy_enabled', None) diff --git a/sdk/azure-mgmt-healthcareapis/azure/mgmt/healthcareapis/models/service_authentication_configuration_info_py3.py b/sdk/azure-mgmt-healthcareapis/azure/mgmt/healthcareapis/models/service_authentication_configuration_info_py3.py new file mode 100644 index 000000000000..740de5a5a362 --- /dev/null +++ b/sdk/azure-mgmt-healthcareapis/azure/mgmt/healthcareapis/models/service_authentication_configuration_info_py3.py @@ -0,0 +1,36 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ServiceAuthenticationConfigurationInfo(Model): + """Authentication configuration information. + + :param authority: The authority url for the service + :type authority: str + :param audience: The audience url for the service + :type audience: str + :param smart_proxy_enabled: If the SMART on FHIR proxy is enabled + :type smart_proxy_enabled: bool + """ + + _attribute_map = { + 'authority': {'key': 'authority', 'type': 'str'}, + 'audience': {'key': 'audience', 'type': 'str'}, + 'smart_proxy_enabled': {'key': 'smartProxyEnabled', 'type': 'bool'}, + } + + def __init__(self, *, authority: str=None, audience: str=None, smart_proxy_enabled: bool=None, **kwargs) -> None: + super(ServiceAuthenticationConfigurationInfo, self).__init__(**kwargs) + self.authority = authority + self.audience = audience + self.smart_proxy_enabled = smart_proxy_enabled diff --git a/sdk/azure-mgmt-healthcareapis/azure/mgmt/healthcareapis/models/service_cors_configuration_info.py b/sdk/azure-mgmt-healthcareapis/azure/mgmt/healthcareapis/models/service_cors_configuration_info.py new file mode 100644 index 000000000000..7e5dfc685d5e --- /dev/null +++ b/sdk/azure-mgmt-healthcareapis/azure/mgmt/healthcareapis/models/service_cors_configuration_info.py @@ -0,0 +1,48 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ServiceCorsConfigurationInfo(Model): + """The settings for the CORS configuration of the service instance. + + :param origins: The origins to be allowed via CORS. + :type origins: list[str] + :param headers: The headers to be allowed via CORS. + :type headers: list[str] + :param methods: The methods to be allowed via CORS. + :type methods: list[str] + :param max_age: The max age to be allowed via CORS. + :type max_age: int + :param allow_credentials: If credentials are allowed via CORS. + :type allow_credentials: bool + """ + + _validation = { + 'max_age': {'maximum': 99999, 'minimum': 0}, + } + + _attribute_map = { + 'origins': {'key': 'origins', 'type': '[str]'}, + 'headers': {'key': 'headers', 'type': '[str]'}, + 'methods': {'key': 'methods', 'type': '[str]'}, + 'max_age': {'key': 'maxAge', 'type': 'int'}, + 'allow_credentials': {'key': 'allowCredentials', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(ServiceCorsConfigurationInfo, self).__init__(**kwargs) + self.origins = kwargs.get('origins', None) + self.headers = kwargs.get('headers', None) + self.methods = kwargs.get('methods', None) + self.max_age = kwargs.get('max_age', None) + self.allow_credentials = kwargs.get('allow_credentials', None) diff --git a/sdk/azure-mgmt-healthcareapis/azure/mgmt/healthcareapis/models/service_cors_configuration_info_py3.py b/sdk/azure-mgmt-healthcareapis/azure/mgmt/healthcareapis/models/service_cors_configuration_info_py3.py new file mode 100644 index 000000000000..fade3e3057e6 --- /dev/null +++ b/sdk/azure-mgmt-healthcareapis/azure/mgmt/healthcareapis/models/service_cors_configuration_info_py3.py @@ -0,0 +1,48 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ServiceCorsConfigurationInfo(Model): + """The settings for the CORS configuration of the service instance. + + :param origins: The origins to be allowed via CORS. + :type origins: list[str] + :param headers: The headers to be allowed via CORS. + :type headers: list[str] + :param methods: The methods to be allowed via CORS. + :type methods: list[str] + :param max_age: The max age to be allowed via CORS. + :type max_age: int + :param allow_credentials: If credentials are allowed via CORS. + :type allow_credentials: bool + """ + + _validation = { + 'max_age': {'maximum': 99999, 'minimum': 0}, + } + + _attribute_map = { + 'origins': {'key': 'origins', 'type': '[str]'}, + 'headers': {'key': 'headers', 'type': '[str]'}, + 'methods': {'key': 'methods', 'type': '[str]'}, + 'max_age': {'key': 'maxAge', 'type': 'int'}, + 'allow_credentials': {'key': 'allowCredentials', 'type': 'bool'}, + } + + def __init__(self, *, origins=None, headers=None, methods=None, max_age: int=None, allow_credentials: bool=None, **kwargs) -> None: + super(ServiceCorsConfigurationInfo, self).__init__(**kwargs) + self.origins = origins + self.headers = headers + self.methods = methods + self.max_age = max_age + self.allow_credentials = allow_credentials diff --git a/sdk/azure-mgmt-healthcareapis/azure/mgmt/healthcareapis/models/service_cosmos_db_configuration_info.py b/sdk/azure-mgmt-healthcareapis/azure/mgmt/healthcareapis/models/service_cosmos_db_configuration_info.py index 37b064c1ed41..3e8d8c7b934a 100644 --- a/sdk/azure-mgmt-healthcareapis/azure/mgmt/healthcareapis/models/service_cosmos_db_configuration_info.py +++ b/sdk/azure-mgmt-healthcareapis/azure/mgmt/healthcareapis/models/service_cosmos_db_configuration_info.py @@ -20,6 +20,10 @@ class ServiceCosmosDbConfigurationInfo(Model): :type offer_throughput: int """ + _validation = { + 'offer_throughput': {'maximum': 10000, 'minimum': 400}, + } + _attribute_map = { 'offer_throughput': {'key': 'offerThroughput', 'type': 'int'}, } diff --git a/sdk/azure-mgmt-healthcareapis/azure/mgmt/healthcareapis/models/service_cosmos_db_configuration_info_py3.py b/sdk/azure-mgmt-healthcareapis/azure/mgmt/healthcareapis/models/service_cosmos_db_configuration_info_py3.py index 14045d5eb435..e1e63f8c8738 100644 --- a/sdk/azure-mgmt-healthcareapis/azure/mgmt/healthcareapis/models/service_cosmos_db_configuration_info_py3.py +++ b/sdk/azure-mgmt-healthcareapis/azure/mgmt/healthcareapis/models/service_cosmos_db_configuration_info_py3.py @@ -20,6 +20,10 @@ class ServiceCosmosDbConfigurationInfo(Model): :type offer_throughput: int """ + _validation = { + 'offer_throughput': {'maximum': 10000, 'minimum': 400}, + } + _attribute_map = { 'offer_throughput': {'key': 'offerThroughput', 'type': 'int'}, } diff --git a/sdk/azure-mgmt-healthcareapis/azure/mgmt/healthcareapis/models/services_properties.py b/sdk/azure-mgmt-healthcareapis/azure/mgmt/healthcareapis/models/services_properties.py index 38c37f9a1e2a..4c205093a6f9 100644 --- a/sdk/azure-mgmt-healthcareapis/azure/mgmt/healthcareapis/models/services_properties.py +++ b/sdk/azure-mgmt-healthcareapis/azure/mgmt/healthcareapis/models/services_properties.py @@ -33,6 +33,14 @@ class ServicesProperties(Model): backing the service. :type cosmos_db_configuration: ~azure.mgmt.healthcareapis.models.ServiceCosmosDbConfigurationInfo + :param authentication_configuration: The authentication configuration for + the service instance. + :type authentication_configuration: + ~azure.mgmt.healthcareapis.models.ServiceAuthenticationConfigurationInfo + :param cors_configuration: The settings for the CORS configuration of the + service instance. + :type cors_configuration: + ~azure.mgmt.healthcareapis.models.ServiceCorsConfigurationInfo """ _validation = { @@ -44,6 +52,8 @@ class ServicesProperties(Model): 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, 'access_policies': {'key': 'accessPolicies', 'type': '[ServiceAccessPolicyEntry]'}, 'cosmos_db_configuration': {'key': 'cosmosDbConfiguration', 'type': 'ServiceCosmosDbConfigurationInfo'}, + 'authentication_configuration': {'key': 'authenticationConfiguration', 'type': 'ServiceAuthenticationConfigurationInfo'}, + 'cors_configuration': {'key': 'corsConfiguration', 'type': 'ServiceCorsConfigurationInfo'}, } def __init__(self, **kwargs): @@ -51,3 +61,5 @@ def __init__(self, **kwargs): self.provisioning_state = None self.access_policies = kwargs.get('access_policies', None) self.cosmos_db_configuration = kwargs.get('cosmos_db_configuration', None) + self.authentication_configuration = kwargs.get('authentication_configuration', None) + self.cors_configuration = kwargs.get('cors_configuration', None) diff --git a/sdk/azure-mgmt-healthcareapis/azure/mgmt/healthcareapis/models/services_properties_py3.py b/sdk/azure-mgmt-healthcareapis/azure/mgmt/healthcareapis/models/services_properties_py3.py index caa5393f0db9..705ade3f144f 100644 --- a/sdk/azure-mgmt-healthcareapis/azure/mgmt/healthcareapis/models/services_properties_py3.py +++ b/sdk/azure-mgmt-healthcareapis/azure/mgmt/healthcareapis/models/services_properties_py3.py @@ -33,6 +33,14 @@ class ServicesProperties(Model): backing the service. :type cosmos_db_configuration: ~azure.mgmt.healthcareapis.models.ServiceCosmosDbConfigurationInfo + :param authentication_configuration: The authentication configuration for + the service instance. + :type authentication_configuration: + ~azure.mgmt.healthcareapis.models.ServiceAuthenticationConfigurationInfo + :param cors_configuration: The settings for the CORS configuration of the + service instance. + :type cors_configuration: + ~azure.mgmt.healthcareapis.models.ServiceCorsConfigurationInfo """ _validation = { @@ -44,10 +52,14 @@ class ServicesProperties(Model): 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, 'access_policies': {'key': 'accessPolicies', 'type': '[ServiceAccessPolicyEntry]'}, 'cosmos_db_configuration': {'key': 'cosmosDbConfiguration', 'type': 'ServiceCosmosDbConfigurationInfo'}, + 'authentication_configuration': {'key': 'authenticationConfiguration', 'type': 'ServiceAuthenticationConfigurationInfo'}, + 'cors_configuration': {'key': 'corsConfiguration', 'type': 'ServiceCorsConfigurationInfo'}, } - def __init__(self, *, access_policies, cosmos_db_configuration=None, **kwargs) -> None: + def __init__(self, *, access_policies, cosmos_db_configuration=None, authentication_configuration=None, cors_configuration=None, **kwargs) -> None: super(ServicesProperties, self).__init__(**kwargs) self.provisioning_state = None self.access_policies = access_policies self.cosmos_db_configuration = cosmos_db_configuration + self.authentication_configuration = authentication_configuration + self.cors_configuration = cors_configuration diff --git a/sdk/azure-mgmt-healthcareapis/azure/mgmt/healthcareapis/operations/__init__.py b/sdk/azure-mgmt-healthcareapis/azure/mgmt/healthcareapis/operations/__init__.py index 369ed00febe8..b4f9af1c3018 100644 --- a/sdk/azure-mgmt-healthcareapis/azure/mgmt/healthcareapis/operations/__init__.py +++ b/sdk/azure-mgmt-healthcareapis/azure/mgmt/healthcareapis/operations/__init__.py @@ -12,11 +12,9 @@ from .services_operations import ServicesOperations from .operations import Operations from .operation_results_operations import OperationResultsOperations -from .move_resources_status_operations import MoveResourcesStatusOperations __all__ = [ 'ServicesOperations', 'Operations', 'OperationResultsOperations', - 'MoveResourcesStatusOperations', ] diff --git a/sdk/azure-mgmt-healthcareapis/azure/mgmt/healthcareapis/operations/move_resources_status_operations.py b/sdk/azure-mgmt-healthcareapis/azure/mgmt/healthcareapis/operations/move_resources_status_operations.py deleted file mode 100644 index b832d238a0c3..000000000000 --- a/sdk/azure-mgmt-healthcareapis/azure/mgmt/healthcareapis/operations/move_resources_status_operations.py +++ /dev/null @@ -1,99 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse - -from .. import models - - -class MoveResourcesStatusOperations(object): - """MoveResourcesStatusOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: The version of the API. Constant value: "2018-08-20-preview". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2018-08-20-preview" - - self.config = config - - def get( - self, location_name, operation_result_id, custom_headers=None, raw=False, **operation_config): - """Get the operation result for a long running move operation. - - :param location_name: The location of the operation. - :type location_name: str - :param operation_result_id: The ID of the operation result to get. - :type operation_result_id: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: object or ClientRawResponse if raw=true - :rtype: object or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorDetailsException` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'locationName': self._serialize.url("location_name", location_name, 'str'), - 'operationResultId': self._serialize.url("operation_result_id", operation_result_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=10) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - raise models.ErrorDetailsException(self._deserialize, response) - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('OperationResultsDescription', response) - if response.status_code == 404: - deserialized = self._deserialize('ErrorDetails', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.HealthcareApis/locations/{locationName}/moveResourcesStatus/{operationResultId}'} diff --git a/sdk/azure-mgmt-healthcareapis/azure/mgmt/healthcareapis/operations/services_operations.py b/sdk/azure-mgmt-healthcareapis/azure/mgmt/healthcareapis/operations/services_operations.py index 18916ea3797c..52f62645b9c4 100644 --- a/sdk/azure-mgmt-healthcareapis/azure/mgmt/healthcareapis/operations/services_operations.py +++ b/sdk/azure-mgmt-healthcareapis/azure/mgmt/healthcareapis/operations/services_operations.py @@ -579,61 +579,3 @@ def check_name_availability( return deserialized check_name_availability.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.HealthcareApis/checkNameAvailability'} - - def move_resources( - self, resource_group_name, move_resources_inputs, custom_headers=None, raw=False, **operation_config): - """Moves resources to another subscription and/or resource group. - - :param resource_group_name: The name of the resource group that - contains the service instance. - :type resource_group_name: str - :param move_resources_inputs: Set the move resource structure to the - name of the service instance to check. - :type move_resources_inputs: - ~azure.mgmt.healthcareapis.models.MoveResourcesParameters - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorDetailsException` - """ - # Construct URL - url = self.move_resources.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=10) - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(move_resources_inputs, 'MoveResourcesParameters') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [202]: - raise models.ErrorDetailsException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - move_resources.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HealthcareApis/moveResources'}