diff --git a/sdk/operationsmanagement/azure-mgmt-operationsmanagement/MANIFEST.in b/sdk/operationsmanagement/azure-mgmt-operationsmanagement/MANIFEST.in index a3cb07df8765..3a9b6517412b 100644 --- a/sdk/operationsmanagement/azure-mgmt-operationsmanagement/MANIFEST.in +++ b/sdk/operationsmanagement/azure-mgmt-operationsmanagement/MANIFEST.in @@ -1,3 +1,4 @@ +include _meta.json recursive-include tests *.py *.yaml include *.md include azure/__init__.py diff --git a/sdk/operationsmanagement/azure-mgmt-operationsmanagement/_meta.json b/sdk/operationsmanagement/azure-mgmt-operationsmanagement/_meta.json new file mode 100644 index 000000000000..285ab1a0c8c9 --- /dev/null +++ b/sdk/operationsmanagement/azure-mgmt-operationsmanagement/_meta.json @@ -0,0 +1,11 @@ +{ + "autorest": "3.4.2", + "use": [ + "@autorest/python@5.8.1", + "@autorest/modelerfour@4.19.2" + ], + "commit": "32933ef052fcd30901fe4282e7ebe301165f7f0b", + "repository_url": "https://github.com/Azure/azure-rest-api-specs", + "autorest_command": "autorest specification/operationsmanagement/resource-manager/readme.md --multiapi --python --python-mode=update --python-sdks-folder=/home/vsts/work/1/s/azure-sdk-for-python/sdk --track2 --use=@autorest/python@5.8.1 --use=@autorest/modelerfour@4.19.2 --version=3.4.2", + "readme": "specification/operationsmanagement/resource-manager/readme.md" +} \ No newline at end of file diff --git a/sdk/operationsmanagement/azure-mgmt-operationsmanagement/azure/mgmt/operationsmanagement/_metadata.json b/sdk/operationsmanagement/azure-mgmt-operationsmanagement/azure/mgmt/operationsmanagement/_metadata.json new file mode 100644 index 000000000000..ba4ad8d56287 --- /dev/null +++ b/sdk/operationsmanagement/azure-mgmt-operationsmanagement/azure/mgmt/operationsmanagement/_metadata.json @@ -0,0 +1,142 @@ +{ + "chosen_version": "2015-11-01-preview", + "total_api_version_list": ["2015-11-01-preview"], + "client": { + "name": "OperationsManagementClient", + "filename": "_operations_management_client", + "description": "Operations Management 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\": [\"OperationsManagementClientConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}, \"azurecore\": {\"azure.core.pipeline.transport\": [\"HttpRequest\", \"HttpResponse\"]}}}", + "async_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"AsyncARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"OperationsManagementClientConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}, \"azurecore\": {\"azure.core.pipeline.transport\": [\"AsyncHttpResponse\", \"HttpRequest\"]}}}" + }, + "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": "Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.", + "docstring_type": "str", + "required": true + }, + "provider_name": { + "signature": "provider_name, # type: str", + "description": "Provider name for the parent resource.", + "docstring_type": "str", + "required": true + }, + "resource_type": { + "signature": "resource_type, # type: str", + "description": "Resource type for the parent resource.", + "docstring_type": "str", + "required": true + }, + "resource_name": { + "signature": "resource_name, # type: str", + "description": "Parent resource name.", + "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": "Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.", + "docstring_type": "str", + "required": true + }, + "provider_name": { + "signature": "provider_name: str,", + "description": "Provider name for the parent resource.", + "docstring_type": "str", + "required": true + }, + "resource_type": { + "signature": "resource_type: str,", + "description": "Resource type for the parent resource.", + "docstring_type": "str", + "required": true + }, + "resource_name": { + "signature": "resource_name: str,", + "description": "Parent resource name.", + "docstring_type": "str", + "required": true + } + }, + "constant": { + }, + "call": "credential, subscription_id, provider_name, resource_type, resource_name", + "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": { + "solutions": "SolutionsOperations", + "management_associations": "ManagementAssociationsOperations", + "management_configurations": "ManagementConfigurationsOperations", + "operations": "Operations" + } +} \ No newline at end of file diff --git a/sdk/operationsmanagement/azure-mgmt-operationsmanagement/azure/mgmt/operationsmanagement/_operations_management_client.py b/sdk/operationsmanagement/azure-mgmt-operationsmanagement/azure/mgmt/operationsmanagement/_operations_management_client.py index a238c223573f..bf32f50bbe59 100644 --- a/sdk/operationsmanagement/azure-mgmt-operationsmanagement/azure/mgmt/operationsmanagement/_operations_management_client.py +++ b/sdk/operationsmanagement/azure-mgmt-operationsmanagement/azure/mgmt/operationsmanagement/_operations_management_client.py @@ -16,6 +16,7 @@ from typing import Any, Optional from azure.core.credentials import TokenCredential + from azure.core.pipeline.transport import HttpRequest, HttpResponse from ._configuration import OperationsManagementClientConfiguration from .operations import SolutionsOperations @@ -80,6 +81,27 @@ def __init__( self.operations = Operations( self._client, self._config, self._serialize, self._deserialize) + def _send_request(self, http_request, **kwargs): + # type: (HttpRequest, Any) -> HttpResponse + """Runs the network request through the client's chained policies. + + :param http_request: The network request you want to make. Required. + :type http_request: ~azure.core.pipeline.transport.HttpRequest + :keyword bool stream: Whether the response payload will be streamed. Defaults to True. + :return: The response of your network call. Does not do error handling on your response. + :rtype: ~azure.core.pipeline.transport.HttpResponse + """ + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'providerName': self._serialize.url("self._config.provider_name", self._config.provider_name, 'str'), + 'resourceType': self._serialize.url("self._config.resource_type", self._config.resource_type, 'str'), + 'resourceName': self._serialize.url("self._config.resource_name", self._config.resource_name, 'str'), + } + http_request.url = self._client.format_url(http_request.url, **path_format_arguments) + stream = kwargs.pop("stream", True) + pipeline_response = self._client._pipeline.run(http_request, stream=stream, **kwargs) + return pipeline_response.http_response + def close(self): # type: () -> None self._client.close() diff --git a/sdk/operationsmanagement/azure-mgmt-operationsmanagement/azure/mgmt/operationsmanagement/_version.py b/sdk/operationsmanagement/azure-mgmt-operationsmanagement/azure/mgmt/operationsmanagement/_version.py index c47f66669f1b..e5754a47ce68 100644 --- a/sdk/operationsmanagement/azure-mgmt-operationsmanagement/azure/mgmt/operationsmanagement/_version.py +++ b/sdk/operationsmanagement/azure-mgmt-operationsmanagement/azure/mgmt/operationsmanagement/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "1.0.0" +VERSION = "1.0.0b1" diff --git a/sdk/operationsmanagement/azure-mgmt-operationsmanagement/azure/mgmt/operationsmanagement/aio/_operations_management_client.py b/sdk/operationsmanagement/azure-mgmt-operationsmanagement/azure/mgmt/operationsmanagement/aio/_operations_management_client.py index e84b186c4ce8..3cac9fb48a3b 100644 --- a/sdk/operationsmanagement/azure-mgmt-operationsmanagement/azure/mgmt/operationsmanagement/aio/_operations_management_client.py +++ b/sdk/operationsmanagement/azure-mgmt-operationsmanagement/azure/mgmt/operationsmanagement/aio/_operations_management_client.py @@ -8,6 +8,7 @@ from typing import Any, Optional, TYPE_CHECKING +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest from azure.mgmt.core import AsyncARMPipelineClient from msrest import Deserializer, Serializer @@ -77,6 +78,26 @@ def __init__( self.operations = Operations( self._client, self._config, self._serialize, self._deserialize) + async def _send_request(self, http_request: HttpRequest, **kwargs: Any) -> AsyncHttpResponse: + """Runs the network request through the client's chained policies. + + :param http_request: The network request you want to make. Required. + :type http_request: ~azure.core.pipeline.transport.HttpRequest + :keyword bool stream: Whether the response payload will be streamed. Defaults to True. + :return: The response of your network call. Does not do error handling on your response. + :rtype: ~azure.core.pipeline.transport.AsyncHttpResponse + """ + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'providerName': self._serialize.url("self._config.provider_name", self._config.provider_name, 'str'), + 'resourceType': self._serialize.url("self._config.resource_type", self._config.resource_type, 'str'), + 'resourceName': self._serialize.url("self._config.resource_name", self._config.resource_name, 'str'), + } + http_request.url = self._client.format_url(http_request.url, **path_format_arguments) + stream = kwargs.pop("stream", True) + pipeline_response = await self._client._pipeline.run(http_request, stream=stream, **kwargs) + return pipeline_response.http_response + async def close(self) -> None: await self._client.close() diff --git a/sdk/operationsmanagement/azure-mgmt-operationsmanagement/azure/mgmt/operationsmanagement/aio/operations/_management_associations_operations.py b/sdk/operationsmanagement/azure-mgmt-operationsmanagement/azure/mgmt/operationsmanagement/aio/operations/_management_associations_operations.py index 9752545e8b93..393ed998d4aa 100644 --- a/sdk/operationsmanagement/azure-mgmt-operationsmanagement/azure/mgmt/operationsmanagement/aio/operations/_management_associations_operations.py +++ b/sdk/operationsmanagement/azure-mgmt-operationsmanagement/azure/mgmt/operationsmanagement/aio/operations/_management_associations_operations.py @@ -42,7 +42,7 @@ def __init__(self, client, config, serializer, deserializer) -> None: async def list_by_subscription( self, - **kwargs + **kwargs: Any ) -> "_models.ManagementAssociationPropertiesList": """Retrieves the ManagementAssociations list for the subscription. @@ -82,7 +82,7 @@ async def list_by_subscription( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.CodeMessageError, response) + error = self._deserialize.failsafe_deserialize(_models.CodeMessageError, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('ManagementAssociationPropertiesList', pipeline_response) @@ -98,7 +98,7 @@ async def create_or_update( resource_group_name: str, management_association_name: str, parameters: "_models.ManagementAssociation", - **kwargs + **kwargs: Any ) -> "_models.ManagementAssociation": """Create/Update ManagementAssociation. @@ -155,7 +155,7 @@ async def create_or_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.CodeMessageError, response) + error = self._deserialize.failsafe_deserialize(_models.CodeMessageError, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('ManagementAssociation', pipeline_response) @@ -170,7 +170,7 @@ async def delete( self, resource_group_name: str, management_association_name: str, - **kwargs + **kwargs: Any ) -> None: """Deletes the ManagementAssociation. @@ -220,7 +220,7 @@ async def delete( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.CodeMessageError, response) + error = self._deserialize.failsafe_deserialize(_models.CodeMessageError, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -232,7 +232,7 @@ async def get( self, resource_group_name: str, management_association_name: str, - **kwargs + **kwargs: Any ) -> "_models.ManagementAssociation": """Retrieve ManagementAssociation. @@ -282,7 +282,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.CodeMessageError, response) + error = self._deserialize.failsafe_deserialize(_models.CodeMessageError, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('ManagementAssociation', pipeline_response) diff --git a/sdk/operationsmanagement/azure-mgmt-operationsmanagement/azure/mgmt/operationsmanagement/aio/operations/_management_configurations_operations.py b/sdk/operationsmanagement/azure-mgmt-operationsmanagement/azure/mgmt/operationsmanagement/aio/operations/_management_configurations_operations.py index b49b047f397b..f149502100fc 100644 --- a/sdk/operationsmanagement/azure-mgmt-operationsmanagement/azure/mgmt/operationsmanagement/aio/operations/_management_configurations_operations.py +++ b/sdk/operationsmanagement/azure-mgmt-operationsmanagement/azure/mgmt/operationsmanagement/aio/operations/_management_configurations_operations.py @@ -42,7 +42,7 @@ def __init__(self, client, config, serializer, deserializer) -> None: async def list_by_subscription( self, - **kwargs + **kwargs: Any ) -> "_models.ManagementConfigurationPropertiesList": """Retrieves the ManagementConfigurations list for the subscription. @@ -82,7 +82,7 @@ async def list_by_subscription( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.CodeMessageError, response) + error = self._deserialize.failsafe_deserialize(_models.CodeMessageError, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('ManagementConfigurationPropertiesList', pipeline_response) @@ -98,7 +98,7 @@ async def create_or_update( resource_group_name: str, management_configuration_name: str, parameters: "_models.ManagementConfiguration", - **kwargs + **kwargs: Any ) -> "_models.ManagementConfiguration": """Create/Update ManagementConfiguration. @@ -152,7 +152,7 @@ async def create_or_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.CodeMessageError, response) + error = self._deserialize.failsafe_deserialize(_models.CodeMessageError, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('ManagementConfiguration', pipeline_response) @@ -167,7 +167,7 @@ async def delete( self, resource_group_name: str, management_configuration_name: str, - **kwargs + **kwargs: Any ) -> None: """Deletes the ManagementConfiguration. @@ -214,7 +214,7 @@ async def delete( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.CodeMessageError, response) + error = self._deserialize.failsafe_deserialize(_models.CodeMessageError, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -226,7 +226,7 @@ async def get( self, resource_group_name: str, management_configuration_name: str, - **kwargs + **kwargs: Any ) -> "_models.ManagementConfiguration": """Retrieve ManagementConfiguration. @@ -273,7 +273,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.CodeMessageError, response) + error = self._deserialize.failsafe_deserialize(_models.CodeMessageError, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('ManagementConfiguration', pipeline_response) diff --git a/sdk/operationsmanagement/azure-mgmt-operationsmanagement/azure/mgmt/operationsmanagement/aio/operations/_operations.py b/sdk/operationsmanagement/azure-mgmt-operationsmanagement/azure/mgmt/operationsmanagement/aio/operations/_operations.py index dea0f92cce7b..ae8b41a86a91 100644 --- a/sdk/operationsmanagement/azure-mgmt-operationsmanagement/azure/mgmt/operationsmanagement/aio/operations/_operations.py +++ b/sdk/operationsmanagement/azure-mgmt-operationsmanagement/azure/mgmt/operationsmanagement/aio/operations/_operations.py @@ -43,7 +43,7 @@ def __init__(self, client, config, serializer, deserializer) -> None: def list( self, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.OperationListResult"]: """Lists all of the available OperationsManagement Rest API operations. diff --git a/sdk/operationsmanagement/azure-mgmt-operationsmanagement/azure/mgmt/operationsmanagement/aio/operations/_solutions_operations.py b/sdk/operationsmanagement/azure-mgmt-operationsmanagement/azure/mgmt/operationsmanagement/aio/operations/_solutions_operations.py index 428fb9fd0d65..b9b6b1b4ef22 100644 --- a/sdk/operationsmanagement/azure-mgmt-operationsmanagement/azure/mgmt/operationsmanagement/aio/operations/_solutions_operations.py +++ b/sdk/operationsmanagement/azure-mgmt-operationsmanagement/azure/mgmt/operationsmanagement/aio/operations/_solutions_operations.py @@ -47,7 +47,7 @@ async def _create_or_update_initial( resource_group_name: str, solution_name: str, parameters: "_models.Solution", - **kwargs + **kwargs: Any ) -> "_models.Solution": cls = kwargs.pop('cls', None) # type: ClsType["_models.Solution"] error_map = { @@ -85,7 +85,7 @@ async def _create_or_update_initial( if response.status_code not in [201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.CodeMessageError, response) + error = self._deserialize.failsafe_deserialize(_models.CodeMessageError, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('Solution', pipeline_response) @@ -101,7 +101,7 @@ async def begin_create_or_update( resource_group_name: str, solution_name: str, parameters: "_models.Solution", - **kwargs + **kwargs: Any ) -> AsyncLROPoller["_models.Solution"]: """Create/Update Solution. @@ -116,8 +116,8 @@ async def begin_create_or_update( :type parameters: ~azure.mgmt.operationsmanagement.models.Solution :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either Solution or the result of cls(response) @@ -175,7 +175,7 @@ async def _update_initial( resource_group_name: str, solution_name: str, parameters: "_models.SolutionPatch", - **kwargs + **kwargs: Any ) -> "_models.Solution": cls = kwargs.pop('cls', None) # type: ClsType["_models.Solution"] error_map = { @@ -213,7 +213,7 @@ async def _update_initial( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.CodeMessageError, response) + error = self._deserialize.failsafe_deserialize(_models.CodeMessageError, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('Solution', pipeline_response) @@ -229,7 +229,7 @@ async def begin_update( resource_group_name: str, solution_name: str, parameters: "_models.SolutionPatch", - **kwargs + **kwargs: Any ) -> AsyncLROPoller["_models.Solution"]: """Patch a Solution. @@ -244,8 +244,8 @@ async def begin_update( :type parameters: ~azure.mgmt.operationsmanagement.models.SolutionPatch :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either Solution or the result of cls(response) @@ -302,7 +302,7 @@ async def _delete_initial( self, resource_group_name: str, solution_name: str, - **kwargs + **kwargs: Any ) -> None: cls = kwargs.pop('cls', None) # type: ClsType[None] error_map = { @@ -335,7 +335,7 @@ async def _delete_initial( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.CodeMessageError, response) + error = self._deserialize.failsafe_deserialize(_models.CodeMessageError, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -347,7 +347,7 @@ async def begin_delete( self, resource_group_name: str, solution_name: str, - **kwargs + **kwargs: Any ) -> AsyncLROPoller[None]: """Deletes the solution. @@ -360,8 +360,8 @@ async def begin_delete( :type solution_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) @@ -414,7 +414,7 @@ async def get( self, resource_group_name: str, solution_name: str, - **kwargs + **kwargs: Any ) -> "_models.Solution": """Retrieve solution. @@ -461,7 +461,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.CodeMessageError, response) + error = self._deserialize.failsafe_deserialize(_models.CodeMessageError, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('Solution', pipeline_response) @@ -475,7 +475,7 @@ async def get( async def list_by_resource_group( self, resource_group_name: str, - **kwargs + **kwargs: Any ) -> "_models.SolutionPropertiesList": """Retrieves the solution list for the subscription. @@ -519,7 +519,7 @@ async def list_by_resource_group( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.CodeMessageError, response) + error = self._deserialize.failsafe_deserialize(_models.CodeMessageError, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('SolutionPropertiesList', pipeline_response) @@ -532,7 +532,7 @@ async def list_by_resource_group( async def list_by_subscription( self, - **kwargs + **kwargs: Any ) -> "_models.SolutionPropertiesList": """Retrieves the solution list for the subscription. @@ -572,7 +572,7 @@ async def list_by_subscription( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.CodeMessageError, response) + error = self._deserialize.failsafe_deserialize(_models.CodeMessageError, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('SolutionPropertiesList', pipeline_response) diff --git a/sdk/operationsmanagement/azure-mgmt-operationsmanagement/azure/mgmt/operationsmanagement/models/__init__.py b/sdk/operationsmanagement/azure-mgmt-operationsmanagement/azure/mgmt/operationsmanagement/models/__init__.py index 938bae76ee6f..b0b5d76a56e1 100644 --- a/sdk/operationsmanagement/azure-mgmt-operationsmanagement/azure/mgmt/operationsmanagement/models/__init__.py +++ b/sdk/operationsmanagement/azure-mgmt-operationsmanagement/azure/mgmt/operationsmanagement/models/__init__.py @@ -9,7 +9,7 @@ try: from ._models_py3 import ArmTemplateParameter from ._models_py3 import CodeMessageError - from ._models_py3 import CodeMessageErrorAutoGenerated + from ._models_py3 import CodeMessageErrorError from ._models_py3 import ManagementAssociation from ._models_py3 import ManagementAssociationProperties from ._models_py3 import ManagementAssociationPropertiesList @@ -27,7 +27,7 @@ except (SyntaxError, ImportError): from ._models import ArmTemplateParameter # type: ignore from ._models import CodeMessageError # type: ignore - from ._models import CodeMessageErrorAutoGenerated # type: ignore + from ._models import CodeMessageErrorError # type: ignore from ._models import ManagementAssociation # type: ignore from ._models import ManagementAssociationProperties # type: ignore from ._models import ManagementAssociationPropertiesList # type: ignore @@ -46,7 +46,7 @@ __all__ = [ 'ArmTemplateParameter', 'CodeMessageError', - 'CodeMessageErrorAutoGenerated', + 'CodeMessageErrorError', 'ManagementAssociation', 'ManagementAssociationProperties', 'ManagementAssociationPropertiesList', diff --git a/sdk/operationsmanagement/azure-mgmt-operationsmanagement/azure/mgmt/operationsmanagement/models/_models.py b/sdk/operationsmanagement/azure-mgmt-operationsmanagement/azure/mgmt/operationsmanagement/models/_models.py index e1a3a4ab0859..b52c019ed260 100644 --- a/sdk/operationsmanagement/azure-mgmt-operationsmanagement/azure/mgmt/operationsmanagement/models/_models.py +++ b/sdk/operationsmanagement/azure-mgmt-operationsmanagement/azure/mgmt/operationsmanagement/models/_models.py @@ -37,11 +37,11 @@ class CodeMessageError(msrest.serialization.Model): """The error body contract. :param error: The error details for a failed request. - :type error: ~azure.mgmt.operationsmanagement.models.CodeMessageErrorAutoGenerated + :type error: ~azure.mgmt.operationsmanagement.models.CodeMessageErrorError """ _attribute_map = { - 'error': {'key': 'error', 'type': 'CodeMessageErrorAutoGenerated'}, + 'error': {'key': 'error', 'type': 'CodeMessageErrorError'}, } def __init__( @@ -52,7 +52,7 @@ def __init__( self.error = kwargs.get('error', None) -class CodeMessageErrorAutoGenerated(msrest.serialization.Model): +class CodeMessageErrorError(msrest.serialization.Model): """The error details for a failed request. :param code: The error type. @@ -70,7 +70,7 @@ def __init__( self, **kwargs ): - super(CodeMessageErrorAutoGenerated, self).__init__(**kwargs) + super(CodeMessageErrorError, self).__init__(**kwargs) self.code = kwargs.get('code', None) self.message = kwargs.get('message', None) @@ -223,7 +223,7 @@ class ManagementConfigurationProperties(msrest.serialization.Model): :ivar provisioning_state: The provisioning state for the ManagementConfiguration. :vartype provisioning_state: str :param template: Required. The Json object containing the ARM template to deploy. - :type template: object + :type template: any """ _validation = { diff --git a/sdk/operationsmanagement/azure-mgmt-operationsmanagement/azure/mgmt/operationsmanagement/models/_models_py3.py b/sdk/operationsmanagement/azure-mgmt-operationsmanagement/azure/mgmt/operationsmanagement/models/_models_py3.py index a7fca052ac05..f95647459c66 100644 --- a/sdk/operationsmanagement/azure-mgmt-operationsmanagement/azure/mgmt/operationsmanagement/models/_models_py3.py +++ b/sdk/operationsmanagement/azure-mgmt-operationsmanagement/azure/mgmt/operationsmanagement/models/_models_py3.py @@ -6,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Dict, List, Optional +from typing import Any, Dict, List, Optional from azure.core.exceptions import HttpResponseError import msrest.serialization @@ -42,24 +42,24 @@ class CodeMessageError(msrest.serialization.Model): """The error body contract. :param error: The error details for a failed request. - :type error: ~azure.mgmt.operationsmanagement.models.CodeMessageErrorAutoGenerated + :type error: ~azure.mgmt.operationsmanagement.models.CodeMessageErrorError """ _attribute_map = { - 'error': {'key': 'error', 'type': 'CodeMessageErrorAutoGenerated'}, + 'error': {'key': 'error', 'type': 'CodeMessageErrorError'}, } def __init__( self, *, - error: Optional["CodeMessageErrorAutoGenerated"] = None, + error: Optional["CodeMessageErrorError"] = None, **kwargs ): super(CodeMessageError, self).__init__(**kwargs) self.error = error -class CodeMessageErrorAutoGenerated(msrest.serialization.Model): +class CodeMessageErrorError(msrest.serialization.Model): """The error details for a failed request. :param code: The error type. @@ -80,7 +80,7 @@ def __init__( message: Optional[str] = None, **kwargs ): - super(CodeMessageErrorAutoGenerated, self).__init__(**kwargs) + super(CodeMessageErrorError, self).__init__(**kwargs) self.code = code self.message = message @@ -243,7 +243,7 @@ class ManagementConfigurationProperties(msrest.serialization.Model): :ivar provisioning_state: The provisioning state for the ManagementConfiguration. :vartype provisioning_state: str :param template: Required. The Json object containing the ARM template to deploy. - :type template: object + :type template: any """ _validation = { @@ -266,7 +266,7 @@ def __init__( *, parent_resource_type: str, parameters: List["ArmTemplateParameter"], - template: object, + template: Any, application_id: Optional[str] = None, **kwargs ): diff --git a/sdk/operationsmanagement/azure-mgmt-operationsmanagement/azure/mgmt/operationsmanagement/operations/_management_associations_operations.py b/sdk/operationsmanagement/azure-mgmt-operationsmanagement/azure/mgmt/operationsmanagement/operations/_management_associations_operations.py index 63c392c79e85..f2ea9e5a0568 100644 --- a/sdk/operationsmanagement/azure-mgmt-operationsmanagement/azure/mgmt/operationsmanagement/operations/_management_associations_operations.py +++ b/sdk/operationsmanagement/azure-mgmt-operationsmanagement/azure/mgmt/operationsmanagement/operations/_management_associations_operations.py @@ -87,7 +87,7 @@ def list_by_subscription( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.CodeMessageError, response) + error = self._deserialize.failsafe_deserialize(_models.CodeMessageError, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('ManagementAssociationPropertiesList', pipeline_response) @@ -161,7 +161,7 @@ def create_or_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.CodeMessageError, response) + error = self._deserialize.failsafe_deserialize(_models.CodeMessageError, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('ManagementAssociation', pipeline_response) @@ -227,7 +227,7 @@ def delete( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.CodeMessageError, response) + error = self._deserialize.failsafe_deserialize(_models.CodeMessageError, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -290,7 +290,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.CodeMessageError, response) + error = self._deserialize.failsafe_deserialize(_models.CodeMessageError, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('ManagementAssociation', pipeline_response) diff --git a/sdk/operationsmanagement/azure-mgmt-operationsmanagement/azure/mgmt/operationsmanagement/operations/_management_configurations_operations.py b/sdk/operationsmanagement/azure-mgmt-operationsmanagement/azure/mgmt/operationsmanagement/operations/_management_configurations_operations.py index ee5b12165c84..382a25370964 100644 --- a/sdk/operationsmanagement/azure-mgmt-operationsmanagement/azure/mgmt/operationsmanagement/operations/_management_configurations_operations.py +++ b/sdk/operationsmanagement/azure-mgmt-operationsmanagement/azure/mgmt/operationsmanagement/operations/_management_configurations_operations.py @@ -87,7 +87,7 @@ def list_by_subscription( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.CodeMessageError, response) + error = self._deserialize.failsafe_deserialize(_models.CodeMessageError, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('ManagementConfigurationPropertiesList', pipeline_response) @@ -158,7 +158,7 @@ def create_or_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.CodeMessageError, response) + error = self._deserialize.failsafe_deserialize(_models.CodeMessageError, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('ManagementConfiguration', pipeline_response) @@ -221,7 +221,7 @@ def delete( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.CodeMessageError, response) + error = self._deserialize.failsafe_deserialize(_models.CodeMessageError, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -281,7 +281,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.CodeMessageError, response) + error = self._deserialize.failsafe_deserialize(_models.CodeMessageError, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('ManagementConfiguration', pipeline_response) diff --git a/sdk/operationsmanagement/azure-mgmt-operationsmanagement/azure/mgmt/operationsmanagement/operations/_solutions_operations.py b/sdk/operationsmanagement/azure-mgmt-operationsmanagement/azure/mgmt/operationsmanagement/operations/_solutions_operations.py index f9ce6489022e..0a9beb6152ad 100644 --- a/sdk/operationsmanagement/azure-mgmt-operationsmanagement/azure/mgmt/operationsmanagement/operations/_solutions_operations.py +++ b/sdk/operationsmanagement/azure-mgmt-operationsmanagement/azure/mgmt/operationsmanagement/operations/_solutions_operations.py @@ -90,7 +90,7 @@ def _create_or_update_initial( if response.status_code not in [201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.CodeMessageError, response) + error = self._deserialize.failsafe_deserialize(_models.CodeMessageError, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('Solution', pipeline_response) @@ -122,8 +122,8 @@ def begin_create_or_update( :type parameters: ~azure.mgmt.operationsmanagement.models.Solution :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either Solution or the result of cls(response) @@ -220,7 +220,7 @@ def _update_initial( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.CodeMessageError, response) + error = self._deserialize.failsafe_deserialize(_models.CodeMessageError, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('Solution', pipeline_response) @@ -252,8 +252,8 @@ def begin_update( :type parameters: ~azure.mgmt.operationsmanagement.models.SolutionPatch :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either Solution or the result of cls(response) @@ -344,7 +344,7 @@ def _delete_initial( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.CodeMessageError, response) + error = self._deserialize.failsafe_deserialize(_models.CodeMessageError, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -370,8 +370,8 @@ def begin_delete( :type solution_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either None or the result of cls(response) @@ -472,7 +472,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.CodeMessageError, response) + error = self._deserialize.failsafe_deserialize(_models.CodeMessageError, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('Solution', pipeline_response) @@ -531,7 +531,7 @@ def list_by_resource_group( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.CodeMessageError, response) + error = self._deserialize.failsafe_deserialize(_models.CodeMessageError, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('SolutionPropertiesList', pipeline_response) @@ -585,7 +585,7 @@ def list_by_subscription( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.CodeMessageError, response) + error = self._deserialize.failsafe_deserialize(_models.CodeMessageError, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('SolutionPropertiesList', pipeline_response)