From 61421e64e4cbb81e633e5ca8b8721e9779351d04 Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Fri, 7 May 2021 02:34:04 +0000 Subject: [PATCH] CodeGen from PR 14277 in Azure/azure-rest-api-specs AzureStackHCI wave4 (#14277) Co-authored-by: Yan Zhang (WICRESOFT NORTH AMERICA LTD) --- .../azure-mgmt-azurestackhci/MANIFEST.in | 1 + .../azure-mgmt-azurestackhci/_meta.json | 8 ++ .../azurestackhci/_azure_stack_hci_client.py | 23 +++- .../azure/mgmt/azurestackhci/_metadata.json | 104 ++++++++++++++++++ .../azure/mgmt/azurestackhci/_version.py | 3 +- .../aio/_azure_stack_hci_client.py | 22 +++- .../aio/operations/_clusters_operations.py | 28 ++--- .../aio/operations/_operations.py | 6 +- .../mgmt/azurestackhci/models/__init__.py | 2 + .../models/_azure_stack_hci_client_enums.py | 9 ++ .../mgmt/azurestackhci/models/_models.py | 56 +++++++--- .../mgmt/azurestackhci/models/_models_py3.py | 69 +++++++++--- .../operations/_clusters_operations.py | 28 ++--- .../azurestackhci/operations/_operations.py | 6 +- 14 files changed, 293 insertions(+), 72 deletions(-) create mode 100644 sdk/azurestackhci/azure-mgmt-azurestackhci/_meta.json create mode 100644 sdk/azurestackhci/azure-mgmt-azurestackhci/azure/mgmt/azurestackhci/_metadata.json diff --git a/sdk/azurestackhci/azure-mgmt-azurestackhci/MANIFEST.in b/sdk/azurestackhci/azure-mgmt-azurestackhci/MANIFEST.in index a3cb07df8765..3a9b6517412b 100644 --- a/sdk/azurestackhci/azure-mgmt-azurestackhci/MANIFEST.in +++ b/sdk/azurestackhci/azure-mgmt-azurestackhci/MANIFEST.in @@ -1,3 +1,4 @@ +include _meta.json recursive-include tests *.py *.yaml include *.md include azure/__init__.py diff --git a/sdk/azurestackhci/azure-mgmt-azurestackhci/_meta.json b/sdk/azurestackhci/azure-mgmt-azurestackhci/_meta.json new file mode 100644 index 000000000000..da97b2f0abe0 --- /dev/null +++ b/sdk/azurestackhci/azure-mgmt-azurestackhci/_meta.json @@ -0,0 +1,8 @@ +{ + "autorest": "3.3.0", + "use": "@autorest/python@5.6.6", + "commit": "54692d5a0346c6040f14f5c836eaca598009c52d", + "repository_url": "https://github.com/Azure/azure-rest-api-specs", + "autorest_command": "autorest specification/azurestackhci/resource-manager/readme.md --multiapi --python --python-mode=update --python-sdks-folder=/home/vsts/work/1/s/azure-sdk-for-python/sdk --track2 --use=@autorest/python@5.6.6 --version=3.3.0", + "readme": "specification/azurestackhci/resource-manager/readme.md" +} \ No newline at end of file diff --git a/sdk/azurestackhci/azure-mgmt-azurestackhci/azure/mgmt/azurestackhci/_azure_stack_hci_client.py b/sdk/azurestackhci/azure-mgmt-azurestackhci/azure/mgmt/azurestackhci/_azure_stack_hci_client.py index d4b944ebe3f1..a3abb0e8dacb 100644 --- a/sdk/azurestackhci/azure-mgmt-azurestackhci/azure/mgmt/azurestackhci/_azure_stack_hci_client.py +++ b/sdk/azurestackhci/azure-mgmt-azurestackhci/azure/mgmt/azurestackhci/_azure_stack_hci_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 AzureStackHCIClientConfiguration from .operations import Operations @@ -27,9 +28,9 @@ class AzureStackHCIClient(object): """Azure Stack HCI management service. :ivar operations: Operations operations - :vartype operations: azure.mgmt.azurestackhci.operations.Operations + :vartype operations: azure_stack_hci_client.operations.Operations :ivar clusters: ClustersOperations operations - :vartype clusters: azure.mgmt.azurestackhci.operations.ClustersOperations + :vartype clusters: azure_stack_hci_client.operations.ClustersOperations :param credential: Credential needed for the client to connect to Azure. :type credential: ~azure.core.credentials.TokenCredential :param subscription_id: The ID of the target subscription. @@ -60,6 +61,24 @@ def __init__( self.clusters = ClustersOperations( 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', min_length=1), + } + 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/azurestackhci/azure-mgmt-azurestackhci/azure/mgmt/azurestackhci/_metadata.json b/sdk/azurestackhci/azure-mgmt-azurestackhci/azure/mgmt/azurestackhci/_metadata.json new file mode 100644 index 000000000000..9fcc7f9c4989 --- /dev/null +++ b/sdk/azurestackhci/azure-mgmt-azurestackhci/azure/mgmt/azurestackhci/_metadata.json @@ -0,0 +1,104 @@ +{ + "chosen_version": "2020-10-01", + "total_api_version_list": ["2020-10-01"], + "client": { + "name": "AzureStackHCIClient", + "filename": "_azure_stack_hci_client", + "description": "Azure Stack HCI management service.", + "base_url": "\u0027https://management.azure.com\u0027", + "custom_base_url": null, + "azure_arm": true, + "has_lro_operations": false, + "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\": [\"AzureStackHCIClientConfiguration\"]}}, \"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\": [\"AzureStackHCIClientConfiguration\"]}}, \"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": "The ID of the target 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": "The ID of the target 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": { + "operations": "Operations", + "clusters": "ClustersOperations" + } +} \ No newline at end of file diff --git a/sdk/azurestackhci/azure-mgmt-azurestackhci/azure/mgmt/azurestackhci/_version.py b/sdk/azurestackhci/azure-mgmt-azurestackhci/azure/mgmt/azurestackhci/_version.py index a35cca02914a..e5754a47ce68 100644 --- a/sdk/azurestackhci/azure-mgmt-azurestackhci/azure/mgmt/azurestackhci/_version.py +++ b/sdk/azurestackhci/azure-mgmt-azurestackhci/azure/mgmt/azurestackhci/_version.py @@ -6,5 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "6.0.0b1" - +VERSION = "1.0.0b1" diff --git a/sdk/azurestackhci/azure-mgmt-azurestackhci/azure/mgmt/azurestackhci/aio/_azure_stack_hci_client.py b/sdk/azurestackhci/azure-mgmt-azurestackhci/azure/mgmt/azurestackhci/aio/_azure_stack_hci_client.py index f0104b7c2fcb..ac5ac19718e4 100644 --- a/sdk/azurestackhci/azure-mgmt-azurestackhci/azure/mgmt/azurestackhci/aio/_azure_stack_hci_client.py +++ b/sdk/azurestackhci/azure-mgmt-azurestackhci/azure/mgmt/azurestackhci/aio/_azure_stack_hci_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 @@ -25,9 +26,9 @@ class AzureStackHCIClient(object): """Azure Stack HCI management service. :ivar operations: Operations operations - :vartype operations: azure.mgmt.azurestackhci.aio.operations.Operations + :vartype operations: azure_stack_hci_client.aio.operations.Operations :ivar clusters: ClustersOperations operations - :vartype clusters: azure.mgmt.azurestackhci.aio.operations.ClustersOperations + :vartype clusters: azure_stack_hci_client.aio.operations.ClustersOperations :param credential: Credential needed for the client to connect to Azure. :type credential: ~azure.core.credentials_async.AsyncTokenCredential :param subscription_id: The ID of the target subscription. @@ -57,6 +58,23 @@ def __init__( self.clusters = ClustersOperations( 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', min_length=1), + } + 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/azurestackhci/azure-mgmt-azurestackhci/azure/mgmt/azurestackhci/aio/operations/_clusters_operations.py b/sdk/azurestackhci/azure-mgmt-azurestackhci/azure/mgmt/azurestackhci/aio/operations/_clusters_operations.py index 337cbb9d118b..6f791a155585 100644 --- a/sdk/azurestackhci/azure-mgmt-azurestackhci/azure/mgmt/azurestackhci/aio/operations/_clusters_operations.py +++ b/sdk/azurestackhci/azure-mgmt-azurestackhci/azure/mgmt/azurestackhci/aio/operations/_clusters_operations.py @@ -26,7 +26,7 @@ class ClustersOperations: instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.azurestackhci.models + :type models: ~azure_stack_hci_client.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -49,7 +49,7 @@ def list_by_subscription( :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either ClusterList or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.azurestackhci.models.ClusterList] + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure_stack_hci_client.models.ClusterList] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.ClusterList"] @@ -97,7 +97,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -119,7 +119,7 @@ def list_by_resource_group( :type resource_group_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either ClusterList or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.azurestackhci.models.ClusterList] + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure_stack_hci_client.models.ClusterList] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.ClusterList"] @@ -168,7 +168,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -193,7 +193,7 @@ async def get( :type cluster_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: Cluster, or the result of cls(response) - :rtype: ~azure.mgmt.azurestackhci.models.Cluster + :rtype: ~azure_stack_hci_client.models.Cluster :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.Cluster"] @@ -227,7 +227,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.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('Cluster', pipeline_response) @@ -252,10 +252,10 @@ async def create( :param cluster_name: The name of the cluster. :type cluster_name: str :param cluster: Details of the HCI cluster. - :type cluster: ~azure.mgmt.azurestackhci.models.Cluster + :type cluster: ~azure_stack_hci_client.models.Cluster :keyword callable cls: A custom type or function that will be passed the direct response :return: Cluster, or the result of cls(response) - :rtype: ~azure.mgmt.azurestackhci.models.Cluster + :rtype: ~azure_stack_hci_client.models.Cluster :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.Cluster"] @@ -294,7 +294,7 @@ async def create( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('Cluster', pipeline_response) @@ -319,10 +319,10 @@ async def update( :param cluster_name: The name of the cluster. :type cluster_name: str :param cluster: Details of the HCI cluster. - :type cluster: ~azure.mgmt.azurestackhci.models.ClusterUpdate + :type cluster: ~azure_stack_hci_client.models.ClusterUpdate :keyword callable cls: A custom type or function that will be passed the direct response :return: Cluster, or the result of cls(response) - :rtype: ~azure.mgmt.azurestackhci.models.Cluster + :rtype: ~azure_stack_hci_client.models.Cluster :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.Cluster"] @@ -361,7 +361,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.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('Cluster', pipeline_response) @@ -420,7 +420,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.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: diff --git a/sdk/azurestackhci/azure-mgmt-azurestackhci/azure/mgmt/azurestackhci/aio/operations/_operations.py b/sdk/azurestackhci/azure-mgmt-azurestackhci/azure/mgmt/azurestackhci/aio/operations/_operations.py index 3baaf3fb50cb..94005daf7d2c 100644 --- a/sdk/azurestackhci/azure-mgmt-azurestackhci/azure/mgmt/azurestackhci/aio/operations/_operations.py +++ b/sdk/azurestackhci/azure-mgmt-azurestackhci/azure/mgmt/azurestackhci/aio/operations/_operations.py @@ -25,7 +25,7 @@ class Operations: instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.azurestackhci.models + :type models: ~azure_stack_hci_client.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -48,7 +48,7 @@ async def list( :keyword callable cls: A custom type or function that will be passed the direct response :return: AvailableOperations, or the result of cls(response) - :rtype: ~azure.mgmt.azurestackhci.models.AvailableOperations + :rtype: ~azure_stack_hci_client.models.AvailableOperations :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.AvailableOperations"] @@ -76,7 +76,7 @@ async def list( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('AvailableOperations', pipeline_response) diff --git a/sdk/azurestackhci/azure-mgmt-azurestackhci/azure/mgmt/azurestackhci/models/__init__.py b/sdk/azurestackhci/azure-mgmt-azurestackhci/azure/mgmt/azurestackhci/models/__init__.py index 6b98865ce92a..600754b3df44 100644 --- a/sdk/azurestackhci/azure-mgmt-azurestackhci/azure/mgmt/azurestackhci/models/__init__.py +++ b/sdk/azurestackhci/azure-mgmt-azurestackhci/azure/mgmt/azurestackhci/models/__init__.py @@ -36,6 +36,7 @@ from ._models import TrackedResource # type: ignore from ._azure_stack_hci_client_enums import ( + CreatedByType, ProvisioningState, Status, ) @@ -54,6 +55,7 @@ 'OperationDisplay', 'Resource', 'TrackedResource', + 'CreatedByType', 'ProvisioningState', 'Status', ] diff --git a/sdk/azurestackhci/azure-mgmt-azurestackhci/azure/mgmt/azurestackhci/models/_azure_stack_hci_client_enums.py b/sdk/azurestackhci/azure-mgmt-azurestackhci/azure/mgmt/azurestackhci/models/_azure_stack_hci_client_enums.py index 30b36f5332cd..2ae785e6379c 100644 --- a/sdk/azurestackhci/azure-mgmt-azurestackhci/azure/mgmt/azurestackhci/models/_azure_stack_hci_client_enums.py +++ b/sdk/azurestackhci/azure-mgmt-azurestackhci/azure/mgmt/azurestackhci/models/_azure_stack_hci_client_enums.py @@ -26,6 +26,15 @@ def __getattr__(cls, name): raise AttributeError(name) +class CreatedByType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The type of identity that created the resource. + """ + + USER = "User" + APPLICATION = "Application" + MANAGED_IDENTITY = "ManagedIdentity" + KEY = "Key" + class ProvisioningState(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): """Provisioning state. """ diff --git a/sdk/azurestackhci/azure-mgmt-azurestackhci/azure/mgmt/azurestackhci/models/_models.py b/sdk/azurestackhci/azure-mgmt-azurestackhci/azure/mgmt/azurestackhci/models/_models.py index 1e6db7affacd..b2acb4bcb724 100644 --- a/sdk/azurestackhci/azure-mgmt-azurestackhci/azure/mgmt/azurestackhci/models/_models.py +++ b/sdk/azurestackhci/azure-mgmt-azurestackhci/azure/mgmt/azurestackhci/models/_models.py @@ -14,7 +14,7 @@ class AvailableOperations(msrest.serialization.Model): """Available operations of the service. :param value: Collection of available operation details. - :type value: list[~azure.mgmt.azurestackhci.models.OperationDetail] + :type value: list[~azure_stack_hci_client.models.OperationDetail] :param next_link: URL client should use to fetch the next page (per server side paging). It's null for now, added for future use. :type next_link: str @@ -72,7 +72,7 @@ def __init__( class TrackedResource(Resource): - """The resource model definition for an Azure Resource Manager tracked top level resource. + """The resource model definition for an Azure Resource Manager tracked top level resource which has 'tags' and a 'location'. Variables are only populated by the server, and will be ignored when sending a request. @@ -137,10 +137,10 @@ class Cluster(TrackedResource): :type location: str :ivar provisioning_state: Provisioning state. Possible values include: "Succeeded", "Failed", "Canceled", "Accepted", "Provisioning". - :vartype provisioning_state: str or ~azure.mgmt.azurestackhci.models.ProvisioningState + :vartype provisioning_state: str or ~azure_stack_hci_client.models.ProvisioningState :ivar status: Status of the cluster agent. Possible values include: "NotYetRegistered", "ConnectedRecently", "NotConnectedRecently", "Disconnected", "Error". - :vartype status: str or ~azure.mgmt.azurestackhci.models.Status + :vartype status: str or ~azure_stack_hci_client.models.Status :ivar cloud_id: Unique, immutable resource id. :vartype cloud_id: str :param aad_client_id: App id of cluster AAD identity. @@ -148,7 +148,7 @@ class Cluster(TrackedResource): :param aad_tenant_id: Tenant id of cluster AAD identity. :type aad_tenant_id: str :param reported_properties: Properties reported by cluster agent. - :type reported_properties: ~azure.mgmt.azurestackhci.models.ClusterReportedProperties + :type reported_properties: ~azure_stack_hci_client.models.ClusterReportedProperties :ivar trial_days_remaining: Number of days remaining in the trial period. :vartype trial_days_remaining: float :ivar billing_model: Type of billing applied to the resource. @@ -159,6 +159,20 @@ class Cluster(TrackedResource): :vartype last_sync_timestamp: ~datetime.datetime :ivar last_billing_timestamp: Most recent billing meter timestamp. :vartype last_billing_timestamp: ~datetime.datetime + :param created_by: The identity that created the resource. + :type created_by: str + :param created_by_type: The type of identity that created the resource. Possible values + include: "User", "Application", "ManagedIdentity", "Key". + :type created_by_type: str or ~azure_stack_hci_client.models.CreatedByType + :param created_at: The timestamp of resource creation (UTC). + :type created_at: ~datetime.datetime + :param last_modified_by: The identity that last modified the resource. + :type last_modified_by: str + :param last_modified_by_type: The type of identity that last modified the resource. Possible + values include: "User", "Application", "ManagedIdentity", "Key". + :type last_modified_by_type: str or ~azure_stack_hci_client.models.CreatedByType + :param last_modified_at: The timestamp of resource last modification (UTC). + :type last_modified_at: ~datetime.datetime """ _validation = { @@ -193,6 +207,12 @@ class Cluster(TrackedResource): 'registration_timestamp': {'key': 'properties.registrationTimestamp', 'type': 'iso-8601'}, 'last_sync_timestamp': {'key': 'properties.lastSyncTimestamp', 'type': 'iso-8601'}, 'last_billing_timestamp': {'key': 'properties.lastBillingTimestamp', 'type': 'iso-8601'}, + 'created_by': {'key': 'systemData.createdBy', 'type': 'str'}, + 'created_by_type': {'key': 'systemData.createdByType', 'type': 'str'}, + 'created_at': {'key': 'systemData.createdAt', 'type': 'iso-8601'}, + 'last_modified_by': {'key': 'systemData.lastModifiedBy', 'type': 'str'}, + 'last_modified_by_type': {'key': 'systemData.lastModifiedByType', 'type': 'str'}, + 'last_modified_at': {'key': 'systemData.lastModifiedAt', 'type': 'iso-8601'}, } def __init__( @@ -211,6 +231,12 @@ def __init__( self.registration_timestamp = None self.last_sync_timestamp = None self.last_billing_timestamp = None + self.created_by = kwargs.get('created_by', None) + self.created_by_type = kwargs.get('created_by_type', None) + self.created_at = kwargs.get('created_at', None) + self.last_modified_by = kwargs.get('last_modified_by', None) + self.last_modified_by_type = kwargs.get('last_modified_by_type', None) + self.last_modified_at = kwargs.get('last_modified_at', None) class ClusterList(msrest.serialization.Model): @@ -219,7 +245,7 @@ class ClusterList(msrest.serialization.Model): Variables are only populated by the server, and will be ignored when sending a request. :param value: List of clusters. - :type value: list[~azure.mgmt.azurestackhci.models.Cluster] + :type value: list[~azure_stack_hci_client.models.Cluster] :ivar next_link: Link to the next set of results. :vartype next_link: str """ @@ -319,7 +345,7 @@ class ClusterReportedProperties(msrest.serialization.Model): :ivar cluster_version: Version of the cluster software. :vartype cluster_version: str :ivar nodes: List of nodes reported by the cluster. - :vartype nodes: list[~azure.mgmt.azurestackhci.models.ClusterNode] + :vartype nodes: list[~azure_stack_hci_client.models.ClusterNode] :ivar last_updated: Last time the cluster reported the data. :vartype last_updated: ~datetime.datetime """ @@ -379,7 +405,7 @@ class ErrorAdditionalInfo(msrest.serialization.Model): :ivar type: The additional info type. :vartype type: str :ivar info: The additional info. - :vartype info: object + :vartype info: str """ _validation = { @@ -389,7 +415,7 @@ class ErrorAdditionalInfo(msrest.serialization.Model): _attribute_map = { 'type': {'key': 'type', 'type': 'str'}, - 'info': {'key': 'info', 'type': 'object'}, + 'info': {'key': 'info', 'type': 'str'}, } def __init__( @@ -413,9 +439,9 @@ class ErrorDetail(msrest.serialization.Model): :ivar target: The error target. :vartype target: str :ivar details: The error details. - :vartype details: list[~azure.mgmt.azurestackhci.models.ErrorDetail] + :vartype details: list[~azure_stack_hci_client.models.ErrorDetail] :ivar additional_info: The error additional info. - :vartype additional_info: list[~azure.mgmt.azurestackhci.models.ErrorAdditionalInfo] + :vartype additional_info: list[~azure_stack_hci_client.models.ErrorAdditionalInfo] """ _validation = { @@ -450,7 +476,7 @@ class ErrorResponse(msrest.serialization.Model): """Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows the OData error response format.). :param error: The error object. - :type error: ~azure.mgmt.azurestackhci.models.ErrorDetail + :type error: ~azure_stack_hci_client.models.ErrorDetail """ _attribute_map = { @@ -473,11 +499,11 @@ class OperationDetail(msrest.serialization.Model): :param is_data_action: Indicates whether the operation is a data action. :type is_data_action: bool :param display: Display of the operation. - :type display: ~azure.mgmt.azurestackhci.models.OperationDisplay + :type display: ~azure_stack_hci_client.models.OperationDisplay :param origin: Origin of the operation. :type origin: str :param properties: Properties of the operation. - :type properties: object + :type properties: str """ _attribute_map = { @@ -485,7 +511,7 @@ class OperationDetail(msrest.serialization.Model): 'is_data_action': {'key': 'isDataAction', 'type': 'bool'}, 'display': {'key': 'display', 'type': 'OperationDisplay'}, 'origin': {'key': 'origin', 'type': 'str'}, - 'properties': {'key': 'properties', 'type': 'object'}, + 'properties': {'key': 'properties', 'type': 'str'}, } def __init__( diff --git a/sdk/azurestackhci/azure-mgmt-azurestackhci/azure/mgmt/azurestackhci/models/_models_py3.py b/sdk/azurestackhci/azure-mgmt-azurestackhci/azure/mgmt/azurestackhci/models/_models_py3.py index ea8d6d8039d2..a00e9e430d1a 100644 --- a/sdk/azurestackhci/azure-mgmt-azurestackhci/azure/mgmt/azurestackhci/models/_models_py3.py +++ b/sdk/azurestackhci/azure-mgmt-azurestackhci/azure/mgmt/azurestackhci/models/_models_py3.py @@ -6,17 +6,20 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Dict, List, Optional +import datetime +from typing import Dict, List, Optional, Union from azure.core.exceptions import HttpResponseError import msrest.serialization +from ._azure_stack_hci_client_enums import * + class AvailableOperations(msrest.serialization.Model): """Available operations of the service. :param value: Collection of available operation details. - :type value: list[~azure.mgmt.azurestackhci.models.OperationDetail] + :type value: list[~azure_stack_hci_client.models.OperationDetail] :param next_link: URL client should use to fetch the next page (per server side paging). It's null for now, added for future use. :type next_link: str @@ -77,7 +80,7 @@ def __init__( class TrackedResource(Resource): - """The resource model definition for an Azure Resource Manager tracked top level resource. + """The resource model definition for an Azure Resource Manager tracked top level resource which has 'tags' and a 'location'. Variables are only populated by the server, and will be ignored when sending a request. @@ -145,10 +148,10 @@ class Cluster(TrackedResource): :type location: str :ivar provisioning_state: Provisioning state. Possible values include: "Succeeded", "Failed", "Canceled", "Accepted", "Provisioning". - :vartype provisioning_state: str or ~azure.mgmt.azurestackhci.models.ProvisioningState + :vartype provisioning_state: str or ~azure_stack_hci_client.models.ProvisioningState :ivar status: Status of the cluster agent. Possible values include: "NotYetRegistered", "ConnectedRecently", "NotConnectedRecently", "Disconnected", "Error". - :vartype status: str or ~azure.mgmt.azurestackhci.models.Status + :vartype status: str or ~azure_stack_hci_client.models.Status :ivar cloud_id: Unique, immutable resource id. :vartype cloud_id: str :param aad_client_id: App id of cluster AAD identity. @@ -156,7 +159,7 @@ class Cluster(TrackedResource): :param aad_tenant_id: Tenant id of cluster AAD identity. :type aad_tenant_id: str :param reported_properties: Properties reported by cluster agent. - :type reported_properties: ~azure.mgmt.azurestackhci.models.ClusterReportedProperties + :type reported_properties: ~azure_stack_hci_client.models.ClusterReportedProperties :ivar trial_days_remaining: Number of days remaining in the trial period. :vartype trial_days_remaining: float :ivar billing_model: Type of billing applied to the resource. @@ -167,6 +170,20 @@ class Cluster(TrackedResource): :vartype last_sync_timestamp: ~datetime.datetime :ivar last_billing_timestamp: Most recent billing meter timestamp. :vartype last_billing_timestamp: ~datetime.datetime + :param created_by: The identity that created the resource. + :type created_by: str + :param created_by_type: The type of identity that created the resource. Possible values + include: "User", "Application", "ManagedIdentity", "Key". + :type created_by_type: str or ~azure_stack_hci_client.models.CreatedByType + :param created_at: The timestamp of resource creation (UTC). + :type created_at: ~datetime.datetime + :param last_modified_by: The identity that last modified the resource. + :type last_modified_by: str + :param last_modified_by_type: The type of identity that last modified the resource. Possible + values include: "User", "Application", "ManagedIdentity", "Key". + :type last_modified_by_type: str or ~azure_stack_hci_client.models.CreatedByType + :param last_modified_at: The timestamp of resource last modification (UTC). + :type last_modified_at: ~datetime.datetime """ _validation = { @@ -201,6 +218,12 @@ class Cluster(TrackedResource): 'registration_timestamp': {'key': 'properties.registrationTimestamp', 'type': 'iso-8601'}, 'last_sync_timestamp': {'key': 'properties.lastSyncTimestamp', 'type': 'iso-8601'}, 'last_billing_timestamp': {'key': 'properties.lastBillingTimestamp', 'type': 'iso-8601'}, + 'created_by': {'key': 'systemData.createdBy', 'type': 'str'}, + 'created_by_type': {'key': 'systemData.createdByType', 'type': 'str'}, + 'created_at': {'key': 'systemData.createdAt', 'type': 'iso-8601'}, + 'last_modified_by': {'key': 'systemData.lastModifiedBy', 'type': 'str'}, + 'last_modified_by_type': {'key': 'systemData.lastModifiedByType', 'type': 'str'}, + 'last_modified_at': {'key': 'systemData.lastModifiedAt', 'type': 'iso-8601'}, } def __init__( @@ -211,6 +234,12 @@ def __init__( aad_client_id: Optional[str] = None, aad_tenant_id: Optional[str] = None, reported_properties: Optional["ClusterReportedProperties"] = None, + created_by: Optional[str] = None, + created_by_type: Optional[Union[str, "CreatedByType"]] = None, + created_at: Optional[datetime.datetime] = None, + last_modified_by: Optional[str] = None, + last_modified_by_type: Optional[Union[str, "CreatedByType"]] = None, + last_modified_at: Optional[datetime.datetime] = None, **kwargs ): super(Cluster, self).__init__(tags=tags, location=location, **kwargs) @@ -225,6 +254,12 @@ def __init__( self.registration_timestamp = None self.last_sync_timestamp = None self.last_billing_timestamp = None + self.created_by = created_by + self.created_by_type = created_by_type + self.created_at = created_at + self.last_modified_by = last_modified_by + self.last_modified_by_type = last_modified_by_type + self.last_modified_at = last_modified_at class ClusterList(msrest.serialization.Model): @@ -233,7 +268,7 @@ class ClusterList(msrest.serialization.Model): Variables are only populated by the server, and will be ignored when sending a request. :param value: List of clusters. - :type value: list[~azure.mgmt.azurestackhci.models.Cluster] + :type value: list[~azure_stack_hci_client.models.Cluster] :ivar next_link: Link to the next set of results. :vartype next_link: str """ @@ -335,7 +370,7 @@ class ClusterReportedProperties(msrest.serialization.Model): :ivar cluster_version: Version of the cluster software. :vartype cluster_version: str :ivar nodes: List of nodes reported by the cluster. - :vartype nodes: list[~azure.mgmt.azurestackhci.models.ClusterNode] + :vartype nodes: list[~azure_stack_hci_client.models.ClusterNode] :ivar last_updated: Last time the cluster reported the data. :vartype last_updated: ~datetime.datetime """ @@ -397,7 +432,7 @@ class ErrorAdditionalInfo(msrest.serialization.Model): :ivar type: The additional info type. :vartype type: str :ivar info: The additional info. - :vartype info: object + :vartype info: str """ _validation = { @@ -407,7 +442,7 @@ class ErrorAdditionalInfo(msrest.serialization.Model): _attribute_map = { 'type': {'key': 'type', 'type': 'str'}, - 'info': {'key': 'info', 'type': 'object'}, + 'info': {'key': 'info', 'type': 'str'}, } def __init__( @@ -431,9 +466,9 @@ class ErrorDetail(msrest.serialization.Model): :ivar target: The error target. :vartype target: str :ivar details: The error details. - :vartype details: list[~azure.mgmt.azurestackhci.models.ErrorDetail] + :vartype details: list[~azure_stack_hci_client.models.ErrorDetail] :ivar additional_info: The error additional info. - :vartype additional_info: list[~azure.mgmt.azurestackhci.models.ErrorAdditionalInfo] + :vartype additional_info: list[~azure_stack_hci_client.models.ErrorAdditionalInfo] """ _validation = { @@ -468,7 +503,7 @@ class ErrorResponse(msrest.serialization.Model): """Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows the OData error response format.). :param error: The error object. - :type error: ~azure.mgmt.azurestackhci.models.ErrorDetail + :type error: ~azure_stack_hci_client.models.ErrorDetail """ _attribute_map = { @@ -493,11 +528,11 @@ class OperationDetail(msrest.serialization.Model): :param is_data_action: Indicates whether the operation is a data action. :type is_data_action: bool :param display: Display of the operation. - :type display: ~azure.mgmt.azurestackhci.models.OperationDisplay + :type display: ~azure_stack_hci_client.models.OperationDisplay :param origin: Origin of the operation. :type origin: str :param properties: Properties of the operation. - :type properties: object + :type properties: str """ _attribute_map = { @@ -505,7 +540,7 @@ class OperationDetail(msrest.serialization.Model): 'is_data_action': {'key': 'isDataAction', 'type': 'bool'}, 'display': {'key': 'display', 'type': 'OperationDisplay'}, 'origin': {'key': 'origin', 'type': 'str'}, - 'properties': {'key': 'properties', 'type': 'object'}, + 'properties': {'key': 'properties', 'type': 'str'}, } def __init__( @@ -515,7 +550,7 @@ def __init__( is_data_action: Optional[bool] = None, display: Optional["OperationDisplay"] = None, origin: Optional[str] = None, - properties: Optional[object] = None, + properties: Optional[str] = None, **kwargs ): super(OperationDetail, self).__init__(**kwargs) diff --git a/sdk/azurestackhci/azure-mgmt-azurestackhci/azure/mgmt/azurestackhci/operations/_clusters_operations.py b/sdk/azurestackhci/azure-mgmt-azurestackhci/azure/mgmt/azurestackhci/operations/_clusters_operations.py index de893b0cc95d..f5705c628798 100644 --- a/sdk/azurestackhci/azure-mgmt-azurestackhci/azure/mgmt/azurestackhci/operations/_clusters_operations.py +++ b/sdk/azurestackhci/azure-mgmt-azurestackhci/azure/mgmt/azurestackhci/operations/_clusters_operations.py @@ -30,7 +30,7 @@ class ClustersOperations(object): instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.azurestackhci.models + :type models: ~azure_stack_hci_client.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -54,7 +54,7 @@ def list_by_subscription( :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either ClusterList or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.azurestackhci.models.ClusterList] + :rtype: ~azure.core.paging.ItemPaged[~azure_stack_hci_client.models.ClusterList] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.ClusterList"] @@ -102,7 +102,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -125,7 +125,7 @@ def list_by_resource_group( :type resource_group_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either ClusterList or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.azurestackhci.models.ClusterList] + :rtype: ~azure.core.paging.ItemPaged[~azure_stack_hci_client.models.ClusterList] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.ClusterList"] @@ -174,7 +174,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -200,7 +200,7 @@ def get( :type cluster_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: Cluster, or the result of cls(response) - :rtype: ~azure.mgmt.azurestackhci.models.Cluster + :rtype: ~azure_stack_hci_client.models.Cluster :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.Cluster"] @@ -234,7 +234,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.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('Cluster', pipeline_response) @@ -260,10 +260,10 @@ def create( :param cluster_name: The name of the cluster. :type cluster_name: str :param cluster: Details of the HCI cluster. - :type cluster: ~azure.mgmt.azurestackhci.models.Cluster + :type cluster: ~azure_stack_hci_client.models.Cluster :keyword callable cls: A custom type or function that will be passed the direct response :return: Cluster, or the result of cls(response) - :rtype: ~azure.mgmt.azurestackhci.models.Cluster + :rtype: ~azure_stack_hci_client.models.Cluster :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.Cluster"] @@ -302,7 +302,7 @@ def create( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('Cluster', pipeline_response) @@ -328,10 +328,10 @@ def update( :param cluster_name: The name of the cluster. :type cluster_name: str :param cluster: Details of the HCI cluster. - :type cluster: ~azure.mgmt.azurestackhci.models.ClusterUpdate + :type cluster: ~azure_stack_hci_client.models.ClusterUpdate :keyword callable cls: A custom type or function that will be passed the direct response :return: Cluster, or the result of cls(response) - :rtype: ~azure.mgmt.azurestackhci.models.Cluster + :rtype: ~azure_stack_hci_client.models.Cluster :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.Cluster"] @@ -370,7 +370,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.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('Cluster', pipeline_response) @@ -430,7 +430,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.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: diff --git a/sdk/azurestackhci/azure-mgmt-azurestackhci/azure/mgmt/azurestackhci/operations/_operations.py b/sdk/azurestackhci/azure-mgmt-azurestackhci/azure/mgmt/azurestackhci/operations/_operations.py index 14e914dda11a..a48f7f991098 100644 --- a/sdk/azurestackhci/azure-mgmt-azurestackhci/azure/mgmt/azurestackhci/operations/_operations.py +++ b/sdk/azurestackhci/azure-mgmt-azurestackhci/azure/mgmt/azurestackhci/operations/_operations.py @@ -29,7 +29,7 @@ class Operations(object): instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.azurestackhci.models + :type models: ~azure_stack_hci_client.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -53,7 +53,7 @@ def list( :keyword callable cls: A custom type or function that will be passed the direct response :return: AvailableOperations, or the result of cls(response) - :rtype: ~azure.mgmt.azurestackhci.models.AvailableOperations + :rtype: ~azure_stack_hci_client.models.AvailableOperations :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.AvailableOperations"] @@ -81,7 +81,7 @@ def list( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('AvailableOperations', pipeline_response)