diff --git a/sdk/notificationhubs/azure-mgmt-notificationhubs/README.md b/sdk/notificationhubs/azure-mgmt-notificationhubs/README.md index 5d165bc52d1c..4160418b6e49 100644 --- a/sdk/notificationhubs/azure-mgmt-notificationhubs/README.md +++ b/sdk/notificationhubs/azure-mgmt-notificationhubs/README.md @@ -1,29 +1,21 @@ -## Microsoft Azure SDK for Python +# Microsoft Azure SDK for Python This is the Microsoft Azure Notification Hubs Management Client Library. +This package has been tested with Python 2.7, 3.5, 3.6, 3.7 and 3.8. +For a more complete view of Azure libraries, see the [Github repo](https://github.com/Azure/azure-sdk-for-python/) -Azure Resource Manager (ARM) is the next generation of management APIs -that replace the old Azure Service Management (ASM). -This package has been tested with Python 2.7, 3.4, 3.5, 3.6 and 3.7. +# Usage -For the older Azure Service Management (ASM) libraries, see -[azure-servicemanagement-legacy](https://pypi.python.org/pypi/azure-servicemanagement-legacy) -library. - -For a more complete set of Azure libraries, see the -[azure](https://pypi.python.org/pypi/azure) bundle package. - -## Usage - -For code examples, see [Notification Hubs -Management](https://docs.microsoft.com/python/api/overview/azure/notification-hubs) +For code examples, see [Notification Hubs Management](https://docs.microsoft.com/python/api/overview/azure/notification-hubs) on docs.microsoft.com. -## Provide Feedback -If you encounter any bugs or have suggestions, please file an issue in -the [Issues](https://github.com/Azure/azure-sdk-for-python/issues) +# Provide Feedback + +If you encounter any bugs or have suggestions, please file an issue in the +[Issues](https://github.com/Azure/azure-sdk-for-python/issues) section of the project. -![image](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-python%2Fazure-mgmt-notificationhubs%2FREADME.png) + +![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-python%2Fazure-mgmt-notificationhubs%2FREADME.png) diff --git a/sdk/notificationhubs/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/__init__.py b/sdk/notificationhubs/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/__init__.py index 370910c1e9bf..4b6ca30ef612 100644 --- a/sdk/notificationhubs/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/__init__.py +++ b/sdk/notificationhubs/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/__init__.py @@ -9,10 +9,11 @@ # regenerated. # -------------------------------------------------------------------------- -from .notification_hubs_management_client import NotificationHubsManagementClient -from .version import VERSION +from ._configuration import NotificationHubsManagementClientConfiguration +from ._notification_hubs_management_client import NotificationHubsManagementClient +__all__ = ['NotificationHubsManagementClient', 'NotificationHubsManagementClientConfiguration'] -__all__ = ['NotificationHubsManagementClient'] +from .version import VERSION __version__ = VERSION diff --git a/sdk/notificationhubs/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/_configuration.py b/sdk/notificationhubs/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/_configuration.py new file mode 100644 index 000000000000..636d7656abcb --- /dev/null +++ b/sdk/notificationhubs/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/_configuration.py @@ -0,0 +1,50 @@ +# 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 msrestazure import AzureConfiguration + +from .version import VERSION + + +class NotificationHubsManagementClientConfiguration(AzureConfiguration): + """Configuration for NotificationHubsManagementClient + Note that all parameters used to create this instance are saved as instance + attributes. + + :param credentials: Credentials needed for the client to connect to Azure. + :type credentials: :mod:`A msrestazure Credentials + object` + :param subscription_id: Gets subscription credentials which uniquely + identify Microsoft Azure subscription. The subscription ID forms part of + the URI for every service call. + :type subscription_id: str + :param str base_url: Service URL + """ + + def __init__( + self, credentials, subscription_id, base_url=None): + + if credentials is None: + raise ValueError("Parameter 'credentials' must not be None.") + if subscription_id is None: + raise ValueError("Parameter 'subscription_id' must not be None.") + if not base_url: + base_url = 'https://management.azure.com' + + super(NotificationHubsManagementClientConfiguration, self).__init__(base_url) + + # Starting Autorest.Python 4.0.64, make connection pool activated by default + self.keep_alive = True + + self.add_user_agent('azure-mgmt-notificationhubs/{}'.format(VERSION)) + self.add_user_agent('Azure-SDK-For-Python') + + self.credentials = credentials + self.subscription_id = subscription_id 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 similarity index 60% rename from sdk/notificationhubs/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/notification_hubs_management_client.py rename to sdk/notificationhubs/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/_notification_hubs_management_client.py index 8ffd380593cc..bf1e4ad5b7b9 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 @@ -11,46 +11,12 @@ from msrest.service_client import SDKClient from msrest import Serializer, Deserializer -from msrestazure import AzureConfiguration -from .version import VERSION -from .operations.operations import Operations -from .operations.namespaces_operations import NamespacesOperations -from .operations.notification_hubs_operations import NotificationHubsOperations -from . import models - - -class NotificationHubsManagementClientConfiguration(AzureConfiguration): - """Configuration for NotificationHubsManagementClient - Note that all parameters used to create this instance are saved as instance - attributes. - - :param credentials: Credentials needed for the client to connect to Azure. - :type credentials: :mod:`A msrestazure Credentials - object` - :param subscription_id: Gets subscription credentials which uniquely - identify Microsoft Azure subscription. The subscription ID forms part of - the URI for every service call. - :type subscription_id: str - :param str base_url: Service URL - """ - - def __init__( - self, credentials, subscription_id, base_url=None): - - if credentials is None: - raise ValueError("Parameter 'credentials' must not be None.") - if subscription_id is None: - raise ValueError("Parameter 'subscription_id' must not be None.") - if not base_url: - base_url = 'https://management.azure.com' - - super(NotificationHubsManagementClientConfiguration, self).__init__(base_url) - self.add_user_agent('azure-mgmt-notificationhubs/{}'.format(VERSION)) - self.add_user_agent('Azure-SDK-For-Python') - - self.credentials = credentials - self.subscription_id = subscription_id +from ._configuration import NotificationHubsManagementClientConfiguration +from .operations import Operations +from .operations import NamespacesOperations +from .operations import NotificationHubsOperations +from . import models class NotificationHubsManagementClient(SDKClient): 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 6e7e9ee3b381..e6d1630d5ed4 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 @@ -10,102 +10,102 @@ # -------------------------------------------------------------------------- try: - from .operation_display_py3 import OperationDisplay - from .operation_py3 import Operation - from .error_response_py3 import ErrorResponse, ErrorResponseException - from .sku_py3 import Sku - from .check_availability_parameters_py3 import CheckAvailabilityParameters - from .check_availability_result_py3 import CheckAvailabilityResult - from .namespace_create_or_update_parameters_py3 import NamespaceCreateOrUpdateParameters - from .namespace_patch_parameters_py3 import NamespacePatchParameters - from .namespace_resource_py3 import NamespaceResource - from .shared_access_authorization_rule_properties_py3 import SharedAccessAuthorizationRuleProperties - from .shared_access_authorization_rule_create_or_update_parameters_py3 import SharedAccessAuthorizationRuleCreateOrUpdateParameters - from .shared_access_authorization_rule_resource_py3 import SharedAccessAuthorizationRuleResource - from .shared_access_authorization_rule_list_result_py3 import SharedAccessAuthorizationRuleListResult - from .resource_list_keys_py3 import ResourceListKeys - from .policykey_resource_py3 import PolicykeyResource - from .apns_credential_py3 import ApnsCredential - from .wns_credential_py3 import WnsCredential - from .gcm_credential_py3 import GcmCredential - from .mpns_credential_py3 import MpnsCredential - from .adm_credential_py3 import AdmCredential - from .baidu_credential_py3 import BaiduCredential - from .notification_hub_create_or_update_parameters_py3 import NotificationHubCreateOrUpdateParameters - from .notification_hub_patch_parameters_py3 import NotificationHubPatchParameters - from .notification_hub_resource_py3 import NotificationHubResource - from .debug_send_response_py3 import DebugSendResponse - from .pns_credentials_resource_py3 import PnsCredentialsResource - from .resource_py3 import Resource - from .sub_resource_py3 import SubResource + 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, ErrorResponseException + from ._models_py3 import GcmCredential + from ._models_py3 import MpnsCredential + from ._models_py3 import NamespaceCreateOrUpdateParameters + from ._models_py3 import NamespacePatchParameters + from ._models_py3 import NamespaceResource + from ._models_py3 import NotificationHubCreateOrUpdateParameters + from ._models_py3 import NotificationHubPatchParameters + from ._models_py3 import NotificationHubResource + from ._models_py3 import Operation + from ._models_py3 import OperationDisplay + 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 .operation_display import OperationDisplay - from .operation import Operation - from .error_response import ErrorResponse, ErrorResponseException - from .sku import Sku - from .check_availability_parameters import CheckAvailabilityParameters - from .check_availability_result import CheckAvailabilityResult - from .namespace_create_or_update_parameters import NamespaceCreateOrUpdateParameters - from .namespace_patch_parameters import NamespacePatchParameters - from .namespace_resource import NamespaceResource - from .shared_access_authorization_rule_properties import SharedAccessAuthorizationRuleProperties - from .shared_access_authorization_rule_create_or_update_parameters import SharedAccessAuthorizationRuleCreateOrUpdateParameters - from .shared_access_authorization_rule_resource import SharedAccessAuthorizationRuleResource - from .shared_access_authorization_rule_list_result import SharedAccessAuthorizationRuleListResult - from .resource_list_keys import ResourceListKeys - from .policykey_resource import PolicykeyResource - from .apns_credential import ApnsCredential - from .wns_credential import WnsCredential - from .gcm_credential import GcmCredential - from .mpns_credential import MpnsCredential - from .adm_credential import AdmCredential - from .baidu_credential import BaiduCredential - from .notification_hub_create_or_update_parameters import NotificationHubCreateOrUpdateParameters - from .notification_hub_patch_parameters import NotificationHubPatchParameters - from .notification_hub_resource import NotificationHubResource - from .debug_send_response import DebugSendResponse - from .pns_credentials_resource import PnsCredentialsResource - from .resource import Resource - from .sub_resource import SubResource -from .operation_paged import OperationPaged -from .namespace_resource_paged import NamespaceResourcePaged -from .shared_access_authorization_rule_resource_paged import SharedAccessAuthorizationRuleResourcePaged -from .notification_hub_resource_paged import NotificationHubResourcePaged -from .notification_hubs_management_client_enums import ( + from ._models import AdmCredential + from ._models import ApnsCredential + from ._models import BaiduCredential + from ._models import CheckAvailabilityParameters + from ._models import CheckAvailabilityResult + from ._models import DebugSendResponse + from ._models import ErrorResponse, ErrorResponseException + from ._models import GcmCredential + from ._models import MpnsCredential + from ._models import NamespaceCreateOrUpdateParameters + from ._models import NamespacePatchParameters + from ._models import NamespaceResource + from ._models import NotificationHubCreateOrUpdateParameters + from ._models import NotificationHubPatchParameters + from ._models import NotificationHubResource + from ._models import Operation + from ._models import OperationDisplay + from ._models import PnsCredentialsResource + from ._models import PolicykeyResource + from ._models import Resource + from ._models import ResourceListKeys + from ._models import SharedAccessAuthorizationRuleCreateOrUpdateParameters + from ._models import SharedAccessAuthorizationRuleListResult + from ._models import SharedAccessAuthorizationRuleProperties + from ._models import SharedAccessAuthorizationRuleResource + from ._models import Sku + from ._models import SubResource + from ._models import WnsCredential +from ._paged_models import NamespaceResourcePaged +from ._paged_models import NotificationHubResourcePaged +from ._paged_models import OperationPaged +from ._paged_models import SharedAccessAuthorizationRuleResourcePaged +from ._notification_hubs_management_client_enums import ( SkuName, NamespaceType, AccessRights, ) __all__ = [ - 'OperationDisplay', - 'Operation', - 'ErrorResponse', 'ErrorResponseException', - 'Sku', + 'AdmCredential', + 'ApnsCredential', + 'BaiduCredential', 'CheckAvailabilityParameters', 'CheckAvailabilityResult', + 'DebugSendResponse', + 'ErrorResponse', 'ErrorResponseException', + 'GcmCredential', + 'MpnsCredential', 'NamespaceCreateOrUpdateParameters', 'NamespacePatchParameters', 'NamespaceResource', - 'SharedAccessAuthorizationRuleProperties', - 'SharedAccessAuthorizationRuleCreateOrUpdateParameters', - 'SharedAccessAuthorizationRuleResource', - 'SharedAccessAuthorizationRuleListResult', - 'ResourceListKeys', - 'PolicykeyResource', - 'ApnsCredential', - 'WnsCredential', - 'GcmCredential', - 'MpnsCredential', - 'AdmCredential', - 'BaiduCredential', 'NotificationHubCreateOrUpdateParameters', 'NotificationHubPatchParameters', 'NotificationHubResource', - 'DebugSendResponse', + 'Operation', + 'OperationDisplay', 'PnsCredentialsResource', + 'PolicykeyResource', 'Resource', + 'ResourceListKeys', + 'SharedAccessAuthorizationRuleCreateOrUpdateParameters', + 'SharedAccessAuthorizationRuleListResult', + 'SharedAccessAuthorizationRuleProperties', + 'SharedAccessAuthorizationRuleResource', + 'Sku', 'SubResource', + 'WnsCredential', 'OperationPaged', 'NamespaceResourcePaged', 'SharedAccessAuthorizationRuleResourcePaged', 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 new file mode 100644 index 000000000000..0f87e68b54a4 --- /dev/null +++ b/sdk/notificationhubs/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/_models.py @@ -0,0 +1,1324 @@ +# 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 msrest.serialization import Model +from msrest.exceptions import HttpOperationError + + +class AdmCredential(Model): + """Description of a NotificationHub AdmCredential. + + :param client_id: The client identifier. + :type client_id: str + :param client_secret: The credential secret access key. + :type client_secret: str + :param auth_token_url: The URL of the authorization token. + :type 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): + 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(Model): + """Description of a NotificationHub ApnsCredential. + + :param apns_certificate: The APNS certificate. Specify if using + Certificate Authentication Mode. + :type apns_certificate: str + :param certificate_key: The APNS certificate password if it exists. + :type certificate_key: str + :param 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'. + :type endpoint: str + :param thumbprint: The APNS certificate thumbprint. Specify if using + Certificate Authentication Mode. + :type thumbprint: str + :param key_id: A 10-character key identifier (kid) key, obtained from your + developer account. Specify if using Token Authentication Mode. + :type key_id: str + :param app_name: The name of the application or BundleId. Specify if using + Token Authentication Mode. + :type app_name: str + :param 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. + :type app_id: str + :param token: Provider Authentication Token, obtained through your + developer account. Specify if using Token Authentication Mode. + :type 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): + 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(Model): + """Description of a NotificationHub BaiduCredential. + + :param baidu_api_key: Baidu Api Key. + :type baidu_api_key: str + :param baidu_end_point: Baidu Endpoint. + :type baidu_end_point: str + :param baidu_secret_key: Baidu Secret Key + :type 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): + 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(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 + :param name: Required. Resource name + :type name: str + :ivar type: Resource type + :vartype type: str + :param location: Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + :param sku: The sku of the created namespace + :type sku: ~azure.mgmt.notificationhubs.models.Sku + :param is_availiable: True if the name is available and can be used to + create new Namespace/NotificationHub. Otherwise false. + :type 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): + super(CheckAvailabilityParameters, self).__init__(**kwargs) + self.id = None + self.name = kwargs.get('name', None) + 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(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 + :param location: Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + :param sku: The sku of the created namespace + :type 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): + 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 + :param location: Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + :param sku: The sku of the created namespace + :type sku: ~azure.mgmt.notificationhubs.models.Sku + :param is_availiable: True if the name is available and can be used to + create new Namespace/NotificationHub. Otherwise false. + :type 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): + super(CheckAvailabilityResult, self).__init__(**kwargs) + self.is_availiable = kwargs.get('is_availiable', None) + + +class CloudError(Model): + """CloudError. + """ + + _attribute_map = { + } + + +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 + :param location: Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + :param sku: The sku of the created namespace + :type sku: ~azure.mgmt.notificationhubs.models.Sku + :param success: successful send + :type success: float + :param failure: send failure + :type failure: float + :param results: actual failure description + :type results: object + """ + + _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): + 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(Model): + """Error response indicates NotificationHubs service is not able to process + the incoming request. The reason is provided in the error message. + + :param code: Error code. + :type code: str + :param message: Error message indicating why the operation failed. + :type message: str + """ + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ErrorResponse, self).__init__(**kwargs) + self.code = kwargs.get('code', None) + self.message = kwargs.get('message', None) + + +class ErrorResponseException(HttpOperationError): + """Server responsed with exception of type: 'ErrorResponse'. + + :param deserialize: A deserializer + :param response: Server response to be deserialized. + """ + + def __init__(self, deserialize, response, *args): + + super(ErrorResponseException, self).__init__(deserialize, response, 'ErrorResponse', *args) + + +class GcmCredential(Model): + """Description of a NotificationHub GcmCredential. + + :param gcm_endpoint: The FCM legacy endpoint. Default value is + 'https://fcm.googleapis.com/fcm/send' + :type gcm_endpoint: str + :param google_api_key: The Google API key. + :type 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): + 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(Model): + """Description of a NotificationHub MpnsCredential. + + :param mpns_certificate: The MPNS certificate. + :type mpns_certificate: str + :param certificate_key: The certificate key for this credential. + :type certificate_key: str + :param thumbprint: The MPNS certificate Thumbprint + :type 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): + 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 + :param location: Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + :param sku: The sku of the created namespace + :type sku: ~azure.mgmt.notificationhubs.models.Sku + :param namespace_create_or_update_parameters_name: The name of the + namespace. + :type namespace_create_or_update_parameters_name: str + :param provisioning_state: Provisioning state of the Namespace. + :type provisioning_state: str + :param 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 + :type region: str + :ivar metric_id: Identifier for Azure Insights metrics + :vartype metric_id: str + :param status: Status of the namespace. It can be any of these values:1 = + Created/Active2 = Creating3 = Suspended4 = Deleting + :type status: str + :param created_at: The time the namespace was created. + :type created_at: datetime + :param updated_at: The time the namespace was updated. + :type updated_at: datetime + :param service_bus_endpoint: Endpoint you can use to perform + NotificationHub operations. + :type service_bus_endpoint: str + :param subscription_id: The Id of the Azure subscription associated with + the namespace. + :type subscription_id: str + :param scale_unit: ScaleUnit where the namespace gets created + :type scale_unit: str + :param enabled: Whether or not the namespace is currently enabled. + :type enabled: bool + :param critical: Whether or not the namespace is set as Critical. + :type critical: bool + :param data_center: Data center for the namespace + :type data_center: str + :param namespace_type: The namespace type. Possible values include: + 'Messaging', 'NotificationHub' + :type 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'}, + 'namespace_create_or_update_parameters_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': 'NamespaceType'}, + } + + def __init__(self, **kwargs): + super(NamespaceCreateOrUpdateParameters, self).__init__(**kwargs) + self.namespace_create_or_update_parameters_name = kwargs.get('namespace_create_or_update_parameters_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 NamespacePatchParameters(Model): + """Parameters supplied to the Patch Namespace operation. + + :param tags: Resource tags + :type tags: dict[str, str] + :param sku: The sku of the created namespace + :type sku: ~azure.mgmt.notificationhubs.models.Sku + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + } + + def __init__(self, **kwargs): + 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 + :param location: Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + :param sku: The sku of the created namespace + :type sku: ~azure.mgmt.notificationhubs.models.Sku + :param namespace_resource_name: The name of the namespace. + :type namespace_resource_name: str + :param provisioning_state: Provisioning state of the Namespace. + :type provisioning_state: str + :param 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 + :type region: str + :ivar metric_id: Identifier for Azure Insights metrics + :vartype metric_id: str + :param status: Status of the namespace. It can be any of these values:1 = + Created/Active2 = Creating3 = Suspended4 = Deleting + :type status: str + :param created_at: The time the namespace was created. + :type created_at: datetime + :param updated_at: The time the namespace was updated. + :type updated_at: datetime + :param service_bus_endpoint: Endpoint you can use to perform + NotificationHub operations. + :type service_bus_endpoint: str + :param subscription_id: The Id of the Azure subscription associated with + the namespace. + :type subscription_id: str + :param scale_unit: ScaleUnit where the namespace gets created + :type scale_unit: str + :param enabled: Whether or not the namespace is currently enabled. + :type enabled: bool + :param critical: Whether or not the namespace is set as Critical. + :type critical: bool + :param data_center: Data center for the namespace + :type data_center: str + :param namespace_type: The namespace type. Possible values include: + 'Messaging', 'NotificationHub' + :type 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'}, + 'namespace_resource_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': 'NamespaceType'}, + } + + def __init__(self, **kwargs): + super(NamespaceResource, self).__init__(**kwargs) + self.namespace_resource_name = kwargs.get('namespace_resource_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 + :param location: Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + :param sku: The sku of the created namespace + :type sku: ~azure.mgmt.notificationhubs.models.Sku + :param notification_hub_create_or_update_parameters_name: The + NotificationHub name. + :type notification_hub_create_or_update_parameters_name: str + :param registration_ttl: The RegistrationTtl of the created + NotificationHub + :type registration_ttl: str + :param authorization_rules: The AuthorizationRules of the created + NotificationHub + :type authorization_rules: + list[~azure.mgmt.notificationhubs.models.SharedAccessAuthorizationRuleProperties] + :param apns_credential: The ApnsCredential of the created NotificationHub + :type apns_credential: ~azure.mgmt.notificationhubs.models.ApnsCredential + :param wns_credential: The WnsCredential of the created NotificationHub + :type wns_credential: ~azure.mgmt.notificationhubs.models.WnsCredential + :param gcm_credential: The GcmCredential of the created NotificationHub + :type gcm_credential: ~azure.mgmt.notificationhubs.models.GcmCredential + :param mpns_credential: The MpnsCredential of the created NotificationHub + :type mpns_credential: ~azure.mgmt.notificationhubs.models.MpnsCredential + :param adm_credential: The AdmCredential of the created NotificationHub + :type adm_credential: ~azure.mgmt.notificationhubs.models.AdmCredential + :param baidu_credential: The BaiduCredential of the created + NotificationHub + :type 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'}, + 'notification_hub_create_or_update_parameters_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): + super(NotificationHubCreateOrUpdateParameters, self).__init__(**kwargs) + self.notification_hub_create_or_update_parameters_name = kwargs.get('notification_hub_create_or_update_parameters_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 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 + :param location: Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + :param sku: The sku of the created namespace + :type sku: ~azure.mgmt.notificationhubs.models.Sku + :param notification_hub_patch_parameters_name: The NotificationHub name. + :type notification_hub_patch_parameters_name: str + :param registration_ttl: The RegistrationTtl of the created + NotificationHub + :type registration_ttl: str + :param authorization_rules: The AuthorizationRules of the created + NotificationHub + :type authorization_rules: + list[~azure.mgmt.notificationhubs.models.SharedAccessAuthorizationRuleProperties] + :param apns_credential: The ApnsCredential of the created NotificationHub + :type apns_credential: ~azure.mgmt.notificationhubs.models.ApnsCredential + :param wns_credential: The WnsCredential of the created NotificationHub + :type wns_credential: ~azure.mgmt.notificationhubs.models.WnsCredential + :param gcm_credential: The GcmCredential of the created NotificationHub + :type gcm_credential: ~azure.mgmt.notificationhubs.models.GcmCredential + :param mpns_credential: The MpnsCredential of the created NotificationHub + :type mpns_credential: ~azure.mgmt.notificationhubs.models.MpnsCredential + :param adm_credential: The AdmCredential of the created NotificationHub + :type adm_credential: ~azure.mgmt.notificationhubs.models.AdmCredential + :param baidu_credential: The BaiduCredential of the created + NotificationHub + :type 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'}, + 'notification_hub_patch_parameters_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): + super(NotificationHubPatchParameters, self).__init__(**kwargs) + self.notification_hub_patch_parameters_name = kwargs.get('notification_hub_patch_parameters_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 + :param location: Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + :param sku: The sku of the created namespace + :type sku: ~azure.mgmt.notificationhubs.models.Sku + :param notification_hub_resource_name: The NotificationHub name. + :type notification_hub_resource_name: str + :param registration_ttl: The RegistrationTtl of the created + NotificationHub + :type registration_ttl: str + :param authorization_rules: The AuthorizationRules of the created + NotificationHub + :type authorization_rules: + list[~azure.mgmt.notificationhubs.models.SharedAccessAuthorizationRuleProperties] + :param apns_credential: The ApnsCredential of the created NotificationHub + :type apns_credential: ~azure.mgmt.notificationhubs.models.ApnsCredential + :param wns_credential: The WnsCredential of the created NotificationHub + :type wns_credential: ~azure.mgmt.notificationhubs.models.WnsCredential + :param gcm_credential: The GcmCredential of the created NotificationHub + :type gcm_credential: ~azure.mgmt.notificationhubs.models.GcmCredential + :param mpns_credential: The MpnsCredential of the created NotificationHub + :type mpns_credential: ~azure.mgmt.notificationhubs.models.MpnsCredential + :param adm_credential: The AdmCredential of the created NotificationHub + :type adm_credential: ~azure.mgmt.notificationhubs.models.AdmCredential + :param baidu_credential: The BaiduCredential of the created + NotificationHub + :type 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'}, + 'notification_hub_resource_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): + super(NotificationHubResource, self).__init__(**kwargs) + self.notification_hub_resource_name = kwargs.get('notification_hub_resource_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(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 + :param display: The object that represents the operation. + :type 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): + super(Operation, self).__init__(**kwargs) + self.name = None + self.display = kwargs.get('display', None) + + +class OperationDisplay(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 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 + :param location: Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + :param sku: The sku of the created namespace + :type sku: ~azure.mgmt.notificationhubs.models.Sku + :param apns_credential: The ApnsCredential of the created NotificationHub + :type apns_credential: ~azure.mgmt.notificationhubs.models.ApnsCredential + :param wns_credential: The WnsCredential of the created NotificationHub + :type wns_credential: ~azure.mgmt.notificationhubs.models.WnsCredential + :param gcm_credential: The GcmCredential of the created NotificationHub + :type gcm_credential: ~azure.mgmt.notificationhubs.models.GcmCredential + :param mpns_credential: The MpnsCredential of the created NotificationHub + :type mpns_credential: ~azure.mgmt.notificationhubs.models.MpnsCredential + :param adm_credential: The AdmCredential of the created NotificationHub + :type adm_credential: ~azure.mgmt.notificationhubs.models.AdmCredential + :param baidu_credential: The BaiduCredential of the created + NotificationHub + :type 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): + 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(Model): + """Namespace/NotificationHub Regenerate Keys. + + :param 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. + :type policy_key: str + """ + + _attribute_map = { + 'policy_key': {'key': 'policyKey', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(PolicykeyResource, self).__init__(**kwargs) + self.policy_key = kwargs.get('policy_key', None) + + +class ResourceListKeys(Model): + """Namespace/NotificationHub Connection String. + + :param primary_connection_string: PrimaryConnectionString of the + AuthorizationRule. + :type primary_connection_string: str + :param secondary_connection_string: SecondaryConnectionString of the + created AuthorizationRule + :type secondary_connection_string: str + :param primary_key: PrimaryKey of the created AuthorizationRule. + :type primary_key: str + :param secondary_key: SecondaryKey of the created AuthorizationRule + :type secondary_key: str + :param key_name: KeyName of the created AuthorizationRule + :type 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): + 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(Model): + """Parameters supplied to the CreateOrUpdate Namespace AuthorizationRules. + + All required parameters must be populated in order to send to Azure. + + :param properties: Required. Properties of the Namespace + AuthorizationRules. + :type properties: + ~azure.mgmt.notificationhubs.models.SharedAccessAuthorizationRuleProperties + """ + + _validation = { + 'properties': {'required': True}, + } + + _attribute_map = { + 'properties': {'key': 'properties', 'type': 'SharedAccessAuthorizationRuleProperties'}, + } + + def __init__(self, **kwargs): + super(SharedAccessAuthorizationRuleCreateOrUpdateParameters, self).__init__(**kwargs) + self.properties = kwargs.get('properties', None) + + +class SharedAccessAuthorizationRuleListResult(Model): + """The response of the List Namespace operation. + + :param value: Result of the List AuthorizationRules operation. + :type value: + list[~azure.mgmt.notificationhubs.models.SharedAccessAuthorizationRuleResource] + :param next_link: Link to the next set of results. Not empty if Value + contains incomplete list of AuthorizationRules + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[SharedAccessAuthorizationRuleResource]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(SharedAccessAuthorizationRuleListResult, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.next_link = kwargs.get('next_link', None) + + +class SharedAccessAuthorizationRuleProperties(Model): + """SharedAccessAuthorizationRule properties. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param rights: The rights associated with the rule. + :type 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': '[AccessRights]'}, + '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): + 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 + :param location: Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + :param sku: The sku of the created namespace + :type sku: ~azure.mgmt.notificationhubs.models.Sku + :param rights: The rights associated with the rule. + :type 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': '[AccessRights]'}, + '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): + 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(Model): + """The Sku description for a namespace. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. Name of the notification hub sku. Possible values + include: 'Free', 'Basic', 'Standard' + :type name: str or ~azure.mgmt.notificationhubs.models.SkuName + :param tier: The tier of particular sku + :type tier: str + :param size: The Sku size + :type size: str + :param family: The Sku Family + :type family: str + :param capacity: The capacity of the resource + :type 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): + super(Sku, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + 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(Model): + """SubResource. + + :param id: Resource Id + :type id: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(SubResource, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + + +class WnsCredential(Model): + """Description of a NotificationHub WnsCredential. + + :param package_sid: The package ID for this credential. + :type package_sid: str + :param secret_key: The secret key. + :type secret_key: str + :param windows_live_endpoint: The Windows Live endpoint. + :type 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): + 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/models/_models_py3.py b/sdk/notificationhubs/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/_models_py3.py new file mode 100644 index 000000000000..fed4ad81dc30 --- /dev/null +++ b/sdk/notificationhubs/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/_models_py3.py @@ -0,0 +1,1324 @@ +# 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 msrest.serialization import Model +from msrest.exceptions import HttpOperationError + + +class AdmCredential(Model): + """Description of a NotificationHub AdmCredential. + + :param client_id: The client identifier. + :type client_id: str + :param client_secret: The credential secret access key. + :type client_secret: str + :param auth_token_url: The URL of the authorization token. + :type 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, *, client_id: str=None, client_secret: str=None, auth_token_url: str=None, **kwargs) -> None: + super(AdmCredential, self).__init__(**kwargs) + self.client_id = client_id + self.client_secret = client_secret + self.auth_token_url = auth_token_url + + +class ApnsCredential(Model): + """Description of a NotificationHub ApnsCredential. + + :param apns_certificate: The APNS certificate. Specify if using + Certificate Authentication Mode. + :type apns_certificate: str + :param certificate_key: The APNS certificate password if it exists. + :type certificate_key: str + :param 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'. + :type endpoint: str + :param thumbprint: The APNS certificate thumbprint. Specify if using + Certificate Authentication Mode. + :type thumbprint: str + :param key_id: A 10-character key identifier (kid) key, obtained from your + developer account. Specify if using Token Authentication Mode. + :type key_id: str + :param app_name: The name of the application or BundleId. Specify if using + Token Authentication Mode. + :type app_name: str + :param 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. + :type app_id: str + :param token: Provider Authentication Token, obtained through your + developer account. Specify if using Token Authentication Mode. + :type 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, *, apns_certificate: str=None, certificate_key: str=None, endpoint: str=None, thumbprint: str=None, key_id: str=None, app_name: str=None, app_id: str=None, token: str=None, **kwargs) -> None: + super(ApnsCredential, self).__init__(**kwargs) + self.apns_certificate = apns_certificate + self.certificate_key = certificate_key + self.endpoint = endpoint + self.thumbprint = thumbprint + self.key_id = key_id + self.app_name = app_name + self.app_id = app_id + self.token = token + + +class BaiduCredential(Model): + """Description of a NotificationHub BaiduCredential. + + :param baidu_api_key: Baidu Api Key. + :type baidu_api_key: str + :param baidu_end_point: Baidu Endpoint. + :type baidu_end_point: str + :param baidu_secret_key: Baidu Secret Key + :type 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, *, baidu_api_key: str=None, baidu_end_point: str=None, baidu_secret_key: str=None, **kwargs) -> None: + super(BaiduCredential, self).__init__(**kwargs) + self.baidu_api_key = baidu_api_key + self.baidu_end_point = baidu_end_point + self.baidu_secret_key = baidu_secret_key + + +class CheckAvailabilityParameters(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 + :param name: Required. Resource name + :type name: str + :ivar type: Resource type + :vartype type: str + :param location: Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + :param sku: The sku of the created namespace + :type sku: ~azure.mgmt.notificationhubs.models.Sku + :param is_availiable: True if the name is available and can be used to + create new Namespace/NotificationHub. Otherwise false. + :type 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, *, name: str, location: str=None, tags=None, sku=None, is_availiable: bool=None, **kwargs) -> None: + super(CheckAvailabilityParameters, self).__init__(**kwargs) + self.id = None + self.name = name + self.type = None + self.location = location + self.tags = tags + self.sku = sku + self.is_availiable = is_availiable + + +class Resource(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 + :param location: Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + :param sku: The sku of the created namespace + :type 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, *, location: str=None, tags=None, sku=None, **kwargs) -> None: + super(Resource, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.location = location + self.tags = tags + self.sku = sku + + +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 + :param location: Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + :param sku: The sku of the created namespace + :type sku: ~azure.mgmt.notificationhubs.models.Sku + :param is_availiable: True if the name is available and can be used to + create new Namespace/NotificationHub. Otherwise false. + :type 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, *, location: str=None, tags=None, sku=None, is_availiable: bool=None, **kwargs) -> None: + super(CheckAvailabilityResult, self).__init__(location=location, tags=tags, sku=sku, **kwargs) + self.is_availiable = is_availiable + + +class CloudError(Model): + """CloudError. + """ + + _attribute_map = { + } + + +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 + :param location: Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + :param sku: The sku of the created namespace + :type sku: ~azure.mgmt.notificationhubs.models.Sku + :param success: successful send + :type success: float + :param failure: send failure + :type failure: float + :param results: actual failure description + :type results: object + """ + + _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, *, location: str=None, tags=None, sku=None, success: float=None, failure: float=None, results=None, **kwargs) -> None: + super(DebugSendResponse, self).__init__(location=location, tags=tags, sku=sku, **kwargs) + self.success = success + self.failure = failure + self.results = results + + +class ErrorResponse(Model): + """Error response indicates NotificationHubs service is not able to process + the incoming request. The reason is provided in the error message. + + :param code: Error code. + :type code: str + :param message: Error message indicating why the operation failed. + :type message: str + """ + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__(self, *, code: str=None, message: str=None, **kwargs) -> None: + super(ErrorResponse, self).__init__(**kwargs) + self.code = code + self.message = message + + +class ErrorResponseException(HttpOperationError): + """Server responsed with exception of type: 'ErrorResponse'. + + :param deserialize: A deserializer + :param response: Server response to be deserialized. + """ + + def __init__(self, deserialize, response, *args): + + super(ErrorResponseException, self).__init__(deserialize, response, 'ErrorResponse', *args) + + +class GcmCredential(Model): + """Description of a NotificationHub GcmCredential. + + :param gcm_endpoint: The FCM legacy endpoint. Default value is + 'https://fcm.googleapis.com/fcm/send' + :type gcm_endpoint: str + :param google_api_key: The Google API key. + :type google_api_key: str + """ + + _attribute_map = { + 'gcm_endpoint': {'key': 'properties.gcmEndpoint', 'type': 'str'}, + 'google_api_key': {'key': 'properties.googleApiKey', 'type': 'str'}, + } + + def __init__(self, *, gcm_endpoint: str=None, google_api_key: str=None, **kwargs) -> None: + super(GcmCredential, self).__init__(**kwargs) + self.gcm_endpoint = gcm_endpoint + self.google_api_key = google_api_key + + +class MpnsCredential(Model): + """Description of a NotificationHub MpnsCredential. + + :param mpns_certificate: The MPNS certificate. + :type mpns_certificate: str + :param certificate_key: The certificate key for this credential. + :type certificate_key: str + :param thumbprint: The MPNS certificate Thumbprint + :type 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, *, mpns_certificate: str=None, certificate_key: str=None, thumbprint: str=None, **kwargs) -> None: + super(MpnsCredential, self).__init__(**kwargs) + self.mpns_certificate = mpns_certificate + self.certificate_key = certificate_key + self.thumbprint = thumbprint + + +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 + :param location: Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + :param sku: The sku of the created namespace + :type sku: ~azure.mgmt.notificationhubs.models.Sku + :param namespace_create_or_update_parameters_name: The name of the + namespace. + :type namespace_create_or_update_parameters_name: str + :param provisioning_state: Provisioning state of the Namespace. + :type provisioning_state: str + :param 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 + :type region: str + :ivar metric_id: Identifier for Azure Insights metrics + :vartype metric_id: str + :param status: Status of the namespace. It can be any of these values:1 = + Created/Active2 = Creating3 = Suspended4 = Deleting + :type status: str + :param created_at: The time the namespace was created. + :type created_at: datetime + :param updated_at: The time the namespace was updated. + :type updated_at: datetime + :param service_bus_endpoint: Endpoint you can use to perform + NotificationHub operations. + :type service_bus_endpoint: str + :param subscription_id: The Id of the Azure subscription associated with + the namespace. + :type subscription_id: str + :param scale_unit: ScaleUnit where the namespace gets created + :type scale_unit: str + :param enabled: Whether or not the namespace is currently enabled. + :type enabled: bool + :param critical: Whether or not the namespace is set as Critical. + :type critical: bool + :param data_center: Data center for the namespace + :type data_center: str + :param namespace_type: The namespace type. Possible values include: + 'Messaging', 'NotificationHub' + :type 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'}, + 'namespace_create_or_update_parameters_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': 'NamespaceType'}, + } + + def __init__(self, *, location: str=None, tags=None, sku=None, namespace_create_or_update_parameters_name: str=None, provisioning_state: str=None, region: str=None, status: str=None, created_at=None, updated_at=None, service_bus_endpoint: str=None, subscription_id: str=None, scale_unit: str=None, enabled: bool=None, critical: bool=None, data_center: str=None, namespace_type=None, **kwargs) -> None: + super(NamespaceCreateOrUpdateParameters, self).__init__(location=location, tags=tags, sku=sku, **kwargs) + self.namespace_create_or_update_parameters_name = namespace_create_or_update_parameters_name + self.provisioning_state = provisioning_state + self.region = region + self.metric_id = None + self.status = status + self.created_at = created_at + self.updated_at = updated_at + self.service_bus_endpoint = service_bus_endpoint + self.subscription_id = subscription_id + self.scale_unit = scale_unit + self.enabled = enabled + self.critical = critical + self.data_center = data_center + self.namespace_type = namespace_type + + +class NamespacePatchParameters(Model): + """Parameters supplied to the Patch Namespace operation. + + :param tags: Resource tags + :type tags: dict[str, str] + :param sku: The sku of the created namespace + :type sku: ~azure.mgmt.notificationhubs.models.Sku + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + } + + def __init__(self, *, tags=None, sku=None, **kwargs) -> None: + super(NamespacePatchParameters, self).__init__(**kwargs) + self.tags = tags + self.sku = sku + + +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 + :param location: Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + :param sku: The sku of the created namespace + :type sku: ~azure.mgmt.notificationhubs.models.Sku + :param namespace_resource_name: The name of the namespace. + :type namespace_resource_name: str + :param provisioning_state: Provisioning state of the Namespace. + :type provisioning_state: str + :param 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 + :type region: str + :ivar metric_id: Identifier for Azure Insights metrics + :vartype metric_id: str + :param status: Status of the namespace. It can be any of these values:1 = + Created/Active2 = Creating3 = Suspended4 = Deleting + :type status: str + :param created_at: The time the namespace was created. + :type created_at: datetime + :param updated_at: The time the namespace was updated. + :type updated_at: datetime + :param service_bus_endpoint: Endpoint you can use to perform + NotificationHub operations. + :type service_bus_endpoint: str + :param subscription_id: The Id of the Azure subscription associated with + the namespace. + :type subscription_id: str + :param scale_unit: ScaleUnit where the namespace gets created + :type scale_unit: str + :param enabled: Whether or not the namespace is currently enabled. + :type enabled: bool + :param critical: Whether or not the namespace is set as Critical. + :type critical: bool + :param data_center: Data center for the namespace + :type data_center: str + :param namespace_type: The namespace type. Possible values include: + 'Messaging', 'NotificationHub' + :type 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'}, + 'namespace_resource_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': 'NamespaceType'}, + } + + def __init__(self, *, location: str=None, tags=None, sku=None, namespace_resource_name: str=None, provisioning_state: str=None, region: str=None, status: str=None, created_at=None, updated_at=None, service_bus_endpoint: str=None, subscription_id: str=None, scale_unit: str=None, enabled: bool=None, critical: bool=None, data_center: str=None, namespace_type=None, **kwargs) -> None: + super(NamespaceResource, self).__init__(location=location, tags=tags, sku=sku, **kwargs) + self.namespace_resource_name = namespace_resource_name + self.provisioning_state = provisioning_state + self.region = region + self.metric_id = None + self.status = status + self.created_at = created_at + self.updated_at = updated_at + self.service_bus_endpoint = service_bus_endpoint + self.subscription_id = subscription_id + self.scale_unit = scale_unit + self.enabled = enabled + self.critical = critical + self.data_center = data_center + self.namespace_type = namespace_type + + +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 + :param location: Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + :param sku: The sku of the created namespace + :type sku: ~azure.mgmt.notificationhubs.models.Sku + :param notification_hub_create_or_update_parameters_name: The + NotificationHub name. + :type notification_hub_create_or_update_parameters_name: str + :param registration_ttl: The RegistrationTtl of the created + NotificationHub + :type registration_ttl: str + :param authorization_rules: The AuthorizationRules of the created + NotificationHub + :type authorization_rules: + list[~azure.mgmt.notificationhubs.models.SharedAccessAuthorizationRuleProperties] + :param apns_credential: The ApnsCredential of the created NotificationHub + :type apns_credential: ~azure.mgmt.notificationhubs.models.ApnsCredential + :param wns_credential: The WnsCredential of the created NotificationHub + :type wns_credential: ~azure.mgmt.notificationhubs.models.WnsCredential + :param gcm_credential: The GcmCredential of the created NotificationHub + :type gcm_credential: ~azure.mgmt.notificationhubs.models.GcmCredential + :param mpns_credential: The MpnsCredential of the created NotificationHub + :type mpns_credential: ~azure.mgmt.notificationhubs.models.MpnsCredential + :param adm_credential: The AdmCredential of the created NotificationHub + :type adm_credential: ~azure.mgmt.notificationhubs.models.AdmCredential + :param baidu_credential: The BaiduCredential of the created + NotificationHub + :type 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'}, + 'notification_hub_create_or_update_parameters_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, *, location: str=None, tags=None, sku=None, notification_hub_create_or_update_parameters_name: str=None, registration_ttl: str=None, authorization_rules=None, apns_credential=None, wns_credential=None, gcm_credential=None, mpns_credential=None, adm_credential=None, baidu_credential=None, **kwargs) -> None: + super(NotificationHubCreateOrUpdateParameters, self).__init__(location=location, tags=tags, sku=sku, **kwargs) + self.notification_hub_create_or_update_parameters_name = notification_hub_create_or_update_parameters_name + self.registration_ttl = registration_ttl + self.authorization_rules = authorization_rules + self.apns_credential = apns_credential + self.wns_credential = wns_credential + self.gcm_credential = gcm_credential + self.mpns_credential = mpns_credential + self.adm_credential = adm_credential + self.baidu_credential = baidu_credential + + +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 + :param location: Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + :param sku: The sku of the created namespace + :type sku: ~azure.mgmt.notificationhubs.models.Sku + :param notification_hub_patch_parameters_name: The NotificationHub name. + :type notification_hub_patch_parameters_name: str + :param registration_ttl: The RegistrationTtl of the created + NotificationHub + :type registration_ttl: str + :param authorization_rules: The AuthorizationRules of the created + NotificationHub + :type authorization_rules: + list[~azure.mgmt.notificationhubs.models.SharedAccessAuthorizationRuleProperties] + :param apns_credential: The ApnsCredential of the created NotificationHub + :type apns_credential: ~azure.mgmt.notificationhubs.models.ApnsCredential + :param wns_credential: The WnsCredential of the created NotificationHub + :type wns_credential: ~azure.mgmt.notificationhubs.models.WnsCredential + :param gcm_credential: The GcmCredential of the created NotificationHub + :type gcm_credential: ~azure.mgmt.notificationhubs.models.GcmCredential + :param mpns_credential: The MpnsCredential of the created NotificationHub + :type mpns_credential: ~azure.mgmt.notificationhubs.models.MpnsCredential + :param adm_credential: The AdmCredential of the created NotificationHub + :type adm_credential: ~azure.mgmt.notificationhubs.models.AdmCredential + :param baidu_credential: The BaiduCredential of the created + NotificationHub + :type 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'}, + 'notification_hub_patch_parameters_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, *, location: str=None, tags=None, sku=None, notification_hub_patch_parameters_name: str=None, registration_ttl: str=None, authorization_rules=None, apns_credential=None, wns_credential=None, gcm_credential=None, mpns_credential=None, adm_credential=None, baidu_credential=None, **kwargs) -> None: + super(NotificationHubPatchParameters, self).__init__(location=location, tags=tags, sku=sku, **kwargs) + self.notification_hub_patch_parameters_name = notification_hub_patch_parameters_name + self.registration_ttl = registration_ttl + self.authorization_rules = authorization_rules + self.apns_credential = apns_credential + self.wns_credential = wns_credential + self.gcm_credential = gcm_credential + self.mpns_credential = mpns_credential + self.adm_credential = adm_credential + self.baidu_credential = baidu_credential + + +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 + :param location: Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + :param sku: The sku of the created namespace + :type sku: ~azure.mgmt.notificationhubs.models.Sku + :param notification_hub_resource_name: The NotificationHub name. + :type notification_hub_resource_name: str + :param registration_ttl: The RegistrationTtl of the created + NotificationHub + :type registration_ttl: str + :param authorization_rules: The AuthorizationRules of the created + NotificationHub + :type authorization_rules: + list[~azure.mgmt.notificationhubs.models.SharedAccessAuthorizationRuleProperties] + :param apns_credential: The ApnsCredential of the created NotificationHub + :type apns_credential: ~azure.mgmt.notificationhubs.models.ApnsCredential + :param wns_credential: The WnsCredential of the created NotificationHub + :type wns_credential: ~azure.mgmt.notificationhubs.models.WnsCredential + :param gcm_credential: The GcmCredential of the created NotificationHub + :type gcm_credential: ~azure.mgmt.notificationhubs.models.GcmCredential + :param mpns_credential: The MpnsCredential of the created NotificationHub + :type mpns_credential: ~azure.mgmt.notificationhubs.models.MpnsCredential + :param adm_credential: The AdmCredential of the created NotificationHub + :type adm_credential: ~azure.mgmt.notificationhubs.models.AdmCredential + :param baidu_credential: The BaiduCredential of the created + NotificationHub + :type 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'}, + 'notification_hub_resource_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, *, location: str=None, tags=None, sku=None, notification_hub_resource_name: str=None, registration_ttl: str=None, authorization_rules=None, apns_credential=None, wns_credential=None, gcm_credential=None, mpns_credential=None, adm_credential=None, baidu_credential=None, **kwargs) -> None: + super(NotificationHubResource, self).__init__(location=location, tags=tags, sku=sku, **kwargs) + self.notification_hub_resource_name = notification_hub_resource_name + self.registration_ttl = registration_ttl + self.authorization_rules = authorization_rules + self.apns_credential = apns_credential + self.wns_credential = wns_credential + self.gcm_credential = gcm_credential + self.mpns_credential = mpns_credential + self.adm_credential = adm_credential + self.baidu_credential = baidu_credential + + +class Operation(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 + :param display: The object that represents the operation. + :type 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, *, display=None, **kwargs) -> None: + super(Operation, self).__init__(**kwargs) + self.name = None + self.display = display + + +class OperationDisplay(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) -> None: + super(OperationDisplay, self).__init__(**kwargs) + self.provider = None + self.resource = None + self.operation = 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 + :param location: Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + :param sku: The sku of the created namespace + :type sku: ~azure.mgmt.notificationhubs.models.Sku + :param apns_credential: The ApnsCredential of the created NotificationHub + :type apns_credential: ~azure.mgmt.notificationhubs.models.ApnsCredential + :param wns_credential: The WnsCredential of the created NotificationHub + :type wns_credential: ~azure.mgmt.notificationhubs.models.WnsCredential + :param gcm_credential: The GcmCredential of the created NotificationHub + :type gcm_credential: ~azure.mgmt.notificationhubs.models.GcmCredential + :param mpns_credential: The MpnsCredential of the created NotificationHub + :type mpns_credential: ~azure.mgmt.notificationhubs.models.MpnsCredential + :param adm_credential: The AdmCredential of the created NotificationHub + :type adm_credential: ~azure.mgmt.notificationhubs.models.AdmCredential + :param baidu_credential: The BaiduCredential of the created + NotificationHub + :type 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, *, location: str=None, tags=None, sku=None, apns_credential=None, wns_credential=None, gcm_credential=None, mpns_credential=None, adm_credential=None, baidu_credential=None, **kwargs) -> None: + super(PnsCredentialsResource, self).__init__(location=location, tags=tags, sku=sku, **kwargs) + self.apns_credential = apns_credential + self.wns_credential = wns_credential + self.gcm_credential = gcm_credential + self.mpns_credential = mpns_credential + self.adm_credential = adm_credential + self.baidu_credential = baidu_credential + + +class PolicykeyResource(Model): + """Namespace/NotificationHub Regenerate Keys. + + :param 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. + :type policy_key: str + """ + + _attribute_map = { + 'policy_key': {'key': 'policyKey', 'type': 'str'}, + } + + def __init__(self, *, policy_key: str=None, **kwargs) -> None: + super(PolicykeyResource, self).__init__(**kwargs) + self.policy_key = policy_key + + +class ResourceListKeys(Model): + """Namespace/NotificationHub Connection String. + + :param primary_connection_string: PrimaryConnectionString of the + AuthorizationRule. + :type primary_connection_string: str + :param secondary_connection_string: SecondaryConnectionString of the + created AuthorizationRule + :type secondary_connection_string: str + :param primary_key: PrimaryKey of the created AuthorizationRule. + :type primary_key: str + :param secondary_key: SecondaryKey of the created AuthorizationRule + :type secondary_key: str + :param key_name: KeyName of the created AuthorizationRule + :type 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, *, primary_connection_string: str=None, secondary_connection_string: str=None, primary_key: str=None, secondary_key: str=None, key_name: str=None, **kwargs) -> None: + super(ResourceListKeys, self).__init__(**kwargs) + self.primary_connection_string = primary_connection_string + self.secondary_connection_string = secondary_connection_string + self.primary_key = primary_key + self.secondary_key = secondary_key + self.key_name = key_name + + +class SharedAccessAuthorizationRuleCreateOrUpdateParameters(Model): + """Parameters supplied to the CreateOrUpdate Namespace AuthorizationRules. + + All required parameters must be populated in order to send to Azure. + + :param properties: Required. Properties of the Namespace + AuthorizationRules. + :type properties: + ~azure.mgmt.notificationhubs.models.SharedAccessAuthorizationRuleProperties + """ + + _validation = { + 'properties': {'required': True}, + } + + _attribute_map = { + 'properties': {'key': 'properties', 'type': 'SharedAccessAuthorizationRuleProperties'}, + } + + def __init__(self, *, properties, **kwargs) -> None: + super(SharedAccessAuthorizationRuleCreateOrUpdateParameters, self).__init__(**kwargs) + self.properties = properties + + +class SharedAccessAuthorizationRuleListResult(Model): + """The response of the List Namespace operation. + + :param value: Result of the List AuthorizationRules operation. + :type value: + list[~azure.mgmt.notificationhubs.models.SharedAccessAuthorizationRuleResource] + :param next_link: Link to the next set of results. Not empty if Value + contains incomplete list of AuthorizationRules + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[SharedAccessAuthorizationRuleResource]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, *, value=None, next_link: str=None, **kwargs) -> None: + super(SharedAccessAuthorizationRuleListResult, self).__init__(**kwargs) + self.value = value + self.next_link = next_link + + +class SharedAccessAuthorizationRuleProperties(Model): + """SharedAccessAuthorizationRule properties. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param rights: The rights associated with the rule. + :type 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': '[AccessRights]'}, + '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, *, rights=None, **kwargs) -> None: + super(SharedAccessAuthorizationRuleProperties, self).__init__(**kwargs) + self.rights = rights + 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 + :param location: Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + :param sku: The sku of the created namespace + :type sku: ~azure.mgmt.notificationhubs.models.Sku + :param rights: The rights associated with the rule. + :type 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': '[AccessRights]'}, + '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, *, location: str=None, tags=None, sku=None, rights=None, **kwargs) -> None: + super(SharedAccessAuthorizationRuleResource, self).__init__(location=location, tags=tags, sku=sku, **kwargs) + self.rights = rights + 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(Model): + """The Sku description for a namespace. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. Name of the notification hub sku. Possible values + include: 'Free', 'Basic', 'Standard' + :type name: str or ~azure.mgmt.notificationhubs.models.SkuName + :param tier: The tier of particular sku + :type tier: str + :param size: The Sku size + :type size: str + :param family: The Sku Family + :type family: str + :param capacity: The capacity of the resource + :type 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, *, name, tier: str=None, size: str=None, family: str=None, capacity: int=None, **kwargs) -> None: + super(Sku, self).__init__(**kwargs) + self.name = name + self.tier = tier + self.size = size + self.family = family + self.capacity = capacity + + +class SubResource(Model): + """SubResource. + + :param id: Resource Id + :type id: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + } + + def __init__(self, *, id: str=None, **kwargs) -> None: + super(SubResource, self).__init__(**kwargs) + self.id = id + + +class WnsCredential(Model): + """Description of a NotificationHub WnsCredential. + + :param package_sid: The package ID for this credential. + :type package_sid: str + :param secret_key: The secret key. + :type secret_key: str + :param windows_live_endpoint: The Windows Live endpoint. + :type 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, *, package_sid: str=None, secret_key: str=None, windows_live_endpoint: str=None, **kwargs) -> None: + super(WnsCredential, self).__init__(**kwargs) + self.package_sid = package_sid + self.secret_key = secret_key + self.windows_live_endpoint = windows_live_endpoint diff --git a/sdk/notificationhubs/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/notification_hubs_management_client_enums.py b/sdk/notificationhubs/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/_notification_hubs_management_client_enums.py similarity index 100% rename from sdk/notificationhubs/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/notification_hubs_management_client_enums.py rename to sdk/notificationhubs/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/_notification_hubs_management_client_enums.py diff --git a/sdk/notificationhubs/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/_paged_models.py b/sdk/notificationhubs/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/_paged_models.py new file mode 100644 index 000000000000..fa772102412a --- /dev/null +++ b/sdk/notificationhubs/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/_paged_models.py @@ -0,0 +1,66 @@ +# 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 msrest.paging import Paged + + +class OperationPaged(Paged): + """ + A paging container for iterating over a list of :class:`Operation ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[Operation]'} + } + + def __init__(self, *args, **kwargs): + + super(OperationPaged, self).__init__(*args, **kwargs) +class NamespaceResourcePaged(Paged): + """ + A paging container for iterating over a list of :class:`NamespaceResource ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[NamespaceResource]'} + } + + def __init__(self, *args, **kwargs): + + super(NamespaceResourcePaged, self).__init__(*args, **kwargs) +class SharedAccessAuthorizationRuleResourcePaged(Paged): + """ + A paging container for iterating over a list of :class:`SharedAccessAuthorizationRuleResource ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[SharedAccessAuthorizationRuleResource]'} + } + + def __init__(self, *args, **kwargs): + + super(SharedAccessAuthorizationRuleResourcePaged, self).__init__(*args, **kwargs) +class NotificationHubResourcePaged(Paged): + """ + A paging container for iterating over a list of :class:`NotificationHubResource ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[NotificationHubResource]'} + } + + def __init__(self, *args, **kwargs): + + super(NotificationHubResourcePaged, self).__init__(*args, **kwargs) diff --git a/sdk/notificationhubs/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/adm_credential.py b/sdk/notificationhubs/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/adm_credential.py deleted file mode 100644 index de14a2dff39b..000000000000 --- a/sdk/notificationhubs/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/adm_credential.py +++ /dev/null @@ -1,36 +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 msrest.serialization import Model - - -class AdmCredential(Model): - """Description of a NotificationHub AdmCredential. - - :param client_id: The client identifier. - :type client_id: str - :param client_secret: The credential secret access key. - :type client_secret: str - :param auth_token_url: The URL of the authorization token. - :type 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): - 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) diff --git a/sdk/notificationhubs/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/adm_credential_py3.py b/sdk/notificationhubs/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/adm_credential_py3.py deleted file mode 100644 index eccb8b0f07ca..000000000000 --- a/sdk/notificationhubs/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/adm_credential_py3.py +++ /dev/null @@ -1,36 +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 msrest.serialization import Model - - -class AdmCredential(Model): - """Description of a NotificationHub AdmCredential. - - :param client_id: The client identifier. - :type client_id: str - :param client_secret: The credential secret access key. - :type client_secret: str - :param auth_token_url: The URL of the authorization token. - :type 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, *, client_id: str=None, client_secret: str=None, auth_token_url: str=None, **kwargs) -> None: - super(AdmCredential, self).__init__(**kwargs) - self.client_id = client_id - self.client_secret = client_secret - self.auth_token_url = auth_token_url diff --git a/sdk/notificationhubs/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/apns_credential.py b/sdk/notificationhubs/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/apns_credential.py deleted file mode 100644 index d9a01894e636..000000000000 --- a/sdk/notificationhubs/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/apns_credential.py +++ /dev/null @@ -1,59 +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 msrest.serialization import Model - - -class ApnsCredential(Model): - """Description of a NotificationHub ApnsCredential. - - :param apns_certificate: The APNS certificate. - :type apns_certificate: str - :param certificate_key: The certificate key. - :type certificate_key: str - :param endpoint: The endpoint of this credential. - :type endpoint: str - :param thumbprint: The APNS certificate Thumbprint - :type thumbprint: str - :param key_id: A 10-character key identifier (kid) key, obtained from your - developer account - :type key_id: str - :param app_name: The name of the application - :type app_name: str - :param app_id: The issuer (iss) registered claim key, whose value is your - 10-character Team ID, obtained from your developer account - :type app_id: str - :param token: Provider Authentication Token, obtained through your - developer account - :type 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): - 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) diff --git a/sdk/notificationhubs/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/apns_credential_py3.py b/sdk/notificationhubs/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/apns_credential_py3.py deleted file mode 100644 index 598205deb715..000000000000 --- a/sdk/notificationhubs/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/apns_credential_py3.py +++ /dev/null @@ -1,59 +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 msrest.serialization import Model - - -class ApnsCredential(Model): - """Description of a NotificationHub ApnsCredential. - - :param apns_certificate: The APNS certificate. - :type apns_certificate: str - :param certificate_key: The certificate key. - :type certificate_key: str - :param endpoint: The endpoint of this credential. - :type endpoint: str - :param thumbprint: The APNS certificate Thumbprint - :type thumbprint: str - :param key_id: A 10-character key identifier (kid) key, obtained from your - developer account - :type key_id: str - :param app_name: The name of the application - :type app_name: str - :param app_id: The issuer (iss) registered claim key, whose value is your - 10-character Team ID, obtained from your developer account - :type app_id: str - :param token: Provider Authentication Token, obtained through your - developer account - :type 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, *, apns_certificate: str=None, certificate_key: str=None, endpoint: str=None, thumbprint: str=None, key_id: str=None, app_name: str=None, app_id: str=None, token: str=None, **kwargs) -> None: - super(ApnsCredential, self).__init__(**kwargs) - self.apns_certificate = apns_certificate - self.certificate_key = certificate_key - self.endpoint = endpoint - self.thumbprint = thumbprint - self.key_id = key_id - self.app_name = app_name - self.app_id = app_id - self.token = token diff --git a/sdk/notificationhubs/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/baidu_credential.py b/sdk/notificationhubs/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/baidu_credential.py deleted file mode 100644 index e43621a5307b..000000000000 --- a/sdk/notificationhubs/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/baidu_credential.py +++ /dev/null @@ -1,36 +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 msrest.serialization import Model - - -class BaiduCredential(Model): - """Description of a NotificationHub BaiduCredential. - - :param baidu_api_key: Baidu Api Key. - :type baidu_api_key: str - :param baidu_end_point: Baidu Endpoint. - :type baidu_end_point: str - :param baidu_secret_key: Baidu Secret Key - :type 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): - 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) diff --git a/sdk/notificationhubs/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/baidu_credential_py3.py b/sdk/notificationhubs/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/baidu_credential_py3.py deleted file mode 100644 index 97d634443cbb..000000000000 --- a/sdk/notificationhubs/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/baidu_credential_py3.py +++ /dev/null @@ -1,36 +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 msrest.serialization import Model - - -class BaiduCredential(Model): - """Description of a NotificationHub BaiduCredential. - - :param baidu_api_key: Baidu Api Key. - :type baidu_api_key: str - :param baidu_end_point: Baidu Endpoint. - :type baidu_end_point: str - :param baidu_secret_key: Baidu Secret Key - :type 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, *, baidu_api_key: str=None, baidu_end_point: str=None, baidu_secret_key: str=None, **kwargs) -> None: - super(BaiduCredential, self).__init__(**kwargs) - self.baidu_api_key = baidu_api_key - self.baidu_end_point = baidu_end_point - self.baidu_secret_key = baidu_secret_key diff --git a/sdk/notificationhubs/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/check_availability_parameters.py b/sdk/notificationhubs/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/check_availability_parameters.py deleted file mode 100644 index 58a09e27f799..000000000000 --- a/sdk/notificationhubs/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/check_availability_parameters.py +++ /dev/null @@ -1,65 +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 msrest.serialization import Model - - -class CheckAvailabilityParameters(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 - :param name: Required. Resource name - :type name: str - :ivar type: Resource type - :vartype type: str - :param location: Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :param sku: The sku of the created namespace - :type sku: ~azure.mgmt.notificationhubs.models.Sku - :param is_availiable: True if the name is available and can be used to - create new Namespace/NotificationHub. Otherwise false. - :type 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): - super(CheckAvailabilityParameters, self).__init__(**kwargs) - self.id = None - self.name = kwargs.get('name', None) - 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) diff --git a/sdk/notificationhubs/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/check_availability_parameters_py3.py b/sdk/notificationhubs/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/check_availability_parameters_py3.py deleted file mode 100644 index 2160e9778ec3..000000000000 --- a/sdk/notificationhubs/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/check_availability_parameters_py3.py +++ /dev/null @@ -1,65 +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 msrest.serialization import Model - - -class CheckAvailabilityParameters(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 - :param name: Required. Resource name - :type name: str - :ivar type: Resource type - :vartype type: str - :param location: Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :param sku: The sku of the created namespace - :type sku: ~azure.mgmt.notificationhubs.models.Sku - :param is_availiable: True if the name is available and can be used to - create new Namespace/NotificationHub. Otherwise false. - :type 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, *, name: str, location: str=None, tags=None, sku=None, is_availiable: bool=None, **kwargs) -> None: - super(CheckAvailabilityParameters, self).__init__(**kwargs) - self.id = None - self.name = name - self.type = None - self.location = location - self.tags = tags - self.sku = sku - self.is_availiable = is_availiable diff --git a/sdk/notificationhubs/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/check_availability_result.py b/sdk/notificationhubs/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/check_availability_result.py deleted file mode 100644 index dc77a2ee06f2..000000000000 --- a/sdk/notificationhubs/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/check_availability_result.py +++ /dev/null @@ -1,56 +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 .resource import Resource - - -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 - :param location: Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :param sku: The sku of the created namespace - :type sku: ~azure.mgmt.notificationhubs.models.Sku - :param is_availiable: True if the name is available and can be used to - create new Namespace/NotificationHub. Otherwise false. - :type 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): - super(CheckAvailabilityResult, self).__init__(**kwargs) - self.is_availiable = kwargs.get('is_availiable', None) diff --git a/sdk/notificationhubs/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/check_availability_result_py3.py b/sdk/notificationhubs/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/check_availability_result_py3.py deleted file mode 100644 index 6d23a72a32a4..000000000000 --- a/sdk/notificationhubs/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/check_availability_result_py3.py +++ /dev/null @@ -1,56 +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 .resource_py3 import Resource - - -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 - :param location: Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :param sku: The sku of the created namespace - :type sku: ~azure.mgmt.notificationhubs.models.Sku - :param is_availiable: True if the name is available and can be used to - create new Namespace/NotificationHub. Otherwise false. - :type 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, *, location: str=None, tags=None, sku=None, is_availiable: bool=None, **kwargs) -> None: - super(CheckAvailabilityResult, self).__init__(location=location, tags=tags, sku=sku, **kwargs) - self.is_availiable = is_availiable diff --git a/sdk/notificationhubs/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/debug_send_response.py b/sdk/notificationhubs/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/debug_send_response.py deleted file mode 100644 index c6b273e88cdf..000000000000 --- a/sdk/notificationhubs/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/debug_send_response.py +++ /dev/null @@ -1,63 +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 .resource import Resource - - -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 - :param location: Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :param sku: The sku of the created namespace - :type sku: ~azure.mgmt.notificationhubs.models.Sku - :param success: successful send - :type success: float - :param failure: send failure - :type failure: float - :param results: actual failure description - :type results: object - """ - - _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): - super(DebugSendResponse, self).__init__(**kwargs) - self.success = kwargs.get('success', None) - self.failure = kwargs.get('failure', None) - self.results = kwargs.get('results', None) diff --git a/sdk/notificationhubs/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/debug_send_response_py3.py b/sdk/notificationhubs/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/debug_send_response_py3.py deleted file mode 100644 index 117573ecdc7c..000000000000 --- a/sdk/notificationhubs/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/debug_send_response_py3.py +++ /dev/null @@ -1,63 +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 .resource_py3 import Resource - - -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 - :param location: Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :param sku: The sku of the created namespace - :type sku: ~azure.mgmt.notificationhubs.models.Sku - :param success: successful send - :type success: float - :param failure: send failure - :type failure: float - :param results: actual failure description - :type results: object - """ - - _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, *, location: str=None, tags=None, sku=None, success: float=None, failure: float=None, results=None, **kwargs) -> None: - super(DebugSendResponse, self).__init__(location=location, tags=tags, sku=sku, **kwargs) - self.success = success - self.failure = failure - self.results = results diff --git a/sdk/notificationhubs/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/error_response.py b/sdk/notificationhubs/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/error_response.py deleted file mode 100644 index 41dd380aa554..000000000000 --- a/sdk/notificationhubs/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/error_response.py +++ /dev/null @@ -1,46 +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 msrest.serialization import Model -from msrest.exceptions import HttpOperationError - - -class ErrorResponse(Model): - """Error response indicates NotificationHubs service is not able to process - the incoming request. The reason is provided in the error message. - - :param code: Error code. - :type code: str - :param message: Error message indicating why the operation failed. - :type message: str - """ - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ErrorResponse, self).__init__(**kwargs) - self.code = kwargs.get('code', None) - self.message = kwargs.get('message', None) - - -class ErrorResponseException(HttpOperationError): - """Server responsed with exception of type: 'ErrorResponse'. - - :param deserialize: A deserializer - :param response: Server response to be deserialized. - """ - - def __init__(self, deserialize, response, *args): - - super(ErrorResponseException, self).__init__(deserialize, response, 'ErrorResponse', *args) diff --git a/sdk/notificationhubs/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/error_response_py3.py b/sdk/notificationhubs/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/error_response_py3.py deleted file mode 100644 index 96d571a8dbf4..000000000000 --- a/sdk/notificationhubs/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/error_response_py3.py +++ /dev/null @@ -1,46 +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 msrest.serialization import Model -from msrest.exceptions import HttpOperationError - - -class ErrorResponse(Model): - """Error response indicates NotificationHubs service is not able to process - the incoming request. The reason is provided in the error message. - - :param code: Error code. - :type code: str - :param message: Error message indicating why the operation failed. - :type message: str - """ - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - } - - def __init__(self, *, code: str=None, message: str=None, **kwargs) -> None: - super(ErrorResponse, self).__init__(**kwargs) - self.code = code - self.message = message - - -class ErrorResponseException(HttpOperationError): - """Server responsed with exception of type: 'ErrorResponse'. - - :param deserialize: A deserializer - :param response: Server response to be deserialized. - """ - - def __init__(self, deserialize, response, *args): - - super(ErrorResponseException, self).__init__(deserialize, response, 'ErrorResponse', *args) diff --git a/sdk/notificationhubs/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/gcm_credential.py b/sdk/notificationhubs/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/gcm_credential.py deleted file mode 100644 index e7567286c25d..000000000000 --- a/sdk/notificationhubs/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/gcm_credential.py +++ /dev/null @@ -1,32 +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 msrest.serialization import Model - - -class GcmCredential(Model): - """Description of a NotificationHub GcmCredential. - - :param gcm_endpoint: The GCM endpoint. - :type gcm_endpoint: str - :param google_api_key: The Google API key. - :type 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): - super(GcmCredential, self).__init__(**kwargs) - self.gcm_endpoint = kwargs.get('gcm_endpoint', None) - self.google_api_key = kwargs.get('google_api_key', None) diff --git a/sdk/notificationhubs/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/gcm_credential_py3.py b/sdk/notificationhubs/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/gcm_credential_py3.py deleted file mode 100644 index a9f09bfd7a58..000000000000 --- a/sdk/notificationhubs/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/gcm_credential_py3.py +++ /dev/null @@ -1,32 +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 msrest.serialization import Model - - -class GcmCredential(Model): - """Description of a NotificationHub GcmCredential. - - :param gcm_endpoint: The GCM endpoint. - :type gcm_endpoint: str - :param google_api_key: The Google API key. - :type google_api_key: str - """ - - _attribute_map = { - 'gcm_endpoint': {'key': 'properties.gcmEndpoint', 'type': 'str'}, - 'google_api_key': {'key': 'properties.googleApiKey', 'type': 'str'}, - } - - def __init__(self, *, gcm_endpoint: str=None, google_api_key: str=None, **kwargs) -> None: - super(GcmCredential, self).__init__(**kwargs) - self.gcm_endpoint = gcm_endpoint - self.google_api_key = google_api_key diff --git a/sdk/notificationhubs/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/mpns_credential.py b/sdk/notificationhubs/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/mpns_credential.py deleted file mode 100644 index ac410f2763a8..000000000000 --- a/sdk/notificationhubs/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/mpns_credential.py +++ /dev/null @@ -1,36 +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 msrest.serialization import Model - - -class MpnsCredential(Model): - """Description of a NotificationHub MpnsCredential. - - :param mpns_certificate: The MPNS certificate. - :type mpns_certificate: str - :param certificate_key: The certificate key for this credential. - :type certificate_key: str - :param thumbprint: The MPNS certificate Thumbprint - :type 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): - 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) diff --git a/sdk/notificationhubs/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/mpns_credential_py3.py b/sdk/notificationhubs/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/mpns_credential_py3.py deleted file mode 100644 index 8c076e32d322..000000000000 --- a/sdk/notificationhubs/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/mpns_credential_py3.py +++ /dev/null @@ -1,36 +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 msrest.serialization import Model - - -class MpnsCredential(Model): - """Description of a NotificationHub MpnsCredential. - - :param mpns_certificate: The MPNS certificate. - :type mpns_certificate: str - :param certificate_key: The certificate key for this credential. - :type certificate_key: str - :param thumbprint: The MPNS certificate Thumbprint - :type 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, *, mpns_certificate: str=None, certificate_key: str=None, thumbprint: str=None, **kwargs) -> None: - super(MpnsCredential, self).__init__(**kwargs) - self.mpns_certificate = mpns_certificate - self.certificate_key = certificate_key - self.thumbprint = thumbprint diff --git a/sdk/notificationhubs/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/namespace_create_or_update_parameters.py b/sdk/notificationhubs/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/namespace_create_or_update_parameters.py deleted file mode 100644 index 4e7ebeb7beb4..000000000000 --- a/sdk/notificationhubs/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/namespace_create_or_update_parameters.py +++ /dev/null @@ -1,118 +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 .resource import Resource - - -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 - :param location: Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :param sku: The sku of the created namespace - :type sku: ~azure.mgmt.notificationhubs.models.Sku - :param namespace_create_or_update_parameters_name: The name of the - namespace. - :type namespace_create_or_update_parameters_name: str - :param provisioning_state: Provisioning state of the Namespace. - :type provisioning_state: str - :param region: Specifies the targeted region in which the namespace should - be created. It can be any of the following values: Australia EastAustralia - SoutheastCentral USEast USEast US 2West USNorth Central USSouth Central - USEast AsiaSoutheast AsiaBrazil SouthJapan EastJapan WestNorth EuropeWest - Europe - :type region: str - :ivar metric_id: Identifier for Azure Insights metrics - :vartype metric_id: str - :param status: Status of the namespace. It can be any of these values:1 = - Created/Active2 = Creating3 = Suspended4 = Deleting - :type status: str - :param created_at: The time the namespace was created. - :type created_at: datetime - :param updated_at: The time the namespace was updated. - :type updated_at: datetime - :param service_bus_endpoint: Endpoint you can use to perform - NotificationHub operations. - :type service_bus_endpoint: str - :param subscription_id: The Id of the Azure subscription associated with - the namespace. - :type subscription_id: str - :param scale_unit: ScaleUnit where the namespace gets created - :type scale_unit: str - :param enabled: Whether or not the namespace is currently enabled. - :type enabled: bool - :param critical: Whether or not the namespace is set as Critical. - :type critical: bool - :param data_center: Data center for the namespace - :type data_center: str - :param namespace_type: The namespace type. Possible values include: - 'Messaging', 'NotificationHub' - :type 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'}, - 'namespace_create_or_update_parameters_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': 'NamespaceType'}, - } - - def __init__(self, **kwargs): - super(NamespaceCreateOrUpdateParameters, self).__init__(**kwargs) - self.namespace_create_or_update_parameters_name = kwargs.get('namespace_create_or_update_parameters_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) diff --git a/sdk/notificationhubs/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/namespace_create_or_update_parameters_py3.py b/sdk/notificationhubs/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/namespace_create_or_update_parameters_py3.py deleted file mode 100644 index f851a4d3507d..000000000000 --- a/sdk/notificationhubs/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/namespace_create_or_update_parameters_py3.py +++ /dev/null @@ -1,118 +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 .resource_py3 import Resource - - -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 - :param location: Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :param sku: The sku of the created namespace - :type sku: ~azure.mgmt.notificationhubs.models.Sku - :param namespace_create_or_update_parameters_name: The name of the - namespace. - :type namespace_create_or_update_parameters_name: str - :param provisioning_state: Provisioning state of the Namespace. - :type provisioning_state: str - :param region: Specifies the targeted region in which the namespace should - be created. It can be any of the following values: Australia EastAustralia - SoutheastCentral USEast USEast US 2West USNorth Central USSouth Central - USEast AsiaSoutheast AsiaBrazil SouthJapan EastJapan WestNorth EuropeWest - Europe - :type region: str - :ivar metric_id: Identifier for Azure Insights metrics - :vartype metric_id: str - :param status: Status of the namespace. It can be any of these values:1 = - Created/Active2 = Creating3 = Suspended4 = Deleting - :type status: str - :param created_at: The time the namespace was created. - :type created_at: datetime - :param updated_at: The time the namespace was updated. - :type updated_at: datetime - :param service_bus_endpoint: Endpoint you can use to perform - NotificationHub operations. - :type service_bus_endpoint: str - :param subscription_id: The Id of the Azure subscription associated with - the namespace. - :type subscription_id: str - :param scale_unit: ScaleUnit where the namespace gets created - :type scale_unit: str - :param enabled: Whether or not the namespace is currently enabled. - :type enabled: bool - :param critical: Whether or not the namespace is set as Critical. - :type critical: bool - :param data_center: Data center for the namespace - :type data_center: str - :param namespace_type: The namespace type. Possible values include: - 'Messaging', 'NotificationHub' - :type 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'}, - 'namespace_create_or_update_parameters_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': 'NamespaceType'}, - } - - def __init__(self, *, location: str=None, tags=None, sku=None, namespace_create_or_update_parameters_name: str=None, provisioning_state: str=None, region: str=None, status: str=None, created_at=None, updated_at=None, service_bus_endpoint: str=None, subscription_id: str=None, scale_unit: str=None, enabled: bool=None, critical: bool=None, data_center: str=None, namespace_type=None, **kwargs) -> None: - super(NamespaceCreateOrUpdateParameters, self).__init__(location=location, tags=tags, sku=sku, **kwargs) - self.namespace_create_or_update_parameters_name = namespace_create_or_update_parameters_name - self.provisioning_state = provisioning_state - self.region = region - self.metric_id = None - self.status = status - self.created_at = created_at - self.updated_at = updated_at - self.service_bus_endpoint = service_bus_endpoint - self.subscription_id = subscription_id - self.scale_unit = scale_unit - self.enabled = enabled - self.critical = critical - self.data_center = data_center - self.namespace_type = namespace_type diff --git a/sdk/notificationhubs/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/namespace_patch_parameters.py b/sdk/notificationhubs/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/namespace_patch_parameters.py deleted file mode 100644 index f75f66bd3b55..000000000000 --- a/sdk/notificationhubs/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/namespace_patch_parameters.py +++ /dev/null @@ -1,32 +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 msrest.serialization import Model - - -class NamespacePatchParameters(Model): - """Parameters supplied to the Patch Namespace operation. - - :param tags: Resource tags - :type tags: dict[str, str] - :param sku: The sku of the created namespace - :type sku: ~azure.mgmt.notificationhubs.models.Sku - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - 'sku': {'key': 'sku', 'type': 'Sku'}, - } - - def __init__(self, **kwargs): - super(NamespacePatchParameters, self).__init__(**kwargs) - self.tags = kwargs.get('tags', None) - self.sku = kwargs.get('sku', None) diff --git a/sdk/notificationhubs/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/namespace_patch_parameters_py3.py b/sdk/notificationhubs/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/namespace_patch_parameters_py3.py deleted file mode 100644 index d7b1b8473e75..000000000000 --- a/sdk/notificationhubs/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/namespace_patch_parameters_py3.py +++ /dev/null @@ -1,32 +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 msrest.serialization import Model - - -class NamespacePatchParameters(Model): - """Parameters supplied to the Patch Namespace operation. - - :param tags: Resource tags - :type tags: dict[str, str] - :param sku: The sku of the created namespace - :type sku: ~azure.mgmt.notificationhubs.models.Sku - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - 'sku': {'key': 'sku', 'type': 'Sku'}, - } - - def __init__(self, *, tags=None, sku=None, **kwargs) -> None: - super(NamespacePatchParameters, self).__init__(**kwargs) - self.tags = tags - self.sku = sku diff --git a/sdk/notificationhubs/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/namespace_resource.py b/sdk/notificationhubs/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/namespace_resource.py deleted file mode 100644 index 0014bd7600ec..000000000000 --- a/sdk/notificationhubs/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/namespace_resource.py +++ /dev/null @@ -1,117 +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 .resource import Resource - - -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 - :param location: Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :param sku: The sku of the created namespace - :type sku: ~azure.mgmt.notificationhubs.models.Sku - :param namespace_resource_name: The name of the namespace. - :type namespace_resource_name: str - :param provisioning_state: Provisioning state of the Namespace. - :type provisioning_state: str - :param region: Specifies the targeted region in which the namespace should - be created. It can be any of the following values: Australia EastAustralia - SoutheastCentral USEast USEast US 2West USNorth Central USSouth Central - USEast AsiaSoutheast AsiaBrazil SouthJapan EastJapan WestNorth EuropeWest - Europe - :type region: str - :ivar metric_id: Identifier for Azure Insights metrics - :vartype metric_id: str - :param status: Status of the namespace. It can be any of these values:1 = - Created/Active2 = Creating3 = Suspended4 = Deleting - :type status: str - :param created_at: The time the namespace was created. - :type created_at: datetime - :param updated_at: The time the namespace was updated. - :type updated_at: datetime - :param service_bus_endpoint: Endpoint you can use to perform - NotificationHub operations. - :type service_bus_endpoint: str - :param subscription_id: The Id of the Azure subscription associated with - the namespace. - :type subscription_id: str - :param scale_unit: ScaleUnit where the namespace gets created - :type scale_unit: str - :param enabled: Whether or not the namespace is currently enabled. - :type enabled: bool - :param critical: Whether or not the namespace is set as Critical. - :type critical: bool - :param data_center: Data center for the namespace - :type data_center: str - :param namespace_type: The namespace type. Possible values include: - 'Messaging', 'NotificationHub' - :type 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'}, - 'namespace_resource_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': 'NamespaceType'}, - } - - def __init__(self, **kwargs): - super(NamespaceResource, self).__init__(**kwargs) - self.namespace_resource_name = kwargs.get('namespace_resource_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) diff --git a/sdk/notificationhubs/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/namespace_resource_paged.py b/sdk/notificationhubs/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/namespace_resource_paged.py deleted file mode 100644 index 3cab77ffaf99..000000000000 --- a/sdk/notificationhubs/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/namespace_resource_paged.py +++ /dev/null @@ -1,27 +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 msrest.paging import Paged - - -class NamespaceResourcePaged(Paged): - """ - A paging container for iterating over a list of :class:`NamespaceResource ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[NamespaceResource]'} - } - - def __init__(self, *args, **kwargs): - - super(NamespaceResourcePaged, self).__init__(*args, **kwargs) diff --git a/sdk/notificationhubs/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/namespace_resource_py3.py b/sdk/notificationhubs/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/namespace_resource_py3.py deleted file mode 100644 index bbd58e897f9e..000000000000 --- a/sdk/notificationhubs/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/namespace_resource_py3.py +++ /dev/null @@ -1,117 +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 .resource_py3 import Resource - - -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 - :param location: Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :param sku: The sku of the created namespace - :type sku: ~azure.mgmt.notificationhubs.models.Sku - :param namespace_resource_name: The name of the namespace. - :type namespace_resource_name: str - :param provisioning_state: Provisioning state of the Namespace. - :type provisioning_state: str - :param region: Specifies the targeted region in which the namespace should - be created. It can be any of the following values: Australia EastAustralia - SoutheastCentral USEast USEast US 2West USNorth Central USSouth Central - USEast AsiaSoutheast AsiaBrazil SouthJapan EastJapan WestNorth EuropeWest - Europe - :type region: str - :ivar metric_id: Identifier for Azure Insights metrics - :vartype metric_id: str - :param status: Status of the namespace. It can be any of these values:1 = - Created/Active2 = Creating3 = Suspended4 = Deleting - :type status: str - :param created_at: The time the namespace was created. - :type created_at: datetime - :param updated_at: The time the namespace was updated. - :type updated_at: datetime - :param service_bus_endpoint: Endpoint you can use to perform - NotificationHub operations. - :type service_bus_endpoint: str - :param subscription_id: The Id of the Azure subscription associated with - the namespace. - :type subscription_id: str - :param scale_unit: ScaleUnit where the namespace gets created - :type scale_unit: str - :param enabled: Whether or not the namespace is currently enabled. - :type enabled: bool - :param critical: Whether or not the namespace is set as Critical. - :type critical: bool - :param data_center: Data center for the namespace - :type data_center: str - :param namespace_type: The namespace type. Possible values include: - 'Messaging', 'NotificationHub' - :type 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'}, - 'namespace_resource_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': 'NamespaceType'}, - } - - def __init__(self, *, location: str=None, tags=None, sku=None, namespace_resource_name: str=None, provisioning_state: str=None, region: str=None, status: str=None, created_at=None, updated_at=None, service_bus_endpoint: str=None, subscription_id: str=None, scale_unit: str=None, enabled: bool=None, critical: bool=None, data_center: str=None, namespace_type=None, **kwargs) -> None: - super(NamespaceResource, self).__init__(location=location, tags=tags, sku=sku, **kwargs) - self.namespace_resource_name = namespace_resource_name - self.provisioning_state = provisioning_state - self.region = region - self.metric_id = None - self.status = status - self.created_at = created_at - self.updated_at = updated_at - self.service_bus_endpoint = service_bus_endpoint - self.subscription_id = subscription_id - self.scale_unit = scale_unit - self.enabled = enabled - self.critical = critical - self.data_center = data_center - self.namespace_type = namespace_type diff --git a/sdk/notificationhubs/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/notification_hub_create_or_update_parameters.py b/sdk/notificationhubs/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/notification_hub_create_or_update_parameters.py deleted file mode 100644 index e82f1174d70a..000000000000 --- a/sdk/notificationhubs/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/notification_hub_create_or_update_parameters.py +++ /dev/null @@ -1,93 +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 .resource import Resource - - -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 - :param location: Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :param sku: The sku of the created namespace - :type sku: ~azure.mgmt.notificationhubs.models.Sku - :param notification_hub_create_or_update_parameters_name: The - NotificationHub name. - :type notification_hub_create_or_update_parameters_name: str - :param registration_ttl: The RegistrationTtl of the created - NotificationHub - :type registration_ttl: str - :param authorization_rules: The AuthorizationRules of the created - NotificationHub - :type authorization_rules: - list[~azure.mgmt.notificationhubs.models.SharedAccessAuthorizationRuleProperties] - :param apns_credential: The ApnsCredential of the created NotificationHub - :type apns_credential: ~azure.mgmt.notificationhubs.models.ApnsCredential - :param wns_credential: The WnsCredential of the created NotificationHub - :type wns_credential: ~azure.mgmt.notificationhubs.models.WnsCredential - :param gcm_credential: The GcmCredential of the created NotificationHub - :type gcm_credential: ~azure.mgmt.notificationhubs.models.GcmCredential - :param mpns_credential: The MpnsCredential of the created NotificationHub - :type mpns_credential: ~azure.mgmt.notificationhubs.models.MpnsCredential - :param adm_credential: The AdmCredential of the created NotificationHub - :type adm_credential: ~azure.mgmt.notificationhubs.models.AdmCredential - :param baidu_credential: The BaiduCredential of the created - NotificationHub - :type 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'}, - 'notification_hub_create_or_update_parameters_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): - super(NotificationHubCreateOrUpdateParameters, self).__init__(**kwargs) - self.notification_hub_create_or_update_parameters_name = kwargs.get('notification_hub_create_or_update_parameters_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) diff --git a/sdk/notificationhubs/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/notification_hub_create_or_update_parameters_py3.py b/sdk/notificationhubs/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/notification_hub_create_or_update_parameters_py3.py deleted file mode 100644 index 7b97c00d588f..000000000000 --- a/sdk/notificationhubs/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/notification_hub_create_or_update_parameters_py3.py +++ /dev/null @@ -1,93 +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 .resource_py3 import Resource - - -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 - :param location: Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :param sku: The sku of the created namespace - :type sku: ~azure.mgmt.notificationhubs.models.Sku - :param notification_hub_create_or_update_parameters_name: The - NotificationHub name. - :type notification_hub_create_or_update_parameters_name: str - :param registration_ttl: The RegistrationTtl of the created - NotificationHub - :type registration_ttl: str - :param authorization_rules: The AuthorizationRules of the created - NotificationHub - :type authorization_rules: - list[~azure.mgmt.notificationhubs.models.SharedAccessAuthorizationRuleProperties] - :param apns_credential: The ApnsCredential of the created NotificationHub - :type apns_credential: ~azure.mgmt.notificationhubs.models.ApnsCredential - :param wns_credential: The WnsCredential of the created NotificationHub - :type wns_credential: ~azure.mgmt.notificationhubs.models.WnsCredential - :param gcm_credential: The GcmCredential of the created NotificationHub - :type gcm_credential: ~azure.mgmt.notificationhubs.models.GcmCredential - :param mpns_credential: The MpnsCredential of the created NotificationHub - :type mpns_credential: ~azure.mgmt.notificationhubs.models.MpnsCredential - :param adm_credential: The AdmCredential of the created NotificationHub - :type adm_credential: ~azure.mgmt.notificationhubs.models.AdmCredential - :param baidu_credential: The BaiduCredential of the created - NotificationHub - :type 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'}, - 'notification_hub_create_or_update_parameters_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, *, location: str=None, tags=None, sku=None, notification_hub_create_or_update_parameters_name: str=None, registration_ttl: str=None, authorization_rules=None, apns_credential=None, wns_credential=None, gcm_credential=None, mpns_credential=None, adm_credential=None, baidu_credential=None, **kwargs) -> None: - super(NotificationHubCreateOrUpdateParameters, self).__init__(location=location, tags=tags, sku=sku, **kwargs) - self.notification_hub_create_or_update_parameters_name = notification_hub_create_or_update_parameters_name - self.registration_ttl = registration_ttl - self.authorization_rules = authorization_rules - self.apns_credential = apns_credential - self.wns_credential = wns_credential - self.gcm_credential = gcm_credential - self.mpns_credential = mpns_credential - self.adm_credential = adm_credential - self.baidu_credential = baidu_credential diff --git a/sdk/notificationhubs/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/notification_hub_patch_parameters.py b/sdk/notificationhubs/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/notification_hub_patch_parameters.py deleted file mode 100644 index 9906c1f182f4..000000000000 --- a/sdk/notificationhubs/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/notification_hub_patch_parameters.py +++ /dev/null @@ -1,92 +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 .resource import Resource - - -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 - :param location: Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :param sku: The sku of the created namespace - :type sku: ~azure.mgmt.notificationhubs.models.Sku - :param notification_hub_patch_parameters_name: The NotificationHub name. - :type notification_hub_patch_parameters_name: str - :param registration_ttl: The RegistrationTtl of the created - NotificationHub - :type registration_ttl: str - :param authorization_rules: The AuthorizationRules of the created - NotificationHub - :type authorization_rules: - list[~azure.mgmt.notificationhubs.models.SharedAccessAuthorizationRuleProperties] - :param apns_credential: The ApnsCredential of the created NotificationHub - :type apns_credential: ~azure.mgmt.notificationhubs.models.ApnsCredential - :param wns_credential: The WnsCredential of the created NotificationHub - :type wns_credential: ~azure.mgmt.notificationhubs.models.WnsCredential - :param gcm_credential: The GcmCredential of the created NotificationHub - :type gcm_credential: ~azure.mgmt.notificationhubs.models.GcmCredential - :param mpns_credential: The MpnsCredential of the created NotificationHub - :type mpns_credential: ~azure.mgmt.notificationhubs.models.MpnsCredential - :param adm_credential: The AdmCredential of the created NotificationHub - :type adm_credential: ~azure.mgmt.notificationhubs.models.AdmCredential - :param baidu_credential: The BaiduCredential of the created - NotificationHub - :type 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'}, - 'notification_hub_patch_parameters_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): - super(NotificationHubPatchParameters, self).__init__(**kwargs) - self.notification_hub_patch_parameters_name = kwargs.get('notification_hub_patch_parameters_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) diff --git a/sdk/notificationhubs/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/notification_hub_patch_parameters_py3.py b/sdk/notificationhubs/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/notification_hub_patch_parameters_py3.py deleted file mode 100644 index 5743571caa10..000000000000 --- a/sdk/notificationhubs/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/notification_hub_patch_parameters_py3.py +++ /dev/null @@ -1,92 +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 .resource_py3 import Resource - - -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 - :param location: Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :param sku: The sku of the created namespace - :type sku: ~azure.mgmt.notificationhubs.models.Sku - :param notification_hub_patch_parameters_name: The NotificationHub name. - :type notification_hub_patch_parameters_name: str - :param registration_ttl: The RegistrationTtl of the created - NotificationHub - :type registration_ttl: str - :param authorization_rules: The AuthorizationRules of the created - NotificationHub - :type authorization_rules: - list[~azure.mgmt.notificationhubs.models.SharedAccessAuthorizationRuleProperties] - :param apns_credential: The ApnsCredential of the created NotificationHub - :type apns_credential: ~azure.mgmt.notificationhubs.models.ApnsCredential - :param wns_credential: The WnsCredential of the created NotificationHub - :type wns_credential: ~azure.mgmt.notificationhubs.models.WnsCredential - :param gcm_credential: The GcmCredential of the created NotificationHub - :type gcm_credential: ~azure.mgmt.notificationhubs.models.GcmCredential - :param mpns_credential: The MpnsCredential of the created NotificationHub - :type mpns_credential: ~azure.mgmt.notificationhubs.models.MpnsCredential - :param adm_credential: The AdmCredential of the created NotificationHub - :type adm_credential: ~azure.mgmt.notificationhubs.models.AdmCredential - :param baidu_credential: The BaiduCredential of the created - NotificationHub - :type 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'}, - 'notification_hub_patch_parameters_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, *, location: str=None, tags=None, sku=None, notification_hub_patch_parameters_name: str=None, registration_ttl: str=None, authorization_rules=None, apns_credential=None, wns_credential=None, gcm_credential=None, mpns_credential=None, adm_credential=None, baidu_credential=None, **kwargs) -> None: - super(NotificationHubPatchParameters, self).__init__(location=location, tags=tags, sku=sku, **kwargs) - self.notification_hub_patch_parameters_name = notification_hub_patch_parameters_name - self.registration_ttl = registration_ttl - self.authorization_rules = authorization_rules - self.apns_credential = apns_credential - self.wns_credential = wns_credential - self.gcm_credential = gcm_credential - self.mpns_credential = mpns_credential - self.adm_credential = adm_credential - self.baidu_credential = baidu_credential diff --git a/sdk/notificationhubs/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/notification_hub_resource.py b/sdk/notificationhubs/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/notification_hub_resource.py deleted file mode 100644 index 388cf54b763a..000000000000 --- a/sdk/notificationhubs/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/notification_hub_resource.py +++ /dev/null @@ -1,92 +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 .resource import Resource - - -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 - :param location: Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :param sku: The sku of the created namespace - :type sku: ~azure.mgmt.notificationhubs.models.Sku - :param notification_hub_resource_name: The NotificationHub name. - :type notification_hub_resource_name: str - :param registration_ttl: The RegistrationTtl of the created - NotificationHub - :type registration_ttl: str - :param authorization_rules: The AuthorizationRules of the created - NotificationHub - :type authorization_rules: - list[~azure.mgmt.notificationhubs.models.SharedAccessAuthorizationRuleProperties] - :param apns_credential: The ApnsCredential of the created NotificationHub - :type apns_credential: ~azure.mgmt.notificationhubs.models.ApnsCredential - :param wns_credential: The WnsCredential of the created NotificationHub - :type wns_credential: ~azure.mgmt.notificationhubs.models.WnsCredential - :param gcm_credential: The GcmCredential of the created NotificationHub - :type gcm_credential: ~azure.mgmt.notificationhubs.models.GcmCredential - :param mpns_credential: The MpnsCredential of the created NotificationHub - :type mpns_credential: ~azure.mgmt.notificationhubs.models.MpnsCredential - :param adm_credential: The AdmCredential of the created NotificationHub - :type adm_credential: ~azure.mgmt.notificationhubs.models.AdmCredential - :param baidu_credential: The BaiduCredential of the created - NotificationHub - :type 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'}, - 'notification_hub_resource_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): - super(NotificationHubResource, self).__init__(**kwargs) - self.notification_hub_resource_name = kwargs.get('notification_hub_resource_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) diff --git a/sdk/notificationhubs/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/notification_hub_resource_paged.py b/sdk/notificationhubs/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/notification_hub_resource_paged.py deleted file mode 100644 index 8ed446880895..000000000000 --- a/sdk/notificationhubs/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/notification_hub_resource_paged.py +++ /dev/null @@ -1,27 +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 msrest.paging import Paged - - -class NotificationHubResourcePaged(Paged): - """ - A paging container for iterating over a list of :class:`NotificationHubResource ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[NotificationHubResource]'} - } - - def __init__(self, *args, **kwargs): - - super(NotificationHubResourcePaged, self).__init__(*args, **kwargs) diff --git a/sdk/notificationhubs/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/notification_hub_resource_py3.py b/sdk/notificationhubs/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/notification_hub_resource_py3.py deleted file mode 100644 index d59ebe406ca3..000000000000 --- a/sdk/notificationhubs/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/notification_hub_resource_py3.py +++ /dev/null @@ -1,92 +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 .resource_py3 import Resource - - -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 - :param location: Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :param sku: The sku of the created namespace - :type sku: ~azure.mgmt.notificationhubs.models.Sku - :param notification_hub_resource_name: The NotificationHub name. - :type notification_hub_resource_name: str - :param registration_ttl: The RegistrationTtl of the created - NotificationHub - :type registration_ttl: str - :param authorization_rules: The AuthorizationRules of the created - NotificationHub - :type authorization_rules: - list[~azure.mgmt.notificationhubs.models.SharedAccessAuthorizationRuleProperties] - :param apns_credential: The ApnsCredential of the created NotificationHub - :type apns_credential: ~azure.mgmt.notificationhubs.models.ApnsCredential - :param wns_credential: The WnsCredential of the created NotificationHub - :type wns_credential: ~azure.mgmt.notificationhubs.models.WnsCredential - :param gcm_credential: The GcmCredential of the created NotificationHub - :type gcm_credential: ~azure.mgmt.notificationhubs.models.GcmCredential - :param mpns_credential: The MpnsCredential of the created NotificationHub - :type mpns_credential: ~azure.mgmt.notificationhubs.models.MpnsCredential - :param adm_credential: The AdmCredential of the created NotificationHub - :type adm_credential: ~azure.mgmt.notificationhubs.models.AdmCredential - :param baidu_credential: The BaiduCredential of the created - NotificationHub - :type 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'}, - 'notification_hub_resource_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, *, location: str=None, tags=None, sku=None, notification_hub_resource_name: str=None, registration_ttl: str=None, authorization_rules=None, apns_credential=None, wns_credential=None, gcm_credential=None, mpns_credential=None, adm_credential=None, baidu_credential=None, **kwargs) -> None: - super(NotificationHubResource, self).__init__(location=location, tags=tags, sku=sku, **kwargs) - self.notification_hub_resource_name = notification_hub_resource_name - self.registration_ttl = registration_ttl - self.authorization_rules = authorization_rules - self.apns_credential = apns_credential - self.wns_credential = wns_credential - self.gcm_credential = gcm_credential - self.mpns_credential = mpns_credential - self.adm_credential = adm_credential - self.baidu_credential = baidu_credential diff --git a/sdk/notificationhubs/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/operation.py b/sdk/notificationhubs/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/operation.py deleted file mode 100644 index 56c433b420ba..000000000000 --- a/sdk/notificationhubs/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/operation.py +++ /dev/null @@ -1,39 +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 msrest.serialization import Model - - -class Operation(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 - :param display: The object that represents the operation. - :type 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): - super(Operation, self).__init__(**kwargs) - self.name = None - self.display = kwargs.get('display', None) diff --git a/sdk/notificationhubs/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/operation_display.py b/sdk/notificationhubs/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/operation_display.py deleted file mode 100644 index 1a0166fb286b..000000000000 --- a/sdk/notificationhubs/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/operation_display.py +++ /dev/null @@ -1,46 +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 msrest.serialization import Model - - -class OperationDisplay(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 diff --git a/sdk/notificationhubs/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/operation_display_py3.py b/sdk/notificationhubs/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/operation_display_py3.py deleted file mode 100644 index cd9b2cf5306c..000000000000 --- a/sdk/notificationhubs/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/operation_display_py3.py +++ /dev/null @@ -1,46 +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 msrest.serialization import Model - - -class OperationDisplay(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) -> None: - super(OperationDisplay, self).__init__(**kwargs) - self.provider = None - self.resource = None - self.operation = None diff --git a/sdk/notificationhubs/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/operation_paged.py b/sdk/notificationhubs/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/operation_paged.py deleted file mode 100644 index 3a2eba438979..000000000000 --- a/sdk/notificationhubs/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/operation_paged.py +++ /dev/null @@ -1,27 +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 msrest.paging import Paged - - -class OperationPaged(Paged): - """ - A paging container for iterating over a list of :class:`Operation ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[Operation]'} - } - - def __init__(self, *args, **kwargs): - - super(OperationPaged, self).__init__(*args, **kwargs) diff --git a/sdk/notificationhubs/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/operation_py3.py b/sdk/notificationhubs/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/operation_py3.py deleted file mode 100644 index be95b7117c54..000000000000 --- a/sdk/notificationhubs/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/operation_py3.py +++ /dev/null @@ -1,39 +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 msrest.serialization import Model - - -class Operation(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 - :param display: The object that represents the operation. - :type 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, *, display=None, **kwargs) -> None: - super(Operation, self).__init__(**kwargs) - self.name = None - self.display = display diff --git a/sdk/notificationhubs/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/pns_credentials_resource.py b/sdk/notificationhubs/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/pns_credentials_resource.py deleted file mode 100644 index 9e4a6a1ec3ec..000000000000 --- a/sdk/notificationhubs/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/pns_credentials_resource.py +++ /dev/null @@ -1,77 +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 .resource import Resource - - -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 - :param location: Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :param sku: The sku of the created namespace - :type sku: ~azure.mgmt.notificationhubs.models.Sku - :param apns_credential: The ApnsCredential of the created NotificationHub - :type apns_credential: ~azure.mgmt.notificationhubs.models.ApnsCredential - :param wns_credential: The WnsCredential of the created NotificationHub - :type wns_credential: ~azure.mgmt.notificationhubs.models.WnsCredential - :param gcm_credential: The GcmCredential of the created NotificationHub - :type gcm_credential: ~azure.mgmt.notificationhubs.models.GcmCredential - :param mpns_credential: The MpnsCredential of the created NotificationHub - :type mpns_credential: ~azure.mgmt.notificationhubs.models.MpnsCredential - :param adm_credential: The AdmCredential of the created NotificationHub - :type adm_credential: ~azure.mgmt.notificationhubs.models.AdmCredential - :param baidu_credential: The BaiduCredential of the created - NotificationHub - :type 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): - 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) diff --git a/sdk/notificationhubs/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/pns_credentials_resource_py3.py b/sdk/notificationhubs/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/pns_credentials_resource_py3.py deleted file mode 100644 index b15189f06d4a..000000000000 --- a/sdk/notificationhubs/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/pns_credentials_resource_py3.py +++ /dev/null @@ -1,77 +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 .resource_py3 import Resource - - -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 - :param location: Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :param sku: The sku of the created namespace - :type sku: ~azure.mgmt.notificationhubs.models.Sku - :param apns_credential: The ApnsCredential of the created NotificationHub - :type apns_credential: ~azure.mgmt.notificationhubs.models.ApnsCredential - :param wns_credential: The WnsCredential of the created NotificationHub - :type wns_credential: ~azure.mgmt.notificationhubs.models.WnsCredential - :param gcm_credential: The GcmCredential of the created NotificationHub - :type gcm_credential: ~azure.mgmt.notificationhubs.models.GcmCredential - :param mpns_credential: The MpnsCredential of the created NotificationHub - :type mpns_credential: ~azure.mgmt.notificationhubs.models.MpnsCredential - :param adm_credential: The AdmCredential of the created NotificationHub - :type adm_credential: ~azure.mgmt.notificationhubs.models.AdmCredential - :param baidu_credential: The BaiduCredential of the created - NotificationHub - :type 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, *, location: str=None, tags=None, sku=None, apns_credential=None, wns_credential=None, gcm_credential=None, mpns_credential=None, adm_credential=None, baidu_credential=None, **kwargs) -> None: - super(PnsCredentialsResource, self).__init__(location=location, tags=tags, sku=sku, **kwargs) - self.apns_credential = apns_credential - self.wns_credential = wns_credential - self.gcm_credential = gcm_credential - self.mpns_credential = mpns_credential - self.adm_credential = adm_credential - self.baidu_credential = baidu_credential diff --git a/sdk/notificationhubs/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/policykey_resource.py b/sdk/notificationhubs/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/policykey_resource.py deleted file mode 100644 index af72abe54bd8..000000000000 --- a/sdk/notificationhubs/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/policykey_resource.py +++ /dev/null @@ -1,30 +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 msrest.serialization import Model - - -class PolicykeyResource(Model): - """Namespace/NotificationHub Regenerate Keys. - - :param 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. - :type policy_key: str - """ - - _attribute_map = { - 'policy_key': {'key': 'policyKey', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(PolicykeyResource, self).__init__(**kwargs) - self.policy_key = kwargs.get('policy_key', None) diff --git a/sdk/notificationhubs/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/policykey_resource_py3.py b/sdk/notificationhubs/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/policykey_resource_py3.py deleted file mode 100644 index e9c003053af0..000000000000 --- a/sdk/notificationhubs/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/policykey_resource_py3.py +++ /dev/null @@ -1,30 +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 msrest.serialization import Model - - -class PolicykeyResource(Model): - """Namespace/NotificationHub Regenerate Keys. - - :param 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. - :type policy_key: str - """ - - _attribute_map = { - 'policy_key': {'key': 'policyKey', 'type': 'str'}, - } - - def __init__(self, *, policy_key: str=None, **kwargs) -> None: - super(PolicykeyResource, self).__init__(**kwargs) - self.policy_key = policy_key diff --git a/sdk/notificationhubs/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/resource.py b/sdk/notificationhubs/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/resource.py deleted file mode 100644 index 45dfdd515b7c..000000000000 --- a/sdk/notificationhubs/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/resource.py +++ /dev/null @@ -1,57 +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 msrest.serialization import Model - - -class Resource(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 - :param location: Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :param sku: The sku of the created namespace - :type 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): - 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) diff --git a/sdk/notificationhubs/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/resource_list_keys.py b/sdk/notificationhubs/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/resource_list_keys.py deleted file mode 100644 index 9ef2a841ab02..000000000000 --- a/sdk/notificationhubs/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/resource_list_keys.py +++ /dev/null @@ -1,46 +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 msrest.serialization import Model - - -class ResourceListKeys(Model): - """Namespace/NotificationHub Connection String. - - :param primary_connection_string: PrimaryConnectionString of the - AuthorizationRule. - :type primary_connection_string: str - :param secondary_connection_string: SecondaryConnectionString of the - created AuthorizationRule - :type secondary_connection_string: str - :param primary_key: PrimaryKey of the created AuthorizationRule. - :type primary_key: str - :param secondary_key: SecondaryKey of the created AuthorizationRule - :type secondary_key: str - :param key_name: KeyName of the created AuthorizationRule - :type 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): - 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) diff --git a/sdk/notificationhubs/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/resource_list_keys_py3.py b/sdk/notificationhubs/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/resource_list_keys_py3.py deleted file mode 100644 index dbdace0ac567..000000000000 --- a/sdk/notificationhubs/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/resource_list_keys_py3.py +++ /dev/null @@ -1,46 +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 msrest.serialization import Model - - -class ResourceListKeys(Model): - """Namespace/NotificationHub Connection String. - - :param primary_connection_string: PrimaryConnectionString of the - AuthorizationRule. - :type primary_connection_string: str - :param secondary_connection_string: SecondaryConnectionString of the - created AuthorizationRule - :type secondary_connection_string: str - :param primary_key: PrimaryKey of the created AuthorizationRule. - :type primary_key: str - :param secondary_key: SecondaryKey of the created AuthorizationRule - :type secondary_key: str - :param key_name: KeyName of the created AuthorizationRule - :type 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, *, primary_connection_string: str=None, secondary_connection_string: str=None, primary_key: str=None, secondary_key: str=None, key_name: str=None, **kwargs) -> None: - super(ResourceListKeys, self).__init__(**kwargs) - self.primary_connection_string = primary_connection_string - self.secondary_connection_string = secondary_connection_string - self.primary_key = primary_key - self.secondary_key = secondary_key - self.key_name = key_name diff --git a/sdk/notificationhubs/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/resource_py3.py b/sdk/notificationhubs/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/resource_py3.py deleted file mode 100644 index 7d5987763ec1..000000000000 --- a/sdk/notificationhubs/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/resource_py3.py +++ /dev/null @@ -1,57 +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 msrest.serialization import Model - - -class Resource(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 - :param location: Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :param sku: The sku of the created namespace - :type 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, *, location: str=None, tags=None, sku=None, **kwargs) -> None: - super(Resource, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.location = location - self.tags = tags - self.sku = sku diff --git a/sdk/notificationhubs/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/shared_access_authorization_rule_create_or_update_parameters.py b/sdk/notificationhubs/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/shared_access_authorization_rule_create_or_update_parameters.py deleted file mode 100644 index 8c3afbcb2483..000000000000 --- a/sdk/notificationhubs/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/shared_access_authorization_rule_create_or_update_parameters.py +++ /dev/null @@ -1,36 +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 msrest.serialization import Model - - -class SharedAccessAuthorizationRuleCreateOrUpdateParameters(Model): - """Parameters supplied to the CreateOrUpdate Namespace AuthorizationRules. - - All required parameters must be populated in order to send to Azure. - - :param properties: Required. Properties of the Namespace - AuthorizationRules. - :type properties: - ~azure.mgmt.notificationhubs.models.SharedAccessAuthorizationRuleProperties - """ - - _validation = { - 'properties': {'required': True}, - } - - _attribute_map = { - 'properties': {'key': 'properties', 'type': 'SharedAccessAuthorizationRuleProperties'}, - } - - def __init__(self, **kwargs): - super(SharedAccessAuthorizationRuleCreateOrUpdateParameters, self).__init__(**kwargs) - self.properties = kwargs.get('properties', None) diff --git a/sdk/notificationhubs/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/shared_access_authorization_rule_create_or_update_parameters_py3.py b/sdk/notificationhubs/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/shared_access_authorization_rule_create_or_update_parameters_py3.py deleted file mode 100644 index 0d11ff3e2506..000000000000 --- a/sdk/notificationhubs/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/shared_access_authorization_rule_create_or_update_parameters_py3.py +++ /dev/null @@ -1,36 +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 msrest.serialization import Model - - -class SharedAccessAuthorizationRuleCreateOrUpdateParameters(Model): - """Parameters supplied to the CreateOrUpdate Namespace AuthorizationRules. - - All required parameters must be populated in order to send to Azure. - - :param properties: Required. Properties of the Namespace - AuthorizationRules. - :type properties: - ~azure.mgmt.notificationhubs.models.SharedAccessAuthorizationRuleProperties - """ - - _validation = { - 'properties': {'required': True}, - } - - _attribute_map = { - 'properties': {'key': 'properties', 'type': 'SharedAccessAuthorizationRuleProperties'}, - } - - def __init__(self, *, properties, **kwargs) -> None: - super(SharedAccessAuthorizationRuleCreateOrUpdateParameters, self).__init__(**kwargs) - self.properties = properties diff --git a/sdk/notificationhubs/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/shared_access_authorization_rule_list_result.py b/sdk/notificationhubs/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/shared_access_authorization_rule_list_result.py deleted file mode 100644 index ccefda05d86a..000000000000 --- a/sdk/notificationhubs/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/shared_access_authorization_rule_list_result.py +++ /dev/null @@ -1,34 +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 msrest.serialization import Model - - -class SharedAccessAuthorizationRuleListResult(Model): - """The response of the List Namespace operation. - - :param value: Result of the List AuthorizationRules operation. - :type value: - list[~azure.mgmt.notificationhubs.models.SharedAccessAuthorizationRuleResource] - :param next_link: Link to the next set of results. Not empty if Value - contains incomplete list of AuthorizationRules - :type next_link: str - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[SharedAccessAuthorizationRuleResource]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(SharedAccessAuthorizationRuleListResult, self).__init__(**kwargs) - self.value = kwargs.get('value', None) - self.next_link = kwargs.get('next_link', None) diff --git a/sdk/notificationhubs/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/shared_access_authorization_rule_list_result_py3.py b/sdk/notificationhubs/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/shared_access_authorization_rule_list_result_py3.py deleted file mode 100644 index 986431f0b8c1..000000000000 --- a/sdk/notificationhubs/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/shared_access_authorization_rule_list_result_py3.py +++ /dev/null @@ -1,34 +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 msrest.serialization import Model - - -class SharedAccessAuthorizationRuleListResult(Model): - """The response of the List Namespace operation. - - :param value: Result of the List AuthorizationRules operation. - :type value: - list[~azure.mgmt.notificationhubs.models.SharedAccessAuthorizationRuleResource] - :param next_link: Link to the next set of results. Not empty if Value - contains incomplete list of AuthorizationRules - :type next_link: str - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[SharedAccessAuthorizationRuleResource]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__(self, *, value=None, next_link: str=None, **kwargs) -> None: - super(SharedAccessAuthorizationRuleListResult, self).__init__(**kwargs) - self.value = value - self.next_link = next_link diff --git a/sdk/notificationhubs/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/shared_access_authorization_rule_properties.py b/sdk/notificationhubs/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/shared_access_authorization_rule_properties.py deleted file mode 100644 index 336a9b615e2e..000000000000 --- a/sdk/notificationhubs/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/shared_access_authorization_rule_properties.py +++ /dev/null @@ -1,77 +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 msrest.serialization import Model - - -class SharedAccessAuthorizationRuleProperties(Model): - """SharedAccessAuthorizationRule properties. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param rights: The rights associated with the rule. - :type 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': '[AccessRights]'}, - '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): - 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 diff --git a/sdk/notificationhubs/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/shared_access_authorization_rule_properties_py3.py b/sdk/notificationhubs/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/shared_access_authorization_rule_properties_py3.py deleted file mode 100644 index 9b220d462436..000000000000 --- a/sdk/notificationhubs/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/shared_access_authorization_rule_properties_py3.py +++ /dev/null @@ -1,77 +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 msrest.serialization import Model - - -class SharedAccessAuthorizationRuleProperties(Model): - """SharedAccessAuthorizationRule properties. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param rights: The rights associated with the rule. - :type 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': '[AccessRights]'}, - '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, *, rights=None, **kwargs) -> None: - super(SharedAccessAuthorizationRuleProperties, self).__init__(**kwargs) - self.rights = rights - 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 diff --git a/sdk/notificationhubs/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/shared_access_authorization_rule_resource.py b/sdk/notificationhubs/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/shared_access_authorization_rule_resource.py deleted file mode 100644 index b7dbba779637..000000000000 --- a/sdk/notificationhubs/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/shared_access_authorization_rule_resource.py +++ /dev/null @@ -1,98 +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 .resource import Resource - - -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 - :param location: Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :param sku: The sku of the created namespace - :type sku: ~azure.mgmt.notificationhubs.models.Sku - :param rights: The rights associated with the rule. - :type 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': '[AccessRights]'}, - '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): - 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 diff --git a/sdk/notificationhubs/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/shared_access_authorization_rule_resource_paged.py b/sdk/notificationhubs/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/shared_access_authorization_rule_resource_paged.py deleted file mode 100644 index 76ef1c177995..000000000000 --- a/sdk/notificationhubs/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/shared_access_authorization_rule_resource_paged.py +++ /dev/null @@ -1,27 +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 msrest.paging import Paged - - -class SharedAccessAuthorizationRuleResourcePaged(Paged): - """ - A paging container for iterating over a list of :class:`SharedAccessAuthorizationRuleResource ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[SharedAccessAuthorizationRuleResource]'} - } - - def __init__(self, *args, **kwargs): - - super(SharedAccessAuthorizationRuleResourcePaged, self).__init__(*args, **kwargs) diff --git a/sdk/notificationhubs/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/shared_access_authorization_rule_resource_py3.py b/sdk/notificationhubs/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/shared_access_authorization_rule_resource_py3.py deleted file mode 100644 index 13fd38bed3f6..000000000000 --- a/sdk/notificationhubs/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/shared_access_authorization_rule_resource_py3.py +++ /dev/null @@ -1,98 +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 .resource_py3 import Resource - - -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 - :param location: Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :param sku: The sku of the created namespace - :type sku: ~azure.mgmt.notificationhubs.models.Sku - :param rights: The rights associated with the rule. - :type 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': '[AccessRights]'}, - '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, *, location: str=None, tags=None, sku=None, rights=None, **kwargs) -> None: - super(SharedAccessAuthorizationRuleResource, self).__init__(location=location, tags=tags, sku=sku, **kwargs) - self.rights = rights - 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 diff --git a/sdk/notificationhubs/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/sku.py b/sdk/notificationhubs/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/sku.py deleted file mode 100644 index 028ddb22359b..000000000000 --- a/sdk/notificationhubs/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/sku.py +++ /dev/null @@ -1,51 +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 msrest.serialization import Model - - -class Sku(Model): - """The Sku description for a namespace. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. Name of the notification hub sku. Possible values - include: 'Free', 'Basic', 'Standard' - :type name: str or ~azure.mgmt.notificationhubs.models.SkuName - :param tier: The tier of particular sku - :type tier: str - :param size: The Sku size - :type size: str - :param family: The Sku Family - :type family: str - :param capacity: The capacity of the resource - :type 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): - super(Sku, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.tier = kwargs.get('tier', None) - self.size = kwargs.get('size', None) - self.family = kwargs.get('family', None) - self.capacity = kwargs.get('capacity', None) diff --git a/sdk/notificationhubs/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/sku_py3.py b/sdk/notificationhubs/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/sku_py3.py deleted file mode 100644 index 39a4d9f98808..000000000000 --- a/sdk/notificationhubs/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/sku_py3.py +++ /dev/null @@ -1,51 +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 msrest.serialization import Model - - -class Sku(Model): - """The Sku description for a namespace. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. Name of the notification hub sku. Possible values - include: 'Free', 'Basic', 'Standard' - :type name: str or ~azure.mgmt.notificationhubs.models.SkuName - :param tier: The tier of particular sku - :type tier: str - :param size: The Sku size - :type size: str - :param family: The Sku Family - :type family: str - :param capacity: The capacity of the resource - :type 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, *, name, tier: str=None, size: str=None, family: str=None, capacity: int=None, **kwargs) -> None: - super(Sku, self).__init__(**kwargs) - self.name = name - self.tier = tier - self.size = size - self.family = family - self.capacity = capacity diff --git a/sdk/notificationhubs/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/sub_resource.py b/sdk/notificationhubs/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/sub_resource.py deleted file mode 100644 index 11e092cc6ff5..000000000000 --- a/sdk/notificationhubs/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/sub_resource.py +++ /dev/null @@ -1,28 +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 msrest.serialization import Model - - -class SubResource(Model): - """SubResource. - - :param id: Resource Id - :type id: str - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(SubResource, self).__init__(**kwargs) - self.id = kwargs.get('id', None) diff --git a/sdk/notificationhubs/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/sub_resource_py3.py b/sdk/notificationhubs/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/sub_resource_py3.py deleted file mode 100644 index 29e5afee38f9..000000000000 --- a/sdk/notificationhubs/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/sub_resource_py3.py +++ /dev/null @@ -1,28 +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 msrest.serialization import Model - - -class SubResource(Model): - """SubResource. - - :param id: Resource Id - :type id: str - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - } - - def __init__(self, *, id: str=None, **kwargs) -> None: - super(SubResource, self).__init__(**kwargs) - self.id = id diff --git a/sdk/notificationhubs/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/wns_credential.py b/sdk/notificationhubs/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/wns_credential.py deleted file mode 100644 index 4dc2f88e62f9..000000000000 --- a/sdk/notificationhubs/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/wns_credential.py +++ /dev/null @@ -1,36 +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 msrest.serialization import Model - - -class WnsCredential(Model): - """Description of a NotificationHub WnsCredential. - - :param package_sid: The package ID for this credential. - :type package_sid: str - :param secret_key: The secret key. - :type secret_key: str - :param windows_live_endpoint: The Windows Live endpoint. - :type 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): - 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/models/wns_credential_py3.py b/sdk/notificationhubs/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/wns_credential_py3.py deleted file mode 100644 index 104b788a1f68..000000000000 --- a/sdk/notificationhubs/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/wns_credential_py3.py +++ /dev/null @@ -1,36 +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 msrest.serialization import Model - - -class WnsCredential(Model): - """Description of a NotificationHub WnsCredential. - - :param package_sid: The package ID for this credential. - :type package_sid: str - :param secret_key: The secret key. - :type secret_key: str - :param windows_live_endpoint: The Windows Live endpoint. - :type 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, *, package_sid: str=None, secret_key: str=None, windows_live_endpoint: str=None, **kwargs) -> None: - super(WnsCredential, self).__init__(**kwargs) - self.package_sid = package_sid - self.secret_key = secret_key - self.windows_live_endpoint = windows_live_endpoint diff --git a/sdk/notificationhubs/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/operations/__init__.py b/sdk/notificationhubs/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/operations/__init__.py index a81c5ff50e13..03a7feb35675 100644 --- a/sdk/notificationhubs/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/operations/__init__.py +++ b/sdk/notificationhubs/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/operations/__init__.py @@ -9,9 +9,9 @@ # regenerated. # -------------------------------------------------------------------------- -from .operations import Operations -from .namespaces_operations import NamespacesOperations -from .notification_hubs_operations import NotificationHubsOperations +from ._operations import Operations +from ._namespaces_operations import NamespacesOperations +from ._notification_hubs_operations import NotificationHubsOperations __all__ = [ 'Operations', 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 similarity index 98% rename from sdk/notificationhubs/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/operations/namespaces_operations.py rename to sdk/notificationhubs/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/operations/_namespaces_operations.py index 26c7bd6db320..5e958c30e5df 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 @@ -21,6 +21,8 @@ class NamespacesOperations(object): """NamespacesOperations operations. + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -93,7 +95,6 @@ def check_availability( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('CheckAvailabilityResult', response) @@ -163,7 +164,6 @@ def create_or_update( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('NamespaceResource', response) if response.status_code == 201: @@ -237,7 +237,6 @@ def patch( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('NamespaceResource', response) @@ -379,7 +378,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('NamespaceResource', response) @@ -455,7 +453,6 @@ def create_or_update_authorization_rule( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('SharedAccessAuthorizationRuleResource', response) @@ -578,7 +575,6 @@ def get_authorization_rule( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('SharedAccessAuthorizationRuleResource', response) @@ -607,8 +603,7 @@ def list( ~azure.mgmt.notificationhubs.models.NamespaceResourcePaged[~azure.mgmt.notificationhubs.models.NamespaceResource] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list.metadata['url'] @@ -638,6 +633,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -648,12 +648,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.NamespaceResourcePaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.NamespaceResourcePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.NamespaceResourcePaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NotificationHubs/namespaces'} @@ -673,8 +671,7 @@ def list_all( ~azure.mgmt.notificationhubs.models.NamespaceResourcePaged[~azure.mgmt.notificationhubs.models.NamespaceResource] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_all.metadata['url'] @@ -703,6 +700,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -713,12 +715,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.NamespaceResourcePaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.NamespaceResourcePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.NamespaceResourcePaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_all.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.NotificationHubs/namespaces'} @@ -742,8 +742,7 @@ def list_authorization_rules( ~azure.mgmt.notificationhubs.models.SharedAccessAuthorizationRuleResourcePaged[~azure.mgmt.notificationhubs.models.SharedAccessAuthorizationRuleResource] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_authorization_rules.metadata['url'] @@ -774,6 +773,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -784,12 +788,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.SharedAccessAuthorizationRuleResourcePaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.SharedAccessAuthorizationRuleResourcePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.SharedAccessAuthorizationRuleResourcePaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_authorization_rules.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NotificationHubs/namespaces/{namespaceName}/AuthorizationRules'} @@ -851,7 +853,6 @@ def list_keys( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('SharedAccessAuthorizationRuleListResult', response) @@ -928,7 +929,6 @@ def regenerate_keys( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('ResourceListKeys', response) diff --git a/sdk/notificationhubs/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/operations/notification_hubs_operations.py b/sdk/notificationhubs/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/operations/_notification_hubs_operations.py similarity index 98% rename from sdk/notificationhubs/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/operations/notification_hubs_operations.py rename to sdk/notificationhubs/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/operations/_notification_hubs_operations.py index 343bfd03bce3..d15f134967f9 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 @@ -19,6 +19,8 @@ class NotificationHubsOperations(object): """NotificationHubsOperations operations. + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -95,7 +97,6 @@ def check_notification_hub_availability( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('CheckAvailabilityResult', response) @@ -168,7 +169,6 @@ def create_or_update( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('NotificationHubResource', response) if response.status_code == 201: @@ -246,7 +246,6 @@ def patch( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('NotificationHubResource', response) @@ -367,7 +366,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('NotificationHubResource', response) @@ -441,7 +439,6 @@ def debug_send( raise exp deserialized = None - if response.status_code == 201: deserialized = self._deserialize('DebugSendResponse', response) @@ -520,7 +517,6 @@ def create_or_update_authorization_rule( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('SharedAccessAuthorizationRuleResource', response) @@ -649,7 +645,6 @@ def get_authorization_rule( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('SharedAccessAuthorizationRuleResource', response) @@ -678,8 +673,7 @@ def list( ~azure.mgmt.notificationhubs.models.NotificationHubResourcePaged[~azure.mgmt.notificationhubs.models.NotificationHubResource] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list.metadata['url'] @@ -710,6 +704,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -720,12 +719,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.NotificationHubResourcePaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.NotificationHubResourcePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.NotificationHubResourcePaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NotificationHubs/namespaces/{namespaceName}/notificationHubs'} @@ -751,8 +748,7 @@ def list_authorization_rules( ~azure.mgmt.notificationhubs.models.SharedAccessAuthorizationRuleResourcePaged[~azure.mgmt.notificationhubs.models.SharedAccessAuthorizationRuleResource] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_authorization_rules.metadata['url'] @@ -784,6 +780,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -794,12 +795,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.SharedAccessAuthorizationRuleResourcePaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.SharedAccessAuthorizationRuleResourcePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.SharedAccessAuthorizationRuleResourcePaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_authorization_rules.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NotificationHubs/namespaces/{namespaceName}/notificationHubs/{notificationHubName}/AuthorizationRules'} @@ -863,7 +862,6 @@ def list_keys( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('ResourceListKeys', response) @@ -943,7 +941,6 @@ def regenerate_keys( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('ResourceListKeys', response) @@ -1008,7 +1005,6 @@ def get_pns_credentials( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('PnsCredentialsResource', response) 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 similarity index 90% rename from sdk/notificationhubs/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/operations/operations.py rename to sdk/notificationhubs/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/operations/_operations.py index 65a041411647..37450593c079 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 @@ -18,6 +18,8 @@ class Operations(object): """Operations operations. + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -51,8 +53,7 @@ def list( :raises: :class:`ErrorResponseException` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list.metadata['url'] @@ -77,6 +78,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -85,12 +91,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.OperationPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.OperationPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.OperationPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list.metadata = {'url': '/providers/Microsoft.NotificationHubs/operations'} diff --git a/sdk/notificationhubs/azure-mgmt-notificationhubs/setup.py b/sdk/notificationhubs/azure-mgmt-notificationhubs/setup.py index 1d346fa2df85..f1cd13bcdce2 100644 --- a/sdk/notificationhubs/azure-mgmt-notificationhubs/setup.py +++ b/sdk/notificationhubs/azure-mgmt-notificationhubs/setup.py @@ -36,7 +36,9 @@ pass # Version extraction inspired from 'requests' -with open(os.path.join(package_folder_path, 'version.py'), 'r') as fd: +with open(os.path.join(package_folder_path, 'version.py') + if os.path.exists(os.path.join(package_folder_path, 'version.py')) + else os.path.join(package_folder_path, '_version.py'), 'r') as fd: version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) @@ -64,10 +66,10 @@ 'Programming Language :: Python :: 2', 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.4', 'Programming Language :: Python :: 3.5', 'Programming Language :: Python :: 3.6', 'Programming Language :: Python :: 3.7', + 'Programming Language :: Python :: 3.8', 'License :: OSI Approved :: MIT License', ], zip_safe=False,