Source code for azure.mgmt.notificationhubs.models._models_py3

# coding=utf-8
# pylint: disable=too-many-lines
# --------------------------------------------------------------------------
# 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.
# --------------------------------------------------------------------------

import datetime
import sys
from typing import Any, Dict, List, Optional, TYPE_CHECKING, Union

from .. import _serialization

if sys.version_info >= (3, 9):
    from collections.abc import MutableMapping
else:
    from typing import MutableMapping  # type: ignore  # pylint: disable=ungrouped-imports

if TYPE_CHECKING:
    # pylint: disable=unused-import,ungrouped-imports
    from .. import models as _models
JSON = MutableMapping[str, Any]  # pylint: disable=unsubscriptable-object


[docs]class AdmCredential(_serialization.Model): """Description of a NotificationHub AdmCredential. :ivar client_id: The client identifier. :vartype client_id: str :ivar client_secret: The credential secret access key. :vartype client_secret: str :ivar auth_token_url: The URL of the authorization token. :vartype auth_token_url: str """ _attribute_map = { "client_id": {"key": "properties.clientId", "type": "str"}, "client_secret": {"key": "properties.clientSecret", "type": "str"}, "auth_token_url": {"key": "properties.authTokenUrl", "type": "str"}, } def __init__( self, *, client_id: Optional[str] = None, client_secret: Optional[str] = None, auth_token_url: Optional[str] = None, **kwargs ): """ :keyword client_id: The client identifier. :paramtype client_id: str :keyword client_secret: The credential secret access key. :paramtype client_secret: str :keyword auth_token_url: The URL of the authorization token. :paramtype auth_token_url: str """ super().__init__(**kwargs) self.client_id = client_id self.client_secret = client_secret self.auth_token_url = auth_token_url
[docs]class ApnsCredential(_serialization.Model): """Description of a NotificationHub ApnsCredential. :ivar apns_certificate: The APNS certificate. Specify if using Certificate Authentication Mode. :vartype apns_certificate: str :ivar certificate_key: The APNS certificate password if it exists. :vartype certificate_key: str :ivar endpoint: The APNS endpoint of this credential. If using Certificate Authentication Mode and Sandbox specify 'gateway.sandbox.push.apple.com'. If using Certificate Authentication Mode and Production specify 'gateway.push.apple.com'. If using Token Authentication Mode and Sandbox specify 'https://api.development.push.apple.com:443/3/device'. If using Token Authentication Mode and Production specify 'https://api.push.apple.com:443/3/device'. :vartype endpoint: str :ivar thumbprint: The APNS certificate thumbprint. Specify if using Certificate Authentication Mode. :vartype thumbprint: str :ivar key_id: A 10-character key identifier (kid) key, obtained from your developer account. Specify if using Token Authentication Mode. :vartype key_id: str :ivar app_name: The name of the application or BundleId. Specify if using Token Authentication Mode. :vartype app_name: str :ivar app_id: The issuer (iss) registered claim key. The value is a 10-character TeamId, obtained from your developer account. Specify if using Token Authentication Mode. :vartype app_id: str :ivar token: Provider Authentication Token, obtained through your developer account. Specify if using Token Authentication Mode. :vartype token: str """ _attribute_map = { "apns_certificate": {"key": "properties.apnsCertificate", "type": "str"}, "certificate_key": {"key": "properties.certificateKey", "type": "str"}, "endpoint": {"key": "properties.endpoint", "type": "str"}, "thumbprint": {"key": "properties.thumbprint", "type": "str"}, "key_id": {"key": "properties.keyId", "type": "str"}, "app_name": {"key": "properties.appName", "type": "str"}, "app_id": {"key": "properties.appId", "type": "str"}, "token": {"key": "properties.token", "type": "str"}, } def __init__( self, *, apns_certificate: Optional[str] = None, certificate_key: Optional[str] = None, endpoint: Optional[str] = None, thumbprint: Optional[str] = None, key_id: Optional[str] = None, app_name: Optional[str] = None, app_id: Optional[str] = None, token: Optional[str] = None, **kwargs ): """ :keyword apns_certificate: The APNS certificate. Specify if using Certificate Authentication Mode. :paramtype apns_certificate: str :keyword certificate_key: The APNS certificate password if it exists. :paramtype certificate_key: str :keyword endpoint: The APNS endpoint of this credential. If using Certificate Authentication Mode and Sandbox specify 'gateway.sandbox.push.apple.com'. If using Certificate Authentication Mode and Production specify 'gateway.push.apple.com'. If using Token Authentication Mode and Sandbox specify 'https://api.development.push.apple.com:443/3/device'. If using Token Authentication Mode and Production specify 'https://api.push.apple.com:443/3/device'. :paramtype endpoint: str :keyword thumbprint: The APNS certificate thumbprint. Specify if using Certificate Authentication Mode. :paramtype thumbprint: str :keyword key_id: A 10-character key identifier (kid) key, obtained from your developer account. Specify if using Token Authentication Mode. :paramtype key_id: str :keyword app_name: The name of the application or BundleId. Specify if using Token Authentication Mode. :paramtype app_name: str :keyword app_id: The issuer (iss) registered claim key. The value is a 10-character TeamId, obtained from your developer account. Specify if using Token Authentication Mode. :paramtype app_id: str :keyword token: Provider Authentication Token, obtained through your developer account. Specify if using Token Authentication Mode. :paramtype token: str """ super().__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
[docs]class BaiduCredential(_serialization.Model): """Description of a NotificationHub BaiduCredential. :ivar baidu_api_key: Baidu Api Key. :vartype baidu_api_key: str :ivar baidu_end_point: Baidu Endpoint. :vartype baidu_end_point: str :ivar baidu_secret_key: Baidu Secret Key. :vartype baidu_secret_key: str """ _attribute_map = { "baidu_api_key": {"key": "properties.baiduApiKey", "type": "str"}, "baidu_end_point": {"key": "properties.baiduEndPoint", "type": "str"}, "baidu_secret_key": {"key": "properties.baiduSecretKey", "type": "str"}, } def __init__( self, *, baidu_api_key: Optional[str] = None, baidu_end_point: Optional[str] = None, baidu_secret_key: Optional[str] = None, **kwargs ): """ :keyword baidu_api_key: Baidu Api Key. :paramtype baidu_api_key: str :keyword baidu_end_point: Baidu Endpoint. :paramtype baidu_end_point: str :keyword baidu_secret_key: Baidu Secret Key. :paramtype baidu_secret_key: str """ super().__init__(**kwargs) self.baidu_api_key = baidu_api_key self.baidu_end_point = baidu_end_point self.baidu_secret_key = baidu_secret_key
[docs]class CheckAvailabilityParameters(_serialization.Model): """Parameters supplied to the Check Name Availability for Namespace and NotificationHubs. Variables are only populated by the server, and will be ignored when sending a request. All required parameters must be populated in order to send to Azure. :ivar id: Resource Id. :vartype id: str :ivar name: Resource name. Required. :vartype name: str :ivar type: Resource type. :vartype type: str :ivar location: Resource location. :vartype location: str :ivar tags: Resource tags. :vartype tags: dict[str, str] :ivar sku: The sku of the created namespace. :vartype sku: ~azure.mgmt.notificationhubs.models.Sku :ivar is_availiable: True if the name is available and can be used to create new Namespace/NotificationHub. Otherwise false. :vartype is_availiable: bool """ _validation = { "id": {"readonly": True}, "name": {"required": True}, "type": {"readonly": True}, } _attribute_map = { "id": {"key": "id", "type": "str"}, "name": {"key": "name", "type": "str"}, "type": {"key": "type", "type": "str"}, "location": {"key": "location", "type": "str"}, "tags": {"key": "tags", "type": "{str}"}, "sku": {"key": "sku", "type": "Sku"}, "is_availiable": {"key": "isAvailiable", "type": "bool"}, } def __init__( self, *, name: str, location: Optional[str] = None, tags: Optional[Dict[str, str]] = None, sku: Optional["_models.Sku"] = None, is_availiable: Optional[bool] = None, **kwargs ): """ :keyword name: Resource name. Required. :paramtype name: str :keyword location: Resource location. :paramtype location: str :keyword tags: Resource tags. :paramtype tags: dict[str, str] :keyword sku: The sku of the created namespace. :paramtype sku: ~azure.mgmt.notificationhubs.models.Sku :keyword is_availiable: True if the name is available and can be used to create new Namespace/NotificationHub. Otherwise false. :paramtype is_availiable: bool """ super().__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
[docs]class Resource(_serialization.Model): """Resource. Variables are only populated by the server, and will be ignored when sending a request. :ivar id: Resource Id. :vartype id: str :ivar name: Resource name. :vartype name: str :ivar type: Resource type. :vartype type: str :ivar location: Resource location. :vartype location: str :ivar tags: Resource tags. :vartype tags: dict[str, str] :ivar sku: The sku of the created namespace. :vartype sku: ~azure.mgmt.notificationhubs.models.Sku """ _validation = { "id": {"readonly": True}, "name": {"readonly": True}, "type": {"readonly": True}, } _attribute_map = { "id": {"key": "id", "type": "str"}, "name": {"key": "name", "type": "str"}, "type": {"key": "type", "type": "str"}, "location": {"key": "location", "type": "str"}, "tags": {"key": "tags", "type": "{str}"}, "sku": {"key": "sku", "type": "Sku"}, } def __init__( self, *, location: Optional[str] = None, tags: Optional[Dict[str, str]] = None, sku: Optional["_models.Sku"] = None, **kwargs ): """ :keyword location: Resource location. :paramtype location: str :keyword tags: Resource tags. :paramtype tags: dict[str, str] :keyword sku: The sku of the created namespace. :paramtype sku: ~azure.mgmt.notificationhubs.models.Sku """ super().__init__(**kwargs) self.id = None self.name = None self.type = None self.location = location self.tags = tags self.sku = sku
[docs]class CheckAvailabilityResult(Resource): """Description of a CheckAvailability resource. Variables are only populated by the server, and will be ignored when sending a request. :ivar id: Resource Id. :vartype id: str :ivar name: Resource name. :vartype name: str :ivar type: Resource type. :vartype type: str :ivar location: Resource location. :vartype location: str :ivar tags: Resource tags. :vartype tags: dict[str, str] :ivar sku: The sku of the created namespace. :vartype sku: ~azure.mgmt.notificationhubs.models.Sku :ivar is_availiable: True if the name is available and can be used to create new Namespace/NotificationHub. Otherwise false. :vartype is_availiable: bool """ _validation = { "id": {"readonly": True}, "name": {"readonly": True}, "type": {"readonly": True}, } _attribute_map = { "id": {"key": "id", "type": "str"}, "name": {"key": "name", "type": "str"}, "type": {"key": "type", "type": "str"}, "location": {"key": "location", "type": "str"}, "tags": {"key": "tags", "type": "{str}"}, "sku": {"key": "sku", "type": "Sku"}, "is_availiable": {"key": "isAvailiable", "type": "bool"}, } def __init__( self, *, location: Optional[str] = None, tags: Optional[Dict[str, str]] = None, sku: Optional["_models.Sku"] = None, is_availiable: Optional[bool] = None, **kwargs ): """ :keyword location: Resource location. :paramtype location: str :keyword tags: Resource tags. :paramtype tags: dict[str, str] :keyword sku: The sku of the created namespace. :paramtype sku: ~azure.mgmt.notificationhubs.models.Sku :keyword is_availiable: True if the name is available and can be used to create new Namespace/NotificationHub. Otherwise false. :paramtype is_availiable: bool """ super().__init__(location=location, tags=tags, sku=sku, **kwargs) self.is_availiable = is_availiable
[docs]class DebugSendResponse(Resource): """Description of a NotificationHub Resource. Variables are only populated by the server, and will be ignored when sending a request. :ivar id: Resource Id. :vartype id: str :ivar name: Resource name. :vartype name: str :ivar type: Resource type. :vartype type: str :ivar location: Resource location. :vartype location: str :ivar tags: Resource tags. :vartype tags: dict[str, str] :ivar sku: The sku of the created namespace. :vartype sku: ~azure.mgmt.notificationhubs.models.Sku :ivar success: successful send. :vartype success: float :ivar failure: send failure. :vartype failure: float :ivar results: actual failure description. :vartype results: JSON """ _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: Optional[str] = None, tags: Optional[Dict[str, str]] = None, sku: Optional["_models.Sku"] = None, success: Optional[float] = None, failure: Optional[float] = None, results: Optional[JSON] = None, **kwargs ): """ :keyword location: Resource location. :paramtype location: str :keyword tags: Resource tags. :paramtype tags: dict[str, str] :keyword sku: The sku of the created namespace. :paramtype sku: ~azure.mgmt.notificationhubs.models.Sku :keyword success: successful send. :paramtype success: float :keyword failure: send failure. :paramtype failure: float :keyword results: actual failure description. :paramtype results: JSON """ super().__init__(location=location, tags=tags, sku=sku, **kwargs) self.success = success self.failure = failure self.results = results
[docs]class ErrorResponse(_serialization.Model): """Error response indicates NotificationHubs service is not able to process the incoming request. The reason is provided in the error message. :ivar code: Error code. :vartype code: str :ivar message: Error message indicating why the operation failed. :vartype message: str """ _attribute_map = { "code": {"key": "code", "type": "str"}, "message": {"key": "message", "type": "str"}, } def __init__(self, *, code: Optional[str] = None, message: Optional[str] = None, **kwargs): """ :keyword code: Error code. :paramtype code: str :keyword message: Error message indicating why the operation failed. :paramtype message: str """ super().__init__(**kwargs) self.code = code self.message = message
[docs]class GcmCredential(_serialization.Model): """Description of a NotificationHub GcmCredential. :ivar gcm_endpoint: The FCM legacy endpoint. Default value is 'https://fcm.googleapis.com/fcm/send'. :vartype gcm_endpoint: str :ivar google_api_key: The Google API key. :vartype google_api_key: str """ _attribute_map = { "gcm_endpoint": {"key": "properties.gcmEndpoint", "type": "str"}, "google_api_key": {"key": "properties.googleApiKey", "type": "str"}, } def __init__(self, *, gcm_endpoint: Optional[str] = None, google_api_key: Optional[str] = None, **kwargs): """ :keyword gcm_endpoint: The FCM legacy endpoint. Default value is 'https://fcm.googleapis.com/fcm/send'. :paramtype gcm_endpoint: str :keyword google_api_key: The Google API key. :paramtype google_api_key: str """ super().__init__(**kwargs) self.gcm_endpoint = gcm_endpoint self.google_api_key = google_api_key
[docs]class MpnsCredential(_serialization.Model): """Description of a NotificationHub MpnsCredential. :ivar mpns_certificate: The MPNS certificate. :vartype mpns_certificate: str :ivar certificate_key: The certificate key for this credential. :vartype certificate_key: str :ivar thumbprint: The MPNS certificate Thumbprint. :vartype thumbprint: str """ _attribute_map = { "mpns_certificate": {"key": "properties.mpnsCertificate", "type": "str"}, "certificate_key": {"key": "properties.certificateKey", "type": "str"}, "thumbprint": {"key": "properties.thumbprint", "type": "str"}, } def __init__( self, *, mpns_certificate: Optional[str] = None, certificate_key: Optional[str] = None, thumbprint: Optional[str] = None, **kwargs ): """ :keyword mpns_certificate: The MPNS certificate. :paramtype mpns_certificate: str :keyword certificate_key: The certificate key for this credential. :paramtype certificate_key: str :keyword thumbprint: The MPNS certificate Thumbprint. :paramtype thumbprint: str """ super().__init__(**kwargs) self.mpns_certificate = mpns_certificate self.certificate_key = certificate_key self.thumbprint = thumbprint
[docs]class NamespaceCreateOrUpdateParameters(Resource): # pylint: disable=too-many-instance-attributes """Parameters supplied to the CreateOrUpdate Namespace operation. Variables are only populated by the server, and will be ignored when sending a request. :ivar id: Resource Id. :vartype id: str :ivar name: Resource name. :vartype name: str :ivar type: Resource type. :vartype type: str :ivar location: Resource location. :vartype location: str :ivar tags: Resource tags. :vartype tags: dict[str, str] :ivar sku: The sku of the created namespace. :vartype sku: ~azure.mgmt.notificationhubs.models.Sku :ivar name_properties_name: The name of the namespace. :vartype name_properties_name: str :ivar provisioning_state: Provisioning state of the Namespace. :vartype provisioning_state: str :ivar region: Specifies the targeted region in which the namespace should be created. It can be any of the following values: Australia East, Australia Southeast, Central US, East US, East US 2, West US, North Central US, South Central US, East Asia, Southeast Asia, Brazil South, Japan East, Japan West, North Europe, West Europe. :vartype region: str :ivar metric_id: Identifier for Azure Insights metrics. :vartype metric_id: str :ivar status: Status of the namespace. It can be any of these values:1 = Created/Active2 = Creating3 = Suspended4 = Deleting. :vartype status: str :ivar created_at: The time the namespace was created. :vartype created_at: ~datetime.datetime :ivar updated_at: The time the namespace was updated. :vartype updated_at: ~datetime.datetime :ivar service_bus_endpoint: Endpoint you can use to perform NotificationHub operations. :vartype service_bus_endpoint: str :ivar subscription_id: The Id of the Azure subscription associated with the namespace. :vartype subscription_id: str :ivar scale_unit: ScaleUnit where the namespace gets created. :vartype scale_unit: str :ivar enabled: Whether or not the namespace is currently enabled. :vartype enabled: bool :ivar critical: Whether or not the namespace is set as Critical. :vartype critical: bool :ivar data_center: Data center for the namespace. :vartype data_center: str :ivar namespace_type: The namespace type. Known values are: "Messaging" and "NotificationHub". :vartype namespace_type: str or ~azure.mgmt.notificationhubs.models.NamespaceType """ _validation = { "id": {"readonly": True}, "name": {"readonly": True}, "type": {"readonly": True}, "metric_id": {"readonly": True}, } _attribute_map = { "id": {"key": "id", "type": "str"}, "name": {"key": "name", "type": "str"}, "type": {"key": "type", "type": "str"}, "location": {"key": "location", "type": "str"}, "tags": {"key": "tags", "type": "{str}"}, "sku": {"key": "sku", "type": "Sku"}, "name_properties_name": {"key": "properties.name", "type": "str"}, "provisioning_state": {"key": "properties.provisioningState", "type": "str"}, "region": {"key": "properties.region", "type": "str"}, "metric_id": {"key": "properties.metricId", "type": "str"}, "status": {"key": "properties.status", "type": "str"}, "created_at": {"key": "properties.createdAt", "type": "iso-8601"}, "updated_at": {"key": "properties.updatedAt", "type": "iso-8601"}, "service_bus_endpoint": {"key": "properties.serviceBusEndpoint", "type": "str"}, "subscription_id": {"key": "properties.subscriptionId", "type": "str"}, "scale_unit": {"key": "properties.scaleUnit", "type": "str"}, "enabled": {"key": "properties.enabled", "type": "bool"}, "critical": {"key": "properties.critical", "type": "bool"}, "data_center": {"key": "properties.dataCenter", "type": "str"}, "namespace_type": {"key": "properties.namespaceType", "type": "str"}, } def __init__( self, *, location: Optional[str] = None, tags: Optional[Dict[str, str]] = None, sku: Optional["_models.Sku"] = None, name_properties_name: Optional[str] = None, provisioning_state: Optional[str] = None, region: Optional[str] = None, status: Optional[str] = None, created_at: Optional[datetime.datetime] = None, updated_at: Optional[datetime.datetime] = None, service_bus_endpoint: Optional[str] = None, subscription_id: Optional[str] = None, scale_unit: Optional[str] = None, enabled: Optional[bool] = None, critical: Optional[bool] = None, data_center: Optional[str] = None, namespace_type: Optional[Union[str, "_models.NamespaceType"]] = None, **kwargs ): """ :keyword location: Resource location. :paramtype location: str :keyword tags: Resource tags. :paramtype tags: dict[str, str] :keyword sku: The sku of the created namespace. :paramtype sku: ~azure.mgmt.notificationhubs.models.Sku :keyword name_properties_name: The name of the namespace. :paramtype name_properties_name: str :keyword provisioning_state: Provisioning state of the Namespace. :paramtype provisioning_state: str :keyword region: Specifies the targeted region in which the namespace should be created. It can be any of the following values: Australia East, Australia Southeast, Central US, East US, East US 2, West US, North Central US, South Central US, East Asia, Southeast Asia, Brazil South, Japan East, Japan West, North Europe, West Europe. :paramtype region: str :keyword status: Status of the namespace. It can be any of these values:1 = Created/Active2 = Creating3 = Suspended4 = Deleting. :paramtype status: str :keyword created_at: The time the namespace was created. :paramtype created_at: ~datetime.datetime :keyword updated_at: The time the namespace was updated. :paramtype updated_at: ~datetime.datetime :keyword service_bus_endpoint: Endpoint you can use to perform NotificationHub operations. :paramtype service_bus_endpoint: str :keyword subscription_id: The Id of the Azure subscription associated with the namespace. :paramtype subscription_id: str :keyword scale_unit: ScaleUnit where the namespace gets created. :paramtype scale_unit: str :keyword enabled: Whether or not the namespace is currently enabled. :paramtype enabled: bool :keyword critical: Whether or not the namespace is set as Critical. :paramtype critical: bool :keyword data_center: Data center for the namespace. :paramtype data_center: str :keyword namespace_type: The namespace type. Known values are: "Messaging" and "NotificationHub". :paramtype namespace_type: str or ~azure.mgmt.notificationhubs.models.NamespaceType """ super().__init__(location=location, tags=tags, sku=sku, **kwargs) self.name_properties_name = name_properties_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
[docs]class NamespaceListResult(_serialization.Model): """The response of the List Namespace operation. :ivar value: Result of the List Namespace operation. :vartype value: list[~azure.mgmt.notificationhubs.models.NamespaceResource] :ivar next_link: Link to the next set of results. Not empty if Value contains incomplete list of Namespaces. :vartype next_link: str """ _attribute_map = { "value": {"key": "value", "type": "[NamespaceResource]"}, "next_link": {"key": "nextLink", "type": "str"}, } def __init__( self, *, value: Optional[List["_models.NamespaceResource"]] = None, next_link: Optional[str] = None, **kwargs ): """ :keyword value: Result of the List Namespace operation. :paramtype value: list[~azure.mgmt.notificationhubs.models.NamespaceResource] :keyword next_link: Link to the next set of results. Not empty if Value contains incomplete list of Namespaces. :paramtype next_link: str """ super().__init__(**kwargs) self.value = value self.next_link = next_link
[docs]class NamespacePatchParameters(_serialization.Model): """Parameters supplied to the Patch Namespace operation. :ivar tags: Resource tags. :vartype tags: dict[str, str] :ivar sku: The sku of the created namespace. :vartype sku: ~azure.mgmt.notificationhubs.models.Sku """ _attribute_map = { "tags": {"key": "tags", "type": "{str}"}, "sku": {"key": "sku", "type": "Sku"}, } def __init__(self, *, tags: Optional[Dict[str, str]] = None, sku: Optional["_models.Sku"] = None, **kwargs): """ :keyword tags: Resource tags. :paramtype tags: dict[str, str] :keyword sku: The sku of the created namespace. :paramtype sku: ~azure.mgmt.notificationhubs.models.Sku """ super().__init__(**kwargs) self.tags = tags self.sku = sku
[docs]class NamespaceResource(Resource): # pylint: disable=too-many-instance-attributes """Description of a Namespace resource. Variables are only populated by the server, and will be ignored when sending a request. :ivar id: Resource Id. :vartype id: str :ivar name: Resource name. :vartype name: str :ivar type: Resource type. :vartype type: str :ivar location: Resource location. :vartype location: str :ivar tags: Resource tags. :vartype tags: dict[str, str] :ivar sku: The sku of the created namespace. :vartype sku: ~azure.mgmt.notificationhubs.models.Sku :ivar name_properties_name: The name of the namespace. :vartype name_properties_name: str :ivar provisioning_state: Provisioning state of the Namespace. :vartype provisioning_state: str :ivar region: Specifies the targeted region in which the namespace should be created. It can be any of the following values: Australia East, Australia Southeast, Central US, East US, East US 2, West US, North Central US, South Central US, East Asia, Southeast Asia, Brazil South, Japan East, Japan West, North Europe, West Europe. :vartype region: str :ivar metric_id: Identifier for Azure Insights metrics. :vartype metric_id: str :ivar status: Status of the namespace. It can be any of these values:1 = Created/Active2 = Creating3 = Suspended4 = Deleting. :vartype status: str :ivar created_at: The time the namespace was created. :vartype created_at: ~datetime.datetime :ivar updated_at: The time the namespace was updated. :vartype updated_at: ~datetime.datetime :ivar service_bus_endpoint: Endpoint you can use to perform NotificationHub operations. :vartype service_bus_endpoint: str :ivar subscription_id: The Id of the Azure subscription associated with the namespace. :vartype subscription_id: str :ivar scale_unit: ScaleUnit where the namespace gets created. :vartype scale_unit: str :ivar enabled: Whether or not the namespace is currently enabled. :vartype enabled: bool :ivar critical: Whether or not the namespace is set as Critical. :vartype critical: bool :ivar data_center: Data center for the namespace. :vartype data_center: str :ivar namespace_type: The namespace type. Known values are: "Messaging" and "NotificationHub". :vartype namespace_type: str or ~azure.mgmt.notificationhubs.models.NamespaceType """ _validation = { "id": {"readonly": True}, "name": {"readonly": True}, "type": {"readonly": True}, "metric_id": {"readonly": True}, } _attribute_map = { "id": {"key": "id", "type": "str"}, "name": {"key": "name", "type": "str"}, "type": {"key": "type", "type": "str"}, "location": {"key": "location", "type": "str"}, "tags": {"key": "tags", "type": "{str}"}, "sku": {"key": "sku", "type": "Sku"}, "name_properties_name": {"key": "properties.name", "type": "str"}, "provisioning_state": {"key": "properties.provisioningState", "type": "str"}, "region": {"key": "properties.region", "type": "str"}, "metric_id": {"key": "properties.metricId", "type": "str"}, "status": {"key": "properties.status", "type": "str"}, "created_at": {"key": "properties.createdAt", "type": "iso-8601"}, "updated_at": {"key": "properties.updatedAt", "type": "iso-8601"}, "service_bus_endpoint": {"key": "properties.serviceBusEndpoint", "type": "str"}, "subscription_id": {"key": "properties.subscriptionId", "type": "str"}, "scale_unit": {"key": "properties.scaleUnit", "type": "str"}, "enabled": {"key": "properties.enabled", "type": "bool"}, "critical": {"key": "properties.critical", "type": "bool"}, "data_center": {"key": "properties.dataCenter", "type": "str"}, "namespace_type": {"key": "properties.namespaceType", "type": "str"}, } def __init__( self, *, location: Optional[str] = None, tags: Optional[Dict[str, str]] = None, sku: Optional["_models.Sku"] = None, name_properties_name: Optional[str] = None, provisioning_state: Optional[str] = None, region: Optional[str] = None, status: Optional[str] = None, created_at: Optional[datetime.datetime] = None, updated_at: Optional[datetime.datetime] = None, service_bus_endpoint: Optional[str] = None, subscription_id: Optional[str] = None, scale_unit: Optional[str] = None, enabled: Optional[bool] = None, critical: Optional[bool] = None, data_center: Optional[str] = None, namespace_type: Optional[Union[str, "_models.NamespaceType"]] = None, **kwargs ): """ :keyword location: Resource location. :paramtype location: str :keyword tags: Resource tags. :paramtype tags: dict[str, str] :keyword sku: The sku of the created namespace. :paramtype sku: ~azure.mgmt.notificationhubs.models.Sku :keyword name_properties_name: The name of the namespace. :paramtype name_properties_name: str :keyword provisioning_state: Provisioning state of the Namespace. :paramtype provisioning_state: str :keyword region: Specifies the targeted region in which the namespace should be created. It can be any of the following values: Australia East, Australia Southeast, Central US, East US, East US 2, West US, North Central US, South Central US, East Asia, Southeast Asia, Brazil South, Japan East, Japan West, North Europe, West Europe. :paramtype region: str :keyword status: Status of the namespace. It can be any of these values:1 = Created/Active2 = Creating3 = Suspended4 = Deleting. :paramtype status: str :keyword created_at: The time the namespace was created. :paramtype created_at: ~datetime.datetime :keyword updated_at: The time the namespace was updated. :paramtype updated_at: ~datetime.datetime :keyword service_bus_endpoint: Endpoint you can use to perform NotificationHub operations. :paramtype service_bus_endpoint: str :keyword subscription_id: The Id of the Azure subscription associated with the namespace. :paramtype subscription_id: str :keyword scale_unit: ScaleUnit where the namespace gets created. :paramtype scale_unit: str :keyword enabled: Whether or not the namespace is currently enabled. :paramtype enabled: bool :keyword critical: Whether or not the namespace is set as Critical. :paramtype critical: bool :keyword data_center: Data center for the namespace. :paramtype data_center: str :keyword namespace_type: The namespace type. Known values are: "Messaging" and "NotificationHub". :paramtype namespace_type: str or ~azure.mgmt.notificationhubs.models.NamespaceType """ super().__init__(location=location, tags=tags, sku=sku, **kwargs) self.name_properties_name = name_properties_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
[docs]class NotificationHubCreateOrUpdateParameters(Resource): # pylint: disable=too-many-instance-attributes """Parameters supplied to the CreateOrUpdate NotificationHub operation. Variables are only populated by the server, and will be ignored when sending a request. :ivar id: Resource Id. :vartype id: str :ivar name: Resource name. :vartype name: str :ivar type: Resource type. :vartype type: str :ivar location: Resource location. :vartype location: str :ivar tags: Resource tags. :vartype tags: dict[str, str] :ivar sku: The sku of the created namespace. :vartype sku: ~azure.mgmt.notificationhubs.models.Sku :ivar name_properties_name: The NotificationHub name. :vartype name_properties_name: str :ivar registration_ttl: The RegistrationTtl of the created NotificationHub. :vartype registration_ttl: str :ivar authorization_rules: The AuthorizationRules of the created NotificationHub. :vartype authorization_rules: list[~azure.mgmt.notificationhubs.models.SharedAccessAuthorizationRuleProperties] :ivar apns_credential: The ApnsCredential of the created NotificationHub. :vartype apns_credential: ~azure.mgmt.notificationhubs.models.ApnsCredential :ivar wns_credential: The WnsCredential of the created NotificationHub. :vartype wns_credential: ~azure.mgmt.notificationhubs.models.WnsCredential :ivar gcm_credential: The GcmCredential of the created NotificationHub. :vartype gcm_credential: ~azure.mgmt.notificationhubs.models.GcmCredential :ivar mpns_credential: The MpnsCredential of the created NotificationHub. :vartype mpns_credential: ~azure.mgmt.notificationhubs.models.MpnsCredential :ivar adm_credential: The AdmCredential of the created NotificationHub. :vartype adm_credential: ~azure.mgmt.notificationhubs.models.AdmCredential :ivar baidu_credential: The BaiduCredential of the created NotificationHub. :vartype baidu_credential: ~azure.mgmt.notificationhubs.models.BaiduCredential """ _validation = { "id": {"readonly": True}, "name": {"readonly": True}, "type": {"readonly": True}, } _attribute_map = { "id": {"key": "id", "type": "str"}, "name": {"key": "name", "type": "str"}, "type": {"key": "type", "type": "str"}, "location": {"key": "location", "type": "str"}, "tags": {"key": "tags", "type": "{str}"}, "sku": {"key": "sku", "type": "Sku"}, "name_properties_name": {"key": "properties.name", "type": "str"}, "registration_ttl": {"key": "properties.registrationTtl", "type": "str"}, "authorization_rules": { "key": "properties.authorizationRules", "type": "[SharedAccessAuthorizationRuleProperties]", }, "apns_credential": {"key": "properties.apnsCredential", "type": "ApnsCredential"}, "wns_credential": {"key": "properties.wnsCredential", "type": "WnsCredential"}, "gcm_credential": {"key": "properties.gcmCredential", "type": "GcmCredential"}, "mpns_credential": {"key": "properties.mpnsCredential", "type": "MpnsCredential"}, "adm_credential": {"key": "properties.admCredential", "type": "AdmCredential"}, "baidu_credential": {"key": "properties.baiduCredential", "type": "BaiduCredential"}, } def __init__( self, *, location: Optional[str] = None, tags: Optional[Dict[str, str]] = None, sku: Optional["_models.Sku"] = None, name_properties_name: Optional[str] = None, registration_ttl: Optional[str] = None, authorization_rules: Optional[List["_models.SharedAccessAuthorizationRuleProperties"]] = None, apns_credential: Optional["_models.ApnsCredential"] = None, wns_credential: Optional["_models.WnsCredential"] = None, gcm_credential: Optional["_models.GcmCredential"] = None, mpns_credential: Optional["_models.MpnsCredential"] = None, adm_credential: Optional["_models.AdmCredential"] = None, baidu_credential: Optional["_models.BaiduCredential"] = None, **kwargs ): """ :keyword location: Resource location. :paramtype location: str :keyword tags: Resource tags. :paramtype tags: dict[str, str] :keyword sku: The sku of the created namespace. :paramtype sku: ~azure.mgmt.notificationhubs.models.Sku :keyword name_properties_name: The NotificationHub name. :paramtype name_properties_name: str :keyword registration_ttl: The RegistrationTtl of the created NotificationHub. :paramtype registration_ttl: str :keyword authorization_rules: The AuthorizationRules of the created NotificationHub. :paramtype authorization_rules: list[~azure.mgmt.notificationhubs.models.SharedAccessAuthorizationRuleProperties] :keyword apns_credential: The ApnsCredential of the created NotificationHub. :paramtype apns_credential: ~azure.mgmt.notificationhubs.models.ApnsCredential :keyword wns_credential: The WnsCredential of the created NotificationHub. :paramtype wns_credential: ~azure.mgmt.notificationhubs.models.WnsCredential :keyword gcm_credential: The GcmCredential of the created NotificationHub. :paramtype gcm_credential: ~azure.mgmt.notificationhubs.models.GcmCredential :keyword mpns_credential: The MpnsCredential of the created NotificationHub. :paramtype mpns_credential: ~azure.mgmt.notificationhubs.models.MpnsCredential :keyword adm_credential: The AdmCredential of the created NotificationHub. :paramtype adm_credential: ~azure.mgmt.notificationhubs.models.AdmCredential :keyword baidu_credential: The BaiduCredential of the created NotificationHub. :paramtype baidu_credential: ~azure.mgmt.notificationhubs.models.BaiduCredential """ super().__init__(location=location, tags=tags, sku=sku, **kwargs) self.name_properties_name = name_properties_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
[docs]class NotificationHubListResult(_serialization.Model): """The response of the List NotificationHub operation. :ivar value: Result of the List NotificationHub operation. :vartype value: list[~azure.mgmt.notificationhubs.models.NotificationHubResource] :ivar next_link: Link to the next set of results. Not empty if Value contains incomplete list of NotificationHub. :vartype next_link: str """ _attribute_map = { "value": {"key": "value", "type": "[NotificationHubResource]"}, "next_link": {"key": "nextLink", "type": "str"}, } def __init__( self, *, value: Optional[List["_models.NotificationHubResource"]] = None, next_link: Optional[str] = None, **kwargs ): """ :keyword value: Result of the List NotificationHub operation. :paramtype value: list[~azure.mgmt.notificationhubs.models.NotificationHubResource] :keyword next_link: Link to the next set of results. Not empty if Value contains incomplete list of NotificationHub. :paramtype next_link: str """ super().__init__(**kwargs) self.value = value self.next_link = next_link
[docs]class NotificationHubPatchParameters(Resource): # pylint: disable=too-many-instance-attributes """Parameters supplied to the patch NotificationHub operation. Variables are only populated by the server, and will be ignored when sending a request. :ivar id: Resource Id. :vartype id: str :ivar name: Resource name. :vartype name: str :ivar type: Resource type. :vartype type: str :ivar location: Resource location. :vartype location: str :ivar tags: Resource tags. :vartype tags: dict[str, str] :ivar sku: The sku of the created namespace. :vartype sku: ~azure.mgmt.notificationhubs.models.Sku :ivar name_properties_name: The NotificationHub name. :vartype name_properties_name: str :ivar registration_ttl: The RegistrationTtl of the created NotificationHub. :vartype registration_ttl: str :ivar authorization_rules: The AuthorizationRules of the created NotificationHub. :vartype authorization_rules: list[~azure.mgmt.notificationhubs.models.SharedAccessAuthorizationRuleProperties] :ivar apns_credential: The ApnsCredential of the created NotificationHub. :vartype apns_credential: ~azure.mgmt.notificationhubs.models.ApnsCredential :ivar wns_credential: The WnsCredential of the created NotificationHub. :vartype wns_credential: ~azure.mgmt.notificationhubs.models.WnsCredential :ivar gcm_credential: The GcmCredential of the created NotificationHub. :vartype gcm_credential: ~azure.mgmt.notificationhubs.models.GcmCredential :ivar mpns_credential: The MpnsCredential of the created NotificationHub. :vartype mpns_credential: ~azure.mgmt.notificationhubs.models.MpnsCredential :ivar adm_credential: The AdmCredential of the created NotificationHub. :vartype adm_credential: ~azure.mgmt.notificationhubs.models.AdmCredential :ivar baidu_credential: The BaiduCredential of the created NotificationHub. :vartype baidu_credential: ~azure.mgmt.notificationhubs.models.BaiduCredential """ _validation = { "id": {"readonly": True}, "name": {"readonly": True}, "type": {"readonly": True}, } _attribute_map = { "id": {"key": "id", "type": "str"}, "name": {"key": "name", "type": "str"}, "type": {"key": "type", "type": "str"}, "location": {"key": "location", "type": "str"}, "tags": {"key": "tags", "type": "{str}"}, "sku": {"key": "sku", "type": "Sku"}, "name_properties_name": {"key": "properties.name", "type": "str"}, "registration_ttl": {"key": "properties.registrationTtl", "type": "str"}, "authorization_rules": { "key": "properties.authorizationRules", "type": "[SharedAccessAuthorizationRuleProperties]", }, "apns_credential": {"key": "properties.apnsCredential", "type": "ApnsCredential"}, "wns_credential": {"key": "properties.wnsCredential", "type": "WnsCredential"}, "gcm_credential": {"key": "properties.gcmCredential", "type": "GcmCredential"}, "mpns_credential": {"key": "properties.mpnsCredential", "type": "MpnsCredential"}, "adm_credential": {"key": "properties.admCredential", "type": "AdmCredential"}, "baidu_credential": {"key": "properties.baiduCredential", "type": "BaiduCredential"}, } def __init__( self, *, location: Optional[str] = None, tags: Optional[Dict[str, str]] = None, sku: Optional["_models.Sku"] = None, name_properties_name: Optional[str] = None, registration_ttl: Optional[str] = None, authorization_rules: Optional[List["_models.SharedAccessAuthorizationRuleProperties"]] = None, apns_credential: Optional["_models.ApnsCredential"] = None, wns_credential: Optional["_models.WnsCredential"] = None, gcm_credential: Optional["_models.GcmCredential"] = None, mpns_credential: Optional["_models.MpnsCredential"] = None, adm_credential: Optional["_models.AdmCredential"] = None, baidu_credential: Optional["_models.BaiduCredential"] = None, **kwargs ): """ :keyword location: Resource location. :paramtype location: str :keyword tags: Resource tags. :paramtype tags: dict[str, str] :keyword sku: The sku of the created namespace. :paramtype sku: ~azure.mgmt.notificationhubs.models.Sku :keyword name_properties_name: The NotificationHub name. :paramtype name_properties_name: str :keyword registration_ttl: The RegistrationTtl of the created NotificationHub. :paramtype registration_ttl: str :keyword authorization_rules: The AuthorizationRules of the created NotificationHub. :paramtype authorization_rules: list[~azure.mgmt.notificationhubs.models.SharedAccessAuthorizationRuleProperties] :keyword apns_credential: The ApnsCredential of the created NotificationHub. :paramtype apns_credential: ~azure.mgmt.notificationhubs.models.ApnsCredential :keyword wns_credential: The WnsCredential of the created NotificationHub. :paramtype wns_credential: ~azure.mgmt.notificationhubs.models.WnsCredential :keyword gcm_credential: The GcmCredential of the created NotificationHub. :paramtype gcm_credential: ~azure.mgmt.notificationhubs.models.GcmCredential :keyword mpns_credential: The MpnsCredential of the created NotificationHub. :paramtype mpns_credential: ~azure.mgmt.notificationhubs.models.MpnsCredential :keyword adm_credential: The AdmCredential of the created NotificationHub. :paramtype adm_credential: ~azure.mgmt.notificationhubs.models.AdmCredential :keyword baidu_credential: The BaiduCredential of the created NotificationHub. :paramtype baidu_credential: ~azure.mgmt.notificationhubs.models.BaiduCredential """ super().__init__(location=location, tags=tags, sku=sku, **kwargs) self.name_properties_name = name_properties_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
[docs]class NotificationHubResource(Resource): # pylint: disable=too-many-instance-attributes """Description of a NotificationHub Resource. Variables are only populated by the server, and will be ignored when sending a request. :ivar id: Resource Id. :vartype id: str :ivar name: Resource name. :vartype name: str :ivar type: Resource type. :vartype type: str :ivar location: Resource location. :vartype location: str :ivar tags: Resource tags. :vartype tags: dict[str, str] :ivar sku: The sku of the created namespace. :vartype sku: ~azure.mgmt.notificationhubs.models.Sku :ivar name_properties_name: The NotificationHub name. :vartype name_properties_name: str :ivar registration_ttl: The RegistrationTtl of the created NotificationHub. :vartype registration_ttl: str :ivar authorization_rules: The AuthorizationRules of the created NotificationHub. :vartype authorization_rules: list[~azure.mgmt.notificationhubs.models.SharedAccessAuthorizationRuleProperties] :ivar apns_credential: The ApnsCredential of the created NotificationHub. :vartype apns_credential: ~azure.mgmt.notificationhubs.models.ApnsCredential :ivar wns_credential: The WnsCredential of the created NotificationHub. :vartype wns_credential: ~azure.mgmt.notificationhubs.models.WnsCredential :ivar gcm_credential: The GcmCredential of the created NotificationHub. :vartype gcm_credential: ~azure.mgmt.notificationhubs.models.GcmCredential :ivar mpns_credential: The MpnsCredential of the created NotificationHub. :vartype mpns_credential: ~azure.mgmt.notificationhubs.models.MpnsCredential :ivar adm_credential: The AdmCredential of the created NotificationHub. :vartype adm_credential: ~azure.mgmt.notificationhubs.models.AdmCredential :ivar baidu_credential: The BaiduCredential of the created NotificationHub. :vartype baidu_credential: ~azure.mgmt.notificationhubs.models.BaiduCredential """ _validation = { "id": {"readonly": True}, "name": {"readonly": True}, "type": {"readonly": True}, } _attribute_map = { "id": {"key": "id", "type": "str"}, "name": {"key": "name", "type": "str"}, "type": {"key": "type", "type": "str"}, "location": {"key": "location", "type": "str"}, "tags": {"key": "tags", "type": "{str}"}, "sku": {"key": "sku", "type": "Sku"}, "name_properties_name": {"key": "properties.name", "type": "str"}, "registration_ttl": {"key": "properties.registrationTtl", "type": "str"}, "authorization_rules": { "key": "properties.authorizationRules", "type": "[SharedAccessAuthorizationRuleProperties]", }, "apns_credential": {"key": "properties.apnsCredential", "type": "ApnsCredential"}, "wns_credential": {"key": "properties.wnsCredential", "type": "WnsCredential"}, "gcm_credential": {"key": "properties.gcmCredential", "type": "GcmCredential"}, "mpns_credential": {"key": "properties.mpnsCredential", "type": "MpnsCredential"}, "adm_credential": {"key": "properties.admCredential", "type": "AdmCredential"}, "baidu_credential": {"key": "properties.baiduCredential", "type": "BaiduCredential"}, } def __init__( self, *, location: Optional[str] = None, tags: Optional[Dict[str, str]] = None, sku: Optional["_models.Sku"] = None, name_properties_name: Optional[str] = None, registration_ttl: Optional[str] = None, authorization_rules: Optional[List["_models.SharedAccessAuthorizationRuleProperties"]] = None, apns_credential: Optional["_models.ApnsCredential"] = None, wns_credential: Optional["_models.WnsCredential"] = None, gcm_credential: Optional["_models.GcmCredential"] = None, mpns_credential: Optional["_models.MpnsCredential"] = None, adm_credential: Optional["_models.AdmCredential"] = None, baidu_credential: Optional["_models.BaiduCredential"] = None, **kwargs ): """ :keyword location: Resource location. :paramtype location: str :keyword tags: Resource tags. :paramtype tags: dict[str, str] :keyword sku: The sku of the created namespace. :paramtype sku: ~azure.mgmt.notificationhubs.models.Sku :keyword name_properties_name: The NotificationHub name. :paramtype name_properties_name: str :keyword registration_ttl: The RegistrationTtl of the created NotificationHub. :paramtype registration_ttl: str :keyword authorization_rules: The AuthorizationRules of the created NotificationHub. :paramtype authorization_rules: list[~azure.mgmt.notificationhubs.models.SharedAccessAuthorizationRuleProperties] :keyword apns_credential: The ApnsCredential of the created NotificationHub. :paramtype apns_credential: ~azure.mgmt.notificationhubs.models.ApnsCredential :keyword wns_credential: The WnsCredential of the created NotificationHub. :paramtype wns_credential: ~azure.mgmt.notificationhubs.models.WnsCredential :keyword gcm_credential: The GcmCredential of the created NotificationHub. :paramtype gcm_credential: ~azure.mgmt.notificationhubs.models.GcmCredential :keyword mpns_credential: The MpnsCredential of the created NotificationHub. :paramtype mpns_credential: ~azure.mgmt.notificationhubs.models.MpnsCredential :keyword adm_credential: The AdmCredential of the created NotificationHub. :paramtype adm_credential: ~azure.mgmt.notificationhubs.models.AdmCredential :keyword baidu_credential: The BaiduCredential of the created NotificationHub. :paramtype baidu_credential: ~azure.mgmt.notificationhubs.models.BaiduCredential """ super().__init__(location=location, tags=tags, sku=sku, **kwargs) self.name_properties_name = name_properties_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
[docs]class Operation(_serialization.Model): """A NotificationHubs REST API operation. Variables are only populated by the server, and will be ignored when sending a request. :ivar name: Operation name: {provider}/{resource}/{operation}. :vartype name: str :ivar display: The object that represents the operation. :vartype display: ~azure.mgmt.notificationhubs.models.OperationDisplay """ _validation = { "name": {"readonly": True}, } _attribute_map = { "name": {"key": "name", "type": "str"}, "display": {"key": "display", "type": "OperationDisplay"}, } def __init__(self, *, display: Optional["_models.OperationDisplay"] = None, **kwargs): """ :keyword display: The object that represents the operation. :paramtype display: ~azure.mgmt.notificationhubs.models.OperationDisplay """ super().__init__(**kwargs) self.name = None self.display = display
[docs]class OperationDisplay(_serialization.Model): """The object that represents the operation. Variables are only populated by the server, and will be ignored when sending a request. :ivar provider: Service provider: Microsoft.NotificationHubs. :vartype provider: str :ivar resource: Resource on which the operation is performed: Invoice, etc. :vartype resource: str :ivar operation: Operation type: Read, write, delete, etc. :vartype operation: str """ _validation = { "provider": {"readonly": True}, "resource": {"readonly": True}, "operation": {"readonly": True}, } _attribute_map = { "provider": {"key": "provider", "type": "str"}, "resource": {"key": "resource", "type": "str"}, "operation": {"key": "operation", "type": "str"}, } def __init__(self, **kwargs): """ """ super().__init__(**kwargs) self.provider = None self.resource = None self.operation = None
[docs]class OperationListResult(_serialization.Model): """Result of the request to list NotificationHubs operations. It contains a list of operations and a URL link to get the next set of results. Variables are only populated by the server, and will be ignored when sending a request. :ivar value: List of NotificationHubs operations supported by the Microsoft.NotificationHubs resource provider. :vartype value: list[~azure.mgmt.notificationhubs.models.Operation] :ivar next_link: URL to get the next set of operation list results if there are any. :vartype next_link: str """ _validation = { "value": {"readonly": True}, "next_link": {"readonly": True}, } _attribute_map = { "value": {"key": "value", "type": "[Operation]"}, "next_link": {"key": "nextLink", "type": "str"}, } def __init__(self, **kwargs): """ """ super().__init__(**kwargs) self.value = None self.next_link = None
[docs]class PnsCredentialsResource(Resource): # pylint: disable=too-many-instance-attributes """Description of a NotificationHub PNS Credentials. Variables are only populated by the server, and will be ignored when sending a request. :ivar id: Resource Id. :vartype id: str :ivar name: Resource name. :vartype name: str :ivar type: Resource type. :vartype type: str :ivar location: Resource location. :vartype location: str :ivar tags: Resource tags. :vartype tags: dict[str, str] :ivar sku: The sku of the created namespace. :vartype sku: ~azure.mgmt.notificationhubs.models.Sku :ivar apns_credential: The ApnsCredential of the created NotificationHub. :vartype apns_credential: ~azure.mgmt.notificationhubs.models.ApnsCredential :ivar wns_credential: The WnsCredential of the created NotificationHub. :vartype wns_credential: ~azure.mgmt.notificationhubs.models.WnsCredential :ivar gcm_credential: The GcmCredential of the created NotificationHub. :vartype gcm_credential: ~azure.mgmt.notificationhubs.models.GcmCredential :ivar mpns_credential: The MpnsCredential of the created NotificationHub. :vartype mpns_credential: ~azure.mgmt.notificationhubs.models.MpnsCredential :ivar adm_credential: The AdmCredential of the created NotificationHub. :vartype adm_credential: ~azure.mgmt.notificationhubs.models.AdmCredential :ivar baidu_credential: The BaiduCredential of the created NotificationHub. :vartype baidu_credential: ~azure.mgmt.notificationhubs.models.BaiduCredential """ _validation = { "id": {"readonly": True}, "name": {"readonly": True}, "type": {"readonly": True}, } _attribute_map = { "id": {"key": "id", "type": "str"}, "name": {"key": "name", "type": "str"}, "type": {"key": "type", "type": "str"}, "location": {"key": "location", "type": "str"}, "tags": {"key": "tags", "type": "{str}"}, "sku": {"key": "sku", "type": "Sku"}, "apns_credential": {"key": "properties.apnsCredential", "type": "ApnsCredential"}, "wns_credential": {"key": "properties.wnsCredential", "type": "WnsCredential"}, "gcm_credential": {"key": "properties.gcmCredential", "type": "GcmCredential"}, "mpns_credential": {"key": "properties.mpnsCredential", "type": "MpnsCredential"}, "adm_credential": {"key": "properties.admCredential", "type": "AdmCredential"}, "baidu_credential": {"key": "properties.baiduCredential", "type": "BaiduCredential"}, } def __init__( self, *, location: Optional[str] = None, tags: Optional[Dict[str, str]] = None, sku: Optional["_models.Sku"] = None, apns_credential: Optional["_models.ApnsCredential"] = None, wns_credential: Optional["_models.WnsCredential"] = None, gcm_credential: Optional["_models.GcmCredential"] = None, mpns_credential: Optional["_models.MpnsCredential"] = None, adm_credential: Optional["_models.AdmCredential"] = None, baidu_credential: Optional["_models.BaiduCredential"] = None, **kwargs ): """ :keyword location: Resource location. :paramtype location: str :keyword tags: Resource tags. :paramtype tags: dict[str, str] :keyword sku: The sku of the created namespace. :paramtype sku: ~azure.mgmt.notificationhubs.models.Sku :keyword apns_credential: The ApnsCredential of the created NotificationHub. :paramtype apns_credential: ~azure.mgmt.notificationhubs.models.ApnsCredential :keyword wns_credential: The WnsCredential of the created NotificationHub. :paramtype wns_credential: ~azure.mgmt.notificationhubs.models.WnsCredential :keyword gcm_credential: The GcmCredential of the created NotificationHub. :paramtype gcm_credential: ~azure.mgmt.notificationhubs.models.GcmCredential :keyword mpns_credential: The MpnsCredential of the created NotificationHub. :paramtype mpns_credential: ~azure.mgmt.notificationhubs.models.MpnsCredential :keyword adm_credential: The AdmCredential of the created NotificationHub. :paramtype adm_credential: ~azure.mgmt.notificationhubs.models.AdmCredential :keyword baidu_credential: The BaiduCredential of the created NotificationHub. :paramtype baidu_credential: ~azure.mgmt.notificationhubs.models.BaiduCredential """ super().__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
[docs]class PolicykeyResource(_serialization.Model): """Namespace/NotificationHub Regenerate Keys. :ivar policy_key: Name of the key that has to be regenerated for the Namespace/Notification Hub Authorization Rule. The value can be Primary Key/Secondary Key. :vartype policy_key: str """ _attribute_map = { "policy_key": {"key": "policyKey", "type": "str"}, } def __init__(self, *, policy_key: Optional[str] = None, **kwargs): """ :keyword policy_key: Name of the key that has to be regenerated for the Namespace/Notification Hub Authorization Rule. The value can be Primary Key/Secondary Key. :paramtype policy_key: str """ super().__init__(**kwargs) self.policy_key = policy_key
[docs]class ResourceListKeys(_serialization.Model): """Namespace/NotificationHub Connection String. :ivar primary_connection_string: PrimaryConnectionString of the AuthorizationRule. :vartype primary_connection_string: str :ivar secondary_connection_string: SecondaryConnectionString of the created AuthorizationRule. :vartype secondary_connection_string: str :ivar primary_key: PrimaryKey of the created AuthorizationRule. :vartype primary_key: str :ivar secondary_key: SecondaryKey of the created AuthorizationRule. :vartype secondary_key: str :ivar key_name: KeyName of the created AuthorizationRule. :vartype key_name: str """ _attribute_map = { "primary_connection_string": {"key": "primaryConnectionString", "type": "str"}, "secondary_connection_string": {"key": "secondaryConnectionString", "type": "str"}, "primary_key": {"key": "primaryKey", "type": "str"}, "secondary_key": {"key": "secondaryKey", "type": "str"}, "key_name": {"key": "keyName", "type": "str"}, } def __init__( self, *, primary_connection_string: Optional[str] = None, secondary_connection_string: Optional[str] = None, primary_key: Optional[str] = None, secondary_key: Optional[str] = None, key_name: Optional[str] = None, **kwargs ): """ :keyword primary_connection_string: PrimaryConnectionString of the AuthorizationRule. :paramtype primary_connection_string: str :keyword secondary_connection_string: SecondaryConnectionString of the created AuthorizationRule. :paramtype secondary_connection_string: str :keyword primary_key: PrimaryKey of the created AuthorizationRule. :paramtype primary_key: str :keyword secondary_key: SecondaryKey of the created AuthorizationRule. :paramtype secondary_key: str :keyword key_name: KeyName of the created AuthorizationRule. :paramtype key_name: str """ super().__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
[docs]class SharedAccessAuthorizationRuleCreateOrUpdateParameters(_serialization.Model): """Parameters supplied to the CreateOrUpdate Namespace AuthorizationRules. All required parameters must be populated in order to send to Azure. :ivar properties: Properties of the Namespace AuthorizationRules. Required. :vartype properties: ~azure.mgmt.notificationhubs.models.SharedAccessAuthorizationRuleProperties """ _validation = { "properties": {"required": True}, } _attribute_map = { "properties": {"key": "properties", "type": "SharedAccessAuthorizationRuleProperties"}, } def __init__(self, *, properties: "_models.SharedAccessAuthorizationRuleProperties", **kwargs): """ :keyword properties: Properties of the Namespace AuthorizationRules. Required. :paramtype properties: ~azure.mgmt.notificationhubs.models.SharedAccessAuthorizationRuleProperties """ super().__init__(**kwargs) self.properties = properties
[docs]class SharedAccessAuthorizationRuleListResult(_serialization.Model): """The response of the List Namespace operation. :ivar value: Result of the List AuthorizationRules operation. :vartype value: list[~azure.mgmt.notificationhubs.models.SharedAccessAuthorizationRuleResource] :ivar next_link: Link to the next set of results. Not empty if Value contains incomplete list of AuthorizationRules. :vartype next_link: str """ _attribute_map = { "value": {"key": "value", "type": "[SharedAccessAuthorizationRuleResource]"}, "next_link": {"key": "nextLink", "type": "str"}, } def __init__( self, *, value: Optional[List["_models.SharedAccessAuthorizationRuleResource"]] = None, next_link: Optional[str] = None, **kwargs ): """ :keyword value: Result of the List AuthorizationRules operation. :paramtype value: list[~azure.mgmt.notificationhubs.models.SharedAccessAuthorizationRuleResource] :keyword next_link: Link to the next set of results. Not empty if Value contains incomplete list of AuthorizationRules. :paramtype next_link: str """ super().__init__(**kwargs) self.value = value self.next_link = next_link
[docs]class SharedAccessAuthorizationRuleProperties(_serialization.Model): """SharedAccessAuthorizationRule properties. Variables are only populated by the server, and will be ignored when sending a request. :ivar rights: The rights associated with the rule. :vartype rights: list[str or ~azure.mgmt.notificationhubs.models.AccessRights] :ivar primary_key: A base64-encoded 256-bit primary key for signing and validating the SAS token. :vartype primary_key: str :ivar secondary_key: A base64-encoded 256-bit primary key for signing and validating the SAS token. :vartype secondary_key: str :ivar key_name: A string that describes the authorization rule. :vartype key_name: str :ivar claim_type: A string that describes the claim type. :vartype claim_type: str :ivar claim_value: A string that describes the claim value. :vartype claim_value: str :ivar modified_time: The last modified time for this rule. :vartype modified_time: str :ivar created_time: The created time for this rule. :vartype created_time: str :ivar revision: The revision number for the rule. :vartype revision: int """ _validation = { "primary_key": {"readonly": True}, "secondary_key": {"readonly": True}, "key_name": {"readonly": True}, "claim_type": {"readonly": True}, "claim_value": {"readonly": True}, "modified_time": {"readonly": True}, "created_time": {"readonly": True}, "revision": {"readonly": True}, } _attribute_map = { "rights": {"key": "rights", "type": "[str]"}, "primary_key": {"key": "primaryKey", "type": "str"}, "secondary_key": {"key": "secondaryKey", "type": "str"}, "key_name": {"key": "keyName", "type": "str"}, "claim_type": {"key": "claimType", "type": "str"}, "claim_value": {"key": "claimValue", "type": "str"}, "modified_time": {"key": "modifiedTime", "type": "str"}, "created_time": {"key": "createdTime", "type": "str"}, "revision": {"key": "revision", "type": "int"}, } def __init__(self, *, rights: Optional[List[Union[str, "_models.AccessRights"]]] = None, **kwargs): """ :keyword rights: The rights associated with the rule. :paramtype rights: list[str or ~azure.mgmt.notificationhubs.models.AccessRights] """ super().__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
[docs]class SharedAccessAuthorizationRuleResource(Resource): # pylint: disable=too-many-instance-attributes """Description of a Namespace AuthorizationRules. Variables are only populated by the server, and will be ignored when sending a request. :ivar id: Resource Id. :vartype id: str :ivar name: Resource name. :vartype name: str :ivar type: Resource type. :vartype type: str :ivar location: Resource location. :vartype location: str :ivar tags: Resource tags. :vartype tags: dict[str, str] :ivar sku: The sku of the created namespace. :vartype sku: ~azure.mgmt.notificationhubs.models.Sku :ivar rights: The rights associated with the rule. :vartype rights: list[str or ~azure.mgmt.notificationhubs.models.AccessRights] :ivar primary_key: A base64-encoded 256-bit primary key for signing and validating the SAS token. :vartype primary_key: str :ivar secondary_key: A base64-encoded 256-bit primary key for signing and validating the SAS token. :vartype secondary_key: str :ivar key_name: A string that describes the authorization rule. :vartype key_name: str :ivar claim_type: A string that describes the claim type. :vartype claim_type: str :ivar claim_value: A string that describes the claim value. :vartype claim_value: str :ivar modified_time: The last modified time for this rule. :vartype modified_time: str :ivar created_time: The created time for this rule. :vartype created_time: str :ivar revision: The revision number for the rule. :vartype revision: int """ _validation = { "id": {"readonly": True}, "name": {"readonly": True}, "type": {"readonly": True}, "primary_key": {"readonly": True}, "secondary_key": {"readonly": True}, "key_name": {"readonly": True}, "claim_type": {"readonly": True}, "claim_value": {"readonly": True}, "modified_time": {"readonly": True}, "created_time": {"readonly": True}, "revision": {"readonly": True}, } _attribute_map = { "id": {"key": "id", "type": "str"}, "name": {"key": "name", "type": "str"}, "type": {"key": "type", "type": "str"}, "location": {"key": "location", "type": "str"}, "tags": {"key": "tags", "type": "{str}"}, "sku": {"key": "sku", "type": "Sku"}, "rights": {"key": "properties.rights", "type": "[str]"}, "primary_key": {"key": "properties.primaryKey", "type": "str"}, "secondary_key": {"key": "properties.secondaryKey", "type": "str"}, "key_name": {"key": "properties.keyName", "type": "str"}, "claim_type": {"key": "properties.claimType", "type": "str"}, "claim_value": {"key": "properties.claimValue", "type": "str"}, "modified_time": {"key": "properties.modifiedTime", "type": "str"}, "created_time": {"key": "properties.createdTime", "type": "str"}, "revision": {"key": "properties.revision", "type": "int"}, } def __init__( self, *, location: Optional[str] = None, tags: Optional[Dict[str, str]] = None, sku: Optional["_models.Sku"] = None, rights: Optional[List[Union[str, "_models.AccessRights"]]] = None, **kwargs ): """ :keyword location: Resource location. :paramtype location: str :keyword tags: Resource tags. :paramtype tags: dict[str, str] :keyword sku: The sku of the created namespace. :paramtype sku: ~azure.mgmt.notificationhubs.models.Sku :keyword rights: The rights associated with the rule. :paramtype rights: list[str or ~azure.mgmt.notificationhubs.models.AccessRights] """ super().__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
[docs]class Sku(_serialization.Model): """The Sku description for a namespace. All required parameters must be populated in order to send to Azure. :ivar name: Name of the notification hub sku. Required. Known values are: "Free", "Basic", and "Standard". :vartype name: str or ~azure.mgmt.notificationhubs.models.SkuName :ivar tier: The tier of particular sku. :vartype tier: str :ivar size: The Sku size. :vartype size: str :ivar family: The Sku Family. :vartype family: str :ivar capacity: The capacity of the resource. :vartype capacity: int """ _validation = { "name": {"required": True}, } _attribute_map = { "name": {"key": "name", "type": "str"}, "tier": {"key": "tier", "type": "str"}, "size": {"key": "size", "type": "str"}, "family": {"key": "family", "type": "str"}, "capacity": {"key": "capacity", "type": "int"}, } def __init__( self, *, name: Union[str, "_models.SkuName"], tier: Optional[str] = None, size: Optional[str] = None, family: Optional[str] = None, capacity: Optional[int] = None, **kwargs ): """ :keyword name: Name of the notification hub sku. Required. Known values are: "Free", "Basic", and "Standard". :paramtype name: str or ~azure.mgmt.notificationhubs.models.SkuName :keyword tier: The tier of particular sku. :paramtype tier: str :keyword size: The Sku size. :paramtype size: str :keyword family: The Sku Family. :paramtype family: str :keyword capacity: The capacity of the resource. :paramtype capacity: int """ super().__init__(**kwargs) self.name = name self.tier = tier self.size = size self.family = family self.capacity = capacity
[docs]class SubResource(_serialization.Model): """SubResource. :ivar id: Resource Id. :vartype id: str """ _attribute_map = { "id": {"key": "id", "type": "str"}, } def __init__(self, *, id: Optional[str] = None, **kwargs): # pylint: disable=redefined-builtin """ :keyword id: Resource Id. :paramtype id: str """ super().__init__(**kwargs) self.id = id
[docs]class WnsCredential(_serialization.Model): """Description of a NotificationHub WnsCredential. :ivar package_sid: The package ID for this credential. :vartype package_sid: str :ivar secret_key: The secret key. :vartype secret_key: str :ivar windows_live_endpoint: The Windows Live endpoint. :vartype windows_live_endpoint: str """ _attribute_map = { "package_sid": {"key": "properties.packageSid", "type": "str"}, "secret_key": {"key": "properties.secretKey", "type": "str"}, "windows_live_endpoint": {"key": "properties.windowsLiveEndpoint", "type": "str"}, } def __init__( self, *, package_sid: Optional[str] = None, secret_key: Optional[str] = None, windows_live_endpoint: Optional[str] = None, **kwargs ): """ :keyword package_sid: The package ID for this credential. :paramtype package_sid: str :keyword secret_key: The secret key. :paramtype secret_key: str :keyword windows_live_endpoint: The Windows Live endpoint. :paramtype windows_live_endpoint: str """ super().__init__(**kwargs) self.package_sid = package_sid self.secret_key = secret_key self.windows_live_endpoint = windows_live_endpoint