diff --git a/sdk/notificationhubs/azure-mgmt-notificationhubs/MANIFEST.in b/sdk/notificationhubs/azure-mgmt-notificationhubs/MANIFEST.in index a3cb07df8765..3a9b6517412b 100644 --- a/sdk/notificationhubs/azure-mgmt-notificationhubs/MANIFEST.in +++ b/sdk/notificationhubs/azure-mgmt-notificationhubs/MANIFEST.in @@ -1,3 +1,4 @@ +include _meta.json recursive-include tests *.py *.yaml include *.md include azure/__init__.py diff --git a/sdk/notificationhubs/azure-mgmt-notificationhubs/_meta.json b/sdk/notificationhubs/azure-mgmt-notificationhubs/_meta.json new file mode 100644 index 000000000000..a3fd0b1e45ac --- /dev/null +++ b/sdk/notificationhubs/azure-mgmt-notificationhubs/_meta.json @@ -0,0 +1,11 @@ +{ + "autorest": "3.4.2", + "use": [ + "@autorest/python@5.8.1", + "@autorest/modelerfour@4.19.2" + ], + "commit": "7f530e3727f746e26f5b5ece8a5874daf10cc56f", + "repository_url": "https://github.com/Azure/azure-rest-api-specs", + "autorest_command": "autorest specification/notificationhubs/resource-manager/readme.md --multiapi --python --python-mode=update --python-sdks-folder=/home/vsts/work/1/s/azure-sdk-for-python/sdk --track2 --use=@autorest/python@5.8.1 --use=@autorest/modelerfour@4.19.2 --version=3.4.2", + "readme": "specification/notificationhubs/resource-manager/readme.md" +} \ No newline at end of file diff --git a/sdk/notificationhubs/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/_metadata.json b/sdk/notificationhubs/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/_metadata.json new file mode 100644 index 000000000000..baddffc0940e --- /dev/null +++ b/sdk/notificationhubs/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/_metadata.json @@ -0,0 +1,105 @@ +{ + "chosen_version": "2017-04-01", + "total_api_version_list": ["2017-04-01"], + "client": { + "name": "NotificationHubsManagementClient", + "filename": "_notification_hubs_management_client", + "description": "Azure NotificationHub 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\": [\"NotificationHubsManagementClientConfiguration\"]}}, \"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\": [\"NotificationHubsManagementClientConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}, \"azurecore\": {\"azure.core.pipeline.transport\": [\"AsyncHttpResponse\", \"HttpRequest\"]}}}" + }, + "global_parameters": { + "sync": { + "credential": { + "signature": "credential, # type: \"TokenCredential\"", + "description": "Credential needed for the client to connect to Azure.", + "docstring_type": "~azure.core.credentials.TokenCredential", + "required": true + }, + "subscription_id": { + "signature": "subscription_id, # type: str", + "description": "Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.", + "docstring_type": "str", + "required": true + } + }, + "async": { + "credential": { + "signature": "credential: \"AsyncTokenCredential\",", + "description": "Credential needed for the client to connect to Azure.", + "docstring_type": "~azure.core.credentials_async.AsyncTokenCredential", + "required": true + }, + "subscription_id": { + "signature": "subscription_id: str,", + "description": "Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.", + "docstring_type": "str", + "required": true + } + }, + "constant": { + }, + "call": "credential, subscription_id", + "service_client_specific": { + "sync": { + "api_version": { + "signature": "api_version=None, # type: Optional[str]", + "description": "API version to use if no profile is provided, or if missing in profile.", + "docstring_type": "str", + "required": false + }, + "base_url": { + "signature": "base_url=None, # type: Optional[str]", + "description": "Service URL", + "docstring_type": "str", + "required": false + }, + "profile": { + "signature": "profile=KnownProfiles.default, # type: KnownProfiles", + "description": "A profile definition, from KnownProfiles to dict.", + "docstring_type": "azure.profiles.KnownProfiles", + "required": false + } + }, + "async": { + "api_version": { + "signature": "api_version: Optional[str] = None,", + "description": "API version to use if no profile is provided, or if missing in profile.", + "docstring_type": "str", + "required": false + }, + "base_url": { + "signature": "base_url: Optional[str] = None,", + "description": "Service URL", + "docstring_type": "str", + "required": false + }, + "profile": { + "signature": "profile: KnownProfiles = KnownProfiles.default,", + "description": "A profile definition, from KnownProfiles to dict.", + "docstring_type": "azure.profiles.KnownProfiles", + "required": false + } + } + } + }, + "config": { + "credential": true, + "credential_scopes": ["https://management.azure.com/.default"], + "credential_default_policy_type": "BearerTokenCredentialPolicy", + "credential_default_policy_type_has_async_version": true, + "credential_key_header_name": null, + "sync_imports": "{\"regular\": {\"azurecore\": {\"azure.core.configuration\": [\"Configuration\"], \"azure.core.pipeline\": [\"policies\"], \"azure.mgmt.core.policies\": [\"ARMHttpLoggingPolicy\"]}, \"local\": {\"._version\": [\"VERSION\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\"]}}, \"typing\": {\"azurecore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}}", + "async_imports": "{\"regular\": {\"azurecore\": {\"azure.core.configuration\": [\"Configuration\"], \"azure.core.pipeline\": [\"policies\"], \"azure.mgmt.core.policies\": [\"ARMHttpLoggingPolicy\"]}, \"local\": {\".._version\": [\"VERSION\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\"]}}, \"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"]}}}" + }, + "operation_groups": { + "operations": "Operations", + "namespaces": "NamespacesOperations", + "notification_hubs": "NotificationHubsOperations" + } +} \ No newline at end of file diff --git a/sdk/notificationhubs/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/_notification_hubs_management_client.py b/sdk/notificationhubs/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/_notification_hubs_management_client.py index 9fc702e4e0b0..7ffed12e3d93 100644 --- a/sdk/notificationhubs/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/_notification_hubs_management_client.py +++ b/sdk/notificationhubs/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/_notification_hubs_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 NotificationHubsManagementClientConfiguration from .operations import Operations @@ -66,6 +67,24 @@ def __init__( self.notification_hubs = NotificationHubsOperations( 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/notificationhubs/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/_version.py b/sdk/notificationhubs/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/_version.py index 364f3c906cf9..efe7276fe05f 100644 --- a/sdk/notificationhubs/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/_version.py +++ b/sdk/notificationhubs/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "7.0.0" +VERSION = "7.0.0b1" diff --git a/sdk/notificationhubs/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/aio/_notification_hubs_management_client.py b/sdk/notificationhubs/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/aio/_notification_hubs_management_client.py index 6fe1f594d6f8..7bd84a89ccfa 100644 --- a/sdk/notificationhubs/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/aio/_notification_hubs_management_client.py +++ b/sdk/notificationhubs/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/aio/_notification_hubs_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 @@ -63,6 +64,23 @@ def __init__( self.notification_hubs = NotificationHubsOperations( 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/notificationhubs/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/aio/operations/_namespaces_operations.py b/sdk/notificationhubs/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/aio/operations/_namespaces_operations.py index 13d89c322e41..4a05365a329d 100644 --- a/sdk/notificationhubs/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/aio/operations/_namespaces_operations.py +++ b/sdk/notificationhubs/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/aio/operations/_namespaces_operations.py @@ -46,7 +46,7 @@ def __init__(self, client, config, serializer, deserializer) -> None: async def check_availability( self, parameters: "_models.CheckAvailabilityParameters", - **kwargs + **kwargs: Any ) -> "_models.CheckAvailabilityResult": """Checks the availability of the given service namespace across all Azure subscriptions. This is useful because the domain name is created based on the service namespace name. @@ -107,7 +107,7 @@ async def create_or_update( resource_group_name: str, namespace_name: str, parameters: "_models.NamespaceCreateOrUpdateParameters", - **kwargs + **kwargs: Any ) -> "_models.NamespaceResource": """Creates/Updates a service namespace. Once created, this namespace's resource manifest is immutable. This operation is idempotent. @@ -178,7 +178,7 @@ async def patch( resource_group_name: str, namespace_name: str, parameters: "_models.NamespacePatchParameters", - **kwargs + **kwargs: Any ) -> "_models.NamespaceResource": """Patches the existing namespace. @@ -243,7 +243,7 @@ async def _delete_initial( self, resource_group_name: str, namespace_name: str, - **kwargs + **kwargs: Any ) -> None: cls = kwargs.pop('cls', None) # type: ClsType[None] error_map = { @@ -285,7 +285,7 @@ async def begin_delete( self, resource_group_name: str, namespace_name: str, - **kwargs + **kwargs: Any ) -> AsyncLROPoller[None]: """Deletes an existing namespace. This operation also removes all associated notificationHubs under the namespace. @@ -296,8 +296,8 @@ async def begin_delete( :type namespace_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) @@ -350,7 +350,7 @@ async def get( self, resource_group_name: str, namespace_name: str, - **kwargs + **kwargs: Any ) -> "_models.NamespaceResource": """Returns the description for the specified namespace. @@ -410,7 +410,7 @@ async def create_or_update_authorization_rule( namespace_name: str, authorization_rule_name: str, parameters: "_models.SharedAccessAuthorizationRuleCreateOrUpdateParameters", - **kwargs + **kwargs: Any ) -> "_models.SharedAccessAuthorizationRuleResource": """Creates an authorization rule for a namespace. @@ -479,7 +479,7 @@ async def delete_authorization_rule( resource_group_name: str, namespace_name: str, authorization_rule_name: str, - **kwargs + **kwargs: Any ) -> None: """Deletes a namespace authorization rule. @@ -536,7 +536,7 @@ async def get_authorization_rule( resource_group_name: str, namespace_name: str, authorization_rule_name: str, - **kwargs + **kwargs: Any ) -> "_models.SharedAccessAuthorizationRuleResource": """Gets an authorization rule for a namespace by name. @@ -596,7 +596,7 @@ async def get_authorization_rule( def list( self, resource_group_name: str, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.NamespaceListResult"]: """Lists the available namespaces within a resourceGroup. @@ -666,7 +666,7 @@ async def get_next(next_link=None): def list_all( self, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.NamespaceListResult"]: """Lists all the available namespaces within the subscription irrespective of the resourceGroups. @@ -734,7 +734,7 @@ def list_authorization_rules( self, resource_group_name: str, namespace_name: str, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.SharedAccessAuthorizationRuleListResult"]: """Gets the authorization rules for a namespace. @@ -809,7 +809,7 @@ async def list_keys( resource_group_name: str, namespace_name: str, authorization_rule_name: str, - **kwargs + **kwargs: Any ) -> "_models.SharedAccessAuthorizationRuleListResult": """Gets the Primary and Secondary ConnectionStrings to the namespace. @@ -873,7 +873,7 @@ async def regenerate_keys( namespace_name: str, authorization_rule_name: str, parameters: "_models.PolicykeyResource", - **kwargs + **kwargs: Any ) -> "_models.ResourceListKeys": """Regenerates the Primary/Secondary Keys to the Namespace Authorization Rule. diff --git a/sdk/notificationhubs/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/aio/operations/_notification_hubs_operations.py b/sdk/notificationhubs/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/aio/operations/_notification_hubs_operations.py index 9e73c65df62c..125903a03767 100644 --- a/sdk/notificationhubs/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/aio/operations/_notification_hubs_operations.py +++ b/sdk/notificationhubs/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/aio/operations/_notification_hubs_operations.py @@ -46,7 +46,7 @@ async def check_notification_hub_availability( resource_group_name: str, namespace_name: str, parameters: "_models.CheckAvailabilityParameters", - **kwargs + **kwargs: Any ) -> "_models.CheckAvailabilityResult": """Checks the availability of the given notificationHub in a namespace. @@ -113,7 +113,7 @@ async def create_or_update( namespace_name: str, notification_hub_name: str, parameters: "_models.NotificationHubCreateOrUpdateParameters", - **kwargs + **kwargs: Any ) -> "_models.NotificationHubResource": """Creates/Update a NotificationHub in a namespace. @@ -187,7 +187,7 @@ async def patch( namespace_name: str, notification_hub_name: str, parameters: Optional["_models.NotificationHubPatchParameters"] = None, - **kwargs + **kwargs: Any ) -> "_models.NotificationHubResource": """Patch a NotificationHub in a namespace. @@ -259,7 +259,7 @@ async def delete( resource_group_name: str, namespace_name: str, notification_hub_name: str, - **kwargs + **kwargs: Any ) -> None: """Deletes a notification hub associated with a namespace. @@ -316,7 +316,7 @@ async def get( resource_group_name: str, namespace_name: str, notification_hub_name: str, - **kwargs + **kwargs: Any ) -> "_models.NotificationHubResource": """Lists the notification hubs associated with a namespace. @@ -378,8 +378,8 @@ async def debug_send( resource_group_name: str, namespace_name: str, notification_hub_name: str, - parameters: Optional[object] = None, - **kwargs + parameters: Optional[Any] = None, + **kwargs: Any ) -> "_models.DebugSendResponse": """test send a push notification. @@ -390,7 +390,7 @@ async def debug_send( :param notification_hub_name: The notification hub name. :type notification_hub_name: str :param parameters: Debug send parameters. - :type parameters: object + :type parameters: any :keyword callable cls: A custom type or function that will be passed the direct response :return: DebugSendResponse, or the result of cls(response) :rtype: ~azure.mgmt.notificationhubs.models.DebugSendResponse @@ -453,7 +453,7 @@ async def create_or_update_authorization_rule( notification_hub_name: str, authorization_rule_name: str, parameters: "_models.SharedAccessAuthorizationRuleCreateOrUpdateParameters", - **kwargs + **kwargs: Any ) -> "_models.SharedAccessAuthorizationRuleResource": """Creates/Updates an authorization rule for a NotificationHub. @@ -526,7 +526,7 @@ async def delete_authorization_rule( namespace_name: str, notification_hub_name: str, authorization_rule_name: str, - **kwargs + **kwargs: Any ) -> None: """Deletes a notificationHub authorization rule. @@ -587,7 +587,7 @@ async def get_authorization_rule( namespace_name: str, notification_hub_name: str, authorization_rule_name: str, - **kwargs + **kwargs: Any ) -> "_models.SharedAccessAuthorizationRuleResource": """Gets an authorization rule for a NotificationHub by name. @@ -651,7 +651,7 @@ def list( self, resource_group_name: str, namespace_name: str, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.NotificationHubListResult"]: """Lists the notification hubs associated with a namespace. @@ -726,7 +726,7 @@ def list_authorization_rules( resource_group_name: str, namespace_name: str, notification_hub_name: str, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.SharedAccessAuthorizationRuleListResult"]: """Gets the authorization rules for a NotificationHub. @@ -805,7 +805,7 @@ async def list_keys( namespace_name: str, notification_hub_name: str, authorization_rule_name: str, - **kwargs + **kwargs: Any ) -> "_models.ResourceListKeys": """Gets the Primary and Secondary ConnectionStrings to the NotificationHub. @@ -873,7 +873,7 @@ async def regenerate_keys( notification_hub_name: str, authorization_rule_name: str, parameters: "_models.PolicykeyResource", - **kwargs + **kwargs: Any ) -> "_models.ResourceListKeys": """Regenerates the Primary/Secondary Keys to the NotificationHub Authorization Rule. @@ -947,7 +947,7 @@ async def get_pns_credentials( resource_group_name: str, namespace_name: str, notification_hub_name: str, - **kwargs + **kwargs: Any ) -> "_models.PnsCredentialsResource": """Lists the PNS Credentials associated with a notification hub . diff --git a/sdk/notificationhubs/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/aio/operations/_operations.py b/sdk/notificationhubs/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/aio/operations/_operations.py index 9dcca4acba63..ab52243819dc 100644 --- a/sdk/notificationhubs/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/aio/operations/_operations.py +++ b/sdk/notificationhubs/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/aio/operations/_operations.py @@ -43,7 +43,7 @@ def __init__(self, client, config, serializer, deserializer) -> None: def list( self, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.OperationListResult"]: """Lists all of the available NotificationHubs REST API operations. @@ -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/notificationhubs/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/_models.py b/sdk/notificationhubs/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/_models.py index b543103daff1..fd967cdda16c 100644 --- a/sdk/notificationhubs/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/_models.py +++ b/sdk/notificationhubs/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/_models.py @@ -290,7 +290,7 @@ class DebugSendResponse(Resource): :param failure: send failure. :type failure: float :param results: actual failure description. - :type results: object + :type results: any """ _validation = { diff --git a/sdk/notificationhubs/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/_models_py3.py b/sdk/notificationhubs/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/_models_py3.py index d667ea0bf3db..43f4e23b4003 100644 --- a/sdk/notificationhubs/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/_models_py3.py +++ b/sdk/notificationhubs/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/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 @@ -327,7 +327,7 @@ class DebugSendResponse(Resource): :param failure: send failure. :type failure: float :param results: actual failure description. - :type results: object + :type results: any """ _validation = { @@ -356,7 +356,7 @@ def __init__( sku: Optional["Sku"] = None, success: Optional[float] = None, failure: Optional[float] = None, - results: Optional[object] = None, + results: Optional[Any] = None, **kwargs ): super(DebugSendResponse, self).__init__(location=location, tags=tags, sku=sku, **kwargs) diff --git a/sdk/notificationhubs/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/operations/_namespaces_operations.py b/sdk/notificationhubs/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/operations/_namespaces_operations.py index 14a636dfb360..7a67613dce59 100644 --- a/sdk/notificationhubs/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/operations/_namespaces_operations.py +++ b/sdk/notificationhubs/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/operations/_namespaces_operations.py @@ -305,8 +305,8 @@ def begin_delete( :type namespace_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) diff --git a/sdk/notificationhubs/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/operations/_notification_hubs_operations.py b/sdk/notificationhubs/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/operations/_notification_hubs_operations.py index 8c0f5068e04d..bad833597a9b 100644 --- a/sdk/notificationhubs/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/operations/_notification_hubs_operations.py +++ b/sdk/notificationhubs/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/operations/_notification_hubs_operations.py @@ -387,7 +387,7 @@ def debug_send( resource_group_name, # type: str namespace_name, # type: str notification_hub_name, # type: str - parameters=None, # type: Optional[object] + parameters=None, # type: Optional[Any] **kwargs # type: Any ): # type: (...) -> "_models.DebugSendResponse" @@ -400,7 +400,7 @@ def debug_send( :param notification_hub_name: The notification hub name. :type notification_hub_name: str :param parameters: Debug send parameters. - :type parameters: object + :type parameters: any :keyword callable cls: A custom type or function that will be passed the direct response :return: DebugSendResponse, or the result of cls(response) :rtype: ~azure.mgmt.notificationhubs.models.DebugSendResponse diff --git a/sdk/notificationhubs/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/operations/_operations.py b/sdk/notificationhubs/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/operations/_operations.py index 64a374690925..7d15883f1f33 100644 --- a/sdk/notificationhubs/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/operations/_operations.py +++ b/sdk/notificationhubs/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/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)