From c8b20924ac1df7d32b833765bbd0848cd6315cf1 Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Mon, 2 Aug 2021 03:31:40 +0000 Subject: [PATCH] CodeGen from PR 15384 in Azure/azure-rest-api-specs Merge 6b93cf720efded73fc3f288c267a49a0f49a87c9 into ade87243daf2fd3512875e4fb2dd2ebba0b1198c --- .../azure-mgmt-apimanagement/MANIFEST.in | 1 + .../azure-mgmt-apimanagement/_meta.json | 11 + .../apimanagement/_api_management_client.py | 19 ++ .../azure/mgmt/apimanagement/_metadata.json | 174 ++++++++++ .../azure/mgmt/apimanagement/_version.py | 2 +- .../aio/_api_management_client.py | 18 + .../operations/_api_diagnostic_operations.py | 24 +- .../aio/operations/_api_export_operations.py | 4 +- .../_api_issue_attachment_operations.py | 20 +- .../_api_issue_comment_operations.py | 20 +- .../aio/operations/_api_issue_operations.py | 24 +- .../_api_management_operations_operations.py | 4 +- .../_api_management_service_operations.py | 84 ++--- ..._api_management_service_skus_operations.py | 4 +- .../_api_management_skus_operations.py | 4 +- .../operations/_api_operation_operations.py | 24 +- .../_api_operation_policy_operations.py | 20 +- .../aio/operations/_api_operations.py | 34 +- .../aio/operations/_api_policy_operations.py | 20 +- .../aio/operations/_api_product_operations.py | 4 +- .../aio/operations/_api_release_operations.py | 24 +- .../operations/_api_revision_operations.py | 4 +- .../aio/operations/_api_schema_operations.py | 26 +- .../_api_tag_description_operations.py | 20 +- .../operations/_api_version_set_operations.py | 24 +- .../_authorization_server_operations.py | 28 +- .../aio/operations/_backend_operations.py | 28 +- .../aio/operations/_cache_operations.py | 24 +- .../aio/operations/_certificate_operations.py | 24 +- .../operations/_content_item_operations.py | 31 +- .../operations/_content_type_operations.py | 30 +- .../_delegation_settings_operations.py | 20 +- .../_deleted_services_operations.py | 18 +- .../aio/operations/_diagnostic_operations.py | 24 +- .../operations/_email_template_operations.py | 24 +- .../aio/operations/_gateway_api_operations.py | 16 +- ...ateway_certificate_authority_operations.py | 20 +- ...teway_hostname_configuration_operations.py | 20 +- .../aio/operations/_gateway_operations.py | 36 +- .../aio/operations/_group_operations.py | 24 +- .../aio/operations/_group_user_operations.py | 16 +- .../_identity_provider_operations.py | 28 +- .../aio/operations/_issue_operations.py | 8 +- .../aio/operations/_logger_operations.py | 24 +- .../aio/operations/_named_value_operations.py | 50 +-- .../operations/_network_status_operations.py | 8 +- .../operations/_notification_operations.py | 12 +- ...notification_recipient_email_operations.py | 16 +- ..._notification_recipient_user_operations.py | 16 +- .../_open_id_connect_provider_operations.py | 28 +- .../aio/operations/_operation_operations.py | 4 +- .../_policy_description_operations.py | 4 +- .../aio/operations/_policy_operations.py | 20 +- .../operations/_portal_revision_operations.py | 41 +-- .../operations/_portal_settings_operations.py | 4 +- .../aio/operations/_product_api_operations.py | 16 +- .../operations/_product_group_operations.py | 16 +- .../aio/operations/_product_operations.py | 28 +- .../operations/_product_policy_operations.py | 20 +- .../_product_subscriptions_operations.py | 4 +- .../_quota_by_counter_keys_operations.py | 20 +- .../_quota_by_period_keys_operations.py | 20 +- .../aio/operations/_region_operations.py | 4 +- .../aio/operations/_reports_operations.py | 32 +- .../_sign_in_settings_operations.py | 16 +- .../_sign_up_settings_operations.py | 16 +- .../operations/_subscription_operations.py | 36 +- .../aio/operations/_tag_operations.py | 84 ++--- .../operations/_tag_resource_operations.py | 4 +- .../_tenant_access_git_operations.py | 8 +- .../operations/_tenant_access_operations.py | 32 +- .../_tenant_configuration_operations.py | 34 +- .../operations/_tenant_settings_operations.py | 8 +- .../_user_confirmation_password_operations.py | 4 +- .../aio/operations/_user_group_operations.py | 4 +- .../operations/_user_identities_operations.py | 4 +- .../aio/operations/_user_operations.py | 32 +- .../_user_subscription_operations.py | 8 +- .../models/_api_management_client_enums.py | 307 ++++++++++++------ .../mgmt/apimanagement/models/_models.py | 111 ++++--- .../mgmt/apimanagement/models/_models_py3.py | 126 ++++--- .../operations/_api_diagnostic_operations.py | 12 +- .../operations/_api_export_operations.py | 2 +- .../_api_issue_attachment_operations.py | 10 +- .../_api_issue_comment_operations.py | 10 +- .../operations/_api_issue_operations.py | 12 +- .../_api_management_operations_operations.py | 2 +- .../_api_management_service_operations.py | 48 +-- ..._api_management_service_skus_operations.py | 2 +- .../_api_management_skus_operations.py | 2 +- .../operations/_api_operation_operations.py | 12 +- .../_api_operation_policy_operations.py | 10 +- .../operations/_api_operations.py | 18 +- .../operations/_api_policy_operations.py | 10 +- .../operations/_api_product_operations.py | 2 +- .../operations/_api_release_operations.py | 12 +- .../operations/_api_revision_operations.py | 2 +- .../operations/_api_schema_operations.py | 14 +- .../_api_tag_description_operations.py | 10 +- .../operations/_api_version_set_operations.py | 12 +- .../_authorization_server_operations.py | 14 +- .../operations/_backend_operations.py | 14 +- .../operations/_cache_operations.py | 12 +- .../operations/_certificate_operations.py | 12 +- .../operations/_content_item_operations.py | 21 +- .../operations/_content_type_operations.py | 22 +- .../_delegation_settings_operations.py | 10 +- .../_deleted_services_operations.py | 10 +- .../operations/_diagnostic_operations.py | 12 +- .../operations/_email_template_operations.py | 12 +- .../operations/_gateway_api_operations.py | 8 +- ...ateway_certificate_authority_operations.py | 10 +- ...teway_hostname_configuration_operations.py | 10 +- .../operations/_gateway_operations.py | 18 +- .../operations/_group_operations.py | 12 +- .../operations/_group_user_operations.py | 8 +- .../_identity_provider_operations.py | 14 +- .../operations/_issue_operations.py | 4 +- .../operations/_logger_operations.py | 12 +- .../operations/_named_value_operations.py | 28 +- .../operations/_network_status_operations.py | 4 +- .../operations/_notification_operations.py | 6 +- ...notification_recipient_email_operations.py | 8 +- ..._notification_recipient_user_operations.py | 8 +- .../_open_id_connect_provider_operations.py | 14 +- .../operations/_operation_operations.py | 2 +- .../_policy_description_operations.py | 2 +- .../operations/_policy_operations.py | 10 +- .../operations/_portal_revision_operations.py | 27 +- .../operations/_portal_settings_operations.py | 2 +- .../operations/_product_api_operations.py | 8 +- .../operations/_product_group_operations.py | 8 +- .../operations/_product_operations.py | 14 +- .../operations/_product_policy_operations.py | 10 +- .../_product_subscriptions_operations.py | 2 +- .../_quota_by_counter_keys_operations.py | 16 +- .../_quota_by_period_keys_operations.py | 16 +- .../operations/_region_operations.py | 2 +- .../operations/_reports_operations.py | 16 +- .../_sign_in_settings_operations.py | 8 +- .../_sign_up_settings_operations.py | 8 +- .../operations/_subscription_operations.py | 18 +- .../operations/_tag_operations.py | 42 +-- .../operations/_tag_resource_operations.py | 2 +- .../_tenant_access_git_operations.py | 4 +- .../operations/_tenant_access_operations.py | 16 +- .../_tenant_configuration_operations.py | 20 +- .../operations/_tenant_settings_operations.py | 4 +- .../_user_confirmation_password_operations.py | 2 +- .../operations/_user_group_operations.py | 2 +- .../operations/_user_identities_operations.py | 2 +- .../operations/_user_operations.py | 16 +- .../_user_subscription_operations.py | 4 +- 153 files changed, 1713 insertions(+), 1328 deletions(-) create mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/_meta.json create mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/_metadata.json diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/MANIFEST.in b/sdk/apimanagement/azure-mgmt-apimanagement/MANIFEST.in index a3cb07df8765..3a9b6517412b 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/MANIFEST.in +++ b/sdk/apimanagement/azure-mgmt-apimanagement/MANIFEST.in @@ -1,3 +1,4 @@ +include _meta.json recursive-include tests *.py *.yaml include *.md include azure/__init__.py diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/_meta.json b/sdk/apimanagement/azure-mgmt-apimanagement/_meta.json new file mode 100644 index 000000000000..cab84952edb4 --- /dev/null +++ b/sdk/apimanagement/azure-mgmt-apimanagement/_meta.json @@ -0,0 +1,11 @@ +{ + "autorest": "3.4.5", + "use": [ + "@autorest/python@5.8.4", + "@autorest/modelerfour@4.19.2" + ], + "commit": "11a0ddcb1ad5114d65b28ca715dafc4d080d8d22", + "repository_url": "https://github.com/Azure/azure-rest-api-specs", + "autorest_command": "autorest specification/apimanagement/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.4 --use=@autorest/modelerfour@4.19.2 --version=3.4.5", + "readme": "specification/apimanagement/resource-manager/readme.md" +} \ No newline at end of file diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/_api_management_client.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/_api_management_client.py index fd1ab90d48d3..e8a9118accf7 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/_api_management_client.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/_api_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 ApiManagementClientConfiguration from .operations import ApiOperations @@ -411,6 +412,24 @@ def __init__( self.user_confirmation_password = UserConfirmationPasswordOperations( 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'), + } + 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/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/_metadata.json b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/_metadata.json new file mode 100644 index 000000000000..1e090b9998aa --- /dev/null +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/_metadata.json @@ -0,0 +1,174 @@ +{ + "chosen_version": "2020-12-01", + "total_api_version_list": ["2020-12-01"], + "client": { + "name": "ApiManagementClient", + "filename": "_api_management_client", + "description": "ApiManagement 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\": [\"ApiManagementClientConfiguration\"]}}, \"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\": [\"ApiManagementClientConfiguration\"]}}, \"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": "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 + } + }, + "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": "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 + } + }, + "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": { + "api": "ApiOperations", + "api_revision": "ApiRevisionOperations", + "api_release": "ApiReleaseOperations", + "api_operation": "ApiOperationOperations", + "api_operation_policy": "ApiOperationPolicyOperations", + "tag": "TagOperations", + "api_product": "ApiProductOperations", + "api_policy": "ApiPolicyOperations", + "api_schema": "ApiSchemaOperations", + "api_diagnostic": "ApiDiagnosticOperations", + "api_issue": "ApiIssueOperations", + "api_issue_comment": "ApiIssueCommentOperations", + "api_issue_attachment": "ApiIssueAttachmentOperations", + "api_tag_description": "ApiTagDescriptionOperations", + "operation": "OperationOperations", + "api_export": "ApiExportOperations", + "api_version_set": "ApiVersionSetOperations", + "authorization_server": "AuthorizationServerOperations", + "backend": "BackendOperations", + "cache": "CacheOperations", + "certificate": "CertificateOperations", + "content_type": "ContentTypeOperations", + "content_item": "ContentItemOperations", + "deleted_services": "DeletedServicesOperations", + "api_management_operations": "ApiManagementOperationsOperations", + "api_management_service_skus": "ApiManagementServiceSkusOperations", + "api_management_service": "ApiManagementServiceOperations", + "diagnostic": "DiagnosticOperations", + "email_template": "EmailTemplateOperations", + "gateway": "GatewayOperations", + "gateway_hostname_configuration": "GatewayHostnameConfigurationOperations", + "gateway_api": "GatewayApiOperations", + "gateway_certificate_authority": "GatewayCertificateAuthorityOperations", + "group": "GroupOperations", + "group_user": "GroupUserOperations", + "identity_provider": "IdentityProviderOperations", + "issue": "IssueOperations", + "logger": "LoggerOperations", + "named_value": "NamedValueOperations", + "network_status": "NetworkStatusOperations", + "notification": "NotificationOperations", + "notification_recipient_user": "NotificationRecipientUserOperations", + "notification_recipient_email": "NotificationRecipientEmailOperations", + "open_id_connect_provider": "OpenIdConnectProviderOperations", + "policy": "PolicyOperations", + "policy_description": "PolicyDescriptionOperations", + "portal_revision": "PortalRevisionOperations", + "portal_settings": "PortalSettingsOperations", + "sign_in_settings": "SignInSettingsOperations", + "sign_up_settings": "SignUpSettingsOperations", + "delegation_settings": "DelegationSettingsOperations", + "product": "ProductOperations", + "product_api": "ProductApiOperations", + "product_group": "ProductGroupOperations", + "product_subscriptions": "ProductSubscriptionsOperations", + "product_policy": "ProductPolicyOperations", + "quota_by_counter_keys": "QuotaByCounterKeysOperations", + "quota_by_period_keys": "QuotaByPeriodKeysOperations", + "region": "RegionOperations", + "reports": "ReportsOperations", + "tenant_settings": "TenantSettingsOperations", + "api_management_skus": "ApiManagementSkusOperations", + "subscription": "SubscriptionOperations", + "tag_resource": "TagResourceOperations", + "tenant_access": "TenantAccessOperations", + "tenant_access_git": "TenantAccessGitOperations", + "tenant_configuration": "TenantConfigurationOperations", + "user": "UserOperations", + "user_group": "UserGroupOperations", + "user_subscription": "UserSubscriptionOperations", + "user_identities": "UserIdentitiesOperations", + "user_confirmation_password": "UserConfirmationPasswordOperations" + } +} \ No newline at end of file diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/_version.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/_version.py index 48944bf3938a..eae7c95b6fbd 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/_version.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "2.0.0" +VERSION = "0.1.0" diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/_api_management_client.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/_api_management_client.py index 2c72c10479ce..3c2ffc6bfec3 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/_api_management_client.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/_api_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 @@ -408,6 +409,23 @@ def __init__( self.user_confirmation_password = UserConfirmationPasswordOperations( 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'), + } + 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/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_diagnostic_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_diagnostic_operations.py index e40196255d6c..4c25c494f732 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_diagnostic_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_diagnostic_operations.py @@ -49,7 +49,7 @@ def list_by_service( filter: Optional[str] = None, top: Optional[int] = None, skip: Optional[int] = None, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.DiagnosticCollection"]: """Lists all diagnostics of an API. @@ -126,7 +126,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) @@ -143,7 +143,7 @@ async def get_entity_tag( service_name: str, api_id: str, diagnostic_id: str, - **kwargs + **kwargs: Any ) -> bool: """Gets the entity state (Etag) version of the Diagnostic for an API specified by its identifier. @@ -194,7 +194,7 @@ async def get_entity_tag( 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) response_headers = {} @@ -212,7 +212,7 @@ async def get( service_name: str, api_id: str, diagnostic_id: str, - **kwargs + **kwargs: Any ) -> "_models.DiagnosticContract": """Gets the details of the Diagnostic for an API specified by its identifier. @@ -263,7 +263,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) response_headers = {} @@ -284,7 +284,7 @@ async def create_or_update( diagnostic_id: str, parameters: "_models.DiagnosticContract", if_match: Optional[str] = None, - **kwargs + **kwargs: Any ) -> "_models.DiagnosticContract": """Creates a new Diagnostic for an API or updates an existing one. @@ -347,7 +347,7 @@ async def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -373,7 +373,7 @@ async def update( diagnostic_id: str, if_match: str, parameters: "_models.DiagnosticContract", - **kwargs + **kwargs: Any ) -> "_models.DiagnosticContract": """Updates the details of the Diagnostic for an API specified by its identifier. @@ -435,7 +435,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) response_headers = {} @@ -455,7 +455,7 @@ async def delete( api_id: str, diagnostic_id: str, if_match: str, - **kwargs + **kwargs: Any ) -> None: """Deletes the specified Diagnostic from an API. @@ -510,7 +510,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/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_export_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_export_operations.py index 1a74ef34510e..453c7694850b 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_export_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_export_operations.py @@ -47,7 +47,7 @@ async def get( api_id: str, format: Union[str, "_models.ExportFormat"], export: Union[str, "_models.ExportApi"], - **kwargs + **kwargs: Any ) -> "_models.ApiExportResult": """Gets the details of the API specified by its identifier in the format specified to the Storage Blob with SAS Key valid for 5 minutes. @@ -103,7 +103,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('ApiExportResult', pipeline_response) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_issue_attachment_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_issue_attachment_operations.py index 702fe4d1db82..36001d53d5f5 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_issue_attachment_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_issue_attachment_operations.py @@ -50,7 +50,7 @@ def list_by_service( filter: Optional[str] = None, top: Optional[int] = None, skip: Optional[int] = None, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.IssueAttachmentCollection"]: """Lists all attachments for the Issue associated with the specified API. @@ -132,7 +132,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) @@ -150,7 +150,7 @@ async def get_entity_tag( api_id: str, issue_id: str, attachment_id: str, - **kwargs + **kwargs: Any ) -> bool: """Gets the entity state (Etag) version of the issue Attachment for an API specified by its identifier. @@ -206,7 +206,7 @@ async def get_entity_tag( 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) response_headers = {} @@ -225,7 +225,7 @@ async def get( api_id: str, issue_id: str, attachment_id: str, - **kwargs + **kwargs: Any ) -> "_models.IssueAttachmentContract": """Gets the details of the issue Attachment for an API specified by its identifier. @@ -280,7 +280,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) response_headers = {} @@ -302,7 +302,7 @@ async def create_or_update( attachment_id: str, parameters: "_models.IssueAttachmentContract", if_match: Optional[str] = None, - **kwargs + **kwargs: Any ) -> "_models.IssueAttachmentContract": """Creates a new Attachment for the Issue in an API or updates an existing one. @@ -369,7 +369,7 @@ async def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -395,7 +395,7 @@ async def delete( issue_id: str, attachment_id: str, if_match: str, - **kwargs + **kwargs: Any ) -> None: """Deletes the specified comment from an Issue. @@ -454,7 +454,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/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_issue_comment_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_issue_comment_operations.py index b0dfd30da6fd..386dbb118f68 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_issue_comment_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_issue_comment_operations.py @@ -50,7 +50,7 @@ def list_by_service( filter: Optional[str] = None, top: Optional[int] = None, skip: Optional[int] = None, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.IssueCommentCollection"]: """Lists all comments for the Issue associated with the specified API. @@ -132,7 +132,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) @@ -150,7 +150,7 @@ async def get_entity_tag( api_id: str, issue_id: str, comment_id: str, - **kwargs + **kwargs: Any ) -> bool: """Gets the entity state (Etag) version of the issue Comment for an API specified by its identifier. @@ -205,7 +205,7 @@ async def get_entity_tag( 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) response_headers = {} @@ -224,7 +224,7 @@ async def get( api_id: str, issue_id: str, comment_id: str, - **kwargs + **kwargs: Any ) -> "_models.IssueCommentContract": """Gets the details of the issue Comment for an API specified by its identifier. @@ -278,7 +278,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) response_headers = {} @@ -300,7 +300,7 @@ async def create_or_update( comment_id: str, parameters: "_models.IssueCommentContract", if_match: Optional[str] = None, - **kwargs + **kwargs: Any ) -> "_models.IssueCommentContract": """Creates a new Comment for the Issue in an API or updates an existing one. @@ -366,7 +366,7 @@ async def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -392,7 +392,7 @@ async def delete( issue_id: str, comment_id: str, if_match: str, - **kwargs + **kwargs: Any ) -> None: """Deletes the specified comment from an Issue. @@ -450,7 +450,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/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_issue_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_issue_operations.py index 7b51b420602d..d217cf31e9d8 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_issue_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_issue_operations.py @@ -50,7 +50,7 @@ def list_by_service( expand_comments_attachments: Optional[bool] = None, top: Optional[int] = None, skip: Optional[int] = None, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.IssueCollection"]: """Lists all issues associated with the specified API. @@ -133,7 +133,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) @@ -150,7 +150,7 @@ async def get_entity_tag( service_name: str, api_id: str, issue_id: str, - **kwargs + **kwargs: Any ) -> bool: """Gets the entity state (Etag) version of the Issue for an API specified by its identifier. @@ -201,7 +201,7 @@ async def get_entity_tag( 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) response_headers = {} @@ -220,7 +220,7 @@ async def get( api_id: str, issue_id: str, expand_comments_attachments: Optional[bool] = None, - **kwargs + **kwargs: Any ) -> "_models.IssueContract": """Gets the details of the Issue for an API specified by its identifier. @@ -275,7 +275,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) response_headers = {} @@ -296,7 +296,7 @@ async def create_or_update( issue_id: str, parameters: "_models.IssueContract", if_match: Optional[str] = None, - **kwargs + **kwargs: Any ) -> "_models.IssueContract": """Creates a new Issue for an API or updates an existing one. @@ -359,7 +359,7 @@ async def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -385,7 +385,7 @@ async def update( issue_id: str, if_match: str, parameters: "_models.IssueUpdateContract", - **kwargs + **kwargs: Any ) -> "_models.IssueContract": """Updates an existing issue for an API. @@ -447,7 +447,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) response_headers = {} @@ -467,7 +467,7 @@ async def delete( api_id: str, issue_id: str, if_match: str, - **kwargs + **kwargs: Any ) -> None: """Deletes the specified Issue from an API. @@ -522,7 +522,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/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_management_operations_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_management_operations_operations.py index d9773dc36d81..bc927cf54fd7 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_management_operations_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_management_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 REST API operations of the Microsoft.ApiManagement provider. @@ -93,7 +93,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.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) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_management_service_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_management_service_operations.py index 6cce8a47733e..1792c41673d5 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_management_service_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_management_service_operations.py @@ -48,7 +48,7 @@ async def _restore_initial( resource_group_name: str, service_name: str, parameters: "_models.ApiManagementServiceBackupRestoreParameters", - **kwargs + **kwargs: Any ) -> Optional["_models.ApiManagementServiceResource"]: cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.ApiManagementServiceResource"]] error_map = { @@ -86,7 +86,7 @@ async def _restore_initial( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = None @@ -104,7 +104,7 @@ async def begin_restore( resource_group_name: str, service_name: str, parameters: "_models.ApiManagementServiceBackupRestoreParameters", - **kwargs + **kwargs: Any ) -> AsyncLROPoller["_models.ApiManagementServiceResource"]: """Restores a backup of an API Management service created using the ApiManagementService_Backup operation on the current service. This is a long running operation and could take several @@ -119,8 +119,8 @@ async def begin_restore( :type parameters: ~azure.mgmt.apimanagement.models.ApiManagementServiceBackupRestoreParameters :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 ApiManagementServiceResource or the result of cls(response) @@ -178,7 +178,7 @@ async def _backup_initial( resource_group_name: str, service_name: str, parameters: "_models.ApiManagementServiceBackupRestoreParameters", - **kwargs + **kwargs: Any ) -> Optional["_models.ApiManagementServiceResource"]: cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.ApiManagementServiceResource"]] error_map = { @@ -216,7 +216,7 @@ async def _backup_initial( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = None @@ -234,7 +234,7 @@ async def begin_backup( resource_group_name: str, service_name: str, parameters: "_models.ApiManagementServiceBackupRestoreParameters", - **kwargs + **kwargs: Any ) -> AsyncLROPoller["_models.ApiManagementServiceResource"]: """Creates a backup of the API Management service to the given Azure Storage Account. This is long running operation and could take several minutes to complete. @@ -247,8 +247,8 @@ async def begin_backup( :type parameters: ~azure.mgmt.apimanagement.models.ApiManagementServiceBackupRestoreParameters :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 ApiManagementServiceResource or the result of cls(response) @@ -306,7 +306,7 @@ async def _create_or_update_initial( resource_group_name: str, service_name: str, parameters: "_models.ApiManagementServiceResource", - **kwargs + **kwargs: Any ) -> Optional["_models.ApiManagementServiceResource"]: cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.ApiManagementServiceResource"]] error_map = { @@ -344,7 +344,7 @@ async def _create_or_update_initial( if response.status_code not in [200, 201, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = None @@ -365,7 +365,7 @@ async def begin_create_or_update( resource_group_name: str, service_name: str, parameters: "_models.ApiManagementServiceResource", - **kwargs + **kwargs: Any ) -> AsyncLROPoller["_models.ApiManagementServiceResource"]: """Creates or updates an API Management service. This is long running operation and could take several minutes to complete. @@ -378,8 +378,8 @@ async def begin_create_or_update( :type parameters: ~azure.mgmt.apimanagement.models.ApiManagementServiceResource :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 ApiManagementServiceResource or the result of cls(response) @@ -437,7 +437,7 @@ async def _update_initial( resource_group_name: str, service_name: str, parameters: "_models.ApiManagementServiceUpdateParameters", - **kwargs + **kwargs: Any ) -> Optional["_models.ApiManagementServiceResource"]: cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.ApiManagementServiceResource"]] error_map = { @@ -475,7 +475,7 @@ async def _update_initial( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = None @@ -493,7 +493,7 @@ async def begin_update( resource_group_name: str, service_name: str, parameters: "_models.ApiManagementServiceUpdateParameters", - **kwargs + **kwargs: Any ) -> AsyncLROPoller["_models.ApiManagementServiceResource"]: """Updates an existing API Management service. @@ -505,8 +505,8 @@ async def begin_update( :type parameters: ~azure.mgmt.apimanagement.models.ApiManagementServiceUpdateParameters :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 ApiManagementServiceResource or the result of cls(response) @@ -563,7 +563,7 @@ async def get( self, resource_group_name: str, service_name: str, - **kwargs + **kwargs: Any ) -> "_models.ApiManagementServiceResource": """Gets an API Management service resource description. @@ -607,7 +607,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('ApiManagementServiceResource', pipeline_response) @@ -622,7 +622,7 @@ async def _delete_initial( self, resource_group_name: str, service_name: str, - **kwargs + **kwargs: Any ) -> Optional["_models.ApiManagementServiceResource"]: cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.ApiManagementServiceResource"]] error_map = { @@ -655,7 +655,7 @@ async def _delete_initial( if response.status_code not in [200, 202, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = None @@ -672,7 +672,7 @@ async def begin_delete( self, resource_group_name: str, service_name: str, - **kwargs + **kwargs: Any ) -> AsyncLROPoller["_models.ApiManagementServiceResource"]: """Deletes an existing API Management service. @@ -682,8 +682,8 @@ async def begin_delete( :type service_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: 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) @@ -738,7 +738,7 @@ def get_long_running_output(pipeline_response): def list_by_resource_group( self, resource_group_name: str, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.ApiManagementServiceListResult"]: """List all API Management services within a resource group. @@ -795,7 +795,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) @@ -808,7 +808,7 @@ async def get_next(next_link=None): def list( self, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.ApiManagementServiceListResult"]: """Lists all API Management services within an Azure subscription. @@ -862,7 +862,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) @@ -877,7 +877,7 @@ async def get_sso_token( self, resource_group_name: str, service_name: str, - **kwargs + **kwargs: Any ) -> "_models.ApiManagementServiceGetSsoTokenResult": """Gets the Single-Sign-On token for the API Management Service which is valid for 5 Minutes. @@ -921,7 +921,7 @@ async def get_sso_token( 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('ApiManagementServiceGetSsoTokenResult', pipeline_response) @@ -935,7 +935,7 @@ async def get_sso_token( async def check_name_availability( self, parameters: "_models.ApiManagementServiceCheckNameAvailabilityParameters", - **kwargs + **kwargs: Any ) -> "_models.ApiManagementServiceNameAvailabilityResult": """Checks availability and correctness of a name for an API Management service. @@ -980,7 +980,7 @@ async def check_name_availability( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('ApiManagementServiceNameAvailabilityResult', pipeline_response) @@ -993,7 +993,7 @@ async def check_name_availability( async def get_domain_ownership_identifier( self, - **kwargs + **kwargs: Any ) -> "_models.ApiManagementServiceGetDomainOwnershipIdentifierResult": """Get the custom domain ownership identifier for an API Management service. @@ -1031,7 +1031,7 @@ async def get_domain_ownership_identifier( 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('ApiManagementServiceGetDomainOwnershipIdentifierResult', pipeline_response) @@ -1047,7 +1047,7 @@ async def _apply_network_configuration_updates_initial( resource_group_name: str, service_name: str, parameters: Optional["_models.ApiManagementServiceApplyNetworkConfigurationParameters"] = None, - **kwargs + **kwargs: Any ) -> Optional["_models.ApiManagementServiceResource"]: cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.ApiManagementServiceResource"]] error_map = { @@ -1088,7 +1088,7 @@ async def _apply_network_configuration_updates_initial( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = None @@ -1106,7 +1106,7 @@ async def begin_apply_network_configuration_updates( resource_group_name: str, service_name: str, parameters: Optional["_models.ApiManagementServiceApplyNetworkConfigurationParameters"] = None, - **kwargs + **kwargs: Any ) -> AsyncLROPoller["_models.ApiManagementServiceResource"]: """Updates the Microsoft.ApiManagement resource running in the Virtual network to pick the updated DNS changes. @@ -1121,8 +1121,8 @@ async def begin_apply_network_configuration_updates( :type parameters: ~azure.mgmt.apimanagement.models.ApiManagementServiceApplyNetworkConfigurationParameters :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 ApiManagementServiceResource or the result of cls(response) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_management_service_skus_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_management_service_skus_operations.py index c2a282f69554..03975ed40cc8 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_management_service_skus_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_management_service_skus_operations.py @@ -45,7 +45,7 @@ def list_available_service_skus( self, resource_group_name: str, service_name: str, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.ResourceSkuResults"]: """Gets available SKUs for API Management service. @@ -107,7 +107,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.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) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_management_skus_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_management_skus_operations.py index 459e8eb4bd89..ab2509d59ff6 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_management_skus_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_management_skus_operations.py @@ -43,7 +43,7 @@ def __init__(self, client, config, serializer, deserializer) -> None: def list( self, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.ApiManagementSkusResult"]: """Gets the list of Microsoft.ApiManagement SKUs available for your Subscription. @@ -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) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_operation_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_operation_operations.py index b235a476e8ce..8aaa20a8a1f6 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_operation_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_operation_operations.py @@ -50,7 +50,7 @@ def list_by_api( top: Optional[int] = None, skip: Optional[int] = None, tags: Optional[str] = None, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.OperationCollection"]: """Lists a collection of the operations for the specified API. @@ -137,7 +137,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) @@ -154,7 +154,7 @@ async def get_entity_tag( service_name: str, api_id: str, operation_id: str, - **kwargs + **kwargs: Any ) -> bool: """Gets the entity state (Etag) version of the API operation specified by its identifier. @@ -206,7 +206,7 @@ async def get_entity_tag( 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) response_headers = {} @@ -224,7 +224,7 @@ async def get( service_name: str, api_id: str, operation_id: str, - **kwargs + **kwargs: Any ) -> "_models.OperationContract": """Gets the details of the API Operation specified by its identifier. @@ -276,7 +276,7 @@ async def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -297,7 +297,7 @@ async def create_or_update( operation_id: str, parameters: "_models.OperationContract", if_match: Optional[str] = None, - **kwargs + **kwargs: Any ) -> "_models.OperationContract": """Creates a new operation in the API or updates an existing one. @@ -361,7 +361,7 @@ async def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -387,7 +387,7 @@ async def update( operation_id: str, if_match: str, parameters: "_models.OperationUpdateContract", - **kwargs + **kwargs: Any ) -> "_models.OperationContract": """Updates the details of the operation in the API specified by its identifier. @@ -450,7 +450,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) response_headers = {} @@ -470,7 +470,7 @@ async def delete( api_id: str, operation_id: str, if_match: str, - **kwargs + **kwargs: Any ) -> None: """Deletes the specified operation in the API. @@ -526,7 +526,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/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_operation_policy_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_operation_policy_operations.py index e750c83f782d..fb2c7d9fd81b 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_operation_policy_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_operation_policy_operations.py @@ -46,7 +46,7 @@ async def list_by_operation( service_name: str, api_id: str, operation_id: str, - **kwargs + **kwargs: Any ) -> "_models.PolicyCollection": """Get the list of policy configuration at the API Operation level. @@ -98,7 +98,7 @@ async def list_by_operation( 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('PolicyCollection', pipeline_response) @@ -116,7 +116,7 @@ async def get_entity_tag( api_id: str, operation_id: str, policy_id: Union[str, "_models.PolicyIdName"], - **kwargs + **kwargs: Any ) -> bool: """Gets the entity state (Etag) version of the API operation policy specified by its identifier. @@ -171,7 +171,7 @@ async def get_entity_tag( 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) response_headers = {} @@ -191,7 +191,7 @@ async def get( operation_id: str, policy_id: Union[str, "_models.PolicyIdName"], format: Optional[Union[str, "_models.PolicyExportFormat"]] = "xml", - **kwargs + **kwargs: Any ) -> "_models.PolicyContract": """Get the policy configuration at the API Operation level. @@ -250,7 +250,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) response_headers = {} @@ -272,7 +272,7 @@ async def create_or_update( policy_id: Union[str, "_models.PolicyIdName"], parameters: "_models.PolicyContract", if_match: Optional[str] = None, - **kwargs + **kwargs: Any ) -> "_models.PolicyContract": """Creates or updates policy configuration for the API Operation level. @@ -339,7 +339,7 @@ async def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -365,7 +365,7 @@ async def delete( operation_id: str, policy_id: Union[str, "_models.PolicyIdName"], if_match: str, - **kwargs + **kwargs: Any ) -> None: """Deletes the policy configuration at the Api Operation. @@ -424,7 +424,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/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_operations.py index f81df506e341..fe463e1add60 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_operations.py @@ -52,7 +52,7 @@ def list_by_service( skip: Optional[int] = None, tags: Optional[str] = None, expand_api_version_set: Optional[bool] = None, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.ApiCollection"]: """Lists all APIs of the API Management service instance. @@ -139,7 +139,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) @@ -155,7 +155,7 @@ async def get_entity_tag( resource_group_name: str, service_name: str, api_id: str, - **kwargs + **kwargs: Any ) -> bool: """Gets the entity state (Etag) version of the API specified by its identifier. @@ -203,7 +203,7 @@ async def get_entity_tag( 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) response_headers = {} @@ -220,7 +220,7 @@ async def get( resource_group_name: str, service_name: str, api_id: str, - **kwargs + **kwargs: Any ) -> "_models.ApiContract": """Gets the details of the API specified by its identifier. @@ -268,7 +268,7 @@ async def get( if response.status_code not in [200, 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) response_headers = {} @@ -293,7 +293,7 @@ async def _create_or_update_initial( api_id: str, parameters: "_models.ApiCreateOrUpdateParameter", if_match: Optional[str] = None, - **kwargs + **kwargs: Any ) -> Optional["_models.ApiContract"]: cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.ApiContract"]] error_map = { @@ -334,7 +334,7 @@ async def _create_or_update_initial( if response.status_code not in [200, 201, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -360,7 +360,7 @@ async def begin_create_or_update( api_id: str, parameters: "_models.ApiCreateOrUpdateParameter", if_match: Optional[str] = None, - **kwargs + **kwargs: Any ) -> AsyncLROPoller["_models.ApiContract"]: """Creates new or updates existing specified API of the API Management service instance. @@ -378,8 +378,8 @@ async def begin_create_or_update( :type if_match: 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 ApiContract or the result of cls(response) @@ -445,7 +445,7 @@ async def update( api_id: str, if_match: str, parameters: "_models.ApiUpdateContract", - **kwargs + **kwargs: Any ) -> "_models.ApiContract": """Updates the specified API of the API Management service instance. @@ -504,7 +504,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) response_headers = {} @@ -524,7 +524,7 @@ async def delete( api_id: str, if_match: str, delete_revisions: Optional[bool] = None, - **kwargs + **kwargs: Any ) -> None: """Deletes the specified API of the API Management service instance. @@ -580,7 +580,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: @@ -596,7 +596,7 @@ def list_by_tags( top: Optional[int] = None, skip: Optional[int] = None, include_not_tagged_apis: Optional[bool] = None, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.TagResourceCollection"]: """Lists a collection of apis associated with tags. @@ -680,7 +680,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) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_policy_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_policy_operations.py index 50a82ce68482..f6f1273fc02e 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_policy_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_policy_operations.py @@ -45,7 +45,7 @@ async def list_by_api( resource_group_name: str, service_name: str, api_id: str, - **kwargs + **kwargs: Any ) -> "_models.PolicyCollection": """Get the policy configuration at the API level. @@ -93,7 +93,7 @@ async def list_by_api( 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('PolicyCollection', pipeline_response) @@ -110,7 +110,7 @@ async def get_entity_tag( service_name: str, api_id: str, policy_id: Union[str, "_models.PolicyIdName"], - **kwargs + **kwargs: Any ) -> bool: """Gets the entity state (Etag) version of the API policy specified by its identifier. @@ -161,7 +161,7 @@ async def get_entity_tag( 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) response_headers = {} @@ -180,7 +180,7 @@ async def get( api_id: str, policy_id: Union[str, "_models.PolicyIdName"], format: Optional[Union[str, "_models.PolicyExportFormat"]] = "xml", - **kwargs + **kwargs: Any ) -> "_models.PolicyContract": """Get the policy configuration at the API level. @@ -235,7 +235,7 @@ async def get( if response.status_code not in [200, 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) response_headers = {} @@ -261,7 +261,7 @@ async def create_or_update( policy_id: Union[str, "_models.PolicyIdName"], parameters: "_models.PolicyContract", if_match: Optional[str] = None, - **kwargs + **kwargs: Any ) -> "_models.PolicyContract": """Creates or updates policy configuration for the API. @@ -324,7 +324,7 @@ async def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -349,7 +349,7 @@ async def delete( api_id: str, policy_id: Union[str, "_models.PolicyIdName"], if_match: str, - **kwargs + **kwargs: Any ) -> None: """Deletes the policy configuration at the Api. @@ -404,7 +404,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/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_product_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_product_operations.py index 6a08af1ce936..25e68904c8b7 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_product_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_product_operations.py @@ -49,7 +49,7 @@ def list_by_apis( filter: Optional[str] = None, top: Optional[int] = None, skip: Optional[int] = None, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.ProductCollection"]: """Lists all Products, which the API is part of. @@ -126,7 +126,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) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_release_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_release_operations.py index a13634786c3b..db09304b22f9 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_release_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_release_operations.py @@ -49,7 +49,7 @@ def list_by_service( filter: Optional[str] = None, top: Optional[int] = None, skip: Optional[int] = None, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.ApiReleaseCollection"]: """Lists all releases of an API. An API release is created when making an API Revision current. Releases are also used to rollback to previous revisions. Results will be paged and can be @@ -128,7 +128,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) @@ -145,7 +145,7 @@ async def get_entity_tag( service_name: str, api_id: str, release_id: str, - **kwargs + **kwargs: Any ) -> bool: """Returns the etag of an API release. @@ -196,7 +196,7 @@ async def get_entity_tag( 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) response_headers = {} @@ -214,7 +214,7 @@ async def get( service_name: str, api_id: str, release_id: str, - **kwargs + **kwargs: Any ) -> "_models.ApiReleaseContract": """Returns the details of an API release. @@ -265,7 +265,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) response_headers = {} @@ -286,7 +286,7 @@ async def create_or_update( release_id: str, parameters: "_models.ApiReleaseContract", if_match: Optional[str] = None, - **kwargs + **kwargs: Any ) -> "_models.ApiReleaseContract": """Creates a new Release for the API. @@ -349,7 +349,7 @@ async def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -375,7 +375,7 @@ async def update( release_id: str, if_match: str, parameters: "_models.ApiReleaseContract", - **kwargs + **kwargs: Any ) -> "_models.ApiReleaseContract": """Updates the details of the release of the API specified by its identifier. @@ -437,7 +437,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) response_headers = {} @@ -457,7 +457,7 @@ async def delete( api_id: str, release_id: str, if_match: str, - **kwargs + **kwargs: Any ) -> None: """Deletes the specified release in the API. @@ -512,7 +512,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/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_revision_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_revision_operations.py index 01c49026f9b7..ab1dd235dd5e 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_revision_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_revision_operations.py @@ -49,7 +49,7 @@ def list_by_service( filter: Optional[str] = None, top: Optional[int] = None, skip: Optional[int] = None, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.ApiRevisionCollection"]: """Lists all revisions of an API. @@ -126,7 +126,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) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_schema_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_schema_operations.py index 2f8e5a8a4bec..5eb0cf2e5e32 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_schema_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_schema_operations.py @@ -51,7 +51,7 @@ def list_by_api( filter: Optional[str] = None, top: Optional[int] = None, skip: Optional[int] = None, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.SchemaCollection"]: """Get the schema configuration at the API level. @@ -129,7 +129,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) @@ -146,7 +146,7 @@ async def get_entity_tag( service_name: str, api_id: str, schema_id: str, - **kwargs + **kwargs: Any ) -> bool: """Gets the entity state (Etag) version of the schema specified by its identifier. @@ -198,7 +198,7 @@ async def get_entity_tag( 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) response_headers = {} @@ -216,7 +216,7 @@ async def get( service_name: str, api_id: str, schema_id: str, - **kwargs + **kwargs: Any ) -> "_models.SchemaContract": """Get the schema configuration at the API level. @@ -268,7 +268,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) response_headers = {} @@ -289,7 +289,7 @@ async def _create_or_update_initial( schema_id: str, parameters: "_models.SchemaContract", if_match: Optional[str] = None, - **kwargs + **kwargs: Any ) -> Optional["_models.SchemaContract"]: cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.SchemaContract"]] error_map = { @@ -331,7 +331,7 @@ async def _create_or_update_initial( if response.status_code not in [200, 201, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -358,7 +358,7 @@ async def begin_create_or_update( schema_id: str, parameters: "_models.SchemaContract", if_match: Optional[str] = None, - **kwargs + **kwargs: Any ) -> AsyncLROPoller["_models.SchemaContract"]: """Creates or updates schema configuration for the API. @@ -379,8 +379,8 @@ async def begin_create_or_update( :type if_match: 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 SchemaContract or the result of cls(response) @@ -449,7 +449,7 @@ async def delete( schema_id: str, if_match: str, force: Optional[bool] = None, - **kwargs + **kwargs: Any ) -> None: """Deletes the schema configuration at the Api. @@ -509,7 +509,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/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_tag_description_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_tag_description_operations.py index 567913b6b646..bbaa7ba31a96 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_tag_description_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_tag_description_operations.py @@ -49,7 +49,7 @@ def list_by_service( filter: Optional[str] = None, top: Optional[int] = None, skip: Optional[int] = None, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.TagDescriptionCollection"]: """Lists all Tags descriptions in scope of API. Model similar to swagger - tagDescription is defined on API level but tag may be assigned to the Operations. @@ -129,7 +129,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) @@ -146,7 +146,7 @@ async def get_entity_tag( service_name: str, api_id: str, tag_description_id: str, - **kwargs + **kwargs: Any ) -> bool: """Gets the entity state version of the tag specified by its identifier. @@ -198,7 +198,7 @@ async def get_entity_tag( 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) response_headers = {} @@ -216,7 +216,7 @@ async def get( service_name: str, api_id: str, tag_description_id: str, - **kwargs + **kwargs: Any ) -> "_models.TagDescriptionContract": """Get Tag description in scope of API. @@ -268,7 +268,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) response_headers = {} @@ -289,7 +289,7 @@ async def create_or_update( tag_description_id: str, parameters: "_models.TagDescriptionCreateParameters", if_match: Optional[str] = None, - **kwargs + **kwargs: Any ) -> "_models.TagDescriptionContract": """Create/Update tag description in scope of the Api. @@ -353,7 +353,7 @@ async def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -378,7 +378,7 @@ async def delete( api_id: str, tag_description_id: str, if_match: str, - **kwargs + **kwargs: Any ) -> None: """Delete tag description for the Api. @@ -434,7 +434,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/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_version_set_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_version_set_operations.py index 3d55ecf63c5a..0c9fc79b133d 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_version_set_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_version_set_operations.py @@ -48,7 +48,7 @@ def list_by_service( filter: Optional[str] = None, top: Optional[int] = None, skip: Optional[int] = None, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.ApiVersionSetCollection"]: """Lists a collection of API Version Sets in the specified service instance. @@ -121,7 +121,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) @@ -137,7 +137,7 @@ async def get_entity_tag( resource_group_name: str, service_name: str, version_set_id: str, - **kwargs + **kwargs: Any ) -> bool: """Gets the entity state (Etag) version of the Api Version Set specified by its identifier. @@ -185,7 +185,7 @@ async def get_entity_tag( 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) response_headers = {} @@ -202,7 +202,7 @@ async def get( resource_group_name: str, service_name: str, version_set_id: str, - **kwargs + **kwargs: Any ) -> "_models.ApiVersionSetContract": """Gets the details of the Api Version Set specified by its identifier. @@ -250,7 +250,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) response_headers = {} @@ -270,7 +270,7 @@ async def create_or_update( version_set_id: str, parameters: "_models.ApiVersionSetContract", if_match: Optional[str] = None, - **kwargs + **kwargs: Any ) -> "_models.ApiVersionSetContract": """Creates or Updates a Api Version Set. @@ -330,7 +330,7 @@ async def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -355,7 +355,7 @@ async def update( version_set_id: str, if_match: str, parameters: "_models.ApiVersionSetUpdateParameters", - **kwargs + **kwargs: Any ) -> "_models.ApiVersionSetContract": """Updates the details of the Api VersionSet specified by its identifier. @@ -414,7 +414,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) response_headers = {} @@ -433,7 +433,7 @@ async def delete( service_name: str, version_set_id: str, if_match: str, - **kwargs + **kwargs: Any ) -> None: """Deletes specific Api Version Set. @@ -485,7 +485,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/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_authorization_server_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_authorization_server_operations.py index a9b984a51eb4..bffd44128243 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_authorization_server_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_authorization_server_operations.py @@ -48,7 +48,7 @@ def list_by_service( filter: Optional[str] = None, top: Optional[int] = None, skip: Optional[int] = None, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.AuthorizationServerCollection"]: """Lists a collection of authorization servers defined within a service instance. @@ -124,7 +124,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) @@ -140,7 +140,7 @@ async def get_entity_tag( resource_group_name: str, service_name: str, authsid: str, - **kwargs + **kwargs: Any ) -> bool: """Gets the entity state (Etag) version of the authorizationServer specified by its identifier. @@ -187,7 +187,7 @@ async def get_entity_tag( 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) response_headers = {} @@ -204,7 +204,7 @@ async def get( resource_group_name: str, service_name: str, authsid: str, - **kwargs + **kwargs: Any ) -> "_models.AuthorizationServerContract": """Gets the details of the authorization server specified by its identifier. @@ -251,7 +251,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) response_headers = {} @@ -271,7 +271,7 @@ async def create_or_update( authsid: str, parameters: "_models.AuthorizationServerContract", if_match: Optional[str] = None, - **kwargs + **kwargs: Any ) -> "_models.AuthorizationServerContract": """Creates new authorization server or updates an existing authorization server. @@ -330,7 +330,7 @@ async def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -355,7 +355,7 @@ async def update( authsid: str, if_match: str, parameters: "_models.AuthorizationServerUpdateContract", - **kwargs + **kwargs: Any ) -> "_models.AuthorizationServerContract": """Updates the details of the authorization server specified by its identifier. @@ -413,7 +413,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) response_headers = {} @@ -432,7 +432,7 @@ async def delete( service_name: str, authsid: str, if_match: str, - **kwargs + **kwargs: Any ) -> None: """Deletes specific authorization server instance. @@ -483,7 +483,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: @@ -496,7 +496,7 @@ async def list_secrets( resource_group_name: str, service_name: str, authsid: str, - **kwargs + **kwargs: Any ) -> "_models.AuthorizationServerSecretsContract": """Gets the client secret details of the authorization server. @@ -543,7 +543,7 @@ async def list_secrets( 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) response_headers = {} diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_backend_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_backend_operations.py index d7f4fcf4186b..e3170f9bab85 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_backend_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_backend_operations.py @@ -48,7 +48,7 @@ def list_by_service( filter: Optional[str] = None, top: Optional[int] = None, skip: Optional[int] = None, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.BackendCollection"]: """Lists a collection of backends in the specified service instance. @@ -124,7 +124,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) @@ -140,7 +140,7 @@ async def get_entity_tag( resource_group_name: str, service_name: str, backend_id: str, - **kwargs + **kwargs: Any ) -> bool: """Gets the entity state (Etag) version of the backend specified by its identifier. @@ -188,7 +188,7 @@ async def get_entity_tag( 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) response_headers = {} @@ -205,7 +205,7 @@ async def get( resource_group_name: str, service_name: str, backend_id: str, - **kwargs + **kwargs: Any ) -> "_models.BackendContract": """Gets the details of the backend specified by its identifier. @@ -253,7 +253,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) response_headers = {} @@ -273,7 +273,7 @@ async def create_or_update( backend_id: str, parameters: "_models.BackendContract", if_match: Optional[str] = None, - **kwargs + **kwargs: Any ) -> "_models.BackendContract": """Creates or Updates a backend. @@ -333,7 +333,7 @@ async def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -358,7 +358,7 @@ async def update( backend_id: str, if_match: str, parameters: "_models.BackendUpdateParameters", - **kwargs + **kwargs: Any ) -> "_models.BackendContract": """Updates an existing backend. @@ -417,7 +417,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) response_headers = {} @@ -436,7 +436,7 @@ async def delete( service_name: str, backend_id: str, if_match: str, - **kwargs + **kwargs: Any ) -> None: """Deletes the specified backend. @@ -488,7 +488,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: @@ -502,7 +502,7 @@ async def reconnect( service_name: str, backend_id: str, parameters: Optional["_models.BackendReconnectContract"] = None, - **kwargs + **kwargs: Any ) -> None: """Notifies the APIM proxy to create a new connection to the backend after the specified timeout. If no timeout was specified, timeout of 2 minutes is used. @@ -561,7 +561,7 @@ async def reconnect( if response.status_code not in [202]: 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/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_cache_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_cache_operations.py index ae8a3655bd54..0ea85ee83ff1 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_cache_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_cache_operations.py @@ -47,7 +47,7 @@ def list_by_service( service_name: str, top: Optional[int] = None, skip: Optional[int] = None, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.CacheCollection"]: """Lists a collection of all external Caches in the specified service instance. @@ -115,7 +115,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.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) @@ -131,7 +131,7 @@ async def get_entity_tag( resource_group_name: str, service_name: str, cache_id: str, - **kwargs + **kwargs: Any ) -> bool: """Gets the entity state (Etag) version of the Cache specified by its identifier. @@ -179,7 +179,7 @@ async def get_entity_tag( 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) response_headers = {} @@ -196,7 +196,7 @@ async def get( resource_group_name: str, service_name: str, cache_id: str, - **kwargs + **kwargs: Any ) -> "_models.CacheContract": """Gets the details of the Cache specified by its identifier. @@ -244,7 +244,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) response_headers = {} @@ -264,7 +264,7 @@ async def create_or_update( cache_id: str, parameters: "_models.CacheContract", if_match: Optional[str] = None, - **kwargs + **kwargs: Any ) -> "_models.CacheContract": """Creates or updates an External Cache to be used in Api Management instance. @@ -324,7 +324,7 @@ async def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -349,7 +349,7 @@ async def update( cache_id: str, if_match: str, parameters: "_models.CacheUpdateParameters", - **kwargs + **kwargs: Any ) -> "_models.CacheContract": """Updates the details of the cache specified by its identifier. @@ -408,7 +408,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) response_headers = {} @@ -427,7 +427,7 @@ async def delete( service_name: str, cache_id: str, if_match: str, - **kwargs + **kwargs: Any ) -> None: """Deletes specific Cache. @@ -479,7 +479,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/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_certificate_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_certificate_operations.py index 6d9067bf4311..0e72299cfb57 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_certificate_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_certificate_operations.py @@ -49,7 +49,7 @@ def list_by_service( top: Optional[int] = None, skip: Optional[int] = None, is_key_vault_refresh_failed: Optional[bool] = None, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.CertificateCollection"]: """Lists a collection of all certificates in the specified service instance. @@ -131,7 +131,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) @@ -147,7 +147,7 @@ async def get_entity_tag( resource_group_name: str, service_name: str, certificate_id: str, - **kwargs + **kwargs: Any ) -> bool: """Gets the entity state (Etag) version of the certificate specified by its identifier. @@ -195,7 +195,7 @@ async def get_entity_tag( 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) response_headers = {} @@ -212,7 +212,7 @@ async def get( resource_group_name: str, service_name: str, certificate_id: str, - **kwargs + **kwargs: Any ) -> "_models.CertificateContract": """Gets the details of the certificate specified by its identifier. @@ -260,7 +260,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) response_headers = {} @@ -280,7 +280,7 @@ async def create_or_update( certificate_id: str, parameters: "_models.CertificateCreateOrUpdateParameters", if_match: Optional[str] = None, - **kwargs + **kwargs: Any ) -> "_models.CertificateContract": """Creates or updates the certificate being used for authentication with the backend. @@ -340,7 +340,7 @@ async def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -364,7 +364,7 @@ async def delete( service_name: str, certificate_id: str, if_match: str, - **kwargs + **kwargs: Any ) -> None: """Deletes specific certificate. @@ -416,7 +416,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: @@ -429,7 +429,7 @@ async def refresh_secret( resource_group_name: str, service_name: str, certificate_id: str, - **kwargs + **kwargs: Any ) -> "_models.CertificateContract": """From KeyVault, Refresh the certificate being used for authentication with the backend. @@ -477,7 +477,7 @@ async def refresh_secret( 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) response_headers = {} diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_content_item_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_content_item_operations.py index cf3fb3ff7dcd..1cd3e0bdd240 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_content_item_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_content_item_operations.py @@ -46,9 +46,9 @@ def list_by_service( resource_group_name: str, service_name: str, content_type_id: str, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.ContentItemCollection"]: - """Returns list of content items. + """Lists developer portal's content items specified by the provided content type. :param resource_group_name: The name of the resource group. :type resource_group_name: str @@ -109,7 +109,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) @@ -126,9 +126,10 @@ async def get_entity_tag( service_name: str, content_type_id: str, content_item_id: str, - **kwargs + **kwargs: Any ) -> bool: - """Returns content item metadata. + """Returns the entity state (ETag) version of the developer portal's content item specified by its + identifier. :param resource_group_name: The name of the resource group. :type resource_group_name: str @@ -176,7 +177,7 @@ async def get_entity_tag( 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) response_headers = {} @@ -194,9 +195,9 @@ async def get( service_name: str, content_type_id: str, content_item_id: str, - **kwargs + **kwargs: Any ) -> "_models.ContentItemContract": - """Returns content item details. + """Returns the developer portal's content item specified by its identifier. :param resource_group_name: The name of the resource group. :type resource_group_name: str @@ -244,7 +245,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) response_headers = {} @@ -264,9 +265,9 @@ async def create_or_update( content_type_id: str, content_item_id: str, if_match: Optional[str] = None, - **kwargs + **kwargs: Any ) -> "_models.ContentItemContract": - """Creates new content item. + """Creates a new developer portal's content item specified by the provided content type. :param resource_group_name: The name of the resource group. :type resource_group_name: str @@ -319,7 +320,7 @@ async def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -344,9 +345,9 @@ async def delete( content_type_id: str, content_item_id: str, if_match: str, - **kwargs + **kwargs: Any ) -> None: - """Removes specified content item. + """Removes the specified developer portal's content item. :param resource_group_name: The name of the resource group. :type resource_group_name: str @@ -398,7 +399,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/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_content_type_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_content_type_operations.py index 0c849ee78763..489858dc5724 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_content_type_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_content_type_operations.py @@ -45,9 +45,10 @@ def list_by_service( self, resource_group_name: str, service_name: str, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.ContentTypeCollection"]: - """Returns list of content types. + """Lists the developer portal's content types. Content types describe content items' properties, + validation rules, and constraints. :param resource_group_name: The name of the resource group. :type resource_group_name: str @@ -105,7 +106,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) @@ -121,9 +122,10 @@ async def get( resource_group_name: str, service_name: str, content_type_id: str, - **kwargs + **kwargs: Any ) -> "_models.ContentTypeContract": - """Gets API Management content type details. + """Gets the details of the developer portal's content type. Content types describe content items' + properties, validation rules, and constraints. :param resource_group_name: The name of the resource group. :type resource_group_name: str @@ -168,7 +170,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) response_headers = {} @@ -187,9 +189,11 @@ async def create_or_update( service_name: str, content_type_id: str, if_match: Optional[str] = None, - **kwargs + **kwargs: Any ) -> "_models.ContentTypeContract": - """Creates or updates an Content Type. + """Creates or updates the developer portal's content type. Content types describe content items' + properties, validation rules, and constraints. Custom content types' identifiers need to start + with the ``c-`` prefix. Built-in content types can't be modified. :param resource_group_name: The name of the resource group. :type resource_group_name: str @@ -239,7 +243,7 @@ async def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -263,9 +267,11 @@ async def delete( service_name: str, content_type_id: str, if_match: str, - **kwargs + **kwargs: Any ) -> None: - """Removes specified content type. + """Removes the specified developer portal's content type. Content types describe content items' + properties, validation rules, and constraints. Built-in content types (with identifiers + starting with the ``c-`` prefix) can't be removed. :param resource_group_name: The name of the resource group. :type resource_group_name: str @@ -314,7 +320,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/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_delegation_settings_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_delegation_settings_operations.py index 8e03e2ca1655..7d2ec7af5aba 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_delegation_settings_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_delegation_settings_operations.py @@ -44,7 +44,7 @@ async def get_entity_tag( self, resource_group_name: str, service_name: str, - **kwargs + **kwargs: Any ) -> bool: """Gets the entity state (Etag) version of the DelegationSettings. @@ -88,7 +88,7 @@ async def get_entity_tag( 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) response_headers = {} @@ -104,7 +104,7 @@ async def get( self, resource_group_name: str, service_name: str, - **kwargs + **kwargs: Any ) -> "_models.PortalDelegationSettings": """Get Delegation Settings for the Portal. @@ -148,7 +148,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) response_headers = {} @@ -167,7 +167,7 @@ async def update( service_name: str, if_match: str, parameters: "_models.PortalDelegationSettings", - **kwargs + **kwargs: Any ) -> None: """Update Delegation settings. @@ -222,7 +222,7 @@ async def update( if response.status_code not in [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: @@ -236,7 +236,7 @@ async def create_or_update( service_name: str, parameters: "_models.PortalDelegationSettings", if_match: Optional[str] = None, - **kwargs + **kwargs: Any ) -> "_models.PortalDelegationSettings": """Create or Update Delegation settings. @@ -292,7 +292,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.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('PortalDelegationSettings', pipeline_response) @@ -307,7 +307,7 @@ async def list_secrets( self, resource_group_name: str, service_name: str, - **kwargs + **kwargs: Any ) -> "_models.PortalSettingValidationKeyContract": """Gets the secret validation key of the DelegationSettings. @@ -351,7 +351,7 @@ async def list_secrets( 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('PortalSettingValidationKeyContract', pipeline_response) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_deleted_services_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_deleted_services_operations.py index c80e4e8b4321..a9ccead25a57 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_deleted_services_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_deleted_services_operations.py @@ -45,7 +45,7 @@ def __init__(self, client, config, serializer, deserializer) -> None: def list_by_subscription( self, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.DeletedServicesCollection"]: """Lists all soft-deleted services available for undelete for the given subscription. @@ -99,7 +99,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.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) @@ -114,7 +114,7 @@ async def get_by_name( self, service_name: str, location: str, - **kwargs + **kwargs: Any ) -> "_models.DeletedServiceContract": """Get soft-deleted Api Management Service by name. @@ -158,7 +158,7 @@ async def get_by_name( 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('DeletedServiceContract', pipeline_response) @@ -173,7 +173,7 @@ async def _purge_initial( self, service_name: str, location: str, - **kwargs + **kwargs: Any ) -> Optional["_models.DeletedServiceContract"]: cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.DeletedServiceContract"]] error_map = { @@ -206,7 +206,7 @@ async def _purge_initial( if response.status_code not in [200, 202, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = None @@ -223,7 +223,7 @@ async def begin_purge( self, service_name: str, location: str, - **kwargs + **kwargs: Any ) -> AsyncLROPoller["_models.DeletedServiceContract"]: """Purges Api Management Service (deletes it with no option to undelete). @@ -233,8 +233,8 @@ async def begin_purge( :type location: 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) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_diagnostic_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_diagnostic_operations.py index 4a221d236564..bdbf1567516e 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_diagnostic_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_diagnostic_operations.py @@ -48,7 +48,7 @@ def list_by_service( filter: Optional[str] = None, top: Optional[int] = None, skip: Optional[int] = None, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.DiagnosticCollection"]: """Lists all diagnostics of the API Management service instance. @@ -122,7 +122,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) @@ -138,7 +138,7 @@ async def get_entity_tag( resource_group_name: str, service_name: str, diagnostic_id: str, - **kwargs + **kwargs: Any ) -> bool: """Gets the entity state (Etag) version of the Diagnostic specified by its identifier. @@ -186,7 +186,7 @@ async def get_entity_tag( 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) response_headers = {} @@ -203,7 +203,7 @@ async def get( resource_group_name: str, service_name: str, diagnostic_id: str, - **kwargs + **kwargs: Any ) -> "_models.DiagnosticContract": """Gets the details of the Diagnostic specified by its identifier. @@ -251,7 +251,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) response_headers = {} @@ -271,7 +271,7 @@ async def create_or_update( diagnostic_id: str, parameters: "_models.DiagnosticContract", if_match: Optional[str] = None, - **kwargs + **kwargs: Any ) -> "_models.DiagnosticContract": """Creates a new Diagnostic or updates an existing one. @@ -331,7 +331,7 @@ async def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -356,7 +356,7 @@ async def update( diagnostic_id: str, if_match: str, parameters: "_models.DiagnosticContract", - **kwargs + **kwargs: Any ) -> "_models.DiagnosticContract": """Updates the details of the Diagnostic specified by its identifier. @@ -415,7 +415,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) response_headers = {} @@ -434,7 +434,7 @@ async def delete( service_name: str, diagnostic_id: str, if_match: str, - **kwargs + **kwargs: Any ) -> None: """Deletes the specified Diagnostic. @@ -486,7 +486,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/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_email_template_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_email_template_operations.py index 42c289ef5eee..2fb72c13e9ac 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_email_template_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_email_template_operations.py @@ -48,7 +48,7 @@ def list_by_service( filter: Optional[str] = None, top: Optional[int] = None, skip: Optional[int] = None, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.EmailTemplateCollection"]: """Gets all email templates. @@ -122,7 +122,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) @@ -138,7 +138,7 @@ async def get_entity_tag( resource_group_name: str, service_name: str, template_name: Union[str, "_models.TemplateName"], - **kwargs + **kwargs: Any ) -> bool: """Gets the entity state (Etag) version of the email template specified by its identifier. @@ -185,7 +185,7 @@ async def get_entity_tag( 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) response_headers = {} @@ -202,7 +202,7 @@ async def get( resource_group_name: str, service_name: str, template_name: Union[str, "_models.TemplateName"], - **kwargs + **kwargs: Any ) -> "_models.EmailTemplateContract": """Gets the details of the email template specified by its identifier. @@ -249,7 +249,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) response_headers = {} @@ -269,7 +269,7 @@ async def create_or_update( template_name: Union[str, "_models.TemplateName"], parameters: "_models.EmailTemplateUpdateParameters", if_match: Optional[str] = None, - **kwargs + **kwargs: Any ) -> "_models.EmailTemplateContract": """Updates an Email Template. @@ -328,7 +328,7 @@ async def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -350,7 +350,7 @@ async def update( template_name: Union[str, "_models.TemplateName"], if_match: str, parameters: "_models.EmailTemplateUpdateParameters", - **kwargs + **kwargs: Any ) -> "_models.EmailTemplateContract": """Updates API Management email template. @@ -408,7 +408,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) response_headers = {} @@ -427,7 +427,7 @@ async def delete( service_name: str, template_name: Union[str, "_models.TemplateName"], if_match: str, - **kwargs + **kwargs: Any ) -> None: """Reset the Email Template to default template provided by the API Management service instance. @@ -478,7 +478,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/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_gateway_api_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_gateway_api_operations.py index 2341c514a214..9e4f374f6c4b 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_gateway_api_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_gateway_api_operations.py @@ -49,7 +49,7 @@ def list_by_service( filter: Optional[str] = None, top: Optional[int] = None, skip: Optional[int] = None, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.ApiCollection"]: """Lists a collection of the APIs associated with a gateway. @@ -127,7 +127,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) @@ -144,7 +144,7 @@ async def get_entity_tag( service_name: str, gateway_id: str, api_id: str, - **kwargs + **kwargs: Any ) -> bool: """Checks that API entity specified by identifier is associated with the Gateway entity. @@ -195,7 +195,7 @@ async def get_entity_tag( 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) response_headers = {} @@ -214,7 +214,7 @@ async def create_or_update( gateway_id: str, api_id: str, parameters: Optional["_models.AssociationContract"] = None, - **kwargs + **kwargs: Any ) -> "_models.ApiContract": """Adds an API to the specified Gateway. @@ -275,7 +275,7 @@ async def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -296,7 +296,7 @@ async def delete( service_name: str, gateway_id: str, api_id: str, - **kwargs + **kwargs: Any ) -> None: """Deletes the specified API from the specified Gateway. @@ -347,7 +347,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/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_gateway_certificate_authority_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_gateway_certificate_authority_operations.py index f92f45befdeb..4d2be3a9b8bf 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_gateway_certificate_authority_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_gateway_certificate_authority_operations.py @@ -49,7 +49,7 @@ def list_by_service( filter: Optional[str] = None, top: Optional[int] = None, skip: Optional[int] = None, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.GatewayCertificateAuthorityCollection"]: """Lists the collection of Certificate Authorities for the specified Gateway entity. @@ -127,7 +127,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) @@ -144,7 +144,7 @@ async def get_entity_tag( service_name: str, gateway_id: str, certificate_id: str, - **kwargs + **kwargs: Any ) -> bool: """Checks if Certificate entity is assigned to Gateway entity as Certificate Authority. @@ -196,7 +196,7 @@ async def get_entity_tag( 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) response_headers = {} @@ -214,7 +214,7 @@ async def get( service_name: str, gateway_id: str, certificate_id: str, - **kwargs + **kwargs: Any ) -> "_models.GatewayCertificateAuthorityContract": """Get assigned Gateway Certificate Authority details. @@ -266,7 +266,7 @@ async def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -287,7 +287,7 @@ async def create_or_update( certificate_id: str, parameters: "_models.GatewayCertificateAuthorityContract", if_match: Optional[str] = None, - **kwargs + **kwargs: Any ) -> "_models.GatewayCertificateAuthorityContract": """Assign Certificate entity to Gateway entity as Certificate Authority. @@ -351,7 +351,7 @@ async def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -376,7 +376,7 @@ async def delete( gateway_id: str, certificate_id: str, if_match: str, - **kwargs + **kwargs: Any ) -> None: """Remove relationship between Certificate Authority and Gateway entity. @@ -432,7 +432,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/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_gateway_hostname_configuration_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_gateway_hostname_configuration_operations.py index cf819260d17b..4b4eb4c9325d 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_gateway_hostname_configuration_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_gateway_hostname_configuration_operations.py @@ -49,7 +49,7 @@ def list_by_service( filter: Optional[str] = None, top: Optional[int] = None, skip: Optional[int] = None, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.GatewayHostnameConfigurationCollection"]: """Lists the collection of hostname configurations for the specified gateway. @@ -128,7 +128,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) @@ -145,7 +145,7 @@ async def get_entity_tag( service_name: str, gateway_id: str, hc_id: str, - **kwargs + **kwargs: Any ) -> bool: """Checks that hostname configuration entity specified by identifier exists for specified Gateway entity. @@ -198,7 +198,7 @@ async def get_entity_tag( 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) response_headers = {} @@ -216,7 +216,7 @@ async def get( service_name: str, gateway_id: str, hc_id: str, - **kwargs + **kwargs: Any ) -> "_models.GatewayHostnameConfigurationContract": """Get details of a hostname configuration. @@ -268,7 +268,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) response_headers = {} @@ -289,7 +289,7 @@ async def create_or_update( hc_id: str, parameters: "_models.GatewayHostnameConfigurationContract", if_match: Optional[str] = None, - **kwargs + **kwargs: Any ) -> "_models.GatewayHostnameConfigurationContract": """Creates of updates hostname configuration for a Gateway. @@ -353,7 +353,7 @@ async def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -378,7 +378,7 @@ async def delete( gateway_id: str, hc_id: str, if_match: str, - **kwargs + **kwargs: Any ) -> None: """Deletes the specified hostname configuration from the specified Gateway. @@ -434,7 +434,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/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_gateway_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_gateway_operations.py index 66b76a4a8c71..87c011a33c58 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_gateway_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_gateway_operations.py @@ -48,7 +48,7 @@ def list_by_service( filter: Optional[str] = None, top: Optional[int] = None, skip: Optional[int] = None, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.GatewayCollection"]: """Lists a collection of gateways registered with service instance. @@ -125,7 +125,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) @@ -141,7 +141,7 @@ async def get_entity_tag( resource_group_name: str, service_name: str, gateway_id: str, - **kwargs + **kwargs: Any ) -> bool: """Gets the entity state (Etag) version of the Gateway specified by its identifier. @@ -189,7 +189,7 @@ async def get_entity_tag( 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) response_headers = {} @@ -206,7 +206,7 @@ async def get( resource_group_name: str, service_name: str, gateway_id: str, - **kwargs + **kwargs: Any ) -> "_models.GatewayContract": """Gets the details of the Gateway specified by its identifier. @@ -254,7 +254,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) response_headers = {} @@ -274,7 +274,7 @@ async def create_or_update( gateway_id: str, parameters: "_models.GatewayContract", if_match: Optional[str] = None, - **kwargs + **kwargs: Any ) -> "_models.GatewayContract": """Creates or updates a Gateway to be used in Api Management instance. @@ -334,7 +334,7 @@ async def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -359,7 +359,7 @@ async def update( gateway_id: str, if_match: str, parameters: "_models.GatewayContract", - **kwargs + **kwargs: Any ) -> "_models.GatewayContract": """Updates the details of the gateway specified by its identifier. @@ -418,7 +418,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) response_headers = {} @@ -437,7 +437,7 @@ async def delete( service_name: str, gateway_id: str, if_match: str, - **kwargs + **kwargs: Any ) -> None: """Deletes specific Gateway. @@ -489,7 +489,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: @@ -502,7 +502,7 @@ async def list_keys( resource_group_name: str, service_name: str, gateway_id: str, - **kwargs + **kwargs: Any ) -> "_models.GatewayKeysContract": """Retrieves gateway keys. @@ -550,7 +550,7 @@ async def list_keys( 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) response_headers = {} @@ -569,7 +569,7 @@ async def regenerate_key( service_name: str, gateway_id: str, parameters: "_models.GatewayKeyRegenerationRequestContract", - **kwargs + **kwargs: Any ) -> None: """Regenerates specified gateway key invalidating any tokens created with it. @@ -624,7 +624,7 @@ async def regenerate_key( if response.status_code not in [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: @@ -638,7 +638,7 @@ async def generate_token( service_name: str, gateway_id: str, parameters: "_models.GatewayTokenRequestContract", - **kwargs + **kwargs: Any ) -> "_models.GatewayTokenContract": """Gets the Shared Access Authorization Token for the gateway. @@ -693,7 +693,7 @@ async def generate_token( 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('GatewayTokenContract', pipeline_response) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_group_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_group_operations.py index ca825a3aec40..61e6e1186b02 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_group_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_group_operations.py @@ -48,7 +48,7 @@ def list_by_service( filter: Optional[str] = None, top: Optional[int] = None, skip: Optional[int] = None, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.GroupCollection"]: """Lists a collection of groups defined within a service instance. @@ -125,7 +125,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) @@ -141,7 +141,7 @@ async def get_entity_tag( resource_group_name: str, service_name: str, group_id: str, - **kwargs + **kwargs: Any ) -> bool: """Gets the entity state (Etag) version of the group specified by its identifier. @@ -189,7 +189,7 @@ async def get_entity_tag( 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) response_headers = {} @@ -206,7 +206,7 @@ async def get( resource_group_name: str, service_name: str, group_id: str, - **kwargs + **kwargs: Any ) -> "_models.GroupContract": """Gets the details of the group specified by its identifier. @@ -254,7 +254,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) response_headers = {} @@ -274,7 +274,7 @@ async def create_or_update( group_id: str, parameters: "_models.GroupCreateParameters", if_match: Optional[str] = None, - **kwargs + **kwargs: Any ) -> "_models.GroupContract": """Creates or Updates a group. @@ -334,7 +334,7 @@ async def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -359,7 +359,7 @@ async def update( group_id: str, if_match: str, parameters: "_models.GroupUpdateParameters", - **kwargs + **kwargs: Any ) -> "_models.GroupContract": """Updates the details of the group specified by its identifier. @@ -418,7 +418,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) response_headers = {} @@ -437,7 +437,7 @@ async def delete( service_name: str, group_id: str, if_match: str, - **kwargs + **kwargs: Any ) -> None: """Deletes specific group of the API Management service instance. @@ -489,7 +489,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/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_group_user_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_group_user_operations.py index e75d0e7b776f..e6b9d2fe3f21 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_group_user_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_group_user_operations.py @@ -49,7 +49,7 @@ def list( filter: Optional[str] = None, top: Optional[int] = None, skip: Optional[int] = None, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.UserCollection"]: """Lists a collection of user entities associated with the group. @@ -132,7 +132,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) @@ -149,7 +149,7 @@ async def check_entity_exists( service_name: str, group_id: str, user_id: str, - **kwargs + **kwargs: Any ) -> bool: """Checks that user entity specified by identifier is associated with the group entity. @@ -200,7 +200,7 @@ async def check_entity_exists( if response.status_code not in [204, 404]: 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: @@ -215,7 +215,7 @@ async def create( service_name: str, group_id: str, user_id: str, - **kwargs + **kwargs: Any ) -> "_models.UserContract": """Add existing user to existing group. @@ -266,7 +266,7 @@ async def create( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -287,7 +287,7 @@ async def delete( service_name: str, group_id: str, user_id: str, - **kwargs + **kwargs: Any ) -> None: """Remove existing user from existing group. @@ -338,7 +338,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/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_identity_provider_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_identity_provider_operations.py index b095e3e6cc9f..9c83ceff4de9 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_identity_provider_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_identity_provider_operations.py @@ -45,7 +45,7 @@ def list_by_service( self, resource_group_name: str, service_name: str, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.IdentityProviderList"]: """Lists a collection of Identity Provider configured in the specified service instance. @@ -105,7 +105,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) @@ -121,7 +121,7 @@ async def get_entity_tag( resource_group_name: str, service_name: str, identity_provider_name: Union[str, "_models.IdentityProviderType"], - **kwargs + **kwargs: Any ) -> bool: """Gets the entity state (Etag) version of the identityProvider specified by its identifier. @@ -168,7 +168,7 @@ async def get_entity_tag( 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) response_headers = {} @@ -185,7 +185,7 @@ async def get( resource_group_name: str, service_name: str, identity_provider_name: Union[str, "_models.IdentityProviderType"], - **kwargs + **kwargs: Any ) -> "_models.IdentityProviderContract": """Gets the configuration details of the identity Provider configured in specified service instance. @@ -233,7 +233,7 @@ async def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -253,7 +253,7 @@ async def create_or_update( identity_provider_name: Union[str, "_models.IdentityProviderType"], parameters: "_models.IdentityProviderCreateContract", if_match: Optional[str] = None, - **kwargs + **kwargs: Any ) -> "_models.IdentityProviderContract": """Creates or Updates the IdentityProvider configuration. @@ -312,7 +312,7 @@ async def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -337,7 +337,7 @@ async def update( identity_provider_name: Union[str, "_models.IdentityProviderType"], if_match: str, parameters: "_models.IdentityProviderUpdateParameters", - **kwargs + **kwargs: Any ) -> "_models.IdentityProviderContract": """Updates an existing IdentityProvider configuration. @@ -395,7 +395,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) response_headers = {} @@ -414,7 +414,7 @@ async def delete( service_name: str, identity_provider_name: Union[str, "_models.IdentityProviderType"], if_match: str, - **kwargs + **kwargs: Any ) -> None: """Deletes the specified identity provider configuration. @@ -465,7 +465,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: @@ -478,7 +478,7 @@ async def list_secrets( resource_group_name: str, service_name: str, identity_provider_name: Union[str, "_models.IdentityProviderType"], - **kwargs + **kwargs: Any ) -> "_models.ClientSecretContract": """Gets the client secret details of the Identity Provider. @@ -525,7 +525,7 @@ async def list_secrets( 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) response_headers = {} diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_issue_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_issue_operations.py index 635e3df06369..9754af78925d 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_issue_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_issue_operations.py @@ -48,7 +48,7 @@ def list_by_service( filter: Optional[str] = None, top: Optional[int] = None, skip: Optional[int] = None, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.IssueCollection"]: """Lists a collection of issues in the specified service instance. @@ -127,7 +127,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) @@ -143,7 +143,7 @@ async def get( resource_group_name: str, service_name: str, issue_id: str, - **kwargs + **kwargs: Any ) -> "_models.IssueContract": """Gets API Management issue details. @@ -191,7 +191,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) response_headers = {} diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_logger_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_logger_operations.py index 3faae87de128..f9870d649878 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_logger_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_logger_operations.py @@ -48,7 +48,7 @@ def list_by_service( filter: Optional[str] = None, top: Optional[int] = None, skip: Optional[int] = None, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.LoggerCollection"]: """Lists a collection of loggers in the specified service instance. @@ -125,7 +125,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) @@ -141,7 +141,7 @@ async def get_entity_tag( resource_group_name: str, service_name: str, logger_id: str, - **kwargs + **kwargs: Any ) -> bool: """Gets the entity state (Etag) version of the logger specified by its identifier. @@ -188,7 +188,7 @@ async def get_entity_tag( 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) response_headers = {} @@ -205,7 +205,7 @@ async def get( resource_group_name: str, service_name: str, logger_id: str, - **kwargs + **kwargs: Any ) -> "_models.LoggerContract": """Gets the details of the logger specified by its identifier. @@ -252,7 +252,7 @@ async def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -272,7 +272,7 @@ async def create_or_update( logger_id: str, parameters: "_models.LoggerContract", if_match: Optional[str] = None, - **kwargs + **kwargs: Any ) -> "_models.LoggerContract": """Creates or Updates a logger. @@ -331,7 +331,7 @@ async def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -356,7 +356,7 @@ async def update( logger_id: str, if_match: str, parameters: "_models.LoggerUpdateContract", - **kwargs + **kwargs: Any ) -> "_models.LoggerContract": """Updates an existing logger. @@ -414,7 +414,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) response_headers = {} @@ -433,7 +433,7 @@ async def delete( service_name: str, logger_id: str, if_match: str, - **kwargs + **kwargs: Any ) -> None: """Deletes the specified logger. @@ -484,7 +484,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/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_named_value_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_named_value_operations.py index 0b07aeb0030a..7365d146c549 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_named_value_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_named_value_operations.py @@ -51,7 +51,7 @@ def list_by_service( top: Optional[int] = None, skip: Optional[int] = None, is_key_vault_refresh_failed: Optional[bool] = None, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.NamedValueCollection"]: """Lists a collection of named values defined within a service instance. @@ -132,7 +132,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) @@ -148,7 +148,7 @@ async def get_entity_tag( resource_group_name: str, service_name: str, named_value_id: str, - **kwargs + **kwargs: Any ) -> bool: """Gets the entity state (Etag) version of the named value specified by its identifier. @@ -195,7 +195,7 @@ async def get_entity_tag( 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) response_headers = {} @@ -212,7 +212,7 @@ async def get( resource_group_name: str, service_name: str, named_value_id: str, - **kwargs + **kwargs: Any ) -> "_models.NamedValueContract": """Gets the details of the named value specified by its identifier. @@ -259,7 +259,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) response_headers = {} @@ -279,7 +279,7 @@ async def _create_or_update_initial( named_value_id: str, parameters: "_models.NamedValueCreateContract", if_match: Optional[str] = None, - **kwargs + **kwargs: Any ) -> Optional["_models.NamedValueContract"]: cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.NamedValueContract"]] error_map = { @@ -320,7 +320,7 @@ async def _create_or_update_initial( if response.status_code not in [200, 201, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -346,7 +346,7 @@ async def begin_create_or_update( named_value_id: str, parameters: "_models.NamedValueCreateContract", if_match: Optional[str] = None, - **kwargs + **kwargs: Any ) -> AsyncLROPoller["_models.NamedValueContract"]: """Creates or updates named value. @@ -363,8 +363,8 @@ async def begin_create_or_update( :type if_match: 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 NamedValueContract or the result of cls(response) @@ -430,7 +430,7 @@ async def _update_initial( named_value_id: str, if_match: str, parameters: "_models.NamedValueUpdateParameters", - **kwargs + **kwargs: Any ) -> Optional["_models.NamedValueContract"]: cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.NamedValueContract"]] error_map = { @@ -470,7 +470,7 @@ async def _update_initial( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -492,7 +492,7 @@ async def begin_update( named_value_id: str, if_match: str, parameters: "_models.NamedValueUpdateParameters", - **kwargs + **kwargs: Any ) -> AsyncLROPoller["_models.NamedValueContract"]: """Updates the specific named value. @@ -509,8 +509,8 @@ async def begin_update( :type parameters: ~azure.mgmt.apimanagement.models.NamedValueUpdateParameters :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 NamedValueContract or the result of cls(response) @@ -575,7 +575,7 @@ async def delete( service_name: str, named_value_id: str, if_match: str, - **kwargs + **kwargs: Any ) -> None: """Deletes specific named value from the API Management service instance. @@ -626,7 +626,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: @@ -639,7 +639,7 @@ async def list_value( resource_group_name: str, service_name: str, named_value_id: str, - **kwargs + **kwargs: Any ) -> "_models.NamedValueSecretContract": """Gets the secret of the named value specified by its identifier. @@ -686,7 +686,7 @@ async def list_value( 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) response_headers = {} @@ -704,7 +704,7 @@ async def _refresh_secret_initial( resource_group_name: str, service_name: str, named_value_id: str, - **kwargs + **kwargs: Any ) -> Optional["_models.NamedValueContract"]: cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.NamedValueContract"]] error_map = { @@ -738,7 +738,7 @@ async def _refresh_secret_initial( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -758,7 +758,7 @@ async def begin_refresh_secret( resource_group_name: str, service_name: str, named_value_id: str, - **kwargs + **kwargs: Any ) -> AsyncLROPoller["_models.NamedValueContract"]: """Refresh the secret of the named value specified by its identifier. @@ -770,8 +770,8 @@ async def begin_refresh_secret( :type named_value_id: 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 NamedValueContract or the result of cls(response) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_network_status_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_network_status_operations.py index 4c2d11b73419..245150098aae 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_network_status_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_network_status_operations.py @@ -44,7 +44,7 @@ async def list_by_service( self, resource_group_name: str, service_name: str, - **kwargs + **kwargs: Any ) -> List["_models.NetworkStatusContractByLocation"]: """Gets the Connectivity Status to the external resources on which the Api Management service depends from inside the Cloud Service. This also returns the DNS Servers as visible to the @@ -90,7 +90,7 @@ async def list_by_service( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('[NetworkStatusContractByLocation]', pipeline_response) @@ -106,7 +106,7 @@ async def list_by_location( resource_group_name: str, service_name: str, location_name: str, - **kwargs + **kwargs: Any ) -> "_models.NetworkStatusContract": """Gets the Connectivity Status to the external resources on which the Api Management service depends from inside the Cloud Service. This also returns the DNS Servers as visible to the @@ -156,7 +156,7 @@ async def list_by_location( 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('NetworkStatusContract', pipeline_response) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_notification_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_notification_operations.py index 078625bf3251..a38e1be901f8 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_notification_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_notification_operations.py @@ -47,7 +47,7 @@ def list_by_service( service_name: str, top: Optional[int] = None, skip: Optional[int] = None, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.NotificationCollection"]: """Lists a collection of properties defined within a service instance. @@ -115,7 +115,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.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) @@ -131,7 +131,7 @@ async def get( resource_group_name: str, service_name: str, notification_name: Union[str, "_models.NotificationName"], - **kwargs + **kwargs: Any ) -> "_models.NotificationContract": """Gets the details of the Notification specified by its identifier. @@ -178,7 +178,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('NotificationContract', pipeline_response) @@ -195,7 +195,7 @@ async def create_or_update( service_name: str, notification_name: Union[str, "_models.NotificationName"], if_match: Optional[str] = None, - **kwargs + **kwargs: Any ) -> "_models.NotificationContract": """Create or Update API Management publisher notification. @@ -247,7 +247,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.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('NotificationContract', pipeline_response) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_notification_recipient_email_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_notification_recipient_email_operations.py index 9d21d80103b8..21634bdac4c8 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_notification_recipient_email_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_notification_recipient_email_operations.py @@ -45,7 +45,7 @@ async def list_by_notification( resource_group_name: str, service_name: str, notification_name: Union[str, "_models.NotificationName"], - **kwargs + **kwargs: Any ) -> "_models.RecipientEmailCollection": """Gets the list of the Notification Recipient Emails subscribed to a notification. @@ -92,7 +92,7 @@ async def list_by_notification( 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('RecipientEmailCollection', pipeline_response) @@ -109,7 +109,7 @@ async def check_entity_exists( service_name: str, notification_name: Union[str, "_models.NotificationName"], email: str, - **kwargs + **kwargs: Any ) -> bool: """Determine if Notification Recipient Email subscribed to the notification. @@ -159,7 +159,7 @@ async def check_entity_exists( if response.status_code not in [204, 404]: 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: @@ -174,7 +174,7 @@ async def create_or_update( service_name: str, notification_name: Union[str, "_models.NotificationName"], email: str, - **kwargs + **kwargs: Any ) -> "_models.RecipientEmailContract": """Adds the Email address to the list of Recipients for the Notification. @@ -224,7 +224,7 @@ async def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -245,7 +245,7 @@ async def delete( service_name: str, notification_name: Union[str, "_models.NotificationName"], email: str, - **kwargs + **kwargs: Any ) -> None: """Removes the email from the list of Notification. @@ -295,7 +295,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/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_notification_recipient_user_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_notification_recipient_user_operations.py index 818f8b344ac1..e96f821a917d 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_notification_recipient_user_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_notification_recipient_user_operations.py @@ -45,7 +45,7 @@ async def list_by_notification( resource_group_name: str, service_name: str, notification_name: Union[str, "_models.NotificationName"], - **kwargs + **kwargs: Any ) -> "_models.RecipientUserCollection": """Gets the list of the Notification Recipient User subscribed to the notification. @@ -92,7 +92,7 @@ async def list_by_notification( 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('RecipientUserCollection', pipeline_response) @@ -109,7 +109,7 @@ async def check_entity_exists( service_name: str, notification_name: Union[str, "_models.NotificationName"], user_id: str, - **kwargs + **kwargs: Any ) -> bool: """Determine if the Notification Recipient User is subscribed to the notification. @@ -159,7 +159,7 @@ async def check_entity_exists( if response.status_code not in [204, 404]: 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: @@ -174,7 +174,7 @@ async def create_or_update( service_name: str, notification_name: Union[str, "_models.NotificationName"], user_id: str, - **kwargs + **kwargs: Any ) -> "_models.RecipientUserContract": """Adds the API Management User to the list of Recipients for the Notification. @@ -224,7 +224,7 @@ async def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -245,7 +245,7 @@ async def delete( service_name: str, notification_name: Union[str, "_models.NotificationName"], user_id: str, - **kwargs + **kwargs: Any ) -> None: """Removes the API Management user from the list of Notification. @@ -295,7 +295,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/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_open_id_connect_provider_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_open_id_connect_provider_operations.py index e6b251bb2eef..81a0ef02b5ea 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_open_id_connect_provider_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_open_id_connect_provider_operations.py @@ -48,7 +48,7 @@ def list_by_service( filter: Optional[str] = None, top: Optional[int] = None, skip: Optional[int] = None, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.OpenIdConnectProviderCollection"]: """Lists of all the OpenId Connect Providers. @@ -124,7 +124,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) @@ -140,7 +140,7 @@ async def get_entity_tag( resource_group_name: str, service_name: str, opid: str, - **kwargs + **kwargs: Any ) -> bool: """Gets the entity state (Etag) version of the openIdConnectProvider specified by its identifier. @@ -187,7 +187,7 @@ async def get_entity_tag( 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) response_headers = {} @@ -204,7 +204,7 @@ async def get( resource_group_name: str, service_name: str, opid: str, - **kwargs + **kwargs: Any ) -> "_models.OpenidConnectProviderContract": """Gets specific OpenID Connect Provider without secrets. @@ -251,7 +251,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) response_headers = {} @@ -271,7 +271,7 @@ async def create_or_update( opid: str, parameters: "_models.OpenidConnectProviderContract", if_match: Optional[str] = None, - **kwargs + **kwargs: Any ) -> "_models.OpenidConnectProviderContract": """Creates or updates the OpenID Connect Provider. @@ -330,7 +330,7 @@ async def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -355,7 +355,7 @@ async def update( opid: str, if_match: str, parameters: "_models.OpenidConnectProviderUpdateContract", - **kwargs + **kwargs: Any ) -> "_models.OpenidConnectProviderContract": """Updates the specific OpenID Connect Provider. @@ -413,7 +413,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) response_headers = {} @@ -432,7 +432,7 @@ async def delete( service_name: str, opid: str, if_match: str, - **kwargs + **kwargs: Any ) -> None: """Deletes specific OpenID Connect Provider of the API Management service instance. @@ -483,7 +483,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: @@ -496,7 +496,7 @@ async def list_secrets( resource_group_name: str, service_name: str, opid: str, - **kwargs + **kwargs: Any ) -> "_models.ClientSecretContract": """Gets the client secret details of the OpenID Connect Provider. @@ -543,7 +543,7 @@ async def list_secrets( 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) response_headers = {} diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_operation_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_operation_operations.py index ecda8df1cd66..b3f376652767 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_operation_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_operation_operations.py @@ -50,7 +50,7 @@ def list_by_tags( top: Optional[int] = None, skip: Optional[int] = None, include_not_tagged_operations: Optional[bool] = None, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.TagResourceCollection"]: """Lists a collection of operations associated with tags. @@ -138,7 +138,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) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_policy_description_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_policy_description_operations.py index 446375360fc8..94e7ca7a0010 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_policy_description_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_policy_description_operations.py @@ -45,7 +45,7 @@ async def list_by_service( resource_group_name: str, service_name: str, scope: Optional[Union[str, "_models.PolicyScopeContract"]] = None, - **kwargs + **kwargs: Any ) -> "_models.PolicyDescriptionCollection": """Lists all policy descriptions. @@ -93,7 +93,7 @@ async def list_by_service( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('PolicyDescriptionCollection', pipeline_response) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_policy_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_policy_operations.py index a42de63fc47c..ea83cf9702e6 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_policy_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_policy_operations.py @@ -44,7 +44,7 @@ async def list_by_service( self, resource_group_name: str, service_name: str, - **kwargs + **kwargs: Any ) -> "_models.PolicyCollection": """Lists all the Global Policy definitions of the Api Management service. @@ -88,7 +88,7 @@ async def list_by_service( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('PolicyCollection', pipeline_response) @@ -104,7 +104,7 @@ async def get_entity_tag( resource_group_name: str, service_name: str, policy_id: Union[str, "_models.PolicyIdName"], - **kwargs + **kwargs: Any ) -> bool: """Gets the entity state (Etag) version of the Global policy definition in the Api Management service. @@ -152,7 +152,7 @@ async def get_entity_tag( 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) response_headers = {} @@ -170,7 +170,7 @@ async def get( service_name: str, policy_id: Union[str, "_models.PolicyIdName"], format: Optional[Union[str, "_models.PolicyExportFormat"]] = "xml", - **kwargs + **kwargs: Any ) -> "_models.PolicyContract": """Get the Global policy definition of the Api Management service. @@ -221,7 +221,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) response_headers = {} @@ -241,7 +241,7 @@ async def create_or_update( policy_id: Union[str, "_models.PolicyIdName"], parameters: "_models.PolicyContract", if_match: Optional[str] = None, - **kwargs + **kwargs: Any ) -> "_models.PolicyContract": """Creates or updates the global policy configuration of the Api Management service. @@ -300,7 +300,7 @@ async def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -324,7 +324,7 @@ async def delete( service_name: str, policy_id: Union[str, "_models.PolicyIdName"], if_match: str, - **kwargs + **kwargs: Any ) -> None: """Deletes the global policy configuration of the Api Management Service. @@ -375,7 +375,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/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_portal_revision_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_portal_revision_operations.py index 297e836b2d9c..215ae674077b 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_portal_revision_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_portal_revision_operations.py @@ -50,9 +50,9 @@ def list_by_service( filter: Optional[str] = None, top: Optional[int] = None, skip: Optional[int] = None, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.PortalRevisionCollection"]: - """Lists a collection of developer portal revision entities. + """Lists developer portal's revisions. :param resource_group_name: The name of the resource group. :type resource_group_name: str @@ -133,7 +133,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) @@ -149,9 +149,9 @@ async def get_entity_tag( resource_group_name: str, service_name: str, portal_revision_id: str, - **kwargs + **kwargs: Any ) -> bool: - """Gets developer portal revision specified by its identifier. + """Gets the developer portal revision specified by its identifier. :param resource_group_name: The name of the resource group. :type resource_group_name: str @@ -197,7 +197,7 @@ async def get_entity_tag( 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) response_headers = {} @@ -214,9 +214,9 @@ async def get( resource_group_name: str, service_name: str, portal_revision_id: str, - **kwargs + **kwargs: Any ) -> "_models.PortalRevisionContract": - """Gets developer portal revision specified by its identifier. + """Gets the developer portal's revision specified by its identifier. :param resource_group_name: The name of the resource group. :type resource_group_name: str @@ -262,7 +262,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) response_headers = {} @@ -281,7 +281,7 @@ async def _create_or_update_initial( service_name: str, portal_revision_id: str, parameters: "_models.PortalRevisionContract", - **kwargs + **kwargs: Any ) -> Optional["_models.PortalRevisionContract"]: cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.PortalRevisionContract"]] error_map = { @@ -320,7 +320,7 @@ async def _create_or_update_initial( if response.status_code not in [201, 202]: 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) response_headers = {} @@ -341,9 +341,10 @@ async def begin_create_or_update( service_name: str, portal_revision_id: str, parameters: "_models.PortalRevisionContract", - **kwargs + **kwargs: Any ) -> AsyncLROPoller["_models.PortalRevisionContract"]: - """Creates a new developer portal revision. + """Creates a new developer portal's revision by running the portal's publishing. The ``isCurrent`` + property indicates if the revision is publicly accessible. :param resource_group_name: The name of the resource group. :type resource_group_name: str @@ -356,8 +357,8 @@ async def begin_create_or_update( :type parameters: ~azure.mgmt.apimanagement.models.PortalRevisionContract :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 PortalRevisionContract or the result of cls(response) @@ -422,7 +423,7 @@ async def _update_initial( portal_revision_id: str, if_match: str, parameters: "_models.PortalRevisionContract", - **kwargs + **kwargs: Any ) -> Optional["_models.PortalRevisionContract"]: cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.PortalRevisionContract"]] error_map = { @@ -462,7 +463,7 @@ async def _update_initial( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -484,7 +485,7 @@ async def begin_update( portal_revision_id: str, if_match: str, parameters: "_models.PortalRevisionContract", - **kwargs + **kwargs: Any ) -> AsyncLROPoller["_models.PortalRevisionContract"]: """Updates the description of specified portal revision or makes it current. @@ -502,8 +503,8 @@ async def begin_update( :type parameters: ~azure.mgmt.apimanagement.models.PortalRevisionContract :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 PortalRevisionContract or the result of cls(response) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_portal_settings_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_portal_settings_operations.py index 7faa2d28c18a..e5ca4e2422b9 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_portal_settings_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_portal_settings_operations.py @@ -44,7 +44,7 @@ async def list_by_service( self, resource_group_name: str, service_name: str, - **kwargs + **kwargs: Any ) -> "_models.PortalSettingsCollection": """Lists a collection of portalsettings defined within a service instance.. @@ -88,7 +88,7 @@ async def list_by_service( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('PortalSettingsCollection', pipeline_response) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_product_api_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_product_api_operations.py index 96fdbcded8fc..16d30cae8942 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_product_api_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_product_api_operations.py @@ -49,7 +49,7 @@ def list_by_product( filter: Optional[str] = None, top: Optional[int] = None, skip: Optional[int] = None, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.ApiCollection"]: """Lists a collection of the APIs associated with a product. @@ -132,7 +132,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) @@ -149,7 +149,7 @@ async def check_entity_exists( service_name: str, product_id: str, api_id: str, - **kwargs + **kwargs: Any ) -> bool: """Checks that API entity specified by identifier is associated with the Product entity. @@ -201,7 +201,7 @@ async def check_entity_exists( if response.status_code not in [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: @@ -216,7 +216,7 @@ async def create_or_update( service_name: str, product_id: str, api_id: str, - **kwargs + **kwargs: Any ) -> "_models.ApiContract": """Adds an API to the specified product. @@ -268,7 +268,7 @@ async def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -289,7 +289,7 @@ async def delete( service_name: str, product_id: str, api_id: str, - **kwargs + **kwargs: Any ) -> None: """Deletes the specified API from the specified product. @@ -341,7 +341,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/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_product_group_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_product_group_operations.py index adb835af31a7..b9ce5da9b8cd 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_product_group_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_product_group_operations.py @@ -49,7 +49,7 @@ def list_by_product( filter: Optional[str] = None, top: Optional[int] = None, skip: Optional[int] = None, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.GroupCollection"]: """Lists the collection of developer groups associated with the specified product. @@ -128,7 +128,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) @@ -145,7 +145,7 @@ async def check_entity_exists( service_name: str, product_id: str, group_id: str, - **kwargs + **kwargs: Any ) -> bool: """Checks that Group entity specified by identifier is associated with the Product entity. @@ -197,7 +197,7 @@ async def check_entity_exists( if response.status_code not in [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: @@ -212,7 +212,7 @@ async def create_or_update( service_name: str, product_id: str, group_id: str, - **kwargs + **kwargs: Any ) -> "_models.GroupContract": """Adds the association between the specified developer group with the specified product. @@ -264,7 +264,7 @@ async def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -285,7 +285,7 @@ async def delete( service_name: str, product_id: str, group_id: str, - **kwargs + **kwargs: Any ) -> None: """Deletes the association between the specified group and product. @@ -337,7 +337,7 @@ async def delete( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.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/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_product_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_product_operations.py index 26348c37b5ab..11743e2f40a9 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_product_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_product_operations.py @@ -50,7 +50,7 @@ def list_by_service( skip: Optional[int] = None, expand_groups: Optional[bool] = None, tags: Optional[str] = None, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.ProductCollection"]: """Lists a collection of products in the specified service instance. @@ -137,7 +137,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) @@ -153,7 +153,7 @@ async def get_entity_tag( resource_group_name: str, service_name: str, product_id: str, - **kwargs + **kwargs: Any ) -> bool: """Gets the entity state (Etag) version of the product specified by its identifier. @@ -201,7 +201,7 @@ async def get_entity_tag( 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) response_headers = {} @@ -218,7 +218,7 @@ async def get( resource_group_name: str, service_name: str, product_id: str, - **kwargs + **kwargs: Any ) -> "_models.ProductContract": """Gets the details of the product specified by its identifier. @@ -266,7 +266,7 @@ async def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -286,7 +286,7 @@ async def create_or_update( product_id: str, parameters: "_models.ProductContract", if_match: Optional[str] = None, - **kwargs + **kwargs: Any ) -> "_models.ProductContract": """Creates or Updates a product. @@ -346,7 +346,7 @@ async def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -371,7 +371,7 @@ async def update( product_id: str, if_match: str, parameters: "_models.ProductUpdateParameters", - **kwargs + **kwargs: Any ) -> "_models.ProductContract": """Update existing product details. @@ -430,7 +430,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) response_headers = {} @@ -450,7 +450,7 @@ async def delete( product_id: str, if_match: str, delete_subscriptions: Optional[bool] = None, - **kwargs + **kwargs: Any ) -> None: """Delete product. @@ -506,7 +506,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: @@ -522,7 +522,7 @@ def list_by_tags( top: Optional[int] = None, skip: Optional[int] = None, include_not_tagged_products: Optional[bool] = None, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.TagResourceCollection"]: """Lists a collection of products associated with tags. @@ -604,7 +604,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) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_product_policy_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_product_policy_operations.py index 841f5a308ac9..e9f92acf8a8c 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_product_policy_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_product_policy_operations.py @@ -45,7 +45,7 @@ async def list_by_product( resource_group_name: str, service_name: str, product_id: str, - **kwargs + **kwargs: Any ) -> "_models.PolicyCollection": """Get the policy configuration at the Product level. @@ -93,7 +93,7 @@ async def list_by_product( 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('PolicyCollection', pipeline_response) @@ -110,7 +110,7 @@ async def get_entity_tag( service_name: str, product_id: str, policy_id: Union[str, "_models.PolicyIdName"], - **kwargs + **kwargs: Any ) -> bool: """Get the ETag of the policy configuration at the Product level. @@ -161,7 +161,7 @@ async def get_entity_tag( 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) response_headers = {} @@ -180,7 +180,7 @@ async def get( product_id: str, policy_id: Union[str, "_models.PolicyIdName"], format: Optional[Union[str, "_models.PolicyExportFormat"]] = "xml", - **kwargs + **kwargs: Any ) -> "_models.PolicyContract": """Get the policy configuration at the Product level. @@ -235,7 +235,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) response_headers = {} @@ -256,7 +256,7 @@ async def create_or_update( policy_id: Union[str, "_models.PolicyIdName"], parameters: "_models.PolicyContract", if_match: Optional[str] = None, - **kwargs + **kwargs: Any ) -> "_models.PolicyContract": """Creates or updates policy configuration for the Product. @@ -319,7 +319,7 @@ async def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -344,7 +344,7 @@ async def delete( product_id: str, policy_id: Union[str, "_models.PolicyIdName"], if_match: str, - **kwargs + **kwargs: Any ) -> None: """Deletes the policy configuration at the Product. @@ -399,7 +399,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/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_product_subscriptions_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_product_subscriptions_operations.py index 0e571562917e..ff67f35c7b53 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_product_subscriptions_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_product_subscriptions_operations.py @@ -49,7 +49,7 @@ def list( filter: Optional[str] = None, top: Optional[int] = None, skip: Optional[int] = None, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.SubscriptionCollection"]: """Lists the collection of subscriptions to the specified product. @@ -135,7 +135,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) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_quota_by_counter_keys_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_quota_by_counter_keys_operations.py index 6e0cc4227388..e27f20796c98 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_quota_by_counter_keys_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_quota_by_counter_keys_operations.py @@ -45,7 +45,7 @@ async def list_by_service( resource_group_name: str, service_name: str, quota_counter_key: str, - **kwargs + **kwargs: Any ) -> "_models.QuotaCounterCollection": """Lists a collection of current quota counter periods associated with the counter-key configured in the policy on the specified service instance. The api does not support paging yet. @@ -55,9 +55,9 @@ async def list_by_service( :param service_name: The name of the API Management service. :type service_name: str :param quota_counter_key: Quota counter key identifier.This is the result of expression defined - in counter-key attribute of the quota-by-key policy.For Example, if you specify counter- - key="boo" in the policy, then it’s accessible by "boo" counter key. But if it’s defined as - counter-key="@("b"+"a")" then it will be accessible by "ba" key. + in counter-key attribute of the quota-by-key policy.For Example, if you specify + counter-key="boo" in the policy, then it’s accessible by "boo" counter key. But if it’s defined + as counter-key="@("b"+"a")" then it will be accessible by "ba" key. :type quota_counter_key: str :keyword callable cls: A custom type or function that will be passed the direct response :return: QuotaCounterCollection, or the result of cls(response) @@ -96,7 +96,7 @@ async def list_by_service( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('QuotaCounterCollection', pipeline_response) @@ -113,7 +113,7 @@ async def update( service_name: str, quota_counter_key: str, parameters: "_models.QuotaCounterValueUpdateContract", - **kwargs + **kwargs: Any ) -> "_models.QuotaCounterCollection": """Updates all the quota counter values specified with the existing quota counter key to a value in the specified service instance. This should be used for reset of the quota counter values. @@ -123,9 +123,9 @@ async def update( :param service_name: The name of the API Management service. :type service_name: str :param quota_counter_key: Quota counter key identifier.This is the result of expression defined - in counter-key attribute of the quota-by-key policy.For Example, if you specify counter- - key="boo" in the policy, then it’s accessible by "boo" counter key. But if it’s defined as - counter-key="@("b"+"a")" then it will be accessible by "ba" key. + in counter-key attribute of the quota-by-key policy.For Example, if you specify + counter-key="boo" in the policy, then it’s accessible by "boo" counter key. But if it’s defined + as counter-key="@("b"+"a")" then it will be accessible by "ba" key. :type quota_counter_key: str :param parameters: The value of the quota counter to be applied to all quota counter periods. :type parameters: ~azure.mgmt.apimanagement.models.QuotaCounterValueUpdateContract @@ -171,7 +171,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('QuotaCounterCollection', pipeline_response) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_quota_by_period_keys_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_quota_by_period_keys_operations.py index 372643281016..1d3dfb32cb84 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_quota_by_period_keys_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_quota_by_period_keys_operations.py @@ -46,7 +46,7 @@ async def get( service_name: str, quota_counter_key: str, quota_period_key: str, - **kwargs + **kwargs: Any ) -> "_models.QuotaCounterContract": """Gets the value of the quota counter associated with the counter-key in the policy for the specific period in service instance. @@ -56,9 +56,9 @@ async def get( :param service_name: The name of the API Management service. :type service_name: str :param quota_counter_key: Quota counter key identifier.This is the result of expression defined - in counter-key attribute of the quota-by-key policy.For Example, if you specify counter- - key="boo" in the policy, then it’s accessible by "boo" counter key. But if it’s defined as - counter-key="@("b"+"a")" then it will be accessible by "ba" key. + in counter-key attribute of the quota-by-key policy.For Example, if you specify + counter-key="boo" in the policy, then it’s accessible by "boo" counter key. But if it’s defined + as counter-key="@("b"+"a")" then it will be accessible by "ba" key. :type quota_counter_key: str :param quota_period_key: Quota period key identifier. :type quota_period_key: str @@ -100,7 +100,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('QuotaCounterContract', pipeline_response) @@ -118,7 +118,7 @@ async def update( quota_counter_key: str, quota_period_key: str, parameters: "_models.QuotaCounterValueUpdateContract", - **kwargs + **kwargs: Any ) -> "_models.QuotaCounterContract": """Updates an existing quota counter value in the specified service instance. @@ -127,9 +127,9 @@ async def update( :param service_name: The name of the API Management service. :type service_name: str :param quota_counter_key: Quota counter key identifier.This is the result of expression defined - in counter-key attribute of the quota-by-key policy.For Example, if you specify counter- - key="boo" in the policy, then it’s accessible by "boo" counter key. But if it’s defined as - counter-key="@("b"+"a")" then it will be accessible by "ba" key. + in counter-key attribute of the quota-by-key policy.For Example, if you specify + counter-key="boo" in the policy, then it’s accessible by "boo" counter key. But if it’s defined + as counter-key="@("b"+"a")" then it will be accessible by "ba" key. :type quota_counter_key: str :param quota_period_key: Quota period key identifier. :type quota_period_key: str @@ -178,7 +178,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('QuotaCounterContract', pipeline_response) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_region_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_region_operations.py index 7dff9bbf3e53..3688a6357097 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_region_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_region_operations.py @@ -45,7 +45,7 @@ def list_by_service( self, resource_group_name: str, service_name: str, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.RegionListResult"]: """Lists all azure regions in which the service exists. @@ -105,7 +105,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) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_reports_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_reports_operations.py index 6ed5bab4015f..0b42603a8189 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_reports_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_reports_operations.py @@ -50,7 +50,7 @@ def list_by_api( top: Optional[int] = None, skip: Optional[int] = None, orderby: Optional[str] = None, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.ReportCollection"]: """Lists report records by API. @@ -125,7 +125,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) @@ -144,7 +144,7 @@ def list_by_user( top: Optional[int] = None, skip: Optional[int] = None, orderby: Optional[str] = None, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.ReportCollection"]: """Lists report records by User. @@ -231,7 +231,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) @@ -250,7 +250,7 @@ def list_by_operation( top: Optional[int] = None, skip: Optional[int] = None, orderby: Optional[str] = None, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.ReportCollection"]: """Lists report records by API Operations. @@ -337,7 +337,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) @@ -356,7 +356,7 @@ def list_by_product( top: Optional[int] = None, skip: Optional[int] = None, orderby: Optional[str] = None, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.ReportCollection"]: """Lists report records by Product. @@ -442,7 +442,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) @@ -460,7 +460,7 @@ def list_by_geo( filter: str, top: Optional[int] = None, skip: Optional[int] = None, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.ReportCollection"]: """Lists report records by geography. @@ -543,7 +543,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) @@ -562,7 +562,7 @@ def list_by_subscription( top: Optional[int] = None, skip: Optional[int] = None, orderby: Optional[str] = None, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.ReportCollection"]: """Lists report records by subscription. @@ -648,7 +648,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) @@ -668,7 +668,7 @@ def list_by_time( top: Optional[int] = None, skip: Optional[int] = None, orderby: Optional[str] = None, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.ReportCollection"]: """Lists report records by Time. @@ -760,7 +760,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) @@ -778,7 +778,7 @@ def list_by_request( filter: str, top: Optional[int] = None, skip: Optional[int] = None, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.RequestReportCollection"]: """Lists report records by Request. @@ -853,7 +853,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) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_sign_in_settings_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_sign_in_settings_operations.py index e9bc02464ffe..54047e9c3398 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_sign_in_settings_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_sign_in_settings_operations.py @@ -44,7 +44,7 @@ async def get_entity_tag( self, resource_group_name: str, service_name: str, - **kwargs + **kwargs: Any ) -> bool: """Gets the entity state (Etag) version of the SignInSettings. @@ -88,7 +88,7 @@ async def get_entity_tag( 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) response_headers = {} @@ -104,7 +104,7 @@ async def get( self, resource_group_name: str, service_name: str, - **kwargs + **kwargs: Any ) -> "_models.PortalSigninSettings": """Get Sign In Settings for the Portal. @@ -148,7 +148,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) response_headers = {} @@ -167,7 +167,7 @@ async def update( service_name: str, if_match: str, parameters: "_models.PortalSigninSettings", - **kwargs + **kwargs: Any ) -> None: """Update Sign-In settings. @@ -222,7 +222,7 @@ async def update( if response.status_code not in [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: @@ -236,7 +236,7 @@ async def create_or_update( service_name: str, parameters: "_models.PortalSigninSettings", if_match: Optional[str] = None, - **kwargs + **kwargs: Any ) -> "_models.PortalSigninSettings": """Create or Update Sign-In settings. @@ -292,7 +292,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.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('PortalSigninSettings', pipeline_response) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_sign_up_settings_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_sign_up_settings_operations.py index 053ffe6e99c0..f2e31f389f82 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_sign_up_settings_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_sign_up_settings_operations.py @@ -44,7 +44,7 @@ async def get_entity_tag( self, resource_group_name: str, service_name: str, - **kwargs + **kwargs: Any ) -> bool: """Gets the entity state (Etag) version of the SignUpSettings. @@ -88,7 +88,7 @@ async def get_entity_tag( 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) response_headers = {} @@ -104,7 +104,7 @@ async def get( self, resource_group_name: str, service_name: str, - **kwargs + **kwargs: Any ) -> "_models.PortalSignupSettings": """Get Sign Up Settings for the Portal. @@ -148,7 +148,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) response_headers = {} @@ -167,7 +167,7 @@ async def update( service_name: str, if_match: str, parameters: "_models.PortalSignupSettings", - **kwargs + **kwargs: Any ) -> None: """Update Sign-Up settings. @@ -222,7 +222,7 @@ async def update( if response.status_code not in [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: @@ -236,7 +236,7 @@ async def create_or_update( service_name: str, parameters: "_models.PortalSignupSettings", if_match: Optional[str] = None, - **kwargs + **kwargs: Any ) -> "_models.PortalSignupSettings": """Create or Update Sign-Up settings. @@ -292,7 +292,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.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('PortalSignupSettings', pipeline_response) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_subscription_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_subscription_operations.py index d3e4cecdfc00..800700ea05d8 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_subscription_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_subscription_operations.py @@ -48,7 +48,7 @@ def list( filter: Optional[str] = None, top: Optional[int] = None, skip: Optional[int] = None, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.SubscriptionCollection"]: """Lists all subscriptions of the API Management service instance. @@ -130,7 +130,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) @@ -146,7 +146,7 @@ async def get_entity_tag( resource_group_name: str, service_name: str, sid: str, - **kwargs + **kwargs: Any ) -> bool: """Gets the entity state (Etag) version of the apimanagement subscription specified by its identifier. @@ -195,7 +195,7 @@ async def get_entity_tag( 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) response_headers = {} @@ -212,7 +212,7 @@ async def get( resource_group_name: str, service_name: str, sid: str, - **kwargs + **kwargs: Any ) -> "_models.SubscriptionContract": """Gets the specified Subscription entity. @@ -260,7 +260,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) response_headers = {} @@ -282,7 +282,7 @@ async def create_or_update( notify: Optional[bool] = None, if_match: Optional[str] = None, app_type: Optional[Union[str, "_models.AppType"]] = None, - **kwargs + **kwargs: Any ) -> "_models.SubscriptionContract": """Creates or updates the subscription of specified user to the specified product. @@ -355,7 +355,7 @@ async def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -382,7 +382,7 @@ async def update( parameters: "_models.SubscriptionUpdateParameters", notify: Optional[bool] = None, app_type: Optional[Union[str, "_models.AppType"]] = None, - **kwargs + **kwargs: Any ) -> "_models.SubscriptionContract": """Updates the details of a subscription specified by its identifier. @@ -454,7 +454,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) response_headers = {} @@ -473,7 +473,7 @@ async def delete( service_name: str, sid: str, if_match: str, - **kwargs + **kwargs: Any ) -> None: """Deletes the specified subscription. @@ -525,7 +525,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: @@ -538,7 +538,7 @@ async def regenerate_primary_key( resource_group_name: str, service_name: str, sid: str, - **kwargs + **kwargs: Any ) -> None: """Regenerates primary key of existing subscription of the API Management service instance. @@ -586,7 +586,7 @@ async def regenerate_primary_key( if response.status_code not in [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: @@ -599,7 +599,7 @@ async def regenerate_secondary_key( resource_group_name: str, service_name: str, sid: str, - **kwargs + **kwargs: Any ) -> None: """Regenerates secondary key of existing subscription of the API Management service instance. @@ -647,7 +647,7 @@ async def regenerate_secondary_key( if response.status_code not in [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: @@ -660,7 +660,7 @@ async def list_secrets( resource_group_name: str, service_name: str, sid: str, - **kwargs + **kwargs: Any ) -> "_models.SubscriptionKeysContract": """Gets the specified Subscription keys. @@ -708,7 +708,7 @@ async def list_secrets( 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) response_headers = {} diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_tag_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_tag_operations.py index 125215384a02..8cae2be48bdf 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_tag_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_tag_operations.py @@ -50,7 +50,7 @@ def list_by_operation( filter: Optional[str] = None, top: Optional[int] = None, skip: Optional[int] = None, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.TagCollection"]: """Lists all Tags associated with the Operation. @@ -133,7 +133,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) @@ -151,7 +151,7 @@ async def get_entity_state_by_operation( api_id: str, operation_id: str, tag_id: str, - **kwargs + **kwargs: Any ) -> bool: """Gets the entity state version of the tag specified by its identifier. @@ -206,7 +206,7 @@ async def get_entity_state_by_operation( 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) response_headers = {} @@ -225,7 +225,7 @@ async def get_by_operation( api_id: str, operation_id: str, tag_id: str, - **kwargs + **kwargs: Any ) -> "_models.TagContract": """Get tag associated with the Operation. @@ -280,7 +280,7 @@ async def get_by_operation( 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) response_headers = {} @@ -300,7 +300,7 @@ async def assign_to_operation( api_id: str, operation_id: str, tag_id: str, - **kwargs + **kwargs: Any ) -> "_models.TagContract": """Assign tag to the Operation. @@ -355,7 +355,7 @@ async def assign_to_operation( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -377,7 +377,7 @@ async def detach_from_operation( api_id: str, operation_id: str, tag_id: str, - **kwargs + **kwargs: Any ) -> None: """Detach the tag from the Operation. @@ -432,7 +432,7 @@ async def detach_from_operation( 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: @@ -448,7 +448,7 @@ def list_by_api( filter: Optional[str] = None, top: Optional[int] = None, skip: Optional[int] = None, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.TagCollection"]: """Lists all Tags associated with the API. @@ -527,7 +527,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) @@ -544,7 +544,7 @@ async def get_entity_state_by_api( service_name: str, api_id: str, tag_id: str, - **kwargs + **kwargs: Any ) -> bool: """Gets the entity state version of the tag specified by its identifier. @@ -595,7 +595,7 @@ async def get_entity_state_by_api( 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) response_headers = {} @@ -613,7 +613,7 @@ async def get_by_api( service_name: str, api_id: str, tag_id: str, - **kwargs + **kwargs: Any ) -> "_models.TagContract": """Get tag associated with the API. @@ -664,7 +664,7 @@ async def get_by_api( 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) response_headers = {} @@ -683,7 +683,7 @@ async def assign_to_api( service_name: str, api_id: str, tag_id: str, - **kwargs + **kwargs: Any ) -> "_models.TagContract": """Assign tag to the Api. @@ -734,7 +734,7 @@ async def assign_to_api( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -758,7 +758,7 @@ async def detach_from_api( service_name: str, api_id: str, tag_id: str, - **kwargs + **kwargs: Any ) -> None: """Detach the tag from the Api. @@ -809,7 +809,7 @@ async def detach_from_api( 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: @@ -825,7 +825,7 @@ def list_by_product( filter: Optional[str] = None, top: Optional[int] = None, skip: Optional[int] = None, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.TagCollection"]: """Lists all Tags associated with the Product. @@ -904,7 +904,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) @@ -921,7 +921,7 @@ async def get_entity_state_by_product( service_name: str, product_id: str, tag_id: str, - **kwargs + **kwargs: Any ) -> bool: """Gets the entity state version of the tag specified by its identifier. @@ -972,7 +972,7 @@ async def get_entity_state_by_product( 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) response_headers = {} @@ -990,7 +990,7 @@ async def get_by_product( service_name: str, product_id: str, tag_id: str, - **kwargs + **kwargs: Any ) -> "_models.TagContract": """Get tag associated with the Product. @@ -1041,7 +1041,7 @@ async def get_by_product( 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) response_headers = {} @@ -1060,7 +1060,7 @@ async def assign_to_product( service_name: str, product_id: str, tag_id: str, - **kwargs + **kwargs: Any ) -> "_models.TagContract": """Assign tag to the Product. @@ -1111,7 +1111,7 @@ async def assign_to_product( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -1132,7 +1132,7 @@ async def detach_from_product( service_name: str, product_id: str, tag_id: str, - **kwargs + **kwargs: Any ) -> None: """Detach the tag from the Product. @@ -1183,7 +1183,7 @@ async def detach_from_product( 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: @@ -1199,7 +1199,7 @@ def list_by_service( top: Optional[int] = None, skip: Optional[int] = None, scope: Optional[str] = None, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.TagCollection"]: """Lists a collection of tags defined within a service instance. @@ -1279,7 +1279,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) @@ -1295,7 +1295,7 @@ async def get_entity_state( resource_group_name: str, service_name: str, tag_id: str, - **kwargs + **kwargs: Any ) -> bool: """Gets the entity state version of the tag specified by its identifier. @@ -1342,7 +1342,7 @@ async def get_entity_state( 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) response_headers = {} @@ -1359,7 +1359,7 @@ async def get( resource_group_name: str, service_name: str, tag_id: str, - **kwargs + **kwargs: Any ) -> "_models.TagContract": """Gets the details of the tag specified by its identifier. @@ -1406,7 +1406,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) response_headers = {} @@ -1426,7 +1426,7 @@ async def create_or_update( tag_id: str, parameters: "_models.TagCreateUpdateParameters", if_match: Optional[str] = None, - **kwargs + **kwargs: Any ) -> "_models.TagContract": """Creates a tag. @@ -1485,7 +1485,7 @@ async def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -1510,7 +1510,7 @@ async def update( tag_id: str, if_match: str, parameters: "_models.TagCreateUpdateParameters", - **kwargs + **kwargs: Any ) -> "_models.TagContract": """Updates the details of the tag specified by its identifier. @@ -1568,7 +1568,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) response_headers = {} @@ -1587,7 +1587,7 @@ async def delete( service_name: str, tag_id: str, if_match: str, - **kwargs + **kwargs: Any ) -> None: """Deletes specific tag of the API Management service instance. @@ -1638,7 +1638,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/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_tag_resource_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_tag_resource_operations.py index f66be3be5052..9331ecb08025 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_tag_resource_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_tag_resource_operations.py @@ -48,7 +48,7 @@ def list_by_service( filter: Optional[str] = None, top: Optional[int] = None, skip: Optional[int] = None, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.TagResourceCollection"]: """Lists a collection of resources associated with tags. @@ -134,7 +134,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) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_tenant_access_git_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_tenant_access_git_operations.py index 4abc9aeb96f5..8dc6e6238564 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_tenant_access_git_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_tenant_access_git_operations.py @@ -45,7 +45,7 @@ async def regenerate_primary_key( resource_group_name: str, service_name: str, access_name: Union[str, "_models.AccessIdName"], - **kwargs + **kwargs: Any ) -> None: """Regenerate primary access key for GIT. @@ -92,7 +92,7 @@ async def regenerate_primary_key( if response.status_code not in [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: @@ -105,7 +105,7 @@ async def regenerate_secondary_key( resource_group_name: str, service_name: str, access_name: Union[str, "_models.AccessIdName"], - **kwargs + **kwargs: Any ) -> None: """Regenerate secondary access key for GIT. @@ -152,7 +152,7 @@ async def regenerate_secondary_key( if response.status_code not in [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/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_tenant_access_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_tenant_access_operations.py index d69fb1916d9a..2e00b8c9a500 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_tenant_access_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_tenant_access_operations.py @@ -46,7 +46,7 @@ def list_by_service( resource_group_name: str, service_name: str, filter: Optional[str] = None, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.AccessInformationCollection"]: """Returns list of access infos - for Git and Management endpoints. @@ -110,7 +110,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) @@ -126,7 +126,7 @@ async def get_entity_tag( resource_group_name: str, service_name: str, access_name: Union[str, "_models.AccessIdName"], - **kwargs + **kwargs: Any ) -> bool: """Tenant access metadata. @@ -173,7 +173,7 @@ async def get_entity_tag( 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) response_headers = {} @@ -190,7 +190,7 @@ async def get( resource_group_name: str, service_name: str, access_name: Union[str, "_models.AccessIdName"], - **kwargs + **kwargs: Any ) -> "_models.AccessInformationContract": """Get tenant access information details without secrets. @@ -237,7 +237,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) response_headers = {} @@ -257,7 +257,7 @@ async def create( access_name: Union[str, "_models.AccessIdName"], if_match: str, parameters: "_models.AccessInformationCreateParameters", - **kwargs + **kwargs: Any ) -> "_models.AccessInformationContract": """Update tenant access information details. @@ -315,7 +315,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) response_headers = {} @@ -335,7 +335,7 @@ async def update( access_name: Union[str, "_models.AccessIdName"], if_match: str, parameters: "_models.AccessInformationUpdateParameters", - **kwargs + **kwargs: Any ) -> "_models.AccessInformationContract": """Update tenant access information details. @@ -393,7 +393,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) response_headers = {} @@ -411,7 +411,7 @@ async def regenerate_primary_key( resource_group_name: str, service_name: str, access_name: Union[str, "_models.AccessIdName"], - **kwargs + **kwargs: Any ) -> None: """Regenerate primary access key. @@ -458,7 +458,7 @@ async def regenerate_primary_key( if response.status_code not in [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: @@ -471,7 +471,7 @@ async def regenerate_secondary_key( resource_group_name: str, service_name: str, access_name: Union[str, "_models.AccessIdName"], - **kwargs + **kwargs: Any ) -> None: """Regenerate secondary access key. @@ -518,7 +518,7 @@ async def regenerate_secondary_key( if response.status_code not in [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: @@ -531,7 +531,7 @@ async def list_secrets( resource_group_name: str, service_name: str, access_name: Union[str, "_models.AccessIdName"], - **kwargs + **kwargs: Any ) -> "_models.AccessInformationSecretsContract": """Get tenant access information details. @@ -578,7 +578,7 @@ async def list_secrets( 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) response_headers = {} diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_tenant_configuration_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_tenant_configuration_operations.py index 93101fb0d039..d7ba3324e1d4 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_tenant_configuration_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_tenant_configuration_operations.py @@ -48,7 +48,7 @@ async def _deploy_initial( service_name: str, configuration_name: Union[str, "_models.ConfigurationIdName"], parameters: "_models.DeployConfigurationParameters", - **kwargs + **kwargs: Any ) -> Optional["_models.OperationResultContract"]: cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.OperationResultContract"]] error_map = { @@ -87,7 +87,7 @@ async def _deploy_initial( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = None @@ -106,7 +106,7 @@ async def begin_deploy( service_name: str, configuration_name: Union[str, "_models.ConfigurationIdName"], parameters: "_models.DeployConfigurationParameters", - **kwargs + **kwargs: Any ) -> AsyncLROPoller["_models.OperationResultContract"]: """This operation applies changes from the specified Git branch to the configuration database. This is a long running operation and could take several minutes to complete. @@ -121,8 +121,8 @@ async def begin_deploy( :type parameters: ~azure.mgmt.apimanagement.models.DeployConfigurationParameters :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 OperationResultContract or the result of cls(response) @@ -183,7 +183,7 @@ async def _save_initial( service_name: str, configuration_name: Union[str, "_models.ConfigurationIdName"], parameters: "_models.SaveConfigurationParameter", - **kwargs + **kwargs: Any ) -> Optional["_models.OperationResultContract"]: cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.OperationResultContract"]] error_map = { @@ -222,7 +222,7 @@ async def _save_initial( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = None @@ -241,7 +241,7 @@ async def begin_save( service_name: str, configuration_name: Union[str, "_models.ConfigurationIdName"], parameters: "_models.SaveConfigurationParameter", - **kwargs + **kwargs: Any ) -> AsyncLROPoller["_models.OperationResultContract"]: """This operation creates a commit with the current configuration snapshot to the specified branch in the repository. This is a long running operation and could take several minutes to complete. @@ -256,8 +256,8 @@ async def begin_save( :type parameters: ~azure.mgmt.apimanagement.models.SaveConfigurationParameter :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 OperationResultContract or the result of cls(response) @@ -318,7 +318,7 @@ async def _validate_initial( service_name: str, configuration_name: Union[str, "_models.ConfigurationIdName"], parameters: "_models.DeployConfigurationParameters", - **kwargs + **kwargs: Any ) -> Optional["_models.OperationResultContract"]: cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.OperationResultContract"]] error_map = { @@ -357,7 +357,7 @@ async def _validate_initial( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = None @@ -376,7 +376,7 @@ async def begin_validate( service_name: str, configuration_name: Union[str, "_models.ConfigurationIdName"], parameters: "_models.DeployConfigurationParameters", - **kwargs + **kwargs: Any ) -> AsyncLROPoller["_models.OperationResultContract"]: """This operation validates the changes in the specified Git branch. This is a long running operation and could take several minutes to complete. @@ -391,8 +391,8 @@ async def begin_validate( :type parameters: ~azure.mgmt.apimanagement.models.DeployConfigurationParameters :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 OperationResultContract or the result of cls(response) @@ -452,7 +452,7 @@ async def get_sync_state( resource_group_name: str, service_name: str, configuration_name: Union[str, "_models.ConfigurationIdName"], - **kwargs + **kwargs: Any ) -> "_models.TenantConfigurationSyncStateContract": """Gets the status of the most recent synchronization between the configuration database and the Git repository. @@ -500,7 +500,7 @@ async def get_sync_state( 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('TenantConfigurationSyncStateContract', pipeline_response) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_tenant_settings_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_tenant_settings_operations.py index 11c4f90375d3..6e0cd8cd4ee9 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_tenant_settings_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_tenant_settings_operations.py @@ -46,7 +46,7 @@ def list_by_service( resource_group_name: str, service_name: str, filter: Optional[str] = None, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.TenantSettingsCollection"]: """Public settings. @@ -110,7 +110,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) @@ -126,7 +126,7 @@ async def get( resource_group_name: str, service_name: str, settings_type: Union[str, "_models.SettingsTypeName"], - **kwargs + **kwargs: Any ) -> "_models.TenantSettingsContract": """Get tenant settings. @@ -173,7 +173,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) response_headers = {} diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_user_confirmation_password_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_user_confirmation_password_operations.py index 411be604d90d..79a758b705b9 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_user_confirmation_password_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_user_confirmation_password_operations.py @@ -46,7 +46,7 @@ async def send( service_name: str, user_id: str, app_type: Optional[Union[str, "_models.AppType"]] = None, - **kwargs + **kwargs: Any ) -> None: """Sends confirmation. @@ -98,7 +98,7 @@ async def send( if response.status_code not in [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/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_user_group_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_user_group_operations.py index bcc3796d7d1c..1f67b6ed4dba 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_user_group_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_user_group_operations.py @@ -49,7 +49,7 @@ def list( filter: Optional[str] = None, top: Optional[int] = None, skip: Optional[int] = None, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.GroupCollection"]: """Lists all user groups. @@ -130,7 +130,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) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_user_identities_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_user_identities_operations.py index 62565b808a51..fea02ac5029d 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_user_identities_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_user_identities_operations.py @@ -46,7 +46,7 @@ def list( resource_group_name: str, service_name: str, user_id: str, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.UserIdentityCollection"]: """List of all user identities. @@ -109,7 +109,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) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_user_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_user_operations.py index edd45048c8ee..c1c00e2ad76e 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_user_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_user_operations.py @@ -49,7 +49,7 @@ def list_by_service( top: Optional[int] = None, skip: Optional[int] = None, expand_groups: Optional[bool] = None, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.UserCollection"]: """Lists a collection of registered users in the specified service instance. @@ -133,7 +133,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) @@ -149,7 +149,7 @@ async def get_entity_tag( resource_group_name: str, service_name: str, user_id: str, - **kwargs + **kwargs: Any ) -> bool: """Gets the entity state (Etag) version of the user specified by its identifier. @@ -196,7 +196,7 @@ async def get_entity_tag( 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) response_headers = {} @@ -213,7 +213,7 @@ async def get( resource_group_name: str, service_name: str, user_id: str, - **kwargs + **kwargs: Any ) -> "_models.UserContract": """Gets the details of the user specified by its identifier. @@ -260,7 +260,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) response_headers = {} @@ -281,7 +281,7 @@ async def create_or_update( parameters: "_models.UserCreateParameters", notify: Optional[bool] = None, if_match: Optional[str] = None, - **kwargs + **kwargs: Any ) -> "_models.UserContract": """Creates or Updates a user. @@ -344,7 +344,7 @@ async def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -369,7 +369,7 @@ async def update( user_id: str, if_match: str, parameters: "_models.UserUpdateParameters", - **kwargs + **kwargs: Any ) -> "_models.UserContract": """Updates the details of the user specified by its identifier. @@ -427,7 +427,7 @@ async def update( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -449,7 +449,7 @@ async def delete( delete_subscriptions: Optional[bool] = None, notify: Optional[bool] = None, app_type: Optional[Union[str, "_models.AppType"]] = None, - **kwargs + **kwargs: Any ) -> None: """Deletes specific user. @@ -513,7 +513,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: @@ -526,7 +526,7 @@ async def generate_sso_url( resource_group_name: str, service_name: str, user_id: str, - **kwargs + **kwargs: Any ) -> "_models.GenerateSsoUrlResult": """Retrieves a redirection URL containing an authentication token for signing a given user into the developer portal. @@ -574,7 +574,7 @@ async def generate_sso_url( 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('GenerateSsoUrlResult', pipeline_response) @@ -591,7 +591,7 @@ async def get_shared_access_token( service_name: str, user_id: str, parameters: "_models.UserTokenParameters", - **kwargs + **kwargs: Any ) -> "_models.UserTokenResult": """Gets the Shared Access Authorization Token for the User. @@ -645,7 +645,7 @@ async def get_shared_access_token( 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('UserTokenResult', pipeline_response) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_user_subscription_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_user_subscription_operations.py index 8fe578e64424..772fbc8c9a6e 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_user_subscription_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_user_subscription_operations.py @@ -49,7 +49,7 @@ def list( filter: Optional[str] = None, top: Optional[int] = None, skip: Optional[int] = None, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.SubscriptionCollection"]: """Lists the collection of subscriptions of the specified user. @@ -133,7 +133,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) @@ -150,7 +150,7 @@ async def get( service_name: str, user_id: str, sid: str, - **kwargs + **kwargs: Any ) -> "_models.SubscriptionContract": """Gets the specified Subscription entity associated with a particular user. @@ -201,7 +201,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) response_headers = {} diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/_api_management_client_enums.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/_api_management_client_enums.py index a82fada00c3c..796a886a4a17 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/_api_management_client_enums.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/_api_management_client_enums.py @@ -35,7 +35,8 @@ class AlwaysLog(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): """Specifies for what type of messages sampling settings should not apply. """ - ALL_ERRORS = "allErrors" #: Always log all erroneous request regardless of sampling settings. + #: Always log all erroneous request regardless of sampling settings. + ALL_ERRORS = "allErrors" class ApiManagementSkuCapacityScaleType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): """The scale type applicable to the sku. @@ -87,8 +88,10 @@ class ApiVersionSetContractDetailsVersioningScheme(with_metaclass(_CaseInsensiti class AppType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - PORTAL = "portal" #: User create request was sent by legacy developer portal. - DEVELOPER_PORTAL = "developerPortal" #: User create request was sent by new developer portal. + #: User create request was sent by legacy developer portal. + PORTAL = "portal" + #: User create request was sent by new developer portal. + DEVELOPER_PORTAL = "developerPortal" class AsyncOperationStatus(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): """Status of an async operation. @@ -114,8 +117,10 @@ class BackendProtocol(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): """Backend communication protocol. """ - HTTP = "http" #: The Backend is a RESTful service. - SOAP = "soap" #: The Backend is a SOAP service. + #: The Backend is a RESTful service. + HTTP = "http" + #: The Backend is a SOAP service. + SOAP = "soap" class BearerTokenSendingMethod(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): @@ -126,8 +131,10 @@ class BearerTokenSendingMethods(with_metaclass(_CaseInsensitiveEnumMeta, str, En """Form of an authorization grant, which the client uses to request the access token. """ - AUTHORIZATION_HEADER = "authorizationHeader" #: Access token will be transmitted in the Authorization header using Bearer schema. - QUERY = "query" #: Access token will be transmitted as query parameters. + #: Access token will be transmitted in the Authorization header using Bearer schema. + AUTHORIZATION_HEADER = "authorizationHeader" + #: Access token will be transmitted as query parameters. + QUERY = "query" class CertificateConfigurationStoreName(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): """The System.Security.Cryptography.x509certificates.StoreName certificate store location. Only @@ -139,8 +146,10 @@ class CertificateConfigurationStoreName(with_metaclass(_CaseInsensitiveEnumMeta, class ClientAuthenticationMethod(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - BASIC = "Basic" #: Basic Client Authentication method. - BODY = "Body" #: Body based Authentication method. + #: Basic Client Authentication method. + BASIC = "Basic" + #: Body based Authentication method. + BODY = "Body" class ConfigurationIdName(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): @@ -150,8 +159,10 @@ class Confirmation(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): """Determines the type of confirmation e-mail that will be sent to the newly created user. """ - SIGNUP = "signup" #: Send an e-mail to the user confirming they have successfully signed up. - INVITE = "invite" #: Send an e-mail inviting the user to sign-up and complete registration. + #: Send an e-mail to the user confirming they have successfully signed up. + SIGNUP = "signup" + #: Send an e-mail inviting the user to sign-up and complete registration. + INVITE = "invite" class ConnectivityStatusType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): """Resource Connectivity Status Type identifier. @@ -165,23 +176,35 @@ class ContentFormat(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): """Format of the Content in which the API is getting imported. """ - WADL_XML = "wadl-xml" #: The contents are inline and Content type is a WADL document. - WADL_LINK_JSON = "wadl-link-json" #: The WADL document is hosted on a publicly accessible internet address. - SWAGGER_JSON = "swagger-json" #: The contents are inline and Content Type is a OpenAPI 2.0 JSON Document. - SWAGGER_LINK_JSON = "swagger-link-json" #: The OpenAPI 2.0 JSON document is hosted on a publicly accessible internet address. - WSDL = "wsdl" #: The contents are inline and the document is a WSDL/Soap document. - WSDL_LINK = "wsdl-link" #: The WSDL document is hosted on a publicly accessible internet address. - OPENAPI = "openapi" #: The contents are inline and Content Type is a OpenAPI 3.0 YAML Document. - OPENAPI_JSON = "openapi+json" #: The contents are inline and Content Type is a OpenAPI 3.0 JSON Document. - OPENAPI_LINK = "openapi-link" #: The OpenAPI 3.0 YAML document is hosted on a publicly accessible internet address. - OPENAPI_JSON_LINK = "openapi+json-link" #: The OpenAPI 3.0 JSON document is hosted on a publicly accessible internet address. + #: The contents are inline and Content type is a WADL document. + WADL_XML = "wadl-xml" + #: The WADL document is hosted on a publicly accessible internet address. + WADL_LINK_JSON = "wadl-link-json" + #: The contents are inline and Content Type is a OpenAPI 2.0 JSON Document. + SWAGGER_JSON = "swagger-json" + #: The OpenAPI 2.0 JSON document is hosted on a publicly accessible internet address. + SWAGGER_LINK_JSON = "swagger-link-json" + #: The contents are inline and the document is a WSDL/Soap document. + WSDL = "wsdl" + #: The WSDL document is hosted on a publicly accessible internet address. + WSDL_LINK = "wsdl-link" + #: The contents are inline and Content Type is a OpenAPI 3.0 YAML Document. + OPENAPI = "openapi" + #: The contents are inline and Content Type is a OpenAPI 3.0 JSON Document. + OPENAPI_JSON = "openapi+json" + #: The OpenAPI 3.0 YAML document is hosted on a publicly accessible internet address. + OPENAPI_LINK = "openapi-link" + #: The OpenAPI 3.0 JSON document is hosted on a publicly accessible internet address. + OPENAPI_JSON_LINK = "openapi+json-link" class DataMaskingMode(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): """Data masking mode. """ - MASK = "Mask" #: Mask the value of an entity. - HIDE = "Hide" #: Hide the presence of an entity. + #: Mask the value of an entity. + MASK = "Mask" + #: Hide the presence of an entity. + HIDE = "Hide" class ExportApi(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): @@ -189,28 +212,44 @@ class ExportApi(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): class ExportFormat(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - SWAGGER = "swagger-link" #: Export the Api Definition in OpenAPI 2.0 Specification as JSON document to the Storage Blob. - WSDL = "wsdl-link" #: Export the Api Definition in WSDL Schema to Storage Blob. This is only supported for APIs of Type ``soap``. - WADL = "wadl-link" #: Export the Api Definition in WADL Schema to Storage Blob. - OPENAPI = "openapi-link" #: Export the Api Definition in OpenAPI 3.0 Specification as YAML document to Storage Blob. - OPENAPI_JSON = "openapi+json-link" #: Export the Api Definition in OpenAPI 3.0 Specification as JSON document to Storage Blob. + #: Export the Api Definition in OpenAPI 2.0 Specification as JSON document to the Storage Blob. + SWAGGER = "swagger-link" + #: Export the Api Definition in WSDL Schema to Storage Blob. This is only supported for APIs of + #: Type ``soap``. + WSDL = "wsdl-link" + #: Export the Api Definition in WADL Schema to Storage Blob. + WADL = "wadl-link" + #: Export the Api Definition in OpenAPI 3.0 Specification as YAML document to Storage Blob. + OPENAPI = "openapi-link" + #: Export the Api Definition in OpenAPI 3.0 Specification as JSON document to Storage Blob. + OPENAPI_JSON = "openapi+json-link" class ExportResultFormat(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): """Format in which the Api Details are exported to the Storage Blob with Sas Key valid for 5 minutes. """ - SWAGGER = "swagger-link-json" #: The Api Definition is exported in OpenApi Specification 2.0 format to the Storage Blob. - WSDL = "wsdl-link+xml" #: The Api Definition is exported in WSDL Schema to Storage Blob. This is only supported for APIs of Type ``soap``. - WADL = "wadl-link-json" #: Export the Api Definition in WADL Schema to Storage Blob. - OPEN_API = "openapi-link" #: Export the Api Definition in OpenApi Specification 3.0 to Storage Blob. + #: The Api Definition is exported in OpenApi Specification 2.0 format to the Storage Blob. + SWAGGER = "swagger-link-json" + #: The Api Definition is exported in WSDL Schema to Storage Blob. This is only supported for APIs + #: of Type ``soap``. + WSDL = "wsdl-link+xml" + #: Export the Api Definition in WADL Schema to Storage Blob. + WADL = "wadl-link-json" + #: Export the Api Definition in OpenApi Specification 3.0 to Storage Blob. + OPEN_API = "openapi-link" class GrantType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - AUTHORIZATION_CODE = "authorizationCode" #: Authorization Code Grant flow as described https://tools.ietf.org/html/rfc6749#section-4.1. - IMPLICIT = "implicit" #: Implicit Code Grant flow as described https://tools.ietf.org/html/rfc6749#section-4.2. - RESOURCE_OWNER_PASSWORD = "resourceOwnerPassword" #: Resource Owner Password Grant flow as described https://tools.ietf.org/html/rfc6749#section-4.3. - CLIENT_CREDENTIALS = "clientCredentials" #: Client Credentials Grant flow as described https://tools.ietf.org/html/rfc6749#section-4.4. + #: Authorization Code Grant flow as described https://tools.ietf.org/html/rfc6749#section-4.1. + AUTHORIZATION_CODE = "authorizationCode" + #: Implicit Code Grant flow as described https://tools.ietf.org/html/rfc6749#section-4.2. + IMPLICIT = "implicit" + #: Resource Owner Password Grant flow as described + #: https://tools.ietf.org/html/rfc6749#section-4.3. + RESOURCE_OWNER_PASSWORD = "resourceOwnerPassword" + #: Client Credentials Grant flow as described https://tools.ietf.org/html/rfc6749#section-4.4. + CLIENT_CREDENTIALS = "clientCredentials" class GroupType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): """Group type. @@ -234,18 +273,28 @@ class HttpCorrelationProtocol(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum """Sets correlation protocol to use for Application Insights diagnostics. """ - NONE = "None" #: Do not read and inject correlation headers. - LEGACY = "Legacy" #: Inject Request-Id and Request-Context headers with request correlation data. See https://github.com/dotnet/corefx/blob/master/src/System.Diagnostics.DiagnosticSource/src/HttpCorrelationProtocol.md. - W3_C = "W3C" #: Inject Trace Context headers. See https://w3c.github.io/trace-context. + #: Do not read and inject correlation headers. + NONE = "None" + #: Inject Request-Id and Request-Context headers with request correlation data. See + #: https://github.com/dotnet/corefx/blob/master/src/System.Diagnostics.DiagnosticSource/src/HttpCorrelationProtocol.md. + LEGACY = "Legacy" + #: Inject Trace Context headers. See https://w3c.github.io/trace-context. + W3_C = "W3C" class IdentityProviderType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - FACEBOOK = "facebook" #: Facebook as Identity provider. - GOOGLE = "google" #: Google as Identity provider. - MICROSOFT = "microsoft" #: Microsoft Live as Identity provider. - TWITTER = "twitter" #: Twitter as Identity provider. - AAD = "aad" #: Azure Active Directory as Identity provider. - AAD_B2_C = "aadB2C" #: Azure Active Directory B2C as Identity provider. + #: Facebook as Identity provider. + FACEBOOK = "facebook" + #: Google as Identity provider. + GOOGLE = "google" + #: Microsoft Live as Identity provider. + MICROSOFT = "microsoft" + #: Twitter as Identity provider. + TWITTER = "twitter" + #: Azure Active Directory as Identity provider. + AAD = "aad" + #: Azure Active Directory B2C as Identity provider. + AAD_B2_C = "aadB2C" class KeyType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): """The Key to be used to generate token for user. @@ -258,9 +307,12 @@ class LoggerType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): """Logger type. """ - AZURE_EVENT_HUB = "azureEventHub" #: Azure Event Hub as log destination. - APPLICATION_INSIGHTS = "applicationInsights" #: Azure Application Insights as log destination. - AZURE_MONITOR = "azureMonitor" #: Azure Monitor. + #: Azure Event Hub as log destination. + AZURE_EVENT_HUB = "azureEventHub" + #: Azure Application Insights as log destination. + APPLICATION_INSIGHTS = "applicationInsights" + #: Azure Monitor. + AZURE_MONITOR = "azureMonitor" class NameAvailabilityReason(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): """Invalid indicates the name provided does not match the resource provider’s naming requirements @@ -274,34 +326,57 @@ class NameAvailabilityReason(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum) class NotificationName(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - REQUEST_PUBLISHER_NOTIFICATION_MESSAGE = "RequestPublisherNotificationMessage" #: The following email recipients and users will receive email notifications about subscription requests for API products requiring approval. - PURCHASE_PUBLISHER_NOTIFICATION_MESSAGE = "PurchasePublisherNotificationMessage" #: The following email recipients and users will receive email notifications about new API product subscriptions. - NEW_APPLICATION_NOTIFICATION_MESSAGE = "NewApplicationNotificationMessage" #: The following email recipients and users will receive email notifications when new applications are submitted to the application gallery. - BCC = "BCC" #: The following recipients will receive blind carbon copies of all emails sent to developers. - NEW_ISSUE_PUBLISHER_NOTIFICATION_MESSAGE = "NewIssuePublisherNotificationMessage" #: The following email recipients and users will receive email notifications when a new issue or comment is submitted on the developer portal. - ACCOUNT_CLOSED_PUBLISHER = "AccountClosedPublisher" #: The following email recipients and users will receive email notifications when developer closes his account. - QUOTA_LIMIT_APPROACHING_PUBLISHER_NOTIFICATION_MESSAGE = "QuotaLimitApproachingPublisherNotificationMessage" #: The following email recipients and users will receive email notifications when subscription usage gets close to usage quota. + #: The following email recipients and users will receive email notifications about subscription + #: requests for API products requiring approval. + REQUEST_PUBLISHER_NOTIFICATION_MESSAGE = "RequestPublisherNotificationMessage" + #: The following email recipients and users will receive email notifications about new API product + #: subscriptions. + PURCHASE_PUBLISHER_NOTIFICATION_MESSAGE = "PurchasePublisherNotificationMessage" + #: The following email recipients and users will receive email notifications when new applications + #: are submitted to the application gallery. + NEW_APPLICATION_NOTIFICATION_MESSAGE = "NewApplicationNotificationMessage" + #: The following recipients will receive blind carbon copies of all emails sent to developers. + BCC = "BCC" + #: The following email recipients and users will receive email notifications when a new issue or + #: comment is submitted on the developer portal. + NEW_ISSUE_PUBLISHER_NOTIFICATION_MESSAGE = "NewIssuePublisherNotificationMessage" + #: The following email recipients and users will receive email notifications when developer closes + #: his account. + ACCOUNT_CLOSED_PUBLISHER = "AccountClosedPublisher" + #: The following email recipients and users will receive email notifications when subscription + #: usage gets close to usage quota. + QUOTA_LIMIT_APPROACHING_PUBLISHER_NOTIFICATION_MESSAGE = "QuotaLimitApproachingPublisherNotificationMessage" class OperationNameFormat(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): """The format of the Operation Name for Application Insights telemetries. Default is Name. """ - NAME = "Name" #: API_NAME;rev=API_REVISION - OPERATION_NAME. - URL = "Url" #: HTTP_VERB URL. + #: API_NAME;rev=API_REVISION - OPERATION_NAME. + NAME = "Name" + #: HTTP_VERB URL. + URL = "Url" class PolicyContentFormat(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): """Format of the policyContent. """ - XML = "xml" #: The contents are inline and Content type is an XML document. - XML_LINK = "xml-link" #: The policy XML document is hosted on a http endpoint accessible from the API Management service. - RAWXML = "rawxml" #: The contents are inline and Content type is a non XML encoded policy document. - RAWXML_LINK = "rawxml-link" #: The policy document is not Xml encoded and is hosted on a http endpoint accessible from the API Management service. + #: The contents are inline and Content type is an XML document. + XML = "xml" + #: The policy XML document is hosted on a http endpoint accessible from the API Management + #: service. + XML_LINK = "xml-link" + #: The contents are inline and Content type is a non XML encoded policy document. + RAWXML = "rawxml" + #: The policy document is not Xml encoded and is hosted on a http endpoint accessible from the API + #: Management service. + RAWXML_LINK = "rawxml-link" class PolicyExportFormat(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - XML = "xml" #: The contents are inline and Content type is an XML document. - RAWXML = "rawxml" #: The contents are inline and Content type is a non XML encoded policy document. + #: The contents are inline and Content type is an XML document. + XML = "xml" + #: The contents are inline and Content type is a non XML encoded policy document. + RAWXML = "rawxml" class PolicyIdName(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): @@ -319,10 +394,14 @@ class PortalRevisionStatus(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): """Portal revision publishing status """ - PENDING = "pending" #: Portal revision publishing is pending. - PUBLISHING = "publishing" #: Portal revision is publishing. - COMPLETED = "completed" #: Portal revision publishing completed. - FAILED = "failed" #: Portal revision publishing failed. + #: Portal revision publishing is pending. + PENDING = "pending" + #: Portal revision is publishing. + PUBLISHING = "publishing" + #: Portal revision publishing completed. + COMPLETED = "completed" + #: Portal revision publishing failed. + FAILED = "failed" class ProductState(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): """whether product is published or not. Published products are discoverable by users of developer @@ -342,15 +421,19 @@ class ResourceSkuCapacityScaleType(with_metaclass(_CaseInsensitiveEnumMeta, str, """The scale type applicable to the sku. """ - AUTOMATIC = "automatic" #: Supported scale type automatic. - MANUAL = "manual" #: Supported scale type manual. - NONE = "none" #: Scaling not supported. + #: Supported scale type automatic. + AUTOMATIC = "automatic" + #: Supported scale type manual. + MANUAL = "manual" + #: Scaling not supported. + NONE = "none" class SamplingType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): """Sampling type. """ - FIXED = "fixed" #: Fixed-rate sampling. + #: Fixed-rate sampling. + FIXED = "fixed" class SettingsTypeName(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): @@ -360,12 +443,18 @@ class SkuType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): """Name of the Sku. """ - DEVELOPER = "Developer" #: Developer SKU of Api Management. - STANDARD = "Standard" #: Standard SKU of Api Management. - PREMIUM = "Premium" #: Premium SKU of Api Management. - BASIC = "Basic" #: Basic SKU of Api Management. - CONSUMPTION = "Consumption" #: Consumption SKU of Api Management. - ISOLATED = "Isolated" #: Isolated SKU of Api Management. + #: Developer SKU of Api Management. + DEVELOPER = "Developer" + #: Standard SKU of Api Management. + STANDARD = "Standard" + #: Premium SKU of Api Management. + PREMIUM = "Premium" + #: Basic SKU of Api Management. + BASIC = "Basic" + #: Consumption SKU of Api Management. + CONSUMPTION = "Consumption" + #: Isolated SKU of Api Management. + ISOLATED = "Isolated" class SoapApiType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): """Type of Api to create. @@ -375,18 +464,25 @@ class SoapApiType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): * ``soap`` creates a SOAP pass-through API . """ - SOAP_TO_REST = "http" #: Imports a SOAP API having a RESTful front end. - SOAP_PASS_THROUGH = "soap" #: Imports the Soap API having a SOAP front end. + #: Imports a SOAP API having a RESTful front end. + SOAP_TO_REST = "http" + #: Imports the Soap API having a SOAP front end. + SOAP_PASS_THROUGH = "soap" class State(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): """Status of the issue. """ - PROPOSED = "proposed" #: The issue is proposed. - OPEN = "open" #: The issue is opened. - REMOVED = "removed" #: The issue was removed. - RESOLVED = "resolved" #: The issue is now resolved. - CLOSED = "closed" #: The issue was closed. + #: The issue is proposed. + PROPOSED = "proposed" + #: The issue is opened. + OPEN = "open" + #: The issue was removed. + REMOVED = "removed" + #: The issue is now resolved. + RESOLVED = "resolved" + #: The issue was closed. + CLOSED = "closed" class SubscriptionState(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): """Subscription state. Possible states are * active – the subscription is active, * suspended – @@ -426,26 +522,39 @@ class UserState(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): into the developer portal or call any APIs of subscribed products. Default state is Active. """ - ACTIVE = "active" #: User state is active. - BLOCKED = "blocked" #: User is blocked. Blocked users cannot authenticate at developer portal or call API. - PENDING = "pending" #: User account is pending. Requires identity confirmation before it can be made active. - DELETED = "deleted" #: User account is closed. All identities and related entities are removed. + #: User state is active. + ACTIVE = "active" + #: User is blocked. Blocked users cannot authenticate at developer portal or call API. + BLOCKED = "blocked" + #: User account is pending. Requires identity confirmation before it can be made active. + PENDING = "pending" + #: User account is closed. All identities and related entities are removed. + DELETED = "deleted" class Verbosity(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): """The verbosity level applied to traces emitted by trace policies. """ - VERBOSE = "verbose" #: All the traces emitted by trace policies will be sent to the logger attached to this diagnostic instance. - INFORMATION = "information" #: Traces with 'severity' set to 'information' and 'error' will be sent to the logger attached to this diagnostic instance. - ERROR = "error" #: Only traces with 'severity' set to 'error' will be sent to the logger attached to this diagnostic instance. + #: All the traces emitted by trace policies will be sent to the logger attached to this diagnostic + #: instance. + VERBOSE = "verbose" + #: Traces with 'severity' set to 'information' and 'error' will be sent to the logger attached to + #: this diagnostic instance. + INFORMATION = "information" + #: Only traces with 'severity' set to 'error' will be sent to the logger attached to this + #: diagnostic instance. + ERROR = "error" class VersioningScheme(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): """An value that determines where the API Version identifier will be located in a HTTP request. """ - SEGMENT = "Segment" #: The API Version is passed in a path segment. - QUERY = "Query" #: The API Version is passed in a query parameter. - HEADER = "Header" #: The API Version is passed in a HTTP header. + #: The API Version is passed in a path segment. + SEGMENT = "Segment" + #: The API Version is passed in a query parameter. + QUERY = "Query" + #: The API Version is passed in a HTTP header. + HEADER = "Header" class VirtualNetworkType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): """The type of VPN in which API Management service needs to be configured in. None (Default Value) @@ -455,6 +564,10 @@ class VirtualNetworkType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): Intranet Facing Endpoint only. """ - NONE = "None" #: The service is not part of any Virtual Network. - EXTERNAL = "External" #: The service is part of Virtual Network and it is accessible from Internet. - INTERNAL = "Internal" #: The service is part of Virtual Network and it is only accessible from within the virtual network. + #: The service is not part of any Virtual Network. + NONE = "None" + #: The service is part of Virtual Network and it is accessible from Internet. + EXTERNAL = "External" + #: The service is part of Virtual Network and it is only accessible from within the virtual + #: network. + INTERNAL = "Internal" diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/_models.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/_models.py index 46b0504cf0b1..57cd38822400 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/_models.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/_models.py @@ -737,8 +737,8 @@ class ApiCreateOrUpdateParameter(msrest.serialization.Model): :param value: Content value when Importing an API. :type value: str :param format: Format of the Content in which the API is getting imported. Possible values - include: "wadl-xml", "wadl-link-json", "swagger-json", "swagger-link-json", "wsdl", "wsdl- - link", "openapi", "openapi+json", "openapi-link", "openapi+json-link". + include: "wadl-xml", "wadl-link-json", "swagger-json", "swagger-link-json", "wsdl", + "wsdl-link", "openapi", "openapi+json", "openapi-link", "openapi+json-link". :type format: str or ~azure.mgmt.apimanagement.models.ContentFormat :param wsdl_selector: Criteria to limit import of WSDL to a subset of the document. :type wsdl_selector: ~azure.mgmt.apimanagement.models.ApiCreateOrUpdatePropertiesWsdlSelector @@ -867,8 +867,8 @@ class ApiCreateOrUpdateProperties(ApiContractProperties): :param value: Content value when Importing an API. :type value: str :param format: Format of the Content in which the API is getting imported. Possible values - include: "wadl-xml", "wadl-link-json", "swagger-json", "swagger-link-json", "wsdl", "wsdl- - link", "openapi", "openapi+json", "openapi-link", "openapi+json-link". + include: "wadl-xml", "wadl-link-json", "swagger-json", "swagger-link-json", "wsdl", + "wsdl-link", "openapi", "openapi+json", "openapi-link", "openapi+json-link". :type format: str or ~azure.mgmt.apimanagement.models.ContentFormat :param wsdl_selector: Criteria to limit import of WSDL to a subset of the document. :type wsdl_selector: ~azure.mgmt.apimanagement.models.ApiCreateOrUpdatePropertiesWsdlSelector @@ -956,8 +956,8 @@ class ApiExportResult(msrest.serialization.Model): :param id: ResourceId of the API which was exported. :type id: str :param export_result_format: Format in which the Api Details are exported to the Storage Blob - with Sas Key valid for 5 minutes. Possible values include: "swagger-link-json", "wsdl- - link+xml", "wadl-link-json", "openapi-link". + with Sas Key valid for 5 minutes. Possible values include: "swagger-link-json", + "wsdl-link+xml", "wadl-link-json", "openapi-link". :type export_result_format: str or ~azure.mgmt.apimanagement.models.ExportResultFormat :param value: The object defining the schema of the exported Api Detail. :type value: ~azure.mgmt.apimanagement.models.ApiExportResultValue @@ -3311,15 +3311,15 @@ class AssociationContract(Resource): :vartype name: str :ivar type: Resource type for API Management resource. :vartype type: str - :ivar provisioning_state: Provisioning state. Default value: "created". - :vartype provisioning_state: str + :param provisioning_state: Provisioning state. The only acceptable values to pass in are None + and "created". The default value is None. + :type provisioning_state: str """ _validation = { 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, - 'provisioning_state': {'constant': True}, } _attribute_map = { @@ -3329,13 +3329,12 @@ class AssociationContract(Resource): 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, } - provisioning_state = "created" - def __init__( self, **kwargs ): super(AssociationContract, self).__init__(**kwargs) + self.provisioning_state = kwargs.get('provisioning_state', None) class AuthenticationSettingsContract(msrest.serialization.Model): @@ -3421,8 +3420,8 @@ class AuthorizationServerContract(Resource): security. :type support_state: bool :param default_scope: Access token scope that is going to be requested by default. Can be - overridden at the API level. Should be provided in the form of a string containing space- - delimited values. + overridden at the API level. Should be provided in the form of a string containing + space-delimited values. :type default_scope: str :param bearer_token_sending_methods: Specifies the mechanism by which access token is passed to the API. @@ -3531,8 +3530,8 @@ class AuthorizationServerContractBaseProperties(msrest.serialization.Model): security. :type support_state: bool :param default_scope: Access token scope that is going to be requested by default. Can be - overridden at the API level. Should be provided in the form of a string containing space- - delimited values. + overridden at the API level. Should be provided in the form of a string containing + space-delimited values. :type default_scope: str :param bearer_token_sending_methods: Specifies the mechanism by which access token is passed to the API. @@ -3603,8 +3602,8 @@ class AuthorizationServerContractProperties(AuthorizationServerContractBasePrope security. :type support_state: bool :param default_scope: Access token scope that is going to be requested by default. Can be - overridden at the API level. Should be provided in the form of a string containing space- - delimited values. + overridden at the API level. Should be provided in the form of a string containing + space-delimited values. :type default_scope: str :param bearer_token_sending_methods: Specifies the mechanism by which access token is passed to the API. @@ -3738,8 +3737,8 @@ class AuthorizationServerUpdateContract(Resource): security. :type support_state: bool :param default_scope: Access token scope that is going to be requested by default. Can be - overridden at the API level. Should be provided in the form of a string containing space- - delimited values. + overridden at the API level. Should be provided in the form of a string containing + space-delimited values. :type default_scope: str :param bearer_token_sending_methods: Specifies the mechanism by which access token is passed to the API. @@ -3848,8 +3847,8 @@ class AuthorizationServerUpdateContractProperties(AuthorizationServerContractBas security. :type support_state: bool :param default_scope: Access token scope that is going to be requested by default. Can be - overridden at the API level. Should be provided in the form of a string containing space- - delimited values. + overridden at the API level. Should be provided in the form of a string containing + space-delimited values. :type default_scope: str :param bearer_token_sending_methods: Specifies the mechanism by which access token is passed to the API. @@ -4912,7 +4911,7 @@ class ContentItemContract(Resource): :ivar type: Resource type for API Management resource. :vartype type: str :param properties: Properties of the content item. - :type properties: dict[str, object] + :type properties: dict[str, any] """ _validation = { @@ -4984,7 +4983,7 @@ class ContentTypeContract(Resource): :param description: Content type description. :type description: str :param schema: Content type schema. - :type schema: object + :type schema: any :param version: Content type version. :type version: str """ @@ -7969,7 +7968,7 @@ class Operation(msrest.serialization.Model): :param origin: The operation origin. :type origin: str :param properties: The operation properties. - :type properties: object + :type properties: any """ _attribute_map = { @@ -8239,13 +8238,19 @@ def __init__( self.next_link = kwargs.get('next_link', None) -class OperationResultContract(msrest.serialization.Model): - """Operation Result. +class OperationResultContract(Resource): + """Long Running Git Operation Results. Variables are only populated by the server, and will be ignored when sending a request. - :param id: Operation result identifier. - :type id: str + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type for API Management resource. + :vartype type: str + :param id_properties_id: Operation result identifier. + :type id_properties_id: str :param status: Status of an async operation. Possible values include: "Started", "InProgress", "Succeeded", "Failed". :type status: str or ~azure.mgmt.apimanagement.models.AsyncOperationStatus @@ -8266,17 +8271,23 @@ class OperationResultContract(msrest.serialization.Model): """ _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, 'action_log': {'readonly': True}, } _attribute_map = { 'id': {'key': 'id', 'type': 'str'}, - 'status': {'key': 'status', 'type': 'str'}, - 'started': {'key': 'started', 'type': 'iso-8601'}, - 'updated': {'key': 'updated', 'type': 'iso-8601'}, - 'result_info': {'key': 'resultInfo', 'type': 'str'}, - 'error': {'key': 'error', 'type': 'ErrorResponseBody'}, - 'action_log': {'key': 'actionLog', 'type': '[OperationResultLogItemContract]'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'id_properties_id': {'key': 'properties.id', 'type': 'str'}, + 'status': {'key': 'properties.status', 'type': 'str'}, + 'started': {'key': 'properties.started', 'type': 'iso-8601'}, + 'updated': {'key': 'properties.updated', 'type': 'iso-8601'}, + 'result_info': {'key': 'properties.resultInfo', 'type': 'str'}, + 'error': {'key': 'properties.error', 'type': 'ErrorResponseBody'}, + 'action_log': {'key': 'properties.actionLog', 'type': '[OperationResultLogItemContract]'}, } def __init__( @@ -8284,7 +8295,7 @@ def __init__( **kwargs ): super(OperationResultContract, self).__init__(**kwargs) - self.id = kwargs.get('id', None) + self.id_properties_id = kwargs.get('id_properties_id', None) self.status = kwargs.get('status', None) self.started = kwargs.get('started', None) self.updated = kwargs.get('updated', None) @@ -10446,7 +10457,7 @@ class SchemaContract(Resource): schemas other than Swagger/OpenAPI. :type value: str :param definitions: Types definitions. Used for Swagger/OpenAPI schemas only, null otherwise. - :type definitions: object + :type definitions: any """ _validation = { @@ -10538,8 +10549,8 @@ class SubscriptionContract(Resource): :type start_date: ~datetime.datetime :param expiration_date: Subscription expiration date. The setting is for audit purposes only and the subscription is not automatically expired. The subscription lifecycle can be managed by - using the ``state`` property. The date conforms to the following format: ``yyyy-MM- - ddTHH:mm:ssZ`` as specified by the ISO 8601 standard. + using the ``state`` property. The date conforms to the following format: + ``yyyy-MM-ddTHH:mm:ssZ`` as specified by the ISO 8601 standard. :type expiration_date: ~datetime.datetime :param end_date: Date when subscription was cancelled or expired. The setting is for audit purposes only and the subscription is not automatically cancelled. The subscription lifecycle @@ -10750,8 +10761,8 @@ class SubscriptionUpdateParameters(msrest.serialization.Model): :type scope: str :param expiration_date: Subscription expiration date. The setting is for audit purposes only and the subscription is not automatically expired. The subscription lifecycle can be managed by - using the ``state`` property. The date conforms to the following format: ``yyyy-MM- - ddTHH:mm:ssZ`` as specified by the ISO 8601 standard. + using the ``state`` property. The date conforms to the following format: + ``yyyy-MM-ddTHH:mm:ssZ`` as specified by the ISO 8601 standard. :type expiration_date: ~datetime.datetime :param display_name: Subscription name. :type display_name: str @@ -11167,7 +11178,7 @@ def __init__( class TenantConfigurationSyncStateContract(msrest.serialization.Model): - """Tenant Configuration Synchronization State. + """Result of Tenant Configuration Sync State. :param branch: The name of Git branch. :type branch: str @@ -11187,16 +11198,19 @@ class TenantConfigurationSyncStateContract(msrest.serialization.Model): conforms to the following format: ``yyyy-MM-ddTHH:mm:ssZ`` as specified by the ISO 8601 standard. :type configuration_change_date: ~datetime.datetime + :param last_operation_id: Most recent tenant configuration operation identifier. + :type last_operation_id: str """ _attribute_map = { - 'branch': {'key': 'branch', 'type': 'str'}, - 'commit_id': {'key': 'commitId', 'type': 'str'}, - 'is_export': {'key': 'isExport', 'type': 'bool'}, - 'is_synced': {'key': 'isSynced', 'type': 'bool'}, - 'is_git_enabled': {'key': 'isGitEnabled', 'type': 'bool'}, - 'sync_date': {'key': 'syncDate', 'type': 'iso-8601'}, - 'configuration_change_date': {'key': 'configurationChangeDate', 'type': 'iso-8601'}, + 'branch': {'key': 'properties.branch', 'type': 'str'}, + 'commit_id': {'key': 'properties.commitId', 'type': 'str'}, + 'is_export': {'key': 'properties.isExport', 'type': 'bool'}, + 'is_synced': {'key': 'properties.isSynced', 'type': 'bool'}, + 'is_git_enabled': {'key': 'properties.isGitEnabled', 'type': 'bool'}, + 'sync_date': {'key': 'properties.syncDate', 'type': 'iso-8601'}, + 'configuration_change_date': {'key': 'properties.configurationChangeDate', 'type': 'iso-8601'}, + 'last_operation_id': {'key': 'properties.lastOperationId', 'type': 'str'}, } def __init__( @@ -11211,6 +11225,7 @@ def __init__( self.is_git_enabled = kwargs.get('is_git_enabled', None) self.sync_date = kwargs.get('sync_date', None) self.configuration_change_date = kwargs.get('configuration_change_date', None) + self.last_operation_id = kwargs.get('last_operation_id', None) class TenantSettingsCollection(msrest.serialization.Model): diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/_models_py3.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/_models_py3.py index 91719343dd85..33a0d7303898 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/_models_py3.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/_models_py3.py @@ -7,7 +7,7 @@ # -------------------------------------------------------------------------- import datetime -from typing import Dict, List, Optional, Union +from typing import Any, Dict, List, Optional, Union from azure.core.exceptions import HttpResponseError import msrest.serialization @@ -833,8 +833,8 @@ class ApiCreateOrUpdateParameter(msrest.serialization.Model): :param value: Content value when Importing an API. :type value: str :param format: Format of the Content in which the API is getting imported. Possible values - include: "wadl-xml", "wadl-link-json", "swagger-json", "swagger-link-json", "wsdl", "wsdl- - link", "openapi", "openapi+json", "openapi-link", "openapi+json-link". + include: "wadl-xml", "wadl-link-json", "swagger-json", "swagger-link-json", "wsdl", + "wsdl-link", "openapi", "openapi+json", "openapi-link", "openapi+json-link". :type format: str or ~azure.mgmt.apimanagement.models.ContentFormat :param wsdl_selector: Criteria to limit import of WSDL to a subset of the document. :type wsdl_selector: ~azure.mgmt.apimanagement.models.ApiCreateOrUpdatePropertiesWsdlSelector @@ -985,8 +985,8 @@ class ApiCreateOrUpdateProperties(ApiContractProperties): :param value: Content value when Importing an API. :type value: str :param format: Format of the Content in which the API is getting imported. Possible values - include: "wadl-xml", "wadl-link-json", "swagger-json", "swagger-link-json", "wsdl", "wsdl- - link", "openapi", "openapi+json", "openapi-link", "openapi+json-link". + include: "wadl-xml", "wadl-link-json", "swagger-json", "swagger-link-json", "wsdl", + "wsdl-link", "openapi", "openapi+json", "openapi-link", "openapi+json-link". :type format: str or ~azure.mgmt.apimanagement.models.ContentFormat :param wsdl_selector: Criteria to limit import of WSDL to a subset of the document. :type wsdl_selector: ~azure.mgmt.apimanagement.models.ApiCreateOrUpdatePropertiesWsdlSelector @@ -1099,8 +1099,8 @@ class ApiExportResult(msrest.serialization.Model): :param id: ResourceId of the API which was exported. :type id: str :param export_result_format: Format in which the Api Details are exported to the Storage Blob - with Sas Key valid for 5 minutes. Possible values include: "swagger-link-json", "wsdl- - link+xml", "wadl-link-json", "openapi-link". + with Sas Key valid for 5 minutes. Possible values include: "swagger-link-json", + "wsdl-link+xml", "wadl-link-json", "openapi-link". :type export_result_format: str or ~azure.mgmt.apimanagement.models.ExportResultFormat :param value: The object defining the schema of the exported Api Detail. :type value: ~azure.mgmt.apimanagement.models.ApiExportResultValue @@ -3648,15 +3648,15 @@ class AssociationContract(Resource): :vartype name: str :ivar type: Resource type for API Management resource. :vartype type: str - :ivar provisioning_state: Provisioning state. Default value: "created". - :vartype provisioning_state: str + :param provisioning_state: Provisioning state. The only acceptable values to pass in are None + and "created". The default value is None. + :type provisioning_state: str """ _validation = { 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, - 'provisioning_state': {'constant': True}, } _attribute_map = { @@ -3666,13 +3666,14 @@ class AssociationContract(Resource): 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, } - provisioning_state = "created" - def __init__( self, + *, + provisioning_state: Optional[str] = None, **kwargs ): super(AssociationContract, self).__init__(**kwargs) + self.provisioning_state = provisioning_state class AuthenticationSettingsContract(msrest.serialization.Model): @@ -3765,8 +3766,8 @@ class AuthorizationServerContract(Resource): security. :type support_state: bool :param default_scope: Access token scope that is going to be requested by default. Can be - overridden at the API level. Should be provided in the form of a string containing space- - delimited values. + overridden at the API level. Should be provided in the form of a string containing + space-delimited values. :type default_scope: str :param bearer_token_sending_methods: Specifies the mechanism by which access token is passed to the API. @@ -3892,8 +3893,8 @@ class AuthorizationServerContractBaseProperties(msrest.serialization.Model): security. :type support_state: bool :param default_scope: Access token scope that is going to be requested by default. Can be - overridden at the API level. Should be provided in the form of a string containing space- - delimited values. + overridden at the API level. Should be provided in the form of a string containing + space-delimited values. :type default_scope: str :param bearer_token_sending_methods: Specifies the mechanism by which access token is passed to the API. @@ -3975,8 +3976,8 @@ class AuthorizationServerContractProperties(AuthorizationServerContractBasePrope security. :type support_state: bool :param default_scope: Access token scope that is going to be requested by default. Can be - overridden at the API level. Should be provided in the form of a string containing space- - delimited values. + overridden at the API level. Should be provided in the form of a string containing + space-delimited values. :type default_scope: str :param bearer_token_sending_methods: Specifies the mechanism by which access token is passed to the API. @@ -4131,8 +4132,8 @@ class AuthorizationServerUpdateContract(Resource): security. :type support_state: bool :param default_scope: Access token scope that is going to be requested by default. Can be - overridden at the API level. Should be provided in the form of a string containing space- - delimited values. + overridden at the API level. Should be provided in the form of a string containing + space-delimited values. :type default_scope: str :param bearer_token_sending_methods: Specifies the mechanism by which access token is passed to the API. @@ -4258,8 +4259,8 @@ class AuthorizationServerUpdateContractProperties(AuthorizationServerContractBas security. :type support_state: bool :param default_scope: Access token scope that is going to be requested by default. Can be - overridden at the API level. Should be provided in the form of a string containing space- - delimited values. + overridden at the API level. Should be provided in the form of a string containing + space-delimited values. :type default_scope: str :param bearer_token_sending_methods: Specifies the mechanism by which access token is passed to the API. @@ -5466,7 +5467,7 @@ class ContentItemContract(Resource): :ivar type: Resource type for API Management resource. :vartype type: str :param properties: Properties of the content item. - :type properties: dict[str, object] + :type properties: dict[str, any] """ _validation = { @@ -5485,7 +5486,7 @@ class ContentItemContract(Resource): def __init__( self, *, - properties: Optional[Dict[str, object]] = None, + properties: Optional[Dict[str, Any]] = None, **kwargs ): super(ContentItemContract, self).__init__(**kwargs) @@ -5540,7 +5541,7 @@ class ContentTypeContract(Resource): :param description: Content type description. :type description: str :param schema: Content type schema. - :type schema: object + :type schema: any :param version: Content type version. :type version: str """ @@ -5568,7 +5569,7 @@ def __init__( id_properties_id: Optional[str] = None, name_properties_name: Optional[str] = None, description: Optional[str] = None, - schema: Optional[object] = None, + schema: Optional[Any] = None, version: Optional[str] = None, **kwargs ): @@ -8886,7 +8887,7 @@ class Operation(msrest.serialization.Model): :param origin: The operation origin. :type origin: str :param properties: The operation properties. - :type properties: object + :type properties: any """ _attribute_map = { @@ -8902,7 +8903,7 @@ def __init__( name: Optional[str] = None, display: Optional["OperationDisplay"] = None, origin: Optional[str] = None, - properties: Optional[object] = None, + properties: Optional[Any] = None, **kwargs ): super(Operation, self).__init__(**kwargs) @@ -9195,13 +9196,19 @@ def __init__( self.next_link = next_link -class OperationResultContract(msrest.serialization.Model): - """Operation Result. +class OperationResultContract(Resource): + """Long Running Git Operation Results. Variables are only populated by the server, and will be ignored when sending a request. - :param id: Operation result identifier. - :type id: str + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type for API Management resource. + :vartype type: str + :param id_properties_id: Operation result identifier. + :type id_properties_id: str :param status: Status of an async operation. Possible values include: "Started", "InProgress", "Succeeded", "Failed". :type status: str or ~azure.mgmt.apimanagement.models.AsyncOperationStatus @@ -9222,23 +9229,29 @@ class OperationResultContract(msrest.serialization.Model): """ _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, 'action_log': {'readonly': True}, } _attribute_map = { 'id': {'key': 'id', 'type': 'str'}, - 'status': {'key': 'status', 'type': 'str'}, - 'started': {'key': 'started', 'type': 'iso-8601'}, - 'updated': {'key': 'updated', 'type': 'iso-8601'}, - 'result_info': {'key': 'resultInfo', 'type': 'str'}, - 'error': {'key': 'error', 'type': 'ErrorResponseBody'}, - 'action_log': {'key': 'actionLog', 'type': '[OperationResultLogItemContract]'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'id_properties_id': {'key': 'properties.id', 'type': 'str'}, + 'status': {'key': 'properties.status', 'type': 'str'}, + 'started': {'key': 'properties.started', 'type': 'iso-8601'}, + 'updated': {'key': 'properties.updated', 'type': 'iso-8601'}, + 'result_info': {'key': 'properties.resultInfo', 'type': 'str'}, + 'error': {'key': 'properties.error', 'type': 'ErrorResponseBody'}, + 'action_log': {'key': 'properties.actionLog', 'type': '[OperationResultLogItemContract]'}, } def __init__( self, *, - id: Optional[str] = None, + id_properties_id: Optional[str] = None, status: Optional[Union[str, "AsyncOperationStatus"]] = None, started: Optional[datetime.datetime] = None, updated: Optional[datetime.datetime] = None, @@ -9247,7 +9260,7 @@ def __init__( **kwargs ): super(OperationResultContract, self).__init__(**kwargs) - self.id = id + self.id_properties_id = id_properties_id self.status = status self.started = started self.updated = updated @@ -11656,7 +11669,7 @@ class SchemaContract(Resource): schemas other than Swagger/OpenAPI. :type value: str :param definitions: Types definitions. Used for Swagger/OpenAPI schemas only, null otherwise. - :type definitions: object + :type definitions: any """ _validation = { @@ -11679,7 +11692,7 @@ def __init__( *, content_type: Optional[str] = None, value: Optional[str] = None, - definitions: Optional[object] = None, + definitions: Optional[Any] = None, **kwargs ): super(SchemaContract, self).__init__(**kwargs) @@ -11756,8 +11769,8 @@ class SubscriptionContract(Resource): :type start_date: ~datetime.datetime :param expiration_date: Subscription expiration date. The setting is for audit purposes only and the subscription is not automatically expired. The subscription lifecycle can be managed by - using the ``state`` property. The date conforms to the following format: ``yyyy-MM- - ddTHH:mm:ssZ`` as specified by the ISO 8601 standard. + using the ``state`` property. The date conforms to the following format: + ``yyyy-MM-ddTHH:mm:ssZ`` as specified by the ISO 8601 standard. :type expiration_date: ~datetime.datetime :param end_date: Date when subscription was cancelled or expired. The setting is for audit purposes only and the subscription is not automatically cancelled. The subscription lifecycle @@ -11997,8 +12010,8 @@ class SubscriptionUpdateParameters(msrest.serialization.Model): :type scope: str :param expiration_date: Subscription expiration date. The setting is for audit purposes only and the subscription is not automatically expired. The subscription lifecycle can be managed by - using the ``state`` property. The date conforms to the following format: ``yyyy-MM- - ddTHH:mm:ssZ`` as specified by the ISO 8601 standard. + using the ``state`` property. The date conforms to the following format: + ``yyyy-MM-ddTHH:mm:ssZ`` as specified by the ISO 8601 standard. :type expiration_date: ~datetime.datetime :param display_name: Subscription name. :type display_name: str @@ -12468,7 +12481,7 @@ def __init__( class TenantConfigurationSyncStateContract(msrest.serialization.Model): - """Tenant Configuration Synchronization State. + """Result of Tenant Configuration Sync State. :param branch: The name of Git branch. :type branch: str @@ -12488,16 +12501,19 @@ class TenantConfigurationSyncStateContract(msrest.serialization.Model): conforms to the following format: ``yyyy-MM-ddTHH:mm:ssZ`` as specified by the ISO 8601 standard. :type configuration_change_date: ~datetime.datetime + :param last_operation_id: Most recent tenant configuration operation identifier. + :type last_operation_id: str """ _attribute_map = { - 'branch': {'key': 'branch', 'type': 'str'}, - 'commit_id': {'key': 'commitId', 'type': 'str'}, - 'is_export': {'key': 'isExport', 'type': 'bool'}, - 'is_synced': {'key': 'isSynced', 'type': 'bool'}, - 'is_git_enabled': {'key': 'isGitEnabled', 'type': 'bool'}, - 'sync_date': {'key': 'syncDate', 'type': 'iso-8601'}, - 'configuration_change_date': {'key': 'configurationChangeDate', 'type': 'iso-8601'}, + 'branch': {'key': 'properties.branch', 'type': 'str'}, + 'commit_id': {'key': 'properties.commitId', 'type': 'str'}, + 'is_export': {'key': 'properties.isExport', 'type': 'bool'}, + 'is_synced': {'key': 'properties.isSynced', 'type': 'bool'}, + 'is_git_enabled': {'key': 'properties.isGitEnabled', 'type': 'bool'}, + 'sync_date': {'key': 'properties.syncDate', 'type': 'iso-8601'}, + 'configuration_change_date': {'key': 'properties.configurationChangeDate', 'type': 'iso-8601'}, + 'last_operation_id': {'key': 'properties.lastOperationId', 'type': 'str'}, } def __init__( @@ -12510,6 +12526,7 @@ def __init__( is_git_enabled: Optional[bool] = None, sync_date: Optional[datetime.datetime] = None, configuration_change_date: Optional[datetime.datetime] = None, + last_operation_id: Optional[str] = None, **kwargs ): super(TenantConfigurationSyncStateContract, self).__init__(**kwargs) @@ -12520,6 +12537,7 @@ def __init__( self.is_git_enabled = is_git_enabled self.sync_date = sync_date self.configuration_change_date = configuration_change_date + self.last_operation_id = last_operation_id class TenantSettingsCollection(msrest.serialization.Model): diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_diagnostic_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_diagnostic_operations.py index 6a52d4069cb6..5591441b5ee6 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_diagnostic_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_diagnostic_operations.py @@ -131,7 +131,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_entity_tag( 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) response_headers = {} @@ -270,7 +270,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) response_headers = {} @@ -355,7 +355,7 @@ def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -444,7 +444,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) response_headers = {} @@ -520,7 +520,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/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_export_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_export_operations.py index b577831e02f5..44f07f174452 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_export_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_export_operations.py @@ -108,7 +108,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('ApiExportResult', pipeline_response) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_issue_attachment_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_issue_attachment_operations.py index 457d7aee7c94..f58a3040ef06 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_issue_attachment_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_issue_attachment_operations.py @@ -137,7 +137,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) @@ -212,7 +212,7 @@ def get_entity_tag( 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) response_headers = {} @@ -287,7 +287,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) response_headers = {} @@ -377,7 +377,7 @@ def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -463,7 +463,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/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_issue_comment_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_issue_comment_operations.py index 361d4f5f8fdd..c6304d2026a8 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_issue_comment_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_issue_comment_operations.py @@ -137,7 +137,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) @@ -211,7 +211,7 @@ def get_entity_tag( 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) response_headers = {} @@ -285,7 +285,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) response_headers = {} @@ -374,7 +374,7 @@ def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -459,7 +459,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/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_issue_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_issue_operations.py index f85a22fa59b6..1f84a4a17361 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_issue_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_issue_operations.py @@ -138,7 +138,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) @@ -207,7 +207,7 @@ def get_entity_tag( 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) response_headers = {} @@ -282,7 +282,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) response_headers = {} @@ -367,7 +367,7 @@ def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -456,7 +456,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) response_headers = {} @@ -532,7 +532,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/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_management_operations_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_management_operations_operations.py index 03703a4bbb9c..5d4b1eca9967 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_management_operations_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_management_operations_operations.py @@ -98,7 +98,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.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) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_management_service_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_management_service_operations.py index 587ddda50884..c2022facb7e4 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_management_service_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_management_service_operations.py @@ -91,7 +91,7 @@ def _restore_initial( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = None @@ -125,8 +125,8 @@ def begin_restore( :type parameters: ~azure.mgmt.apimanagement.models.ApiManagementServiceBackupRestoreParameters :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 ApiManagementServiceResource or the result of cls(response) @@ -223,7 +223,7 @@ def _backup_initial( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = None @@ -255,8 +255,8 @@ def begin_backup( :type parameters: ~azure.mgmt.apimanagement.models.ApiManagementServiceBackupRestoreParameters :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 ApiManagementServiceResource or the result of cls(response) @@ -353,7 +353,7 @@ def _create_or_update_initial( if response.status_code not in [200, 201, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = None @@ -388,8 +388,8 @@ def begin_create_or_update( :type parameters: ~azure.mgmt.apimanagement.models.ApiManagementServiceResource :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 ApiManagementServiceResource or the result of cls(response) @@ -486,7 +486,7 @@ def _update_initial( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = None @@ -517,8 +517,8 @@ def begin_update( :type parameters: ~azure.mgmt.apimanagement.models.ApiManagementServiceUpdateParameters :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 ApiManagementServiceResource or the result of cls(response) @@ -620,7 +620,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('ApiManagementServiceResource', pipeline_response) @@ -669,7 +669,7 @@ def _delete_initial( if response.status_code not in [200, 202, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = None @@ -697,8 +697,8 @@ def begin_delete( :type service_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: 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) @@ -811,7 +811,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) @@ -879,7 +879,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) @@ -939,7 +939,7 @@ def get_sso_token( 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('ApiManagementServiceGetSsoTokenResult', pipeline_response) @@ -999,7 +999,7 @@ def check_name_availability( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('ApiManagementServiceNameAvailabilityResult', pipeline_response) @@ -1051,7 +1051,7 @@ def get_domain_ownership_identifier( 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('ApiManagementServiceGetDomainOwnershipIdentifierResult', pipeline_response) @@ -1109,7 +1109,7 @@ def _apply_network_configuration_updates_initial( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = None @@ -1143,8 +1143,8 @@ def begin_apply_network_configuration_updates( :type parameters: ~azure.mgmt.apimanagement.models.ApiManagementServiceApplyNetworkConfigurationParameters :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 ApiManagementServiceResource or the result of cls(response) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_management_service_skus_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_management_service_skus_operations.py index b84ceec3d65c..e10caea09754 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_management_service_skus_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_management_service_skus_operations.py @@ -112,7 +112,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.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) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_management_skus_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_management_skus_operations.py index 606b228d6f03..0e9f55e36f75 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_management_skus_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_management_skus_operations.py @@ -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) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_operation_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_operation_operations.py index 053fc6702ad9..a462d56086b1 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_operation_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_operation_operations.py @@ -142,7 +142,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) @@ -212,7 +212,7 @@ def get_entity_tag( 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) response_headers = {} @@ -283,7 +283,7 @@ def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -369,7 +369,7 @@ def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -459,7 +459,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) response_headers = {} @@ -536,7 +536,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/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_operation_policy_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_operation_policy_operations.py index 07af63ce6f90..9fd372823354 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_operation_policy_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_operation_policy_operations.py @@ -103,7 +103,7 @@ def list_by_operation( 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('PolicyCollection', pipeline_response) @@ -177,7 +177,7 @@ def get_entity_tag( 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) response_headers = {} @@ -257,7 +257,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) response_headers = {} @@ -347,7 +347,7 @@ def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -433,7 +433,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/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_operations.py index 2bc59fbd4090..570a6ea9accf 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_operations.py @@ -144,7 +144,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) @@ -209,7 +209,7 @@ def get_entity_tag( 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) response_headers = {} @@ -275,7 +275,7 @@ def get( if response.status_code not in [200, 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) response_headers = {} @@ -342,7 +342,7 @@ def _create_or_update_initial( if response.status_code not in [200, 201, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -387,8 +387,8 @@ def begin_create_or_update( :type if_match: 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 ApiContract or the result of cls(response) @@ -514,7 +514,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) response_headers = {} @@ -591,7 +591,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: @@ -692,7 +692,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) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_policy_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_policy_operations.py index 3b3a4f7a8c79..2075471cf614 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_policy_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_policy_operations.py @@ -98,7 +98,7 @@ def list_by_api( 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('PolicyCollection', pipeline_response) @@ -167,7 +167,7 @@ def get_entity_tag( 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) response_headers = {} @@ -242,7 +242,7 @@ def get( if response.status_code not in [200, 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) response_headers = {} @@ -332,7 +332,7 @@ def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -413,7 +413,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/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_product_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_product_operations.py index 3b2d4e055715..4d225d92164e 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_product_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_product_operations.py @@ -131,7 +131,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) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_release_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_release_operations.py index 974714437193..61fce57894aa 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_release_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_release_operations.py @@ -133,7 +133,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) @@ -202,7 +202,7 @@ def get_entity_tag( 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) response_headers = {} @@ -272,7 +272,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) response_headers = {} @@ -357,7 +357,7 @@ def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -446,7 +446,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) response_headers = {} @@ -522,7 +522,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/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_revision_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_revision_operations.py index ff3b094c1a1b..2b4d33e8fe0b 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_revision_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_revision_operations.py @@ -131,7 +131,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) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_schema_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_schema_operations.py index 08b141624128..8cbe44ecace1 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_schema_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_schema_operations.py @@ -134,7 +134,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) @@ -204,7 +204,7 @@ def get_entity_tag( 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) response_headers = {} @@ -275,7 +275,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) response_headers = {} @@ -339,7 +339,7 @@ def _create_or_update_initial( if response.status_code not in [200, 201, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -388,8 +388,8 @@ def begin_create_or_update( :type if_match: 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 SchemaContract or the result of cls(response) @@ -519,7 +519,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/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_tag_description_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_tag_description_operations.py index 769a3640ec3f..eb2003ce33ca 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_tag_description_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_tag_description_operations.py @@ -134,7 +134,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) @@ -204,7 +204,7 @@ def get_entity_tag( 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) response_headers = {} @@ -275,7 +275,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) response_headers = {} @@ -361,7 +361,7 @@ def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -443,7 +443,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/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_version_set_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_version_set_operations.py index e769a27c813f..62e8345b13b2 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_version_set_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_version_set_operations.py @@ -126,7 +126,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) @@ -191,7 +191,7 @@ def get_entity_tag( 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) response_headers = {} @@ -257,7 +257,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) response_headers = {} @@ -338,7 +338,7 @@ def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -423,7 +423,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) response_headers = {} @@ -495,7 +495,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/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_authorization_server_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_authorization_server_operations.py index 504a75ac25a2..05ed2efd3908 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_authorization_server_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_authorization_server_operations.py @@ -129,7 +129,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) @@ -193,7 +193,7 @@ def get_entity_tag( 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) response_headers = {} @@ -258,7 +258,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) response_headers = {} @@ -338,7 +338,7 @@ def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -422,7 +422,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) response_headers = {} @@ -493,7 +493,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: @@ -554,7 +554,7 @@ def list_secrets( 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) response_headers = {} diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_backend_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_backend_operations.py index 1e545c86d65c..0188edb8ff6a 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_backend_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_backend_operations.py @@ -129,7 +129,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) @@ -194,7 +194,7 @@ def get_entity_tag( 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) response_headers = {} @@ -260,7 +260,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) response_headers = {} @@ -341,7 +341,7 @@ def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -426,7 +426,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) response_headers = {} @@ -498,7 +498,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: @@ -572,7 +572,7 @@ def reconnect( if response.status_code not in [202]: 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/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_cache_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_cache_operations.py index b286d1af6a8a..48edb1056587 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_cache_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_cache_operations.py @@ -120,7 +120,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.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) @@ -185,7 +185,7 @@ def get_entity_tag( 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) response_headers = {} @@ -251,7 +251,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) response_headers = {} @@ -332,7 +332,7 @@ def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -417,7 +417,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) response_headers = {} @@ -489,7 +489,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/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_certificate_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_certificate_operations.py index a33ef140fa0a..328ada399671 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_certificate_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_certificate_operations.py @@ -136,7 +136,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) @@ -201,7 +201,7 @@ def get_entity_tag( 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) response_headers = {} @@ -267,7 +267,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) response_headers = {} @@ -348,7 +348,7 @@ def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -425,7 +425,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: @@ -487,7 +487,7 @@ def refresh_secret( 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) response_headers = {} diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_content_item_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_content_item_operations.py index cbd657ceedac..834ab75e14c3 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_content_item_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_content_item_operations.py @@ -53,7 +53,7 @@ def list_by_service( **kwargs # type: Any ): # type: (...) -> Iterable["_models.ContentItemCollection"] - """Returns list of content items. + """Lists developer portal's content items specified by the provided content type. :param resource_group_name: The name of the resource group. :type resource_group_name: str @@ -114,7 +114,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) @@ -134,7 +134,8 @@ def get_entity_tag( **kwargs # type: Any ): # type: (...) -> bool - """Returns content item metadata. + """Returns the entity state (ETag) version of the developer portal's content item specified by its + identifier. :param resource_group_name: The name of the resource group. :type resource_group_name: str @@ -182,7 +183,7 @@ def get_entity_tag( 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) response_headers = {} @@ -203,7 +204,7 @@ def get( **kwargs # type: Any ): # type: (...) -> "_models.ContentItemContract" - """Returns content item details. + """Returns the developer portal's content item specified by its identifier. :param resource_group_name: The name of the resource group. :type resource_group_name: str @@ -251,7 +252,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) response_headers = {} @@ -274,7 +275,7 @@ def create_or_update( **kwargs # type: Any ): # type: (...) -> "_models.ContentItemContract" - """Creates new content item. + """Creates a new developer portal's content item specified by the provided content type. :param resource_group_name: The name of the resource group. :type resource_group_name: str @@ -327,7 +328,7 @@ def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -355,7 +356,7 @@ def delete( **kwargs # type: Any ): # type: (...) -> None - """Removes specified content item. + """Removes the specified developer portal's content item. :param resource_group_name: The name of the resource group. :type resource_group_name: str @@ -407,7 +408,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/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_content_type_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_content_type_operations.py index b152732d21d3..0432ae10d060 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_content_type_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_content_type_operations.py @@ -52,7 +52,8 @@ def list_by_service( **kwargs # type: Any ): # type: (...) -> Iterable["_models.ContentTypeCollection"] - """Returns list of content types. + """Lists the developer portal's content types. Content types describe content items' properties, + validation rules, and constraints. :param resource_group_name: The name of the resource group. :type resource_group_name: str @@ -110,7 +111,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) @@ -129,7 +130,8 @@ def get( **kwargs # type: Any ): # type: (...) -> "_models.ContentTypeContract" - """Gets API Management content type details. + """Gets the details of the developer portal's content type. Content types describe content items' + properties, validation rules, and constraints. :param resource_group_name: The name of the resource group. :type resource_group_name: str @@ -174,7 +176,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) response_headers = {} @@ -196,7 +198,9 @@ def create_or_update( **kwargs # type: Any ): # type: (...) -> "_models.ContentTypeContract" - """Creates or updates an Content Type. + """Creates or updates the developer portal's content type. Content types describe content items' + properties, validation rules, and constraints. Custom content types' identifiers need to start + with the ``c-`` prefix. Built-in content types can't be modified. :param resource_group_name: The name of the resource group. :type resource_group_name: str @@ -246,7 +250,7 @@ def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -273,7 +277,9 @@ def delete( **kwargs # type: Any ): # type: (...) -> None - """Removes specified content type. + """Removes the specified developer portal's content type. Content types describe content items' + properties, validation rules, and constraints. Built-in content types (with identifiers + starting with the ``c-`` prefix) can't be removed. :param resource_group_name: The name of the resource group. :type resource_group_name: str @@ -322,7 +328,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/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_delegation_settings_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_delegation_settings_operations.py index 666ffab87543..e26b0d3b0bc3 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_delegation_settings_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_delegation_settings_operations.py @@ -93,7 +93,7 @@ def get_entity_tag( 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) response_headers = {} @@ -154,7 +154,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) response_headers = {} @@ -229,7 +229,7 @@ def update( if response.status_code not in [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: @@ -300,7 +300,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.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('PortalDelegationSettings', pipeline_response) @@ -360,7 +360,7 @@ def list_secrets( 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('PortalSettingValidationKeyContract', pipeline_response) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_deleted_services_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_deleted_services_operations.py index 894d328a9977..1aa702e0791e 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_deleted_services_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_deleted_services_operations.py @@ -104,7 +104,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.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) @@ -164,7 +164,7 @@ def get_by_name( 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('DeletedServiceContract', pipeline_response) @@ -213,7 +213,7 @@ def _purge_initial( if response.status_code not in [200, 202, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = None @@ -241,8 +241,8 @@ def begin_purge( :type location: 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) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_diagnostic_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_diagnostic_operations.py index 4ff4f0c47923..07a10ac114d9 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_diagnostic_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_diagnostic_operations.py @@ -127,7 +127,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) @@ -192,7 +192,7 @@ def get_entity_tag( 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) response_headers = {} @@ -258,7 +258,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) response_headers = {} @@ -339,7 +339,7 @@ def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -424,7 +424,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) response_headers = {} @@ -496,7 +496,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/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_email_template_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_email_template_operations.py index 883177d6c564..72c2d4d59c28 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_email_template_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_email_template_operations.py @@ -127,7 +127,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) @@ -191,7 +191,7 @@ def get_entity_tag( 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) response_headers = {} @@ -256,7 +256,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) response_headers = {} @@ -336,7 +336,7 @@ def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -417,7 +417,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) response_headers = {} @@ -488,7 +488,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/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_gateway_api_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_gateway_api_operations.py index 9f30d17bd7bf..33f740d3b773 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_gateway_api_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_gateway_api_operations.py @@ -132,7 +132,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) @@ -201,7 +201,7 @@ def get_entity_tag( 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) response_headers = {} @@ -282,7 +282,7 @@ def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -355,7 +355,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/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_gateway_certificate_authority_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_gateway_certificate_authority_operations.py index 6f1b717a4446..f249941ab9b7 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_gateway_certificate_authority_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_gateway_certificate_authority_operations.py @@ -132,7 +132,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) @@ -202,7 +202,7 @@ def get_entity_tag( 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) response_headers = {} @@ -273,7 +273,7 @@ def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -359,7 +359,7 @@ def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -441,7 +441,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/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_gateway_hostname_configuration_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_gateway_hostname_configuration_operations.py index 10a71e9c8800..18430a5b9d74 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_gateway_hostname_configuration_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_gateway_hostname_configuration_operations.py @@ -133,7 +133,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) @@ -204,7 +204,7 @@ def get_entity_tag( 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) response_headers = {} @@ -275,7 +275,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) response_headers = {} @@ -361,7 +361,7 @@ def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -443,7 +443,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/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_gateway_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_gateway_operations.py index e3dc53c72665..0514066a16e7 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_gateway_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_gateway_operations.py @@ -130,7 +130,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) @@ -195,7 +195,7 @@ def get_entity_tag( 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) response_headers = {} @@ -261,7 +261,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) response_headers = {} @@ -342,7 +342,7 @@ def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -427,7 +427,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) response_headers = {} @@ -499,7 +499,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: @@ -561,7 +561,7 @@ def list_keys( 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) response_headers = {} @@ -636,7 +636,7 @@ def regenerate_key( if response.status_code not in [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: @@ -706,7 +706,7 @@ def generate_token( 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('GatewayTokenContract', pipeline_response) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_group_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_group_operations.py index 65eafa95ce1d..37476af9d0b8 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_group_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_group_operations.py @@ -130,7 +130,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) @@ -195,7 +195,7 @@ def get_entity_tag( 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) response_headers = {} @@ -261,7 +261,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) response_headers = {} @@ -342,7 +342,7 @@ def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -427,7 +427,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) response_headers = {} @@ -499,7 +499,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/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_group_user_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_group_user_operations.py index 9c69bb915257..0a632ff2667c 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_group_user_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_group_user_operations.py @@ -137,7 +137,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) @@ -206,7 +206,7 @@ def check_entity_exists( if response.status_code not in [204, 404]: 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: @@ -273,7 +273,7 @@ def create( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -346,7 +346,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/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_identity_provider_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_identity_provider_operations.py index e82c28ca137c..5ce3a2a10304 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_identity_provider_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_identity_provider_operations.py @@ -110,7 +110,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) @@ -174,7 +174,7 @@ def get_entity_tag( 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) response_headers = {} @@ -240,7 +240,7 @@ def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -320,7 +320,7 @@ def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -404,7 +404,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) response_headers = {} @@ -475,7 +475,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: @@ -536,7 +536,7 @@ def list_secrets( 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) response_headers = {} diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_issue_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_issue_operations.py index 9bbe646f5cb2..fa3b7907de74 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_issue_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_issue_operations.py @@ -132,7 +132,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) @@ -197,7 +197,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) response_headers = {} diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_logger_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_logger_operations.py index 7715e57d2241..bcd93ad4e2b9 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_logger_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_logger_operations.py @@ -130,7 +130,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) @@ -194,7 +194,7 @@ def get_entity_tag( 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) response_headers = {} @@ -259,7 +259,7 @@ def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -339,7 +339,7 @@ def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -423,7 +423,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) response_headers = {} @@ -494,7 +494,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/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_named_value_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_named_value_operations.py index 01aa814e68e0..6b9da0738e42 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_named_value_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_named_value_operations.py @@ -137,7 +137,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) @@ -201,7 +201,7 @@ def get_entity_tag( 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) response_headers = {} @@ -266,7 +266,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) response_headers = {} @@ -328,7 +328,7 @@ def _create_or_update_initial( if response.status_code not in [200, 201, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -372,8 +372,8 @@ def begin_create_or_update( :type if_match: 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 NamedValueContract or the result of cls(response) @@ -480,7 +480,7 @@ def _update_initial( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -520,8 +520,8 @@ def begin_update( :type parameters: ~azure.mgmt.apimanagement.models.NamedValueUpdateParameters :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 NamedValueContract or the result of cls(response) @@ -638,7 +638,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: @@ -699,7 +699,7 @@ def list_value( 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) response_headers = {} @@ -752,7 +752,7 @@ def _refresh_secret_initial( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -785,8 +785,8 @@ def begin_refresh_secret( :type named_value_id: 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 NamedValueContract or the result of cls(response) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_network_status_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_network_status_operations.py index 78ed68367ad0..fb1de731f5d6 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_network_status_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_network_status_operations.py @@ -95,7 +95,7 @@ def list_by_service( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('[NetworkStatusContractByLocation]', pipeline_response) @@ -162,7 +162,7 @@ def list_by_location( 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('NetworkStatusContract', pipeline_response) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_notification_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_notification_operations.py index c47873fa919e..0670a253a1ca 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_notification_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_notification_operations.py @@ -120,7 +120,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.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) @@ -184,7 +184,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('NotificationContract', pipeline_response) @@ -254,7 +254,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.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('NotificationContract', pipeline_response) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_notification_recipient_email_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_notification_recipient_email_operations.py index 49e0350e90cc..931b6c8c565d 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_notification_recipient_email_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_notification_recipient_email_operations.py @@ -97,7 +97,7 @@ def list_by_notification( 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('RecipientEmailCollection', pipeline_response) @@ -165,7 +165,7 @@ def check_entity_exists( if response.status_code not in [204, 404]: 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: @@ -231,7 +231,7 @@ def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -303,7 +303,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/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_notification_recipient_user_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_notification_recipient_user_operations.py index 726de087588c..3208e12b63c3 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_notification_recipient_user_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_notification_recipient_user_operations.py @@ -97,7 +97,7 @@ def list_by_notification( 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('RecipientUserCollection', pipeline_response) @@ -165,7 +165,7 @@ def check_entity_exists( if response.status_code not in [204, 404]: 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: @@ -231,7 +231,7 @@ def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -303,7 +303,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/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_open_id_connect_provider_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_open_id_connect_provider_operations.py index 621fdfeb29e5..e009f6156a03 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_open_id_connect_provider_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_open_id_connect_provider_operations.py @@ -129,7 +129,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) @@ -193,7 +193,7 @@ def get_entity_tag( 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) response_headers = {} @@ -258,7 +258,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) response_headers = {} @@ -338,7 +338,7 @@ def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -422,7 +422,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) response_headers = {} @@ -493,7 +493,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: @@ -554,7 +554,7 @@ def list_secrets( 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) response_headers = {} diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_operation_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_operation_operations.py index 46bd39275103..b8405bb50ad5 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_operation_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_operation_operations.py @@ -143,7 +143,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) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_policy_description_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_policy_description_operations.py index 22d81f0c4722..e86c4a31fb35 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_policy_description_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_policy_description_operations.py @@ -98,7 +98,7 @@ def list_by_service( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('PolicyDescriptionCollection', pipeline_response) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_policy_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_policy_operations.py index 956e8c832502..c529d0c960de 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_policy_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_policy_operations.py @@ -93,7 +93,7 @@ def list_by_service( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('PolicyCollection', pipeline_response) @@ -158,7 +158,7 @@ def get_entity_tag( 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) response_headers = {} @@ -228,7 +228,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) response_headers = {} @@ -308,7 +308,7 @@ def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -384,7 +384,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/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_portal_revision_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_portal_revision_operations.py index d0f94ac59a16..9a39ef3889ff 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_portal_revision_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_portal_revision_operations.py @@ -57,7 +57,7 @@ def list_by_service( **kwargs # type: Any ): # type: (...) -> Iterable["_models.PortalRevisionCollection"] - """Lists a collection of developer portal revision entities. + """Lists developer portal's revisions. :param resource_group_name: The name of the resource group. :type resource_group_name: str @@ -138,7 +138,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) @@ -157,7 +157,7 @@ def get_entity_tag( **kwargs # type: Any ): # type: (...) -> bool - """Gets developer portal revision specified by its identifier. + """Gets the developer portal revision specified by its identifier. :param resource_group_name: The name of the resource group. :type resource_group_name: str @@ -203,7 +203,7 @@ def get_entity_tag( 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) response_headers = {} @@ -223,7 +223,7 @@ def get( **kwargs # type: Any ): # type: (...) -> "_models.PortalRevisionContract" - """Gets developer portal revision specified by its identifier. + """Gets the developer portal's revision specified by its identifier. :param resource_group_name: The name of the resource group. :type resource_group_name: str @@ -269,7 +269,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) response_headers = {} @@ -328,7 +328,7 @@ def _create_or_update_initial( if response.status_code not in [201, 202]: 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) response_headers = {} @@ -352,7 +352,8 @@ def begin_create_or_update( **kwargs # type: Any ): # type: (...) -> LROPoller["_models.PortalRevisionContract"] - """Creates a new developer portal revision. + """Creates a new developer portal's revision by running the portal's publishing. The ``isCurrent`` + property indicates if the revision is publicly accessible. :param resource_group_name: The name of the resource group. :type resource_group_name: str @@ -365,8 +366,8 @@ def begin_create_or_update( :type parameters: ~azure.mgmt.apimanagement.models.PortalRevisionContract :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 PortalRevisionContract or the result of cls(response) @@ -472,7 +473,7 @@ def _update_initial( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -513,8 +514,8 @@ def begin_update( :type parameters: ~azure.mgmt.apimanagement.models.PortalRevisionContract :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 PortalRevisionContract or the result of cls(response) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_portal_settings_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_portal_settings_operations.py index 7f1d919597fa..7e600fee175e 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_portal_settings_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_portal_settings_operations.py @@ -93,7 +93,7 @@ def list_by_service( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('PortalSettingsCollection', pipeline_response) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_product_api_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_product_api_operations.py index 119972d5ca6f..c90bccc74527 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_product_api_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_product_api_operations.py @@ -137,7 +137,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) @@ -207,7 +207,7 @@ def check_entity_exists( if response.status_code not in [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: @@ -275,7 +275,7 @@ def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -349,7 +349,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/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_product_group_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_product_group_operations.py index ec0e8eb50e57..9889fcdfd550 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_product_group_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_product_group_operations.py @@ -133,7 +133,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) @@ -203,7 +203,7 @@ def check_entity_exists( if response.status_code not in [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: @@ -271,7 +271,7 @@ def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -345,7 +345,7 @@ def delete( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.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/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_product_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_product_operations.py index 6c5c60381004..a6851c0ce897 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_product_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_product_operations.py @@ -142,7 +142,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) @@ -207,7 +207,7 @@ def get_entity_tag( 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) response_headers = {} @@ -273,7 +273,7 @@ def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -354,7 +354,7 @@ def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -439,7 +439,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) response_headers = {} @@ -516,7 +516,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: @@ -615,7 +615,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) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_product_policy_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_product_policy_operations.py index d1f974f555b4..119dd54e377a 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_product_policy_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_product_policy_operations.py @@ -98,7 +98,7 @@ def list_by_product( 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('PolicyCollection', pipeline_response) @@ -167,7 +167,7 @@ def get_entity_tag( 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) response_headers = {} @@ -242,7 +242,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) response_headers = {} @@ -327,7 +327,7 @@ def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -408,7 +408,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/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_product_subscriptions_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_product_subscriptions_operations.py index 0c41da03d14e..690183d99064 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_product_subscriptions_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_product_subscriptions_operations.py @@ -140,7 +140,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) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_quota_by_counter_keys_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_quota_by_counter_keys_operations.py index d0a9934dd52e..82b61a3d6fad 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_quota_by_counter_keys_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_quota_by_counter_keys_operations.py @@ -60,9 +60,9 @@ def list_by_service( :param service_name: The name of the API Management service. :type service_name: str :param quota_counter_key: Quota counter key identifier.This is the result of expression defined - in counter-key attribute of the quota-by-key policy.For Example, if you specify counter- - key="boo" in the policy, then it’s accessible by "boo" counter key. But if it’s defined as - counter-key="@("b"+"a")" then it will be accessible by "ba" key. + in counter-key attribute of the quota-by-key policy.For Example, if you specify + counter-key="boo" in the policy, then it’s accessible by "boo" counter key. But if it’s defined + as counter-key="@("b"+"a")" then it will be accessible by "ba" key. :type quota_counter_key: str :keyword callable cls: A custom type or function that will be passed the direct response :return: QuotaCounterCollection, or the result of cls(response) @@ -101,7 +101,7 @@ def list_by_service( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('QuotaCounterCollection', pipeline_response) @@ -129,9 +129,9 @@ def update( :param service_name: The name of the API Management service. :type service_name: str :param quota_counter_key: Quota counter key identifier.This is the result of expression defined - in counter-key attribute of the quota-by-key policy.For Example, if you specify counter- - key="boo" in the policy, then it’s accessible by "boo" counter key. But if it’s defined as - counter-key="@("b"+"a")" then it will be accessible by "ba" key. + in counter-key attribute of the quota-by-key policy.For Example, if you specify + counter-key="boo" in the policy, then it’s accessible by "boo" counter key. But if it’s defined + as counter-key="@("b"+"a")" then it will be accessible by "ba" key. :type quota_counter_key: str :param parameters: The value of the quota counter to be applied to all quota counter periods. :type parameters: ~azure.mgmt.apimanagement.models.QuotaCounterValueUpdateContract @@ -177,7 +177,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('QuotaCounterCollection', pipeline_response) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_quota_by_period_keys_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_quota_by_period_keys_operations.py index c66a34db3ab0..6df627a39af2 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_quota_by_period_keys_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_quota_by_period_keys_operations.py @@ -61,9 +61,9 @@ def get( :param service_name: The name of the API Management service. :type service_name: str :param quota_counter_key: Quota counter key identifier.This is the result of expression defined - in counter-key attribute of the quota-by-key policy.For Example, if you specify counter- - key="boo" in the policy, then it’s accessible by "boo" counter key. But if it’s defined as - counter-key="@("b"+"a")" then it will be accessible by "ba" key. + in counter-key attribute of the quota-by-key policy.For Example, if you specify + counter-key="boo" in the policy, then it’s accessible by "boo" counter key. But if it’s defined + as counter-key="@("b"+"a")" then it will be accessible by "ba" key. :type quota_counter_key: str :param quota_period_key: Quota period key identifier. :type quota_period_key: str @@ -105,7 +105,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('QuotaCounterContract', pipeline_response) @@ -133,9 +133,9 @@ def update( :param service_name: The name of the API Management service. :type service_name: str :param quota_counter_key: Quota counter key identifier.This is the result of expression defined - in counter-key attribute of the quota-by-key policy.For Example, if you specify counter- - key="boo" in the policy, then it’s accessible by "boo" counter key. But if it’s defined as - counter-key="@("b"+"a")" then it will be accessible by "ba" key. + in counter-key attribute of the quota-by-key policy.For Example, if you specify + counter-key="boo" in the policy, then it’s accessible by "boo" counter key. But if it’s defined + as counter-key="@("b"+"a")" then it will be accessible by "ba" key. :type quota_counter_key: str :param quota_period_key: Quota period key identifier. :type quota_period_key: str @@ -184,7 +184,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('QuotaCounterContract', pipeline_response) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_region_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_region_operations.py index ccce1953af63..6e71b599621c 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_region_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_region_operations.py @@ -110,7 +110,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) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_reports_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_reports_operations.py index b64cbf3b7235..64e0d959dc30 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_reports_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_reports_operations.py @@ -130,7 +130,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) @@ -237,7 +237,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) @@ -344,7 +344,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) @@ -450,7 +450,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) @@ -552,7 +552,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) @@ -658,7 +658,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) @@ -771,7 +771,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) @@ -865,7 +865,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) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_sign_in_settings_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_sign_in_settings_operations.py index 3d8eb0bb107a..e328cdc7bc89 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_sign_in_settings_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_sign_in_settings_operations.py @@ -93,7 +93,7 @@ def get_entity_tag( 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) response_headers = {} @@ -154,7 +154,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) response_headers = {} @@ -229,7 +229,7 @@ def update( if response.status_code not in [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: @@ -300,7 +300,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.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('PortalSigninSettings', pipeline_response) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_sign_up_settings_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_sign_up_settings_operations.py index d8526bd46301..5190b4fd3486 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_sign_up_settings_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_sign_up_settings_operations.py @@ -93,7 +93,7 @@ def get_entity_tag( 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) response_headers = {} @@ -154,7 +154,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) response_headers = {} @@ -229,7 +229,7 @@ def update( if response.status_code not in [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: @@ -300,7 +300,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.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('PortalSignupSettings', pipeline_response) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_subscription_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_subscription_operations.py index 17b20aff5525..3a6796439891 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_subscription_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_subscription_operations.py @@ -135,7 +135,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) @@ -201,7 +201,7 @@ def get_entity_tag( 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) response_headers = {} @@ -267,7 +267,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) response_headers = {} @@ -363,7 +363,7 @@ def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -463,7 +463,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) response_headers = {} @@ -535,7 +535,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: @@ -597,7 +597,7 @@ def regenerate_primary_key( if response.status_code not in [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: @@ -659,7 +659,7 @@ def regenerate_secondary_key( if response.status_code not in [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: @@ -721,7 +721,7 @@ def list_secrets( 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) response_headers = {} diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_tag_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_tag_operations.py index 474134b93b71..dc4a6e8f260b 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_tag_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_tag_operations.py @@ -138,7 +138,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) @@ -212,7 +212,7 @@ def get_entity_state_by_operation( 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) response_headers = {} @@ -287,7 +287,7 @@ def get_by_operation( 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) response_headers = {} @@ -363,7 +363,7 @@ def assign_to_operation( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -441,7 +441,7 @@ def detach_from_operation( 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: @@ -537,7 +537,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) @@ -606,7 +606,7 @@ def get_entity_state_by_api( 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) response_headers = {} @@ -676,7 +676,7 @@ def get_by_api( 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) response_headers = {} @@ -747,7 +747,7 @@ def assign_to_api( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -823,7 +823,7 @@ def detach_from_api( 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: @@ -919,7 +919,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) @@ -988,7 +988,7 @@ def get_entity_state_by_product( 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) response_headers = {} @@ -1058,7 +1058,7 @@ def get_by_product( 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) response_headers = {} @@ -1129,7 +1129,7 @@ def assign_to_product( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -1202,7 +1202,7 @@ def detach_from_product( 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: @@ -1299,7 +1299,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) @@ -1363,7 +1363,7 @@ def get_entity_state( 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) response_headers = {} @@ -1428,7 +1428,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) response_headers = {} @@ -1508,7 +1508,7 @@ def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -1592,7 +1592,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) response_headers = {} @@ -1663,7 +1663,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/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_tag_resource_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_tag_resource_operations.py index 32247573b005..2d0701f386ab 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_tag_resource_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_tag_resource_operations.py @@ -139,7 +139,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) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_tenant_access_git_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_tenant_access_git_operations.py index f629038740ee..34fb3ef48c9f 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_tenant_access_git_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_tenant_access_git_operations.py @@ -97,7 +97,7 @@ def regenerate_primary_key( if response.status_code not in [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: @@ -158,7 +158,7 @@ def regenerate_secondary_key( if response.status_code not in [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/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_tenant_access_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_tenant_access_operations.py index 03e9e98c120b..9695735316ba 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_tenant_access_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_tenant_access_operations.py @@ -115,7 +115,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) @@ -179,7 +179,7 @@ def get_entity_tag( 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) response_headers = {} @@ -244,7 +244,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) response_headers = {} @@ -323,7 +323,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) response_headers = {} @@ -402,7 +402,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) response_headers = {} @@ -468,7 +468,7 @@ def regenerate_primary_key( if response.status_code not in [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: @@ -529,7 +529,7 @@ def regenerate_secondary_key( if response.status_code not in [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: @@ -590,7 +590,7 @@ def list_secrets( 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) response_headers = {} diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_tenant_configuration_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_tenant_configuration_operations.py index 4befc757e7bb..342116b8bd21 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_tenant_configuration_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_tenant_configuration_operations.py @@ -92,7 +92,7 @@ def _deploy_initial( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = None @@ -127,8 +127,8 @@ def begin_deploy( :type parameters: ~azure.mgmt.apimanagement.models.DeployConfigurationParameters :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 OperationResultContract or the result of cls(response) @@ -229,7 +229,7 @@ def _save_initial( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = None @@ -264,8 +264,8 @@ def begin_save( :type parameters: ~azure.mgmt.apimanagement.models.SaveConfigurationParameter :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 OperationResultContract or the result of cls(response) @@ -366,7 +366,7 @@ def _validate_initial( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = None @@ -401,8 +401,8 @@ def begin_validate( :type parameters: ~azure.mgmt.apimanagement.models.DeployConfigurationParameters :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 OperationResultContract or the result of cls(response) @@ -511,7 +511,7 @@ def get_sync_state( 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('TenantConfigurationSyncStateContract', pipeline_response) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_tenant_settings_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_tenant_settings_operations.py index 642c64d83ec2..575f7aeb5917 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_tenant_settings_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_tenant_settings_operations.py @@ -115,7 +115,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) @@ -179,7 +179,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) response_headers = {} diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_user_confirmation_password_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_user_confirmation_password_operations.py index bcf610bd033b..6969f1bc790a 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_user_confirmation_password_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_user_confirmation_password_operations.py @@ -103,7 +103,7 @@ def send( if response.status_code not in [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/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_user_group_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_user_group_operations.py index 3522f7ef4888..afd81c5eeff0 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_user_group_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_user_group_operations.py @@ -135,7 +135,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) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_user_identities_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_user_identities_operations.py index 766f92164932..5034ae7c5dc9 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_user_identities_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_user_identities_operations.py @@ -114,7 +114,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) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_user_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_user_operations.py index 180241b92788..e5e68f337f1b 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_user_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_user_operations.py @@ -138,7 +138,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) @@ -202,7 +202,7 @@ def get_entity_tag( 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) response_headers = {} @@ -267,7 +267,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) response_headers = {} @@ -352,7 +352,7 @@ def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -436,7 +436,7 @@ def update( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -523,7 +523,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: @@ -585,7 +585,7 @@ def generate_sso_url( 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('GenerateSsoUrlResult', pipeline_response) @@ -657,7 +657,7 @@ def get_shared_access_token( 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('UserTokenResult', pipeline_response) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_user_subscription_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_user_subscription_operations.py index 38ed5e737082..e22485cdfe4a 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_user_subscription_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_user_subscription_operations.py @@ -138,7 +138,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) @@ -207,7 +207,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) response_headers = {}