diff --git a/sdk/datamigration/azure-mgmt-datamigration/azure/mgmt/datamigration/_metadata.json b/sdk/datamigration/azure-mgmt-datamigration/azure/mgmt/datamigration/_metadata.json new file mode 100644 index 000000000000..f1599761d515 --- /dev/null +++ b/sdk/datamigration/azure-mgmt-datamigration/azure/mgmt/datamigration/_metadata.json @@ -0,0 +1,116 @@ +{ + "chosen_version": "2018-07-15-preview", + "total_api_version_list": ["2018-07-15-preview"], + "client": { + "name": "DataMigrationManagementClient", + "filename": "_data_migration_management_client", + "description": "Data Migration 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\": [\"DataMigrationManagementClientConfiguration\"]}}, \"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\": [\"DataMigrationManagementClientConfiguration\"]}}, \"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": "Identifier of the subscription.", + "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": "Identifier of the subscription.", + "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": { + "resource_skus": "ResourceSkusOperations", + "services": "ServicesOperations", + "tasks": "TasksOperations", + "service_tasks": "ServiceTasksOperations", + "projects": "ProjectsOperations", + "usages": "UsagesOperations", + "operations": "Operations", + "files": "FilesOperations" + }, + "operation_mixins": { + "sync_imports": "None", + "async_imports": "None", + "operations": { + } + } +} \ No newline at end of file diff --git a/sdk/datamigration/azure-mgmt-datamigration/azure/mgmt/datamigration/_version.py b/sdk/datamigration/azure-mgmt-datamigration/azure/mgmt/datamigration/_version.py index d1c75b3748a7..035146e99a22 100644 --- a/sdk/datamigration/azure-mgmt-datamigration/azure/mgmt/datamigration/_version.py +++ b/sdk/datamigration/azure-mgmt-datamigration/azure/mgmt/datamigration/_version.py @@ -6,5 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "9.0.0b1" - +VERSION = "0.2.0" diff --git a/sdk/datamigration/azure-mgmt-datamigration/azure/mgmt/datamigration/aio/operations/_files_operations.py b/sdk/datamigration/azure-mgmt-datamigration/azure/mgmt/datamigration/aio/operations/_files_operations.py index 1b78fe7023bc..456bf8191654 100644 --- a/sdk/datamigration/azure-mgmt-datamigration/azure/mgmt/datamigration/aio/operations/_files_operations.py +++ b/sdk/datamigration/azure-mgmt-datamigration/azure/mgmt/datamigration/aio/operations/_files_operations.py @@ -112,7 +112,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.ApiError, response) + error = self._deserialize.failsafe_deserialize(_models.ApiError, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -182,7 +182,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.ApiError, response) + error = self._deserialize.failsafe_deserialize(_models.ApiError, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('ProjectFile', pipeline_response) @@ -199,8 +199,7 @@ async def create_or_update( service_name: str, project_name: str, file_name: str, - etag: Optional[str] = None, - properties: Optional["_models.ProjectFileProperties"] = None, + parameters: "_models.ProjectFile", **kwargs ) -> "_models.ProjectFile": """Create a file resource. @@ -215,10 +214,8 @@ async def create_or_update( :type project_name: str :param file_name: Name of the File. :type file_name: str - :param etag: HTTP strong entity tag value. This is ignored if submitted. - :type etag: str - :param properties: Custom file properties. - :type properties: ~azure.mgmt.datamigration.models.ProjectFileProperties + :param parameters: Information about the file. + :type parameters: ~azure.mgmt.datamigration.models.ProjectFile :keyword callable cls: A custom type or function that will be passed the direct response :return: ProjectFile, or the result of cls(response) :rtype: ~azure.mgmt.datamigration.models.ProjectFile @@ -229,8 +226,6 @@ async def create_or_update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - - _parameters = _models.ProjectFile(etag=etag, properties=properties) api_version = "2018-07-15-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -256,7 +251,7 @@ async def create_or_update( header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(_parameters, 'ProjectFile') + body_content = self._serialize.body(parameters, 'ProjectFile') body_content_kwargs['content'] = body_content request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) @@ -264,7 +259,7 @@ async def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ApiError, response) + error = self._deserialize.failsafe_deserialize(_models.ApiError, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -337,7 +332,7 @@ async def delete( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ApiError, response) + error = self._deserialize.failsafe_deserialize(_models.ApiError, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -351,8 +346,7 @@ async def update( service_name: str, project_name: str, file_name: str, - etag: Optional[str] = None, - properties: Optional["_models.ProjectFileProperties"] = None, + parameters: "_models.ProjectFile", **kwargs ) -> "_models.ProjectFile": """Update a file. @@ -367,10 +361,8 @@ async def update( :type project_name: str :param file_name: Name of the File. :type file_name: str - :param etag: HTTP strong entity tag value. This is ignored if submitted. - :type etag: str - :param properties: Custom file properties. - :type properties: ~azure.mgmt.datamigration.models.ProjectFileProperties + :param parameters: Information about the file. + :type parameters: ~azure.mgmt.datamigration.models.ProjectFile :keyword callable cls: A custom type or function that will be passed the direct response :return: ProjectFile, or the result of cls(response) :rtype: ~azure.mgmt.datamigration.models.ProjectFile @@ -381,8 +373,6 @@ async def update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - - _parameters = _models.ProjectFile(etag=etag, properties=properties) api_version = "2018-07-15-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -408,7 +398,7 @@ async def update( header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(_parameters, 'ProjectFile') + body_content = self._serialize.body(parameters, 'ProjectFile') body_content_kwargs['content'] = body_content request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) @@ -416,7 +406,7 @@ async def update( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ApiError, response) + error = self._deserialize.failsafe_deserialize(_models.ApiError, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('ProjectFile', pipeline_response) @@ -486,7 +476,7 @@ async def read( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ApiError, response) + error = self._deserialize.failsafe_deserialize(_models.ApiError, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('FileStorageInfo', pipeline_response) @@ -555,7 +545,7 @@ async def read_write( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ApiError, response) + error = self._deserialize.failsafe_deserialize(_models.ApiError, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('FileStorageInfo', pipeline_response) diff --git a/sdk/datamigration/azure-mgmt-datamigration/azure/mgmt/datamigration/aio/operations/_operations.py b/sdk/datamigration/azure-mgmt-datamigration/azure/mgmt/datamigration/aio/operations/_operations.py index e31c1866406c..0c4fccb0365b 100644 --- a/sdk/datamigration/azure-mgmt-datamigration/azure/mgmt/datamigration/aio/operations/_operations.py +++ b/sdk/datamigration/azure-mgmt-datamigration/azure/mgmt/datamigration/aio/operations/_operations.py @@ -95,7 +95,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.ApiError, response) + error = self._deserialize.failsafe_deserialize(_models.ApiError, 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/datamigration/azure-mgmt-datamigration/azure/mgmt/datamigration/aio/operations/_projects_operations.py b/sdk/datamigration/azure-mgmt-datamigration/azure/mgmt/datamigration/aio/operations/_projects_operations.py index 040b1c6b2484..e5be74bf73bb 100644 --- a/sdk/datamigration/azure-mgmt-datamigration/azure/mgmt/datamigration/aio/operations/_projects_operations.py +++ b/sdk/datamigration/azure-mgmt-datamigration/azure/mgmt/datamigration/aio/operations/_projects_operations.py @@ -108,7 +108,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.ApiError, response) + error = self._deserialize.failsafe_deserialize(_models.ApiError, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -182,7 +182,7 @@ async def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ApiError, response) + error = self._deserialize.failsafe_deserialize(_models.ApiError, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -252,7 +252,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.ApiError, response) + error = self._deserialize.failsafe_deserialize(_models.ApiError, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('Project', pipeline_response) @@ -323,7 +323,7 @@ async def delete( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ApiError, response) + error = self._deserialize.failsafe_deserialize(_models.ApiError, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -394,7 +394,7 @@ async def update( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ApiError, response) + error = self._deserialize.failsafe_deserialize(_models.ApiError, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('Project', pipeline_response) diff --git a/sdk/datamigration/azure-mgmt-datamigration/azure/mgmt/datamigration/aio/operations/_resource_skus_operations.py b/sdk/datamigration/azure-mgmt-datamigration/azure/mgmt/datamigration/aio/operations/_resource_skus_operations.py index 8f5b7f6fd851..c9d47f16c7c5 100644 --- a/sdk/datamigration/azure-mgmt-datamigration/azure/mgmt/datamigration/aio/operations/_resource_skus_operations.py +++ b/sdk/datamigration/azure-mgmt-datamigration/azure/mgmt/datamigration/aio/operations/_resource_skus_operations.py @@ -99,7 +99,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.ApiError, response) + error = self._deserialize.failsafe_deserialize(_models.ApiError, 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/datamigration/azure-mgmt-datamigration/azure/mgmt/datamigration/aio/operations/_service_tasks_operations.py b/sdk/datamigration/azure-mgmt-datamigration/azure/mgmt/datamigration/aio/operations/_service_tasks_operations.py index 18237e246625..d90b7f6da567 100644 --- a/sdk/datamigration/azure-mgmt-datamigration/azure/mgmt/datamigration/aio/operations/_service_tasks_operations.py +++ b/sdk/datamigration/azure-mgmt-datamigration/azure/mgmt/datamigration/aio/operations/_service_tasks_operations.py @@ -115,7 +115,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.ApiError, response) + error = self._deserialize.failsafe_deserialize(_models.ApiError, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -131,8 +131,7 @@ async def create_or_update( group_name: str, service_name: str, task_name: str, - etag: Optional[str] = None, - properties: Optional["_models.ProjectTaskProperties"] = None, + parameters: "_models.ProjectTask", **kwargs ) -> "_models.ProjectTask": """Create or update service task. @@ -148,10 +147,8 @@ async def create_or_update( :type service_name: str :param task_name: Name of the Task. :type task_name: str - :param etag: HTTP strong entity tag value. This is ignored if submitted. - :type etag: str - :param properties: Custom task properties. - :type properties: ~azure.mgmt.datamigration.models.ProjectTaskProperties + :param parameters: Information about the task. + :type parameters: ~azure.mgmt.datamigration.models.ProjectTask :keyword callable cls: A custom type or function that will be passed the direct response :return: ProjectTask, or the result of cls(response) :rtype: ~azure.mgmt.datamigration.models.ProjectTask @@ -162,8 +159,6 @@ async def create_or_update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - - _parameters = _models.ProjectTask(etag=etag, properties=properties) api_version = "2018-07-15-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -188,7 +183,7 @@ async def create_or_update( header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(_parameters, 'ProjectTask') + body_content = self._serialize.body(parameters, 'ProjectTask') body_content_kwargs['content'] = body_content request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) @@ -196,7 +191,7 @@ async def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ApiError, response) + error = self._deserialize.failsafe_deserialize(_models.ApiError, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -271,7 +266,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.ApiError, response) + error = self._deserialize.failsafe_deserialize(_models.ApiError, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('ProjectTask', pipeline_response) @@ -342,7 +337,7 @@ async def delete( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ApiError, response) + error = self._deserialize.failsafe_deserialize(_models.ApiError, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -355,8 +350,7 @@ async def update( group_name: str, service_name: str, task_name: str, - etag: Optional[str] = None, - properties: Optional["_models.ProjectTaskProperties"] = None, + parameters: "_models.ProjectTask", **kwargs ) -> "_models.ProjectTask": """Create or update service task. @@ -371,10 +365,8 @@ async def update( :type service_name: str :param task_name: Name of the Task. :type task_name: str - :param etag: HTTP strong entity tag value. This is ignored if submitted. - :type etag: str - :param properties: Custom task properties. - :type properties: ~azure.mgmt.datamigration.models.ProjectTaskProperties + :param parameters: Information about the task. + :type parameters: ~azure.mgmt.datamigration.models.ProjectTask :keyword callable cls: A custom type or function that will be passed the direct response :return: ProjectTask, or the result of cls(response) :rtype: ~azure.mgmt.datamigration.models.ProjectTask @@ -385,8 +377,6 @@ async def update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - - _parameters = _models.ProjectTask(etag=etag, properties=properties) api_version = "2018-07-15-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -411,7 +401,7 @@ async def update( header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(_parameters, 'ProjectTask') + body_content = self._serialize.body(parameters, 'ProjectTask') body_content_kwargs['content'] = body_content request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) @@ -419,7 +409,7 @@ async def update( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ApiError, response) + error = self._deserialize.failsafe_deserialize(_models.ApiError, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('ProjectTask', pipeline_response) @@ -485,7 +475,7 @@ async def cancel( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ApiError, response) + error = self._deserialize.failsafe_deserialize(_models.ApiError, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('ProjectTask', pipeline_response) diff --git a/sdk/datamigration/azure-mgmt-datamigration/azure/mgmt/datamigration/aio/operations/_services_operations.py b/sdk/datamigration/azure-mgmt-datamigration/azure/mgmt/datamigration/aio/operations/_services_operations.py index 5a857f3cc601..fc2df220921a 100644 --- a/sdk/datamigration/azure-mgmt-datamigration/azure/mgmt/datamigration/aio/operations/_services_operations.py +++ b/sdk/datamigration/azure-mgmt-datamigration/azure/mgmt/datamigration/aio/operations/_services_operations.py @@ -86,7 +86,7 @@ async def _create_or_update_initial( if response.status_code not in [200, 201, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ApiError, response) + error = self._deserialize.failsafe_deserialize(_models.ApiError, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = None @@ -128,8 +128,8 @@ async def begin_create_or_update( :type parameters: ~azure.mgmt.datamigration.models.DataMigrationService :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 DataMigrationService or the result of cls(response) @@ -233,7 +233,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.ApiError, response) + error = self._deserialize.failsafe_deserialize(_models.ApiError, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('DataMigrationService', pipeline_response) @@ -284,7 +284,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.ApiError, response) + error = self._deserialize.failsafe_deserialize(_models.ApiError, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -312,8 +312,8 @@ async def begin_delete( :type delete_running_tasks: bool :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) @@ -406,7 +406,7 @@ async def _update_initial( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ApiError, response) + error = self._deserialize.failsafe_deserialize(_models.ApiError, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = None @@ -441,8 +441,8 @@ async def begin_update( :type parameters: ~azure.mgmt.datamigration.models.DataMigrationService :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 DataMigrationService or the result of cls(response) @@ -547,7 +547,7 @@ async def check_status( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ApiError, response) + error = self._deserialize.failsafe_deserialize(_models.ApiError, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('DataMigrationServiceStatusResponse', pipeline_response) @@ -595,7 +595,7 @@ async def _start_initial( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ApiError, response) + error = self._deserialize.failsafe_deserialize(_models.ApiError, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -620,8 +620,8 @@ async def begin_start( :type service_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) @@ -707,7 +707,7 @@ async def _stop_initial( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ApiError, response) + error = self._deserialize.failsafe_deserialize(_models.ApiError, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -733,8 +733,8 @@ async def begin_stop( :type service_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) @@ -850,7 +850,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.ApiError, response) + error = self._deserialize.failsafe_deserialize(_models.ApiError, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -865,8 +865,7 @@ async def check_children_name_availability( self, group_name: str, service_name: str, - name: Optional[str] = None, - type: Optional[str] = None, + parameters: "_models.NameAvailabilityRequest", **kwargs ) -> "_models.NameAvailabilityResponse": """Check nested resource name validity and availability. @@ -877,10 +876,8 @@ async def check_children_name_availability( :type group_name: str :param service_name: Name of the service. :type service_name: str - :param name: The proposed resource name. - :type name: str - :param type: The resource type chain (e.g. virtualMachines/extensions). - :type type: str + :param parameters: Requested name to validate. + :type parameters: ~azure.mgmt.datamigration.models.NameAvailabilityRequest :keyword callable cls: A custom type or function that will be passed the direct response :return: NameAvailabilityResponse, or the result of cls(response) :rtype: ~azure.mgmt.datamigration.models.NameAvailabilityResponse @@ -891,8 +888,6 @@ async def check_children_name_availability( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - - _parameters = _models.NameAvailabilityRequest(name=name, type=type) api_version = "2018-07-15-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -916,7 +911,7 @@ async def check_children_name_availability( header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(_parameters, 'NameAvailabilityRequest') + body_content = self._serialize.body(parameters, 'NameAvailabilityRequest') body_content_kwargs['content'] = body_content request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) @@ -924,7 +919,7 @@ async def check_children_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.ApiError, response) + error = self._deserialize.failsafe_deserialize(_models.ApiError, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('NameAvailabilityResponse', pipeline_response) @@ -998,7 +993,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.ApiError, response) + error = self._deserialize.failsafe_deserialize(_models.ApiError, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -1068,7 +1063,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.ApiError, response) + error = self._deserialize.failsafe_deserialize(_models.ApiError, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -1082,8 +1077,7 @@ async def get_next(next_link=None): async def check_name_availability( self, location: str, - name: Optional[str] = None, - type: Optional[str] = None, + parameters: "_models.NameAvailabilityRequest", **kwargs ) -> "_models.NameAvailabilityResponse": """Check name validity and availability. @@ -1092,10 +1086,8 @@ async def check_name_availability( :param location: The Azure region of the operation. :type location: str - :param name: The proposed resource name. - :type name: str - :param type: The resource type chain (e.g. virtualMachines/extensions). - :type type: str + :param parameters: Requested name to validate. + :type parameters: ~azure.mgmt.datamigration.models.NameAvailabilityRequest :keyword callable cls: A custom type or function that will be passed the direct response :return: NameAvailabilityResponse, or the result of cls(response) :rtype: ~azure.mgmt.datamigration.models.NameAvailabilityResponse @@ -1106,8 +1098,6 @@ async def check_name_availability( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - - _parameters = _models.NameAvailabilityRequest(name=name, type=type) api_version = "2018-07-15-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -1130,7 +1120,7 @@ async def check_name_availability( header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(_parameters, 'NameAvailabilityRequest') + body_content = self._serialize.body(parameters, 'NameAvailabilityRequest') body_content_kwargs['content'] = body_content request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) @@ -1138,7 +1128,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.ApiError, response) + error = self._deserialize.failsafe_deserialize(_models.ApiError, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('NameAvailabilityResponse', pipeline_response) diff --git a/sdk/datamigration/azure-mgmt-datamigration/azure/mgmt/datamigration/aio/operations/_tasks_operations.py b/sdk/datamigration/azure-mgmt-datamigration/azure/mgmt/datamigration/aio/operations/_tasks_operations.py index f8fbb85f1d8e..26b7f5335478 100644 --- a/sdk/datamigration/azure-mgmt-datamigration/azure/mgmt/datamigration/aio/operations/_tasks_operations.py +++ b/sdk/datamigration/azure-mgmt-datamigration/azure/mgmt/datamigration/aio/operations/_tasks_operations.py @@ -118,7 +118,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.ApiError, response) + error = self._deserialize.failsafe_deserialize(_models.ApiError, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -135,8 +135,7 @@ async def create_or_update( service_name: str, project_name: str, task_name: str, - etag: Optional[str] = None, - properties: Optional["_models.ProjectTaskProperties"] = None, + parameters: "_models.ProjectTask", **kwargs ) -> "_models.ProjectTask": """Create or update task. @@ -153,10 +152,8 @@ async def create_or_update( :type project_name: str :param task_name: Name of the Task. :type task_name: str - :param etag: HTTP strong entity tag value. This is ignored if submitted. - :type etag: str - :param properties: Custom task properties. - :type properties: ~azure.mgmt.datamigration.models.ProjectTaskProperties + :param parameters: Information about the task. + :type parameters: ~azure.mgmt.datamigration.models.ProjectTask :keyword callable cls: A custom type or function that will be passed the direct response :return: ProjectTask, or the result of cls(response) :rtype: ~azure.mgmt.datamigration.models.ProjectTask @@ -167,8 +164,6 @@ async def create_or_update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - - _parameters = _models.ProjectTask(etag=etag, properties=properties) api_version = "2018-07-15-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -194,7 +189,7 @@ async def create_or_update( header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(_parameters, 'ProjectTask') + body_content = self._serialize.body(parameters, 'ProjectTask') body_content_kwargs['content'] = body_content request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) @@ -202,7 +197,7 @@ async def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ApiError, response) + error = self._deserialize.failsafe_deserialize(_models.ApiError, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -281,7 +276,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.ApiError, response) + error = self._deserialize.failsafe_deserialize(_models.ApiError, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('ProjectTask', pipeline_response) @@ -356,7 +351,7 @@ async def delete( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ApiError, response) + error = self._deserialize.failsafe_deserialize(_models.ApiError, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -370,8 +365,7 @@ async def update( service_name: str, project_name: str, task_name: str, - etag: Optional[str] = None, - properties: Optional["_models.ProjectTaskProperties"] = None, + parameters: "_models.ProjectTask", **kwargs ) -> "_models.ProjectTask": """Create or update task. @@ -388,10 +382,8 @@ async def update( :type project_name: str :param task_name: Name of the Task. :type task_name: str - :param etag: HTTP strong entity tag value. This is ignored if submitted. - :type etag: str - :param properties: Custom task properties. - :type properties: ~azure.mgmt.datamigration.models.ProjectTaskProperties + :param parameters: Information about the task. + :type parameters: ~azure.mgmt.datamigration.models.ProjectTask :keyword callable cls: A custom type or function that will be passed the direct response :return: ProjectTask, or the result of cls(response) :rtype: ~azure.mgmt.datamigration.models.ProjectTask @@ -402,8 +394,6 @@ async def update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - - _parameters = _models.ProjectTask(etag=etag, properties=properties) api_version = "2018-07-15-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -429,7 +419,7 @@ async def update( header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(_parameters, 'ProjectTask') + body_content = self._serialize.body(parameters, 'ProjectTask') body_content_kwargs['content'] = body_content request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) @@ -437,7 +427,7 @@ async def update( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ApiError, response) + error = self._deserialize.failsafe_deserialize(_models.ApiError, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('ProjectTask', pipeline_response) @@ -507,7 +497,7 @@ async def cancel( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ApiError, response) + error = self._deserialize.failsafe_deserialize(_models.ApiError, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('ProjectTask', pipeline_response) @@ -585,7 +575,7 @@ async def command( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ApiError, response) + error = self._deserialize.failsafe_deserialize(_models.ApiError, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('CommandProperties', pipeline_response) diff --git a/sdk/datamigration/azure-mgmt-datamigration/azure/mgmt/datamigration/aio/operations/_usages_operations.py b/sdk/datamigration/azure-mgmt-datamigration/azure/mgmt/datamigration/aio/operations/_usages_operations.py index 279c281d0551..7e72a4270d1b 100644 --- a/sdk/datamigration/azure-mgmt-datamigration/azure/mgmt/datamigration/aio/operations/_usages_operations.py +++ b/sdk/datamigration/azure-mgmt-datamigration/azure/mgmt/datamigration/aio/operations/_usages_operations.py @@ -104,7 +104,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.ApiError, response) + error = self._deserialize.failsafe_deserialize(_models.ApiError, 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/datamigration/azure-mgmt-datamigration/azure/mgmt/datamigration/models/__init__.py b/sdk/datamigration/azure-mgmt-datamigration/azure/mgmt/datamigration/models/__init__.py index ebab1e6ff9ef..e5c69ebe4274 100644 --- a/sdk/datamigration/azure-mgmt-datamigration/azure/mgmt/datamigration/models/__init__.py +++ b/sdk/datamigration/azure-mgmt-datamigration/azure/mgmt/datamigration/models/__init__.py @@ -9,8 +9,8 @@ try: from ._models_py3 import ApiError from ._models_py3 import AvailableServiceSku - from ._models_py3 import AvailableServiceSkuSku from ._models_py3 import AvailableServiceSkuCapacity + from ._models_py3 import AvailableServiceSkuSku from ._models_py3 import AzureActiveDirectoryApp from ._models_py3 import BackupFileInfo from ._models_py3 import BackupSetInfo @@ -277,8 +277,8 @@ except (SyntaxError, ImportError): from ._models import ApiError # type: ignore from ._models import AvailableServiceSku # type: ignore - from ._models import AvailableServiceSkuSku # type: ignore from ._models import AvailableServiceSkuCapacity # type: ignore + from ._models import AvailableServiceSkuSku # type: ignore from ._models import AzureActiveDirectoryApp # type: ignore from ._models import BackupFileInfo # type: ignore from ._models import BackupSetInfo # type: ignore @@ -598,8 +598,8 @@ __all__ = [ 'ApiError', 'AvailableServiceSku', - 'AvailableServiceSkuSku', 'AvailableServiceSkuCapacity', + 'AvailableServiceSkuSku', 'AzureActiveDirectoryApp', 'BackupFileInfo', 'BackupSetInfo', diff --git a/sdk/datamigration/azure-mgmt-datamigration/azure/mgmt/datamigration/models/_models.py b/sdk/datamigration/azure-mgmt-datamigration/azure/mgmt/datamigration/models/_models.py index c860b6a186f7..5727adefdf0f 100644 --- a/sdk/datamigration/azure-mgmt-datamigration/azure/mgmt/datamigration/models/_models.py +++ b/sdk/datamigration/azure-mgmt-datamigration/azure/mgmt/datamigration/models/_models.py @@ -34,15 +34,15 @@ class AvailableServiceSku(msrest.serialization.Model): :param resource_type: The resource type, including the provider namespace. :type resource_type: str - :param available_service_sku: SKU name, tier, etc. - :type available_service_sku: ~azure.mgmt.datamigration.models.AvailableServiceSkuSku + :param sku: SKU name, tier, etc. + :type sku: ~azure.mgmt.datamigration.models.AvailableServiceSkuSku :param capacity: A description of the scaling capacities of the SKU. :type capacity: ~azure.mgmt.datamigration.models.AvailableServiceSkuCapacity """ _attribute_map = { 'resource_type': {'key': 'resourceType', 'type': 'str'}, - 'available_service_sku': {'key': 'sku', 'type': 'AvailableServiceSkuSku'}, + 'sku': {'key': 'sku', 'type': 'AvailableServiceSkuSku'}, 'capacity': {'key': 'capacity', 'type': 'AvailableServiceSkuCapacity'}, } @@ -52,41 +52,10 @@ def __init__( ): super(AvailableServiceSku, self).__init__(**kwargs) self.resource_type = kwargs.get('resource_type', None) - self.available_service_sku = kwargs.get('available_service_sku', None) + self.sku = kwargs.get('sku', None) self.capacity = kwargs.get('capacity', None) -class AvailableServiceSkuSku(msrest.serialization.Model): - """SKU name, tier, etc. - - :param name: The name of the SKU. - :type name: str - :param family: SKU family. - :type family: str - :param size: SKU size. - :type size: str - :param tier: The tier of the SKU, such as "Basic", "General Purpose", or "Business Critical". - :type tier: str - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'family': {'key': 'family', 'type': 'str'}, - 'size': {'key': 'size', 'type': 'str'}, - 'tier': {'key': 'tier', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(AvailableServiceSkuSku, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.family = kwargs.get('family', None) - self.size = kwargs.get('size', None) - self.tier = kwargs.get('tier', None) - - class AvailableServiceSkuCapacity(msrest.serialization.Model): """A description of the scaling capacities of the SKU. @@ -119,6 +88,37 @@ def __init__( self.scale_type = kwargs.get('scale_type', None) +class AvailableServiceSkuSku(msrest.serialization.Model): + """SKU name, tier, etc. + + :param name: The name of the SKU. + :type name: str + :param family: SKU family. + :type family: str + :param size: SKU size. + :type size: str + :param tier: The tier of the SKU, such as "Basic", "General Purpose", or "Business Critical". + :type tier: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'family': {'key': 'family', 'type': 'str'}, + 'size': {'key': 'size', 'type': 'str'}, + 'tier': {'key': 'tier', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(AvailableServiceSkuSku, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.family = kwargs.get('family', None) + self.size = kwargs.get('size', None) + self.tier = kwargs.get('tier', None) + + class AzureActiveDirectoryApp(msrest.serialization.Model): """Azure Active Directory Application. @@ -7489,7 +7489,7 @@ class MigrateSqlServerSqlMISyncTaskProperties(ProjectTaskProperties): :param client_data: Key value pairs of client data to attach meta data information to task. :type client_data: dict[str, str] :param input: Task input. - :type input: ~azure.mgmt.datamigration.models.SqlServerSqlMISyncTaskInput + :type input: ~azure.mgmt.datamigration.models.MigrateSqlServerSqlMISyncTaskInput :ivar output: Task output. This is ignored if submitted. :vartype output: list[~azure.mgmt.datamigration.models.MigrateSqlServerSqlMISyncTaskOutput] """ @@ -7508,7 +7508,7 @@ class MigrateSqlServerSqlMISyncTaskProperties(ProjectTaskProperties): 'state': {'key': 'state', 'type': 'str'}, 'commands': {'key': 'commands', 'type': '[CommandProperties]'}, 'client_data': {'key': 'clientData', 'type': '{str}'}, - 'input': {'key': 'input', 'type': 'SqlServerSqlMISyncTaskInput'}, + 'input': {'key': 'input', 'type': 'MigrateSqlServerSqlMISyncTaskInput'}, 'output': {'key': 'output', 'type': '[MigrateSqlServerSqlMISyncTaskOutput]'}, } @@ -9339,7 +9339,7 @@ class MongoDbDatabaseProgress(MongoDbProgress): :type total_documents: long :param collections: The progress of the collections in the database. The keys are the unqualified names of the collections. - :type collections: dict[str, ~azure.mgmt.datamigration.models.MongoDbProgress] + :type collections: dict[str, ~azure.mgmt.datamigration.models.MongoDbCollectionProgress] """ _validation = { @@ -9370,7 +9370,7 @@ class MongoDbDatabaseProgress(MongoDbProgress): 'state': {'key': 'state', 'type': 'str'}, 'total_bytes': {'key': 'totalBytes', 'type': 'long'}, 'total_documents': {'key': 'totalDocuments', 'type': 'long'}, - 'collections': {'key': 'collections', 'type': '{MongoDbProgress}'}, + 'collections': {'key': 'collections', 'type': '{MongoDbCollectionProgress}'}, } def __init__( @@ -11689,7 +11689,7 @@ class ValidateMigrationInputSqlServerSqlMISyncTaskProperties(ProjectTaskProperti :param client_data: Key value pairs of client data to attach meta data information to task. :type client_data: dict[str, str] :param input: Task input. - :type input: ~azure.mgmt.datamigration.models.SqlServerSqlMISyncTaskInput + :type input: ~azure.mgmt.datamigration.models.ValidateMigrationInputSqlServerSqlMISyncTaskInput :ivar output: Task output. This is ignored if submitted. :vartype output: list[~azure.mgmt.datamigration.models.ValidateMigrationInputSqlServerSqlMISyncTaskOutput] @@ -11709,7 +11709,7 @@ class ValidateMigrationInputSqlServerSqlMISyncTaskProperties(ProjectTaskProperti 'state': {'key': 'state', 'type': 'str'}, 'commands': {'key': 'commands', 'type': '[CommandProperties]'}, 'client_data': {'key': 'clientData', 'type': '{str}'}, - 'input': {'key': 'input', 'type': 'SqlServerSqlMISyncTaskInput'}, + 'input': {'key': 'input', 'type': 'ValidateMigrationInputSqlServerSqlMISyncTaskInput'}, 'output': {'key': 'output', 'type': '[ValidateMigrationInputSqlServerSqlMISyncTaskOutput]'}, } diff --git a/sdk/datamigration/azure-mgmt-datamigration/azure/mgmt/datamigration/models/_models_py3.py b/sdk/datamigration/azure-mgmt-datamigration/azure/mgmt/datamigration/models/_models_py3.py index ee0d9d970626..224285a03b12 100644 --- a/sdk/datamigration/azure-mgmt-datamigration/azure/mgmt/datamigration/models/_models_py3.py +++ b/sdk/datamigration/azure-mgmt-datamigration/azure/mgmt/datamigration/models/_models_py3.py @@ -41,15 +41,15 @@ class AvailableServiceSku(msrest.serialization.Model): :param resource_type: The resource type, including the provider namespace. :type resource_type: str - :param available_service_sku: SKU name, tier, etc. - :type available_service_sku: ~azure.mgmt.datamigration.models.AvailableServiceSkuSku + :param sku: SKU name, tier, etc. + :type sku: ~azure.mgmt.datamigration.models.AvailableServiceSkuSku :param capacity: A description of the scaling capacities of the SKU. :type capacity: ~azure.mgmt.datamigration.models.AvailableServiceSkuCapacity """ _attribute_map = { 'resource_type': {'key': 'resourceType', 'type': 'str'}, - 'available_service_sku': {'key': 'sku', 'type': 'AvailableServiceSkuSku'}, + 'sku': {'key': 'sku', 'type': 'AvailableServiceSkuSku'}, 'capacity': {'key': 'capacity', 'type': 'AvailableServiceSkuCapacity'}, } @@ -57,52 +57,16 @@ def __init__( self, *, resource_type: Optional[str] = None, - available_service_sku: Optional["AvailableServiceSkuSku"] = None, + sku: Optional["AvailableServiceSkuSku"] = None, capacity: Optional["AvailableServiceSkuCapacity"] = None, **kwargs ): super(AvailableServiceSku, self).__init__(**kwargs) self.resource_type = resource_type - self.available_service_sku = available_service_sku + self.sku = sku self.capacity = capacity -class AvailableServiceSkuSku(msrest.serialization.Model): - """SKU name, tier, etc. - - :param name: The name of the SKU. - :type name: str - :param family: SKU family. - :type family: str - :param size: SKU size. - :type size: str - :param tier: The tier of the SKU, such as "Basic", "General Purpose", or "Business Critical". - :type tier: str - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'family': {'key': 'family', 'type': 'str'}, - 'size': {'key': 'size', 'type': 'str'}, - 'tier': {'key': 'tier', 'type': 'str'}, - } - - def __init__( - self, - *, - name: Optional[str] = None, - family: Optional[str] = None, - size: Optional[str] = None, - tier: Optional[str] = None, - **kwargs - ): - super(AvailableServiceSkuSku, self).__init__(**kwargs) - self.name = name - self.family = family - self.size = size - self.tier = tier - - class AvailableServiceSkuCapacity(msrest.serialization.Model): """A description of the scaling capacities of the SKU. @@ -140,6 +104,42 @@ def __init__( self.scale_type = scale_type +class AvailableServiceSkuSku(msrest.serialization.Model): + """SKU name, tier, etc. + + :param name: The name of the SKU. + :type name: str + :param family: SKU family. + :type family: str + :param size: SKU size. + :type size: str + :param tier: The tier of the SKU, such as "Basic", "General Purpose", or "Business Critical". + :type tier: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'family': {'key': 'family', 'type': 'str'}, + 'size': {'key': 'size', 'type': 'str'}, + 'tier': {'key': 'tier', 'type': 'str'}, + } + + def __init__( + self, + *, + name: Optional[str] = None, + family: Optional[str] = None, + size: Optional[str] = None, + tier: Optional[str] = None, + **kwargs + ): + super(AvailableServiceSkuSku, self).__init__(**kwargs) + self.name = name + self.family = family + self.size = size + self.tier = tier + + class AzureActiveDirectoryApp(msrest.serialization.Model): """Azure Active Directory Application. @@ -7881,7 +7881,7 @@ class MigrateSqlServerSqlMISyncTaskProperties(ProjectTaskProperties): :param client_data: Key value pairs of client data to attach meta data information to task. :type client_data: dict[str, str] :param input: Task input. - :type input: ~azure.mgmt.datamigration.models.SqlServerSqlMISyncTaskInput + :type input: ~azure.mgmt.datamigration.models.MigrateSqlServerSqlMISyncTaskInput :ivar output: Task output. This is ignored if submitted. :vartype output: list[~azure.mgmt.datamigration.models.MigrateSqlServerSqlMISyncTaskOutput] """ @@ -7900,7 +7900,7 @@ class MigrateSqlServerSqlMISyncTaskProperties(ProjectTaskProperties): 'state': {'key': 'state', 'type': 'str'}, 'commands': {'key': 'commands', 'type': '[CommandProperties]'}, 'client_data': {'key': 'clientData', 'type': '{str}'}, - 'input': {'key': 'input', 'type': 'SqlServerSqlMISyncTaskInput'}, + 'input': {'key': 'input', 'type': 'MigrateSqlServerSqlMISyncTaskInput'}, 'output': {'key': 'output', 'type': '[MigrateSqlServerSqlMISyncTaskOutput]'}, } @@ -7908,7 +7908,7 @@ def __init__( self, *, client_data: Optional[Dict[str, str]] = None, - input: Optional["SqlServerSqlMISyncTaskInput"] = None, + input: Optional["MigrateSqlServerSqlMISyncTaskInput"] = None, **kwargs ): super(MigrateSqlServerSqlMISyncTaskProperties, self).__init__(client_data=client_data, **kwargs) @@ -9844,7 +9844,7 @@ class MongoDbDatabaseProgress(MongoDbProgress): :type total_documents: long :param collections: The progress of the collections in the database. The keys are the unqualified names of the collections. - :type collections: dict[str, ~azure.mgmt.datamigration.models.MongoDbProgress] + :type collections: dict[str, ~azure.mgmt.datamigration.models.MongoDbCollectionProgress] """ _validation = { @@ -9875,7 +9875,7 @@ class MongoDbDatabaseProgress(MongoDbProgress): 'state': {'key': 'state', 'type': 'str'}, 'total_bytes': {'key': 'totalBytes', 'type': 'long'}, 'total_documents': {'key': 'totalDocuments', 'type': 'long'}, - 'collections': {'key': 'collections', 'type': '{MongoDbProgress}'}, + 'collections': {'key': 'collections', 'type': '{MongoDbCollectionProgress}'}, } def __init__( @@ -9894,7 +9894,7 @@ def __init__( last_replay_time: Optional[datetime.datetime] = None, name: Optional[str] = None, qualified_name: Optional[str] = None, - collections: Optional[Dict[str, "MongoDbProgress"]] = None, + collections: Optional[Dict[str, "MongoDbCollectionProgress"]] = None, **kwargs ): super(MongoDbDatabaseProgress, self).__init__(bytes_copied=bytes_copied, documents_copied=documents_copied, elapsed_time=elapsed_time, errors=errors, events_pending=events_pending, events_replayed=events_replayed, last_event_time=last_event_time, last_replay_time=last_replay_time, name=name, qualified_name=qualified_name, state=state, total_bytes=total_bytes, total_documents=total_documents, **kwargs) @@ -12415,7 +12415,7 @@ class ValidateMigrationInputSqlServerSqlMISyncTaskProperties(ProjectTaskProperti :param client_data: Key value pairs of client data to attach meta data information to task. :type client_data: dict[str, str] :param input: Task input. - :type input: ~azure.mgmt.datamigration.models.SqlServerSqlMISyncTaskInput + :type input: ~azure.mgmt.datamigration.models.ValidateMigrationInputSqlServerSqlMISyncTaskInput :ivar output: Task output. This is ignored if submitted. :vartype output: list[~azure.mgmt.datamigration.models.ValidateMigrationInputSqlServerSqlMISyncTaskOutput] @@ -12435,7 +12435,7 @@ class ValidateMigrationInputSqlServerSqlMISyncTaskProperties(ProjectTaskProperti 'state': {'key': 'state', 'type': 'str'}, 'commands': {'key': 'commands', 'type': '[CommandProperties]'}, 'client_data': {'key': 'clientData', 'type': '{str}'}, - 'input': {'key': 'input', 'type': 'SqlServerSqlMISyncTaskInput'}, + 'input': {'key': 'input', 'type': 'ValidateMigrationInputSqlServerSqlMISyncTaskInput'}, 'output': {'key': 'output', 'type': '[ValidateMigrationInputSqlServerSqlMISyncTaskOutput]'}, } @@ -12443,7 +12443,7 @@ def __init__( self, *, client_data: Optional[Dict[str, str]] = None, - input: Optional["SqlServerSqlMISyncTaskInput"] = None, + input: Optional["ValidateMigrationInputSqlServerSqlMISyncTaskInput"] = None, **kwargs ): super(ValidateMigrationInputSqlServerSqlMISyncTaskProperties, self).__init__(client_data=client_data, **kwargs) diff --git a/sdk/datamigration/azure-mgmt-datamigration/azure/mgmt/datamigration/operations/_files_operations.py b/sdk/datamigration/azure-mgmt-datamigration/azure/mgmt/datamigration/operations/_files_operations.py index 09d0cb66360d..9d7a7913701f 100644 --- a/sdk/datamigration/azure-mgmt-datamigration/azure/mgmt/datamigration/operations/_files_operations.py +++ b/sdk/datamigration/azure-mgmt-datamigration/azure/mgmt/datamigration/operations/_files_operations.py @@ -117,7 +117,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.ApiError, response) + error = self._deserialize.failsafe_deserialize(_models.ApiError, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -188,7 +188,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.ApiError, response) + error = self._deserialize.failsafe_deserialize(_models.ApiError, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('ProjectFile', pipeline_response) @@ -205,8 +205,7 @@ def create_or_update( service_name, # type: str project_name, # type: str file_name, # type: str - etag=None, # type: Optional[str] - properties=None, # type: Optional["_models.ProjectFileProperties"] + parameters, # type: "_models.ProjectFile" **kwargs # type: Any ): # type: (...) -> "_models.ProjectFile" @@ -222,10 +221,8 @@ def create_or_update( :type project_name: str :param file_name: Name of the File. :type file_name: str - :param etag: HTTP strong entity tag value. This is ignored if submitted. - :type etag: str - :param properties: Custom file properties. - :type properties: ~azure.mgmt.datamigration.models.ProjectFileProperties + :param parameters: Information about the file. + :type parameters: ~azure.mgmt.datamigration.models.ProjectFile :keyword callable cls: A custom type or function that will be passed the direct response :return: ProjectFile, or the result of cls(response) :rtype: ~azure.mgmt.datamigration.models.ProjectFile @@ -236,8 +233,6 @@ def create_or_update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - - _parameters = _models.ProjectFile(etag=etag, properties=properties) api_version = "2018-07-15-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -263,7 +258,7 @@ def create_or_update( header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(_parameters, 'ProjectFile') + body_content = self._serialize.body(parameters, 'ProjectFile') body_content_kwargs['content'] = body_content request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) @@ -271,7 +266,7 @@ def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ApiError, response) + error = self._deserialize.failsafe_deserialize(_models.ApiError, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -345,7 +340,7 @@ def delete( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ApiError, response) + error = self._deserialize.failsafe_deserialize(_models.ApiError, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -359,8 +354,7 @@ def update( service_name, # type: str project_name, # type: str file_name, # type: str - etag=None, # type: Optional[str] - properties=None, # type: Optional["_models.ProjectFileProperties"] + parameters, # type: "_models.ProjectFile" **kwargs # type: Any ): # type: (...) -> "_models.ProjectFile" @@ -376,10 +370,8 @@ def update( :type project_name: str :param file_name: Name of the File. :type file_name: str - :param etag: HTTP strong entity tag value. This is ignored if submitted. - :type etag: str - :param properties: Custom file properties. - :type properties: ~azure.mgmt.datamigration.models.ProjectFileProperties + :param parameters: Information about the file. + :type parameters: ~azure.mgmt.datamigration.models.ProjectFile :keyword callable cls: A custom type or function that will be passed the direct response :return: ProjectFile, or the result of cls(response) :rtype: ~azure.mgmt.datamigration.models.ProjectFile @@ -390,8 +382,6 @@ def update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - - _parameters = _models.ProjectFile(etag=etag, properties=properties) api_version = "2018-07-15-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -417,7 +407,7 @@ def update( header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(_parameters, 'ProjectFile') + body_content = self._serialize.body(parameters, 'ProjectFile') body_content_kwargs['content'] = body_content request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) @@ -425,7 +415,7 @@ def update( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ApiError, response) + error = self._deserialize.failsafe_deserialize(_models.ApiError, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('ProjectFile', pipeline_response) @@ -496,7 +486,7 @@ def read( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ApiError, response) + error = self._deserialize.failsafe_deserialize(_models.ApiError, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('FileStorageInfo', pipeline_response) @@ -566,7 +556,7 @@ def read_write( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ApiError, response) + error = self._deserialize.failsafe_deserialize(_models.ApiError, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('FileStorageInfo', pipeline_response) diff --git a/sdk/datamigration/azure-mgmt-datamigration/azure/mgmt/datamigration/operations/_operations.py b/sdk/datamigration/azure-mgmt-datamigration/azure/mgmt/datamigration/operations/_operations.py index 3fb6308be4f1..43150ee4ea92 100644 --- a/sdk/datamigration/azure-mgmt-datamigration/azure/mgmt/datamigration/operations/_operations.py +++ b/sdk/datamigration/azure-mgmt-datamigration/azure/mgmt/datamigration/operations/_operations.py @@ -100,7 +100,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.ApiError, response) + error = self._deserialize.failsafe_deserialize(_models.ApiError, 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/datamigration/azure-mgmt-datamigration/azure/mgmt/datamigration/operations/_projects_operations.py b/sdk/datamigration/azure-mgmt-datamigration/azure/mgmt/datamigration/operations/_projects_operations.py index 14545e9ad063..93839c1aea30 100644 --- a/sdk/datamigration/azure-mgmt-datamigration/azure/mgmt/datamigration/operations/_projects_operations.py +++ b/sdk/datamigration/azure-mgmt-datamigration/azure/mgmt/datamigration/operations/_projects_operations.py @@ -113,7 +113,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.ApiError, response) + error = self._deserialize.failsafe_deserialize(_models.ApiError, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -188,7 +188,7 @@ def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ApiError, response) + error = self._deserialize.failsafe_deserialize(_models.ApiError, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -259,7 +259,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.ApiError, response) + error = self._deserialize.failsafe_deserialize(_models.ApiError, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('Project', pipeline_response) @@ -331,7 +331,7 @@ def delete( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ApiError, response) + error = self._deserialize.failsafe_deserialize(_models.ApiError, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -403,7 +403,7 @@ def update( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ApiError, response) + error = self._deserialize.failsafe_deserialize(_models.ApiError, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('Project', pipeline_response) diff --git a/sdk/datamigration/azure-mgmt-datamigration/azure/mgmt/datamigration/operations/_resource_skus_operations.py b/sdk/datamigration/azure-mgmt-datamigration/azure/mgmt/datamigration/operations/_resource_skus_operations.py index af5a5a972c1b..e1ec7e1e5b8d 100644 --- a/sdk/datamigration/azure-mgmt-datamigration/azure/mgmt/datamigration/operations/_resource_skus_operations.py +++ b/sdk/datamigration/azure-mgmt-datamigration/azure/mgmt/datamigration/operations/_resource_skus_operations.py @@ -104,7 +104,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.ApiError, response) + error = self._deserialize.failsafe_deserialize(_models.ApiError, 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/datamigration/azure-mgmt-datamigration/azure/mgmt/datamigration/operations/_service_tasks_operations.py b/sdk/datamigration/azure-mgmt-datamigration/azure/mgmt/datamigration/operations/_service_tasks_operations.py index 0d628b718b79..1c6dd9958d86 100644 --- a/sdk/datamigration/azure-mgmt-datamigration/azure/mgmt/datamigration/operations/_service_tasks_operations.py +++ b/sdk/datamigration/azure-mgmt-datamigration/azure/mgmt/datamigration/operations/_service_tasks_operations.py @@ -120,7 +120,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.ApiError, response) + error = self._deserialize.failsafe_deserialize(_models.ApiError, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -136,8 +136,7 @@ def create_or_update( group_name, # type: str service_name, # type: str task_name, # type: str - etag=None, # type: Optional[str] - properties=None, # type: Optional["_models.ProjectTaskProperties"] + parameters, # type: "_models.ProjectTask" **kwargs # type: Any ): # type: (...) -> "_models.ProjectTask" @@ -154,10 +153,8 @@ def create_or_update( :type service_name: str :param task_name: Name of the Task. :type task_name: str - :param etag: HTTP strong entity tag value. This is ignored if submitted. - :type etag: str - :param properties: Custom task properties. - :type properties: ~azure.mgmt.datamigration.models.ProjectTaskProperties + :param parameters: Information about the task. + :type parameters: ~azure.mgmt.datamigration.models.ProjectTask :keyword callable cls: A custom type or function that will be passed the direct response :return: ProjectTask, or the result of cls(response) :rtype: ~azure.mgmt.datamigration.models.ProjectTask @@ -168,8 +165,6 @@ def create_or_update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - - _parameters = _models.ProjectTask(etag=etag, properties=properties) api_version = "2018-07-15-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -194,7 +189,7 @@ def create_or_update( header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(_parameters, 'ProjectTask') + body_content = self._serialize.body(parameters, 'ProjectTask') body_content_kwargs['content'] = body_content request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) @@ -202,7 +197,7 @@ def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ApiError, response) + error = self._deserialize.failsafe_deserialize(_models.ApiError, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -278,7 +273,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.ApiError, response) + error = self._deserialize.failsafe_deserialize(_models.ApiError, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('ProjectTask', pipeline_response) @@ -350,7 +345,7 @@ def delete( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ApiError, response) + error = self._deserialize.failsafe_deserialize(_models.ApiError, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -363,8 +358,7 @@ def update( group_name, # type: str service_name, # type: str task_name, # type: str - etag=None, # type: Optional[str] - properties=None, # type: Optional["_models.ProjectTaskProperties"] + parameters, # type: "_models.ProjectTask" **kwargs # type: Any ): # type: (...) -> "_models.ProjectTask" @@ -380,10 +374,8 @@ def update( :type service_name: str :param task_name: Name of the Task. :type task_name: str - :param etag: HTTP strong entity tag value. This is ignored if submitted. - :type etag: str - :param properties: Custom task properties. - :type properties: ~azure.mgmt.datamigration.models.ProjectTaskProperties + :param parameters: Information about the task. + :type parameters: ~azure.mgmt.datamigration.models.ProjectTask :keyword callable cls: A custom type or function that will be passed the direct response :return: ProjectTask, or the result of cls(response) :rtype: ~azure.mgmt.datamigration.models.ProjectTask @@ -394,8 +386,6 @@ def update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - - _parameters = _models.ProjectTask(etag=etag, properties=properties) api_version = "2018-07-15-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -420,7 +410,7 @@ def update( header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(_parameters, 'ProjectTask') + body_content = self._serialize.body(parameters, 'ProjectTask') body_content_kwargs['content'] = body_content request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) @@ -428,7 +418,7 @@ def update( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ApiError, response) + error = self._deserialize.failsafe_deserialize(_models.ApiError, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('ProjectTask', pipeline_response) @@ -495,7 +485,7 @@ def cancel( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ApiError, response) + error = self._deserialize.failsafe_deserialize(_models.ApiError, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('ProjectTask', pipeline_response) diff --git a/sdk/datamigration/azure-mgmt-datamigration/azure/mgmt/datamigration/operations/_services_operations.py b/sdk/datamigration/azure-mgmt-datamigration/azure/mgmt/datamigration/operations/_services_operations.py index c28c76fc7b9a..7924909938b1 100644 --- a/sdk/datamigration/azure-mgmt-datamigration/azure/mgmt/datamigration/operations/_services_operations.py +++ b/sdk/datamigration/azure-mgmt-datamigration/azure/mgmt/datamigration/operations/_services_operations.py @@ -91,7 +91,7 @@ def _create_or_update_initial( if response.status_code not in [200, 201, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ApiError, response) + error = self._deserialize.failsafe_deserialize(_models.ApiError, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = None @@ -134,8 +134,8 @@ def begin_create_or_update( :type parameters: ~azure.mgmt.datamigration.models.DataMigrationService :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 DataMigrationService or the result of cls(response) @@ -240,7 +240,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.ApiError, response) + error = self._deserialize.failsafe_deserialize(_models.ApiError, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('DataMigrationService', pipeline_response) @@ -292,7 +292,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.ApiError, response) + error = self._deserialize.failsafe_deserialize(_models.ApiError, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -321,8 +321,8 @@ def begin_delete( :type delete_running_tasks: bool :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) @@ -416,7 +416,7 @@ def _update_initial( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ApiError, response) + error = self._deserialize.failsafe_deserialize(_models.ApiError, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = None @@ -452,8 +452,8 @@ def begin_update( :type parameters: ~azure.mgmt.datamigration.models.DataMigrationService :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 DataMigrationService or the result of cls(response) @@ -559,7 +559,7 @@ def check_status( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ApiError, response) + error = self._deserialize.failsafe_deserialize(_models.ApiError, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('DataMigrationServiceStatusResponse', pipeline_response) @@ -608,7 +608,7 @@ def _start_initial( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ApiError, response) + error = self._deserialize.failsafe_deserialize(_models.ApiError, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -634,8 +634,8 @@ def begin_start( :type service_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) @@ -722,7 +722,7 @@ def _stop_initial( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ApiError, response) + error = self._deserialize.failsafe_deserialize(_models.ApiError, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -749,8 +749,8 @@ def begin_stop( :type service_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) @@ -867,7 +867,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.ApiError, response) + error = self._deserialize.failsafe_deserialize(_models.ApiError, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -882,8 +882,7 @@ def check_children_name_availability( self, group_name, # type: str service_name, # type: str - name=None, # type: Optional[str] - type=None, # type: Optional[str] + parameters, # type: "_models.NameAvailabilityRequest" **kwargs # type: Any ): # type: (...) -> "_models.NameAvailabilityResponse" @@ -895,10 +894,8 @@ def check_children_name_availability( :type group_name: str :param service_name: Name of the service. :type service_name: str - :param name: The proposed resource name. - :type name: str - :param type: The resource type chain (e.g. virtualMachines/extensions). - :type type: str + :param parameters: Requested name to validate. + :type parameters: ~azure.mgmt.datamigration.models.NameAvailabilityRequest :keyword callable cls: A custom type or function that will be passed the direct response :return: NameAvailabilityResponse, or the result of cls(response) :rtype: ~azure.mgmt.datamigration.models.NameAvailabilityResponse @@ -909,8 +906,6 @@ def check_children_name_availability( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - - _parameters = _models.NameAvailabilityRequest(name=name, type=type) api_version = "2018-07-15-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -934,7 +929,7 @@ def check_children_name_availability( header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(_parameters, 'NameAvailabilityRequest') + body_content = self._serialize.body(parameters, 'NameAvailabilityRequest') body_content_kwargs['content'] = body_content request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) @@ -942,7 +937,7 @@ def check_children_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.ApiError, response) + error = self._deserialize.failsafe_deserialize(_models.ApiError, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('NameAvailabilityResponse', pipeline_response) @@ -1017,7 +1012,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.ApiError, response) + error = self._deserialize.failsafe_deserialize(_models.ApiError, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -1088,7 +1083,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.ApiError, response) + error = self._deserialize.failsafe_deserialize(_models.ApiError, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -1102,8 +1097,7 @@ def get_next(next_link=None): def check_name_availability( self, location, # type: str - name=None, # type: Optional[str] - type=None, # type: Optional[str] + parameters, # type: "_models.NameAvailabilityRequest" **kwargs # type: Any ): # type: (...) -> "_models.NameAvailabilityResponse" @@ -1113,10 +1107,8 @@ def check_name_availability( :param location: The Azure region of the operation. :type location: str - :param name: The proposed resource name. - :type name: str - :param type: The resource type chain (e.g. virtualMachines/extensions). - :type type: str + :param parameters: Requested name to validate. + :type parameters: ~azure.mgmt.datamigration.models.NameAvailabilityRequest :keyword callable cls: A custom type or function that will be passed the direct response :return: NameAvailabilityResponse, or the result of cls(response) :rtype: ~azure.mgmt.datamigration.models.NameAvailabilityResponse @@ -1127,8 +1119,6 @@ def check_name_availability( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - - _parameters = _models.NameAvailabilityRequest(name=name, type=type) api_version = "2018-07-15-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -1151,7 +1141,7 @@ def check_name_availability( header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(_parameters, 'NameAvailabilityRequest') + body_content = self._serialize.body(parameters, 'NameAvailabilityRequest') body_content_kwargs['content'] = body_content request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) @@ -1159,7 +1149,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.ApiError, response) + error = self._deserialize.failsafe_deserialize(_models.ApiError, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('NameAvailabilityResponse', pipeline_response) diff --git a/sdk/datamigration/azure-mgmt-datamigration/azure/mgmt/datamigration/operations/_tasks_operations.py b/sdk/datamigration/azure-mgmt-datamigration/azure/mgmt/datamigration/operations/_tasks_operations.py index 1232089f7a76..ea9a4476a344 100644 --- a/sdk/datamigration/azure-mgmt-datamigration/azure/mgmt/datamigration/operations/_tasks_operations.py +++ b/sdk/datamigration/azure-mgmt-datamigration/azure/mgmt/datamigration/operations/_tasks_operations.py @@ -123,7 +123,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.ApiError, response) + error = self._deserialize.failsafe_deserialize(_models.ApiError, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -140,8 +140,7 @@ def create_or_update( service_name, # type: str project_name, # type: str task_name, # type: str - etag=None, # type: Optional[str] - properties=None, # type: Optional["_models.ProjectTaskProperties"] + parameters, # type: "_models.ProjectTask" **kwargs # type: Any ): # type: (...) -> "_models.ProjectTask" @@ -159,10 +158,8 @@ def create_or_update( :type project_name: str :param task_name: Name of the Task. :type task_name: str - :param etag: HTTP strong entity tag value. This is ignored if submitted. - :type etag: str - :param properties: Custom task properties. - :type properties: ~azure.mgmt.datamigration.models.ProjectTaskProperties + :param parameters: Information about the task. + :type parameters: ~azure.mgmt.datamigration.models.ProjectTask :keyword callable cls: A custom type or function that will be passed the direct response :return: ProjectTask, or the result of cls(response) :rtype: ~azure.mgmt.datamigration.models.ProjectTask @@ -173,8 +170,6 @@ def create_or_update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - - _parameters = _models.ProjectTask(etag=etag, properties=properties) api_version = "2018-07-15-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -200,7 +195,7 @@ def create_or_update( header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(_parameters, 'ProjectTask') + body_content = self._serialize.body(parameters, 'ProjectTask') body_content_kwargs['content'] = body_content request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) @@ -208,7 +203,7 @@ def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ApiError, response) + error = self._deserialize.failsafe_deserialize(_models.ApiError, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -288,7 +283,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.ApiError, response) + error = self._deserialize.failsafe_deserialize(_models.ApiError, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('ProjectTask', pipeline_response) @@ -364,7 +359,7 @@ def delete( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ApiError, response) + error = self._deserialize.failsafe_deserialize(_models.ApiError, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -378,8 +373,7 @@ def update( service_name, # type: str project_name, # type: str task_name, # type: str - etag=None, # type: Optional[str] - properties=None, # type: Optional["_models.ProjectTaskProperties"] + parameters, # type: "_models.ProjectTask" **kwargs # type: Any ): # type: (...) -> "_models.ProjectTask" @@ -397,10 +391,8 @@ def update( :type project_name: str :param task_name: Name of the Task. :type task_name: str - :param etag: HTTP strong entity tag value. This is ignored if submitted. - :type etag: str - :param properties: Custom task properties. - :type properties: ~azure.mgmt.datamigration.models.ProjectTaskProperties + :param parameters: Information about the task. + :type parameters: ~azure.mgmt.datamigration.models.ProjectTask :keyword callable cls: A custom type or function that will be passed the direct response :return: ProjectTask, or the result of cls(response) :rtype: ~azure.mgmt.datamigration.models.ProjectTask @@ -411,8 +403,6 @@ def update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - - _parameters = _models.ProjectTask(etag=etag, properties=properties) api_version = "2018-07-15-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -438,7 +428,7 @@ def update( header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(_parameters, 'ProjectTask') + body_content = self._serialize.body(parameters, 'ProjectTask') body_content_kwargs['content'] = body_content request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) @@ -446,7 +436,7 @@ def update( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ApiError, response) + error = self._deserialize.failsafe_deserialize(_models.ApiError, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('ProjectTask', pipeline_response) @@ -517,7 +507,7 @@ def cancel( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ApiError, response) + error = self._deserialize.failsafe_deserialize(_models.ApiError, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('ProjectTask', pipeline_response) @@ -596,7 +586,7 @@ def command( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ApiError, response) + error = self._deserialize.failsafe_deserialize(_models.ApiError, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('CommandProperties', pipeline_response) diff --git a/sdk/datamigration/azure-mgmt-datamigration/azure/mgmt/datamigration/operations/_usages_operations.py b/sdk/datamigration/azure-mgmt-datamigration/azure/mgmt/datamigration/operations/_usages_operations.py index 535a0647e219..d7b73afe05b0 100644 --- a/sdk/datamigration/azure-mgmt-datamigration/azure/mgmt/datamigration/operations/_usages_operations.py +++ b/sdk/datamigration/azure-mgmt-datamigration/azure/mgmt/datamigration/operations/_usages_operations.py @@ -109,7 +109,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.ApiError, response) + error = self._deserialize.failsafe_deserialize(_models.ApiError, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)