From 403c7660fc3226f04bef42f4a958cb09ff7ffe2a Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Thu, 6 Jan 2022 05:57:45 +0000 Subject: [PATCH 1/5] CodeGen from PR 17259 in Azure/azure-rest-api-specs Update readme.python.md (#17259) --- .../azure-mgmt-notificationhubs/_meta.json | 4 +- .../mgmt/notificationhubs/_configuration.py | 13 +- .../_notification_hubs_management_client.py | 24 +- .../azure/mgmt/notificationhubs/_version.py | 2 +- .../mgmt/notificationhubs/models/__init__.py | 96 +- .../mgmt/notificationhubs/models/_models.py | 1799 ----------------- .../operations/_namespaces_operations.py | 317 ++- .../_notification_hubs_operations.py | 403 ++-- .../operations/_operations.py | 22 +- 9 files changed, 412 insertions(+), 2268 deletions(-) delete mode 100644 sdk/notificationhubs/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/_models.py diff --git a/sdk/notificationhubs/azure-mgmt-notificationhubs/_meta.json b/sdk/notificationhubs/azure-mgmt-notificationhubs/_meta.json index bd28568e9b05d..6da167b09a17c 100644 --- a/sdk/notificationhubs/azure-mgmt-notificationhubs/_meta.json +++ b/sdk/notificationhubs/azure-mgmt-notificationhubs/_meta.json @@ -4,8 +4,8 @@ "@autorest/python@5.12.0", "@autorest/modelerfour@4.19.3" ], - "commit": "d92d7a99548a48491f2dcccb2d9c2774ae98725a", + "commit": "49876eb04aa9957efbd34e3bc8700aece76c31ee", "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.12.0 --use=@autorest/modelerfour@4.19.3 --version=3.7.2", + "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 --python3-only --track2 --use=@autorest/python@5.12.0 --use=@autorest/modelerfour@4.19.3 --version=3.7.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/_configuration.py b/sdk/notificationhubs/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/_configuration.py index 1f6f810844c75..cadf10d55fb6d 100644 --- a/sdk/notificationhubs/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/_configuration.py +++ b/sdk/notificationhubs/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/_configuration.py @@ -6,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import TYPE_CHECKING +from typing import Any, TYPE_CHECKING from azure.core.configuration import Configuration from azure.core.pipeline import policies @@ -16,8 +16,6 @@ if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports - from typing import Any - from azure.core.credentials import TokenCredential @@ -35,11 +33,10 @@ class NotificationHubsManagementClientConfiguration(Configuration): def __init__( self, - credential, # type: "TokenCredential" - subscription_id, # type: str - **kwargs # type: Any - ): - # type: (...) -> None + credential: "TokenCredential", + subscription_id: str, + **kwargs: Any + ) -> None: super(NotificationHubsManagementClientConfiguration, self).__init__(**kwargs) if credential is None: raise ValueError("Parameter 'credential' must not be None.") 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 92daea8924d27..30c3670129aab 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 @@ -7,8 +7,9 @@ # -------------------------------------------------------------------------- from copy import deepcopy -from typing import TYPE_CHECKING +from typing import Any, Optional, TYPE_CHECKING +from azure.core.rest import HttpRequest, HttpResponse from azure.mgmt.core import ARMPipelineClient from msrest import Deserializer, Serializer @@ -18,12 +19,9 @@ if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports - from typing import Any, Optional - from azure.core.credentials import TokenCredential - from azure.core.rest import HttpRequest, HttpResponse -class NotificationHubsManagementClient(object): +class NotificationHubsManagementClient: """Azure NotificationHub client. :ivar operations: Operations operations @@ -45,12 +43,11 @@ class NotificationHubsManagementClient(object): def __init__( self, - credential, # type: "TokenCredential" - subscription_id, # type: str - base_url="https://management.azure.com", # type: str - **kwargs # type: Any - ): - # type: (...) -> None + credential: "TokenCredential", + subscription_id: str, + base_url: str = "https://management.azure.com", + **kwargs: Any + ) -> None: self._config = NotificationHubsManagementClientConfiguration(credential=credential, subscription_id=subscription_id, **kwargs) self._client = ARMPipelineClient(base_url=base_url, config=self._config, **kwargs) @@ -66,9 +63,8 @@ def __init__( def _send_request( self, request, # type: HttpRequest - **kwargs # type: Any - ): - # type: (...) -> HttpResponse + **kwargs: Any + ) -> HttpResponse: """Runs the network request through the client's chained policies. >>> from azure.core.rest import HttpRequest 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 142a0420b39b4..364f3c906cf92 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 = "8.0.0" +VERSION = "7.0.0" diff --git a/sdk/notificationhubs/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/__init__.py b/sdk/notificationhubs/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/__init__.py index d155115bca693..e52a2ae59d78a 100644 --- a/sdk/notificationhubs/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/__init__.py +++ b/sdk/notificationhubs/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/__init__.py @@ -6,70 +6,38 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -try: - from ._models_py3 import AdmCredential - from ._models_py3 import ApnsCredential - from ._models_py3 import BaiduCredential - from ._models_py3 import CheckAvailabilityParameters - from ._models_py3 import CheckAvailabilityResult - from ._models_py3 import DebugSendResponse - from ._models_py3 import ErrorResponse - from ._models_py3 import GcmCredential - from ._models_py3 import MpnsCredential - from ._models_py3 import NamespaceCreateOrUpdateParameters - from ._models_py3 import NamespaceListResult - from ._models_py3 import NamespacePatchParameters - from ._models_py3 import NamespaceResource - from ._models_py3 import NotificationHubCreateOrUpdateParameters - from ._models_py3 import NotificationHubListResult - from ._models_py3 import NotificationHubPatchParameters - from ._models_py3 import NotificationHubResource - from ._models_py3 import Operation - from ._models_py3 import OperationDisplay - from ._models_py3 import OperationListResult - from ._models_py3 import PnsCredentialsResource - from ._models_py3 import PolicykeyResource - from ._models_py3 import Resource - from ._models_py3 import ResourceListKeys - from ._models_py3 import SharedAccessAuthorizationRuleCreateOrUpdateParameters - from ._models_py3 import SharedAccessAuthorizationRuleListResult - from ._models_py3 import SharedAccessAuthorizationRuleProperties - from ._models_py3 import SharedAccessAuthorizationRuleResource - from ._models_py3 import Sku - from ._models_py3 import SubResource - from ._models_py3 import WnsCredential -except (SyntaxError, ImportError): - from ._models import AdmCredential # type: ignore - from ._models import ApnsCredential # type: ignore - from ._models import BaiduCredential # type: ignore - from ._models import CheckAvailabilityParameters # type: ignore - from ._models import CheckAvailabilityResult # type: ignore - from ._models import DebugSendResponse # type: ignore - from ._models import ErrorResponse # type: ignore - from ._models import GcmCredential # type: ignore - from ._models import MpnsCredential # type: ignore - from ._models import NamespaceCreateOrUpdateParameters # type: ignore - from ._models import NamespaceListResult # type: ignore - from ._models import NamespacePatchParameters # type: ignore - from ._models import NamespaceResource # type: ignore - from ._models import NotificationHubCreateOrUpdateParameters # type: ignore - from ._models import NotificationHubListResult # type: ignore - from ._models import NotificationHubPatchParameters # type: ignore - from ._models import NotificationHubResource # type: ignore - from ._models import Operation # type: ignore - from ._models import OperationDisplay # type: ignore - from ._models import OperationListResult # type: ignore - from ._models import PnsCredentialsResource # type: ignore - from ._models import PolicykeyResource # type: ignore - from ._models import Resource # type: ignore - from ._models import ResourceListKeys # type: ignore - from ._models import SharedAccessAuthorizationRuleCreateOrUpdateParameters # type: ignore - from ._models import SharedAccessAuthorizationRuleListResult # type: ignore - from ._models import SharedAccessAuthorizationRuleProperties # type: ignore - from ._models import SharedAccessAuthorizationRuleResource # type: ignore - from ._models import Sku # type: ignore - from ._models import SubResource # type: ignore - from ._models import WnsCredential # type: ignore +from ._models_py3 import AdmCredential +from ._models_py3 import ApnsCredential +from ._models_py3 import BaiduCredential +from ._models_py3 import CheckAvailabilityParameters +from ._models_py3 import CheckAvailabilityResult +from ._models_py3 import DebugSendResponse +from ._models_py3 import ErrorResponse +from ._models_py3 import GcmCredential +from ._models_py3 import MpnsCredential +from ._models_py3 import NamespaceCreateOrUpdateParameters +from ._models_py3 import NamespaceListResult +from ._models_py3 import NamespacePatchParameters +from ._models_py3 import NamespaceResource +from ._models_py3 import NotificationHubCreateOrUpdateParameters +from ._models_py3 import NotificationHubListResult +from ._models_py3 import NotificationHubPatchParameters +from ._models_py3 import NotificationHubResource +from ._models_py3 import Operation +from ._models_py3 import OperationDisplay +from ._models_py3 import OperationListResult +from ._models_py3 import PnsCredentialsResource +from ._models_py3 import PolicykeyResource +from ._models_py3 import Resource +from ._models_py3 import ResourceListKeys +from ._models_py3 import SharedAccessAuthorizationRuleCreateOrUpdateParameters +from ._models_py3 import SharedAccessAuthorizationRuleListResult +from ._models_py3 import SharedAccessAuthorizationRuleProperties +from ._models_py3 import SharedAccessAuthorizationRuleResource +from ._models_py3 import Sku +from ._models_py3 import SubResource +from ._models_py3 import WnsCredential + from ._notification_hubs_management_client_enums import ( AccessRights, 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 deleted file mode 100644 index 2250dc92cff5d..0000000000000 --- a/sdk/notificationhubs/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/_models.py +++ /dev/null @@ -1,1799 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.core.exceptions import HttpResponseError -import msrest.serialization - - -class AdmCredential(msrest.serialization.Model): - """Description of a NotificationHub AdmCredential. - - :ivar client_id: The client identifier. - :vartype client_id: str - :ivar client_secret: The credential secret access key. - :vartype client_secret: str - :ivar auth_token_url: The URL of the authorization token. - :vartype auth_token_url: str - """ - - _attribute_map = { - 'client_id': {'key': 'properties.clientId', 'type': 'str'}, - 'client_secret': {'key': 'properties.clientSecret', 'type': 'str'}, - 'auth_token_url': {'key': 'properties.authTokenUrl', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword client_id: The client identifier. - :paramtype client_id: str - :keyword client_secret: The credential secret access key. - :paramtype client_secret: str - :keyword auth_token_url: The URL of the authorization token. - :paramtype auth_token_url: str - """ - super(AdmCredential, self).__init__(**kwargs) - self.client_id = kwargs.get('client_id', None) - self.client_secret = kwargs.get('client_secret', None) - self.auth_token_url = kwargs.get('auth_token_url', None) - - -class ApnsCredential(msrest.serialization.Model): - """Description of a NotificationHub ApnsCredential. - - :ivar apns_certificate: The APNS certificate. Specify if using Certificate Authentication Mode. - :vartype apns_certificate: str - :ivar certificate_key: The APNS certificate password if it exists. - :vartype certificate_key: str - :ivar endpoint: The APNS endpoint of this credential. If using Certificate Authentication Mode - and Sandbox specify 'gateway.sandbox.push.apple.com'. If using Certificate Authentication Mode - and Production specify 'gateway.push.apple.com'. If using Token Authentication Mode and Sandbox - specify 'https://api.development.push.apple.com:443/3/device'. If using Token Authentication - Mode and Production specify 'https://api.push.apple.com:443/3/device'. - :vartype endpoint: str - :ivar thumbprint: The APNS certificate thumbprint. Specify if using Certificate Authentication - Mode. - :vartype thumbprint: str - :ivar key_id: A 10-character key identifier (kid) key, obtained from your developer account. - Specify if using Token Authentication Mode. - :vartype key_id: str - :ivar app_name: The name of the application or BundleId. Specify if using Token Authentication - Mode. - :vartype app_name: str - :ivar app_id: The issuer (iss) registered claim key. The value is a 10-character TeamId, - obtained from your developer account. Specify if using Token Authentication Mode. - :vartype app_id: str - :ivar token: Provider Authentication Token, obtained through your developer account. Specify if - using Token Authentication Mode. - :vartype token: str - """ - - _attribute_map = { - 'apns_certificate': {'key': 'properties.apnsCertificate', 'type': 'str'}, - 'certificate_key': {'key': 'properties.certificateKey', 'type': 'str'}, - 'endpoint': {'key': 'properties.endpoint', 'type': 'str'}, - 'thumbprint': {'key': 'properties.thumbprint', 'type': 'str'}, - 'key_id': {'key': 'properties.keyId', 'type': 'str'}, - 'app_name': {'key': 'properties.appName', 'type': 'str'}, - 'app_id': {'key': 'properties.appId', 'type': 'str'}, - 'token': {'key': 'properties.token', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword apns_certificate: The APNS certificate. Specify if using Certificate Authentication - Mode. - :paramtype apns_certificate: str - :keyword certificate_key: The APNS certificate password if it exists. - :paramtype certificate_key: str - :keyword endpoint: The APNS endpoint of this credential. If using Certificate Authentication - Mode and Sandbox specify 'gateway.sandbox.push.apple.com'. If using Certificate Authentication - Mode and Production specify 'gateway.push.apple.com'. If using Token Authentication Mode and - Sandbox specify 'https://api.development.push.apple.com:443/3/device'. If using Token - Authentication Mode and Production specify 'https://api.push.apple.com:443/3/device'. - :paramtype endpoint: str - :keyword thumbprint: The APNS certificate thumbprint. Specify if using Certificate - Authentication Mode. - :paramtype thumbprint: str - :keyword key_id: A 10-character key identifier (kid) key, obtained from your developer account. - Specify if using Token Authentication Mode. - :paramtype key_id: str - :keyword app_name: The name of the application or BundleId. Specify if using Token - Authentication Mode. - :paramtype app_name: str - :keyword app_id: The issuer (iss) registered claim key. The value is a 10-character TeamId, - obtained from your developer account. Specify if using Token Authentication Mode. - :paramtype app_id: str - :keyword token: Provider Authentication Token, obtained through your developer account. Specify - if using Token Authentication Mode. - :paramtype token: str - """ - super(ApnsCredential, self).__init__(**kwargs) - self.apns_certificate = kwargs.get('apns_certificate', None) - self.certificate_key = kwargs.get('certificate_key', None) - self.endpoint = kwargs.get('endpoint', None) - self.thumbprint = kwargs.get('thumbprint', None) - self.key_id = kwargs.get('key_id', None) - self.app_name = kwargs.get('app_name', None) - self.app_id = kwargs.get('app_id', None) - self.token = kwargs.get('token', None) - - -class BaiduCredential(msrest.serialization.Model): - """Description of a NotificationHub BaiduCredential. - - :ivar baidu_api_key: Baidu Api Key. - :vartype baidu_api_key: str - :ivar baidu_end_point: Baidu Endpoint. - :vartype baidu_end_point: str - :ivar baidu_secret_key: Baidu Secret Key. - :vartype baidu_secret_key: str - """ - - _attribute_map = { - 'baidu_api_key': {'key': 'properties.baiduApiKey', 'type': 'str'}, - 'baidu_end_point': {'key': 'properties.baiduEndPoint', 'type': 'str'}, - 'baidu_secret_key': {'key': 'properties.baiduSecretKey', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword baidu_api_key: Baidu Api Key. - :paramtype baidu_api_key: str - :keyword baidu_end_point: Baidu Endpoint. - :paramtype baidu_end_point: str - :keyword baidu_secret_key: Baidu Secret Key. - :paramtype baidu_secret_key: str - """ - super(BaiduCredential, self).__init__(**kwargs) - self.baidu_api_key = kwargs.get('baidu_api_key', None) - self.baidu_end_point = kwargs.get('baidu_end_point', None) - self.baidu_secret_key = kwargs.get('baidu_secret_key', None) - - -class CheckAvailabilityParameters(msrest.serialization.Model): - """Parameters supplied to the Check Name Availability for Namespace and NotificationHubs. - - Variables are only populated by the server, and will be ignored when sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id. - :vartype id: str - :ivar name: Required. Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar location: Resource location. - :vartype location: str - :ivar tags: A set of tags. Resource tags. - :vartype tags: dict[str, str] - :ivar sku: The sku of the created namespace. - :vartype sku: ~azure.mgmt.notificationhubs.models.Sku - :ivar is_availiable: True if the name is available and can be used to create new - Namespace/NotificationHub. Otherwise false. - :vartype is_availiable: bool - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'required': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'sku': {'key': 'sku', 'type': 'Sku'}, - 'is_availiable': {'key': 'isAvailiable', 'type': 'bool'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword name: Required. Resource name. - :paramtype name: str - :keyword location: Resource location. - :paramtype location: str - :keyword tags: A set of tags. Resource tags. - :paramtype tags: dict[str, str] - :keyword sku: The sku of the created namespace. - :paramtype sku: ~azure.mgmt.notificationhubs.models.Sku - :keyword is_availiable: True if the name is available and can be used to create new - Namespace/NotificationHub. Otherwise false. - :paramtype is_availiable: bool - """ - super(CheckAvailabilityParameters, self).__init__(**kwargs) - self.id = None - self.name = kwargs['name'] - self.type = None - self.location = kwargs.get('location', None) - self.tags = kwargs.get('tags', None) - self.sku = kwargs.get('sku', None) - self.is_availiable = kwargs.get('is_availiable', None) - - -class Resource(msrest.serialization.Model): - """Resource. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar id: Resource Id. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar location: Resource location. - :vartype location: str - :ivar tags: A set of tags. Resource tags. - :vartype tags: dict[str, str] - :ivar sku: The sku of the created namespace. - :vartype sku: ~azure.mgmt.notificationhubs.models.Sku - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'sku': {'key': 'sku', 'type': 'Sku'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword location: Resource location. - :paramtype location: str - :keyword tags: A set of tags. Resource tags. - :paramtype tags: dict[str, str] - :keyword sku: The sku of the created namespace. - :paramtype sku: ~azure.mgmt.notificationhubs.models.Sku - """ - super(Resource, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.location = kwargs.get('location', None) - self.tags = kwargs.get('tags', None) - self.sku = kwargs.get('sku', None) - - -class CheckAvailabilityResult(Resource): - """Description of a CheckAvailability resource. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar id: Resource Id. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar location: Resource location. - :vartype location: str - :ivar tags: A set of tags. Resource tags. - :vartype tags: dict[str, str] - :ivar sku: The sku of the created namespace. - :vartype sku: ~azure.mgmt.notificationhubs.models.Sku - :ivar is_availiable: True if the name is available and can be used to create new - Namespace/NotificationHub. Otherwise false. - :vartype is_availiable: bool - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'sku': {'key': 'sku', 'type': 'Sku'}, - 'is_availiable': {'key': 'isAvailiable', 'type': 'bool'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword location: Resource location. - :paramtype location: str - :keyword tags: A set of tags. Resource tags. - :paramtype tags: dict[str, str] - :keyword sku: The sku of the created namespace. - :paramtype sku: ~azure.mgmt.notificationhubs.models.Sku - :keyword is_availiable: True if the name is available and can be used to create new - Namespace/NotificationHub. Otherwise false. - :paramtype is_availiable: bool - """ - super(CheckAvailabilityResult, self).__init__(**kwargs) - self.is_availiable = kwargs.get('is_availiable', None) - - -class DebugSendResponse(Resource): - """Description of a NotificationHub Resource. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar id: Resource Id. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar location: Resource location. - :vartype location: str - :ivar tags: A set of tags. Resource tags. - :vartype tags: dict[str, str] - :ivar sku: The sku of the created namespace. - :vartype sku: ~azure.mgmt.notificationhubs.models.Sku - :ivar success: successful send. - :vartype success: float - :ivar failure: send failure. - :vartype failure: float - :ivar results: actual failure description. - :vartype results: any - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'sku': {'key': 'sku', 'type': 'Sku'}, - 'success': {'key': 'properties.success', 'type': 'float'}, - 'failure': {'key': 'properties.failure', 'type': 'float'}, - 'results': {'key': 'properties.results', 'type': 'object'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword location: Resource location. - :paramtype location: str - :keyword tags: A set of tags. Resource tags. - :paramtype tags: dict[str, str] - :keyword sku: The sku of the created namespace. - :paramtype sku: ~azure.mgmt.notificationhubs.models.Sku - :keyword success: successful send. - :paramtype success: float - :keyword failure: send failure. - :paramtype failure: float - :keyword results: actual failure description. - :paramtype results: any - """ - super(DebugSendResponse, self).__init__(**kwargs) - self.success = kwargs.get('success', None) - self.failure = kwargs.get('failure', None) - self.results = kwargs.get('results', None) - - -class ErrorResponse(msrest.serialization.Model): - """Error response indicates NotificationHubs service is not able to process the incoming request. The reason is provided in the error message. - - :ivar code: Error code. - :vartype code: str - :ivar message: Error message indicating why the operation failed. - :vartype message: str - """ - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword code: Error code. - :paramtype code: str - :keyword message: Error message indicating why the operation failed. - :paramtype message: str - """ - super(ErrorResponse, self).__init__(**kwargs) - self.code = kwargs.get('code', None) - self.message = kwargs.get('message', None) - - -class GcmCredential(msrest.serialization.Model): - """Description of a NotificationHub GcmCredential. - - :ivar gcm_endpoint: The FCM legacy endpoint. Default value is - 'https://fcm.googleapis.com/fcm/send'. - :vartype gcm_endpoint: str - :ivar google_api_key: The Google API key. - :vartype google_api_key: str - """ - - _attribute_map = { - 'gcm_endpoint': {'key': 'properties.gcmEndpoint', 'type': 'str'}, - 'google_api_key': {'key': 'properties.googleApiKey', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword gcm_endpoint: The FCM legacy endpoint. Default value is - 'https://fcm.googleapis.com/fcm/send'. - :paramtype gcm_endpoint: str - :keyword google_api_key: The Google API key. - :paramtype google_api_key: str - """ - super(GcmCredential, self).__init__(**kwargs) - self.gcm_endpoint = kwargs.get('gcm_endpoint', None) - self.google_api_key = kwargs.get('google_api_key', None) - - -class MpnsCredential(msrest.serialization.Model): - """Description of a NotificationHub MpnsCredential. - - :ivar mpns_certificate: The MPNS certificate. - :vartype mpns_certificate: str - :ivar certificate_key: The certificate key for this credential. - :vartype certificate_key: str - :ivar thumbprint: The MPNS certificate Thumbprint. - :vartype thumbprint: str - """ - - _attribute_map = { - 'mpns_certificate': {'key': 'properties.mpnsCertificate', 'type': 'str'}, - 'certificate_key': {'key': 'properties.certificateKey', 'type': 'str'}, - 'thumbprint': {'key': 'properties.thumbprint', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword mpns_certificate: The MPNS certificate. - :paramtype mpns_certificate: str - :keyword certificate_key: The certificate key for this credential. - :paramtype certificate_key: str - :keyword thumbprint: The MPNS certificate Thumbprint. - :paramtype thumbprint: str - """ - super(MpnsCredential, self).__init__(**kwargs) - self.mpns_certificate = kwargs.get('mpns_certificate', None) - self.certificate_key = kwargs.get('certificate_key', None) - self.thumbprint = kwargs.get('thumbprint', None) - - -class NamespaceCreateOrUpdateParameters(Resource): - """Parameters supplied to the CreateOrUpdate Namespace operation. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar id: Resource Id. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar location: Resource location. - :vartype location: str - :ivar tags: A set of tags. Resource tags. - :vartype tags: dict[str, str] - :ivar sku: The sku of the created namespace. - :vartype sku: ~azure.mgmt.notificationhubs.models.Sku - :ivar name_properties_name: The name of the namespace. - :vartype name_properties_name: str - :ivar provisioning_state: Provisioning state of the Namespace. - :vartype provisioning_state: str - :ivar region: Specifies the targeted region in which the namespace should be created. It can be - any of the following values: Australia East, Australia Southeast, Central US, East US, East US - 2, West US, North Central US, South Central US, East Asia, Southeast Asia, Brazil South, Japan - East, Japan West, North Europe, West Europe. - :vartype region: str - :ivar metric_id: Identifier for Azure Insights metrics. - :vartype metric_id: str - :ivar status: Status of the namespace. It can be any of these values:1 = Created/Active2 = - Creating3 = Suspended4 = Deleting. - :vartype status: str - :ivar created_at: The time the namespace was created. - :vartype created_at: ~datetime.datetime - :ivar updated_at: The time the namespace was updated. - :vartype updated_at: ~datetime.datetime - :ivar service_bus_endpoint: Endpoint you can use to perform NotificationHub operations. - :vartype service_bus_endpoint: str - :ivar subscription_id: The Id of the Azure subscription associated with the namespace. - :vartype subscription_id: str - :ivar scale_unit: ScaleUnit where the namespace gets created. - :vartype scale_unit: str - :ivar enabled: Whether or not the namespace is currently enabled. - :vartype enabled: bool - :ivar critical: Whether or not the namespace is set as Critical. - :vartype critical: bool - :ivar data_center: Data center for the namespace. - :vartype data_center: str - :ivar namespace_type: The namespace type. Possible values include: "Messaging", - "NotificationHub". - :vartype namespace_type: str or ~azure.mgmt.notificationhubs.models.NamespaceType - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'metric_id': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'sku': {'key': 'sku', 'type': 'Sku'}, - 'name_properties_name': {'key': 'properties.name', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'region': {'key': 'properties.region', 'type': 'str'}, - 'metric_id': {'key': 'properties.metricId', 'type': 'str'}, - 'status': {'key': 'properties.status', 'type': 'str'}, - 'created_at': {'key': 'properties.createdAt', 'type': 'iso-8601'}, - 'updated_at': {'key': 'properties.updatedAt', 'type': 'iso-8601'}, - 'service_bus_endpoint': {'key': 'properties.serviceBusEndpoint', 'type': 'str'}, - 'subscription_id': {'key': 'properties.subscriptionId', 'type': 'str'}, - 'scale_unit': {'key': 'properties.scaleUnit', 'type': 'str'}, - 'enabled': {'key': 'properties.enabled', 'type': 'bool'}, - 'critical': {'key': 'properties.critical', 'type': 'bool'}, - 'data_center': {'key': 'properties.dataCenter', 'type': 'str'}, - 'namespace_type': {'key': 'properties.namespaceType', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword location: Resource location. - :paramtype location: str - :keyword tags: A set of tags. Resource tags. - :paramtype tags: dict[str, str] - :keyword sku: The sku of the created namespace. - :paramtype sku: ~azure.mgmt.notificationhubs.models.Sku - :keyword name_properties_name: The name of the namespace. - :paramtype name_properties_name: str - :keyword provisioning_state: Provisioning state of the Namespace. - :paramtype provisioning_state: str - :keyword region: Specifies the targeted region in which the namespace should be created. It can - be any of the following values: Australia East, Australia Southeast, Central US, East US, East - US 2, West US, North Central US, South Central US, East Asia, Southeast Asia, Brazil South, - Japan East, Japan West, North Europe, West Europe. - :paramtype region: str - :keyword status: Status of the namespace. It can be any of these values:1 = Created/Active2 = - Creating3 = Suspended4 = Deleting. - :paramtype status: str - :keyword created_at: The time the namespace was created. - :paramtype created_at: ~datetime.datetime - :keyword updated_at: The time the namespace was updated. - :paramtype updated_at: ~datetime.datetime - :keyword service_bus_endpoint: Endpoint you can use to perform NotificationHub operations. - :paramtype service_bus_endpoint: str - :keyword subscription_id: The Id of the Azure subscription associated with the namespace. - :paramtype subscription_id: str - :keyword scale_unit: ScaleUnit where the namespace gets created. - :paramtype scale_unit: str - :keyword enabled: Whether or not the namespace is currently enabled. - :paramtype enabled: bool - :keyword critical: Whether or not the namespace is set as Critical. - :paramtype critical: bool - :keyword data_center: Data center for the namespace. - :paramtype data_center: str - :keyword namespace_type: The namespace type. Possible values include: "Messaging", - "NotificationHub". - :paramtype namespace_type: str or ~azure.mgmt.notificationhubs.models.NamespaceType - """ - super(NamespaceCreateOrUpdateParameters, self).__init__(**kwargs) - self.name_properties_name = kwargs.get('name_properties_name', None) - self.provisioning_state = kwargs.get('provisioning_state', None) - self.region = kwargs.get('region', None) - self.metric_id = None - self.status = kwargs.get('status', None) - self.created_at = kwargs.get('created_at', None) - self.updated_at = kwargs.get('updated_at', None) - self.service_bus_endpoint = kwargs.get('service_bus_endpoint', None) - self.subscription_id = kwargs.get('subscription_id', None) - self.scale_unit = kwargs.get('scale_unit', None) - self.enabled = kwargs.get('enabled', None) - self.critical = kwargs.get('critical', None) - self.data_center = kwargs.get('data_center', None) - self.namespace_type = kwargs.get('namespace_type', None) - - -class NamespaceListResult(msrest.serialization.Model): - """The response of the List Namespace operation. - - :ivar value: Result of the List Namespace operation. - :vartype value: list[~azure.mgmt.notificationhubs.models.NamespaceResource] - :ivar next_link: Link to the next set of results. Not empty if Value contains incomplete list - of Namespaces. - :vartype next_link: str - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[NamespaceResource]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword value: Result of the List Namespace operation. - :paramtype value: list[~azure.mgmt.notificationhubs.models.NamespaceResource] - :keyword next_link: Link to the next set of results. Not empty if Value contains incomplete - list of Namespaces. - :paramtype next_link: str - """ - super(NamespaceListResult, self).__init__(**kwargs) - self.value = kwargs.get('value', None) - self.next_link = kwargs.get('next_link', None) - - -class NamespacePatchParameters(msrest.serialization.Model): - """Parameters supplied to the Patch Namespace operation. - - :ivar tags: A set of tags. Resource tags. - :vartype tags: dict[str, str] - :ivar sku: The sku of the created namespace. - :vartype sku: ~azure.mgmt.notificationhubs.models.Sku - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - 'sku': {'key': 'sku', 'type': 'Sku'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword tags: A set of tags. Resource tags. - :paramtype tags: dict[str, str] - :keyword sku: The sku of the created namespace. - :paramtype sku: ~azure.mgmt.notificationhubs.models.Sku - """ - super(NamespacePatchParameters, self).__init__(**kwargs) - self.tags = kwargs.get('tags', None) - self.sku = kwargs.get('sku', None) - - -class NamespaceResource(Resource): - """Description of a Namespace resource. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar id: Resource Id. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar location: Resource location. - :vartype location: str - :ivar tags: A set of tags. Resource tags. - :vartype tags: dict[str, str] - :ivar sku: The sku of the created namespace. - :vartype sku: ~azure.mgmt.notificationhubs.models.Sku - :ivar name_properties_name: The name of the namespace. - :vartype name_properties_name: str - :ivar provisioning_state: Provisioning state of the Namespace. - :vartype provisioning_state: str - :ivar region: Specifies the targeted region in which the namespace should be created. It can be - any of the following values: Australia East, Australia Southeast, Central US, East US, East US - 2, West US, North Central US, South Central US, East Asia, Southeast Asia, Brazil South, Japan - East, Japan West, North Europe, West Europe. - :vartype region: str - :ivar metric_id: Identifier for Azure Insights metrics. - :vartype metric_id: str - :ivar status: Status of the namespace. It can be any of these values:1 = Created/Active2 = - Creating3 = Suspended4 = Deleting. - :vartype status: str - :ivar created_at: The time the namespace was created. - :vartype created_at: ~datetime.datetime - :ivar updated_at: The time the namespace was updated. - :vartype updated_at: ~datetime.datetime - :ivar service_bus_endpoint: Endpoint you can use to perform NotificationHub operations. - :vartype service_bus_endpoint: str - :ivar subscription_id: The Id of the Azure subscription associated with the namespace. - :vartype subscription_id: str - :ivar scale_unit: ScaleUnit where the namespace gets created. - :vartype scale_unit: str - :ivar enabled: Whether or not the namespace is currently enabled. - :vartype enabled: bool - :ivar critical: Whether or not the namespace is set as Critical. - :vartype critical: bool - :ivar data_center: Data center for the namespace. - :vartype data_center: str - :ivar namespace_type: The namespace type. Possible values include: "Messaging", - "NotificationHub". - :vartype namespace_type: str or ~azure.mgmt.notificationhubs.models.NamespaceType - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'metric_id': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'sku': {'key': 'sku', 'type': 'Sku'}, - 'name_properties_name': {'key': 'properties.name', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'region': {'key': 'properties.region', 'type': 'str'}, - 'metric_id': {'key': 'properties.metricId', 'type': 'str'}, - 'status': {'key': 'properties.status', 'type': 'str'}, - 'created_at': {'key': 'properties.createdAt', 'type': 'iso-8601'}, - 'updated_at': {'key': 'properties.updatedAt', 'type': 'iso-8601'}, - 'service_bus_endpoint': {'key': 'properties.serviceBusEndpoint', 'type': 'str'}, - 'subscription_id': {'key': 'properties.subscriptionId', 'type': 'str'}, - 'scale_unit': {'key': 'properties.scaleUnit', 'type': 'str'}, - 'enabled': {'key': 'properties.enabled', 'type': 'bool'}, - 'critical': {'key': 'properties.critical', 'type': 'bool'}, - 'data_center': {'key': 'properties.dataCenter', 'type': 'str'}, - 'namespace_type': {'key': 'properties.namespaceType', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword location: Resource location. - :paramtype location: str - :keyword tags: A set of tags. Resource tags. - :paramtype tags: dict[str, str] - :keyword sku: The sku of the created namespace. - :paramtype sku: ~azure.mgmt.notificationhubs.models.Sku - :keyword name_properties_name: The name of the namespace. - :paramtype name_properties_name: str - :keyword provisioning_state: Provisioning state of the Namespace. - :paramtype provisioning_state: str - :keyword region: Specifies the targeted region in which the namespace should be created. It can - be any of the following values: Australia East, Australia Southeast, Central US, East US, East - US 2, West US, North Central US, South Central US, East Asia, Southeast Asia, Brazil South, - Japan East, Japan West, North Europe, West Europe. - :paramtype region: str - :keyword status: Status of the namespace. It can be any of these values:1 = Created/Active2 = - Creating3 = Suspended4 = Deleting. - :paramtype status: str - :keyword created_at: The time the namespace was created. - :paramtype created_at: ~datetime.datetime - :keyword updated_at: The time the namespace was updated. - :paramtype updated_at: ~datetime.datetime - :keyword service_bus_endpoint: Endpoint you can use to perform NotificationHub operations. - :paramtype service_bus_endpoint: str - :keyword subscription_id: The Id of the Azure subscription associated with the namespace. - :paramtype subscription_id: str - :keyword scale_unit: ScaleUnit where the namespace gets created. - :paramtype scale_unit: str - :keyword enabled: Whether or not the namespace is currently enabled. - :paramtype enabled: bool - :keyword critical: Whether or not the namespace is set as Critical. - :paramtype critical: bool - :keyword data_center: Data center for the namespace. - :paramtype data_center: str - :keyword namespace_type: The namespace type. Possible values include: "Messaging", - "NotificationHub". - :paramtype namespace_type: str or ~azure.mgmt.notificationhubs.models.NamespaceType - """ - super(NamespaceResource, self).__init__(**kwargs) - self.name_properties_name = kwargs.get('name_properties_name', None) - self.provisioning_state = kwargs.get('provisioning_state', None) - self.region = kwargs.get('region', None) - self.metric_id = None - self.status = kwargs.get('status', None) - self.created_at = kwargs.get('created_at', None) - self.updated_at = kwargs.get('updated_at', None) - self.service_bus_endpoint = kwargs.get('service_bus_endpoint', None) - self.subscription_id = kwargs.get('subscription_id', None) - self.scale_unit = kwargs.get('scale_unit', None) - self.enabled = kwargs.get('enabled', None) - self.critical = kwargs.get('critical', None) - self.data_center = kwargs.get('data_center', None) - self.namespace_type = kwargs.get('namespace_type', None) - - -class NotificationHubCreateOrUpdateParameters(Resource): - """Parameters supplied to the CreateOrUpdate NotificationHub operation. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar id: Resource Id. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar location: Resource location. - :vartype location: str - :ivar tags: A set of tags. Resource tags. - :vartype tags: dict[str, str] - :ivar sku: The sku of the created namespace. - :vartype sku: ~azure.mgmt.notificationhubs.models.Sku - :ivar name_properties_name: The NotificationHub name. - :vartype name_properties_name: str - :ivar registration_ttl: The RegistrationTtl of the created NotificationHub. - :vartype registration_ttl: str - :ivar authorization_rules: The AuthorizationRules of the created NotificationHub. - :vartype authorization_rules: - list[~azure.mgmt.notificationhubs.models.SharedAccessAuthorizationRuleProperties] - :ivar apns_credential: The ApnsCredential of the created NotificationHub. - :vartype apns_credential: ~azure.mgmt.notificationhubs.models.ApnsCredential - :ivar wns_credential: The WnsCredential of the created NotificationHub. - :vartype wns_credential: ~azure.mgmt.notificationhubs.models.WnsCredential - :ivar gcm_credential: The GcmCredential of the created NotificationHub. - :vartype gcm_credential: ~azure.mgmt.notificationhubs.models.GcmCredential - :ivar mpns_credential: The MpnsCredential of the created NotificationHub. - :vartype mpns_credential: ~azure.mgmt.notificationhubs.models.MpnsCredential - :ivar adm_credential: The AdmCredential of the created NotificationHub. - :vartype adm_credential: ~azure.mgmt.notificationhubs.models.AdmCredential - :ivar baidu_credential: The BaiduCredential of the created NotificationHub. - :vartype baidu_credential: ~azure.mgmt.notificationhubs.models.BaiduCredential - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'sku': {'key': 'sku', 'type': 'Sku'}, - 'name_properties_name': {'key': 'properties.name', 'type': 'str'}, - 'registration_ttl': {'key': 'properties.registrationTtl', 'type': 'str'}, - 'authorization_rules': {'key': 'properties.authorizationRules', 'type': '[SharedAccessAuthorizationRuleProperties]'}, - 'apns_credential': {'key': 'properties.apnsCredential', 'type': 'ApnsCredential'}, - 'wns_credential': {'key': 'properties.wnsCredential', 'type': 'WnsCredential'}, - 'gcm_credential': {'key': 'properties.gcmCredential', 'type': 'GcmCredential'}, - 'mpns_credential': {'key': 'properties.mpnsCredential', 'type': 'MpnsCredential'}, - 'adm_credential': {'key': 'properties.admCredential', 'type': 'AdmCredential'}, - 'baidu_credential': {'key': 'properties.baiduCredential', 'type': 'BaiduCredential'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword location: Resource location. - :paramtype location: str - :keyword tags: A set of tags. Resource tags. - :paramtype tags: dict[str, str] - :keyword sku: The sku of the created namespace. - :paramtype sku: ~azure.mgmt.notificationhubs.models.Sku - :keyword name_properties_name: The NotificationHub name. - :paramtype name_properties_name: str - :keyword registration_ttl: The RegistrationTtl of the created NotificationHub. - :paramtype registration_ttl: str - :keyword authorization_rules: The AuthorizationRules of the created NotificationHub. - :paramtype authorization_rules: - list[~azure.mgmt.notificationhubs.models.SharedAccessAuthorizationRuleProperties] - :keyword apns_credential: The ApnsCredential of the created NotificationHub. - :paramtype apns_credential: ~azure.mgmt.notificationhubs.models.ApnsCredential - :keyword wns_credential: The WnsCredential of the created NotificationHub. - :paramtype wns_credential: ~azure.mgmt.notificationhubs.models.WnsCredential - :keyword gcm_credential: The GcmCredential of the created NotificationHub. - :paramtype gcm_credential: ~azure.mgmt.notificationhubs.models.GcmCredential - :keyword mpns_credential: The MpnsCredential of the created NotificationHub. - :paramtype mpns_credential: ~azure.mgmt.notificationhubs.models.MpnsCredential - :keyword adm_credential: The AdmCredential of the created NotificationHub. - :paramtype adm_credential: ~azure.mgmt.notificationhubs.models.AdmCredential - :keyword baidu_credential: The BaiduCredential of the created NotificationHub. - :paramtype baidu_credential: ~azure.mgmt.notificationhubs.models.BaiduCredential - """ - super(NotificationHubCreateOrUpdateParameters, self).__init__(**kwargs) - self.name_properties_name = kwargs.get('name_properties_name', None) - self.registration_ttl = kwargs.get('registration_ttl', None) - self.authorization_rules = kwargs.get('authorization_rules', None) - self.apns_credential = kwargs.get('apns_credential', None) - self.wns_credential = kwargs.get('wns_credential', None) - self.gcm_credential = kwargs.get('gcm_credential', None) - self.mpns_credential = kwargs.get('mpns_credential', None) - self.adm_credential = kwargs.get('adm_credential', None) - self.baidu_credential = kwargs.get('baidu_credential', None) - - -class NotificationHubListResult(msrest.serialization.Model): - """The response of the List NotificationHub operation. - - :ivar value: Result of the List NotificationHub operation. - :vartype value: list[~azure.mgmt.notificationhubs.models.NotificationHubResource] - :ivar next_link: Link to the next set of results. Not empty if Value contains incomplete list - of NotificationHub. - :vartype next_link: str - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[NotificationHubResource]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword value: Result of the List NotificationHub operation. - :paramtype value: list[~azure.mgmt.notificationhubs.models.NotificationHubResource] - :keyword next_link: Link to the next set of results. Not empty if Value contains incomplete - list of NotificationHub. - :paramtype next_link: str - """ - super(NotificationHubListResult, self).__init__(**kwargs) - self.value = kwargs.get('value', None) - self.next_link = kwargs.get('next_link', None) - - -class NotificationHubPatchParameters(Resource): - """Parameters supplied to the patch NotificationHub operation. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar id: Resource Id. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar location: Resource location. - :vartype location: str - :ivar tags: A set of tags. Resource tags. - :vartype tags: dict[str, str] - :ivar sku: The sku of the created namespace. - :vartype sku: ~azure.mgmt.notificationhubs.models.Sku - :ivar name_properties_name: The NotificationHub name. - :vartype name_properties_name: str - :ivar registration_ttl: The RegistrationTtl of the created NotificationHub. - :vartype registration_ttl: str - :ivar authorization_rules: The AuthorizationRules of the created NotificationHub. - :vartype authorization_rules: - list[~azure.mgmt.notificationhubs.models.SharedAccessAuthorizationRuleProperties] - :ivar apns_credential: The ApnsCredential of the created NotificationHub. - :vartype apns_credential: ~azure.mgmt.notificationhubs.models.ApnsCredential - :ivar wns_credential: The WnsCredential of the created NotificationHub. - :vartype wns_credential: ~azure.mgmt.notificationhubs.models.WnsCredential - :ivar gcm_credential: The GcmCredential of the created NotificationHub. - :vartype gcm_credential: ~azure.mgmt.notificationhubs.models.GcmCredential - :ivar mpns_credential: The MpnsCredential of the created NotificationHub. - :vartype mpns_credential: ~azure.mgmt.notificationhubs.models.MpnsCredential - :ivar adm_credential: The AdmCredential of the created NotificationHub. - :vartype adm_credential: ~azure.mgmt.notificationhubs.models.AdmCredential - :ivar baidu_credential: The BaiduCredential of the created NotificationHub. - :vartype baidu_credential: ~azure.mgmt.notificationhubs.models.BaiduCredential - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'sku': {'key': 'sku', 'type': 'Sku'}, - 'name_properties_name': {'key': 'properties.name', 'type': 'str'}, - 'registration_ttl': {'key': 'properties.registrationTtl', 'type': 'str'}, - 'authorization_rules': {'key': 'properties.authorizationRules', 'type': '[SharedAccessAuthorizationRuleProperties]'}, - 'apns_credential': {'key': 'properties.apnsCredential', 'type': 'ApnsCredential'}, - 'wns_credential': {'key': 'properties.wnsCredential', 'type': 'WnsCredential'}, - 'gcm_credential': {'key': 'properties.gcmCredential', 'type': 'GcmCredential'}, - 'mpns_credential': {'key': 'properties.mpnsCredential', 'type': 'MpnsCredential'}, - 'adm_credential': {'key': 'properties.admCredential', 'type': 'AdmCredential'}, - 'baidu_credential': {'key': 'properties.baiduCredential', 'type': 'BaiduCredential'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword location: Resource location. - :paramtype location: str - :keyword tags: A set of tags. Resource tags. - :paramtype tags: dict[str, str] - :keyword sku: The sku of the created namespace. - :paramtype sku: ~azure.mgmt.notificationhubs.models.Sku - :keyword name_properties_name: The NotificationHub name. - :paramtype name_properties_name: str - :keyword registration_ttl: The RegistrationTtl of the created NotificationHub. - :paramtype registration_ttl: str - :keyword authorization_rules: The AuthorizationRules of the created NotificationHub. - :paramtype authorization_rules: - list[~azure.mgmt.notificationhubs.models.SharedAccessAuthorizationRuleProperties] - :keyword apns_credential: The ApnsCredential of the created NotificationHub. - :paramtype apns_credential: ~azure.mgmt.notificationhubs.models.ApnsCredential - :keyword wns_credential: The WnsCredential of the created NotificationHub. - :paramtype wns_credential: ~azure.mgmt.notificationhubs.models.WnsCredential - :keyword gcm_credential: The GcmCredential of the created NotificationHub. - :paramtype gcm_credential: ~azure.mgmt.notificationhubs.models.GcmCredential - :keyword mpns_credential: The MpnsCredential of the created NotificationHub. - :paramtype mpns_credential: ~azure.mgmt.notificationhubs.models.MpnsCredential - :keyword adm_credential: The AdmCredential of the created NotificationHub. - :paramtype adm_credential: ~azure.mgmt.notificationhubs.models.AdmCredential - :keyword baidu_credential: The BaiduCredential of the created NotificationHub. - :paramtype baidu_credential: ~azure.mgmt.notificationhubs.models.BaiduCredential - """ - super(NotificationHubPatchParameters, self).__init__(**kwargs) - self.name_properties_name = kwargs.get('name_properties_name', None) - self.registration_ttl = kwargs.get('registration_ttl', None) - self.authorization_rules = kwargs.get('authorization_rules', None) - self.apns_credential = kwargs.get('apns_credential', None) - self.wns_credential = kwargs.get('wns_credential', None) - self.gcm_credential = kwargs.get('gcm_credential', None) - self.mpns_credential = kwargs.get('mpns_credential', None) - self.adm_credential = kwargs.get('adm_credential', None) - self.baidu_credential = kwargs.get('baidu_credential', None) - - -class NotificationHubResource(Resource): - """Description of a NotificationHub Resource. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar id: Resource Id. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar location: Resource location. - :vartype location: str - :ivar tags: A set of tags. Resource tags. - :vartype tags: dict[str, str] - :ivar sku: The sku of the created namespace. - :vartype sku: ~azure.mgmt.notificationhubs.models.Sku - :ivar name_properties_name: The NotificationHub name. - :vartype name_properties_name: str - :ivar registration_ttl: The RegistrationTtl of the created NotificationHub. - :vartype registration_ttl: str - :ivar authorization_rules: The AuthorizationRules of the created NotificationHub. - :vartype authorization_rules: - list[~azure.mgmt.notificationhubs.models.SharedAccessAuthorizationRuleProperties] - :ivar apns_credential: The ApnsCredential of the created NotificationHub. - :vartype apns_credential: ~azure.mgmt.notificationhubs.models.ApnsCredential - :ivar wns_credential: The WnsCredential of the created NotificationHub. - :vartype wns_credential: ~azure.mgmt.notificationhubs.models.WnsCredential - :ivar gcm_credential: The GcmCredential of the created NotificationHub. - :vartype gcm_credential: ~azure.mgmt.notificationhubs.models.GcmCredential - :ivar mpns_credential: The MpnsCredential of the created NotificationHub. - :vartype mpns_credential: ~azure.mgmt.notificationhubs.models.MpnsCredential - :ivar adm_credential: The AdmCredential of the created NotificationHub. - :vartype adm_credential: ~azure.mgmt.notificationhubs.models.AdmCredential - :ivar baidu_credential: The BaiduCredential of the created NotificationHub. - :vartype baidu_credential: ~azure.mgmt.notificationhubs.models.BaiduCredential - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'sku': {'key': 'sku', 'type': 'Sku'}, - 'name_properties_name': {'key': 'properties.name', 'type': 'str'}, - 'registration_ttl': {'key': 'properties.registrationTtl', 'type': 'str'}, - 'authorization_rules': {'key': 'properties.authorizationRules', 'type': '[SharedAccessAuthorizationRuleProperties]'}, - 'apns_credential': {'key': 'properties.apnsCredential', 'type': 'ApnsCredential'}, - 'wns_credential': {'key': 'properties.wnsCredential', 'type': 'WnsCredential'}, - 'gcm_credential': {'key': 'properties.gcmCredential', 'type': 'GcmCredential'}, - 'mpns_credential': {'key': 'properties.mpnsCredential', 'type': 'MpnsCredential'}, - 'adm_credential': {'key': 'properties.admCredential', 'type': 'AdmCredential'}, - 'baidu_credential': {'key': 'properties.baiduCredential', 'type': 'BaiduCredential'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword location: Resource location. - :paramtype location: str - :keyword tags: A set of tags. Resource tags. - :paramtype tags: dict[str, str] - :keyword sku: The sku of the created namespace. - :paramtype sku: ~azure.mgmt.notificationhubs.models.Sku - :keyword name_properties_name: The NotificationHub name. - :paramtype name_properties_name: str - :keyword registration_ttl: The RegistrationTtl of the created NotificationHub. - :paramtype registration_ttl: str - :keyword authorization_rules: The AuthorizationRules of the created NotificationHub. - :paramtype authorization_rules: - list[~azure.mgmt.notificationhubs.models.SharedAccessAuthorizationRuleProperties] - :keyword apns_credential: The ApnsCredential of the created NotificationHub. - :paramtype apns_credential: ~azure.mgmt.notificationhubs.models.ApnsCredential - :keyword wns_credential: The WnsCredential of the created NotificationHub. - :paramtype wns_credential: ~azure.mgmt.notificationhubs.models.WnsCredential - :keyword gcm_credential: The GcmCredential of the created NotificationHub. - :paramtype gcm_credential: ~azure.mgmt.notificationhubs.models.GcmCredential - :keyword mpns_credential: The MpnsCredential of the created NotificationHub. - :paramtype mpns_credential: ~azure.mgmt.notificationhubs.models.MpnsCredential - :keyword adm_credential: The AdmCredential of the created NotificationHub. - :paramtype adm_credential: ~azure.mgmt.notificationhubs.models.AdmCredential - :keyword baidu_credential: The BaiduCredential of the created NotificationHub. - :paramtype baidu_credential: ~azure.mgmt.notificationhubs.models.BaiduCredential - """ - super(NotificationHubResource, self).__init__(**kwargs) - self.name_properties_name = kwargs.get('name_properties_name', None) - self.registration_ttl = kwargs.get('registration_ttl', None) - self.authorization_rules = kwargs.get('authorization_rules', None) - self.apns_credential = kwargs.get('apns_credential', None) - self.wns_credential = kwargs.get('wns_credential', None) - self.gcm_credential = kwargs.get('gcm_credential', None) - self.mpns_credential = kwargs.get('mpns_credential', None) - self.adm_credential = kwargs.get('adm_credential', None) - self.baidu_credential = kwargs.get('baidu_credential', None) - - -class Operation(msrest.serialization.Model): - """A NotificationHubs REST API operation. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar name: Operation name: {provider}/{resource}/{operation}. - :vartype name: str - :ivar display: The object that represents the operation. - :vartype display: ~azure.mgmt.notificationhubs.models.OperationDisplay - """ - - _validation = { - 'name': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'display': {'key': 'display', 'type': 'OperationDisplay'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword display: The object that represents the operation. - :paramtype display: ~azure.mgmt.notificationhubs.models.OperationDisplay - """ - super(Operation, self).__init__(**kwargs) - self.name = None - self.display = kwargs.get('display', None) - - -class OperationDisplay(msrest.serialization.Model): - """The object that represents the operation. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar provider: Service provider: Microsoft.NotificationHubs. - :vartype provider: str - :ivar resource: Resource on which the operation is performed: Invoice, etc. - :vartype resource: str - :ivar operation: Operation type: Read, write, delete, etc. - :vartype operation: str - """ - - _validation = { - 'provider': {'readonly': True}, - 'resource': {'readonly': True}, - 'operation': {'readonly': True}, - } - - _attribute_map = { - 'provider': {'key': 'provider', 'type': 'str'}, - 'resource': {'key': 'resource', 'type': 'str'}, - 'operation': {'key': 'operation', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - """ - """ - super(OperationDisplay, self).__init__(**kwargs) - self.provider = None - self.resource = None - self.operation = None - - -class OperationListResult(msrest.serialization.Model): - """Result of the request to list NotificationHubs operations. It contains a list of operations and a URL link to get the next set of results. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar value: List of NotificationHubs operations supported by the Microsoft.NotificationHubs - resource provider. - :vartype value: list[~azure.mgmt.notificationhubs.models.Operation] - :ivar next_link: URL to get the next set of operation list results if there are any. - :vartype next_link: str - """ - - _validation = { - 'value': {'readonly': True}, - 'next_link': {'readonly': True}, - } - - _attribute_map = { - 'value': {'key': 'value', 'type': '[Operation]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - """ - """ - super(OperationListResult, self).__init__(**kwargs) - self.value = None - self.next_link = None - - -class PnsCredentialsResource(Resource): - """Description of a NotificationHub PNS Credentials. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar id: Resource Id. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar location: Resource location. - :vartype location: str - :ivar tags: A set of tags. Resource tags. - :vartype tags: dict[str, str] - :ivar sku: The sku of the created namespace. - :vartype sku: ~azure.mgmt.notificationhubs.models.Sku - :ivar apns_credential: The ApnsCredential of the created NotificationHub. - :vartype apns_credential: ~azure.mgmt.notificationhubs.models.ApnsCredential - :ivar wns_credential: The WnsCredential of the created NotificationHub. - :vartype wns_credential: ~azure.mgmt.notificationhubs.models.WnsCredential - :ivar gcm_credential: The GcmCredential of the created NotificationHub. - :vartype gcm_credential: ~azure.mgmt.notificationhubs.models.GcmCredential - :ivar mpns_credential: The MpnsCredential of the created NotificationHub. - :vartype mpns_credential: ~azure.mgmt.notificationhubs.models.MpnsCredential - :ivar adm_credential: The AdmCredential of the created NotificationHub. - :vartype adm_credential: ~azure.mgmt.notificationhubs.models.AdmCredential - :ivar baidu_credential: The BaiduCredential of the created NotificationHub. - :vartype baidu_credential: ~azure.mgmt.notificationhubs.models.BaiduCredential - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'sku': {'key': 'sku', 'type': 'Sku'}, - 'apns_credential': {'key': 'properties.apnsCredential', 'type': 'ApnsCredential'}, - 'wns_credential': {'key': 'properties.wnsCredential', 'type': 'WnsCredential'}, - 'gcm_credential': {'key': 'properties.gcmCredential', 'type': 'GcmCredential'}, - 'mpns_credential': {'key': 'properties.mpnsCredential', 'type': 'MpnsCredential'}, - 'adm_credential': {'key': 'properties.admCredential', 'type': 'AdmCredential'}, - 'baidu_credential': {'key': 'properties.baiduCredential', 'type': 'BaiduCredential'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword location: Resource location. - :paramtype location: str - :keyword tags: A set of tags. Resource tags. - :paramtype tags: dict[str, str] - :keyword sku: The sku of the created namespace. - :paramtype sku: ~azure.mgmt.notificationhubs.models.Sku - :keyword apns_credential: The ApnsCredential of the created NotificationHub. - :paramtype apns_credential: ~azure.mgmt.notificationhubs.models.ApnsCredential - :keyword wns_credential: The WnsCredential of the created NotificationHub. - :paramtype wns_credential: ~azure.mgmt.notificationhubs.models.WnsCredential - :keyword gcm_credential: The GcmCredential of the created NotificationHub. - :paramtype gcm_credential: ~azure.mgmt.notificationhubs.models.GcmCredential - :keyword mpns_credential: The MpnsCredential of the created NotificationHub. - :paramtype mpns_credential: ~azure.mgmt.notificationhubs.models.MpnsCredential - :keyword adm_credential: The AdmCredential of the created NotificationHub. - :paramtype adm_credential: ~azure.mgmt.notificationhubs.models.AdmCredential - :keyword baidu_credential: The BaiduCredential of the created NotificationHub. - :paramtype baidu_credential: ~azure.mgmt.notificationhubs.models.BaiduCredential - """ - super(PnsCredentialsResource, self).__init__(**kwargs) - self.apns_credential = kwargs.get('apns_credential', None) - self.wns_credential = kwargs.get('wns_credential', None) - self.gcm_credential = kwargs.get('gcm_credential', None) - self.mpns_credential = kwargs.get('mpns_credential', None) - self.adm_credential = kwargs.get('adm_credential', None) - self.baidu_credential = kwargs.get('baidu_credential', None) - - -class PolicykeyResource(msrest.serialization.Model): - """Namespace/NotificationHub Regenerate Keys. - - :ivar policy_key: Name of the key that has to be regenerated for the Namespace/Notification Hub - Authorization Rule. The value can be Primary Key/Secondary Key. - :vartype policy_key: str - """ - - _attribute_map = { - 'policy_key': {'key': 'policyKey', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword policy_key: Name of the key that has to be regenerated for the Namespace/Notification - Hub Authorization Rule. The value can be Primary Key/Secondary Key. - :paramtype policy_key: str - """ - super(PolicykeyResource, self).__init__(**kwargs) - self.policy_key = kwargs.get('policy_key', None) - - -class ResourceListKeys(msrest.serialization.Model): - """Namespace/NotificationHub Connection String. - - :ivar primary_connection_string: PrimaryConnectionString of the AuthorizationRule. - :vartype primary_connection_string: str - :ivar secondary_connection_string: SecondaryConnectionString of the created AuthorizationRule. - :vartype secondary_connection_string: str - :ivar primary_key: PrimaryKey of the created AuthorizationRule. - :vartype primary_key: str - :ivar secondary_key: SecondaryKey of the created AuthorizationRule. - :vartype secondary_key: str - :ivar key_name: KeyName of the created AuthorizationRule. - :vartype key_name: str - """ - - _attribute_map = { - 'primary_connection_string': {'key': 'primaryConnectionString', 'type': 'str'}, - 'secondary_connection_string': {'key': 'secondaryConnectionString', 'type': 'str'}, - 'primary_key': {'key': 'primaryKey', 'type': 'str'}, - 'secondary_key': {'key': 'secondaryKey', 'type': 'str'}, - 'key_name': {'key': 'keyName', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword primary_connection_string: PrimaryConnectionString of the AuthorizationRule. - :paramtype primary_connection_string: str - :keyword secondary_connection_string: SecondaryConnectionString of the created - AuthorizationRule. - :paramtype secondary_connection_string: str - :keyword primary_key: PrimaryKey of the created AuthorizationRule. - :paramtype primary_key: str - :keyword secondary_key: SecondaryKey of the created AuthorizationRule. - :paramtype secondary_key: str - :keyword key_name: KeyName of the created AuthorizationRule. - :paramtype key_name: str - """ - super(ResourceListKeys, self).__init__(**kwargs) - self.primary_connection_string = kwargs.get('primary_connection_string', None) - self.secondary_connection_string = kwargs.get('secondary_connection_string', None) - self.primary_key = kwargs.get('primary_key', None) - self.secondary_key = kwargs.get('secondary_key', None) - self.key_name = kwargs.get('key_name', None) - - -class SharedAccessAuthorizationRuleCreateOrUpdateParameters(msrest.serialization.Model): - """Parameters supplied to the CreateOrUpdate Namespace AuthorizationRules. - - All required parameters must be populated in order to send to Azure. - - :ivar properties: Required. Properties of the Namespace AuthorizationRules. - :vartype properties: - ~azure.mgmt.notificationhubs.models.SharedAccessAuthorizationRuleProperties - """ - - _validation = { - 'properties': {'required': True}, - } - - _attribute_map = { - 'properties': {'key': 'properties', 'type': 'SharedAccessAuthorizationRuleProperties'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword properties: Required. Properties of the Namespace AuthorizationRules. - :paramtype properties: - ~azure.mgmt.notificationhubs.models.SharedAccessAuthorizationRuleProperties - """ - super(SharedAccessAuthorizationRuleCreateOrUpdateParameters, self).__init__(**kwargs) - self.properties = kwargs['properties'] - - -class SharedAccessAuthorizationRuleListResult(msrest.serialization.Model): - """The response of the List Namespace operation. - - :ivar value: Result of the List AuthorizationRules operation. - :vartype value: list[~azure.mgmt.notificationhubs.models.SharedAccessAuthorizationRuleResource] - :ivar next_link: Link to the next set of results. Not empty if Value contains incomplete list - of AuthorizationRules. - :vartype next_link: str - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[SharedAccessAuthorizationRuleResource]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword value: Result of the List AuthorizationRules operation. - :paramtype value: - list[~azure.mgmt.notificationhubs.models.SharedAccessAuthorizationRuleResource] - :keyword next_link: Link to the next set of results. Not empty if Value contains incomplete - list of AuthorizationRules. - :paramtype next_link: str - """ - super(SharedAccessAuthorizationRuleListResult, self).__init__(**kwargs) - self.value = kwargs.get('value', None) - self.next_link = kwargs.get('next_link', None) - - -class SharedAccessAuthorizationRuleProperties(msrest.serialization.Model): - """SharedAccessAuthorizationRule properties. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar rights: The rights associated with the rule. - :vartype rights: list[str or ~azure.mgmt.notificationhubs.models.AccessRights] - :ivar primary_key: A base64-encoded 256-bit primary key for signing and validating the SAS - token. - :vartype primary_key: str - :ivar secondary_key: A base64-encoded 256-bit primary key for signing and validating the SAS - token. - :vartype secondary_key: str - :ivar key_name: A string that describes the authorization rule. - :vartype key_name: str - :ivar claim_type: A string that describes the claim type. - :vartype claim_type: str - :ivar claim_value: A string that describes the claim value. - :vartype claim_value: str - :ivar modified_time: The last modified time for this rule. - :vartype modified_time: str - :ivar created_time: The created time for this rule. - :vartype created_time: str - :ivar revision: The revision number for the rule. - :vartype revision: int - """ - - _validation = { - 'primary_key': {'readonly': True}, - 'secondary_key': {'readonly': True}, - 'key_name': {'readonly': True}, - 'claim_type': {'readonly': True}, - 'claim_value': {'readonly': True}, - 'modified_time': {'readonly': True}, - 'created_time': {'readonly': True}, - 'revision': {'readonly': True}, - } - - _attribute_map = { - 'rights': {'key': 'rights', 'type': '[str]'}, - 'primary_key': {'key': 'primaryKey', 'type': 'str'}, - 'secondary_key': {'key': 'secondaryKey', 'type': 'str'}, - 'key_name': {'key': 'keyName', 'type': 'str'}, - 'claim_type': {'key': 'claimType', 'type': 'str'}, - 'claim_value': {'key': 'claimValue', 'type': 'str'}, - 'modified_time': {'key': 'modifiedTime', 'type': 'str'}, - 'created_time': {'key': 'createdTime', 'type': 'str'}, - 'revision': {'key': 'revision', 'type': 'int'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword rights: The rights associated with the rule. - :paramtype rights: list[str or ~azure.mgmt.notificationhubs.models.AccessRights] - """ - super(SharedAccessAuthorizationRuleProperties, self).__init__(**kwargs) - self.rights = kwargs.get('rights', None) - self.primary_key = None - self.secondary_key = None - self.key_name = None - self.claim_type = None - self.claim_value = None - self.modified_time = None - self.created_time = None - self.revision = None - - -class SharedAccessAuthorizationRuleResource(Resource): - """Description of a Namespace AuthorizationRules. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar id: Resource Id. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar location: Resource location. - :vartype location: str - :ivar tags: A set of tags. Resource tags. - :vartype tags: dict[str, str] - :ivar sku: The sku of the created namespace. - :vartype sku: ~azure.mgmt.notificationhubs.models.Sku - :ivar rights: The rights associated with the rule. - :vartype rights: list[str or ~azure.mgmt.notificationhubs.models.AccessRights] - :ivar primary_key: A base64-encoded 256-bit primary key for signing and validating the SAS - token. - :vartype primary_key: str - :ivar secondary_key: A base64-encoded 256-bit primary key for signing and validating the SAS - token. - :vartype secondary_key: str - :ivar key_name: A string that describes the authorization rule. - :vartype key_name: str - :ivar claim_type: A string that describes the claim type. - :vartype claim_type: str - :ivar claim_value: A string that describes the claim value. - :vartype claim_value: str - :ivar modified_time: The last modified time for this rule. - :vartype modified_time: str - :ivar created_time: The created time for this rule. - :vartype created_time: str - :ivar revision: The revision number for the rule. - :vartype revision: int - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'primary_key': {'readonly': True}, - 'secondary_key': {'readonly': True}, - 'key_name': {'readonly': True}, - 'claim_type': {'readonly': True}, - 'claim_value': {'readonly': True}, - 'modified_time': {'readonly': True}, - 'created_time': {'readonly': True}, - 'revision': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'sku': {'key': 'sku', 'type': 'Sku'}, - 'rights': {'key': 'properties.rights', 'type': '[str]'}, - 'primary_key': {'key': 'properties.primaryKey', 'type': 'str'}, - 'secondary_key': {'key': 'properties.secondaryKey', 'type': 'str'}, - 'key_name': {'key': 'properties.keyName', 'type': 'str'}, - 'claim_type': {'key': 'properties.claimType', 'type': 'str'}, - 'claim_value': {'key': 'properties.claimValue', 'type': 'str'}, - 'modified_time': {'key': 'properties.modifiedTime', 'type': 'str'}, - 'created_time': {'key': 'properties.createdTime', 'type': 'str'}, - 'revision': {'key': 'properties.revision', 'type': 'int'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword location: Resource location. - :paramtype location: str - :keyword tags: A set of tags. Resource tags. - :paramtype tags: dict[str, str] - :keyword sku: The sku of the created namespace. - :paramtype sku: ~azure.mgmt.notificationhubs.models.Sku - :keyword rights: The rights associated with the rule. - :paramtype rights: list[str or ~azure.mgmt.notificationhubs.models.AccessRights] - """ - super(SharedAccessAuthorizationRuleResource, self).__init__(**kwargs) - self.rights = kwargs.get('rights', None) - self.primary_key = None - self.secondary_key = None - self.key_name = None - self.claim_type = None - self.claim_value = None - self.modified_time = None - self.created_time = None - self.revision = None - - -class Sku(msrest.serialization.Model): - """The Sku description for a namespace. - - All required parameters must be populated in order to send to Azure. - - :ivar name: Required. Name of the notification hub sku. Possible values include: "Free", - "Basic", "Standard". - :vartype name: str or ~azure.mgmt.notificationhubs.models.SkuName - :ivar tier: The tier of particular sku. - :vartype tier: str - :ivar size: The Sku size. - :vartype size: str - :ivar family: The Sku Family. - :vartype family: str - :ivar capacity: The capacity of the resource. - :vartype capacity: int - """ - - _validation = { - 'name': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'tier': {'key': 'tier', 'type': 'str'}, - 'size': {'key': 'size', 'type': 'str'}, - 'family': {'key': 'family', 'type': 'str'}, - 'capacity': {'key': 'capacity', 'type': 'int'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword name: Required. Name of the notification hub sku. Possible values include: "Free", - "Basic", "Standard". - :paramtype name: str or ~azure.mgmt.notificationhubs.models.SkuName - :keyword tier: The tier of particular sku. - :paramtype tier: str - :keyword size: The Sku size. - :paramtype size: str - :keyword family: The Sku Family. - :paramtype family: str - :keyword capacity: The capacity of the resource. - :paramtype capacity: int - """ - super(Sku, self).__init__(**kwargs) - self.name = kwargs['name'] - self.tier = kwargs.get('tier', None) - self.size = kwargs.get('size', None) - self.family = kwargs.get('family', None) - self.capacity = kwargs.get('capacity', None) - - -class SubResource(msrest.serialization.Model): - """SubResource. - - :ivar id: Resource Id. - :vartype id: str - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword id: Resource Id. - :paramtype id: str - """ - super(SubResource, self).__init__(**kwargs) - self.id = kwargs.get('id', None) - - -class WnsCredential(msrest.serialization.Model): - """Description of a NotificationHub WnsCredential. - - :ivar package_sid: The package ID for this credential. - :vartype package_sid: str - :ivar secret_key: The secret key. - :vartype secret_key: str - :ivar windows_live_endpoint: The Windows Live endpoint. - :vartype windows_live_endpoint: str - """ - - _attribute_map = { - 'package_sid': {'key': 'properties.packageSid', 'type': 'str'}, - 'secret_key': {'key': 'properties.secretKey', 'type': 'str'}, - 'windows_live_endpoint': {'key': 'properties.windowsLiveEndpoint', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword package_sid: The package ID for this credential. - :paramtype package_sid: str - :keyword secret_key: The secret key. - :paramtype secret_key: str - :keyword windows_live_endpoint: The Windows Live endpoint. - :paramtype windows_live_endpoint: str - """ - super(WnsCredential, self).__init__(**kwargs) - self.package_sid = kwargs.get('package_sid', None) - self.secret_key = kwargs.get('secret_key', None) - self.windows_live_endpoint = kwargs.get('windows_live_endpoint', None) 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 ac20040f6f57d..3e586d929efd3 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 @@ -6,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import functools -from typing import TYPE_CHECKING +from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar, Union import warnings from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error @@ -22,22 +22,20 @@ from .. import models as _models from .._vendor import _convert_request, _format_url_section - -if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports - from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar, Union - T = TypeVar('T') - ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] +T = TypeVar('T') +JSONType = Any +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] _SERIALIZER = Serializer() _SERIALIZER.client_side_validation = False -# fmt: off def build_check_availability_request( - subscription_id, # type: str - **kwargs # type: Any -): - # type: (...) -> HttpRequest + subscription_id: str, + *, + json: JSONType = None, + content: Any = None, + **kwargs: Any +) -> HttpRequest: content_type = kwargs.pop('content_type', None) # type: Optional[str] api_version = "2017-04-01" @@ -65,17 +63,21 @@ def build_check_availability_request( url=url, params=query_parameters, headers=header_parameters, + json=json, + content=content, **kwargs ) def build_create_or_update_request( - resource_group_name, # type: str - namespace_name, # type: str - subscription_id, # type: str - **kwargs # type: Any -): - # type: (...) -> HttpRequest + resource_group_name: str, + namespace_name: str, + subscription_id: str, + *, + json: JSONType = None, + content: Any = None, + **kwargs: Any +) -> HttpRequest: content_type = kwargs.pop('content_type', None) # type: Optional[str] api_version = "2017-04-01" @@ -105,17 +107,21 @@ def build_create_or_update_request( url=url, params=query_parameters, headers=header_parameters, + json=json, + content=content, **kwargs ) def build_patch_request( - resource_group_name, # type: str - namespace_name, # type: str - subscription_id, # type: str - **kwargs # type: Any -): - # type: (...) -> HttpRequest + resource_group_name: str, + namespace_name: str, + subscription_id: str, + *, + json: JSONType = None, + content: Any = None, + **kwargs: Any +) -> HttpRequest: content_type = kwargs.pop('content_type', None) # type: Optional[str] api_version = "2017-04-01" @@ -145,17 +151,18 @@ def build_patch_request( url=url, params=query_parameters, headers=header_parameters, + json=json, + content=content, **kwargs ) def build_delete_request_initial( - resource_group_name, # type: str - namespace_name, # type: str - subscription_id, # type: str - **kwargs # type: Any -): - # type: (...) -> HttpRequest + resource_group_name: str, + namespace_name: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: api_version = "2017-04-01" # Construct URL url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NotificationHubs/namespaces/{namespaceName}') @@ -180,12 +187,11 @@ def build_delete_request_initial( def build_get_request( - resource_group_name, # type: str - namespace_name, # type: str - subscription_id, # type: str - **kwargs # type: Any -): - # type: (...) -> HttpRequest + resource_group_name: str, + namespace_name: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: api_version = "2017-04-01" accept = "application/json" # Construct URL @@ -216,13 +222,15 @@ def build_get_request( def build_create_or_update_authorization_rule_request( - resource_group_name, # type: str - namespace_name, # type: str - authorization_rule_name, # type: str - subscription_id, # type: str - **kwargs # type: Any -): - # type: (...) -> HttpRequest + resource_group_name: str, + namespace_name: str, + authorization_rule_name: str, + subscription_id: str, + *, + json: JSONType = None, + content: Any = None, + **kwargs: Any +) -> HttpRequest: content_type = kwargs.pop('content_type', None) # type: Optional[str] api_version = "2017-04-01" @@ -253,18 +261,19 @@ def build_create_or_update_authorization_rule_request( url=url, params=query_parameters, headers=header_parameters, + json=json, + content=content, **kwargs ) def build_delete_authorization_rule_request( - resource_group_name, # type: str - namespace_name, # type: str - authorization_rule_name, # type: str - subscription_id, # type: str - **kwargs # type: Any -): - # type: (...) -> HttpRequest + resource_group_name: str, + namespace_name: str, + authorization_rule_name: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: api_version = "2017-04-01" # Construct URL url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NotificationHubs/namespaces/{namespaceName}/AuthorizationRules/{authorizationRuleName}') @@ -290,13 +299,12 @@ def build_delete_authorization_rule_request( def build_get_authorization_rule_request( - resource_group_name, # type: str - namespace_name, # type: str - authorization_rule_name, # type: str - subscription_id, # type: str - **kwargs # type: Any -): - # type: (...) -> HttpRequest + resource_group_name: str, + namespace_name: str, + authorization_rule_name: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: api_version = "2017-04-01" accept = "application/json" # Construct URL @@ -328,11 +336,10 @@ def build_get_authorization_rule_request( def build_list_request( - resource_group_name, # type: str - subscription_id, # type: str - **kwargs # type: Any -): - # type: (...) -> HttpRequest + resource_group_name: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: api_version = "2017-04-01" accept = "application/json" # Construct URL @@ -362,10 +369,9 @@ def build_list_request( def build_list_all_request( - subscription_id, # type: str - **kwargs # type: Any -): - # type: (...) -> HttpRequest + subscription_id: str, + **kwargs: Any +) -> HttpRequest: api_version = "2017-04-01" accept = "application/json" # Construct URL @@ -394,12 +400,11 @@ def build_list_all_request( def build_list_authorization_rules_request( - resource_group_name, # type: str - namespace_name, # type: str - subscription_id, # type: str - **kwargs # type: Any -): - # type: (...) -> HttpRequest + resource_group_name: str, + namespace_name: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: api_version = "2017-04-01" accept = "application/json" # Construct URL @@ -430,13 +435,12 @@ def build_list_authorization_rules_request( def build_list_keys_request( - resource_group_name, # type: str - namespace_name, # type: str - authorization_rule_name, # type: str - subscription_id, # type: str - **kwargs # type: Any -): - # type: (...) -> HttpRequest + resource_group_name: str, + namespace_name: str, + authorization_rule_name: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: api_version = "2017-04-01" accept = "application/json" # Construct URL @@ -468,13 +472,15 @@ def build_list_keys_request( def build_regenerate_keys_request( - resource_group_name, # type: str - namespace_name, # type: str - authorization_rule_name, # type: str - subscription_id, # type: str - **kwargs # type: Any -): - # type: (...) -> HttpRequest + resource_group_name: str, + namespace_name: str, + authorization_rule_name: str, + subscription_id: str, + *, + json: JSONType = None, + content: Any = None, + **kwargs: Any +) -> HttpRequest: content_type = kwargs.pop('content_type', None) # type: Optional[str] api_version = "2017-04-01" @@ -505,10 +511,11 @@ def build_regenerate_keys_request( url=url, params=query_parameters, headers=header_parameters, + json=json, + content=content, **kwargs ) -# fmt: on class NamespacesOperations(object): """NamespacesOperations operations. @@ -534,10 +541,9 @@ def __init__(self, client, config, serializer, deserializer): @distributed_trace def check_availability( self, - parameters, # type: "_models.CheckAvailabilityParameters" - **kwargs # type: Any - ): - # type: (...) -> "_models.CheckAvailabilityResult" + parameters: "_models.CheckAvailabilityParameters", + **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. @@ -587,12 +593,11 @@ def check_availability( @distributed_trace def create_or_update( self, - resource_group_name, # type: str - namespace_name, # type: str - parameters, # type: "_models.NamespaceCreateOrUpdateParameters" - **kwargs # type: Any - ): - # type: (...) -> "_models.NamespaceResource" + resource_group_name: str, + namespace_name: str, + parameters: "_models.NamespaceCreateOrUpdateParameters", + **kwargs: Any + ) -> "_models.NamespaceResource": """Creates/Updates a service namespace. Once created, this namespace's resource manifest is immutable. This operation is idempotent. @@ -652,12 +657,11 @@ def create_or_update( @distributed_trace def patch( self, - resource_group_name, # type: str - namespace_name, # type: str - parameters, # type: "_models.NamespacePatchParameters" - **kwargs # type: Any - ): - # type: (...) -> "_models.NamespaceResource" + resource_group_name: str, + namespace_name: str, + parameters: "_models.NamespacePatchParameters", + **kwargs: Any + ) -> "_models.NamespaceResource": """Patches the existing namespace. :param resource_group_name: The name of the resource group. @@ -711,11 +715,10 @@ def patch( def _delete_initial( self, - resource_group_name, # type: str - namespace_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> None + resource_group_name: str, + namespace_name: str, + **kwargs: Any + ) -> None: cls = kwargs.pop('cls', None) # type: ClsType[None] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -748,11 +751,10 @@ def _delete_initial( @distributed_trace def begin_delete( self, - resource_group_name, # type: str - namespace_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> LROPoller[None] + resource_group_name: str, + namespace_name: str, + **kwargs: Any + ) -> LROPoller[None]: """Deletes an existing namespace. This operation also removes all associated notificationHubs under the namespace. @@ -811,11 +813,10 @@ def get_long_running_output(pipeline_response): @distributed_trace def get( self, - resource_group_name, # type: str - namespace_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> "_models.NamespaceResource" + resource_group_name: str, + namespace_name: str, + **kwargs: Any + ) -> "_models.NamespaceResource": """Returns the description for the specified namespace. :param resource_group_name: The name of the resource group. @@ -863,13 +864,12 @@ def get( @distributed_trace def create_or_update_authorization_rule( self, - resource_group_name, # type: str - namespace_name, # type: str - authorization_rule_name, # type: str - parameters, # type: "_models.SharedAccessAuthorizationRuleCreateOrUpdateParameters" - **kwargs # type: Any - ): - # type: (...) -> "_models.SharedAccessAuthorizationRuleResource" + resource_group_name: str, + namespace_name: str, + authorization_rule_name: str, + parameters: "_models.SharedAccessAuthorizationRuleCreateOrUpdateParameters", + **kwargs: Any + ) -> "_models.SharedAccessAuthorizationRuleResource": """Creates an authorization rule for a namespace. :param resource_group_name: The name of the resource group. @@ -928,12 +928,11 @@ def create_or_update_authorization_rule( @distributed_trace def delete_authorization_rule( self, - resource_group_name, # type: str - namespace_name, # type: str - authorization_rule_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> None + resource_group_name: str, + namespace_name: str, + authorization_rule_name: str, + **kwargs: Any + ) -> None: """Deletes a namespace authorization rule. :param resource_group_name: The name of the resource group. @@ -980,12 +979,11 @@ def delete_authorization_rule( @distributed_trace def get_authorization_rule( self, - resource_group_name, # type: str - namespace_name, # type: str - authorization_rule_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> "_models.SharedAccessAuthorizationRuleResource" + resource_group_name: str, + namespace_name: str, + authorization_rule_name: str, + **kwargs: Any + ) -> "_models.SharedAccessAuthorizationRuleResource": """Gets an authorization rule for a namespace by name. :param resource_group_name: The name of the resource group. @@ -1036,10 +1034,9 @@ def get_authorization_rule( @distributed_trace def list( self, - resource_group_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> Iterable["_models.NamespaceListResult"] + resource_group_name: str, + **kwargs: Any + ) -> Iterable["_models.NamespaceListResult"]: """Lists the available namespaces within a resourceGroup. :param resource_group_name: The name of the resource group. If resourceGroupName value is null @@ -1106,9 +1103,8 @@ def get_next(next_link=None): @distributed_trace def list_all( self, - **kwargs # type: Any - ): - # type: (...) -> Iterable["_models.NamespaceListResult"] + **kwargs: Any + ) -> Iterable["_models.NamespaceListResult"]: """Lists all the available namespaces within the subscription irrespective of the resourceGroups. :keyword callable cls: A custom type or function that will be passed the direct response @@ -1170,11 +1166,10 @@ def get_next(next_link=None): @distributed_trace def list_authorization_rules( self, - resource_group_name, # type: str - namespace_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> Iterable["_models.SharedAccessAuthorizationRuleListResult"] + resource_group_name: str, + namespace_name: str, + **kwargs: Any + ) -> Iterable["_models.SharedAccessAuthorizationRuleListResult"]: """Gets the authorization rules for a namespace. :param resource_group_name: The name of the resource group. @@ -1246,12 +1241,11 @@ def get_next(next_link=None): @distributed_trace def list_keys( self, - resource_group_name, # type: str - namespace_name, # type: str - authorization_rule_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> "_models.ResourceListKeys" + resource_group_name: str, + namespace_name: str, + authorization_rule_name: str, + **kwargs: Any + ) -> "_models.ResourceListKeys": """Gets the Primary and Secondary ConnectionStrings to the namespace. :param resource_group_name: The name of the resource group. @@ -1303,13 +1297,12 @@ def list_keys( @distributed_trace def regenerate_keys( self, - resource_group_name, # type: str - namespace_name, # type: str - authorization_rule_name, # type: str - parameters, # type: "_models.PolicykeyResource" - **kwargs # type: Any - ): - # type: (...) -> "_models.ResourceListKeys" + resource_group_name: str, + namespace_name: str, + authorization_rule_name: str, + parameters: "_models.PolicykeyResource", + **kwargs: Any + ) -> "_models.ResourceListKeys": """Regenerates the Primary/Secondary Keys to the Namespace Authorization Rule. :param resource_group_name: The name of the resource group. 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 f11cb4c776bb1..99e787c07ed7a 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 @@ -6,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import functools -from typing import TYPE_CHECKING +from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar, Union import warnings from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error @@ -20,24 +20,22 @@ from .. import models as _models from .._vendor import _convert_request, _format_url_section - -if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports - from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar, Union - T = TypeVar('T') - ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] +T = TypeVar('T') +JSONType = Any +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] _SERIALIZER = Serializer() _SERIALIZER.client_side_validation = False -# fmt: off def build_check_notification_hub_availability_request( - resource_group_name, # type: str - namespace_name, # type: str - subscription_id, # type: str - **kwargs # type: Any -): - # type: (...) -> HttpRequest + resource_group_name: str, + namespace_name: str, + subscription_id: str, + *, + json: JSONType = None, + content: Any = None, + **kwargs: Any +) -> HttpRequest: content_type = kwargs.pop('content_type', None) # type: Optional[str] api_version = "2017-04-01" @@ -67,18 +65,22 @@ def build_check_notification_hub_availability_request( url=url, params=query_parameters, headers=header_parameters, + json=json, + content=content, **kwargs ) def build_create_or_update_request( - resource_group_name, # type: str - namespace_name, # type: str - notification_hub_name, # type: str - subscription_id, # type: str - **kwargs # type: Any -): - # type: (...) -> HttpRequest + resource_group_name: str, + namespace_name: str, + notification_hub_name: str, + subscription_id: str, + *, + json: JSONType = None, + content: Any = None, + **kwargs: Any +) -> HttpRequest: content_type = kwargs.pop('content_type', None) # type: Optional[str] api_version = "2017-04-01" @@ -109,18 +111,22 @@ def build_create_or_update_request( url=url, params=query_parameters, headers=header_parameters, + json=json, + content=content, **kwargs ) def build_patch_request( - resource_group_name, # type: str - namespace_name, # type: str - notification_hub_name, # type: str - subscription_id, # type: str - **kwargs # type: Any -): - # type: (...) -> HttpRequest + resource_group_name: str, + namespace_name: str, + notification_hub_name: str, + subscription_id: str, + *, + json: JSONType = None, + content: Any = None, + **kwargs: Any +) -> HttpRequest: content_type = kwargs.pop('content_type', None) # type: Optional[str] api_version = "2017-04-01" @@ -151,18 +157,19 @@ def build_patch_request( url=url, params=query_parameters, headers=header_parameters, + json=json, + content=content, **kwargs ) def build_delete_request( - resource_group_name, # type: str - namespace_name, # type: str - notification_hub_name, # type: str - subscription_id, # type: str - **kwargs # type: Any -): - # type: (...) -> HttpRequest + resource_group_name: str, + namespace_name: str, + notification_hub_name: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: api_version = "2017-04-01" # Construct URL url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NotificationHubs/namespaces/{namespaceName}/notificationHubs/{notificationHubName}') @@ -188,13 +195,12 @@ def build_delete_request( def build_get_request( - resource_group_name, # type: str - namespace_name, # type: str - notification_hub_name, # type: str - subscription_id, # type: str - **kwargs # type: Any -): - # type: (...) -> HttpRequest + resource_group_name: str, + namespace_name: str, + notification_hub_name: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: api_version = "2017-04-01" accept = "application/json" # Construct URL @@ -226,13 +232,15 @@ def build_get_request( def build_debug_send_request( - resource_group_name, # type: str - namespace_name, # type: str - notification_hub_name, # type: str - subscription_id, # type: str - **kwargs # type: Any -): - # type: (...) -> HttpRequest + resource_group_name: str, + namespace_name: str, + notification_hub_name: str, + subscription_id: str, + *, + json: JSONType = None, + content: Any = None, + **kwargs: Any +) -> HttpRequest: content_type = kwargs.pop('content_type', None) # type: Optional[str] api_version = "2017-04-01" @@ -263,19 +271,23 @@ def build_debug_send_request( url=url, params=query_parameters, headers=header_parameters, + json=json, + content=content, **kwargs ) def build_create_or_update_authorization_rule_request( - resource_group_name, # type: str - namespace_name, # type: str - notification_hub_name, # type: str - authorization_rule_name, # type: str - subscription_id, # type: str - **kwargs # type: Any -): - # type: (...) -> HttpRequest + resource_group_name: str, + namespace_name: str, + notification_hub_name: str, + authorization_rule_name: str, + subscription_id: str, + *, + json: JSONType = None, + content: Any = None, + **kwargs: Any +) -> HttpRequest: content_type = kwargs.pop('content_type', None) # type: Optional[str] api_version = "2017-04-01" @@ -307,19 +319,20 @@ def build_create_or_update_authorization_rule_request( url=url, params=query_parameters, headers=header_parameters, + json=json, + content=content, **kwargs ) def build_delete_authorization_rule_request( - resource_group_name, # type: str - namespace_name, # type: str - notification_hub_name, # type: str - authorization_rule_name, # type: str - subscription_id, # type: str - **kwargs # type: Any -): - # type: (...) -> HttpRequest + resource_group_name: str, + namespace_name: str, + notification_hub_name: str, + authorization_rule_name: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: api_version = "2017-04-01" # Construct URL url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NotificationHubs/namespaces/{namespaceName}/notificationHubs/{notificationHubName}/AuthorizationRules/{authorizationRuleName}') @@ -346,14 +359,13 @@ def build_delete_authorization_rule_request( def build_get_authorization_rule_request( - resource_group_name, # type: str - namespace_name, # type: str - notification_hub_name, # type: str - authorization_rule_name, # type: str - subscription_id, # type: str - **kwargs # type: Any -): - # type: (...) -> HttpRequest + resource_group_name: str, + namespace_name: str, + notification_hub_name: str, + authorization_rule_name: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: api_version = "2017-04-01" accept = "application/json" # Construct URL @@ -386,12 +398,11 @@ def build_get_authorization_rule_request( def build_list_request( - resource_group_name, # type: str - namespace_name, # type: str - subscription_id, # type: str - **kwargs # type: Any -): - # type: (...) -> HttpRequest + resource_group_name: str, + namespace_name: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: api_version = "2017-04-01" accept = "application/json" # Construct URL @@ -422,13 +433,12 @@ def build_list_request( def build_list_authorization_rules_request( - resource_group_name, # type: str - namespace_name, # type: str - notification_hub_name, # type: str - subscription_id, # type: str - **kwargs # type: Any -): - # type: (...) -> HttpRequest + resource_group_name: str, + namespace_name: str, + notification_hub_name: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: api_version = "2017-04-01" accept = "application/json" # Construct URL @@ -460,14 +470,13 @@ def build_list_authorization_rules_request( def build_list_keys_request( - resource_group_name, # type: str - namespace_name, # type: str - notification_hub_name, # type: str - authorization_rule_name, # type: str - subscription_id, # type: str - **kwargs # type: Any -): - # type: (...) -> HttpRequest + resource_group_name: str, + namespace_name: str, + notification_hub_name: str, + authorization_rule_name: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: api_version = "2017-04-01" accept = "application/json" # Construct URL @@ -500,14 +509,16 @@ def build_list_keys_request( def build_regenerate_keys_request( - resource_group_name, # type: str - namespace_name, # type: str - notification_hub_name, # type: str - authorization_rule_name, # type: str - subscription_id, # type: str - **kwargs # type: Any -): - # type: (...) -> HttpRequest + resource_group_name: str, + namespace_name: str, + notification_hub_name: str, + authorization_rule_name: str, + subscription_id: str, + *, + json: JSONType = None, + content: Any = None, + **kwargs: Any +) -> HttpRequest: content_type = kwargs.pop('content_type', None) # type: Optional[str] api_version = "2017-04-01" @@ -539,18 +550,19 @@ def build_regenerate_keys_request( url=url, params=query_parameters, headers=header_parameters, + json=json, + content=content, **kwargs ) def build_get_pns_credentials_request( - resource_group_name, # type: str - namespace_name, # type: str - notification_hub_name, # type: str - subscription_id, # type: str - **kwargs # type: Any -): - # type: (...) -> HttpRequest + resource_group_name: str, + namespace_name: str, + notification_hub_name: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: api_version = "2017-04-01" accept = "application/json" # Construct URL @@ -580,7 +592,6 @@ def build_get_pns_credentials_request( **kwargs ) -# fmt: on class NotificationHubsOperations(object): """NotificationHubsOperations operations. @@ -606,12 +617,11 @@ def __init__(self, client, config, serializer, deserializer): @distributed_trace def check_notification_hub_availability( self, - resource_group_name, # type: str - namespace_name, # type: str - parameters, # type: "_models.CheckAvailabilityParameters" - **kwargs # type: Any - ): - # type: (...) -> "_models.CheckAvailabilityResult" + resource_group_name: str, + namespace_name: str, + parameters: "_models.CheckAvailabilityParameters", + **kwargs: Any + ) -> "_models.CheckAvailabilityResult": """Checks the availability of the given notificationHub in a namespace. :param resource_group_name: The name of the resource group. @@ -666,13 +676,12 @@ def check_notification_hub_availability( @distributed_trace def create_or_update( self, - resource_group_name, # type: str - namespace_name, # type: str - notification_hub_name, # type: str - parameters, # type: "_models.NotificationHubCreateOrUpdateParameters" - **kwargs # type: Any - ): - # type: (...) -> "_models.NotificationHubResource" + resource_group_name: str, + namespace_name: str, + notification_hub_name: str, + parameters: "_models.NotificationHubCreateOrUpdateParameters", + **kwargs: Any + ) -> "_models.NotificationHubResource": """Creates/Update a NotificationHub in a namespace. :param resource_group_name: The name of the resource group. @@ -734,13 +743,12 @@ def create_or_update( @distributed_trace def patch( self, - resource_group_name, # type: str - namespace_name, # type: str - notification_hub_name, # type: str - parameters=None, # type: Optional["_models.NotificationHubPatchParameters"] - **kwargs # type: Any - ): - # type: (...) -> "_models.NotificationHubResource" + resource_group_name: str, + namespace_name: str, + notification_hub_name: str, + parameters: Optional["_models.NotificationHubPatchParameters"] = None, + **kwargs: Any + ) -> "_models.NotificationHubResource": """Patch a NotificationHub in a namespace. :param resource_group_name: The name of the resource group. @@ -801,12 +809,11 @@ def patch( @distributed_trace def delete( self, - resource_group_name, # type: str - namespace_name, # type: str - notification_hub_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> None + resource_group_name: str, + namespace_name: str, + notification_hub_name: str, + **kwargs: Any + ) -> None: """Deletes a notification hub associated with a namespace. :param resource_group_name: The name of the resource group. @@ -853,12 +860,11 @@ def delete( @distributed_trace def get( self, - resource_group_name, # type: str - namespace_name, # type: str - notification_hub_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> "_models.NotificationHubResource" + resource_group_name: str, + namespace_name: str, + notification_hub_name: str, + **kwargs: Any + ) -> "_models.NotificationHubResource": """Lists the notification hubs associated with a namespace. :param resource_group_name: The name of the resource group. @@ -909,13 +915,12 @@ def get( @distributed_trace def debug_send( self, - resource_group_name, # type: str - namespace_name, # type: str - notification_hub_name, # type: str - parameters=None, # type: Any - **kwargs # type: Any - ): - # type: (...) -> "_models.DebugSendResponse" + resource_group_name: str, + namespace_name: str, + notification_hub_name: str, + parameters: Any = None, + **kwargs: Any + ) -> "_models.DebugSendResponse": """test send a push notification. :param resource_group_name: The name of the resource group. @@ -976,14 +981,13 @@ def debug_send( @distributed_trace def create_or_update_authorization_rule( self, - resource_group_name, # type: str - namespace_name, # type: str - notification_hub_name, # type: str - authorization_rule_name, # type: str - parameters, # type: "_models.SharedAccessAuthorizationRuleCreateOrUpdateParameters" - **kwargs # type: Any - ): - # type: (...) -> "_models.SharedAccessAuthorizationRuleResource" + resource_group_name: str, + namespace_name: str, + notification_hub_name: str, + authorization_rule_name: str, + parameters: "_models.SharedAccessAuthorizationRuleCreateOrUpdateParameters", + **kwargs: Any + ) -> "_models.SharedAccessAuthorizationRuleResource": """Creates/Updates an authorization rule for a NotificationHub. :param resource_group_name: The name of the resource group. @@ -1045,13 +1049,12 @@ def create_or_update_authorization_rule( @distributed_trace def delete_authorization_rule( self, - resource_group_name, # type: str - namespace_name, # type: str - notification_hub_name, # type: str - authorization_rule_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> None + resource_group_name: str, + namespace_name: str, + notification_hub_name: str, + authorization_rule_name: str, + **kwargs: Any + ) -> None: """Deletes a notificationHub authorization rule. :param resource_group_name: The name of the resource group. @@ -1101,13 +1104,12 @@ def delete_authorization_rule( @distributed_trace def get_authorization_rule( self, - resource_group_name, # type: str - namespace_name, # type: str - notification_hub_name, # type: str - authorization_rule_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> "_models.SharedAccessAuthorizationRuleResource" + resource_group_name: str, + namespace_name: str, + notification_hub_name: str, + authorization_rule_name: str, + **kwargs: Any + ) -> "_models.SharedAccessAuthorizationRuleResource": """Gets an authorization rule for a NotificationHub by name. :param resource_group_name: The name of the resource group. @@ -1161,11 +1163,10 @@ def get_authorization_rule( @distributed_trace def list( self, - resource_group_name, # type: str - namespace_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> Iterable["_models.NotificationHubListResult"] + resource_group_name: str, + namespace_name: str, + **kwargs: Any + ) -> Iterable["_models.NotificationHubListResult"]: """Lists the notification hubs associated with a namespace. :param resource_group_name: The name of the resource group. @@ -1237,12 +1238,11 @@ def get_next(next_link=None): @distributed_trace def list_authorization_rules( self, - resource_group_name, # type: str - namespace_name, # type: str - notification_hub_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> Iterable["_models.SharedAccessAuthorizationRuleListResult"] + resource_group_name: str, + namespace_name: str, + notification_hub_name: str, + **kwargs: Any + ) -> Iterable["_models.SharedAccessAuthorizationRuleListResult"]: """Gets the authorization rules for a NotificationHub. :param resource_group_name: The name of the resource group. @@ -1318,13 +1318,12 @@ def get_next(next_link=None): @distributed_trace def list_keys( self, - resource_group_name, # type: str - namespace_name, # type: str - notification_hub_name, # type: str - authorization_rule_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> "_models.ResourceListKeys" + resource_group_name: str, + namespace_name: str, + notification_hub_name: str, + authorization_rule_name: str, + **kwargs: Any + ) -> "_models.ResourceListKeys": """Gets the Primary and Secondary ConnectionStrings to the NotificationHub. :param resource_group_name: The name of the resource group. @@ -1379,14 +1378,13 @@ def list_keys( @distributed_trace def regenerate_keys( self, - resource_group_name, # type: str - namespace_name, # type: str - notification_hub_name, # type: str - authorization_rule_name, # type: str - parameters, # type: "_models.PolicykeyResource" - **kwargs # type: Any - ): - # type: (...) -> "_models.ResourceListKeys" + resource_group_name: str, + namespace_name: str, + notification_hub_name: str, + authorization_rule_name: str, + parameters: "_models.PolicykeyResource", + **kwargs: Any + ) -> "_models.ResourceListKeys": """Regenerates the Primary/Secondary Keys to the NotificationHub Authorization Rule. :param resource_group_name: The name of the resource group. @@ -1449,12 +1447,11 @@ def regenerate_keys( @distributed_trace def get_pns_credentials( self, - resource_group_name, # type: str - namespace_name, # type: str - notification_hub_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> "_models.PnsCredentialsResource" + resource_group_name: str, + namespace_name: str, + notification_hub_name: str, + **kwargs: Any + ) -> "_models.PnsCredentialsResource": """Lists the PNS Credentials associated with a notification hub . :param resource_group_name: The name of the resource group. 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 19376e9908dac..5d85b572aa25d 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 @@ -6,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import functools -from typing import TYPE_CHECKING +from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar import warnings from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error @@ -20,21 +20,15 @@ from .. import models as _models from .._vendor import _convert_request - -if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports - from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar - T = TypeVar('T') - ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] _SERIALIZER = Serializer() _SERIALIZER.client_side_validation = False -# fmt: off def build_list_request( - **kwargs # type: Any -): - # type: (...) -> HttpRequest + **kwargs: Any +) -> HttpRequest: api_version = "2017-04-01" accept = "application/json" # Construct URL @@ -56,7 +50,6 @@ def build_list_request( **kwargs ) -# fmt: on class Operations(object): """Operations operations. @@ -82,9 +75,8 @@ def __init__(self, client, config, serializer, deserializer): @distributed_trace def list( self, - **kwargs # type: Any - ): - # type: (...) -> Iterable["_models.OperationListResult"] + **kwargs: Any + ) -> Iterable["_models.OperationListResult"]: """Lists all of the available NotificationHubs REST API operations. :keyword callable cls: A custom type or function that will be passed the direct response From 1c7d6a5cc56c0cbb19a65569078202d412d8e870 Mon Sep 17 00:00:00 2001 From: PythonSdkPipelines Date: Thu, 6 Jan 2022 07:18:48 +0000 Subject: [PATCH 2/5] version,CHANGELOG --- sdk/notificationhubs/azure-mgmt-notificationhubs/CHANGELOG.md | 4 ++++ .../azure/mgmt/notificationhubs/_version.py | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/sdk/notificationhubs/azure-mgmt-notificationhubs/CHANGELOG.md b/sdk/notificationhubs/azure-mgmt-notificationhubs/CHANGELOG.md index 3ae724805042d..35ae45d1ad69c 100644 --- a/sdk/notificationhubs/azure-mgmt-notificationhubs/CHANGELOG.md +++ b/sdk/notificationhubs/azure-mgmt-notificationhubs/CHANGELOG.md @@ -1,5 +1,9 @@ # Release History +## 0.0.0 (2022-01-06) + + + ## 8.0.0 (2022-01-05) **Breaking changes** 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 364f3c906cf92..9bd4c9b55137c 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 = "0.0.0" From faf32403d29a8c63e0e9ed1258c4b8bb5825ecaf Mon Sep 17 00:00:00 2001 From: PythonSdkPipelines Date: Thu, 6 Jan 2022 07:19:36 +0000 Subject: [PATCH 3/5] test --- ...mgmt_notificationhubs.test_namespaces.yaml | 37 +++++++------- ...tificationhubs.test_notification_hubs.yaml | 48 +++++++++++-------- 2 files changed, 48 insertions(+), 37 deletions(-) diff --git a/sdk/notificationhubs/azure-mgmt-notificationhubs/tests/recordings/test_mgmt_notificationhubs.test_namespaces.yaml b/sdk/notificationhubs/azure-mgmt-notificationhubs/tests/recordings/test_mgmt_notificationhubs.test_namespaces.yaml index 93b6c2a66b6fc..6e8fc88689fc9 100644 --- a/sdk/notificationhubs/azure-mgmt-notificationhubs/tests/recordings/test_mgmt_notificationhubs.test_namespaces.yaml +++ b/sdk/notificationhubs/azure-mgmt-notificationhubs/tests/recordings/test_mgmt_notificationhubs.test_namespaces.yaml @@ -13,7 +13,8 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-mgmt-notificationhubs/8.0.0 Python/3.6.9 (Linux-5.10.60.1-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-mgmt-notificationhubs/0.0.0 Python/3.8.12 (Linux-5.11.0-1022-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: PUT uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_notificationhubs_test_namespaces77d6115a/providers/Microsoft.NotificationHubs/namespaces/namespacexxx?api-version=2017-04-01 response: @@ -31,7 +32,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Mon, 20 Dec 2021 04:58:30 GMT + - Thu, 06 Jan 2022 07:19:19 GMT expires: - '-1' location: @@ -43,7 +44,7 @@ interactions: strict-transport-security: - max-age=31536000; includeSubDomains trackingid: - - 280804f7-b25d-4521-9748-03df63401f02 + - 0a3455dd-a41d-4906-94b6-8481e1b2b347 x-content-type-options: - nosniff x-ms-ratelimit-remaining-subscription-writes: @@ -61,24 +62,26 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-mgmt-notificationhubs/8.0.0 Python/3.6.9 (Linux-5.10.60.1-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-mgmt-notificationhubs/0.0.0 Python/3.8.12 (Linux-5.11.0-1022-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_notificationhubs_test_namespaces77d6115a/providers/Microsoft.NotificationHubs/namespaces/namespacexxx?api-version=2017-04-01 response: body: - string: '{"sku":{"name":"Free"},"properties":{"provisioningState":"Succeeded","status":"Active","createdAt":"2021-12-20T04:58:30.1900000Z","updatedAt":"2021-12-20T04:58:30.1970000Z","serviceBusEndpoint":"https://namespacexxx.servicebus.windows.net:443/","enabled":true,"critical":false,"zoneRedundant":false},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_notificationhubs_test_namespaces77d6115a/providers/Microsoft.NotificationHubs/namespaces/namespacexxx","name":"namespacexxx","type":"Microsoft.NotificationHubs/namespaces","location":"East - US","tags":{}}' + string: '{"properties":{"provisioningState":"InProgress","status":"Provisioning","zoneRedundant":false},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_notificationhubs_test_namespaces77d6115a/providers/Microsoft.NotificationHubs/namespaces/namespacexxx","name":"namespacexxx","type":"Microsoft.NotificationHubs/namespaces"}' headers: api-supported-versions: - 2014-09-01, 2016-03-01, 2017-04-01, 2020-01-01-preview + azure-asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_notificationhubs_test_namespaces77d6115a/providers/Microsoft.NotificationHubs/namespaces/namespacexxx/operations/Q3JlYXRlTmFtZXNwYWNlLTBiMWY2NDcxLTFiZjAtNGRkYS1hZWMzLWNiOTI3MmYwOTU5MC1uYW1lc3BhY2V4eHg7bmhwcm9kYmwyMDAxLTItZmFicmlj?api-version=2017-04-01 cache-control: - no-cache content-length: - - '591' + - '355' content-type: - application/json; charset=utf-8 date: - - Mon, 20 Dec 2021 04:58:31 GMT + - Thu, 06 Jan 2022 07:19:20 GMT expires: - '-1' pragma: @@ -88,7 +91,7 @@ interactions: strict-transport-security: - max-age=31536000; includeSubDomains trackingid: - - cc190c3a-6639-41e1-98f8-0299321c52d8 + - 35699d8b-f3fe-489f-99d5-b97f051f032a transfer-encoding: - chunked vary: @@ -112,12 +115,13 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-mgmt-notificationhubs/8.0.0 Python/3.6.9 (Linux-5.10.60.1-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-mgmt-notificationhubs/0.0.0 Python/3.8.12 (Linux-5.11.0-1022-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: PATCH uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_notificationhubs_test_namespaces77d6115a/providers/Microsoft.NotificationHubs/namespaces/namespacexxx?api-version=2017-04-01 response: body: - string: '{"sku":{"name":"Free"},"properties":{"status":"Active","createdAt":"2021-12-20T04:58:30.1900000Z","updatedAt":"2021-12-20T04:58:30.1970000Z","serviceBusEndpoint":"https://namespacexxx.servicebus.windows.net:443/","enabled":true,"critical":false,"zoneRedundant":false},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_notificationhubs_test_namespaces77d6115a/providers/Microsoft.NotificationHubs/namespaces/namespacexxx","name":"namespacexxx","type":"Microsoft.NotificationHubs/namespaces","location":"East + string: '{"sku":{"name":"Free"},"properties":{"status":"Active","createdAt":"2022-01-06T07:19:20.0370000Z","updatedAt":"2022-01-06T07:19:20.7400000Z","serviceBusEndpoint":"https://namespacexxx.servicebus.windows.net:443/","enabled":true,"critical":false,"zoneRedundant":false},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_notificationhubs_test_namespaces77d6115a/providers/Microsoft.NotificationHubs/namespaces/namespacexxx","name":"namespacexxx","type":"Microsoft.NotificationHubs/namespaces","location":"East US"}' headers: api-supported-versions: @@ -129,7 +133,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Mon, 20 Dec 2021 04:58:32 GMT + - Thu, 06 Jan 2022 07:19:21 GMT expires: - '-1' pragma: @@ -139,7 +143,7 @@ interactions: strict-transport-security: - max-age=31536000; includeSubDomains trackingid: - - 62ca047f-3b18-4984-b3d0-4f12a27f62c3 + - a5cd13c5-c968-44dc-b3d7-2b34a2427312 transfer-encoding: - chunked vary: @@ -163,7 +167,8 @@ interactions: Content-Length: - '0' User-Agent: - - azsdk-python-mgmt-notificationhubs/8.0.0 Python/3.6.9 (Linux-5.10.60.1-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-mgmt-notificationhubs/0.0.0 Python/3.8.12 (Linux-5.11.0-1022-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: DELETE uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_notificationhubs_test_namespaces77d6115a/providers/Microsoft.NotificationHubs/namespaces/namespacexxx?api-version=2017-04-01 response: @@ -175,7 +180,7 @@ interactions: cache-control: - no-cache date: - - Mon, 20 Dec 2021 04:58:35 GMT + - Thu, 06 Jan 2022 07:19:22 GMT expires: - '-1' pragma: @@ -185,7 +190,7 @@ interactions: strict-transport-security: - max-age=31536000; includeSubDomains trackingid: - - a7606b19-1336-4f0b-8417-e86dab9910ea + - ca638985-6996-4ee4-9121-5f36286e931b x-content-type-options: - nosniff x-ms-ratelimit-remaining-subscription-deletes: diff --git a/sdk/notificationhubs/azure-mgmt-notificationhubs/tests/recordings/test_mgmt_notificationhubs.test_notification_hubs.yaml b/sdk/notificationhubs/azure-mgmt-notificationhubs/tests/recordings/test_mgmt_notificationhubs.test_notification_hubs.yaml index e40199299a84a..5118c8fd002c7 100644 --- a/sdk/notificationhubs/azure-mgmt-notificationhubs/tests/recordings/test_mgmt_notificationhubs.test_notification_hubs.yaml +++ b/sdk/notificationhubs/azure-mgmt-notificationhubs/tests/recordings/test_mgmt_notificationhubs.test_notification_hubs.yaml @@ -13,7 +13,8 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-mgmt-notificationhubs/8.0.0 Python/3.6.9 (Linux-5.10.60.1-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-mgmt-notificationhubs/0.0.0 Python/3.8.12 (Linux-5.11.0-1022-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: PUT uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_notificationhubs_test_notification_hubsfdb71452/providers/Microsoft.NotificationHubs/namespaces/namespacexxz?api-version=2017-04-01 response: @@ -31,7 +32,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Mon, 20 Dec 2021 04:58:48 GMT + - Thu, 06 Jan 2022 07:19:30 GMT expires: - '-1' location: @@ -43,11 +44,11 @@ interactions: strict-transport-security: - max-age=31536000; includeSubDomains trackingid: - - 61c08b4f-0702-4d5f-a250-35e3d935b39a + - 9298108f-ae67-4d0d-a263-22a4d69bc51e x-content-type-options: - nosniff x-ms-ratelimit-remaining-subscription-writes: - - '1197' + - '1199' status: code: 201 message: Created @@ -61,24 +62,26 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-mgmt-notificationhubs/8.0.0 Python/3.6.9 (Linux-5.10.60.1-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-mgmt-notificationhubs/0.0.0 Python/3.8.12 (Linux-5.11.0-1022-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_notificationhubs_test_notification_hubsfdb71452/providers/Microsoft.NotificationHubs/namespaces/namespacexxz?api-version=2017-04-01 response: body: - string: '{"sku":{"name":"Free"},"properties":{"provisioningState":"Succeeded","status":"Active","createdAt":"2021-12-20T04:58:49.1470000Z","updatedAt":"2021-12-20T04:58:49.1600000Z","serviceBusEndpoint":"https://namespacexxz.servicebus.windows.net:443/","enabled":true,"critical":false,"zoneRedundant":false},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_notificationhubs_test_notification_hubsfdb71452/providers/Microsoft.NotificationHubs/namespaces/namespacexxz","name":"namespacexxz","type":"Microsoft.NotificationHubs/namespaces","location":"East - US","tags":{}}' + string: '{"properties":{"provisioningState":"InProgress","status":"Provisioning","zoneRedundant":false},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_notificationhubs_test_notification_hubsfdb71452/providers/Microsoft.NotificationHubs/namespaces/namespacexxz","name":"namespacexxz","type":"Microsoft.NotificationHubs/namespaces"}' headers: api-supported-versions: - 2014-09-01, 2016-03-01, 2017-04-01, 2020-01-01-preview + azure-asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_notificationhubs_test_notification_hubsfdb71452/providers/Microsoft.NotificationHubs/namespaces/namespacexxz/operations/Q3JlYXRlTmFtZXNwYWNlLTBiMWY2NDcxLTFiZjAtNGRkYS1hZWMzLWNiOTI3MmYwOTU5MC1uYW1lc3BhY2V4eHo7bmhwcm9kYmwyMDAxLTItZmFicmlj?api-version=2017-04-01 cache-control: - no-cache content-length: - - '598' + - '362' content-type: - application/json; charset=utf-8 date: - - Mon, 20 Dec 2021 04:58:48 GMT + - Thu, 06 Jan 2022 07:19:31 GMT expires: - '-1' pragma: @@ -88,7 +91,7 @@ interactions: strict-transport-security: - max-age=31536000; includeSubDomains trackingid: - - 268281eb-bafa-4677-9902-55aaf403ef00 + - 988ca325-f666-44b1-b2e2-dfbad557d055 transfer-encoding: - chunked vary: @@ -112,7 +115,8 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-mgmt-notificationhubs/8.0.0 Python/3.6.9 (Linux-5.10.60.1-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-mgmt-notificationhubs/0.0.0 Python/3.8.12 (Linux-5.11.0-1022-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: PUT uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_notificationhubs_test_notification_hubsfdb71452/providers/Microsoft.NotificationHubs/namespaces/namespacexxz/notificationHubs/notificationhubxxzx?api-version=2017-04-01 response: @@ -129,7 +133,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Mon, 20 Dec 2021 04:58:53 GMT + - Thu, 06 Jan 2022 07:19:33 GMT expires: - '-1' pragma: @@ -139,11 +143,11 @@ interactions: strict-transport-security: - max-age=31536000; includeSubDomains trackingid: - - 7051bc01-fa72-4ca2-bd32-8b87db8af518 + - a3c63d5f-0e78-450c-acc3-140b9ab3075d x-content-type-options: - nosniff x-ms-ratelimit-remaining-subscription-writes: - - '1196' + - '1198' status: code: 201 message: Created @@ -157,7 +161,8 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-mgmt-notificationhubs/8.0.0 Python/3.6.9 (Linux-5.10.60.1-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-mgmt-notificationhubs/0.0.0 Python/3.8.12 (Linux-5.11.0-1022-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_notificationhubs_test_notification_hubsfdb71452/providers/Microsoft.NotificationHubs/namespaces/namespacexxz/notificationHubs/notificationhubxxzx?api-version=2017-04-01 response: @@ -174,7 +179,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Mon, 20 Dec 2021 04:58:53 GMT + - Thu, 06 Jan 2022 07:19:33 GMT expires: - '-1' pragma: @@ -184,7 +189,7 @@ interactions: strict-transport-security: - max-age=31536000; includeSubDomains trackingid: - - 9fb7ffe6-17e9-46f7-ae2c-bb47a604b637 + - 3c3051fa-d3ff-4c65-91ed-bbf283ff0505 transfer-encoding: - chunked vary: @@ -206,7 +211,8 @@ interactions: Content-Length: - '0' User-Agent: - - azsdk-python-mgmt-notificationhubs/8.0.0 Python/3.6.9 (Linux-5.10.60.1-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-mgmt-notificationhubs/0.0.0 Python/3.8.12 (Linux-5.11.0-1022-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: DELETE uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_notificationhubs_test_notification_hubsfdb71452/providers/Microsoft.NotificationHubs/namespaces/namespacexxz/notificationHubs/notificationhubxxzx?api-version=2017-04-01 response: @@ -220,7 +226,7 @@ interactions: content-length: - '0' date: - - Mon, 20 Dec 2021 04:58:57 GMT + - Thu, 06 Jan 2022 07:19:34 GMT expires: - '-1' pragma: @@ -230,11 +236,11 @@ interactions: strict-transport-security: - max-age=31536000; includeSubDomains trackingid: - - 30b4852f-04ac-4cda-9850-e83fda655268 + - 42f0bcff-9543-4a7e-896f-8429f2586ae9 x-content-type-options: - nosniff x-ms-ratelimit-remaining-subscription-deletes: - - '14998' + - '14999' status: code: 200 message: OK From 07530fe6be9a445f155ce86bddd2f2eeaf08e1b0 Mon Sep 17 00:00:00 2001 From: Yuchao Yan Date: Thu, 6 Jan 2022 17:02:29 +0800 Subject: [PATCH 4/5] Update CHANGELOG.md --- .../azure-mgmt-notificationhubs/CHANGELOG.md | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/sdk/notificationhubs/azure-mgmt-notificationhubs/CHANGELOG.md b/sdk/notificationhubs/azure-mgmt-notificationhubs/CHANGELOG.md index 35ae45d1ad69c..7353e82476db0 100644 --- a/sdk/notificationhubs/azure-mgmt-notificationhubs/CHANGELOG.md +++ b/sdk/notificationhubs/azure-mgmt-notificationhubs/CHANGELOG.md @@ -1,10 +1,6 @@ # Release History -## 0.0.0 (2022-01-06) - - - -## 8.0.0 (2022-01-05) +## 8.0.0 (2022-01-06) **Breaking changes** From 999756a054ba533f60e5eb59cc747f2c1eafd17a Mon Sep 17 00:00:00 2001 From: Yuchao Yan Date: Thu, 6 Jan 2022 17:03:03 +0800 Subject: [PATCH 5/5] Update _version.py --- .../azure/mgmt/notificationhubs/_version.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 9bd4c9b55137c..142a0420b39b4 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 = "0.0.0" +VERSION = "8.0.0"