From 30d2b62096b06288d75eefe3e525626fe092a14e Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Wed, 5 Jan 2022 11:02:34 +0000 Subject: [PATCH] CodeGen from PR 16997 in Azure/azure-rest-api-specs Adding missing advanced filters (#16997) --- sdk/eventgrid/azure-mgmt-eventgrid/_meta.json | 2 +- .../azure/mgmt/eventgrid/_configuration.py | 13 +- .../_event_grid_management_client.py | 24 +- .../azure/mgmt/eventgrid/_version.py | 2 +- .../azure/mgmt/eventgrid/models/__init__.py | 249 +- .../azure/mgmt/eventgrid/models/_models.py | 3884 ----------------- .../operations/_domain_topics_operations.py | 136 +- .../operations/_domains_operations.py | 233 +- .../_event_subscriptions_operations.py | 462 +- .../_extension_topics_operations.py | 26 +- .../mgmt/eventgrid/operations/_operations.py | 22 +- ...private_endpoint_connections_operations.py | 166 +- .../_private_link_resources_operations.py | 74 +- ...em_topic_event_subscriptions_operations.py | 238 +- .../operations/_system_topics_operations.py | 186 +- .../operations/_topic_types_operations.py | 50 +- .../operations/_topics_operations.py | 272 +- 17 files changed, 964 insertions(+), 5075 deletions(-) delete mode 100644 sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/_models.py diff --git a/sdk/eventgrid/azure-mgmt-eventgrid/_meta.json b/sdk/eventgrid/azure-mgmt-eventgrid/_meta.json index 33c73c768de8..58ea8315ab8d 100644 --- a/sdk/eventgrid/azure-mgmt-eventgrid/_meta.json +++ b/sdk/eventgrid/azure-mgmt-eventgrid/_meta.json @@ -6,6 +6,6 @@ ], "commit": "f3477bd0a7b6101f9c0af243cc0106c7a8e24c71", "repository_url": "https://github.com/Azure/azure-rest-api-specs", - "autorest_command": "autorest specification/eventgrid/resource-manager/readme.md --multiapi --python --python-mode=update --python-sdks-folder=/home/vsts/work/1/s/azure-sdk-for-python/sdk --track2 --use=@autorest/python@5.12.0 --use=@autorest/modelerfour@4.19.3 --version=3.7.2", + "autorest_command": "autorest specification/eventgrid/resource-manager/readme.md --multiapi --python --python-mode=update --python-sdks-folder=/home/vsts/work/1/s/azure-sdk-for-python/sdk --python3-only --track2 --use=@autorest/python@5.12.0 --use=@autorest/modelerfour@4.19.3 --version=3.7.2", "readme": "specification/eventgrid/resource-manager/readme.md" } \ No newline at end of file diff --git a/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/_configuration.py b/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/_configuration.py index a3549d2b8b08..4c32835f8305 100644 --- a/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/_configuration.py +++ b/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/_configuration.py @@ -6,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import TYPE_CHECKING +from typing import Any, TYPE_CHECKING from azure.core.configuration import Configuration from azure.core.pipeline import policies @@ -16,8 +16,6 @@ if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports - from typing import Any - from azure.core.credentials import TokenCredential @@ -35,11 +33,10 @@ class EventGridManagementClientConfiguration(Configuration): def __init__( self, - credential, # type: "TokenCredential" - subscription_id, # type: str - **kwargs # type: Any - ): - # type: (...) -> None + credential: "TokenCredential", + subscription_id: str, + **kwargs: Any + ) -> None: super(EventGridManagementClientConfiguration, self).__init__(**kwargs) if credential is None: raise ValueError("Parameter 'credential' must not be None.") diff --git a/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/_event_grid_management_client.py b/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/_event_grid_management_client.py index a716cbef1493..8c47149c5f6a 100644 --- a/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/_event_grid_management_client.py +++ b/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/_event_grid_management_client.py @@ -7,8 +7,9 @@ # -------------------------------------------------------------------------- from copy import deepcopy -from typing import TYPE_CHECKING +from typing import Any, Optional, TYPE_CHECKING +from azure.core.rest import HttpRequest, HttpResponse from azure.mgmt.core import ARMPipelineClient from msrest import Deserializer, Serializer @@ -18,12 +19,9 @@ if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports - from typing import Any, Optional - from azure.core.credentials import TokenCredential - from azure.core.rest import HttpRequest, HttpResponse -class EventGridManagementClient(object): +class EventGridManagementClient: """Azure EventGrid Management Client. :ivar domains: DomainsOperations operations @@ -63,12 +61,11 @@ class EventGridManagementClient(object): def __init__( self, - credential, # type: "TokenCredential" - subscription_id, # type: str - base_url="https://management.azure.com", # type: str - **kwargs # type: Any - ): - # type: (...) -> None + credential: "TokenCredential", + subscription_id: str, + base_url: str = "https://management.azure.com", + **kwargs: Any + ) -> None: self._config = EventGridManagementClientConfiguration(credential=credential, subscription_id=subscription_id, **kwargs) self._client = ARMPipelineClient(base_url=base_url, config=self._config, **kwargs) @@ -92,9 +89,8 @@ def __init__( def _send_request( self, request, # type: HttpRequest - **kwargs # type: Any - ): - # type: (...) -> HttpResponse + **kwargs: Any + ) -> HttpResponse: """Runs the network request through the client's chained policies. >>> from azure.core.rest import HttpRequest diff --git a/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/_version.py b/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/_version.py index c1257f7f4e11..f30401ec2040 100644 --- a/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/_version.py +++ b/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "10.1.0" +VERSION = "2.2.0" diff --git a/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/__init__.py b/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/__init__.py index d0098742df38..c8218a2d660b 100644 --- a/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/__init__.py +++ b/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/__init__.py @@ -6,172 +6,89 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -try: - from ._models_py3 import AdvancedFilter - from ._models_py3 import AzureFunctionEventSubscriptionDestination - from ._models_py3 import BoolEqualsAdvancedFilter - from ._models_py3 import ConnectionState - from ._models_py3 import DeadLetterDestination - from ._models_py3 import DeadLetterWithResourceIdentity - from ._models_py3 import DeliveryAttributeListResult - from ._models_py3 import DeliveryAttributeMapping - from ._models_py3 import DeliveryWithResourceIdentity - from ._models_py3 import Domain - from ._models_py3 import DomainRegenerateKeyRequest - from ._models_py3 import DomainSharedAccessKeys - from ._models_py3 import DomainTopic - from ._models_py3 import DomainTopicsListResult - from ._models_py3 import DomainUpdateParameters - from ._models_py3 import DomainsListResult - from ._models_py3 import DynamicDeliveryAttributeMapping - from ._models_py3 import EventHubEventSubscriptionDestination - from ._models_py3 import EventSubscription - from ._models_py3 import EventSubscriptionDestination - from ._models_py3 import EventSubscriptionFilter - from ._models_py3 import EventSubscriptionFullUrl - from ._models_py3 import EventSubscriptionIdentity - from ._models_py3 import EventSubscriptionUpdateParameters - from ._models_py3 import EventSubscriptionsListResult - from ._models_py3 import EventType - from ._models_py3 import EventTypesListResult - from ._models_py3 import ExtensionTopic - from ._models_py3 import HybridConnectionEventSubscriptionDestination - from ._models_py3 import IdentityInfo - from ._models_py3 import InboundIpRule - from ._models_py3 import InputSchemaMapping - from ._models_py3 import IsNotNullAdvancedFilter - from ._models_py3 import IsNullOrUndefinedAdvancedFilter - from ._models_py3 import JsonField - from ._models_py3 import JsonFieldWithDefault - from ._models_py3 import JsonInputSchemaMapping - from ._models_py3 import NumberGreaterThanAdvancedFilter - from ._models_py3 import NumberGreaterThanOrEqualsAdvancedFilter - from ._models_py3 import NumberInAdvancedFilter - from ._models_py3 import NumberInRangeAdvancedFilter - from ._models_py3 import NumberLessThanAdvancedFilter - from ._models_py3 import NumberLessThanOrEqualsAdvancedFilter - from ._models_py3 import NumberNotInAdvancedFilter - from ._models_py3 import NumberNotInRangeAdvancedFilter - from ._models_py3 import Operation - from ._models_py3 import OperationInfo - from ._models_py3 import OperationsListResult - from ._models_py3 import PrivateEndpoint - from ._models_py3 import PrivateEndpointConnection - from ._models_py3 import PrivateEndpointConnectionListResult - from ._models_py3 import PrivateLinkResource - from ._models_py3 import PrivateLinkResourcesListResult - from ._models_py3 import Resource - from ._models_py3 import RetryPolicy - from ._models_py3 import ServiceBusQueueEventSubscriptionDestination - from ._models_py3 import ServiceBusTopicEventSubscriptionDestination - from ._models_py3 import StaticDeliveryAttributeMapping - from ._models_py3 import StorageBlobDeadLetterDestination - from ._models_py3 import StorageQueueEventSubscriptionDestination - from ._models_py3 import StringBeginsWithAdvancedFilter - from ._models_py3 import StringContainsAdvancedFilter - from ._models_py3 import StringEndsWithAdvancedFilter - from ._models_py3 import StringInAdvancedFilter - from ._models_py3 import StringNotBeginsWithAdvancedFilter - from ._models_py3 import StringNotContainsAdvancedFilter - from ._models_py3 import StringNotEndsWithAdvancedFilter - from ._models_py3 import StringNotInAdvancedFilter - from ._models_py3 import SystemData - from ._models_py3 import SystemTopic - from ._models_py3 import SystemTopicUpdateParameters - from ._models_py3 import SystemTopicsListResult - from ._models_py3 import Topic - from ._models_py3 import TopicRegenerateKeyRequest - from ._models_py3 import TopicSharedAccessKeys - from ._models_py3 import TopicTypeInfo - from ._models_py3 import TopicTypesListResult - from ._models_py3 import TopicUpdateParameters - from ._models_py3 import TopicsListResult - from ._models_py3 import TrackedResource - from ._models_py3 import UserIdentityProperties - from ._models_py3 import WebHookEventSubscriptionDestination -except (SyntaxError, ImportError): - from ._models import AdvancedFilter # type: ignore - from ._models import AzureFunctionEventSubscriptionDestination # type: ignore - from ._models import BoolEqualsAdvancedFilter # type: ignore - from ._models import ConnectionState # type: ignore - from ._models import DeadLetterDestination # type: ignore - from ._models import DeadLetterWithResourceIdentity # type: ignore - from ._models import DeliveryAttributeListResult # type: ignore - from ._models import DeliveryAttributeMapping # type: ignore - from ._models import DeliveryWithResourceIdentity # type: ignore - from ._models import Domain # type: ignore - from ._models import DomainRegenerateKeyRequest # type: ignore - from ._models import DomainSharedAccessKeys # type: ignore - from ._models import DomainTopic # type: ignore - from ._models import DomainTopicsListResult # type: ignore - from ._models import DomainUpdateParameters # type: ignore - from ._models import DomainsListResult # type: ignore - from ._models import DynamicDeliveryAttributeMapping # type: ignore - from ._models import EventHubEventSubscriptionDestination # type: ignore - from ._models import EventSubscription # type: ignore - from ._models import EventSubscriptionDestination # type: ignore - from ._models import EventSubscriptionFilter # type: ignore - from ._models import EventSubscriptionFullUrl # type: ignore - from ._models import EventSubscriptionIdentity # type: ignore - from ._models import EventSubscriptionUpdateParameters # type: ignore - from ._models import EventSubscriptionsListResult # type: ignore - from ._models import EventType # type: ignore - from ._models import EventTypesListResult # type: ignore - from ._models import ExtensionTopic # type: ignore - from ._models import HybridConnectionEventSubscriptionDestination # type: ignore - from ._models import IdentityInfo # type: ignore - from ._models import InboundIpRule # type: ignore - from ._models import InputSchemaMapping # type: ignore - from ._models import IsNotNullAdvancedFilter # type: ignore - from ._models import IsNullOrUndefinedAdvancedFilter # type: ignore - from ._models import JsonField # type: ignore - from ._models import JsonFieldWithDefault # type: ignore - from ._models import JsonInputSchemaMapping # type: ignore - from ._models import NumberGreaterThanAdvancedFilter # type: ignore - from ._models import NumberGreaterThanOrEqualsAdvancedFilter # type: ignore - from ._models import NumberInAdvancedFilter # type: ignore - from ._models import NumberInRangeAdvancedFilter # type: ignore - from ._models import NumberLessThanAdvancedFilter # type: ignore - from ._models import NumberLessThanOrEqualsAdvancedFilter # type: ignore - from ._models import NumberNotInAdvancedFilter # type: ignore - from ._models import NumberNotInRangeAdvancedFilter # type: ignore - from ._models import Operation # type: ignore - from ._models import OperationInfo # type: ignore - from ._models import OperationsListResult # type: ignore - from ._models import PrivateEndpoint # type: ignore - from ._models import PrivateEndpointConnection # type: ignore - from ._models import PrivateEndpointConnectionListResult # type: ignore - from ._models import PrivateLinkResource # type: ignore - from ._models import PrivateLinkResourcesListResult # type: ignore - from ._models import Resource # type: ignore - from ._models import RetryPolicy # type: ignore - from ._models import ServiceBusQueueEventSubscriptionDestination # type: ignore - from ._models import ServiceBusTopicEventSubscriptionDestination # type: ignore - from ._models import StaticDeliveryAttributeMapping # type: ignore - from ._models import StorageBlobDeadLetterDestination # type: ignore - from ._models import StorageQueueEventSubscriptionDestination # type: ignore - from ._models import StringBeginsWithAdvancedFilter # type: ignore - from ._models import StringContainsAdvancedFilter # type: ignore - from ._models import StringEndsWithAdvancedFilter # type: ignore - from ._models import StringInAdvancedFilter # type: ignore - from ._models import StringNotBeginsWithAdvancedFilter # type: ignore - from ._models import StringNotContainsAdvancedFilter # type: ignore - from ._models import StringNotEndsWithAdvancedFilter # type: ignore - from ._models import StringNotInAdvancedFilter # type: ignore - from ._models import SystemData # type: ignore - from ._models import SystemTopic # type: ignore - from ._models import SystemTopicUpdateParameters # type: ignore - from ._models import SystemTopicsListResult # type: ignore - from ._models import Topic # type: ignore - from ._models import TopicRegenerateKeyRequest # type: ignore - from ._models import TopicSharedAccessKeys # type: ignore - from ._models import TopicTypeInfo # type: ignore - from ._models import TopicTypesListResult # type: ignore - from ._models import TopicUpdateParameters # type: ignore - from ._models import TopicsListResult # type: ignore - from ._models import TrackedResource # type: ignore - from ._models import UserIdentityProperties # type: ignore - from ._models import WebHookEventSubscriptionDestination # type: ignore +from ._models_py3 import AdvancedFilter +from ._models_py3 import AzureFunctionEventSubscriptionDestination +from ._models_py3 import BoolEqualsAdvancedFilter +from ._models_py3 import ConnectionState +from ._models_py3 import DeadLetterDestination +from ._models_py3 import DeadLetterWithResourceIdentity +from ._models_py3 import DeliveryAttributeListResult +from ._models_py3 import DeliveryAttributeMapping +from ._models_py3 import DeliveryWithResourceIdentity +from ._models_py3 import Domain +from ._models_py3 import DomainRegenerateKeyRequest +from ._models_py3 import DomainSharedAccessKeys +from ._models_py3 import DomainTopic +from ._models_py3 import DomainTopicsListResult +from ._models_py3 import DomainUpdateParameters +from ._models_py3 import DomainsListResult +from ._models_py3 import DynamicDeliveryAttributeMapping +from ._models_py3 import EventHubEventSubscriptionDestination +from ._models_py3 import EventSubscription +from ._models_py3 import EventSubscriptionDestination +from ._models_py3 import EventSubscriptionFilter +from ._models_py3 import EventSubscriptionFullUrl +from ._models_py3 import EventSubscriptionIdentity +from ._models_py3 import EventSubscriptionUpdateParameters +from ._models_py3 import EventSubscriptionsListResult +from ._models_py3 import EventType +from ._models_py3 import EventTypesListResult +from ._models_py3 import ExtensionTopic +from ._models_py3 import HybridConnectionEventSubscriptionDestination +from ._models_py3 import IdentityInfo +from ._models_py3 import InboundIpRule +from ._models_py3 import InputSchemaMapping +from ._models_py3 import IsNotNullAdvancedFilter +from ._models_py3 import IsNullOrUndefinedAdvancedFilter +from ._models_py3 import JsonField +from ._models_py3 import JsonFieldWithDefault +from ._models_py3 import JsonInputSchemaMapping +from ._models_py3 import NumberGreaterThanAdvancedFilter +from ._models_py3 import NumberGreaterThanOrEqualsAdvancedFilter +from ._models_py3 import NumberInAdvancedFilter +from ._models_py3 import NumberInRangeAdvancedFilter +from ._models_py3 import NumberLessThanAdvancedFilter +from ._models_py3 import NumberLessThanOrEqualsAdvancedFilter +from ._models_py3 import NumberNotInAdvancedFilter +from ._models_py3 import NumberNotInRangeAdvancedFilter +from ._models_py3 import Operation +from ._models_py3 import OperationInfo +from ._models_py3 import OperationsListResult +from ._models_py3 import PrivateEndpoint +from ._models_py3 import PrivateEndpointConnection +from ._models_py3 import PrivateEndpointConnectionListResult +from ._models_py3 import PrivateLinkResource +from ._models_py3 import PrivateLinkResourcesListResult +from ._models_py3 import Resource +from ._models_py3 import RetryPolicy +from ._models_py3 import ServiceBusQueueEventSubscriptionDestination +from ._models_py3 import ServiceBusTopicEventSubscriptionDestination +from ._models_py3 import StaticDeliveryAttributeMapping +from ._models_py3 import StorageBlobDeadLetterDestination +from ._models_py3 import StorageQueueEventSubscriptionDestination +from ._models_py3 import StringBeginsWithAdvancedFilter +from ._models_py3 import StringContainsAdvancedFilter +from ._models_py3 import StringEndsWithAdvancedFilter +from ._models_py3 import StringInAdvancedFilter +from ._models_py3 import StringNotBeginsWithAdvancedFilter +from ._models_py3 import StringNotContainsAdvancedFilter +from ._models_py3 import StringNotEndsWithAdvancedFilter +from ._models_py3 import StringNotInAdvancedFilter +from ._models_py3 import SystemData +from ._models_py3 import SystemTopic +from ._models_py3 import SystemTopicUpdateParameters +from ._models_py3 import SystemTopicsListResult +from ._models_py3 import Topic +from ._models_py3 import TopicRegenerateKeyRequest +from ._models_py3 import TopicSharedAccessKeys +from ._models_py3 import TopicTypeInfo +from ._models_py3 import TopicTypesListResult +from ._models_py3 import TopicUpdateParameters +from ._models_py3 import TopicsListResult +from ._models_py3 import TrackedResource +from ._models_py3 import UserIdentityProperties +from ._models_py3 import WebHookEventSubscriptionDestination + from ._event_grid_management_client_enums import ( AdvancedFilterOperatorType, diff --git a/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/_models.py b/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/_models.py deleted file mode 100644 index b354c6547278..000000000000 --- a/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/_models.py +++ /dev/null @@ -1,3884 +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. -# -------------------------------------------------------------------------- - -import msrest.serialization - - -class AdvancedFilter(msrest.serialization.Model): - """This is the base type that represents an advanced filter. To configure an advanced filter, do not directly instantiate an object of this class. Instead, instantiate an object of a derived class such as BoolEqualsAdvancedFilter, NumberInAdvancedFilter, StringEqualsAdvancedFilter etc. depending on the type of the key based on which you want to filter. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: BoolEqualsAdvancedFilter, IsNotNullAdvancedFilter, IsNullOrUndefinedAdvancedFilter, NumberGreaterThanAdvancedFilter, NumberGreaterThanOrEqualsAdvancedFilter, NumberInAdvancedFilter, NumberInRangeAdvancedFilter, NumberLessThanAdvancedFilter, NumberLessThanOrEqualsAdvancedFilter, NumberNotInAdvancedFilter, NumberNotInRangeAdvancedFilter, StringBeginsWithAdvancedFilter, StringContainsAdvancedFilter, StringEndsWithAdvancedFilter, StringInAdvancedFilter, StringNotBeginsWithAdvancedFilter, StringNotContainsAdvancedFilter, StringNotEndsWithAdvancedFilter, StringNotInAdvancedFilter. - - All required parameters must be populated in order to send to Azure. - - :ivar operator_type: Required. The operator type used for filtering, e.g., NumberIn, - StringContains, BoolEquals and others.Constant filled by server. Possible values include: - "NumberIn", "NumberNotIn", "NumberLessThan", "NumberGreaterThan", "NumberLessThanOrEquals", - "NumberGreaterThanOrEquals", "BoolEquals", "StringIn", "StringNotIn", "StringBeginsWith", - "StringEndsWith", "StringContains", "NumberInRange", "NumberNotInRange", "StringNotBeginsWith", - "StringNotEndsWith", "StringNotContains", "IsNullOrUndefined", "IsNotNull". - :vartype operator_type: str or ~azure.mgmt.eventgrid.models.AdvancedFilterOperatorType - :ivar key: The field/property in the event based on which you want to filter. - :vartype key: str - """ - - _validation = { - 'operator_type': {'required': True}, - } - - _attribute_map = { - 'operator_type': {'key': 'operatorType', 'type': 'str'}, - 'key': {'key': 'key', 'type': 'str'}, - } - - _subtype_map = { - 'operator_type': {'BoolEquals': 'BoolEqualsAdvancedFilter', 'IsNotNull': 'IsNotNullAdvancedFilter', 'IsNullOrUndefined': 'IsNullOrUndefinedAdvancedFilter', 'NumberGreaterThan': 'NumberGreaterThanAdvancedFilter', 'NumberGreaterThanOrEquals': 'NumberGreaterThanOrEqualsAdvancedFilter', 'NumberIn': 'NumberInAdvancedFilter', 'NumberInRange': 'NumberInRangeAdvancedFilter', 'NumberLessThan': 'NumberLessThanAdvancedFilter', 'NumberLessThanOrEquals': 'NumberLessThanOrEqualsAdvancedFilter', 'NumberNotIn': 'NumberNotInAdvancedFilter', 'NumberNotInRange': 'NumberNotInRangeAdvancedFilter', 'StringBeginsWith': 'StringBeginsWithAdvancedFilter', 'StringContains': 'StringContainsAdvancedFilter', 'StringEndsWith': 'StringEndsWithAdvancedFilter', 'StringIn': 'StringInAdvancedFilter', 'StringNotBeginsWith': 'StringNotBeginsWithAdvancedFilter', 'StringNotContains': 'StringNotContainsAdvancedFilter', 'StringNotEndsWith': 'StringNotEndsWithAdvancedFilter', 'StringNotIn': 'StringNotInAdvancedFilter'} - } - - def __init__( - self, - **kwargs - ): - """ - :keyword key: The field/property in the event based on which you want to filter. - :paramtype key: str - """ - super(AdvancedFilter, self).__init__(**kwargs) - self.operator_type = None # type: Optional[str] - self.key = kwargs.get('key', None) - - -class EventSubscriptionDestination(msrest.serialization.Model): - """Information about the destination for an event subscription. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: AzureFunctionEventSubscriptionDestination, EventHubEventSubscriptionDestination, HybridConnectionEventSubscriptionDestination, ServiceBusQueueEventSubscriptionDestination, ServiceBusTopicEventSubscriptionDestination, StorageQueueEventSubscriptionDestination, WebHookEventSubscriptionDestination. - - All required parameters must be populated in order to send to Azure. - - :ivar endpoint_type: Required. Type of the endpoint for the event subscription - destination.Constant filled by server. Possible values include: "WebHook", "EventHub", - "StorageQueue", "HybridConnection", "ServiceBusQueue", "ServiceBusTopic", "AzureFunction". - :vartype endpoint_type: str or ~azure.mgmt.eventgrid.models.EndpointType - """ - - _validation = { - 'endpoint_type': {'required': True}, - } - - _attribute_map = { - 'endpoint_type': {'key': 'endpointType', 'type': 'str'}, - } - - _subtype_map = { - 'endpoint_type': {'AzureFunction': 'AzureFunctionEventSubscriptionDestination', 'EventHub': 'EventHubEventSubscriptionDestination', 'HybridConnection': 'HybridConnectionEventSubscriptionDestination', 'ServiceBusQueue': 'ServiceBusQueueEventSubscriptionDestination', 'ServiceBusTopic': 'ServiceBusTopicEventSubscriptionDestination', 'StorageQueue': 'StorageQueueEventSubscriptionDestination', 'WebHook': 'WebHookEventSubscriptionDestination'} - } - - def __init__( - self, - **kwargs - ): - """ - """ - super(EventSubscriptionDestination, self).__init__(**kwargs) - self.endpoint_type = None # type: Optional[str] - - -class AzureFunctionEventSubscriptionDestination(EventSubscriptionDestination): - """Information about the azure function destination for an event subscription. - - All required parameters must be populated in order to send to Azure. - - :ivar endpoint_type: Required. Type of the endpoint for the event subscription - destination.Constant filled by server. Possible values include: "WebHook", "EventHub", - "StorageQueue", "HybridConnection", "ServiceBusQueue", "ServiceBusTopic", "AzureFunction". - :vartype endpoint_type: str or ~azure.mgmt.eventgrid.models.EndpointType - :ivar resource_id: The Azure Resource Id that represents the endpoint of the Azure Function - destination of an event subscription. - :vartype resource_id: str - :ivar max_events_per_batch: Maximum number of events per batch. - :vartype max_events_per_batch: int - :ivar preferred_batch_size_in_kilobytes: Preferred batch size in Kilobytes. - :vartype preferred_batch_size_in_kilobytes: int - :ivar delivery_attribute_mappings: Delivery attribute details. - :vartype delivery_attribute_mappings: - list[~azure.mgmt.eventgrid.models.DeliveryAttributeMapping] - """ - - _validation = { - 'endpoint_type': {'required': True}, - } - - _attribute_map = { - 'endpoint_type': {'key': 'endpointType', 'type': 'str'}, - 'resource_id': {'key': 'properties.resourceId', 'type': 'str'}, - 'max_events_per_batch': {'key': 'properties.maxEventsPerBatch', 'type': 'int'}, - 'preferred_batch_size_in_kilobytes': {'key': 'properties.preferredBatchSizeInKilobytes', 'type': 'int'}, - 'delivery_attribute_mappings': {'key': 'properties.deliveryAttributeMappings', 'type': '[DeliveryAttributeMapping]'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword resource_id: The Azure Resource Id that represents the endpoint of the Azure Function - destination of an event subscription. - :paramtype resource_id: str - :keyword max_events_per_batch: Maximum number of events per batch. - :paramtype max_events_per_batch: int - :keyword preferred_batch_size_in_kilobytes: Preferred batch size in Kilobytes. - :paramtype preferred_batch_size_in_kilobytes: int - :keyword delivery_attribute_mappings: Delivery attribute details. - :paramtype delivery_attribute_mappings: - list[~azure.mgmt.eventgrid.models.DeliveryAttributeMapping] - """ - super(AzureFunctionEventSubscriptionDestination, self).__init__(**kwargs) - self.endpoint_type = 'AzureFunction' # type: str - self.resource_id = kwargs.get('resource_id', None) - self.max_events_per_batch = kwargs.get('max_events_per_batch', 1) - self.preferred_batch_size_in_kilobytes = kwargs.get('preferred_batch_size_in_kilobytes', 64) - self.delivery_attribute_mappings = kwargs.get('delivery_attribute_mappings', None) - - -class BoolEqualsAdvancedFilter(AdvancedFilter): - """BoolEquals Advanced Filter. - - All required parameters must be populated in order to send to Azure. - - :ivar operator_type: Required. The operator type used for filtering, e.g., NumberIn, - StringContains, BoolEquals and others.Constant filled by server. Possible values include: - "NumberIn", "NumberNotIn", "NumberLessThan", "NumberGreaterThan", "NumberLessThanOrEquals", - "NumberGreaterThanOrEquals", "BoolEquals", "StringIn", "StringNotIn", "StringBeginsWith", - "StringEndsWith", "StringContains", "NumberInRange", "NumberNotInRange", "StringNotBeginsWith", - "StringNotEndsWith", "StringNotContains", "IsNullOrUndefined", "IsNotNull". - :vartype operator_type: str or ~azure.mgmt.eventgrid.models.AdvancedFilterOperatorType - :ivar key: The field/property in the event based on which you want to filter. - :vartype key: str - :ivar value: The boolean filter value. - :vartype value: bool - """ - - _validation = { - 'operator_type': {'required': True}, - } - - _attribute_map = { - 'operator_type': {'key': 'operatorType', 'type': 'str'}, - 'key': {'key': 'key', 'type': 'str'}, - 'value': {'key': 'value', 'type': 'bool'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword key: The field/property in the event based on which you want to filter. - :paramtype key: str - :keyword value: The boolean filter value. - :paramtype value: bool - """ - super(BoolEqualsAdvancedFilter, self).__init__(**kwargs) - self.operator_type = 'BoolEquals' # type: str - self.value = kwargs.get('value', None) - - -class ConnectionState(msrest.serialization.Model): - """ConnectionState information. - - :ivar status: Status of the connection. Possible values include: "Pending", "Approved", - "Rejected", "Disconnected". - :vartype status: str or ~azure.mgmt.eventgrid.models.PersistedConnectionStatus - :ivar description: Description of the connection state. - :vartype description: str - :ivar actions_required: Actions required (if any). - :vartype actions_required: str - """ - - _attribute_map = { - 'status': {'key': 'status', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - 'actions_required': {'key': 'actionsRequired', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword status: Status of the connection. Possible values include: "Pending", "Approved", - "Rejected", "Disconnected". - :paramtype status: str or ~azure.mgmt.eventgrid.models.PersistedConnectionStatus - :keyword description: Description of the connection state. - :paramtype description: str - :keyword actions_required: Actions required (if any). - :paramtype actions_required: str - """ - super(ConnectionState, self).__init__(**kwargs) - self.status = kwargs.get('status', None) - self.description = kwargs.get('description', None) - self.actions_required = kwargs.get('actions_required', None) - - -class DeadLetterDestination(msrest.serialization.Model): - """Information about the dead letter destination for an event subscription. To configure a deadletter destination, do not directly instantiate an object of this class. Instead, instantiate an object of a derived class. Currently, StorageBlobDeadLetterDestination is the only class that derives from this class. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: StorageBlobDeadLetterDestination. - - All required parameters must be populated in order to send to Azure. - - :ivar endpoint_type: Required. Type of the endpoint for the dead letter destination.Constant - filled by server. Possible values include: "StorageBlob". - :vartype endpoint_type: str or ~azure.mgmt.eventgrid.models.DeadLetterEndPointType - """ - - _validation = { - 'endpoint_type': {'required': True}, - } - - _attribute_map = { - 'endpoint_type': {'key': 'endpointType', 'type': 'str'}, - } - - _subtype_map = { - 'endpoint_type': {'StorageBlob': 'StorageBlobDeadLetterDestination'} - } - - def __init__( - self, - **kwargs - ): - """ - """ - super(DeadLetterDestination, self).__init__(**kwargs) - self.endpoint_type = None # type: Optional[str] - - -class DeadLetterWithResourceIdentity(msrest.serialization.Model): - """Information about the deadletter destination with resource identity. - - :ivar identity: The identity to use when dead-lettering events. - :vartype identity: ~azure.mgmt.eventgrid.models.EventSubscriptionIdentity - :ivar dead_letter_destination: Information about the destination where events have to be - delivered for the event subscription. - Uses the managed identity setup on the parent resource (namely, topic or domain) to acquire - the authentication tokens being used during delivery / dead-lettering. - :vartype dead_letter_destination: ~azure.mgmt.eventgrid.models.DeadLetterDestination - """ - - _attribute_map = { - 'identity': {'key': 'identity', 'type': 'EventSubscriptionIdentity'}, - 'dead_letter_destination': {'key': 'deadLetterDestination', 'type': 'DeadLetterDestination'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword identity: The identity to use when dead-lettering events. - :paramtype identity: ~azure.mgmt.eventgrid.models.EventSubscriptionIdentity - :keyword dead_letter_destination: Information about the destination where events have to be - delivered for the event subscription. - Uses the managed identity setup on the parent resource (namely, topic or domain) to acquire - the authentication tokens being used during delivery / dead-lettering. - :paramtype dead_letter_destination: ~azure.mgmt.eventgrid.models.DeadLetterDestination - """ - super(DeadLetterWithResourceIdentity, self).__init__(**kwargs) - self.identity = kwargs.get('identity', None) - self.dead_letter_destination = kwargs.get('dead_letter_destination', None) - - -class DeliveryAttributeListResult(msrest.serialization.Model): - """Result of the Get delivery attributes operation. - - :ivar value: A collection of DeliveryAttributeMapping. - :vartype value: list[~azure.mgmt.eventgrid.models.DeliveryAttributeMapping] - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[DeliveryAttributeMapping]'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword value: A collection of DeliveryAttributeMapping. - :paramtype value: list[~azure.mgmt.eventgrid.models.DeliveryAttributeMapping] - """ - super(DeliveryAttributeListResult, self).__init__(**kwargs) - self.value = kwargs.get('value', None) - - -class DeliveryAttributeMapping(msrest.serialization.Model): - """Delivery attribute mapping details. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: DynamicDeliveryAttributeMapping, StaticDeliveryAttributeMapping. - - All required parameters must be populated in order to send to Azure. - - :ivar name: Name of the delivery attribute or header. - :vartype name: str - :ivar type: Required. Type of the delivery attribute or header name.Constant filled by server. - Possible values include: "Static", "Dynamic". - :vartype type: str or ~azure.mgmt.eventgrid.models.DeliveryAttributeMappingType - """ - - _validation = { - 'type': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - } - - _subtype_map = { - 'type': {'Dynamic': 'DynamicDeliveryAttributeMapping', 'Static': 'StaticDeliveryAttributeMapping'} - } - - def __init__( - self, - **kwargs - ): - """ - :keyword name: Name of the delivery attribute or header. - :paramtype name: str - """ - super(DeliveryAttributeMapping, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.type = None # type: Optional[str] - - -class DeliveryWithResourceIdentity(msrest.serialization.Model): - """Information about the delivery for an event subscription with resource identity. - - :ivar identity: The identity to use when delivering events. - :vartype identity: ~azure.mgmt.eventgrid.models.EventSubscriptionIdentity - :ivar destination: Information about the destination where events have to be delivered for the - event subscription. - Uses Azure Event Grid's identity to acquire the authentication tokens being used during - delivery / dead-lettering. - :vartype destination: ~azure.mgmt.eventgrid.models.EventSubscriptionDestination - """ - - _attribute_map = { - 'identity': {'key': 'identity', 'type': 'EventSubscriptionIdentity'}, - 'destination': {'key': 'destination', 'type': 'EventSubscriptionDestination'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword identity: The identity to use when delivering events. - :paramtype identity: ~azure.mgmt.eventgrid.models.EventSubscriptionIdentity - :keyword destination: Information about the destination where events have to be delivered for - the event subscription. - Uses Azure Event Grid's identity to acquire the authentication tokens being used during - delivery / dead-lettering. - :paramtype destination: ~azure.mgmt.eventgrid.models.EventSubscriptionDestination - """ - super(DeliveryWithResourceIdentity, self).__init__(**kwargs) - self.identity = kwargs.get('identity', None) - self.destination = kwargs.get('destination', None) - - -class Resource(msrest.serialization.Model): - """Definition of a Resource. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar id: Fully qualified identifier of the resource. - :vartype id: str - :ivar name: Name of the resource. - :vartype name: str - :ivar type: Type of the resource. - :vartype type: str - """ - - _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'}, - } - - def __init__( - self, - **kwargs - ): - """ - """ - super(Resource, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - - -class TrackedResource(Resource): - """Definition of a Tracked Resource. - - 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: Fully qualified identifier of the resource. - :vartype id: str - :ivar name: Name of the resource. - :vartype name: str - :ivar type: Type of the resource. - :vartype type: str - :ivar location: Required. Location of the resource. - :vartype location: str - :ivar tags: A set of tags. Tags of the resource. - :vartype tags: dict[str, str] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': 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}'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword location: Required. Location of the resource. - :paramtype location: str - :keyword tags: A set of tags. Tags of the resource. - :paramtype tags: dict[str, str] - """ - super(TrackedResource, self).__init__(**kwargs) - self.location = kwargs['location'] - self.tags = kwargs.get('tags', None) - - -class Domain(TrackedResource): - """EventGrid Domain. - - 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: Fully qualified identifier of the resource. - :vartype id: str - :ivar name: Name of the resource. - :vartype name: str - :ivar type: Type of the resource. - :vartype type: str - :ivar location: Required. Location of the resource. - :vartype location: str - :ivar tags: A set of tags. Tags of the resource. - :vartype tags: dict[str, str] - :ivar system_data: The system metadata relating to Domain resource. - :vartype system_data: ~azure.mgmt.eventgrid.models.SystemData - :ivar identity: Identity information for the Event Grid Domain resource. - :vartype identity: ~azure.mgmt.eventgrid.models.IdentityInfo - :ivar private_endpoint_connections: List of private endpoint connections. - :vartype private_endpoint_connections: - list[~azure.mgmt.eventgrid.models.PrivateEndpointConnection] - :ivar provisioning_state: Provisioning state of the Event Grid Domain Resource. Possible values - include: "Creating", "Updating", "Deleting", "Succeeded", "Canceled", "Failed". - :vartype provisioning_state: str or ~azure.mgmt.eventgrid.models.DomainProvisioningState - :ivar endpoint: Endpoint for the domain. - :vartype endpoint: str - :ivar input_schema: This determines the format that Event Grid should expect for incoming - events published to the domain. Possible values include: "EventGridSchema", - "CustomEventSchema", "CloudEventSchemaV1_0". - :vartype input_schema: str or ~azure.mgmt.eventgrid.models.InputSchema - :ivar input_schema_mapping: Information about the InputSchemaMapping which specified the info - about mapping event payload. - :vartype input_schema_mapping: ~azure.mgmt.eventgrid.models.InputSchemaMapping - :ivar metric_resource_id: Metric resource id for the domain. - :vartype metric_resource_id: str - :ivar public_network_access: This determines if traffic is allowed over public network. By - default it is enabled. - You can further restrict to specific IPs by configuring :code:``. Possible values include: "Enabled", "Disabled". - :vartype public_network_access: str or ~azure.mgmt.eventgrid.models.PublicNetworkAccess - :ivar inbound_ip_rules: This can be used to restrict traffic from specific IPs instead of all - IPs. Note: These are considered only if PublicNetworkAccess is enabled. - :vartype inbound_ip_rules: list[~azure.mgmt.eventgrid.models.InboundIpRule] - :ivar disable_local_auth: This boolean is used to enable or disable local auth. Default value - is false. When the property is set to true, only AAD token will be used to authenticate if user - is allowed to publish to the domain. - :vartype disable_local_auth: bool - :ivar auto_create_topic_with_first_subscription: This Boolean is used to specify the creation - mechanism for 'all' the Event Grid Domain Topics associated with this Event Grid Domain - resource. - In this context, creation of domain topic can be auto-managed (when true) or self-managed - (when false). The default value for this property is true. - When this property is null or set to true, Event Grid is responsible of automatically creating - the domain topic when the first event subscription is - created at the scope of the domain topic. If this property is set to false, then creating the - first event subscription will require creating a domain topic - by the user. The self-management mode can be used if the user wants full control of when the - domain topic is created, while auto-managed mode provides the - flexibility to perform less operations and manage fewer resources by the user. Also, note that - in auto-managed creation mode, user is allowed to create the - domain topic on demand if needed. - :vartype auto_create_topic_with_first_subscription: bool - :ivar auto_delete_topic_with_last_subscription: This Boolean is used to specify the deletion - mechanism for 'all' the Event Grid Domain Topics associated with this Event Grid Domain - resource. - In this context, deletion of domain topic can be auto-managed (when true) or self-managed - (when false). The default value for this property is true. - When this property is set to true, Event Grid is responsible of automatically deleting the - domain topic when the last event subscription at the scope - of the domain topic is deleted. If this property is set to false, then the user needs to - manually delete the domain topic when it is no longer needed - (e.g., when last event subscription is deleted and the resource needs to be cleaned up). The - self-management mode can be used if the user wants full - control of when the domain topic needs to be deleted, while auto-managed mode provides the - flexibility to perform less operations and manage fewer - resources by the user. - :vartype auto_delete_topic_with_last_subscription: bool - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'system_data': {'readonly': True}, - 'private_endpoint_connections': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'endpoint': {'readonly': True}, - 'metric_resource_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}'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - 'identity': {'key': 'identity', 'type': 'IdentityInfo'}, - 'private_endpoint_connections': {'key': 'properties.privateEndpointConnections', 'type': '[PrivateEndpointConnection]'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'endpoint': {'key': 'properties.endpoint', 'type': 'str'}, - 'input_schema': {'key': 'properties.inputSchema', 'type': 'str'}, - 'input_schema_mapping': {'key': 'properties.inputSchemaMapping', 'type': 'InputSchemaMapping'}, - 'metric_resource_id': {'key': 'properties.metricResourceId', 'type': 'str'}, - 'public_network_access': {'key': 'properties.publicNetworkAccess', 'type': 'str'}, - 'inbound_ip_rules': {'key': 'properties.inboundIpRules', 'type': '[InboundIpRule]'}, - 'disable_local_auth': {'key': 'properties.disableLocalAuth', 'type': 'bool'}, - 'auto_create_topic_with_first_subscription': {'key': 'properties.autoCreateTopicWithFirstSubscription', 'type': 'bool'}, - 'auto_delete_topic_with_last_subscription': {'key': 'properties.autoDeleteTopicWithLastSubscription', 'type': 'bool'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword location: Required. Location of the resource. - :paramtype location: str - :keyword tags: A set of tags. Tags of the resource. - :paramtype tags: dict[str, str] - :keyword identity: Identity information for the Event Grid Domain resource. - :paramtype identity: ~azure.mgmt.eventgrid.models.IdentityInfo - :keyword input_schema: This determines the format that Event Grid should expect for incoming - events published to the domain. Possible values include: "EventGridSchema", - "CustomEventSchema", "CloudEventSchemaV1_0". - :paramtype input_schema: str or ~azure.mgmt.eventgrid.models.InputSchema - :keyword input_schema_mapping: Information about the InputSchemaMapping which specified the - info about mapping event payload. - :paramtype input_schema_mapping: ~azure.mgmt.eventgrid.models.InputSchemaMapping - :keyword public_network_access: This determines if traffic is allowed over public network. By - default it is enabled. - You can further restrict to specific IPs by configuring :code:``. Possible values include: "Enabled", "Disabled". - :paramtype public_network_access: str or ~azure.mgmt.eventgrid.models.PublicNetworkAccess - :keyword inbound_ip_rules: This can be used to restrict traffic from specific IPs instead of - all IPs. Note: These are considered only if PublicNetworkAccess is enabled. - :paramtype inbound_ip_rules: list[~azure.mgmt.eventgrid.models.InboundIpRule] - :keyword disable_local_auth: This boolean is used to enable or disable local auth. Default - value is false. When the property is set to true, only AAD token will be used to authenticate - if user is allowed to publish to the domain. - :paramtype disable_local_auth: bool - :keyword auto_create_topic_with_first_subscription: This Boolean is used to specify the - creation mechanism for 'all' the Event Grid Domain Topics associated with this Event Grid - Domain resource. - In this context, creation of domain topic can be auto-managed (when true) or self-managed - (when false). The default value for this property is true. - When this property is null or set to true, Event Grid is responsible of automatically creating - the domain topic when the first event subscription is - created at the scope of the domain topic. If this property is set to false, then creating the - first event subscription will require creating a domain topic - by the user. The self-management mode can be used if the user wants full control of when the - domain topic is created, while auto-managed mode provides the - flexibility to perform less operations and manage fewer resources by the user. Also, note that - in auto-managed creation mode, user is allowed to create the - domain topic on demand if needed. - :paramtype auto_create_topic_with_first_subscription: bool - :keyword auto_delete_topic_with_last_subscription: This Boolean is used to specify the deletion - mechanism for 'all' the Event Grid Domain Topics associated with this Event Grid Domain - resource. - In this context, deletion of domain topic can be auto-managed (when true) or self-managed - (when false). The default value for this property is true. - When this property is set to true, Event Grid is responsible of automatically deleting the - domain topic when the last event subscription at the scope - of the domain topic is deleted. If this property is set to false, then the user needs to - manually delete the domain topic when it is no longer needed - (e.g., when last event subscription is deleted and the resource needs to be cleaned up). The - self-management mode can be used if the user wants full - control of when the domain topic needs to be deleted, while auto-managed mode provides the - flexibility to perform less operations and manage fewer - resources by the user. - :paramtype auto_delete_topic_with_last_subscription: bool - """ - super(Domain, self).__init__(**kwargs) - self.system_data = None - self.identity = kwargs.get('identity', None) - self.private_endpoint_connections = None - self.provisioning_state = None - self.endpoint = None - self.input_schema = kwargs.get('input_schema', None) - self.input_schema_mapping = kwargs.get('input_schema_mapping', None) - self.metric_resource_id = None - self.public_network_access = kwargs.get('public_network_access', None) - self.inbound_ip_rules = kwargs.get('inbound_ip_rules', None) - self.disable_local_auth = kwargs.get('disable_local_auth', False) - self.auto_create_topic_with_first_subscription = kwargs.get('auto_create_topic_with_first_subscription', True) - self.auto_delete_topic_with_last_subscription = kwargs.get('auto_delete_topic_with_last_subscription', True) - - -class DomainRegenerateKeyRequest(msrest.serialization.Model): - """Domain regenerate share access key request. - - All required parameters must be populated in order to send to Azure. - - :ivar key_name: Required. Key name to regenerate key1 or key2. - :vartype key_name: str - """ - - _validation = { - 'key_name': {'required': True}, - } - - _attribute_map = { - 'key_name': {'key': 'keyName', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword key_name: Required. Key name to regenerate key1 or key2. - :paramtype key_name: str - """ - super(DomainRegenerateKeyRequest, self).__init__(**kwargs) - self.key_name = kwargs['key_name'] - - -class DomainSharedAccessKeys(msrest.serialization.Model): - """Shared access keys of the Domain. - - :ivar key1: Shared access key1 for the domain. - :vartype key1: str - :ivar key2: Shared access key2 for the domain. - :vartype key2: str - """ - - _attribute_map = { - 'key1': {'key': 'key1', 'type': 'str'}, - 'key2': {'key': 'key2', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword key1: Shared access key1 for the domain. - :paramtype key1: str - :keyword key2: Shared access key2 for the domain. - :paramtype key2: str - """ - super(DomainSharedAccessKeys, self).__init__(**kwargs) - self.key1 = kwargs.get('key1', None) - self.key2 = kwargs.get('key2', None) - - -class DomainsListResult(msrest.serialization.Model): - """Result of the List Domains operation. - - :ivar value: A collection of Domains. - :vartype value: list[~azure.mgmt.eventgrid.models.Domain] - :ivar next_link: A link for the next page of domains. - :vartype next_link: str - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[Domain]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword value: A collection of Domains. - :paramtype value: list[~azure.mgmt.eventgrid.models.Domain] - :keyword next_link: A link for the next page of domains. - :paramtype next_link: str - """ - super(DomainsListResult, self).__init__(**kwargs) - self.value = kwargs.get('value', None) - self.next_link = kwargs.get('next_link', None) - - -class DomainTopic(Resource): - """Domain Topic. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar id: Fully qualified identifier of the resource. - :vartype id: str - :ivar name: Name of the resource. - :vartype name: str - :ivar type: Type of the resource. - :vartype type: str - :ivar system_data: The system metadata relating to Domain Topic resource. - :vartype system_data: ~azure.mgmt.eventgrid.models.SystemData - :ivar provisioning_state: Provisioning state of the domain topic. Possible values include: - "Creating", "Updating", "Deleting", "Succeeded", "Canceled", "Failed". - :vartype provisioning_state: str or ~azure.mgmt.eventgrid.models.DomainTopicProvisioningState - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'system_data': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - """ - """ - super(DomainTopic, self).__init__(**kwargs) - self.system_data = None - self.provisioning_state = None - - -class DomainTopicsListResult(msrest.serialization.Model): - """Result of the List Domain Topics operation. - - :ivar value: A collection of Domain Topics. - :vartype value: list[~azure.mgmt.eventgrid.models.DomainTopic] - :ivar next_link: A link for the next page of domain topics. - :vartype next_link: str - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[DomainTopic]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword value: A collection of Domain Topics. - :paramtype value: list[~azure.mgmt.eventgrid.models.DomainTopic] - :keyword next_link: A link for the next page of domain topics. - :paramtype next_link: str - """ - super(DomainTopicsListResult, self).__init__(**kwargs) - self.value = kwargs.get('value', None) - self.next_link = kwargs.get('next_link', None) - - -class DomainUpdateParameters(msrest.serialization.Model): - """Properties of the Domain update. - - :ivar tags: A set of tags. Tags of the domains resource. - :vartype tags: dict[str, str] - :ivar identity: Identity information for the resource. - :vartype identity: ~azure.mgmt.eventgrid.models.IdentityInfo - :ivar public_network_access: This determines if traffic is allowed over public network. By - default it is enabled. - You can further restrict to specific IPs by configuring :code:``. Possible values include: "Enabled", "Disabled". - :vartype public_network_access: str or ~azure.mgmt.eventgrid.models.PublicNetworkAccess - :ivar inbound_ip_rules: This can be used to restrict traffic from specific IPs instead of all - IPs. Note: These are considered only if PublicNetworkAccess is enabled. - :vartype inbound_ip_rules: list[~azure.mgmt.eventgrid.models.InboundIpRule] - :ivar disable_local_auth: This boolean is used to enable or disable local auth. Default value - is false. When the property is set to true, only AAD token will be used to authenticate if user - is allowed to publish to the domain. - :vartype disable_local_auth: bool - :ivar auto_create_topic_with_first_subscription: This Boolean is used to specify the creation - mechanism for 'all' the Event Grid Domain Topics associated with this Event Grid Domain - resource. - In this context, creation of domain topic can be auto-managed (when true) or self-managed - (when false). The default value for this property is true. - When this property is null or set to true, Event Grid is responsible of automatically creating - the domain topic when the first event subscription is - created at the scope of the domain topic. If this property is set to false, then creating the - first event subscription will require creating a domain topic - by the user. The self-management mode can be used if the user wants full control of when the - domain topic is created, while auto-managed mode provides the - flexibility to perform less operations and manage fewer resources by the user. Also, note that - in auto-managed creation mode, user is allowed to create the - domain topic on demand if needed. - :vartype auto_create_topic_with_first_subscription: bool - :ivar auto_delete_topic_with_last_subscription: This Boolean is used to specify the deletion - mechanism for 'all' the Event Grid Domain Topics associated with this Event Grid Domain - resource. - In this context, deletion of domain topic can be auto-managed (when true) or self-managed - (when false). The default value for this property is true. - When this property is set to true, Event Grid is responsible of automatically deleting the - domain topic when the last event subscription at the scope - of the domain topic is deleted. If this property is set to false, then the user needs to - manually delete the domain topic when it is no longer needed - (e.g., when last event subscription is deleted and the resource needs to be cleaned up). The - self-management mode can be used if the user wants full - control of when the domain topic needs to be deleted, while auto-managed mode provides the - flexibility to perform less operations and manage fewer - resources by the user. - :vartype auto_delete_topic_with_last_subscription: bool - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - 'identity': {'key': 'identity', 'type': 'IdentityInfo'}, - 'public_network_access': {'key': 'properties.publicNetworkAccess', 'type': 'str'}, - 'inbound_ip_rules': {'key': 'properties.inboundIpRules', 'type': '[InboundIpRule]'}, - 'disable_local_auth': {'key': 'properties.disableLocalAuth', 'type': 'bool'}, - 'auto_create_topic_with_first_subscription': {'key': 'properties.autoCreateTopicWithFirstSubscription', 'type': 'bool'}, - 'auto_delete_topic_with_last_subscription': {'key': 'properties.autoDeleteTopicWithLastSubscription', 'type': 'bool'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword tags: A set of tags. Tags of the domains resource. - :paramtype tags: dict[str, str] - :keyword identity: Identity information for the resource. - :paramtype identity: ~azure.mgmt.eventgrid.models.IdentityInfo - :keyword public_network_access: This determines if traffic is allowed over public network. By - default it is enabled. - You can further restrict to specific IPs by configuring :code:``. Possible values include: "Enabled", "Disabled". - :paramtype public_network_access: str or ~azure.mgmt.eventgrid.models.PublicNetworkAccess - :keyword inbound_ip_rules: This can be used to restrict traffic from specific IPs instead of - all IPs. Note: These are considered only if PublicNetworkAccess is enabled. - :paramtype inbound_ip_rules: list[~azure.mgmt.eventgrid.models.InboundIpRule] - :keyword disable_local_auth: This boolean is used to enable or disable local auth. Default - value is false. When the property is set to true, only AAD token will be used to authenticate - if user is allowed to publish to the domain. - :paramtype disable_local_auth: bool - :keyword auto_create_topic_with_first_subscription: This Boolean is used to specify the - creation mechanism for 'all' the Event Grid Domain Topics associated with this Event Grid - Domain resource. - In this context, creation of domain topic can be auto-managed (when true) or self-managed - (when false). The default value for this property is true. - When this property is null or set to true, Event Grid is responsible of automatically creating - the domain topic when the first event subscription is - created at the scope of the domain topic. If this property is set to false, then creating the - first event subscription will require creating a domain topic - by the user. The self-management mode can be used if the user wants full control of when the - domain topic is created, while auto-managed mode provides the - flexibility to perform less operations and manage fewer resources by the user. Also, note that - in auto-managed creation mode, user is allowed to create the - domain topic on demand if needed. - :paramtype auto_create_topic_with_first_subscription: bool - :keyword auto_delete_topic_with_last_subscription: This Boolean is used to specify the deletion - mechanism for 'all' the Event Grid Domain Topics associated with this Event Grid Domain - resource. - In this context, deletion of domain topic can be auto-managed (when true) or self-managed - (when false). The default value for this property is true. - When this property is set to true, Event Grid is responsible of automatically deleting the - domain topic when the last event subscription at the scope - of the domain topic is deleted. If this property is set to false, then the user needs to - manually delete the domain topic when it is no longer needed - (e.g., when last event subscription is deleted and the resource needs to be cleaned up). The - self-management mode can be used if the user wants full - control of when the domain topic needs to be deleted, while auto-managed mode provides the - flexibility to perform less operations and manage fewer - resources by the user. - :paramtype auto_delete_topic_with_last_subscription: bool - """ - super(DomainUpdateParameters, self).__init__(**kwargs) - self.tags = kwargs.get('tags', None) - self.identity = kwargs.get('identity', None) - self.public_network_access = kwargs.get('public_network_access', None) - self.inbound_ip_rules = kwargs.get('inbound_ip_rules', None) - self.disable_local_auth = kwargs.get('disable_local_auth', None) - self.auto_create_topic_with_first_subscription = kwargs.get('auto_create_topic_with_first_subscription', None) - self.auto_delete_topic_with_last_subscription = kwargs.get('auto_delete_topic_with_last_subscription', None) - - -class DynamicDeliveryAttributeMapping(DeliveryAttributeMapping): - """Dynamic delivery attribute mapping details. - - All required parameters must be populated in order to send to Azure. - - :ivar name: Name of the delivery attribute or header. - :vartype name: str - :ivar type: Required. Type of the delivery attribute or header name.Constant filled by server. - Possible values include: "Static", "Dynamic". - :vartype type: str or ~azure.mgmt.eventgrid.models.DeliveryAttributeMappingType - :ivar source_field: JSON path in the event which contains attribute value. - :vartype source_field: str - """ - - _validation = { - 'type': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'source_field': {'key': 'properties.sourceField', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword name: Name of the delivery attribute or header. - :paramtype name: str - :keyword source_field: JSON path in the event which contains attribute value. - :paramtype source_field: str - """ - super(DynamicDeliveryAttributeMapping, self).__init__(**kwargs) - self.type = 'Dynamic' # type: str - self.source_field = kwargs.get('source_field', None) - - -class EventHubEventSubscriptionDestination(EventSubscriptionDestination): - """Information about the event hub destination for an event subscription. - - All required parameters must be populated in order to send to Azure. - - :ivar endpoint_type: Required. Type of the endpoint for the event subscription - destination.Constant filled by server. Possible values include: "WebHook", "EventHub", - "StorageQueue", "HybridConnection", "ServiceBusQueue", "ServiceBusTopic", "AzureFunction". - :vartype endpoint_type: str or ~azure.mgmt.eventgrid.models.EndpointType - :ivar resource_id: The Azure Resource Id that represents the endpoint of an Event Hub - destination of an event subscription. - :vartype resource_id: str - :ivar delivery_attribute_mappings: Delivery attribute details. - :vartype delivery_attribute_mappings: - list[~azure.mgmt.eventgrid.models.DeliveryAttributeMapping] - """ - - _validation = { - 'endpoint_type': {'required': True}, - } - - _attribute_map = { - 'endpoint_type': {'key': 'endpointType', 'type': 'str'}, - 'resource_id': {'key': 'properties.resourceId', 'type': 'str'}, - 'delivery_attribute_mappings': {'key': 'properties.deliveryAttributeMappings', 'type': '[DeliveryAttributeMapping]'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword resource_id: The Azure Resource Id that represents the endpoint of an Event Hub - destination of an event subscription. - :paramtype resource_id: str - :keyword delivery_attribute_mappings: Delivery attribute details. - :paramtype delivery_attribute_mappings: - list[~azure.mgmt.eventgrid.models.DeliveryAttributeMapping] - """ - super(EventHubEventSubscriptionDestination, self).__init__(**kwargs) - self.endpoint_type = 'EventHub' # type: str - self.resource_id = kwargs.get('resource_id', None) - self.delivery_attribute_mappings = kwargs.get('delivery_attribute_mappings', None) - - -class EventSubscription(Resource): - """Event Subscription. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar id: Fully qualified identifier of the resource. - :vartype id: str - :ivar name: Name of the resource. - :vartype name: str - :ivar type: Type of the resource. - :vartype type: str - :ivar system_data: The system metadata relating to Event Subscription resource. - :vartype system_data: ~azure.mgmt.eventgrid.models.SystemData - :ivar topic: Name of the topic of the event subscription. - :vartype topic: str - :ivar provisioning_state: Provisioning state of the event subscription. Possible values - include: "Creating", "Updating", "Deleting", "Succeeded", "Canceled", "Failed", - "AwaitingManualAction". - :vartype provisioning_state: str or - ~azure.mgmt.eventgrid.models.EventSubscriptionProvisioningState - :ivar destination: Information about the destination where events have to be delivered for the - event subscription. - :vartype destination: ~azure.mgmt.eventgrid.models.EventSubscriptionDestination - :ivar delivery_with_resource_identity: Information about the destination where events have to - be delivered for the event subscription. - Uses the managed identity setup on the parent resource (namely, topic or domain) to acquire - the authentication tokens being used during delivery / dead-lettering. - :vartype delivery_with_resource_identity: - ~azure.mgmt.eventgrid.models.DeliveryWithResourceIdentity - :ivar filter: Information about the filter for the event subscription. - :vartype filter: ~azure.mgmt.eventgrid.models.EventSubscriptionFilter - :ivar labels: List of user defined labels. - :vartype labels: list[str] - :ivar expiration_time_utc: Expiration time of the event subscription. - :vartype expiration_time_utc: ~datetime.datetime - :ivar event_delivery_schema: The event delivery schema for the event subscription. Possible - values include: "EventGridSchema", "CustomInputSchema", "CloudEventSchemaV1_0". - :vartype event_delivery_schema: str or ~azure.mgmt.eventgrid.models.EventDeliverySchema - :ivar retry_policy: The retry policy for events. This can be used to configure maximum number - of delivery attempts and time to live for events. - :vartype retry_policy: ~azure.mgmt.eventgrid.models.RetryPolicy - :ivar dead_letter_destination: The DeadLetter destination of the event subscription. - :vartype dead_letter_destination: ~azure.mgmt.eventgrid.models.DeadLetterDestination - :ivar dead_letter_with_resource_identity: The dead letter destination of the event - subscription. Any event that cannot be delivered to its' destination is sent to the dead letter - destination. - Uses the managed identity setup on the parent resource (namely, topic or domain) to acquire - the authentication tokens being used during delivery / dead-lettering. - :vartype dead_letter_with_resource_identity: - ~azure.mgmt.eventgrid.models.DeadLetterWithResourceIdentity - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'system_data': {'readonly': True}, - 'topic': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - 'topic': {'key': 'properties.topic', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'destination': {'key': 'properties.destination', 'type': 'EventSubscriptionDestination'}, - 'delivery_with_resource_identity': {'key': 'properties.deliveryWithResourceIdentity', 'type': 'DeliveryWithResourceIdentity'}, - 'filter': {'key': 'properties.filter', 'type': 'EventSubscriptionFilter'}, - 'labels': {'key': 'properties.labels', 'type': '[str]'}, - 'expiration_time_utc': {'key': 'properties.expirationTimeUtc', 'type': 'iso-8601'}, - 'event_delivery_schema': {'key': 'properties.eventDeliverySchema', 'type': 'str'}, - 'retry_policy': {'key': 'properties.retryPolicy', 'type': 'RetryPolicy'}, - 'dead_letter_destination': {'key': 'properties.deadLetterDestination', 'type': 'DeadLetterDestination'}, - 'dead_letter_with_resource_identity': {'key': 'properties.deadLetterWithResourceIdentity', 'type': 'DeadLetterWithResourceIdentity'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword destination: Information about the destination where events have to be delivered for - the event subscription. - :paramtype destination: ~azure.mgmt.eventgrid.models.EventSubscriptionDestination - :keyword delivery_with_resource_identity: Information about the destination where events have - to be delivered for the event subscription. - Uses the managed identity setup on the parent resource (namely, topic or domain) to acquire - the authentication tokens being used during delivery / dead-lettering. - :paramtype delivery_with_resource_identity: - ~azure.mgmt.eventgrid.models.DeliveryWithResourceIdentity - :keyword filter: Information about the filter for the event subscription. - :paramtype filter: ~azure.mgmt.eventgrid.models.EventSubscriptionFilter - :keyword labels: List of user defined labels. - :paramtype labels: list[str] - :keyword expiration_time_utc: Expiration time of the event subscription. - :paramtype expiration_time_utc: ~datetime.datetime - :keyword event_delivery_schema: The event delivery schema for the event subscription. Possible - values include: "EventGridSchema", "CustomInputSchema", "CloudEventSchemaV1_0". - :paramtype event_delivery_schema: str or ~azure.mgmt.eventgrid.models.EventDeliverySchema - :keyword retry_policy: The retry policy for events. This can be used to configure maximum - number of delivery attempts and time to live for events. - :paramtype retry_policy: ~azure.mgmt.eventgrid.models.RetryPolicy - :keyword dead_letter_destination: The DeadLetter destination of the event subscription. - :paramtype dead_letter_destination: ~azure.mgmt.eventgrid.models.DeadLetterDestination - :keyword dead_letter_with_resource_identity: The dead letter destination of the event - subscription. Any event that cannot be delivered to its' destination is sent to the dead letter - destination. - Uses the managed identity setup on the parent resource (namely, topic or domain) to acquire - the authentication tokens being used during delivery / dead-lettering. - :paramtype dead_letter_with_resource_identity: - ~azure.mgmt.eventgrid.models.DeadLetterWithResourceIdentity - """ - super(EventSubscription, self).__init__(**kwargs) - self.system_data = None - self.topic = None - self.provisioning_state = None - self.destination = kwargs.get('destination', None) - self.delivery_with_resource_identity = kwargs.get('delivery_with_resource_identity', None) - self.filter = kwargs.get('filter', None) - self.labels = kwargs.get('labels', None) - self.expiration_time_utc = kwargs.get('expiration_time_utc', None) - self.event_delivery_schema = kwargs.get('event_delivery_schema', None) - self.retry_policy = kwargs.get('retry_policy', None) - self.dead_letter_destination = kwargs.get('dead_letter_destination', None) - self.dead_letter_with_resource_identity = kwargs.get('dead_letter_with_resource_identity', None) - - -class EventSubscriptionFilter(msrest.serialization.Model): - """Filter for the Event Subscription. - - :ivar subject_begins_with: An optional string to filter events for an event subscription based - on a resource path prefix. - The format of this depends on the publisher of the events. - Wildcard characters are not supported in this path. - :vartype subject_begins_with: str - :ivar subject_ends_with: An optional string to filter events for an event subscription based on - a resource path suffix. - Wildcard characters are not supported in this path. - :vartype subject_ends_with: str - :ivar included_event_types: A list of applicable event types that need to be part of the event - subscription. If it is desired to subscribe to all default event types, set the - IncludedEventTypes to null. - :vartype included_event_types: list[str] - :ivar is_subject_case_sensitive: Specifies if the SubjectBeginsWith and SubjectEndsWith - properties of the filter - should be compared in a case sensitive manner. - :vartype is_subject_case_sensitive: bool - :ivar enable_advanced_filtering_on_arrays: Allows advanced filters to be evaluated against an - array of values instead of expecting a singular value. - :vartype enable_advanced_filtering_on_arrays: bool - :ivar advanced_filters: An array of advanced filters that are used for filtering event - subscriptions. - :vartype advanced_filters: list[~azure.mgmt.eventgrid.models.AdvancedFilter] - """ - - _attribute_map = { - 'subject_begins_with': {'key': 'subjectBeginsWith', 'type': 'str'}, - 'subject_ends_with': {'key': 'subjectEndsWith', 'type': 'str'}, - 'included_event_types': {'key': 'includedEventTypes', 'type': '[str]'}, - 'is_subject_case_sensitive': {'key': 'isSubjectCaseSensitive', 'type': 'bool'}, - 'enable_advanced_filtering_on_arrays': {'key': 'enableAdvancedFilteringOnArrays', 'type': 'bool'}, - 'advanced_filters': {'key': 'advancedFilters', 'type': '[AdvancedFilter]'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword subject_begins_with: An optional string to filter events for an event subscription - based on a resource path prefix. - The format of this depends on the publisher of the events. - Wildcard characters are not supported in this path. - :paramtype subject_begins_with: str - :keyword subject_ends_with: An optional string to filter events for an event subscription based - on a resource path suffix. - Wildcard characters are not supported in this path. - :paramtype subject_ends_with: str - :keyword included_event_types: A list of applicable event types that need to be part of the - event subscription. If it is desired to subscribe to all default event types, set the - IncludedEventTypes to null. - :paramtype included_event_types: list[str] - :keyword is_subject_case_sensitive: Specifies if the SubjectBeginsWith and SubjectEndsWith - properties of the filter - should be compared in a case sensitive manner. - :paramtype is_subject_case_sensitive: bool - :keyword enable_advanced_filtering_on_arrays: Allows advanced filters to be evaluated against - an array of values instead of expecting a singular value. - :paramtype enable_advanced_filtering_on_arrays: bool - :keyword advanced_filters: An array of advanced filters that are used for filtering event - subscriptions. - :paramtype advanced_filters: list[~azure.mgmt.eventgrid.models.AdvancedFilter] - """ - super(EventSubscriptionFilter, self).__init__(**kwargs) - self.subject_begins_with = kwargs.get('subject_begins_with', None) - self.subject_ends_with = kwargs.get('subject_ends_with', None) - self.included_event_types = kwargs.get('included_event_types', None) - self.is_subject_case_sensitive = kwargs.get('is_subject_case_sensitive', False) - self.enable_advanced_filtering_on_arrays = kwargs.get('enable_advanced_filtering_on_arrays', None) - self.advanced_filters = kwargs.get('advanced_filters', None) - - -class EventSubscriptionFullUrl(msrest.serialization.Model): - """Full endpoint url of an event subscription. - - :ivar endpoint_url: The URL that represents the endpoint of the destination of an event - subscription. - :vartype endpoint_url: str - """ - - _attribute_map = { - 'endpoint_url': {'key': 'endpointUrl', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword endpoint_url: The URL that represents the endpoint of the destination of an event - subscription. - :paramtype endpoint_url: str - """ - super(EventSubscriptionFullUrl, self).__init__(**kwargs) - self.endpoint_url = kwargs.get('endpoint_url', None) - - -class EventSubscriptionIdentity(msrest.serialization.Model): - """The identity information with the event subscription. - - :ivar type: The type of managed identity used. The type 'SystemAssigned, UserAssigned' includes - both an implicitly created identity and a set of user-assigned identities. The type 'None' will - remove any identity. Possible values include: "SystemAssigned", "UserAssigned". - :vartype type: str or ~azure.mgmt.eventgrid.models.EventSubscriptionIdentityType - :ivar user_assigned_identity: The user identity associated with the resource. - :vartype user_assigned_identity: str - """ - - _attribute_map = { - 'type': {'key': 'type', 'type': 'str'}, - 'user_assigned_identity': {'key': 'userAssignedIdentity', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword type: The type of managed identity used. The type 'SystemAssigned, UserAssigned' - includes both an implicitly created identity and a set of user-assigned identities. The type - 'None' will remove any identity. Possible values include: "SystemAssigned", "UserAssigned". - :paramtype type: str or ~azure.mgmt.eventgrid.models.EventSubscriptionIdentityType - :keyword user_assigned_identity: The user identity associated with the resource. - :paramtype user_assigned_identity: str - """ - super(EventSubscriptionIdentity, self).__init__(**kwargs) - self.type = kwargs.get('type', None) - self.user_assigned_identity = kwargs.get('user_assigned_identity', None) - - -class EventSubscriptionsListResult(msrest.serialization.Model): - """Result of the List EventSubscriptions operation. - - :ivar value: A collection of EventSubscriptions. - :vartype value: list[~azure.mgmt.eventgrid.models.EventSubscription] - :ivar next_link: A link for the next page of event subscriptions. - :vartype next_link: str - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[EventSubscription]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword value: A collection of EventSubscriptions. - :paramtype value: list[~azure.mgmt.eventgrid.models.EventSubscription] - :keyword next_link: A link for the next page of event subscriptions. - :paramtype next_link: str - """ - super(EventSubscriptionsListResult, self).__init__(**kwargs) - self.value = kwargs.get('value', None) - self.next_link = kwargs.get('next_link', None) - - -class EventSubscriptionUpdateParameters(msrest.serialization.Model): - """Properties of the Event Subscription update. - - :ivar destination: Information about the destination where events have to be delivered for the - event subscription. - :vartype destination: ~azure.mgmt.eventgrid.models.EventSubscriptionDestination - :ivar delivery_with_resource_identity: Information about the destination where events have to - be delivered for the event subscription. - Uses the managed identity setup on the parent resource (topic / domain) to acquire the - authentication tokens being used during delivery / dead-lettering. - :vartype delivery_with_resource_identity: - ~azure.mgmt.eventgrid.models.DeliveryWithResourceIdentity - :ivar filter: Information about the filter for the event subscription. - :vartype filter: ~azure.mgmt.eventgrid.models.EventSubscriptionFilter - :ivar labels: List of user defined labels. - :vartype labels: list[str] - :ivar expiration_time_utc: Information about the expiration time for the event subscription. - :vartype expiration_time_utc: ~datetime.datetime - :ivar event_delivery_schema: The event delivery schema for the event subscription. Possible - values include: "EventGridSchema", "CustomInputSchema", "CloudEventSchemaV1_0". - :vartype event_delivery_schema: str or ~azure.mgmt.eventgrid.models.EventDeliverySchema - :ivar retry_policy: The retry policy for events. This can be used to configure maximum number - of delivery attempts and time to live for events. - :vartype retry_policy: ~azure.mgmt.eventgrid.models.RetryPolicy - :ivar dead_letter_destination: The DeadLetter destination of the event subscription. - :vartype dead_letter_destination: ~azure.mgmt.eventgrid.models.DeadLetterDestination - :ivar dead_letter_with_resource_identity: The dead letter destination of the event - subscription. Any event that cannot be delivered to its' destination is sent to the dead letter - destination. - Uses the managed identity setup on the parent resource (topic / domain) to acquire the - authentication tokens being used during delivery / dead-lettering. - :vartype dead_letter_with_resource_identity: - ~azure.mgmt.eventgrid.models.DeadLetterWithResourceIdentity - """ - - _attribute_map = { - 'destination': {'key': 'destination', 'type': 'EventSubscriptionDestination'}, - 'delivery_with_resource_identity': {'key': 'deliveryWithResourceIdentity', 'type': 'DeliveryWithResourceIdentity'}, - 'filter': {'key': 'filter', 'type': 'EventSubscriptionFilter'}, - 'labels': {'key': 'labels', 'type': '[str]'}, - 'expiration_time_utc': {'key': 'expirationTimeUtc', 'type': 'iso-8601'}, - 'event_delivery_schema': {'key': 'eventDeliverySchema', 'type': 'str'}, - 'retry_policy': {'key': 'retryPolicy', 'type': 'RetryPolicy'}, - 'dead_letter_destination': {'key': 'deadLetterDestination', 'type': 'DeadLetterDestination'}, - 'dead_letter_with_resource_identity': {'key': 'deadLetterWithResourceIdentity', 'type': 'DeadLetterWithResourceIdentity'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword destination: Information about the destination where events have to be delivered for - the event subscription. - :paramtype destination: ~azure.mgmt.eventgrid.models.EventSubscriptionDestination - :keyword delivery_with_resource_identity: Information about the destination where events have - to be delivered for the event subscription. - Uses the managed identity setup on the parent resource (topic / domain) to acquire the - authentication tokens being used during delivery / dead-lettering. - :paramtype delivery_with_resource_identity: - ~azure.mgmt.eventgrid.models.DeliveryWithResourceIdentity - :keyword filter: Information about the filter for the event subscription. - :paramtype filter: ~azure.mgmt.eventgrid.models.EventSubscriptionFilter - :keyword labels: List of user defined labels. - :paramtype labels: list[str] - :keyword expiration_time_utc: Information about the expiration time for the event subscription. - :paramtype expiration_time_utc: ~datetime.datetime - :keyword event_delivery_schema: The event delivery schema for the event subscription. Possible - values include: "EventGridSchema", "CustomInputSchema", "CloudEventSchemaV1_0". - :paramtype event_delivery_schema: str or ~azure.mgmt.eventgrid.models.EventDeliverySchema - :keyword retry_policy: The retry policy for events. This can be used to configure maximum - number of delivery attempts and time to live for events. - :paramtype retry_policy: ~azure.mgmt.eventgrid.models.RetryPolicy - :keyword dead_letter_destination: The DeadLetter destination of the event subscription. - :paramtype dead_letter_destination: ~azure.mgmt.eventgrid.models.DeadLetterDestination - :keyword dead_letter_with_resource_identity: The dead letter destination of the event - subscription. Any event that cannot be delivered to its' destination is sent to the dead letter - destination. - Uses the managed identity setup on the parent resource (topic / domain) to acquire the - authentication tokens being used during delivery / dead-lettering. - :paramtype dead_letter_with_resource_identity: - ~azure.mgmt.eventgrid.models.DeadLetterWithResourceIdentity - """ - super(EventSubscriptionUpdateParameters, self).__init__(**kwargs) - self.destination = kwargs.get('destination', None) - self.delivery_with_resource_identity = kwargs.get('delivery_with_resource_identity', None) - self.filter = kwargs.get('filter', None) - self.labels = kwargs.get('labels', None) - self.expiration_time_utc = kwargs.get('expiration_time_utc', None) - self.event_delivery_schema = kwargs.get('event_delivery_schema', None) - self.retry_policy = kwargs.get('retry_policy', None) - self.dead_letter_destination = kwargs.get('dead_letter_destination', None) - self.dead_letter_with_resource_identity = kwargs.get('dead_letter_with_resource_identity', None) - - -class EventType(Resource): - """Event Type for a subject under a topic. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar id: Fully qualified identifier of the resource. - :vartype id: str - :ivar name: Name of the resource. - :vartype name: str - :ivar type: Type of the resource. - :vartype type: str - :ivar display_name: Display name of the event type. - :vartype display_name: str - :ivar description: Description of the event type. - :vartype description: str - :ivar schema_url: Url of the schema for this event type. - :vartype schema_url: str - :ivar is_in_default_set: IsInDefaultSet flag of the event type. - :vartype is_in_default_set: 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'}, - 'display_name': {'key': 'properties.displayName', 'type': 'str'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'schema_url': {'key': 'properties.schemaUrl', 'type': 'str'}, - 'is_in_default_set': {'key': 'properties.isInDefaultSet', 'type': 'bool'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword display_name: Display name of the event type. - :paramtype display_name: str - :keyword description: Description of the event type. - :paramtype description: str - :keyword schema_url: Url of the schema for this event type. - :paramtype schema_url: str - :keyword is_in_default_set: IsInDefaultSet flag of the event type. - :paramtype is_in_default_set: bool - """ - super(EventType, self).__init__(**kwargs) - self.display_name = kwargs.get('display_name', None) - self.description = kwargs.get('description', None) - self.schema_url = kwargs.get('schema_url', None) - self.is_in_default_set = kwargs.get('is_in_default_set', None) - - -class EventTypesListResult(msrest.serialization.Model): - """Result of the List Event Types operation. - - :ivar value: A collection of event types. - :vartype value: list[~azure.mgmt.eventgrid.models.EventType] - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[EventType]'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword value: A collection of event types. - :paramtype value: list[~azure.mgmt.eventgrid.models.EventType] - """ - super(EventTypesListResult, self).__init__(**kwargs) - self.value = kwargs.get('value', None) - - -class ExtensionTopic(Resource): - """Event grid Extension Topic. This is used for getting Event Grid related metrics for Azure resources. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar id: Fully qualified identifier of the resource. - :vartype id: str - :ivar name: Name of the resource. - :vartype name: str - :ivar type: Type of the resource. - :vartype type: str - :ivar system_data: The system metadata relating to the Extension Topic resource. - :vartype system_data: ~azure.mgmt.eventgrid.models.SystemData - :ivar description: Description of the extension topic. - :vartype description: str - :ivar system_topic: System topic resource id which is mapped to the source. - :vartype system_topic: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'system_data': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'system_topic': {'key': 'properties.systemTopic', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword description: Description of the extension topic. - :paramtype description: str - :keyword system_topic: System topic resource id which is mapped to the source. - :paramtype system_topic: str - """ - super(ExtensionTopic, self).__init__(**kwargs) - self.system_data = None - self.description = kwargs.get('description', None) - self.system_topic = kwargs.get('system_topic', None) - - -class HybridConnectionEventSubscriptionDestination(EventSubscriptionDestination): - """Information about the HybridConnection destination for an event subscription. - - All required parameters must be populated in order to send to Azure. - - :ivar endpoint_type: Required. Type of the endpoint for the event subscription - destination.Constant filled by server. Possible values include: "WebHook", "EventHub", - "StorageQueue", "HybridConnection", "ServiceBusQueue", "ServiceBusTopic", "AzureFunction". - :vartype endpoint_type: str or ~azure.mgmt.eventgrid.models.EndpointType - :ivar resource_id: The Azure Resource ID of an hybrid connection that is the destination of an - event subscription. - :vartype resource_id: str - :ivar delivery_attribute_mappings: Delivery attribute details. - :vartype delivery_attribute_mappings: - list[~azure.mgmt.eventgrid.models.DeliveryAttributeMapping] - """ - - _validation = { - 'endpoint_type': {'required': True}, - } - - _attribute_map = { - 'endpoint_type': {'key': 'endpointType', 'type': 'str'}, - 'resource_id': {'key': 'properties.resourceId', 'type': 'str'}, - 'delivery_attribute_mappings': {'key': 'properties.deliveryAttributeMappings', 'type': '[DeliveryAttributeMapping]'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword resource_id: The Azure Resource ID of an hybrid connection that is the destination of - an event subscription. - :paramtype resource_id: str - :keyword delivery_attribute_mappings: Delivery attribute details. - :paramtype delivery_attribute_mappings: - list[~azure.mgmt.eventgrid.models.DeliveryAttributeMapping] - """ - super(HybridConnectionEventSubscriptionDestination, self).__init__(**kwargs) - self.endpoint_type = 'HybridConnection' # type: str - self.resource_id = kwargs.get('resource_id', None) - self.delivery_attribute_mappings = kwargs.get('delivery_attribute_mappings', None) - - -class IdentityInfo(msrest.serialization.Model): - """The identity information for the resource. - - :ivar type: The type of managed identity used. The type 'SystemAssigned, UserAssigned' includes - both an implicitly created identity and a set of user-assigned identities. The type 'None' will - remove any identity. Possible values include: "None", "SystemAssigned", "UserAssigned", - "SystemAssigned, UserAssigned". - :vartype type: str or ~azure.mgmt.eventgrid.models.IdentityType - :ivar principal_id: The principal ID of resource identity. - :vartype principal_id: str - :ivar tenant_id: The tenant ID of resource. - :vartype tenant_id: str - :ivar user_assigned_identities: The list of user identities associated with the resource. The - user identity dictionary key references will be ARM resource ids in the form: - '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. - This property is currently not used and reserved for future usage. - :vartype user_assigned_identities: dict[str, - ~azure.mgmt.eventgrid.models.UserIdentityProperties] - """ - - _attribute_map = { - 'type': {'key': 'type', 'type': 'str'}, - 'principal_id': {'key': 'principalId', 'type': 'str'}, - 'tenant_id': {'key': 'tenantId', 'type': 'str'}, - 'user_assigned_identities': {'key': 'userAssignedIdentities', 'type': '{UserIdentityProperties}'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword type: The type of managed identity used. The type 'SystemAssigned, UserAssigned' - includes both an implicitly created identity and a set of user-assigned identities. The type - 'None' will remove any identity. Possible values include: "None", "SystemAssigned", - "UserAssigned", "SystemAssigned, UserAssigned". - :paramtype type: str or ~azure.mgmt.eventgrid.models.IdentityType - :keyword principal_id: The principal ID of resource identity. - :paramtype principal_id: str - :keyword tenant_id: The tenant ID of resource. - :paramtype tenant_id: str - :keyword user_assigned_identities: The list of user identities associated with the resource. - The user identity dictionary key references will be ARM resource ids in the form: - '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. - This property is currently not used and reserved for future usage. - :paramtype user_assigned_identities: dict[str, - ~azure.mgmt.eventgrid.models.UserIdentityProperties] - """ - super(IdentityInfo, self).__init__(**kwargs) - self.type = kwargs.get('type', None) - self.principal_id = kwargs.get('principal_id', None) - self.tenant_id = kwargs.get('tenant_id', None) - self.user_assigned_identities = kwargs.get('user_assigned_identities', None) - - -class InboundIpRule(msrest.serialization.Model): - """InboundIpRule. - - :ivar ip_mask: IP Address in CIDR notation e.g., 10.0.0.0/8. - :vartype ip_mask: str - :ivar action: Action to perform based on the match or no match of the IpMask. Possible values - include: "Allow". - :vartype action: str or ~azure.mgmt.eventgrid.models.IpActionType - """ - - _attribute_map = { - 'ip_mask': {'key': 'ipMask', 'type': 'str'}, - 'action': {'key': 'action', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword ip_mask: IP Address in CIDR notation e.g., 10.0.0.0/8. - :paramtype ip_mask: str - :keyword action: Action to perform based on the match or no match of the IpMask. Possible - values include: "Allow". - :paramtype action: str or ~azure.mgmt.eventgrid.models.IpActionType - """ - super(InboundIpRule, self).__init__(**kwargs) - self.ip_mask = kwargs.get('ip_mask', None) - self.action = kwargs.get('action', None) - - -class InputSchemaMapping(msrest.serialization.Model): - """By default, Event Grid expects events to be in the Event Grid event schema. Specifying an input schema mapping enables publishing to Event Grid using a custom input schema. Currently, the only supported type of InputSchemaMapping is 'JsonInputSchemaMapping'. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: JsonInputSchemaMapping. - - All required parameters must be populated in order to send to Azure. - - :ivar input_schema_mapping_type: Required. Type of the custom mapping.Constant filled by - server. Possible values include: "Json". - :vartype input_schema_mapping_type: str or ~azure.mgmt.eventgrid.models.InputSchemaMappingType - """ - - _validation = { - 'input_schema_mapping_type': {'required': True}, - } - - _attribute_map = { - 'input_schema_mapping_type': {'key': 'inputSchemaMappingType', 'type': 'str'}, - } - - _subtype_map = { - 'input_schema_mapping_type': {'Json': 'JsonInputSchemaMapping'} - } - - def __init__( - self, - **kwargs - ): - """ - """ - super(InputSchemaMapping, self).__init__(**kwargs) - self.input_schema_mapping_type = None # type: Optional[str] - - -class IsNotNullAdvancedFilter(AdvancedFilter): - """IsNotNull Advanced Filter. - - All required parameters must be populated in order to send to Azure. - - :ivar operator_type: Required. The operator type used for filtering, e.g., NumberIn, - StringContains, BoolEquals and others.Constant filled by server. Possible values include: - "NumberIn", "NumberNotIn", "NumberLessThan", "NumberGreaterThan", "NumberLessThanOrEquals", - "NumberGreaterThanOrEquals", "BoolEquals", "StringIn", "StringNotIn", "StringBeginsWith", - "StringEndsWith", "StringContains", "NumberInRange", "NumberNotInRange", "StringNotBeginsWith", - "StringNotEndsWith", "StringNotContains", "IsNullOrUndefined", "IsNotNull". - :vartype operator_type: str or ~azure.mgmt.eventgrid.models.AdvancedFilterOperatorType - :ivar key: The field/property in the event based on which you want to filter. - :vartype key: str - """ - - _validation = { - 'operator_type': {'required': True}, - } - - _attribute_map = { - 'operator_type': {'key': 'operatorType', 'type': 'str'}, - 'key': {'key': 'key', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword key: The field/property in the event based on which you want to filter. - :paramtype key: str - """ - super(IsNotNullAdvancedFilter, self).__init__(**kwargs) - self.operator_type = 'IsNotNull' # type: str - - -class IsNullOrUndefinedAdvancedFilter(AdvancedFilter): - """IsNullOrUndefined Advanced Filter. - - All required parameters must be populated in order to send to Azure. - - :ivar operator_type: Required. The operator type used for filtering, e.g., NumberIn, - StringContains, BoolEquals and others.Constant filled by server. Possible values include: - "NumberIn", "NumberNotIn", "NumberLessThan", "NumberGreaterThan", "NumberLessThanOrEquals", - "NumberGreaterThanOrEquals", "BoolEquals", "StringIn", "StringNotIn", "StringBeginsWith", - "StringEndsWith", "StringContains", "NumberInRange", "NumberNotInRange", "StringNotBeginsWith", - "StringNotEndsWith", "StringNotContains", "IsNullOrUndefined", "IsNotNull". - :vartype operator_type: str or ~azure.mgmt.eventgrid.models.AdvancedFilterOperatorType - :ivar key: The field/property in the event based on which you want to filter. - :vartype key: str - """ - - _validation = { - 'operator_type': {'required': True}, - } - - _attribute_map = { - 'operator_type': {'key': 'operatorType', 'type': 'str'}, - 'key': {'key': 'key', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword key: The field/property in the event based on which you want to filter. - :paramtype key: str - """ - super(IsNullOrUndefinedAdvancedFilter, self).__init__(**kwargs) - self.operator_type = 'IsNullOrUndefined' # type: str - - -class JsonField(msrest.serialization.Model): - """This is used to express the source of an input schema mapping for a single target field in the Event Grid Event schema. This is currently used in the mappings for the 'id', 'topic' and 'eventtime' properties. This represents a field in the input event schema. - - :ivar source_field: Name of a field in the input event schema that's to be used as the source - of a mapping. - :vartype source_field: str - """ - - _attribute_map = { - 'source_field': {'key': 'sourceField', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword source_field: Name of a field in the input event schema that's to be used as the - source of a mapping. - :paramtype source_field: str - """ - super(JsonField, self).__init__(**kwargs) - self.source_field = kwargs.get('source_field', None) - - -class JsonFieldWithDefault(msrest.serialization.Model): - """This is used to express the source of an input schema mapping for a single target field -in the Event Grid Event schema. This is currently used in the mappings for the 'subject', -'eventtype' and 'dataversion' properties. This represents a field in the input event schema -along with a default value to be used, and at least one of these two properties should be provided. - - :ivar source_field: Name of a field in the input event schema that's to be used as the source - of a mapping. - :vartype source_field: str - :ivar default_value: The default value to be used for mapping when a SourceField is not - provided or if there's no property with the specified name in the published JSON event payload. - :vartype default_value: str - """ - - _attribute_map = { - 'source_field': {'key': 'sourceField', 'type': 'str'}, - 'default_value': {'key': 'defaultValue', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword source_field: Name of a field in the input event schema that's to be used as the - source of a mapping. - :paramtype source_field: str - :keyword default_value: The default value to be used for mapping when a SourceField is not - provided or if there's no property with the specified name in the published JSON event payload. - :paramtype default_value: str - """ - super(JsonFieldWithDefault, self).__init__(**kwargs) - self.source_field = kwargs.get('source_field', None) - self.default_value = kwargs.get('default_value', None) - - -class JsonInputSchemaMapping(InputSchemaMapping): - """This enables publishing to Event Grid using a custom input schema. This can be used to map properties from a custom input JSON schema to the Event Grid event schema. - - All required parameters must be populated in order to send to Azure. - - :ivar input_schema_mapping_type: Required. Type of the custom mapping.Constant filled by - server. Possible values include: "Json". - :vartype input_schema_mapping_type: str or ~azure.mgmt.eventgrid.models.InputSchemaMappingType - :ivar id: The mapping information for the Id property of the Event Grid Event. - :vartype id: ~azure.mgmt.eventgrid.models.JsonField - :ivar topic: The mapping information for the Topic property of the Event Grid Event. - :vartype topic: ~azure.mgmt.eventgrid.models.JsonField - :ivar event_time: The mapping information for the EventTime property of the Event Grid Event. - :vartype event_time: ~azure.mgmt.eventgrid.models.JsonField - :ivar event_type: The mapping information for the EventType property of the Event Grid Event. - :vartype event_type: ~azure.mgmt.eventgrid.models.JsonFieldWithDefault - :ivar subject: The mapping information for the Subject property of the Event Grid Event. - :vartype subject: ~azure.mgmt.eventgrid.models.JsonFieldWithDefault - :ivar data_version: The mapping information for the DataVersion property of the Event Grid - Event. - :vartype data_version: ~azure.mgmt.eventgrid.models.JsonFieldWithDefault - """ - - _validation = { - 'input_schema_mapping_type': {'required': True}, - } - - _attribute_map = { - 'input_schema_mapping_type': {'key': 'inputSchemaMappingType', 'type': 'str'}, - 'id': {'key': 'properties.id', 'type': 'JsonField'}, - 'topic': {'key': 'properties.topic', 'type': 'JsonField'}, - 'event_time': {'key': 'properties.eventTime', 'type': 'JsonField'}, - 'event_type': {'key': 'properties.eventType', 'type': 'JsonFieldWithDefault'}, - 'subject': {'key': 'properties.subject', 'type': 'JsonFieldWithDefault'}, - 'data_version': {'key': 'properties.dataVersion', 'type': 'JsonFieldWithDefault'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword id: The mapping information for the Id property of the Event Grid Event. - :paramtype id: ~azure.mgmt.eventgrid.models.JsonField - :keyword topic: The mapping information for the Topic property of the Event Grid Event. - :paramtype topic: ~azure.mgmt.eventgrid.models.JsonField - :keyword event_time: The mapping information for the EventTime property of the Event Grid - Event. - :paramtype event_time: ~azure.mgmt.eventgrid.models.JsonField - :keyword event_type: The mapping information for the EventType property of the Event Grid - Event. - :paramtype event_type: ~azure.mgmt.eventgrid.models.JsonFieldWithDefault - :keyword subject: The mapping information for the Subject property of the Event Grid Event. - :paramtype subject: ~azure.mgmt.eventgrid.models.JsonFieldWithDefault - :keyword data_version: The mapping information for the DataVersion property of the Event Grid - Event. - :paramtype data_version: ~azure.mgmt.eventgrid.models.JsonFieldWithDefault - """ - super(JsonInputSchemaMapping, self).__init__(**kwargs) - self.input_schema_mapping_type = 'Json' # type: str - self.id = kwargs.get('id', None) - self.topic = kwargs.get('topic', None) - self.event_time = kwargs.get('event_time', None) - self.event_type = kwargs.get('event_type', None) - self.subject = kwargs.get('subject', None) - self.data_version = kwargs.get('data_version', None) - - -class NumberGreaterThanAdvancedFilter(AdvancedFilter): - """NumberGreaterThan Advanced Filter. - - All required parameters must be populated in order to send to Azure. - - :ivar operator_type: Required. The operator type used for filtering, e.g., NumberIn, - StringContains, BoolEquals and others.Constant filled by server. Possible values include: - "NumberIn", "NumberNotIn", "NumberLessThan", "NumberGreaterThan", "NumberLessThanOrEquals", - "NumberGreaterThanOrEquals", "BoolEquals", "StringIn", "StringNotIn", "StringBeginsWith", - "StringEndsWith", "StringContains", "NumberInRange", "NumberNotInRange", "StringNotBeginsWith", - "StringNotEndsWith", "StringNotContains", "IsNullOrUndefined", "IsNotNull". - :vartype operator_type: str or ~azure.mgmt.eventgrid.models.AdvancedFilterOperatorType - :ivar key: The field/property in the event based on which you want to filter. - :vartype key: str - :ivar value: The filter value. - :vartype value: float - """ - - _validation = { - 'operator_type': {'required': True}, - } - - _attribute_map = { - 'operator_type': {'key': 'operatorType', 'type': 'str'}, - 'key': {'key': 'key', 'type': 'str'}, - 'value': {'key': 'value', 'type': 'float'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword key: The field/property in the event based on which you want to filter. - :paramtype key: str - :keyword value: The filter value. - :paramtype value: float - """ - super(NumberGreaterThanAdvancedFilter, self).__init__(**kwargs) - self.operator_type = 'NumberGreaterThan' # type: str - self.value = kwargs.get('value', None) - - -class NumberGreaterThanOrEqualsAdvancedFilter(AdvancedFilter): - """NumberGreaterThanOrEquals Advanced Filter. - - All required parameters must be populated in order to send to Azure. - - :ivar operator_type: Required. The operator type used for filtering, e.g., NumberIn, - StringContains, BoolEquals and others.Constant filled by server. Possible values include: - "NumberIn", "NumberNotIn", "NumberLessThan", "NumberGreaterThan", "NumberLessThanOrEquals", - "NumberGreaterThanOrEquals", "BoolEquals", "StringIn", "StringNotIn", "StringBeginsWith", - "StringEndsWith", "StringContains", "NumberInRange", "NumberNotInRange", "StringNotBeginsWith", - "StringNotEndsWith", "StringNotContains", "IsNullOrUndefined", "IsNotNull". - :vartype operator_type: str or ~azure.mgmt.eventgrid.models.AdvancedFilterOperatorType - :ivar key: The field/property in the event based on which you want to filter. - :vartype key: str - :ivar value: The filter value. - :vartype value: float - """ - - _validation = { - 'operator_type': {'required': True}, - } - - _attribute_map = { - 'operator_type': {'key': 'operatorType', 'type': 'str'}, - 'key': {'key': 'key', 'type': 'str'}, - 'value': {'key': 'value', 'type': 'float'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword key: The field/property in the event based on which you want to filter. - :paramtype key: str - :keyword value: The filter value. - :paramtype value: float - """ - super(NumberGreaterThanOrEqualsAdvancedFilter, self).__init__(**kwargs) - self.operator_type = 'NumberGreaterThanOrEquals' # type: str - self.value = kwargs.get('value', None) - - -class NumberInAdvancedFilter(AdvancedFilter): - """NumberIn Advanced Filter. - - All required parameters must be populated in order to send to Azure. - - :ivar operator_type: Required. The operator type used for filtering, e.g., NumberIn, - StringContains, BoolEquals and others.Constant filled by server. Possible values include: - "NumberIn", "NumberNotIn", "NumberLessThan", "NumberGreaterThan", "NumberLessThanOrEquals", - "NumberGreaterThanOrEquals", "BoolEquals", "StringIn", "StringNotIn", "StringBeginsWith", - "StringEndsWith", "StringContains", "NumberInRange", "NumberNotInRange", "StringNotBeginsWith", - "StringNotEndsWith", "StringNotContains", "IsNullOrUndefined", "IsNotNull". - :vartype operator_type: str or ~azure.mgmt.eventgrid.models.AdvancedFilterOperatorType - :ivar key: The field/property in the event based on which you want to filter. - :vartype key: str - :ivar values: The set of filter values. - :vartype values: list[float] - """ - - _validation = { - 'operator_type': {'required': True}, - } - - _attribute_map = { - 'operator_type': {'key': 'operatorType', 'type': 'str'}, - 'key': {'key': 'key', 'type': 'str'}, - 'values': {'key': 'values', 'type': '[float]'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword key: The field/property in the event based on which you want to filter. - :paramtype key: str - :keyword values: The set of filter values. - :paramtype values: list[float] - """ - super(NumberInAdvancedFilter, self).__init__(**kwargs) - self.operator_type = 'NumberIn' # type: str - self.values = kwargs.get('values', None) - - -class NumberInRangeAdvancedFilter(AdvancedFilter): - """NumberInRange Advanced Filter. - - All required parameters must be populated in order to send to Azure. - - :ivar operator_type: Required. The operator type used for filtering, e.g., NumberIn, - StringContains, BoolEquals and others.Constant filled by server. Possible values include: - "NumberIn", "NumberNotIn", "NumberLessThan", "NumberGreaterThan", "NumberLessThanOrEquals", - "NumberGreaterThanOrEquals", "BoolEquals", "StringIn", "StringNotIn", "StringBeginsWith", - "StringEndsWith", "StringContains", "NumberInRange", "NumberNotInRange", "StringNotBeginsWith", - "StringNotEndsWith", "StringNotContains", "IsNullOrUndefined", "IsNotNull". - :vartype operator_type: str or ~azure.mgmt.eventgrid.models.AdvancedFilterOperatorType - :ivar key: The field/property in the event based on which you want to filter. - :vartype key: str - :ivar values: The set of filter values. - :vartype values: list[list[float]] - """ - - _validation = { - 'operator_type': {'required': True}, - } - - _attribute_map = { - 'operator_type': {'key': 'operatorType', 'type': 'str'}, - 'key': {'key': 'key', 'type': 'str'}, - 'values': {'key': 'values', 'type': '[[float]]'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword key: The field/property in the event based on which you want to filter. - :paramtype key: str - :keyword values: The set of filter values. - :paramtype values: list[list[float]] - """ - super(NumberInRangeAdvancedFilter, self).__init__(**kwargs) - self.operator_type = 'NumberInRange' # type: str - self.values = kwargs.get('values', None) - - -class NumberLessThanAdvancedFilter(AdvancedFilter): - """NumberLessThan Advanced Filter. - - All required parameters must be populated in order to send to Azure. - - :ivar operator_type: Required. The operator type used for filtering, e.g., NumberIn, - StringContains, BoolEquals and others.Constant filled by server. Possible values include: - "NumberIn", "NumberNotIn", "NumberLessThan", "NumberGreaterThan", "NumberLessThanOrEquals", - "NumberGreaterThanOrEquals", "BoolEquals", "StringIn", "StringNotIn", "StringBeginsWith", - "StringEndsWith", "StringContains", "NumberInRange", "NumberNotInRange", "StringNotBeginsWith", - "StringNotEndsWith", "StringNotContains", "IsNullOrUndefined", "IsNotNull". - :vartype operator_type: str or ~azure.mgmt.eventgrid.models.AdvancedFilterOperatorType - :ivar key: The field/property in the event based on which you want to filter. - :vartype key: str - :ivar value: The filter value. - :vartype value: float - """ - - _validation = { - 'operator_type': {'required': True}, - } - - _attribute_map = { - 'operator_type': {'key': 'operatorType', 'type': 'str'}, - 'key': {'key': 'key', 'type': 'str'}, - 'value': {'key': 'value', 'type': 'float'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword key: The field/property in the event based on which you want to filter. - :paramtype key: str - :keyword value: The filter value. - :paramtype value: float - """ - super(NumberLessThanAdvancedFilter, self).__init__(**kwargs) - self.operator_type = 'NumberLessThan' # type: str - self.value = kwargs.get('value', None) - - -class NumberLessThanOrEqualsAdvancedFilter(AdvancedFilter): - """NumberLessThanOrEquals Advanced Filter. - - All required parameters must be populated in order to send to Azure. - - :ivar operator_type: Required. The operator type used for filtering, e.g., NumberIn, - StringContains, BoolEquals and others.Constant filled by server. Possible values include: - "NumberIn", "NumberNotIn", "NumberLessThan", "NumberGreaterThan", "NumberLessThanOrEquals", - "NumberGreaterThanOrEquals", "BoolEquals", "StringIn", "StringNotIn", "StringBeginsWith", - "StringEndsWith", "StringContains", "NumberInRange", "NumberNotInRange", "StringNotBeginsWith", - "StringNotEndsWith", "StringNotContains", "IsNullOrUndefined", "IsNotNull". - :vartype operator_type: str or ~azure.mgmt.eventgrid.models.AdvancedFilterOperatorType - :ivar key: The field/property in the event based on which you want to filter. - :vartype key: str - :ivar value: The filter value. - :vartype value: float - """ - - _validation = { - 'operator_type': {'required': True}, - } - - _attribute_map = { - 'operator_type': {'key': 'operatorType', 'type': 'str'}, - 'key': {'key': 'key', 'type': 'str'}, - 'value': {'key': 'value', 'type': 'float'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword key: The field/property in the event based on which you want to filter. - :paramtype key: str - :keyword value: The filter value. - :paramtype value: float - """ - super(NumberLessThanOrEqualsAdvancedFilter, self).__init__(**kwargs) - self.operator_type = 'NumberLessThanOrEquals' # type: str - self.value = kwargs.get('value', None) - - -class NumberNotInAdvancedFilter(AdvancedFilter): - """NumberNotIn Advanced Filter. - - All required parameters must be populated in order to send to Azure. - - :ivar operator_type: Required. The operator type used for filtering, e.g., NumberIn, - StringContains, BoolEquals and others.Constant filled by server. Possible values include: - "NumberIn", "NumberNotIn", "NumberLessThan", "NumberGreaterThan", "NumberLessThanOrEquals", - "NumberGreaterThanOrEquals", "BoolEquals", "StringIn", "StringNotIn", "StringBeginsWith", - "StringEndsWith", "StringContains", "NumberInRange", "NumberNotInRange", "StringNotBeginsWith", - "StringNotEndsWith", "StringNotContains", "IsNullOrUndefined", "IsNotNull". - :vartype operator_type: str or ~azure.mgmt.eventgrid.models.AdvancedFilterOperatorType - :ivar key: The field/property in the event based on which you want to filter. - :vartype key: str - :ivar values: The set of filter values. - :vartype values: list[float] - """ - - _validation = { - 'operator_type': {'required': True}, - } - - _attribute_map = { - 'operator_type': {'key': 'operatorType', 'type': 'str'}, - 'key': {'key': 'key', 'type': 'str'}, - 'values': {'key': 'values', 'type': '[float]'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword key: The field/property in the event based on which you want to filter. - :paramtype key: str - :keyword values: The set of filter values. - :paramtype values: list[float] - """ - super(NumberNotInAdvancedFilter, self).__init__(**kwargs) - self.operator_type = 'NumberNotIn' # type: str - self.values = kwargs.get('values', None) - - -class NumberNotInRangeAdvancedFilter(AdvancedFilter): - """NumberNotInRange Advanced Filter. - - All required parameters must be populated in order to send to Azure. - - :ivar operator_type: Required. The operator type used for filtering, e.g., NumberIn, - StringContains, BoolEquals and others.Constant filled by server. Possible values include: - "NumberIn", "NumberNotIn", "NumberLessThan", "NumberGreaterThan", "NumberLessThanOrEquals", - "NumberGreaterThanOrEquals", "BoolEquals", "StringIn", "StringNotIn", "StringBeginsWith", - "StringEndsWith", "StringContains", "NumberInRange", "NumberNotInRange", "StringNotBeginsWith", - "StringNotEndsWith", "StringNotContains", "IsNullOrUndefined", "IsNotNull". - :vartype operator_type: str or ~azure.mgmt.eventgrid.models.AdvancedFilterOperatorType - :ivar key: The field/property in the event based on which you want to filter. - :vartype key: str - :ivar values: The set of filter values. - :vartype values: list[list[float]] - """ - - _validation = { - 'operator_type': {'required': True}, - } - - _attribute_map = { - 'operator_type': {'key': 'operatorType', 'type': 'str'}, - 'key': {'key': 'key', 'type': 'str'}, - 'values': {'key': 'values', 'type': '[[float]]'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword key: The field/property in the event based on which you want to filter. - :paramtype key: str - :keyword values: The set of filter values. - :paramtype values: list[list[float]] - """ - super(NumberNotInRangeAdvancedFilter, self).__init__(**kwargs) - self.operator_type = 'NumberNotInRange' # type: str - self.values = kwargs.get('values', None) - - -class Operation(msrest.serialization.Model): - """Represents an operation returned by the GetOperations request. - - :ivar name: Name of the operation. - :vartype name: str - :ivar display: Display name of the operation. - :vartype display: ~azure.mgmt.eventgrid.models.OperationInfo - :ivar origin: Origin of the operation. - :vartype origin: str - :ivar properties: Properties of the operation. - :vartype properties: any - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'display': {'key': 'display', 'type': 'OperationInfo'}, - 'origin': {'key': 'origin', 'type': 'str'}, - 'properties': {'key': 'properties', 'type': 'object'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword name: Name of the operation. - :paramtype name: str - :keyword display: Display name of the operation. - :paramtype display: ~azure.mgmt.eventgrid.models.OperationInfo - :keyword origin: Origin of the operation. - :paramtype origin: str - :keyword properties: Properties of the operation. - :paramtype properties: any - """ - super(Operation, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.display = kwargs.get('display', None) - self.origin = kwargs.get('origin', None) - self.properties = kwargs.get('properties', None) - - -class OperationInfo(msrest.serialization.Model): - """Information about an operation. - - :ivar provider: Name of the provider. - :vartype provider: str - :ivar resource: Name of the resource type. - :vartype resource: str - :ivar operation: Name of the operation. - :vartype operation: str - :ivar description: Description of the operation. - :vartype description: str - """ - - _attribute_map = { - 'provider': {'key': 'provider', 'type': 'str'}, - 'resource': {'key': 'resource', 'type': 'str'}, - 'operation': {'key': 'operation', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword provider: Name of the provider. - :paramtype provider: str - :keyword resource: Name of the resource type. - :paramtype resource: str - :keyword operation: Name of the operation. - :paramtype operation: str - :keyword description: Description of the operation. - :paramtype description: str - """ - super(OperationInfo, self).__init__(**kwargs) - self.provider = kwargs.get('provider', None) - self.resource = kwargs.get('resource', None) - self.operation = kwargs.get('operation', None) - self.description = kwargs.get('description', None) - - -class OperationsListResult(msrest.serialization.Model): - """Result of the List Operations operation. - - :ivar value: A collection of operations. - :vartype value: list[~azure.mgmt.eventgrid.models.Operation] - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[Operation]'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword value: A collection of operations. - :paramtype value: list[~azure.mgmt.eventgrid.models.Operation] - """ - super(OperationsListResult, self).__init__(**kwargs) - self.value = kwargs.get('value', None) - - -class PrivateEndpoint(msrest.serialization.Model): - """PrivateEndpoint information. - - :ivar id: The ARM identifier for Private Endpoint. - :vartype id: str - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword id: The ARM identifier for Private Endpoint. - :paramtype id: str - """ - super(PrivateEndpoint, self).__init__(**kwargs) - self.id = kwargs.get('id', None) - - -class PrivateEndpointConnection(Resource): - """PrivateEndpointConnection. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar id: Fully qualified identifier of the resource. - :vartype id: str - :ivar name: Name of the resource. - :vartype name: str - :ivar type: Type of the resource. - :vartype type: str - :ivar private_endpoint: The Private Endpoint resource for this Connection. - :vartype private_endpoint: ~azure.mgmt.eventgrid.models.PrivateEndpoint - :ivar group_ids: GroupIds from the private link service resource. - :vartype group_ids: list[str] - :ivar private_link_service_connection_state: Details about the state of the connection. - :vartype private_link_service_connection_state: ~azure.mgmt.eventgrid.models.ConnectionState - :ivar provisioning_state: Provisioning state of the Private Endpoint Connection. Possible - values include: "Creating", "Updating", "Deleting", "Succeeded", "Canceled", "Failed". - :vartype provisioning_state: str or ~azure.mgmt.eventgrid.models.ResourceProvisioningState - """ - - _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'}, - 'private_endpoint': {'key': 'properties.privateEndpoint', 'type': 'PrivateEndpoint'}, - 'group_ids': {'key': 'properties.groupIds', 'type': '[str]'}, - 'private_link_service_connection_state': {'key': 'properties.privateLinkServiceConnectionState', 'type': 'ConnectionState'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword private_endpoint: The Private Endpoint resource for this Connection. - :paramtype private_endpoint: ~azure.mgmt.eventgrid.models.PrivateEndpoint - :keyword group_ids: GroupIds from the private link service resource. - :paramtype group_ids: list[str] - :keyword private_link_service_connection_state: Details about the state of the connection. - :paramtype private_link_service_connection_state: ~azure.mgmt.eventgrid.models.ConnectionState - :keyword provisioning_state: Provisioning state of the Private Endpoint Connection. Possible - values include: "Creating", "Updating", "Deleting", "Succeeded", "Canceled", "Failed". - :paramtype provisioning_state: str or ~azure.mgmt.eventgrid.models.ResourceProvisioningState - """ - super(PrivateEndpointConnection, self).__init__(**kwargs) - self.private_endpoint = kwargs.get('private_endpoint', None) - self.group_ids = kwargs.get('group_ids', None) - self.private_link_service_connection_state = kwargs.get('private_link_service_connection_state', None) - self.provisioning_state = kwargs.get('provisioning_state', None) - - -class PrivateEndpointConnectionListResult(msrest.serialization.Model): - """Result of the list of all private endpoint connections operation. - - :ivar value: A collection of private endpoint connection resources. - :vartype value: list[~azure.mgmt.eventgrid.models.PrivateEndpointConnection] - :ivar next_link: A link for the next page of private endpoint connection resources. - :vartype next_link: str - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[PrivateEndpointConnection]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword value: A collection of private endpoint connection resources. - :paramtype value: list[~azure.mgmt.eventgrid.models.PrivateEndpointConnection] - :keyword next_link: A link for the next page of private endpoint connection resources. - :paramtype next_link: str - """ - super(PrivateEndpointConnectionListResult, self).__init__(**kwargs) - self.value = kwargs.get('value', None) - self.next_link = kwargs.get('next_link', None) - - -class PrivateLinkResource(msrest.serialization.Model): - """Information of the private link resource. - - :ivar id: Fully qualified identifier of the resource. - :vartype id: str - :ivar name: Name of the resource. - :vartype name: str - :ivar type: Type of the resource. - :vartype type: str - :ivar group_id: - :vartype group_id: str - :ivar display_name: - :vartype display_name: str - :ivar required_members: - :vartype required_members: list[str] - :ivar required_zone_names: - :vartype required_zone_names: list[str] - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'group_id': {'key': 'properties.groupId', 'type': 'str'}, - 'display_name': {'key': 'properties.displayName', 'type': 'str'}, - 'required_members': {'key': 'properties.requiredMembers', 'type': '[str]'}, - 'required_zone_names': {'key': 'properties.requiredZoneNames', 'type': '[str]'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword id: Fully qualified identifier of the resource. - :paramtype id: str - :keyword name: Name of the resource. - :paramtype name: str - :keyword type: Type of the resource. - :paramtype type: str - :keyword group_id: - :paramtype group_id: str - :keyword display_name: - :paramtype display_name: str - :keyword required_members: - :paramtype required_members: list[str] - :keyword required_zone_names: - :paramtype required_zone_names: list[str] - """ - super(PrivateLinkResource, self).__init__(**kwargs) - self.id = kwargs.get('id', None) - self.name = kwargs.get('name', None) - self.type = kwargs.get('type', None) - self.group_id = kwargs.get('group_id', None) - self.display_name = kwargs.get('display_name', None) - self.required_members = kwargs.get('required_members', None) - self.required_zone_names = kwargs.get('required_zone_names', None) - - -class PrivateLinkResourcesListResult(msrest.serialization.Model): - """Result of the List private link resources operation. - - :ivar value: A collection of private link resources. - :vartype value: list[~azure.mgmt.eventgrid.models.PrivateLinkResource] - :ivar next_link: A link for the next page of private link resources. - :vartype next_link: str - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[PrivateLinkResource]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword value: A collection of private link resources. - :paramtype value: list[~azure.mgmt.eventgrid.models.PrivateLinkResource] - :keyword next_link: A link for the next page of private link resources. - :paramtype next_link: str - """ - super(PrivateLinkResourcesListResult, self).__init__(**kwargs) - self.value = kwargs.get('value', None) - self.next_link = kwargs.get('next_link', None) - - -class RetryPolicy(msrest.serialization.Model): - """Information about the retry policy for an event subscription. - - :ivar max_delivery_attempts: Maximum number of delivery retry attempts for events. - :vartype max_delivery_attempts: int - :ivar event_time_to_live_in_minutes: Time To Live (in minutes) for events. - :vartype event_time_to_live_in_minutes: int - """ - - _attribute_map = { - 'max_delivery_attempts': {'key': 'maxDeliveryAttempts', 'type': 'int'}, - 'event_time_to_live_in_minutes': {'key': 'eventTimeToLiveInMinutes', 'type': 'int'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword max_delivery_attempts: Maximum number of delivery retry attempts for events. - :paramtype max_delivery_attempts: int - :keyword event_time_to_live_in_minutes: Time To Live (in minutes) for events. - :paramtype event_time_to_live_in_minutes: int - """ - super(RetryPolicy, self).__init__(**kwargs) - self.max_delivery_attempts = kwargs.get('max_delivery_attempts', 30) - self.event_time_to_live_in_minutes = kwargs.get('event_time_to_live_in_minutes', 1440) - - -class ServiceBusQueueEventSubscriptionDestination(EventSubscriptionDestination): - """Information about the service bus destination for an event subscription. - - All required parameters must be populated in order to send to Azure. - - :ivar endpoint_type: Required. Type of the endpoint for the event subscription - destination.Constant filled by server. Possible values include: "WebHook", "EventHub", - "StorageQueue", "HybridConnection", "ServiceBusQueue", "ServiceBusTopic", "AzureFunction". - :vartype endpoint_type: str or ~azure.mgmt.eventgrid.models.EndpointType - :ivar resource_id: The Azure Resource Id that represents the endpoint of the Service Bus - destination of an event subscription. - :vartype resource_id: str - :ivar delivery_attribute_mappings: Delivery attribute details. - :vartype delivery_attribute_mappings: - list[~azure.mgmt.eventgrid.models.DeliveryAttributeMapping] - """ - - _validation = { - 'endpoint_type': {'required': True}, - } - - _attribute_map = { - 'endpoint_type': {'key': 'endpointType', 'type': 'str'}, - 'resource_id': {'key': 'properties.resourceId', 'type': 'str'}, - 'delivery_attribute_mappings': {'key': 'properties.deliveryAttributeMappings', 'type': '[DeliveryAttributeMapping]'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword resource_id: The Azure Resource Id that represents the endpoint of the Service Bus - destination of an event subscription. - :paramtype resource_id: str - :keyword delivery_attribute_mappings: Delivery attribute details. - :paramtype delivery_attribute_mappings: - list[~azure.mgmt.eventgrid.models.DeliveryAttributeMapping] - """ - super(ServiceBusQueueEventSubscriptionDestination, self).__init__(**kwargs) - self.endpoint_type = 'ServiceBusQueue' # type: str - self.resource_id = kwargs.get('resource_id', None) - self.delivery_attribute_mappings = kwargs.get('delivery_attribute_mappings', None) - - -class ServiceBusTopicEventSubscriptionDestination(EventSubscriptionDestination): - """Information about the service bus topic destination for an event subscription. - - All required parameters must be populated in order to send to Azure. - - :ivar endpoint_type: Required. Type of the endpoint for the event subscription - destination.Constant filled by server. Possible values include: "WebHook", "EventHub", - "StorageQueue", "HybridConnection", "ServiceBusQueue", "ServiceBusTopic", "AzureFunction". - :vartype endpoint_type: str or ~azure.mgmt.eventgrid.models.EndpointType - :ivar resource_id: The Azure Resource Id that represents the endpoint of the Service Bus Topic - destination of an event subscription. - :vartype resource_id: str - :ivar delivery_attribute_mappings: Delivery attribute details. - :vartype delivery_attribute_mappings: - list[~azure.mgmt.eventgrid.models.DeliveryAttributeMapping] - """ - - _validation = { - 'endpoint_type': {'required': True}, - } - - _attribute_map = { - 'endpoint_type': {'key': 'endpointType', 'type': 'str'}, - 'resource_id': {'key': 'properties.resourceId', 'type': 'str'}, - 'delivery_attribute_mappings': {'key': 'properties.deliveryAttributeMappings', 'type': '[DeliveryAttributeMapping]'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword resource_id: The Azure Resource Id that represents the endpoint of the Service Bus - Topic destination of an event subscription. - :paramtype resource_id: str - :keyword delivery_attribute_mappings: Delivery attribute details. - :paramtype delivery_attribute_mappings: - list[~azure.mgmt.eventgrid.models.DeliveryAttributeMapping] - """ - super(ServiceBusTopicEventSubscriptionDestination, self).__init__(**kwargs) - self.endpoint_type = 'ServiceBusTopic' # type: str - self.resource_id = kwargs.get('resource_id', None) - self.delivery_attribute_mappings = kwargs.get('delivery_attribute_mappings', None) - - -class StaticDeliveryAttributeMapping(DeliveryAttributeMapping): - """Static delivery attribute mapping details. - - All required parameters must be populated in order to send to Azure. - - :ivar name: Name of the delivery attribute or header. - :vartype name: str - :ivar type: Required. Type of the delivery attribute or header name.Constant filled by server. - Possible values include: "Static", "Dynamic". - :vartype type: str or ~azure.mgmt.eventgrid.models.DeliveryAttributeMappingType - :ivar value: Value of the delivery attribute. - :vartype value: str - :ivar is_secret: Boolean flag to tell if the attribute contains sensitive information . - :vartype is_secret: bool - """ - - _validation = { - 'type': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'value': {'key': 'properties.value', 'type': 'str'}, - 'is_secret': {'key': 'properties.isSecret', 'type': 'bool'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword name: Name of the delivery attribute or header. - :paramtype name: str - :keyword value: Value of the delivery attribute. - :paramtype value: str - :keyword is_secret: Boolean flag to tell if the attribute contains sensitive information . - :paramtype is_secret: bool - """ - super(StaticDeliveryAttributeMapping, self).__init__(**kwargs) - self.type = 'Static' # type: str - self.value = kwargs.get('value', None) - self.is_secret = kwargs.get('is_secret', False) - - -class StorageBlobDeadLetterDestination(DeadLetterDestination): - """Information about the storage blob based dead letter destination. - - All required parameters must be populated in order to send to Azure. - - :ivar endpoint_type: Required. Type of the endpoint for the dead letter destination.Constant - filled by server. Possible values include: "StorageBlob". - :vartype endpoint_type: str or ~azure.mgmt.eventgrid.models.DeadLetterEndPointType - :ivar resource_id: The Azure Resource ID of the storage account that is the destination of the - deadletter events. - :vartype resource_id: str - :ivar blob_container_name: The name of the Storage blob container that is the destination of - the deadletter events. - :vartype blob_container_name: str - """ - - _validation = { - 'endpoint_type': {'required': True}, - } - - _attribute_map = { - 'endpoint_type': {'key': 'endpointType', 'type': 'str'}, - 'resource_id': {'key': 'properties.resourceId', 'type': 'str'}, - 'blob_container_name': {'key': 'properties.blobContainerName', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword resource_id: The Azure Resource ID of the storage account that is the destination of - the deadletter events. - :paramtype resource_id: str - :keyword blob_container_name: The name of the Storage blob container that is the destination of - the deadletter events. - :paramtype blob_container_name: str - """ - super(StorageBlobDeadLetterDestination, self).__init__(**kwargs) - self.endpoint_type = 'StorageBlob' # type: str - self.resource_id = kwargs.get('resource_id', None) - self.blob_container_name = kwargs.get('blob_container_name', None) - - -class StorageQueueEventSubscriptionDestination(EventSubscriptionDestination): - """Information about the storage queue destination for an event subscription. - - All required parameters must be populated in order to send to Azure. - - :ivar endpoint_type: Required. Type of the endpoint for the event subscription - destination.Constant filled by server. Possible values include: "WebHook", "EventHub", - "StorageQueue", "HybridConnection", "ServiceBusQueue", "ServiceBusTopic", "AzureFunction". - :vartype endpoint_type: str or ~azure.mgmt.eventgrid.models.EndpointType - :ivar resource_id: The Azure Resource ID of the storage account that contains the queue that is - the destination of an event subscription. - :vartype resource_id: str - :ivar queue_name: The name of the Storage queue under a storage account that is the destination - of an event subscription. - :vartype queue_name: str - :ivar queue_message_time_to_live_in_seconds: Storage queue message time to live in seconds. - :vartype queue_message_time_to_live_in_seconds: long - """ - - _validation = { - 'endpoint_type': {'required': True}, - } - - _attribute_map = { - 'endpoint_type': {'key': 'endpointType', 'type': 'str'}, - 'resource_id': {'key': 'properties.resourceId', 'type': 'str'}, - 'queue_name': {'key': 'properties.queueName', 'type': 'str'}, - 'queue_message_time_to_live_in_seconds': {'key': 'properties.queueMessageTimeToLiveInSeconds', 'type': 'long'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword resource_id: The Azure Resource ID of the storage account that contains the queue that - is the destination of an event subscription. - :paramtype resource_id: str - :keyword queue_name: The name of the Storage queue under a storage account that is the - destination of an event subscription. - :paramtype queue_name: str - :keyword queue_message_time_to_live_in_seconds: Storage queue message time to live in seconds. - :paramtype queue_message_time_to_live_in_seconds: long - """ - super(StorageQueueEventSubscriptionDestination, self).__init__(**kwargs) - self.endpoint_type = 'StorageQueue' # type: str - self.resource_id = kwargs.get('resource_id', None) - self.queue_name = kwargs.get('queue_name', None) - self.queue_message_time_to_live_in_seconds = kwargs.get('queue_message_time_to_live_in_seconds', None) - - -class StringBeginsWithAdvancedFilter(AdvancedFilter): - """StringBeginsWith Advanced Filter. - - All required parameters must be populated in order to send to Azure. - - :ivar operator_type: Required. The operator type used for filtering, e.g., NumberIn, - StringContains, BoolEquals and others.Constant filled by server. Possible values include: - "NumberIn", "NumberNotIn", "NumberLessThan", "NumberGreaterThan", "NumberLessThanOrEquals", - "NumberGreaterThanOrEquals", "BoolEquals", "StringIn", "StringNotIn", "StringBeginsWith", - "StringEndsWith", "StringContains", "NumberInRange", "NumberNotInRange", "StringNotBeginsWith", - "StringNotEndsWith", "StringNotContains", "IsNullOrUndefined", "IsNotNull". - :vartype operator_type: str or ~azure.mgmt.eventgrid.models.AdvancedFilterOperatorType - :ivar key: The field/property in the event based on which you want to filter. - :vartype key: str - :ivar values: The set of filter values. - :vartype values: list[str] - """ - - _validation = { - 'operator_type': {'required': True}, - } - - _attribute_map = { - 'operator_type': {'key': 'operatorType', 'type': 'str'}, - 'key': {'key': 'key', 'type': 'str'}, - 'values': {'key': 'values', 'type': '[str]'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword key: The field/property in the event based on which you want to filter. - :paramtype key: str - :keyword values: The set of filter values. - :paramtype values: list[str] - """ - super(StringBeginsWithAdvancedFilter, self).__init__(**kwargs) - self.operator_type = 'StringBeginsWith' # type: str - self.values = kwargs.get('values', None) - - -class StringContainsAdvancedFilter(AdvancedFilter): - """StringContains Advanced Filter. - - All required parameters must be populated in order to send to Azure. - - :ivar operator_type: Required. The operator type used for filtering, e.g., NumberIn, - StringContains, BoolEquals and others.Constant filled by server. Possible values include: - "NumberIn", "NumberNotIn", "NumberLessThan", "NumberGreaterThan", "NumberLessThanOrEquals", - "NumberGreaterThanOrEquals", "BoolEquals", "StringIn", "StringNotIn", "StringBeginsWith", - "StringEndsWith", "StringContains", "NumberInRange", "NumberNotInRange", "StringNotBeginsWith", - "StringNotEndsWith", "StringNotContains", "IsNullOrUndefined", "IsNotNull". - :vartype operator_type: str or ~azure.mgmt.eventgrid.models.AdvancedFilterOperatorType - :ivar key: The field/property in the event based on which you want to filter. - :vartype key: str - :ivar values: The set of filter values. - :vartype values: list[str] - """ - - _validation = { - 'operator_type': {'required': True}, - } - - _attribute_map = { - 'operator_type': {'key': 'operatorType', 'type': 'str'}, - 'key': {'key': 'key', 'type': 'str'}, - 'values': {'key': 'values', 'type': '[str]'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword key: The field/property in the event based on which you want to filter. - :paramtype key: str - :keyword values: The set of filter values. - :paramtype values: list[str] - """ - super(StringContainsAdvancedFilter, self).__init__(**kwargs) - self.operator_type = 'StringContains' # type: str - self.values = kwargs.get('values', None) - - -class StringEndsWithAdvancedFilter(AdvancedFilter): - """StringEndsWith Advanced Filter. - - All required parameters must be populated in order to send to Azure. - - :ivar operator_type: Required. The operator type used for filtering, e.g., NumberIn, - StringContains, BoolEquals and others.Constant filled by server. Possible values include: - "NumberIn", "NumberNotIn", "NumberLessThan", "NumberGreaterThan", "NumberLessThanOrEquals", - "NumberGreaterThanOrEquals", "BoolEquals", "StringIn", "StringNotIn", "StringBeginsWith", - "StringEndsWith", "StringContains", "NumberInRange", "NumberNotInRange", "StringNotBeginsWith", - "StringNotEndsWith", "StringNotContains", "IsNullOrUndefined", "IsNotNull". - :vartype operator_type: str or ~azure.mgmt.eventgrid.models.AdvancedFilterOperatorType - :ivar key: The field/property in the event based on which you want to filter. - :vartype key: str - :ivar values: The set of filter values. - :vartype values: list[str] - """ - - _validation = { - 'operator_type': {'required': True}, - } - - _attribute_map = { - 'operator_type': {'key': 'operatorType', 'type': 'str'}, - 'key': {'key': 'key', 'type': 'str'}, - 'values': {'key': 'values', 'type': '[str]'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword key: The field/property in the event based on which you want to filter. - :paramtype key: str - :keyword values: The set of filter values. - :paramtype values: list[str] - """ - super(StringEndsWithAdvancedFilter, self).__init__(**kwargs) - self.operator_type = 'StringEndsWith' # type: str - self.values = kwargs.get('values', None) - - -class StringInAdvancedFilter(AdvancedFilter): - """StringIn Advanced Filter. - - All required parameters must be populated in order to send to Azure. - - :ivar operator_type: Required. The operator type used for filtering, e.g., NumberIn, - StringContains, BoolEquals and others.Constant filled by server. Possible values include: - "NumberIn", "NumberNotIn", "NumberLessThan", "NumberGreaterThan", "NumberLessThanOrEquals", - "NumberGreaterThanOrEquals", "BoolEquals", "StringIn", "StringNotIn", "StringBeginsWith", - "StringEndsWith", "StringContains", "NumberInRange", "NumberNotInRange", "StringNotBeginsWith", - "StringNotEndsWith", "StringNotContains", "IsNullOrUndefined", "IsNotNull". - :vartype operator_type: str or ~azure.mgmt.eventgrid.models.AdvancedFilterOperatorType - :ivar key: The field/property in the event based on which you want to filter. - :vartype key: str - :ivar values: The set of filter values. - :vartype values: list[str] - """ - - _validation = { - 'operator_type': {'required': True}, - } - - _attribute_map = { - 'operator_type': {'key': 'operatorType', 'type': 'str'}, - 'key': {'key': 'key', 'type': 'str'}, - 'values': {'key': 'values', 'type': '[str]'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword key: The field/property in the event based on which you want to filter. - :paramtype key: str - :keyword values: The set of filter values. - :paramtype values: list[str] - """ - super(StringInAdvancedFilter, self).__init__(**kwargs) - self.operator_type = 'StringIn' # type: str - self.values = kwargs.get('values', None) - - -class StringNotBeginsWithAdvancedFilter(AdvancedFilter): - """StringNotBeginsWith Advanced Filter. - - All required parameters must be populated in order to send to Azure. - - :ivar operator_type: Required. The operator type used for filtering, e.g., NumberIn, - StringContains, BoolEquals and others.Constant filled by server. Possible values include: - "NumberIn", "NumberNotIn", "NumberLessThan", "NumberGreaterThan", "NumberLessThanOrEquals", - "NumberGreaterThanOrEquals", "BoolEquals", "StringIn", "StringNotIn", "StringBeginsWith", - "StringEndsWith", "StringContains", "NumberInRange", "NumberNotInRange", "StringNotBeginsWith", - "StringNotEndsWith", "StringNotContains", "IsNullOrUndefined", "IsNotNull". - :vartype operator_type: str or ~azure.mgmt.eventgrid.models.AdvancedFilterOperatorType - :ivar key: The field/property in the event based on which you want to filter. - :vartype key: str - :ivar values: The set of filter values. - :vartype values: list[str] - """ - - _validation = { - 'operator_type': {'required': True}, - } - - _attribute_map = { - 'operator_type': {'key': 'operatorType', 'type': 'str'}, - 'key': {'key': 'key', 'type': 'str'}, - 'values': {'key': 'values', 'type': '[str]'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword key: The field/property in the event based on which you want to filter. - :paramtype key: str - :keyword values: The set of filter values. - :paramtype values: list[str] - """ - super(StringNotBeginsWithAdvancedFilter, self).__init__(**kwargs) - self.operator_type = 'StringNotBeginsWith' # type: str - self.values = kwargs.get('values', None) - - -class StringNotContainsAdvancedFilter(AdvancedFilter): - """StringNotContains Advanced Filter. - - All required parameters must be populated in order to send to Azure. - - :ivar operator_type: Required. The operator type used for filtering, e.g., NumberIn, - StringContains, BoolEquals and others.Constant filled by server. Possible values include: - "NumberIn", "NumberNotIn", "NumberLessThan", "NumberGreaterThan", "NumberLessThanOrEquals", - "NumberGreaterThanOrEquals", "BoolEquals", "StringIn", "StringNotIn", "StringBeginsWith", - "StringEndsWith", "StringContains", "NumberInRange", "NumberNotInRange", "StringNotBeginsWith", - "StringNotEndsWith", "StringNotContains", "IsNullOrUndefined", "IsNotNull". - :vartype operator_type: str or ~azure.mgmt.eventgrid.models.AdvancedFilterOperatorType - :ivar key: The field/property in the event based on which you want to filter. - :vartype key: str - :ivar values: The set of filter values. - :vartype values: list[str] - """ - - _validation = { - 'operator_type': {'required': True}, - } - - _attribute_map = { - 'operator_type': {'key': 'operatorType', 'type': 'str'}, - 'key': {'key': 'key', 'type': 'str'}, - 'values': {'key': 'values', 'type': '[str]'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword key: The field/property in the event based on which you want to filter. - :paramtype key: str - :keyword values: The set of filter values. - :paramtype values: list[str] - """ - super(StringNotContainsAdvancedFilter, self).__init__(**kwargs) - self.operator_type = 'StringNotContains' # type: str - self.values = kwargs.get('values', None) - - -class StringNotEndsWithAdvancedFilter(AdvancedFilter): - """StringNotEndsWith Advanced Filter. - - All required parameters must be populated in order to send to Azure. - - :ivar operator_type: Required. The operator type used for filtering, e.g., NumberIn, - StringContains, BoolEquals and others.Constant filled by server. Possible values include: - "NumberIn", "NumberNotIn", "NumberLessThan", "NumberGreaterThan", "NumberLessThanOrEquals", - "NumberGreaterThanOrEquals", "BoolEquals", "StringIn", "StringNotIn", "StringBeginsWith", - "StringEndsWith", "StringContains", "NumberInRange", "NumberNotInRange", "StringNotBeginsWith", - "StringNotEndsWith", "StringNotContains", "IsNullOrUndefined", "IsNotNull". - :vartype operator_type: str or ~azure.mgmt.eventgrid.models.AdvancedFilterOperatorType - :ivar key: The field/property in the event based on which you want to filter. - :vartype key: str - :ivar values: The set of filter values. - :vartype values: list[str] - """ - - _validation = { - 'operator_type': {'required': True}, - } - - _attribute_map = { - 'operator_type': {'key': 'operatorType', 'type': 'str'}, - 'key': {'key': 'key', 'type': 'str'}, - 'values': {'key': 'values', 'type': '[str]'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword key: The field/property in the event based on which you want to filter. - :paramtype key: str - :keyword values: The set of filter values. - :paramtype values: list[str] - """ - super(StringNotEndsWithAdvancedFilter, self).__init__(**kwargs) - self.operator_type = 'StringNotEndsWith' # type: str - self.values = kwargs.get('values', None) - - -class StringNotInAdvancedFilter(AdvancedFilter): - """StringNotIn Advanced Filter. - - All required parameters must be populated in order to send to Azure. - - :ivar operator_type: Required. The operator type used for filtering, e.g., NumberIn, - StringContains, BoolEquals and others.Constant filled by server. Possible values include: - "NumberIn", "NumberNotIn", "NumberLessThan", "NumberGreaterThan", "NumberLessThanOrEquals", - "NumberGreaterThanOrEquals", "BoolEquals", "StringIn", "StringNotIn", "StringBeginsWith", - "StringEndsWith", "StringContains", "NumberInRange", "NumberNotInRange", "StringNotBeginsWith", - "StringNotEndsWith", "StringNotContains", "IsNullOrUndefined", "IsNotNull". - :vartype operator_type: str or ~azure.mgmt.eventgrid.models.AdvancedFilterOperatorType - :ivar key: The field/property in the event based on which you want to filter. - :vartype key: str - :ivar values: The set of filter values. - :vartype values: list[str] - """ - - _validation = { - 'operator_type': {'required': True}, - } - - _attribute_map = { - 'operator_type': {'key': 'operatorType', 'type': 'str'}, - 'key': {'key': 'key', 'type': 'str'}, - 'values': {'key': 'values', 'type': '[str]'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword key: The field/property in the event based on which you want to filter. - :paramtype key: str - :keyword values: The set of filter values. - :paramtype values: list[str] - """ - super(StringNotInAdvancedFilter, self).__init__(**kwargs) - self.operator_type = 'StringNotIn' # type: str - self.values = kwargs.get('values', None) - - -class SystemData(msrest.serialization.Model): - """Metadata pertaining to creation and last modification of the resource. - - :ivar created_by: The identity that created the resource. - :vartype created_by: str - :ivar created_by_type: The type of identity that created the resource. Possible values include: - "User", "Application", "ManagedIdentity", "Key". - :vartype created_by_type: str or ~azure.mgmt.eventgrid.models.CreatedByType - :ivar created_at: The timestamp of resource creation (UTC). - :vartype created_at: ~datetime.datetime - :ivar last_modified_by: The identity that last modified the resource. - :vartype last_modified_by: str - :ivar last_modified_by_type: The type of identity that last modified the resource. Possible - values include: "User", "Application", "ManagedIdentity", "Key". - :vartype last_modified_by_type: str or ~azure.mgmt.eventgrid.models.CreatedByType - :ivar last_modified_at: The timestamp of resource last modification (UTC). - :vartype last_modified_at: ~datetime.datetime - """ - - _attribute_map = { - 'created_by': {'key': 'createdBy', 'type': 'str'}, - 'created_by_type': {'key': 'createdByType', 'type': 'str'}, - 'created_at': {'key': 'createdAt', 'type': 'iso-8601'}, - 'last_modified_by': {'key': 'lastModifiedBy', 'type': 'str'}, - 'last_modified_by_type': {'key': 'lastModifiedByType', 'type': 'str'}, - 'last_modified_at': {'key': 'lastModifiedAt', 'type': 'iso-8601'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword created_by: The identity that created the resource. - :paramtype created_by: str - :keyword created_by_type: The type of identity that created the resource. Possible values - include: "User", "Application", "ManagedIdentity", "Key". - :paramtype created_by_type: str or ~azure.mgmt.eventgrid.models.CreatedByType - :keyword created_at: The timestamp of resource creation (UTC). - :paramtype created_at: ~datetime.datetime - :keyword last_modified_by: The identity that last modified the resource. - :paramtype last_modified_by: str - :keyword last_modified_by_type: The type of identity that last modified the resource. Possible - values include: "User", "Application", "ManagedIdentity", "Key". - :paramtype last_modified_by_type: str or ~azure.mgmt.eventgrid.models.CreatedByType - :keyword last_modified_at: The timestamp of resource last modification (UTC). - :paramtype last_modified_at: ~datetime.datetime - """ - super(SystemData, self).__init__(**kwargs) - self.created_by = kwargs.get('created_by', None) - self.created_by_type = kwargs.get('created_by_type', None) - self.created_at = kwargs.get('created_at', None) - self.last_modified_by = kwargs.get('last_modified_by', None) - self.last_modified_by_type = kwargs.get('last_modified_by_type', None) - self.last_modified_at = kwargs.get('last_modified_at', None) - - -class SystemTopic(TrackedResource): - """EventGrid System Topic. - - 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: Fully qualified identifier of the resource. - :vartype id: str - :ivar name: Name of the resource. - :vartype name: str - :ivar type: Type of the resource. - :vartype type: str - :ivar location: Required. Location of the resource. - :vartype location: str - :ivar tags: A set of tags. Tags of the resource. - :vartype tags: dict[str, str] - :ivar identity: Identity information for the resource. - :vartype identity: ~azure.mgmt.eventgrid.models.IdentityInfo - :ivar system_data: The system metadata relating to System Topic resource. - :vartype system_data: ~azure.mgmt.eventgrid.models.SystemData - :ivar provisioning_state: Provisioning state of the system topic. Possible values include: - "Creating", "Updating", "Deleting", "Succeeded", "Canceled", "Failed". - :vartype provisioning_state: str or ~azure.mgmt.eventgrid.models.ResourceProvisioningState - :ivar source: Source for the system topic. - :vartype source: str - :ivar topic_type: TopicType for the system topic. - :vartype topic_type: str - :ivar metric_resource_id: Metric resource id for the system topic. - :vartype metric_resource_id: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'system_data': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'metric_resource_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}'}, - 'identity': {'key': 'identity', 'type': 'IdentityInfo'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'source': {'key': 'properties.source', 'type': 'str'}, - 'topic_type': {'key': 'properties.topicType', 'type': 'str'}, - 'metric_resource_id': {'key': 'properties.metricResourceId', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword location: Required. Location of the resource. - :paramtype location: str - :keyword tags: A set of tags. Tags of the resource. - :paramtype tags: dict[str, str] - :keyword identity: Identity information for the resource. - :paramtype identity: ~azure.mgmt.eventgrid.models.IdentityInfo - :keyword source: Source for the system topic. - :paramtype source: str - :keyword topic_type: TopicType for the system topic. - :paramtype topic_type: str - """ - super(SystemTopic, self).__init__(**kwargs) - self.identity = kwargs.get('identity', None) - self.system_data = None - self.provisioning_state = None - self.source = kwargs.get('source', None) - self.topic_type = kwargs.get('topic_type', None) - self.metric_resource_id = None - - -class SystemTopicsListResult(msrest.serialization.Model): - """Result of the List System topics operation. - - :ivar value: A collection of system Topics. - :vartype value: list[~azure.mgmt.eventgrid.models.SystemTopic] - :ivar next_link: A link for the next page of topics. - :vartype next_link: str - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[SystemTopic]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword value: A collection of system Topics. - :paramtype value: list[~azure.mgmt.eventgrid.models.SystemTopic] - :keyword next_link: A link for the next page of topics. - :paramtype next_link: str - """ - super(SystemTopicsListResult, self).__init__(**kwargs) - self.value = kwargs.get('value', None) - self.next_link = kwargs.get('next_link', None) - - -class SystemTopicUpdateParameters(msrest.serialization.Model): - """Properties of the System Topic update. - - :ivar tags: A set of tags. Tags of the system topic. - :vartype tags: dict[str, str] - :ivar identity: Resource identity information. - :vartype identity: ~azure.mgmt.eventgrid.models.IdentityInfo - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - 'identity': {'key': 'identity', 'type': 'IdentityInfo'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword tags: A set of tags. Tags of the system topic. - :paramtype tags: dict[str, str] - :keyword identity: Resource identity information. - :paramtype identity: ~azure.mgmt.eventgrid.models.IdentityInfo - """ - super(SystemTopicUpdateParameters, self).__init__(**kwargs) - self.tags = kwargs.get('tags', None) - self.identity = kwargs.get('identity', None) - - -class Topic(TrackedResource): - """EventGrid Topic. - - 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: Fully qualified identifier of the resource. - :vartype id: str - :ivar name: Name of the resource. - :vartype name: str - :ivar type: Type of the resource. - :vartype type: str - :ivar location: Required. Location of the resource. - :vartype location: str - :ivar tags: A set of tags. Tags of the resource. - :vartype tags: dict[str, str] - :ivar identity: Identity information for the resource. - :vartype identity: ~azure.mgmt.eventgrid.models.IdentityInfo - :ivar system_data: The system metadata relating to Topic resource. - :vartype system_data: ~azure.mgmt.eventgrid.models.SystemData - :ivar private_endpoint_connections: - :vartype private_endpoint_connections: - list[~azure.mgmt.eventgrid.models.PrivateEndpointConnection] - :ivar provisioning_state: Provisioning state of the topic. Possible values include: "Creating", - "Updating", "Deleting", "Succeeded", "Canceled", "Failed". - :vartype provisioning_state: str or ~azure.mgmt.eventgrid.models.TopicProvisioningState - :ivar endpoint: Endpoint for the topic. - :vartype endpoint: str - :ivar input_schema: This determines the format that Event Grid should expect for incoming - events published to the topic. Possible values include: "EventGridSchema", "CustomEventSchema", - "CloudEventSchemaV1_0". - :vartype input_schema: str or ~azure.mgmt.eventgrid.models.InputSchema - :ivar input_schema_mapping: This enables publishing using custom event schemas. An - InputSchemaMapping can be specified to map various properties of a source schema to various - required properties of the EventGridEvent schema. - :vartype input_schema_mapping: ~azure.mgmt.eventgrid.models.InputSchemaMapping - :ivar metric_resource_id: Metric resource id for the topic. - :vartype metric_resource_id: str - :ivar public_network_access: This determines if traffic is allowed over public network. By - default it is enabled. - You can further restrict to specific IPs by configuring :code:``. Possible values include: "Enabled", "Disabled". - :vartype public_network_access: str or ~azure.mgmt.eventgrid.models.PublicNetworkAccess - :ivar inbound_ip_rules: This can be used to restrict traffic from specific IPs instead of all - IPs. Note: These are considered only if PublicNetworkAccess is enabled. - :vartype inbound_ip_rules: list[~azure.mgmt.eventgrid.models.InboundIpRule] - :ivar disable_local_auth: This boolean is used to enable or disable local auth. Default value - is false. When the property is set to true, only AAD token will be used to authenticate if user - is allowed to publish to the topic. - :vartype disable_local_auth: bool - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'system_data': {'readonly': True}, - 'private_endpoint_connections': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'endpoint': {'readonly': True}, - 'metric_resource_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}'}, - 'identity': {'key': 'identity', 'type': 'IdentityInfo'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - 'private_endpoint_connections': {'key': 'properties.privateEndpointConnections', 'type': '[PrivateEndpointConnection]'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'endpoint': {'key': 'properties.endpoint', 'type': 'str'}, - 'input_schema': {'key': 'properties.inputSchema', 'type': 'str'}, - 'input_schema_mapping': {'key': 'properties.inputSchemaMapping', 'type': 'InputSchemaMapping'}, - 'metric_resource_id': {'key': 'properties.metricResourceId', 'type': 'str'}, - 'public_network_access': {'key': 'properties.publicNetworkAccess', 'type': 'str'}, - 'inbound_ip_rules': {'key': 'properties.inboundIpRules', 'type': '[InboundIpRule]'}, - 'disable_local_auth': {'key': 'properties.disableLocalAuth', 'type': 'bool'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword location: Required. Location of the resource. - :paramtype location: str - :keyword tags: A set of tags. Tags of the resource. - :paramtype tags: dict[str, str] - :keyword identity: Identity information for the resource. - :paramtype identity: ~azure.mgmt.eventgrid.models.IdentityInfo - :keyword input_schema: This determines the format that Event Grid should expect for incoming - events published to the topic. Possible values include: "EventGridSchema", "CustomEventSchema", - "CloudEventSchemaV1_0". - :paramtype input_schema: str or ~azure.mgmt.eventgrid.models.InputSchema - :keyword input_schema_mapping: This enables publishing using custom event schemas. An - InputSchemaMapping can be specified to map various properties of a source schema to various - required properties of the EventGridEvent schema. - :paramtype input_schema_mapping: ~azure.mgmt.eventgrid.models.InputSchemaMapping - :keyword public_network_access: This determines if traffic is allowed over public network. By - default it is enabled. - You can further restrict to specific IPs by configuring :code:``. Possible values include: "Enabled", "Disabled". - :paramtype public_network_access: str or ~azure.mgmt.eventgrid.models.PublicNetworkAccess - :keyword inbound_ip_rules: This can be used to restrict traffic from specific IPs instead of - all IPs. Note: These are considered only if PublicNetworkAccess is enabled. - :paramtype inbound_ip_rules: list[~azure.mgmt.eventgrid.models.InboundIpRule] - :keyword disable_local_auth: This boolean is used to enable or disable local auth. Default - value is false. When the property is set to true, only AAD token will be used to authenticate - if user is allowed to publish to the topic. - :paramtype disable_local_auth: bool - """ - super(Topic, self).__init__(**kwargs) - self.identity = kwargs.get('identity', None) - self.system_data = None - self.private_endpoint_connections = None - self.provisioning_state = None - self.endpoint = None - self.input_schema = kwargs.get('input_schema', None) - self.input_schema_mapping = kwargs.get('input_schema_mapping', None) - self.metric_resource_id = None - self.public_network_access = kwargs.get('public_network_access', None) - self.inbound_ip_rules = kwargs.get('inbound_ip_rules', None) - self.disable_local_auth = kwargs.get('disable_local_auth', False) - - -class TopicRegenerateKeyRequest(msrest.serialization.Model): - """Topic regenerate share access key request. - - All required parameters must be populated in order to send to Azure. - - :ivar key_name: Required. Key name to regenerate key1 or key2. - :vartype key_name: str - """ - - _validation = { - 'key_name': {'required': True}, - } - - _attribute_map = { - 'key_name': {'key': 'keyName', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword key_name: Required. Key name to regenerate key1 or key2. - :paramtype key_name: str - """ - super(TopicRegenerateKeyRequest, self).__init__(**kwargs) - self.key_name = kwargs['key_name'] - - -class TopicSharedAccessKeys(msrest.serialization.Model): - """Shared access keys of the Topic. - - :ivar key1: Shared access key1 for the topic. - :vartype key1: str - :ivar key2: Shared access key2 for the topic. - :vartype key2: str - """ - - _attribute_map = { - 'key1': {'key': 'key1', 'type': 'str'}, - 'key2': {'key': 'key2', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword key1: Shared access key1 for the topic. - :paramtype key1: str - :keyword key2: Shared access key2 for the topic. - :paramtype key2: str - """ - super(TopicSharedAccessKeys, self).__init__(**kwargs) - self.key1 = kwargs.get('key1', None) - self.key2 = kwargs.get('key2', None) - - -class TopicsListResult(msrest.serialization.Model): - """Result of the List Topics operation. - - :ivar value: A collection of Topics. - :vartype value: list[~azure.mgmt.eventgrid.models.Topic] - :ivar next_link: A link for the next page of topics. - :vartype next_link: str - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[Topic]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword value: A collection of Topics. - :paramtype value: list[~azure.mgmt.eventgrid.models.Topic] - :keyword next_link: A link for the next page of topics. - :paramtype next_link: str - """ - super(TopicsListResult, self).__init__(**kwargs) - self.value = kwargs.get('value', None) - self.next_link = kwargs.get('next_link', None) - - -class TopicTypeInfo(Resource): - """Properties of a topic type info. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar id: Fully qualified identifier of the resource. - :vartype id: str - :ivar name: Name of the resource. - :vartype name: str - :ivar type: Type of the resource. - :vartype type: str - :ivar provider: Namespace of the provider of the topic type. - :vartype provider: str - :ivar display_name: Display Name for the topic type. - :vartype display_name: str - :ivar description: Description of the topic type. - :vartype description: str - :ivar resource_region_type: Region type of the resource. Possible values include: - "RegionalResource", "GlobalResource". - :vartype resource_region_type: str or ~azure.mgmt.eventgrid.models.ResourceRegionType - :ivar provisioning_state: Provisioning state of the topic type. Possible values include: - "Creating", "Updating", "Deleting", "Succeeded", "Canceled", "Failed". - :vartype provisioning_state: str or ~azure.mgmt.eventgrid.models.TopicTypeProvisioningState - :ivar supported_locations: List of locations supported by this topic type. - :vartype supported_locations: list[str] - :ivar source_resource_format: Source resource format. - :vartype source_resource_format: str - :ivar supported_scopes_for_source: Supported source scopes. - :vartype supported_scopes_for_source: list[str or - ~azure.mgmt.eventgrid.models.TopicTypePropertiesSupportedScopesForSourceItem] - """ - - _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'}, - 'provider': {'key': 'properties.provider', 'type': 'str'}, - 'display_name': {'key': 'properties.displayName', 'type': 'str'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'resource_region_type': {'key': 'properties.resourceRegionType', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'supported_locations': {'key': 'properties.supportedLocations', 'type': '[str]'}, - 'source_resource_format': {'key': 'properties.sourceResourceFormat', 'type': 'str'}, - 'supported_scopes_for_source': {'key': 'properties.supportedScopesForSource', 'type': '[str]'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword provider: Namespace of the provider of the topic type. - :paramtype provider: str - :keyword display_name: Display Name for the topic type. - :paramtype display_name: str - :keyword description: Description of the topic type. - :paramtype description: str - :keyword resource_region_type: Region type of the resource. Possible values include: - "RegionalResource", "GlobalResource". - :paramtype resource_region_type: str or ~azure.mgmt.eventgrid.models.ResourceRegionType - :keyword provisioning_state: Provisioning state of the topic type. Possible values include: - "Creating", "Updating", "Deleting", "Succeeded", "Canceled", "Failed". - :paramtype provisioning_state: str or ~azure.mgmt.eventgrid.models.TopicTypeProvisioningState - :keyword supported_locations: List of locations supported by this topic type. - :paramtype supported_locations: list[str] - :keyword source_resource_format: Source resource format. - :paramtype source_resource_format: str - :keyword supported_scopes_for_source: Supported source scopes. - :paramtype supported_scopes_for_source: list[str or - ~azure.mgmt.eventgrid.models.TopicTypePropertiesSupportedScopesForSourceItem] - """ - super(TopicTypeInfo, self).__init__(**kwargs) - self.provider = kwargs.get('provider', None) - self.display_name = kwargs.get('display_name', None) - self.description = kwargs.get('description', None) - self.resource_region_type = kwargs.get('resource_region_type', None) - self.provisioning_state = kwargs.get('provisioning_state', None) - self.supported_locations = kwargs.get('supported_locations', None) - self.source_resource_format = kwargs.get('source_resource_format', None) - self.supported_scopes_for_source = kwargs.get('supported_scopes_for_source', None) - - -class TopicTypesListResult(msrest.serialization.Model): - """Result of the List Topic Types operation. - - :ivar value: A collection of topic types. - :vartype value: list[~azure.mgmt.eventgrid.models.TopicTypeInfo] - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[TopicTypeInfo]'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword value: A collection of topic types. - :paramtype value: list[~azure.mgmt.eventgrid.models.TopicTypeInfo] - """ - super(TopicTypesListResult, self).__init__(**kwargs) - self.value = kwargs.get('value', None) - - -class TopicUpdateParameters(msrest.serialization.Model): - """Properties of the Topic update. - - :ivar tags: A set of tags. Tags of the resource. - :vartype tags: dict[str, str] - :ivar identity: Topic resource identity information. - :vartype identity: ~azure.mgmt.eventgrid.models.IdentityInfo - :ivar public_network_access: This determines if traffic is allowed over public network. By - default it is enabled. - You can further restrict to specific IPs by configuring :code:``. Possible values include: "Enabled", "Disabled". - :vartype public_network_access: str or ~azure.mgmt.eventgrid.models.PublicNetworkAccess - :ivar inbound_ip_rules: This can be used to restrict traffic from specific IPs instead of all - IPs. Note: These are considered only if PublicNetworkAccess is enabled. - :vartype inbound_ip_rules: list[~azure.mgmt.eventgrid.models.InboundIpRule] - :ivar disable_local_auth: This boolean is used to enable or disable local auth. Default value - is false. When the property is set to true, only AAD token will be used to authenticate if user - is allowed to publish to the topic. - :vartype disable_local_auth: bool - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - 'identity': {'key': 'identity', 'type': 'IdentityInfo'}, - 'public_network_access': {'key': 'properties.publicNetworkAccess', 'type': 'str'}, - 'inbound_ip_rules': {'key': 'properties.inboundIpRules', 'type': '[InboundIpRule]'}, - 'disable_local_auth': {'key': 'properties.disableLocalAuth', 'type': 'bool'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword tags: A set of tags. Tags of the resource. - :paramtype tags: dict[str, str] - :keyword identity: Topic resource identity information. - :paramtype identity: ~azure.mgmt.eventgrid.models.IdentityInfo - :keyword public_network_access: This determines if traffic is allowed over public network. By - default it is enabled. - You can further restrict to specific IPs by configuring :code:``. Possible values include: "Enabled", "Disabled". - :paramtype public_network_access: str or ~azure.mgmt.eventgrid.models.PublicNetworkAccess - :keyword inbound_ip_rules: This can be used to restrict traffic from specific IPs instead of - all IPs. Note: These are considered only if PublicNetworkAccess is enabled. - :paramtype inbound_ip_rules: list[~azure.mgmt.eventgrid.models.InboundIpRule] - :keyword disable_local_auth: This boolean is used to enable or disable local auth. Default - value is false. When the property is set to true, only AAD token will be used to authenticate - if user is allowed to publish to the topic. - :paramtype disable_local_auth: bool - """ - super(TopicUpdateParameters, self).__init__(**kwargs) - self.tags = kwargs.get('tags', None) - self.identity = kwargs.get('identity', None) - self.public_network_access = kwargs.get('public_network_access', None) - self.inbound_ip_rules = kwargs.get('inbound_ip_rules', None) - self.disable_local_auth = kwargs.get('disable_local_auth', None) - - -class UserIdentityProperties(msrest.serialization.Model): - """The information about the user identity. - - :ivar principal_id: The principal id of user assigned identity. - :vartype principal_id: str - :ivar client_id: The client id of user assigned identity. - :vartype client_id: str - """ - - _attribute_map = { - 'principal_id': {'key': 'principalId', 'type': 'str'}, - 'client_id': {'key': 'clientId', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword principal_id: The principal id of user assigned identity. - :paramtype principal_id: str - :keyword client_id: The client id of user assigned identity. - :paramtype client_id: str - """ - super(UserIdentityProperties, self).__init__(**kwargs) - self.principal_id = kwargs.get('principal_id', None) - self.client_id = kwargs.get('client_id', None) - - -class WebHookEventSubscriptionDestination(EventSubscriptionDestination): - """Information about the webhook destination for an event subscription. - - 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 endpoint_type: Required. Type of the endpoint for the event subscription - destination.Constant filled by server. Possible values include: "WebHook", "EventHub", - "StorageQueue", "HybridConnection", "ServiceBusQueue", "ServiceBusTopic", "AzureFunction". - :vartype endpoint_type: str or ~azure.mgmt.eventgrid.models.EndpointType - :ivar endpoint_url: The URL that represents the endpoint of the destination of an event - subscription. - :vartype endpoint_url: str - :ivar endpoint_base_url: The base URL that represents the endpoint of the destination of an - event subscription. - :vartype endpoint_base_url: str - :ivar max_events_per_batch: Maximum number of events per batch. - :vartype max_events_per_batch: int - :ivar preferred_batch_size_in_kilobytes: Preferred batch size in Kilobytes. - :vartype preferred_batch_size_in_kilobytes: int - :ivar azure_active_directory_tenant_id: The Azure Active Directory Tenant ID to get the access - token that will be included as the bearer token in delivery requests. - :vartype azure_active_directory_tenant_id: str - :ivar azure_active_directory_application_id_or_uri: The Azure Active Directory Application ID - or URI to get the access token that will be included as the bearer token in delivery requests. - :vartype azure_active_directory_application_id_or_uri: str - :ivar delivery_attribute_mappings: Delivery attribute details. - :vartype delivery_attribute_mappings: - list[~azure.mgmt.eventgrid.models.DeliveryAttributeMapping] - """ - - _validation = { - 'endpoint_type': {'required': True}, - 'endpoint_base_url': {'readonly': True}, - } - - _attribute_map = { - 'endpoint_type': {'key': 'endpointType', 'type': 'str'}, - 'endpoint_url': {'key': 'properties.endpointUrl', 'type': 'str'}, - 'endpoint_base_url': {'key': 'properties.endpointBaseUrl', 'type': 'str'}, - 'max_events_per_batch': {'key': 'properties.maxEventsPerBatch', 'type': 'int'}, - 'preferred_batch_size_in_kilobytes': {'key': 'properties.preferredBatchSizeInKilobytes', 'type': 'int'}, - 'azure_active_directory_tenant_id': {'key': 'properties.azureActiveDirectoryTenantId', 'type': 'str'}, - 'azure_active_directory_application_id_or_uri': {'key': 'properties.azureActiveDirectoryApplicationIdOrUri', 'type': 'str'}, - 'delivery_attribute_mappings': {'key': 'properties.deliveryAttributeMappings', 'type': '[DeliveryAttributeMapping]'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword endpoint_url: The URL that represents the endpoint of the destination of an event - subscription. - :paramtype endpoint_url: str - :keyword max_events_per_batch: Maximum number of events per batch. - :paramtype max_events_per_batch: int - :keyword preferred_batch_size_in_kilobytes: Preferred batch size in Kilobytes. - :paramtype preferred_batch_size_in_kilobytes: int - :keyword azure_active_directory_tenant_id: The Azure Active Directory Tenant ID to get the - access token that will be included as the bearer token in delivery requests. - :paramtype azure_active_directory_tenant_id: str - :keyword azure_active_directory_application_id_or_uri: The Azure Active Directory Application - ID or URI to get the access token that will be included as the bearer token in delivery - requests. - :paramtype azure_active_directory_application_id_or_uri: str - :keyword delivery_attribute_mappings: Delivery attribute details. - :paramtype delivery_attribute_mappings: - list[~azure.mgmt.eventgrid.models.DeliveryAttributeMapping] - """ - super(WebHookEventSubscriptionDestination, self).__init__(**kwargs) - self.endpoint_type = 'WebHook' # type: str - self.endpoint_url = kwargs.get('endpoint_url', None) - self.endpoint_base_url = None - self.max_events_per_batch = kwargs.get('max_events_per_batch', 1) - self.preferred_batch_size_in_kilobytes = kwargs.get('preferred_batch_size_in_kilobytes', 64) - self.azure_active_directory_tenant_id = kwargs.get('azure_active_directory_tenant_id', None) - self.azure_active_directory_application_id_or_uri = kwargs.get('azure_active_directory_application_id_or_uri', None) - self.delivery_attribute_mappings = kwargs.get('delivery_attribute_mappings', None) diff --git a/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/operations/_domain_topics_operations.py b/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/operations/_domain_topics_operations.py index d172596cdbb6..e7456d58223f 100644 --- a/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/operations/_domain_topics_operations.py +++ b/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/operations/_domain_topics_operations.py @@ -6,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import functools -from typing import TYPE_CHECKING +from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar, Union import warnings from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error @@ -22,25 +22,19 @@ from .. import models as _models from .._vendor import _convert_request, _format_url_section - -if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports - from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar, Union - T = TypeVar('T') - ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] _SERIALIZER = Serializer() _SERIALIZER.client_side_validation = False -# fmt: off def build_get_request( - subscription_id, # type: str - resource_group_name, # type: str - domain_name, # type: str - domain_topic_name, # type: str - **kwargs # type: Any -): - # type: (...) -> HttpRequest + subscription_id: str, + resource_group_name: str, + domain_name: str, + domain_topic_name: str, + **kwargs: Any +) -> HttpRequest: api_version = "2021-12-01" accept = "application/json" # Construct URL @@ -72,13 +66,12 @@ def build_get_request( def build_create_or_update_request_initial( - subscription_id, # type: str - resource_group_name, # type: str - domain_name, # type: str - domain_topic_name, # type: str - **kwargs # type: Any -): - # type: (...) -> HttpRequest + subscription_id: str, + resource_group_name: str, + domain_name: str, + domain_topic_name: str, + **kwargs: Any +) -> HttpRequest: api_version = "2021-12-01" accept = "application/json" # Construct URL @@ -110,13 +103,12 @@ def build_create_or_update_request_initial( def build_delete_request_initial( - subscription_id, # type: str - resource_group_name, # type: str - domain_name, # type: str - domain_topic_name, # type: str - **kwargs # type: Any -): - # type: (...) -> HttpRequest + subscription_id: str, + resource_group_name: str, + domain_name: str, + domain_topic_name: str, + **kwargs: Any +) -> HttpRequest: api_version = "2021-12-01" # Construct URL url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/domains/{domainName}/topics/{domainTopicName}') @@ -142,15 +134,14 @@ def build_delete_request_initial( def build_list_by_domain_request( - subscription_id, # type: str - resource_group_name, # type: str - domain_name, # type: str - **kwargs # type: Any -): - # type: (...) -> HttpRequest - filter = kwargs.pop('filter', None) # type: Optional[str] - top = kwargs.pop('top', None) # type: Optional[int] - + subscription_id: str, + resource_group_name: str, + domain_name: str, + *, + filter: Optional[str] = None, + top: Optional[int] = None, + **kwargs: Any +) -> HttpRequest: api_version = "2021-12-01" accept = "application/json" # Construct URL @@ -183,7 +174,6 @@ def build_list_by_domain_request( **kwargs ) -# fmt: on class DomainTopicsOperations(object): """DomainTopicsOperations operations. @@ -209,12 +199,11 @@ def __init__(self, client, config, serializer, deserializer): @distributed_trace def get( self, - resource_group_name, # type: str - domain_name, # type: str - domain_topic_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> "_models.DomainTopic" + resource_group_name: str, + domain_name: str, + domain_topic_name: str, + **kwargs: Any + ) -> "_models.DomainTopic": """Get a domain topic. Get properties of a domain topic. @@ -266,12 +255,11 @@ def get( def _create_or_update_initial( self, - resource_group_name, # type: str - domain_name, # type: str - domain_topic_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> "_models.DomainTopic" + resource_group_name: str, + domain_name: str, + domain_topic_name: str, + **kwargs: Any + ) -> "_models.DomainTopic": cls = kwargs.pop('cls', None) # type: ClsType["_models.DomainTopic"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -309,12 +297,11 @@ def _create_or_update_initial( @distributed_trace def begin_create_or_update( self, - resource_group_name, # type: str - domain_name, # type: str - domain_topic_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> LROPoller["_models.DomainTopic"] + resource_group_name: str, + domain_name: str, + domain_topic_name: str, + **kwargs: Any + ) -> LROPoller["_models.DomainTopic"]: """Create or update a domain topic. Asynchronously creates or updates a new domain topic with the specified parameters. @@ -380,12 +367,11 @@ def get_long_running_output(pipeline_response): def _delete_initial( self, - resource_group_name, # type: str - domain_name, # type: str - domain_topic_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> None + resource_group_name: str, + domain_name: str, + domain_topic_name: str, + **kwargs: Any + ) -> None: cls = kwargs.pop('cls', None) # type: ClsType[None] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -419,12 +405,11 @@ def _delete_initial( @distributed_trace def begin_delete( self, - resource_group_name, # type: str - domain_name, # type: str - domain_topic_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> LROPoller[None] + resource_group_name: str, + domain_name: str, + domain_topic_name: str, + **kwargs: Any + ) -> LROPoller[None]: """Delete a domain topic. Delete existing domain topic. @@ -487,13 +472,12 @@ def get_long_running_output(pipeline_response): @distributed_trace def list_by_domain( self, - resource_group_name, # type: str - domain_name, # type: str - filter=None, # type: Optional[str] - top=None, # type: Optional[int] - **kwargs # type: Any - ): - # type: (...) -> Iterable["_models.DomainTopicsListResult"] + resource_group_name: str, + domain_name: str, + filter: Optional[str] = None, + top: Optional[int] = None, + **kwargs: Any + ) -> Iterable["_models.DomainTopicsListResult"]: """List domain topics. List all the topics in a domain. diff --git a/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/operations/_domains_operations.py b/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/operations/_domains_operations.py index b91e5c005869..f3b29690c7ed 100644 --- a/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/operations/_domains_operations.py +++ b/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/operations/_domains_operations.py @@ -6,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import functools -from typing import TYPE_CHECKING +from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar, Union import warnings from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error @@ -22,24 +22,19 @@ from .. import models as _models from .._vendor import _convert_request, _format_url_section - -if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports - from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar, Union - T = TypeVar('T') - ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] +T = TypeVar('T') +JSONType = Any +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] _SERIALIZER = Serializer() _SERIALIZER.client_side_validation = False -# fmt: off def build_get_request( - subscription_id, # type: str - resource_group_name, # type: str - domain_name, # type: str - **kwargs # type: Any -): - # type: (...) -> HttpRequest + subscription_id: str, + resource_group_name: str, + domain_name: str, + **kwargs: Any +) -> HttpRequest: api_version = "2021-12-01" accept = "application/json" # Construct URL @@ -70,12 +65,14 @@ def build_get_request( def build_create_or_update_request_initial( - subscription_id, # type: str - resource_group_name, # type: str - domain_name, # type: str - **kwargs # type: Any -): - # type: (...) -> HttpRequest + subscription_id: str, + resource_group_name: str, + domain_name: str, + *, + json: JSONType = None, + content: Any = None, + **kwargs: Any +) -> HttpRequest: content_type = kwargs.pop('content_type', None) # type: Optional[str] api_version = "2021-12-01" @@ -105,17 +102,18 @@ def build_create_or_update_request_initial( url=url, params=query_parameters, headers=header_parameters, + json=json, + content=content, **kwargs ) def build_delete_request_initial( - subscription_id, # type: str - resource_group_name, # type: str - domain_name, # type: str - **kwargs # type: Any -): - # type: (...) -> HttpRequest + subscription_id: str, + resource_group_name: str, + domain_name: str, + **kwargs: Any +) -> HttpRequest: api_version = "2021-12-01" # Construct URL url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/domains/{domainName}') @@ -140,12 +138,14 @@ def build_delete_request_initial( def build_update_request_initial( - subscription_id, # type: str - resource_group_name, # type: str - domain_name, # type: str - **kwargs # type: Any -): - # type: (...) -> HttpRequest + subscription_id: str, + resource_group_name: str, + domain_name: str, + *, + json: JSONType = None, + content: Any = None, + **kwargs: Any +) -> HttpRequest: content_type = kwargs.pop('content_type', None) # type: Optional[str] api_version = "2021-12-01" @@ -175,18 +175,19 @@ def build_update_request_initial( url=url, params=query_parameters, headers=header_parameters, + json=json, + content=content, **kwargs ) def build_list_by_subscription_request( - subscription_id, # type: str - **kwargs # type: Any -): - # type: (...) -> HttpRequest - filter = kwargs.pop('filter', None) # type: Optional[str] - top = kwargs.pop('top', None) # type: Optional[int] - + subscription_id: str, + *, + filter: Optional[str] = None, + top: Optional[int] = None, + **kwargs: Any +) -> HttpRequest: api_version = "2021-12-01" accept = "application/json" # Construct URL @@ -219,14 +220,13 @@ def build_list_by_subscription_request( def build_list_by_resource_group_request( - subscription_id, # type: str - resource_group_name, # type: str - **kwargs # type: Any -): - # type: (...) -> HttpRequest - filter = kwargs.pop('filter', None) # type: Optional[str] - top = kwargs.pop('top', None) # type: Optional[int] - + subscription_id: str, + resource_group_name: str, + *, + filter: Optional[str] = None, + top: Optional[int] = None, + **kwargs: Any +) -> HttpRequest: api_version = "2021-12-01" accept = "application/json" # Construct URL @@ -260,12 +260,11 @@ def build_list_by_resource_group_request( def build_list_shared_access_keys_request( - subscription_id, # type: str - resource_group_name, # type: str - domain_name, # type: str - **kwargs # type: Any -): - # type: (...) -> HttpRequest + subscription_id: str, + resource_group_name: str, + domain_name: str, + **kwargs: Any +) -> HttpRequest: api_version = "2021-12-01" accept = "application/json" # Construct URL @@ -296,12 +295,14 @@ def build_list_shared_access_keys_request( def build_regenerate_key_request( - subscription_id, # type: str - resource_group_name, # type: str - domain_name, # type: str - **kwargs # type: Any -): - # type: (...) -> HttpRequest + subscription_id: str, + resource_group_name: str, + domain_name: str, + *, + json: JSONType = None, + content: Any = None, + **kwargs: Any +) -> HttpRequest: content_type = kwargs.pop('content_type', None) # type: Optional[str] api_version = "2021-12-01" @@ -331,10 +332,11 @@ def build_regenerate_key_request( url=url, params=query_parameters, headers=header_parameters, + json=json, + content=content, **kwargs ) -# fmt: on class DomainsOperations(object): """DomainsOperations operations. @@ -360,11 +362,10 @@ def __init__(self, client, config, serializer, deserializer): @distributed_trace def get( self, - resource_group_name, # type: str - domain_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> "_models.Domain" + resource_group_name: str, + domain_name: str, + **kwargs: Any + ) -> "_models.Domain": """Get a domain. Get properties of a domain. @@ -413,12 +414,11 @@ def get( def _create_or_update_initial( self, - resource_group_name, # type: str - domain_name, # type: str - domain_info, # type: "_models.Domain" - **kwargs # type: Any - ): - # type: (...) -> "_models.Domain" + resource_group_name: str, + domain_name: str, + domain_info: "_models.Domain", + **kwargs: Any + ) -> "_models.Domain": cls = kwargs.pop('cls', None) # type: ClsType["_models.Domain"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -460,12 +460,11 @@ def _create_or_update_initial( @distributed_trace def begin_create_or_update( self, - resource_group_name, # type: str - domain_name, # type: str - domain_info, # type: "_models.Domain" - **kwargs # type: Any - ): - # type: (...) -> LROPoller["_models.Domain"] + resource_group_name: str, + domain_name: str, + domain_info: "_models.Domain", + **kwargs: Any + ) -> LROPoller["_models.Domain"]: """Create or update a domain. Asynchronously creates or updates a new domain with the specified parameters. @@ -532,11 +531,10 @@ def get_long_running_output(pipeline_response): def _delete_initial( self, - resource_group_name, # type: str - domain_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> None + resource_group_name: str, + domain_name: str, + **kwargs: Any + ) -> None: cls = kwargs.pop('cls', None) # type: ClsType[None] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -569,11 +567,10 @@ def _delete_initial( @distributed_trace def begin_delete( self, - resource_group_name, # type: str - domain_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> LROPoller[None] + resource_group_name: str, + domain_name: str, + **kwargs: Any + ) -> LROPoller[None]: """Delete a domain. Delete existing domain. @@ -632,12 +629,11 @@ def get_long_running_output(pipeline_response): def _update_initial( self, - resource_group_name, # type: str - domain_name, # type: str - domain_update_parameters, # type: "_models.DomainUpdateParameters" - **kwargs # type: Any - ): - # type: (...) -> Optional["_models.Domain"] + resource_group_name: str, + domain_name: str, + domain_update_parameters: "_models.DomainUpdateParameters", + **kwargs: Any + ) -> Optional["_models.Domain"]: cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.Domain"]] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -681,12 +677,11 @@ def _update_initial( @distributed_trace def begin_update( self, - resource_group_name, # type: str - domain_name, # type: str - domain_update_parameters, # type: "_models.DomainUpdateParameters" - **kwargs # type: Any - ): - # type: (...) -> LROPoller["_models.Domain"] + resource_group_name: str, + domain_name: str, + domain_update_parameters: "_models.DomainUpdateParameters", + **kwargs: Any + ) -> LROPoller["_models.Domain"]: """Update a domain. Asynchronously updates a domain with the specified parameters. @@ -754,11 +749,10 @@ def get_long_running_output(pipeline_response): @distributed_trace def list_by_subscription( self, - filter=None, # type: Optional[str] - top=None, # type: Optional[int] - **kwargs # type: Any - ): - # type: (...) -> Iterable["_models.DomainsListResult"] + filter: Optional[str] = None, + top: Optional[int] = None, + **kwargs: Any + ) -> Iterable["_models.DomainsListResult"]: """List domains under an Azure subscription. List all the domains under an Azure subscription. @@ -837,12 +831,11 @@ def get_next(next_link=None): @distributed_trace def list_by_resource_group( self, - resource_group_name, # type: str - filter=None, # type: Optional[str] - top=None, # type: Optional[int] - **kwargs # type: Any - ): - # type: (...) -> Iterable["_models.DomainsListResult"] + resource_group_name: str, + filter: Optional[str] = None, + top: Optional[int] = None, + **kwargs: Any + ) -> Iterable["_models.DomainsListResult"]: """List domains under a resource group. List all the domains under a resource group. @@ -925,11 +918,10 @@ def get_next(next_link=None): @distributed_trace def list_shared_access_keys( self, - resource_group_name, # type: str - domain_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> "_models.DomainSharedAccessKeys" + resource_group_name: str, + domain_name: str, + **kwargs: Any + ) -> "_models.DomainSharedAccessKeys": """List keys for a domain. List the two keys used to publish to a domain. @@ -979,12 +971,11 @@ def list_shared_access_keys( @distributed_trace def regenerate_key( self, - resource_group_name, # type: str - domain_name, # type: str - regenerate_key_request, # type: "_models.DomainRegenerateKeyRequest" - **kwargs # type: Any - ): - # type: (...) -> "_models.DomainSharedAccessKeys" + resource_group_name: str, + domain_name: str, + regenerate_key_request: "_models.DomainRegenerateKeyRequest", + **kwargs: Any + ) -> "_models.DomainSharedAccessKeys": """Regenerate key for a domain. Regenerate a shared access key for a domain. diff --git a/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/operations/_event_subscriptions_operations.py b/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/operations/_event_subscriptions_operations.py index 4d3ca7bf1d54..5276f4c14ace 100644 --- a/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/operations/_event_subscriptions_operations.py +++ b/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/operations/_event_subscriptions_operations.py @@ -6,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import functools -from typing import TYPE_CHECKING +from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar, Union import warnings from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error @@ -22,23 +22,18 @@ from .. import models as _models from .._vendor import _convert_request, _format_url_section - -if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports - from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar, Union - T = TypeVar('T') - ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] +T = TypeVar('T') +JSONType = Any +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] _SERIALIZER = Serializer() _SERIALIZER.client_side_validation = False -# fmt: off def build_get_request( - scope, # type: str - event_subscription_name, # type: str - **kwargs # type: Any -): - # type: (...) -> HttpRequest + scope: str, + event_subscription_name: str, + **kwargs: Any +) -> HttpRequest: api_version = "2021-12-01" accept = "application/json" # Construct URL @@ -68,11 +63,13 @@ def build_get_request( def build_create_or_update_request_initial( - scope, # type: str - event_subscription_name, # type: str - **kwargs # type: Any -): - # type: (...) -> HttpRequest + scope: str, + event_subscription_name: str, + *, + json: JSONType = None, + content: Any = None, + **kwargs: Any +) -> HttpRequest: content_type = kwargs.pop('content_type', None) # type: Optional[str] api_version = "2021-12-01" @@ -101,16 +98,17 @@ def build_create_or_update_request_initial( url=url, params=query_parameters, headers=header_parameters, + json=json, + content=content, **kwargs ) def build_delete_request_initial( - scope, # type: str - event_subscription_name, # type: str - **kwargs # type: Any -): - # type: (...) -> HttpRequest + scope: str, + event_subscription_name: str, + **kwargs: Any +) -> HttpRequest: api_version = "2021-12-01" # Construct URL url = kwargs.pop("template_url", '/{scope}/providers/Microsoft.EventGrid/eventSubscriptions/{eventSubscriptionName}') @@ -134,11 +132,13 @@ def build_delete_request_initial( def build_update_request_initial( - scope, # type: str - event_subscription_name, # type: str - **kwargs # type: Any -): - # type: (...) -> HttpRequest + scope: str, + event_subscription_name: str, + *, + json: JSONType = None, + content: Any = None, + **kwargs: Any +) -> HttpRequest: content_type = kwargs.pop('content_type', None) # type: Optional[str] api_version = "2021-12-01" @@ -167,16 +167,17 @@ def build_update_request_initial( url=url, params=query_parameters, headers=header_parameters, + json=json, + content=content, **kwargs ) def build_get_full_url_request( - scope, # type: str - event_subscription_name, # type: str - **kwargs # type: Any -): - # type: (...) -> HttpRequest + scope: str, + event_subscription_name: str, + **kwargs: Any +) -> HttpRequest: api_version = "2021-12-01" accept = "application/json" # Construct URL @@ -206,13 +207,12 @@ def build_get_full_url_request( def build_list_global_by_subscription_request( - subscription_id, # type: str - **kwargs # type: Any -): - # type: (...) -> HttpRequest - filter = kwargs.pop('filter', None) # type: Optional[str] - top = kwargs.pop('top', None) # type: Optional[int] - + subscription_id: str, + *, + filter: Optional[str] = None, + top: Optional[int] = None, + **kwargs: Any +) -> HttpRequest: api_version = "2021-12-01" accept = "application/json" # Construct URL @@ -245,14 +245,13 @@ def build_list_global_by_subscription_request( def build_list_global_by_subscription_for_topic_type_request( - subscription_id, # type: str - topic_type_name, # type: str - **kwargs # type: Any -): - # type: (...) -> HttpRequest - filter = kwargs.pop('filter', None) # type: Optional[str] - top = kwargs.pop('top', None) # type: Optional[int] - + subscription_id: str, + topic_type_name: str, + *, + filter: Optional[str] = None, + top: Optional[int] = None, + **kwargs: Any +) -> HttpRequest: api_version = "2021-12-01" accept = "application/json" # Construct URL @@ -286,14 +285,13 @@ def build_list_global_by_subscription_for_topic_type_request( def build_list_global_by_resource_group_request( - subscription_id, # type: str - resource_group_name, # type: str - **kwargs # type: Any -): - # type: (...) -> HttpRequest - filter = kwargs.pop('filter', None) # type: Optional[str] - top = kwargs.pop('top', None) # type: Optional[int] - + subscription_id: str, + resource_group_name: str, + *, + filter: Optional[str] = None, + top: Optional[int] = None, + **kwargs: Any +) -> HttpRequest: api_version = "2021-12-01" accept = "application/json" # Construct URL @@ -327,15 +325,14 @@ def build_list_global_by_resource_group_request( def build_list_global_by_resource_group_for_topic_type_request( - subscription_id, # type: str - resource_group_name, # type: str - topic_type_name, # type: str - **kwargs # type: Any -): - # type: (...) -> HttpRequest - filter = kwargs.pop('filter', None) # type: Optional[str] - top = kwargs.pop('top', None) # type: Optional[int] - + subscription_id: str, + resource_group_name: str, + topic_type_name: str, + *, + filter: Optional[str] = None, + top: Optional[int] = None, + **kwargs: Any +) -> HttpRequest: api_version = "2021-12-01" accept = "application/json" # Construct URL @@ -370,14 +367,13 @@ def build_list_global_by_resource_group_for_topic_type_request( def build_list_regional_by_subscription_request( - subscription_id, # type: str - location, # type: str - **kwargs # type: Any -): - # type: (...) -> HttpRequest - filter = kwargs.pop('filter', None) # type: Optional[str] - top = kwargs.pop('top', None) # type: Optional[int] - + subscription_id: str, + location: str, + *, + filter: Optional[str] = None, + top: Optional[int] = None, + **kwargs: Any +) -> HttpRequest: api_version = "2021-12-01" accept = "application/json" # Construct URL @@ -411,15 +407,14 @@ def build_list_regional_by_subscription_request( def build_list_regional_by_resource_group_request( - subscription_id, # type: str - resource_group_name, # type: str - location, # type: str - **kwargs # type: Any -): - # type: (...) -> HttpRequest - filter = kwargs.pop('filter', None) # type: Optional[str] - top = kwargs.pop('top', None) # type: Optional[int] - + subscription_id: str, + resource_group_name: str, + location: str, + *, + filter: Optional[str] = None, + top: Optional[int] = None, + **kwargs: Any +) -> HttpRequest: api_version = "2021-12-01" accept = "application/json" # Construct URL @@ -454,15 +449,14 @@ def build_list_regional_by_resource_group_request( def build_list_regional_by_subscription_for_topic_type_request( - subscription_id, # type: str - location, # type: str - topic_type_name, # type: str - **kwargs # type: Any -): - # type: (...) -> HttpRequest - filter = kwargs.pop('filter', None) # type: Optional[str] - top = kwargs.pop('top', None) # type: Optional[int] - + subscription_id: str, + location: str, + topic_type_name: str, + *, + filter: Optional[str] = None, + top: Optional[int] = None, + **kwargs: Any +) -> HttpRequest: api_version = "2021-12-01" accept = "application/json" # Construct URL @@ -497,16 +491,15 @@ def build_list_regional_by_subscription_for_topic_type_request( def build_list_regional_by_resource_group_for_topic_type_request( - subscription_id, # type: str - resource_group_name, # type: str - location, # type: str - topic_type_name, # type: str - **kwargs # type: Any -): - # type: (...) -> HttpRequest - filter = kwargs.pop('filter', None) # type: Optional[str] - top = kwargs.pop('top', None) # type: Optional[int] - + subscription_id: str, + resource_group_name: str, + location: str, + topic_type_name: str, + *, + filter: Optional[str] = None, + top: Optional[int] = None, + **kwargs: Any +) -> HttpRequest: api_version = "2021-12-01" accept = "application/json" # Construct URL @@ -542,17 +535,16 @@ def build_list_regional_by_resource_group_for_topic_type_request( def build_list_by_resource_request( - subscription_id, # type: str - resource_group_name, # type: str - provider_namespace, # type: str - resource_type_name, # type: str - resource_name, # type: str - **kwargs # type: Any -): - # type: (...) -> HttpRequest - filter = kwargs.pop('filter', None) # type: Optional[str] - top = kwargs.pop('top', None) # type: Optional[int] - + subscription_id: str, + resource_group_name: str, + provider_namespace: str, + resource_type_name: str, + resource_name: str, + *, + filter: Optional[str] = None, + top: Optional[int] = None, + **kwargs: Any +) -> HttpRequest: api_version = "2021-12-01" accept = "application/json" # Construct URL @@ -589,16 +581,15 @@ def build_list_by_resource_request( def build_list_by_domain_topic_request( - subscription_id, # type: str - resource_group_name, # type: str - domain_name, # type: str - topic_name, # type: str - **kwargs # type: Any -): - # type: (...) -> HttpRequest - filter = kwargs.pop('filter', None) # type: Optional[str] - top = kwargs.pop('top', None) # type: Optional[int] - + subscription_id: str, + resource_group_name: str, + domain_name: str, + topic_name: str, + *, + filter: Optional[str] = None, + top: Optional[int] = None, + **kwargs: Any +) -> HttpRequest: api_version = "2021-12-01" accept = "application/json" # Construct URL @@ -634,11 +625,10 @@ def build_list_by_domain_topic_request( def build_get_delivery_attributes_request( - scope, # type: str - event_subscription_name, # type: str - **kwargs # type: Any -): - # type: (...) -> HttpRequest + scope: str, + event_subscription_name: str, + **kwargs: Any +) -> HttpRequest: api_version = "2021-12-01" accept = "application/json" # Construct URL @@ -666,7 +656,6 @@ def build_get_delivery_attributes_request( **kwargs ) -# fmt: on class EventSubscriptionsOperations(object): """EventSubscriptionsOperations operations. @@ -692,11 +681,10 @@ def __init__(self, client, config, serializer, deserializer): @distributed_trace def get( self, - scope, # type: str - event_subscription_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> "_models.EventSubscription" + scope: str, + event_subscription_name: str, + **kwargs: Any + ) -> "_models.EventSubscription": """Get an event subscription. Get properties of an event subscription. @@ -751,12 +739,11 @@ def get( def _create_or_update_initial( self, - scope, # type: str - event_subscription_name, # type: str - event_subscription_info, # type: "_models.EventSubscription" - **kwargs # type: Any - ): - # type: (...) -> "_models.EventSubscription" + scope: str, + event_subscription_name: str, + event_subscription_info: "_models.EventSubscription", + **kwargs: Any + ) -> "_models.EventSubscription": cls = kwargs.pop('cls', None) # type: ClsType["_models.EventSubscription"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -797,12 +784,11 @@ def _create_or_update_initial( @distributed_trace def begin_create_or_update( self, - scope, # type: str - event_subscription_name, # type: str - event_subscription_info, # type: "_models.EventSubscription" - **kwargs # type: Any - ): - # type: (...) -> LROPoller["_models.EventSubscription"] + scope: str, + event_subscription_name: str, + event_subscription_info: "_models.EventSubscription", + **kwargs: Any + ) -> LROPoller["_models.EventSubscription"]: """Create or update an event subscription. Asynchronously creates a new event subscription or updates an existing event subscription based @@ -881,11 +867,10 @@ def get_long_running_output(pipeline_response): def _delete_initial( self, - scope, # type: str - event_subscription_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> None + scope: str, + event_subscription_name: str, + **kwargs: Any + ) -> None: cls = kwargs.pop('cls', None) # type: ClsType[None] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -917,11 +902,10 @@ def _delete_initial( @distributed_trace def begin_delete( self, - scope, # type: str - event_subscription_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> LROPoller[None] + scope: str, + event_subscription_name: str, + **kwargs: Any + ) -> LROPoller[None]: """Delete an event subscription. Delete an existing event subscription. @@ -987,12 +971,11 @@ def get_long_running_output(pipeline_response): def _update_initial( self, - scope, # type: str - event_subscription_name, # type: str - event_subscription_update_parameters, # type: "_models.EventSubscriptionUpdateParameters" - **kwargs # type: Any - ): - # type: (...) -> "_models.EventSubscription" + scope: str, + event_subscription_name: str, + event_subscription_update_parameters: "_models.EventSubscriptionUpdateParameters", + **kwargs: Any + ) -> "_models.EventSubscription": cls = kwargs.pop('cls', None) # type: ClsType["_models.EventSubscription"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -1033,12 +1016,11 @@ def _update_initial( @distributed_trace def begin_update( self, - scope, # type: str - event_subscription_name, # type: str - event_subscription_update_parameters, # type: "_models.EventSubscriptionUpdateParameters" - **kwargs # type: Any - ): - # type: (...) -> LROPoller["_models.EventSubscription"] + scope: str, + event_subscription_name: str, + event_subscription_update_parameters: "_models.EventSubscriptionUpdateParameters", + **kwargs: Any + ) -> LROPoller["_models.EventSubscription"]: """Update an event subscription. Asynchronously updates an existing event subscription. @@ -1115,11 +1097,10 @@ def get_long_running_output(pipeline_response): @distributed_trace def get_full_url( self, - scope, # type: str - event_subscription_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> "_models.EventSubscriptionFullUrl" + scope: str, + event_subscription_name: str, + **kwargs: Any + ) -> "_models.EventSubscriptionFullUrl": """Get full URL of an event subscription. Get the full endpoint URL for an event subscription. @@ -1175,11 +1156,10 @@ def get_full_url( @distributed_trace def list_global_by_subscription( self, - filter=None, # type: Optional[str] - top=None, # type: Optional[int] - **kwargs # type: Any - ): - # type: (...) -> Iterable["_models.EventSubscriptionsListResult"] + filter: Optional[str] = None, + top: Optional[int] = None, + **kwargs: Any + ) -> Iterable["_models.EventSubscriptionsListResult"]: """Get an aggregated list of all global event subscriptions under an Azure subscription. List all aggregated global event subscriptions under a specific Azure subscription. @@ -1259,12 +1239,11 @@ def get_next(next_link=None): @distributed_trace def list_global_by_subscription_for_topic_type( self, - topic_type_name, # type: str - filter=None, # type: Optional[str] - top=None, # type: Optional[int] - **kwargs # type: Any - ): - # type: (...) -> Iterable["_models.EventSubscriptionsListResult"] + topic_type_name: str, + filter: Optional[str] = None, + top: Optional[int] = None, + **kwargs: Any + ) -> Iterable["_models.EventSubscriptionsListResult"]: """List all global event subscriptions for a topic type. List all global event subscriptions under an Azure subscription for a topic type. @@ -1348,12 +1327,11 @@ def get_next(next_link=None): @distributed_trace def list_global_by_resource_group( self, - resource_group_name, # type: str - filter=None, # type: Optional[str] - top=None, # type: Optional[int] - **kwargs # type: Any - ): - # type: (...) -> Iterable["_models.EventSubscriptionsListResult"] + resource_group_name: str, + filter: Optional[str] = None, + top: Optional[int] = None, + **kwargs: Any + ) -> Iterable["_models.EventSubscriptionsListResult"]: """List all global event subscriptions under an Azure subscription and resource group. List all global event subscriptions under a specific Azure subscription and resource group. @@ -1437,13 +1415,12 @@ def get_next(next_link=None): @distributed_trace def list_global_by_resource_group_for_topic_type( self, - resource_group_name, # type: str - topic_type_name, # type: str - filter=None, # type: Optional[str] - top=None, # type: Optional[int] - **kwargs # type: Any - ): - # type: (...) -> Iterable["_models.EventSubscriptionsListResult"] + resource_group_name: str, + topic_type_name: str, + filter: Optional[str] = None, + top: Optional[int] = None, + **kwargs: Any + ) -> Iterable["_models.EventSubscriptionsListResult"]: """List all global event subscriptions under a resource group for a topic type. List all global event subscriptions under a resource group for a specific topic type. @@ -1531,12 +1508,11 @@ def get_next(next_link=None): @distributed_trace def list_regional_by_subscription( self, - location, # type: str - filter=None, # type: Optional[str] - top=None, # type: Optional[int] - **kwargs # type: Any - ): - # type: (...) -> Iterable["_models.EventSubscriptionsListResult"] + location: str, + filter: Optional[str] = None, + top: Optional[int] = None, + **kwargs: Any + ) -> Iterable["_models.EventSubscriptionsListResult"]: """List all regional event subscriptions under an Azure subscription. List all event subscriptions from the given location under a specific Azure subscription. @@ -1620,13 +1596,12 @@ def get_next(next_link=None): @distributed_trace def list_regional_by_resource_group( self, - resource_group_name, # type: str - location, # type: str - filter=None, # type: Optional[str] - top=None, # type: Optional[int] - **kwargs # type: Any - ): - # type: (...) -> Iterable["_models.EventSubscriptionsListResult"] + resource_group_name: str, + location: str, + filter: Optional[str] = None, + top: Optional[int] = None, + **kwargs: Any + ) -> Iterable["_models.EventSubscriptionsListResult"]: """List all regional event subscriptions under an Azure subscription and resource group. List all event subscriptions from the given location under a specific Azure subscription and @@ -1715,13 +1690,12 @@ def get_next(next_link=None): @distributed_trace def list_regional_by_subscription_for_topic_type( self, - location, # type: str - topic_type_name, # type: str - filter=None, # type: Optional[str] - top=None, # type: Optional[int] - **kwargs # type: Any - ): - # type: (...) -> Iterable["_models.EventSubscriptionsListResult"] + location: str, + topic_type_name: str, + filter: Optional[str] = None, + top: Optional[int] = None, + **kwargs: Any + ) -> Iterable["_models.EventSubscriptionsListResult"]: """List all regional event subscriptions under an Azure subscription for a topic type. List all event subscriptions from the given location under a specific Azure subscription and @@ -1810,14 +1784,13 @@ def get_next(next_link=None): @distributed_trace def list_regional_by_resource_group_for_topic_type( self, - resource_group_name, # type: str - location, # type: str - topic_type_name, # type: str - filter=None, # type: Optional[str] - top=None, # type: Optional[int] - **kwargs # type: Any - ): - # type: (...) -> Iterable["_models.EventSubscriptionsListResult"] + resource_group_name: str, + location: str, + topic_type_name: str, + filter: Optional[str] = None, + top: Optional[int] = None, + **kwargs: Any + ) -> Iterable["_models.EventSubscriptionsListResult"]: """List all regional event subscriptions under an Azure subscription and resource group for a topic type. @@ -1911,15 +1884,14 @@ def get_next(next_link=None): @distributed_trace def list_by_resource( self, - resource_group_name, # type: str - provider_namespace, # type: str - resource_type_name, # type: str - resource_name, # type: str - filter=None, # type: Optional[str] - top=None, # type: Optional[int] - **kwargs # type: Any - ): - # type: (...) -> Iterable["_models.EventSubscriptionsListResult"] + resource_group_name: str, + provider_namespace: str, + resource_type_name: str, + resource_name: str, + filter: Optional[str] = None, + top: Optional[int] = None, + **kwargs: Any + ) -> Iterable["_models.EventSubscriptionsListResult"]: """List all event subscriptions for a specific topic. List all event subscriptions that have been created for a specific topic. @@ -2015,14 +1987,13 @@ def get_next(next_link=None): @distributed_trace def list_by_domain_topic( self, - resource_group_name, # type: str - domain_name, # type: str - topic_name, # type: str - filter=None, # type: Optional[str] - top=None, # type: Optional[int] - **kwargs # type: Any - ): - # type: (...) -> Iterable["_models.EventSubscriptionsListResult"] + resource_group_name: str, + domain_name: str, + topic_name: str, + filter: Optional[str] = None, + top: Optional[int] = None, + **kwargs: Any + ) -> Iterable["_models.EventSubscriptionsListResult"]: """List all event subscriptions for a specific domain topic. List all event subscriptions that have been created for a specific domain topic. @@ -2114,11 +2085,10 @@ def get_next(next_link=None): @distributed_trace def get_delivery_attributes( self, - scope, # type: str - event_subscription_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> "_models.DeliveryAttributeListResult" + scope: str, + event_subscription_name: str, + **kwargs: Any + ) -> "_models.DeliveryAttributeListResult": """Get delivery attributes for an event subscription. Get all delivery attributes for an event subscription. diff --git a/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/operations/_extension_topics_operations.py b/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/operations/_extension_topics_operations.py index ef52811d9820..5ef51bce25c2 100644 --- a/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/operations/_extension_topics_operations.py +++ b/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/operations/_extension_topics_operations.py @@ -6,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import functools -from typing import TYPE_CHECKING +from typing import Any, Callable, Dict, Generic, Optional, TypeVar import warnings from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error @@ -19,22 +19,16 @@ from .. import models as _models from .._vendor import _convert_request, _format_url_section - -if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports - from typing import Any, Callable, Dict, Generic, Optional, TypeVar - T = TypeVar('T') - ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] _SERIALIZER = Serializer() _SERIALIZER.client_side_validation = False -# fmt: off def build_get_request( - scope, # type: str - **kwargs # type: Any -): - # type: (...) -> HttpRequest + scope: str, + **kwargs: Any +) -> HttpRequest: api_version = "2021-12-01" accept = "application/json" # Construct URL @@ -61,7 +55,6 @@ def build_get_request( **kwargs ) -# fmt: on class ExtensionTopicsOperations(object): """ExtensionTopicsOperations operations. @@ -87,10 +80,9 @@ def __init__(self, client, config, serializer, deserializer): @distributed_trace def get( self, - scope, # type: str - **kwargs # type: Any - ): - # type: (...) -> "_models.ExtensionTopic" + scope: str, + **kwargs: Any + ) -> "_models.ExtensionTopic": """Get properties of an extension topic. Get the properties of an extension topic. diff --git a/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/operations/_operations.py b/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/operations/_operations.py index 2095a18b040f..760d523f0001 100644 --- a/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/operations/_operations.py +++ b/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/operations/_operations.py @@ -6,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import functools -from typing import TYPE_CHECKING +from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar import warnings from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error @@ -20,21 +20,15 @@ from .. import models as _models from .._vendor import _convert_request - -if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports - from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar - T = TypeVar('T') - ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] _SERIALIZER = Serializer() _SERIALIZER.client_side_validation = False -# fmt: off def build_list_request( - **kwargs # type: Any -): - # type: (...) -> HttpRequest + **kwargs: Any +) -> HttpRequest: api_version = "2021-12-01" accept = "application/json" # Construct URL @@ -56,7 +50,6 @@ def build_list_request( **kwargs ) -# fmt: on class Operations(object): """Operations operations. @@ -82,9 +75,8 @@ def __init__(self, client, config, serializer, deserializer): @distributed_trace def list( self, - **kwargs # type: Any - ): - # type: (...) -> Iterable["_models.OperationsListResult"] + **kwargs: Any + ) -> Iterable["_models.OperationsListResult"]: """List available operations. List the available operations supported by the Microsoft.EventGrid resource provider. diff --git a/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/operations/_private_endpoint_connections_operations.py b/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/operations/_private_endpoint_connections_operations.py index 21eb3fc848d2..a4e5766252cf 100644 --- a/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/operations/_private_endpoint_connections_operations.py +++ b/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/operations/_private_endpoint_connections_operations.py @@ -6,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import functools -from typing import TYPE_CHECKING +from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar, Union import warnings from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error @@ -22,26 +22,21 @@ from .. import models as _models from .._vendor import _convert_request, _format_url_section - -if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports - from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar, Union - T = TypeVar('T') - ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] +T = TypeVar('T') +JSONType = Any +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] _SERIALIZER = Serializer() _SERIALIZER.client_side_validation = False -# fmt: off def build_get_request( - subscription_id, # type: str - resource_group_name, # type: str - parent_type, # type: Union[str, "_models.Enum18"] - parent_name, # type: str - private_endpoint_connection_name, # type: str - **kwargs # type: Any -): - # type: (...) -> HttpRequest + subscription_id: str, + resource_group_name: str, + parent_type: Union[str, "_models.Enum18"], + parent_name: str, + private_endpoint_connection_name: str, + **kwargs: Any +) -> HttpRequest: api_version = "2021-12-01" accept = "application/json" # Construct URL @@ -74,14 +69,16 @@ def build_get_request( def build_update_request_initial( - subscription_id, # type: str - resource_group_name, # type: str - parent_type, # type: Union[str, "_models.Enum19"] - parent_name, # type: str - private_endpoint_connection_name, # type: str - **kwargs # type: Any -): - # type: (...) -> HttpRequest + subscription_id: str, + resource_group_name: str, + parent_type: Union[str, "_models.Enum19"], + parent_name: str, + private_endpoint_connection_name: str, + *, + json: JSONType = None, + content: Any = None, + **kwargs: Any +) -> HttpRequest: content_type = kwargs.pop('content_type', None) # type: Optional[str] api_version = "2021-12-01" @@ -113,19 +110,20 @@ def build_update_request_initial( url=url, params=query_parameters, headers=header_parameters, + json=json, + content=content, **kwargs ) def build_delete_request_initial( - subscription_id, # type: str - resource_group_name, # type: str - parent_type, # type: Union[str, "_models.Enum20"] - parent_name, # type: str - private_endpoint_connection_name, # type: str - **kwargs # type: Any -): - # type: (...) -> HttpRequest + subscription_id: str, + resource_group_name: str, + parent_type: Union[str, "_models.Enum20"], + parent_name: str, + private_endpoint_connection_name: str, + **kwargs: Any +) -> HttpRequest: api_version = "2021-12-01" # Construct URL url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/{parentType}/{parentName}/privateEndpointConnections/{privateEndpointConnectionName}') @@ -152,16 +150,15 @@ def build_delete_request_initial( def build_list_by_resource_request( - subscription_id, # type: str - resource_group_name, # type: str - parent_type, # type: Union[str, "_models.Enum21"] - parent_name, # type: str - **kwargs # type: Any -): - # type: (...) -> HttpRequest - filter = kwargs.pop('filter', None) # type: Optional[str] - top = kwargs.pop('top', None) # type: Optional[int] - + subscription_id: str, + resource_group_name: str, + parent_type: Union[str, "_models.Enum21"], + parent_name: str, + *, + filter: Optional[str] = None, + top: Optional[int] = None, + **kwargs: Any +) -> HttpRequest: api_version = "2021-12-01" accept = "application/json" # Construct URL @@ -195,7 +192,6 @@ def build_list_by_resource_request( **kwargs ) -# fmt: on class PrivateEndpointConnectionsOperations(object): """PrivateEndpointConnectionsOperations operations. @@ -221,13 +217,12 @@ def __init__(self, client, config, serializer, deserializer): @distributed_trace def get( self, - resource_group_name, # type: str - parent_type, # type: Union[str, "_models.Enum18"] - parent_name, # type: str - private_endpoint_connection_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> "_models.PrivateEndpointConnection" + resource_group_name: str, + parent_type: Union[str, "_models.Enum18"], + parent_name: str, + private_endpoint_connection_name: str, + **kwargs: Any + ) -> "_models.PrivateEndpointConnection": """Get a specific private endpoint connection. Get a specific private endpoint connection under a topic or domain. @@ -285,14 +280,13 @@ def get( def _update_initial( self, - resource_group_name, # type: str - parent_type, # type: Union[str, "_models.Enum19"] - parent_name, # type: str - private_endpoint_connection_name, # type: str - private_endpoint_connection, # type: "_models.PrivateEndpointConnection" - **kwargs # type: Any - ): - # type: (...) -> "_models.PrivateEndpointConnection" + resource_group_name: str, + parent_type: Union[str, "_models.Enum19"], + parent_name: str, + private_endpoint_connection_name: str, + private_endpoint_connection: "_models.PrivateEndpointConnection", + **kwargs: Any + ) -> "_models.PrivateEndpointConnection": cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateEndpointConnection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -340,14 +334,13 @@ def _update_initial( @distributed_trace def begin_update( self, - resource_group_name, # type: str - parent_type, # type: Union[str, "_models.Enum19"] - parent_name, # type: str - private_endpoint_connection_name, # type: str - private_endpoint_connection, # type: "_models.PrivateEndpointConnection" - **kwargs # type: Any - ): - # type: (...) -> LROPoller["_models.PrivateEndpointConnection"] + resource_group_name: str, + parent_type: Union[str, "_models.Enum19"], + parent_name: str, + private_endpoint_connection_name: str, + private_endpoint_connection: "_models.PrivateEndpointConnection", + **kwargs: Any + ) -> LROPoller["_models.PrivateEndpointConnection"]: """Update a specific private endpoint connection. Update a specific private endpoint connection under a topic or domain. @@ -424,13 +417,12 @@ def get_long_running_output(pipeline_response): def _delete_initial( self, - resource_group_name, # type: str - parent_type, # type: Union[str, "_models.Enum20"] - parent_name, # type: str - private_endpoint_connection_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> None + resource_group_name: str, + parent_type: Union[str, "_models.Enum20"], + parent_name: str, + private_endpoint_connection_name: str, + **kwargs: Any + ) -> None: cls = kwargs.pop('cls', None) # type: ClsType[None] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -465,13 +457,12 @@ def _delete_initial( @distributed_trace def begin_delete( self, - resource_group_name, # type: str - parent_type, # type: Union[str, "_models.Enum20"] - parent_name, # type: str - private_endpoint_connection_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> LROPoller[None] + resource_group_name: str, + parent_type: Union[str, "_models.Enum20"], + parent_name: str, + private_endpoint_connection_name: str, + **kwargs: Any + ) -> LROPoller[None]: """Delete a specific private endpoint connection. Delete a specific private endpoint connection under a topic or domain. @@ -540,14 +531,13 @@ def get_long_running_output(pipeline_response): @distributed_trace def list_by_resource( self, - resource_group_name, # type: str - parent_type, # type: Union[str, "_models.Enum21"] - parent_name, # type: str - filter=None, # type: Optional[str] - top=None, # type: Optional[int] - **kwargs # type: Any - ): - # type: (...) -> Iterable["_models.PrivateEndpointConnectionListResult"] + resource_group_name: str, + parent_type: Union[str, "_models.Enum21"], + parent_name: str, + filter: Optional[str] = None, + top: Optional[int] = None, + **kwargs: Any + ) -> Iterable["_models.PrivateEndpointConnectionListResult"]: """Lists all private endpoint connections under a resource. Get all private endpoint connections under a topic or domain. diff --git a/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/operations/_private_link_resources_operations.py b/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/operations/_private_link_resources_operations.py index e080604250bb..1f68cf4d6cbe 100644 --- a/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/operations/_private_link_resources_operations.py +++ b/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/operations/_private_link_resources_operations.py @@ -6,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import functools -from typing import TYPE_CHECKING +from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar import warnings from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error @@ -20,26 +20,20 @@ from .. import models as _models from .._vendor import _convert_request, _format_url_section - -if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports - from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar - T = TypeVar('T') - ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] _SERIALIZER = Serializer() _SERIALIZER.client_side_validation = False -# fmt: off def build_get_request( - subscription_id, # type: str - resource_group_name, # type: str - parent_type, # type: str - parent_name, # type: str - private_link_resource_name, # type: str - **kwargs # type: Any -): - # type: (...) -> HttpRequest + subscription_id: str, + resource_group_name: str, + parent_type: str, + parent_name: str, + private_link_resource_name: str, + **kwargs: Any +) -> HttpRequest: api_version = "2021-12-01" accept = "application/json" # Construct URL @@ -72,16 +66,15 @@ def build_get_request( def build_list_by_resource_request( - subscription_id, # type: str - resource_group_name, # type: str - parent_type, # type: str - parent_name, # type: str - **kwargs # type: Any -): - # type: (...) -> HttpRequest - filter = kwargs.pop('filter', None) # type: Optional[str] - top = kwargs.pop('top', None) # type: Optional[int] - + subscription_id: str, + resource_group_name: str, + parent_type: str, + parent_name: str, + *, + filter: Optional[str] = None, + top: Optional[int] = None, + **kwargs: Any +) -> HttpRequest: api_version = "2021-12-01" accept = "application/json" # Construct URL @@ -115,7 +108,6 @@ def build_list_by_resource_request( **kwargs ) -# fmt: on class PrivateLinkResourcesOperations(object): """PrivateLinkResourcesOperations operations. @@ -141,13 +133,12 @@ def __init__(self, client, config, serializer, deserializer): @distributed_trace def get( self, - resource_group_name, # type: str - parent_type, # type: str - parent_name, # type: str - private_link_resource_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> "_models.PrivateLinkResource" + resource_group_name: str, + parent_type: str, + parent_name: str, + private_link_resource_name: str, + **kwargs: Any + ) -> "_models.PrivateLinkResource": """Get a private link resource. Get properties of a private link resource. @@ -205,14 +196,13 @@ def get( @distributed_trace def list_by_resource( self, - resource_group_name, # type: str - parent_type, # type: str - parent_name, # type: str - filter=None, # type: Optional[str] - top=None, # type: Optional[int] - **kwargs # type: Any - ): - # type: (...) -> Iterable["_models.PrivateLinkResourcesListResult"] + resource_group_name: str, + parent_type: str, + parent_name: str, + filter: Optional[str] = None, + top: Optional[int] = None, + **kwargs: Any + ) -> Iterable["_models.PrivateLinkResourcesListResult"]: """List private link resources under specific topic or domain. List all the private link resources under a topic or domain. diff --git a/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/operations/_system_topic_event_subscriptions_operations.py b/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/operations/_system_topic_event_subscriptions_operations.py index ac624e9144ff..91381d9df014 100644 --- a/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/operations/_system_topic_event_subscriptions_operations.py +++ b/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/operations/_system_topic_event_subscriptions_operations.py @@ -6,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import functools -from typing import TYPE_CHECKING +from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar, Union import warnings from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error @@ -22,25 +22,20 @@ from .. import models as _models from .._vendor import _convert_request, _format_url_section - -if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports - from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar, Union - T = TypeVar('T') - ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] +T = TypeVar('T') +JSONType = Any +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] _SERIALIZER = Serializer() _SERIALIZER.client_side_validation = False -# fmt: off def build_get_request( - subscription_id, # type: str - resource_group_name, # type: str - system_topic_name, # type: str - event_subscription_name, # type: str - **kwargs # type: Any -): - # type: (...) -> HttpRequest + subscription_id: str, + resource_group_name: str, + system_topic_name: str, + event_subscription_name: str, + **kwargs: Any +) -> HttpRequest: api_version = "2021-12-01" accept = "application/json" # Construct URL @@ -72,13 +67,15 @@ def build_get_request( def build_create_or_update_request_initial( - subscription_id, # type: str - resource_group_name, # type: str - system_topic_name, # type: str - event_subscription_name, # type: str - **kwargs # type: Any -): - # type: (...) -> HttpRequest + subscription_id: str, + resource_group_name: str, + system_topic_name: str, + event_subscription_name: str, + *, + json: JSONType = None, + content: Any = None, + **kwargs: Any +) -> HttpRequest: content_type = kwargs.pop('content_type', None) # type: Optional[str] api_version = "2021-12-01" @@ -109,18 +106,19 @@ def build_create_or_update_request_initial( url=url, params=query_parameters, headers=header_parameters, + json=json, + content=content, **kwargs ) def build_delete_request_initial( - subscription_id, # type: str - resource_group_name, # type: str - system_topic_name, # type: str - event_subscription_name, # type: str - **kwargs # type: Any -): - # type: (...) -> HttpRequest + subscription_id: str, + resource_group_name: str, + system_topic_name: str, + event_subscription_name: str, + **kwargs: Any +) -> HttpRequest: api_version = "2021-12-01" # Construct URL url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/systemTopics/{systemTopicName}/eventSubscriptions/{eventSubscriptionName}') @@ -146,13 +144,15 @@ def build_delete_request_initial( def build_update_request_initial( - subscription_id, # type: str - resource_group_name, # type: str - system_topic_name, # type: str - event_subscription_name, # type: str - **kwargs # type: Any -): - # type: (...) -> HttpRequest + subscription_id: str, + resource_group_name: str, + system_topic_name: str, + event_subscription_name: str, + *, + json: JSONType = None, + content: Any = None, + **kwargs: Any +) -> HttpRequest: content_type = kwargs.pop('content_type', None) # type: Optional[str] api_version = "2021-12-01" @@ -183,18 +183,19 @@ def build_update_request_initial( url=url, params=query_parameters, headers=header_parameters, + json=json, + content=content, **kwargs ) def build_get_full_url_request( - subscription_id, # type: str - resource_group_name, # type: str - system_topic_name, # type: str - event_subscription_name, # type: str - **kwargs # type: Any -): - # type: (...) -> HttpRequest + subscription_id: str, + resource_group_name: str, + system_topic_name: str, + event_subscription_name: str, + **kwargs: Any +) -> HttpRequest: api_version = "2021-12-01" accept = "application/json" # Construct URL @@ -226,15 +227,14 @@ def build_get_full_url_request( def build_list_by_system_topic_request( - subscription_id, # type: str - resource_group_name, # type: str - system_topic_name, # type: str - **kwargs # type: Any -): - # type: (...) -> HttpRequest - filter = kwargs.pop('filter', None) # type: Optional[str] - top = kwargs.pop('top', None) # type: Optional[int] - + subscription_id: str, + resource_group_name: str, + system_topic_name: str, + *, + filter: Optional[str] = None, + top: Optional[int] = None, + **kwargs: Any +) -> HttpRequest: api_version = "2021-12-01" accept = "application/json" # Construct URL @@ -269,13 +269,12 @@ def build_list_by_system_topic_request( def build_get_delivery_attributes_request( - subscription_id, # type: str - resource_group_name, # type: str - system_topic_name, # type: str - event_subscription_name, # type: str - **kwargs # type: Any -): - # type: (...) -> HttpRequest + subscription_id: str, + resource_group_name: str, + system_topic_name: str, + event_subscription_name: str, + **kwargs: Any +) -> HttpRequest: api_version = "2021-12-01" accept = "application/json" # Construct URL @@ -305,7 +304,6 @@ def build_get_delivery_attributes_request( **kwargs ) -# fmt: on class SystemTopicEventSubscriptionsOperations(object): """SystemTopicEventSubscriptionsOperations operations. @@ -331,12 +329,11 @@ def __init__(self, client, config, serializer, deserializer): @distributed_trace def get( self, - resource_group_name, # type: str - system_topic_name, # type: str - event_subscription_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> "_models.EventSubscription" + resource_group_name: str, + system_topic_name: str, + event_subscription_name: str, + **kwargs: Any + ) -> "_models.EventSubscription": """Get an event subscription of a system topic. Get an event subscription. @@ -390,13 +387,12 @@ def get( def _create_or_update_initial( self, - resource_group_name, # type: str - system_topic_name, # type: str - event_subscription_name, # type: str - event_subscription_info, # type: "_models.EventSubscription" - **kwargs # type: Any - ): - # type: (...) -> "_models.EventSubscription" + resource_group_name: str, + system_topic_name: str, + event_subscription_name: str, + event_subscription_info: "_models.EventSubscription", + **kwargs: Any + ) -> "_models.EventSubscription": cls = kwargs.pop('cls', None) # type: ClsType["_models.EventSubscription"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -439,13 +435,12 @@ def _create_or_update_initial( @distributed_trace def begin_create_or_update( self, - resource_group_name, # type: str - system_topic_name, # type: str - event_subscription_name, # type: str - event_subscription_info, # type: "_models.EventSubscription" - **kwargs # type: Any - ): - # type: (...) -> LROPoller["_models.EventSubscription"] + resource_group_name: str, + system_topic_name: str, + event_subscription_name: str, + event_subscription_info: "_models.EventSubscription", + **kwargs: Any + ) -> LROPoller["_models.EventSubscription"]: """Create or update an event subscription for a system topic. Asynchronously creates or updates an event subscription with the specified parameters. Existing @@ -520,12 +515,11 @@ def get_long_running_output(pipeline_response): def _delete_initial( self, - resource_group_name, # type: str - system_topic_name, # type: str - event_subscription_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> None + resource_group_name: str, + system_topic_name: str, + event_subscription_name: str, + **kwargs: Any + ) -> None: cls = kwargs.pop('cls', None) # type: ClsType[None] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -559,12 +553,11 @@ def _delete_initial( @distributed_trace def begin_delete( self, - resource_group_name, # type: str - system_topic_name, # type: str - event_subscription_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> LROPoller[None] + resource_group_name: str, + system_topic_name: str, + event_subscription_name: str, + **kwargs: Any + ) -> LROPoller[None]: """Delete an event subscription of a system topic. Delete an event subscription of a system topic. @@ -628,13 +621,12 @@ def get_long_running_output(pipeline_response): def _update_initial( self, - resource_group_name, # type: str - system_topic_name, # type: str - event_subscription_name, # type: str - event_subscription_update_parameters, # type: "_models.EventSubscriptionUpdateParameters" - **kwargs # type: Any - ): - # type: (...) -> "_models.EventSubscription" + resource_group_name: str, + system_topic_name: str, + event_subscription_name: str, + event_subscription_update_parameters: "_models.EventSubscriptionUpdateParameters", + **kwargs: Any + ) -> "_models.EventSubscription": cls = kwargs.pop('cls', None) # type: ClsType["_models.EventSubscription"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -677,13 +669,12 @@ def _update_initial( @distributed_trace def begin_update( self, - resource_group_name, # type: str - system_topic_name, # type: str - event_subscription_name, # type: str - event_subscription_update_parameters, # type: "_models.EventSubscriptionUpdateParameters" - **kwargs # type: Any - ): - # type: (...) -> LROPoller["_models.EventSubscription"] + resource_group_name: str, + system_topic_name: str, + event_subscription_name: str, + event_subscription_update_parameters: "_models.EventSubscriptionUpdateParameters", + **kwargs: Any + ) -> LROPoller["_models.EventSubscription"]: """Update event subscription of a system topic. Update event subscription of a system topic. @@ -758,12 +749,11 @@ def get_long_running_output(pipeline_response): @distributed_trace def get_full_url( self, - resource_group_name, # type: str - system_topic_name, # type: str - event_subscription_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> "_models.EventSubscriptionFullUrl" + resource_group_name: str, + system_topic_name: str, + event_subscription_name: str, + **kwargs: Any + ) -> "_models.EventSubscriptionFullUrl": """Get full URL of an event subscription of a system topic. Get the full endpoint URL for an event subscription of a system topic. @@ -818,13 +808,12 @@ def get_full_url( @distributed_trace def list_by_system_topic( self, - resource_group_name, # type: str - system_topic_name, # type: str - filter=None, # type: Optional[str] - top=None, # type: Optional[int] - **kwargs # type: Any - ): - # type: (...) -> Iterable["_models.EventSubscriptionsListResult"] + resource_group_name: str, + system_topic_name: str, + filter: Optional[str] = None, + top: Optional[int] = None, + **kwargs: Any + ) -> Iterable["_models.EventSubscriptionsListResult"]: """List event subscriptions of a system topic. List event subscriptions that belong to a specific system topic. @@ -912,12 +901,11 @@ def get_next(next_link=None): @distributed_trace def get_delivery_attributes( self, - resource_group_name, # type: str - system_topic_name, # type: str - event_subscription_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> "_models.DeliveryAttributeListResult" + resource_group_name: str, + system_topic_name: str, + event_subscription_name: str, + **kwargs: Any + ) -> "_models.DeliveryAttributeListResult": """Get delivery attributes for an event subscription. Get all delivery attributes for an event subscription. diff --git a/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/operations/_system_topics_operations.py b/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/operations/_system_topics_operations.py index a43cb2f189d2..3417ea0eaf5d 100644 --- a/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/operations/_system_topics_operations.py +++ b/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/operations/_system_topics_operations.py @@ -6,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import functools -from typing import TYPE_CHECKING +from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar, Union import warnings from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error @@ -22,24 +22,19 @@ from .. import models as _models from .._vendor import _convert_request, _format_url_section - -if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports - from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar, Union - T = TypeVar('T') - ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] +T = TypeVar('T') +JSONType = Any +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] _SERIALIZER = Serializer() _SERIALIZER.client_side_validation = False -# fmt: off def build_get_request( - subscription_id, # type: str - resource_group_name, # type: str - system_topic_name, # type: str - **kwargs # type: Any -): - # type: (...) -> HttpRequest + subscription_id: str, + resource_group_name: str, + system_topic_name: str, + **kwargs: Any +) -> HttpRequest: api_version = "2021-12-01" accept = "application/json" # Construct URL @@ -70,12 +65,14 @@ def build_get_request( def build_create_or_update_request_initial( - subscription_id, # type: str - resource_group_name, # type: str - system_topic_name, # type: str - **kwargs # type: Any -): - # type: (...) -> HttpRequest + subscription_id: str, + resource_group_name: str, + system_topic_name: str, + *, + json: JSONType = None, + content: Any = None, + **kwargs: Any +) -> HttpRequest: content_type = kwargs.pop('content_type', None) # type: Optional[str] api_version = "2021-12-01" @@ -105,17 +102,18 @@ def build_create_or_update_request_initial( url=url, params=query_parameters, headers=header_parameters, + json=json, + content=content, **kwargs ) def build_delete_request_initial( - subscription_id, # type: str - resource_group_name, # type: str - system_topic_name, # type: str - **kwargs # type: Any -): - # type: (...) -> HttpRequest + subscription_id: str, + resource_group_name: str, + system_topic_name: str, + **kwargs: Any +) -> HttpRequest: api_version = "2021-12-01" # Construct URL url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/systemTopics/{systemTopicName}') @@ -140,12 +138,14 @@ def build_delete_request_initial( def build_update_request_initial( - subscription_id, # type: str - resource_group_name, # type: str - system_topic_name, # type: str - **kwargs # type: Any -): - # type: (...) -> HttpRequest + subscription_id: str, + resource_group_name: str, + system_topic_name: str, + *, + json: JSONType = None, + content: Any = None, + **kwargs: Any +) -> HttpRequest: content_type = kwargs.pop('content_type', None) # type: Optional[str] api_version = "2021-12-01" @@ -175,18 +175,19 @@ def build_update_request_initial( url=url, params=query_parameters, headers=header_parameters, + json=json, + content=content, **kwargs ) def build_list_by_subscription_request( - subscription_id, # type: str - **kwargs # type: Any -): - # type: (...) -> HttpRequest - filter = kwargs.pop('filter', None) # type: Optional[str] - top = kwargs.pop('top', None) # type: Optional[int] - + subscription_id: str, + *, + filter: Optional[str] = None, + top: Optional[int] = None, + **kwargs: Any +) -> HttpRequest: api_version = "2021-12-01" accept = "application/json" # Construct URL @@ -219,14 +220,13 @@ def build_list_by_subscription_request( def build_list_by_resource_group_request( - subscription_id, # type: str - resource_group_name, # type: str - **kwargs # type: Any -): - # type: (...) -> HttpRequest - filter = kwargs.pop('filter', None) # type: Optional[str] - top = kwargs.pop('top', None) # type: Optional[int] - + subscription_id: str, + resource_group_name: str, + *, + filter: Optional[str] = None, + top: Optional[int] = None, + **kwargs: Any +) -> HttpRequest: api_version = "2021-12-01" accept = "application/json" # Construct URL @@ -258,7 +258,6 @@ def build_list_by_resource_group_request( **kwargs ) -# fmt: on class SystemTopicsOperations(object): """SystemTopicsOperations operations. @@ -284,11 +283,10 @@ def __init__(self, client, config, serializer, deserializer): @distributed_trace def get( self, - resource_group_name, # type: str - system_topic_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> "_models.SystemTopic" + resource_group_name: str, + system_topic_name: str, + **kwargs: Any + ) -> "_models.SystemTopic": """Get a system topic. Get properties of a system topic. @@ -337,12 +335,11 @@ def get( def _create_or_update_initial( self, - resource_group_name, # type: str - system_topic_name, # type: str - system_topic_info, # type: "_models.SystemTopic" - **kwargs # type: Any - ): - # type: (...) -> "_models.SystemTopic" + resource_group_name: str, + system_topic_name: str, + system_topic_info: "_models.SystemTopic", + **kwargs: Any + ) -> "_models.SystemTopic": cls = kwargs.pop('cls', None) # type: ClsType["_models.SystemTopic"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -388,12 +385,11 @@ def _create_or_update_initial( @distributed_trace def begin_create_or_update( self, - resource_group_name, # type: str - system_topic_name, # type: str - system_topic_info, # type: "_models.SystemTopic" - **kwargs # type: Any - ): - # type: (...) -> LROPoller["_models.SystemTopic"] + resource_group_name: str, + system_topic_name: str, + system_topic_info: "_models.SystemTopic", + **kwargs: Any + ) -> LROPoller["_models.SystemTopic"]: """Create a system topic. Asynchronously creates a new system topic with the specified parameters. @@ -461,11 +457,10 @@ def get_long_running_output(pipeline_response): def _delete_initial( self, - resource_group_name, # type: str - system_topic_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> None + resource_group_name: str, + system_topic_name: str, + **kwargs: Any + ) -> None: cls = kwargs.pop('cls', None) # type: ClsType[None] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -498,11 +493,10 @@ def _delete_initial( @distributed_trace def begin_delete( self, - resource_group_name, # type: str - system_topic_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> LROPoller[None] + resource_group_name: str, + system_topic_name: str, + **kwargs: Any + ) -> LROPoller[None]: """Delete a system topic. Delete existing system topic. @@ -561,12 +555,11 @@ def get_long_running_output(pipeline_response): def _update_initial( self, - resource_group_name, # type: str - system_topic_name, # type: str - system_topic_update_parameters, # type: "_models.SystemTopicUpdateParameters" - **kwargs # type: Any - ): - # type: (...) -> "_models.SystemTopic" + resource_group_name: str, + system_topic_name: str, + system_topic_update_parameters: "_models.SystemTopicUpdateParameters", + **kwargs: Any + ) -> "_models.SystemTopic": cls = kwargs.pop('cls', None) # type: ClsType["_models.SystemTopic"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -612,12 +605,11 @@ def _update_initial( @distributed_trace def begin_update( self, - resource_group_name, # type: str - system_topic_name, # type: str - system_topic_update_parameters, # type: "_models.SystemTopicUpdateParameters" - **kwargs # type: Any - ): - # type: (...) -> LROPoller["_models.SystemTopic"] + resource_group_name: str, + system_topic_name: str, + system_topic_update_parameters: "_models.SystemTopicUpdateParameters", + **kwargs: Any + ) -> LROPoller["_models.SystemTopic"]: """Update a system topic. Asynchronously updates a system topic with the specified parameters. @@ -686,11 +678,10 @@ def get_long_running_output(pipeline_response): @distributed_trace def list_by_subscription( self, - filter=None, # type: Optional[str] - top=None, # type: Optional[int] - **kwargs # type: Any - ): - # type: (...) -> Iterable["_models.SystemTopicsListResult"] + filter: Optional[str] = None, + top: Optional[int] = None, + **kwargs: Any + ) -> Iterable["_models.SystemTopicsListResult"]: """List system topics under an Azure subscription. List all the system topics under an Azure subscription. @@ -770,12 +761,11 @@ def get_next(next_link=None): @distributed_trace def list_by_resource_group( self, - resource_group_name, # type: str - filter=None, # type: Optional[str] - top=None, # type: Optional[int] - **kwargs # type: Any - ): - # type: (...) -> Iterable["_models.SystemTopicsListResult"] + resource_group_name: str, + filter: Optional[str] = None, + top: Optional[int] = None, + **kwargs: Any + ) -> Iterable["_models.SystemTopicsListResult"]: """List system topics under a resource group. List all the system topics under a resource group. diff --git a/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/operations/_topic_types_operations.py b/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/operations/_topic_types_operations.py index c16e46efab75..cc123cadf263 100644 --- a/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/operations/_topic_types_operations.py +++ b/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/operations/_topic_types_operations.py @@ -6,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import functools -from typing import TYPE_CHECKING +from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar import warnings from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error @@ -20,21 +20,15 @@ from .. import models as _models from .._vendor import _convert_request, _format_url_section - -if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports - from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar - T = TypeVar('T') - ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] _SERIALIZER = Serializer() _SERIALIZER.client_side_validation = False -# fmt: off def build_list_request( - **kwargs # type: Any -): - # type: (...) -> HttpRequest + **kwargs: Any +) -> HttpRequest: api_version = "2021-12-01" accept = "application/json" # Construct URL @@ -58,10 +52,9 @@ def build_list_request( def build_get_request( - topic_type_name, # type: str - **kwargs # type: Any -): - # type: (...) -> HttpRequest + topic_type_name: str, + **kwargs: Any +) -> HttpRequest: api_version = "2021-12-01" accept = "application/json" # Construct URL @@ -90,10 +83,9 @@ def build_get_request( def build_list_event_types_request( - topic_type_name, # type: str - **kwargs # type: Any -): - # type: (...) -> HttpRequest + topic_type_name: str, + **kwargs: Any +) -> HttpRequest: api_version = "2021-12-01" accept = "application/json" # Construct URL @@ -120,7 +112,6 @@ def build_list_event_types_request( **kwargs ) -# fmt: on class TopicTypesOperations(object): """TopicTypesOperations operations. @@ -146,9 +137,8 @@ def __init__(self, client, config, serializer, deserializer): @distributed_trace def list( self, - **kwargs # type: Any - ): - # type: (...) -> Iterable["_models.TopicTypesListResult"] + **kwargs: Any + ) -> Iterable["_models.TopicTypesListResult"]: """List topic types. List all registered topic types. @@ -211,10 +201,9 @@ def get_next(next_link=None): @distributed_trace def get( self, - topic_type_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> "_models.TopicTypeInfo" + topic_type_name: str, + **kwargs: Any + ) -> "_models.TopicTypeInfo": """Get a topic type. Get information about a topic type. @@ -260,10 +249,9 @@ def get( @distributed_trace def list_event_types( self, - topic_type_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> Iterable["_models.EventTypesListResult"] + topic_type_name: str, + **kwargs: Any + ) -> Iterable["_models.EventTypesListResult"]: """List event types. List event types for a topic type. diff --git a/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/operations/_topics_operations.py b/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/operations/_topics_operations.py index 6d0c1d9b0611..dc90b76816ef 100644 --- a/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/operations/_topics_operations.py +++ b/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/operations/_topics_operations.py @@ -6,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import functools -from typing import TYPE_CHECKING +from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar, Union import warnings from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error @@ -22,24 +22,19 @@ from .. import models as _models from .._vendor import _convert_request, _format_url_section - -if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports - from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar, Union - T = TypeVar('T') - ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] +T = TypeVar('T') +JSONType = Any +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] _SERIALIZER = Serializer() _SERIALIZER.client_side_validation = False -# fmt: off def build_get_request( - subscription_id, # type: str - resource_group_name, # type: str - topic_name, # type: str - **kwargs # type: Any -): - # type: (...) -> HttpRequest + subscription_id: str, + resource_group_name: str, + topic_name: str, + **kwargs: Any +) -> HttpRequest: api_version = "2021-12-01" accept = "application/json" # Construct URL @@ -70,12 +65,14 @@ def build_get_request( def build_create_or_update_request_initial( - subscription_id, # type: str - resource_group_name, # type: str - topic_name, # type: str - **kwargs # type: Any -): - # type: (...) -> HttpRequest + subscription_id: str, + resource_group_name: str, + topic_name: str, + *, + json: JSONType = None, + content: Any = None, + **kwargs: Any +) -> HttpRequest: content_type = kwargs.pop('content_type', None) # type: Optional[str] api_version = "2021-12-01" @@ -105,17 +102,18 @@ def build_create_or_update_request_initial( url=url, params=query_parameters, headers=header_parameters, + json=json, + content=content, **kwargs ) def build_delete_request_initial( - subscription_id, # type: str - resource_group_name, # type: str - topic_name, # type: str - **kwargs # type: Any -): - # type: (...) -> HttpRequest + subscription_id: str, + resource_group_name: str, + topic_name: str, + **kwargs: Any +) -> HttpRequest: api_version = "2021-12-01" # Construct URL url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}') @@ -140,12 +138,14 @@ def build_delete_request_initial( def build_update_request_initial( - subscription_id, # type: str - resource_group_name, # type: str - topic_name, # type: str - **kwargs # type: Any -): - # type: (...) -> HttpRequest + subscription_id: str, + resource_group_name: str, + topic_name: str, + *, + json: JSONType = None, + content: Any = None, + **kwargs: Any +) -> HttpRequest: content_type = kwargs.pop('content_type', None) # type: Optional[str] api_version = "2021-12-01" @@ -175,18 +175,19 @@ def build_update_request_initial( url=url, params=query_parameters, headers=header_parameters, + json=json, + content=content, **kwargs ) def build_list_by_subscription_request( - subscription_id, # type: str - **kwargs # type: Any -): - # type: (...) -> HttpRequest - filter = kwargs.pop('filter', None) # type: Optional[str] - top = kwargs.pop('top', None) # type: Optional[int] - + subscription_id: str, + *, + filter: Optional[str] = None, + top: Optional[int] = None, + **kwargs: Any +) -> HttpRequest: api_version = "2021-12-01" accept = "application/json" # Construct URL @@ -219,14 +220,13 @@ def build_list_by_subscription_request( def build_list_by_resource_group_request( - subscription_id, # type: str - resource_group_name, # type: str - **kwargs # type: Any -): - # type: (...) -> HttpRequest - filter = kwargs.pop('filter', None) # type: Optional[str] - top = kwargs.pop('top', None) # type: Optional[int] - + subscription_id: str, + resource_group_name: str, + *, + filter: Optional[str] = None, + top: Optional[int] = None, + **kwargs: Any +) -> HttpRequest: api_version = "2021-12-01" accept = "application/json" # Construct URL @@ -260,12 +260,11 @@ def build_list_by_resource_group_request( def build_list_shared_access_keys_request( - subscription_id, # type: str - resource_group_name, # type: str - topic_name, # type: str - **kwargs # type: Any -): - # type: (...) -> HttpRequest + subscription_id: str, + resource_group_name: str, + topic_name: str, + **kwargs: Any +) -> HttpRequest: api_version = "2021-12-01" accept = "application/json" # Construct URL @@ -296,12 +295,14 @@ def build_list_shared_access_keys_request( def build_regenerate_key_request_initial( - subscription_id, # type: str - resource_group_name, # type: str - topic_name, # type: str - **kwargs # type: Any -): - # type: (...) -> HttpRequest + subscription_id: str, + resource_group_name: str, + topic_name: str, + *, + json: JSONType = None, + content: Any = None, + **kwargs: Any +) -> HttpRequest: content_type = kwargs.pop('content_type', None) # type: Optional[str] api_version = "2021-12-01" @@ -331,19 +332,20 @@ def build_regenerate_key_request_initial( url=url, params=query_parameters, headers=header_parameters, + json=json, + content=content, **kwargs ) def build_list_event_types_request( - subscription_id, # type: str - resource_group_name, # type: str - provider_namespace, # type: str - resource_type_name, # type: str - resource_name, # type: str - **kwargs # type: Any -): - # type: (...) -> HttpRequest + subscription_id: str, + resource_group_name: str, + provider_namespace: str, + resource_type_name: str, + resource_name: str, + **kwargs: Any +) -> HttpRequest: api_version = "2021-12-01" accept = "application/json" # Construct URL @@ -374,7 +376,6 @@ def build_list_event_types_request( **kwargs ) -# fmt: on class TopicsOperations(object): """TopicsOperations operations. @@ -400,11 +401,10 @@ def __init__(self, client, config, serializer, deserializer): @distributed_trace def get( self, - resource_group_name, # type: str - topic_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> "_models.Topic" + resource_group_name: str, + topic_name: str, + **kwargs: Any + ) -> "_models.Topic": """Get a topic. Get properties of a topic. @@ -453,12 +453,11 @@ def get( def _create_or_update_initial( self, - resource_group_name, # type: str - topic_name, # type: str - topic_info, # type: "_models.Topic" - **kwargs # type: Any - ): - # type: (...) -> "_models.Topic" + resource_group_name: str, + topic_name: str, + topic_info: "_models.Topic", + **kwargs: Any + ) -> "_models.Topic": cls = kwargs.pop('cls', None) # type: ClsType["_models.Topic"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -500,12 +499,11 @@ def _create_or_update_initial( @distributed_trace def begin_create_or_update( self, - resource_group_name, # type: str - topic_name, # type: str - topic_info, # type: "_models.Topic" - **kwargs # type: Any - ): - # type: (...) -> LROPoller["_models.Topic"] + resource_group_name: str, + topic_name: str, + topic_info: "_models.Topic", + **kwargs: Any + ) -> LROPoller["_models.Topic"]: """Create a topic. Asynchronously creates a new topic with the specified parameters. @@ -572,11 +570,10 @@ def get_long_running_output(pipeline_response): def _delete_initial( self, - resource_group_name, # type: str - topic_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> None + resource_group_name: str, + topic_name: str, + **kwargs: Any + ) -> None: cls = kwargs.pop('cls', None) # type: ClsType[None] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -609,11 +606,10 @@ def _delete_initial( @distributed_trace def begin_delete( self, - resource_group_name, # type: str - topic_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> LROPoller[None] + resource_group_name: str, + topic_name: str, + **kwargs: Any + ) -> LROPoller[None]: """Delete a topic. Delete existing topic. @@ -672,12 +668,11 @@ def get_long_running_output(pipeline_response): def _update_initial( self, - resource_group_name, # type: str - topic_name, # type: str - topic_update_parameters, # type: "_models.TopicUpdateParameters" - **kwargs # type: Any - ): - # type: (...) -> Optional["_models.Topic"] + resource_group_name: str, + topic_name: str, + topic_update_parameters: "_models.TopicUpdateParameters", + **kwargs: Any + ) -> Optional["_models.Topic"]: cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.Topic"]] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -721,12 +716,11 @@ def _update_initial( @distributed_trace def begin_update( self, - resource_group_name, # type: str - topic_name, # type: str - topic_update_parameters, # type: "_models.TopicUpdateParameters" - **kwargs # type: Any - ): - # type: (...) -> LROPoller["_models.Topic"] + resource_group_name: str, + topic_name: str, + topic_update_parameters: "_models.TopicUpdateParameters", + **kwargs: Any + ) -> LROPoller["_models.Topic"]: """Update a topic. Asynchronously updates a topic with the specified parameters. @@ -794,11 +788,10 @@ def get_long_running_output(pipeline_response): @distributed_trace def list_by_subscription( self, - filter=None, # type: Optional[str] - top=None, # type: Optional[int] - **kwargs # type: Any - ): - # type: (...) -> Iterable["_models.TopicsListResult"] + filter: Optional[str] = None, + top: Optional[int] = None, + **kwargs: Any + ) -> Iterable["_models.TopicsListResult"]: """List topics under an Azure subscription. List all the topics under an Azure subscription. @@ -877,12 +870,11 @@ def get_next(next_link=None): @distributed_trace def list_by_resource_group( self, - resource_group_name, # type: str - filter=None, # type: Optional[str] - top=None, # type: Optional[int] - **kwargs # type: Any - ): - # type: (...) -> Iterable["_models.TopicsListResult"] + resource_group_name: str, + filter: Optional[str] = None, + top: Optional[int] = None, + **kwargs: Any + ) -> Iterable["_models.TopicsListResult"]: """List topics under a resource group. List all the topics under a resource group. @@ -965,11 +957,10 @@ def get_next(next_link=None): @distributed_trace def list_shared_access_keys( self, - resource_group_name, # type: str - topic_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> "_models.TopicSharedAccessKeys" + resource_group_name: str, + topic_name: str, + **kwargs: Any + ) -> "_models.TopicSharedAccessKeys": """List keys for a topic. List the two keys used to publish to a topic. @@ -1018,12 +1009,11 @@ def list_shared_access_keys( def _regenerate_key_initial( self, - resource_group_name, # type: str - topic_name, # type: str - regenerate_key_request, # type: "_models.TopicRegenerateKeyRequest" - **kwargs # type: Any - ): - # type: (...) -> "_models.TopicSharedAccessKeys" + resource_group_name: str, + topic_name: str, + regenerate_key_request: "_models.TopicRegenerateKeyRequest", + **kwargs: Any + ) -> "_models.TopicSharedAccessKeys": cls = kwargs.pop('cls', None) # type: ClsType["_models.TopicSharedAccessKeys"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -1065,12 +1055,11 @@ def _regenerate_key_initial( @distributed_trace def begin_regenerate_key( self, - resource_group_name, # type: str - topic_name, # type: str - regenerate_key_request, # type: "_models.TopicRegenerateKeyRequest" - **kwargs # type: Any - ): - # type: (...) -> LROPoller["_models.TopicSharedAccessKeys"] + resource_group_name: str, + topic_name: str, + regenerate_key_request: "_models.TopicRegenerateKeyRequest", + **kwargs: Any + ) -> LROPoller["_models.TopicSharedAccessKeys"]: """Regenerate key for a topic. Regenerate a shared access key for a topic. @@ -1139,13 +1128,12 @@ def get_long_running_output(pipeline_response): @distributed_trace def list_event_types( self, - resource_group_name, # type: str - provider_namespace, # type: str - resource_type_name, # type: str - resource_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> Iterable["_models.EventTypesListResult"] + resource_group_name: str, + provider_namespace: str, + resource_type_name: str, + resource_name: str, + **kwargs: Any + ) -> Iterable["_models.EventTypesListResult"]: """List topic event types. List event types for a topic.