diff --git a/azure-mgmt-eventgrid/azure/mgmt/eventgrid/event_grid_management_client.py b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/event_grid_management_client.py index b0378dea24799..dec27a5a2357b 100644 --- a/azure-mgmt-eventgrid/azure/mgmt/eventgrid/event_grid_management_client.py +++ b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/event_grid_management_client.py @@ -13,8 +13,6 @@ from msrest import Serializer, Deserializer from msrestazure import AzureConfiguration from .version import VERSION -from .operations.domains_operations import DomainsOperations -from .operations.domain_topics_operations import DomainTopicsOperations from .operations.event_subscriptions_operations import EventSubscriptionsOperations from .operations.operations import Operations from .operations.topics_operations import TopicsOperations @@ -62,10 +60,6 @@ class EventGridManagementClient(SDKClient): :ivar config: Configuration for client. :vartype config: EventGridManagementClientConfiguration - :ivar domains: Domains operations - :vartype domains: azure.mgmt.eventgrid.operations.DomainsOperations - :ivar domain_topics: DomainTopics operations - :vartype domain_topics: azure.mgmt.eventgrid.operations.DomainTopicsOperations :ivar event_subscriptions: EventSubscriptions operations :vartype event_subscriptions: azure.mgmt.eventgrid.operations.EventSubscriptionsOperations :ivar operations: Operations operations @@ -92,14 +86,10 @@ def __init__( super(EventGridManagementClient, self).__init__(self.config.credentials, self.config) client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} - self.api_version = '2018-09-15-preview' + self.api_version = '2019-01-01' self._serialize = Serializer(client_models) self._deserialize = Deserializer(client_models) - self.domains = DomainsOperations( - self._client, self.config, self._serialize, self._deserialize) - self.domain_topics = DomainTopicsOperations( - self._client, self.config, self._serialize, self._deserialize) self.event_subscriptions = EventSubscriptionsOperations( self._client, self.config, self._serialize, self._deserialize) self.operations = Operations( diff --git a/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/__init__.py b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/__init__.py index 9a4da95511c0e..65f0a74d33e59 100644 --- a/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/__init__.py +++ b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/__init__.py @@ -10,31 +10,12 @@ # -------------------------------------------------------------------------- try: - from .input_schema_mapping_py3 import InputSchemaMapping - from .domain_py3 import Domain - from .domain_update_parameters_py3 import DomainUpdateParameters - from .domain_shared_access_keys_py3 import DomainSharedAccessKeys - from .domain_regenerate_key_request_py3 import DomainRegenerateKeyRequest - from .domain_topic_py3 import DomainTopic from .event_subscription_destination_py3 import EventSubscriptionDestination - from .advanced_filter_py3 import AdvancedFilter from .event_subscription_filter_py3 import EventSubscriptionFilter from .retry_policy_py3 import RetryPolicy from .dead_letter_destination_py3 import DeadLetterDestination from .resource_py3 import Resource - from .number_in_advanced_filter_py3 import NumberInAdvancedFilter from .storage_blob_dead_letter_destination_py3 import StorageBlobDeadLetterDestination - from .number_not_in_advanced_filter_py3 import NumberNotInAdvancedFilter - from .number_less_than_advanced_filter_py3 import NumberLessThanAdvancedFilter - from .number_greater_than_advanced_filter_py3 import NumberGreaterThanAdvancedFilter - from .number_less_than_or_equals_advanced_filter_py3 import NumberLessThanOrEqualsAdvancedFilter - from .number_greater_than_or_equals_advanced_filter_py3 import NumberGreaterThanOrEqualsAdvancedFilter - from .bool_equals_advanced_filter_py3 import BoolEqualsAdvancedFilter - from .string_in_advanced_filter_py3 import StringInAdvancedFilter - from .string_not_in_advanced_filter_py3 import StringNotInAdvancedFilter - from .string_begins_with_advanced_filter_py3 import StringBeginsWithAdvancedFilter - from .string_ends_with_advanced_filter_py3 import StringEndsWithAdvancedFilter - from .string_contains_advanced_filter_py3 import StringContainsAdvancedFilter from .web_hook_event_subscription_destination_py3 import WebHookEventSubscriptionDestination from .event_hub_event_subscription_destination_py3 import EventHubEventSubscriptionDestination from .storage_queue_event_subscription_destination_py3 import StorageQueueEventSubscriptionDestination @@ -44,9 +25,6 @@ from .event_subscription_full_url_py3 import EventSubscriptionFullUrl from .operation_info_py3 import OperationInfo from .operation_py3 import Operation - from .json_field_py3 import JsonField - from .json_field_with_default_py3 import JsonFieldWithDefault - from .json_input_schema_mapping_py3 import JsonInputSchemaMapping from .tracked_resource_py3 import TrackedResource from .topic_py3 import Topic from .topic_update_parameters_py3 import TopicUpdateParameters @@ -55,31 +33,12 @@ from .event_type_py3 import EventType from .topic_type_info_py3 import TopicTypeInfo except (SyntaxError, ImportError): - from .input_schema_mapping import InputSchemaMapping - from .domain import Domain - from .domain_update_parameters import DomainUpdateParameters - from .domain_shared_access_keys import DomainSharedAccessKeys - from .domain_regenerate_key_request import DomainRegenerateKeyRequest - from .domain_topic import DomainTopic from .event_subscription_destination import EventSubscriptionDestination - from .advanced_filter import AdvancedFilter from .event_subscription_filter import EventSubscriptionFilter from .retry_policy import RetryPolicy from .dead_letter_destination import DeadLetterDestination from .resource import Resource - from .number_in_advanced_filter import NumberInAdvancedFilter from .storage_blob_dead_letter_destination import StorageBlobDeadLetterDestination - from .number_not_in_advanced_filter import NumberNotInAdvancedFilter - from .number_less_than_advanced_filter import NumberLessThanAdvancedFilter - from .number_greater_than_advanced_filter import NumberGreaterThanAdvancedFilter - from .number_less_than_or_equals_advanced_filter import NumberLessThanOrEqualsAdvancedFilter - from .number_greater_than_or_equals_advanced_filter import NumberGreaterThanOrEqualsAdvancedFilter - from .bool_equals_advanced_filter import BoolEqualsAdvancedFilter - from .string_in_advanced_filter import StringInAdvancedFilter - from .string_not_in_advanced_filter import StringNotInAdvancedFilter - from .string_begins_with_advanced_filter import StringBeginsWithAdvancedFilter - from .string_ends_with_advanced_filter import StringEndsWithAdvancedFilter - from .string_contains_advanced_filter import StringContainsAdvancedFilter from .web_hook_event_subscription_destination import WebHookEventSubscriptionDestination from .event_hub_event_subscription_destination import EventHubEventSubscriptionDestination from .storage_queue_event_subscription_destination import StorageQueueEventSubscriptionDestination @@ -89,9 +48,6 @@ from .event_subscription_full_url import EventSubscriptionFullUrl from .operation_info import OperationInfo from .operation import Operation - from .json_field import JsonField - from .json_field_with_default import JsonFieldWithDefault - from .json_input_schema_mapping import JsonInputSchemaMapping from .tracked_resource import TrackedResource from .topic import Topic from .topic_update_parameters import TopicUpdateParameters @@ -99,49 +55,25 @@ from .topic_regenerate_key_request import TopicRegenerateKeyRequest from .event_type import EventType from .topic_type_info import TopicTypeInfo -from .domain_paged import DomainPaged -from .domain_topic_paged import DomainTopicPaged from .event_subscription_paged import EventSubscriptionPaged from .operation_paged import OperationPaged from .topic_paged import TopicPaged from .event_type_paged import EventTypePaged from .topic_type_info_paged import TopicTypeInfoPaged from .event_grid_management_client_enums import ( - DomainProvisioningState, - InputSchema, EventSubscriptionProvisioningState, - EventDeliverySchema, TopicProvisioningState, ResourceRegionType, TopicTypeProvisioningState, ) __all__ = [ - 'InputSchemaMapping', - 'Domain', - 'DomainUpdateParameters', - 'DomainSharedAccessKeys', - 'DomainRegenerateKeyRequest', - 'DomainTopic', 'EventSubscriptionDestination', - 'AdvancedFilter', 'EventSubscriptionFilter', 'RetryPolicy', 'DeadLetterDestination', 'Resource', - 'NumberInAdvancedFilter', 'StorageBlobDeadLetterDestination', - 'NumberNotInAdvancedFilter', - 'NumberLessThanAdvancedFilter', - 'NumberGreaterThanAdvancedFilter', - 'NumberLessThanOrEqualsAdvancedFilter', - 'NumberGreaterThanOrEqualsAdvancedFilter', - 'BoolEqualsAdvancedFilter', - 'StringInAdvancedFilter', - 'StringNotInAdvancedFilter', - 'StringBeginsWithAdvancedFilter', - 'StringEndsWithAdvancedFilter', - 'StringContainsAdvancedFilter', 'WebHookEventSubscriptionDestination', 'EventHubEventSubscriptionDestination', 'StorageQueueEventSubscriptionDestination', @@ -151,9 +83,6 @@ 'EventSubscriptionFullUrl', 'OperationInfo', 'Operation', - 'JsonField', - 'JsonFieldWithDefault', - 'JsonInputSchemaMapping', 'TrackedResource', 'Topic', 'TopicUpdateParameters', @@ -161,17 +90,12 @@ 'TopicRegenerateKeyRequest', 'EventType', 'TopicTypeInfo', - 'DomainPaged', - 'DomainTopicPaged', 'EventSubscriptionPaged', 'OperationPaged', 'TopicPaged', 'EventTypePaged', 'TopicTypeInfoPaged', - 'DomainProvisioningState', - 'InputSchema', 'EventSubscriptionProvisioningState', - 'EventDeliverySchema', 'TopicProvisioningState', 'ResourceRegionType', 'TopicTypeProvisioningState', diff --git a/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/advanced_filter.py b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/advanced_filter.py deleted file mode 100644 index 988b8cf757227..0000000000000 --- a/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/advanced_filter.py +++ /dev/null @@ -1,53 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class AdvancedFilter(Model): - """Represents an advanced filter that can be used to filter events based on - various event envelope/data fields. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: NumberInAdvancedFilter, NumberNotInAdvancedFilter, - NumberLessThanAdvancedFilter, NumberGreaterThanAdvancedFilter, - NumberLessThanOrEqualsAdvancedFilter, - NumberGreaterThanOrEqualsAdvancedFilter, BoolEqualsAdvancedFilter, - StringInAdvancedFilter, StringNotInAdvancedFilter, - StringBeginsWithAdvancedFilter, StringEndsWithAdvancedFilter, - StringContainsAdvancedFilter - - All required parameters must be populated in order to send to Azure. - - :param key: The filter key. Represents an event property with up to two - levels of nesting. - :type key: str - :param operator_type: Required. Constant filled by server. - :type operator_type: str - """ - - _validation = { - 'operator_type': {'required': True}, - } - - _attribute_map = { - 'key': {'key': 'key', 'type': 'str'}, - 'operator_type': {'key': 'operatorType', 'type': 'str'}, - } - - _subtype_map = { - 'operator_type': {'NumberIn': 'NumberInAdvancedFilter', 'NumberNotIn': 'NumberNotInAdvancedFilter', 'NumberLessThan': 'NumberLessThanAdvancedFilter', 'NumberGreaterThan': 'NumberGreaterThanAdvancedFilter', 'NumberLessThanOrEquals': 'NumberLessThanOrEqualsAdvancedFilter', 'NumberGreaterThanOrEquals': 'NumberGreaterThanOrEqualsAdvancedFilter', 'BoolEquals': 'BoolEqualsAdvancedFilter', 'StringIn': 'StringInAdvancedFilter', 'StringNotIn': 'StringNotInAdvancedFilter', 'StringBeginsWith': 'StringBeginsWithAdvancedFilter', 'StringEndsWith': 'StringEndsWithAdvancedFilter', 'StringContains': 'StringContainsAdvancedFilter'} - } - - def __init__(self, **kwargs): - super(AdvancedFilter, self).__init__(**kwargs) - self.key = kwargs.get('key', None) - self.operator_type = None diff --git a/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/advanced_filter_py3.py b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/advanced_filter_py3.py deleted file mode 100644 index 4dbb22f3e88c7..0000000000000 --- a/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/advanced_filter_py3.py +++ /dev/null @@ -1,53 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class AdvancedFilter(Model): - """Represents an advanced filter that can be used to filter events based on - various event envelope/data fields. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: NumberInAdvancedFilter, NumberNotInAdvancedFilter, - NumberLessThanAdvancedFilter, NumberGreaterThanAdvancedFilter, - NumberLessThanOrEqualsAdvancedFilter, - NumberGreaterThanOrEqualsAdvancedFilter, BoolEqualsAdvancedFilter, - StringInAdvancedFilter, StringNotInAdvancedFilter, - StringBeginsWithAdvancedFilter, StringEndsWithAdvancedFilter, - StringContainsAdvancedFilter - - All required parameters must be populated in order to send to Azure. - - :param key: The filter key. Represents an event property with up to two - levels of nesting. - :type key: str - :param operator_type: Required. Constant filled by server. - :type operator_type: str - """ - - _validation = { - 'operator_type': {'required': True}, - } - - _attribute_map = { - 'key': {'key': 'key', 'type': 'str'}, - 'operator_type': {'key': 'operatorType', 'type': 'str'}, - } - - _subtype_map = { - 'operator_type': {'NumberIn': 'NumberInAdvancedFilter', 'NumberNotIn': 'NumberNotInAdvancedFilter', 'NumberLessThan': 'NumberLessThanAdvancedFilter', 'NumberGreaterThan': 'NumberGreaterThanAdvancedFilter', 'NumberLessThanOrEquals': 'NumberLessThanOrEqualsAdvancedFilter', 'NumberGreaterThanOrEquals': 'NumberGreaterThanOrEqualsAdvancedFilter', 'BoolEquals': 'BoolEqualsAdvancedFilter', 'StringIn': 'StringInAdvancedFilter', 'StringNotIn': 'StringNotInAdvancedFilter', 'StringBeginsWith': 'StringBeginsWithAdvancedFilter', 'StringEndsWith': 'StringEndsWithAdvancedFilter', 'StringContains': 'StringContainsAdvancedFilter'} - } - - def __init__(self, *, key: str=None, **kwargs) -> None: - super(AdvancedFilter, self).__init__(**kwargs) - self.key = key - self.operator_type = None diff --git a/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/bool_equals_advanced_filter.py b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/bool_equals_advanced_filter.py deleted file mode 100644 index 6580921e3b484..0000000000000 --- a/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/bool_equals_advanced_filter.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .advanced_filter import AdvancedFilter - - -class BoolEqualsAdvancedFilter(AdvancedFilter): - """BoolEquals Filter. - - All required parameters must be populated in order to send to Azure. - - :param key: The filter key. Represents an event property with up to two - levels of nesting. - :type key: str - :param operator_type: Required. Constant filled by server. - :type operator_type: str - :param value: The filter value - :type value: bool - """ - - _validation = { - 'operator_type': {'required': True}, - } - - _attribute_map = { - 'key': {'key': 'key', 'type': 'str'}, - 'operator_type': {'key': 'operatorType', 'type': 'str'}, - 'value': {'key': 'value', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(BoolEqualsAdvancedFilter, self).__init__(**kwargs) - self.value = kwargs.get('value', None) - self.operator_type = 'BoolEquals' diff --git a/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/bool_equals_advanced_filter_py3.py b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/bool_equals_advanced_filter_py3.py deleted file mode 100644 index 28b686dd13b24..0000000000000 --- a/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/bool_equals_advanced_filter_py3.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .advanced_filter_py3 import AdvancedFilter - - -class BoolEqualsAdvancedFilter(AdvancedFilter): - """BoolEquals Filter. - - All required parameters must be populated in order to send to Azure. - - :param key: The filter key. Represents an event property with up to two - levels of nesting. - :type key: str - :param operator_type: Required. Constant filled by server. - :type operator_type: str - :param value: The filter value - :type value: bool - """ - - _validation = { - 'operator_type': {'required': True}, - } - - _attribute_map = { - 'key': {'key': 'key', 'type': 'str'}, - 'operator_type': {'key': 'operatorType', 'type': 'str'}, - 'value': {'key': 'value', 'type': 'bool'}, - } - - def __init__(self, *, key: str=None, value: bool=None, **kwargs) -> None: - super(BoolEqualsAdvancedFilter, self).__init__(key=key, **kwargs) - self.value = value - self.operator_type = 'BoolEquals' diff --git a/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/domain.py b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/domain.py deleted file mode 100644 index 868394ac75f0f..0000000000000 --- a/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/domain.py +++ /dev/null @@ -1,76 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .tracked_resource import TrackedResource - - -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 - :param location: Required. Location of the resource - :type location: str - :param tags: Tags of the resource - :type tags: dict[str, str] - :ivar provisioning_state: Provisioning state of the domain. 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 - :param input_schema: This determines the format that Event Grid should - expect for incoming events published to the domain. Possible values - include: 'EventGridSchema', 'CustomEventSchema', 'CloudEventV01Schema' - :type input_schema: str or ~azure.mgmt.eventgrid.models.InputSchema - :param input_schema_mapping: Information about the InputSchemaMapping - which specified the info about mapping event payload. - :type input_schema_mapping: - ~azure.mgmt.eventgrid.models.InputSchemaMapping - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'provisioning_state': {'readonly': True}, - 'endpoint': {'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}'}, - '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'}, - } - - def __init__(self, **kwargs): - super(Domain, self).__init__(**kwargs) - 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) diff --git a/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/domain_paged.py b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/domain_paged.py deleted file mode 100644 index ed7fa29c57860..0000000000000 --- a/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/domain_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class DomainPaged(Paged): - """ - A paging container for iterating over a list of :class:`Domain ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[Domain]'} - } - - def __init__(self, *args, **kwargs): - - super(DomainPaged, self).__init__(*args, **kwargs) diff --git a/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/domain_py3.py b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/domain_py3.py deleted file mode 100644 index 3ad4d5ed9b644..0000000000000 --- a/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/domain_py3.py +++ /dev/null @@ -1,76 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .tracked_resource_py3 import TrackedResource - - -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 - :param location: Required. Location of the resource - :type location: str - :param tags: Tags of the resource - :type tags: dict[str, str] - :ivar provisioning_state: Provisioning state of the domain. 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 - :param input_schema: This determines the format that Event Grid should - expect for incoming events published to the domain. Possible values - include: 'EventGridSchema', 'CustomEventSchema', 'CloudEventV01Schema' - :type input_schema: str or ~azure.mgmt.eventgrid.models.InputSchema - :param input_schema_mapping: Information about the InputSchemaMapping - which specified the info about mapping event payload. - :type input_schema_mapping: - ~azure.mgmt.eventgrid.models.InputSchemaMapping - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'provisioning_state': {'readonly': True}, - 'endpoint': {'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}'}, - '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'}, - } - - def __init__(self, *, location: str, tags=None, input_schema=None, input_schema_mapping=None, **kwargs) -> None: - super(Domain, self).__init__(location=location, tags=tags, **kwargs) - self.provisioning_state = None - self.endpoint = None - self.input_schema = input_schema - self.input_schema_mapping = input_schema_mapping diff --git a/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/domain_regenerate_key_request.py b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/domain_regenerate_key_request.py deleted file mode 100644 index cacf0e74fb26f..0000000000000 --- a/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/domain_regenerate_key_request.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DomainRegenerateKeyRequest(Model): - """Domain regenerate share access key request. - - All required parameters must be populated in order to send to Azure. - - :param key_name: Required. Key name to regenerate key1 or key2 - :type key_name: str - """ - - _validation = { - 'key_name': {'required': True}, - } - - _attribute_map = { - 'key_name': {'key': 'keyName', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(DomainRegenerateKeyRequest, self).__init__(**kwargs) - self.key_name = kwargs.get('key_name', None) diff --git a/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/domain_regenerate_key_request_py3.py b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/domain_regenerate_key_request_py3.py deleted file mode 100644 index 9d024c87c0c63..0000000000000 --- a/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/domain_regenerate_key_request_py3.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DomainRegenerateKeyRequest(Model): - """Domain regenerate share access key request. - - All required parameters must be populated in order to send to Azure. - - :param key_name: Required. Key name to regenerate key1 or key2 - :type key_name: str - """ - - _validation = { - 'key_name': {'required': True}, - } - - _attribute_map = { - 'key_name': {'key': 'keyName', 'type': 'str'}, - } - - def __init__(self, *, key_name: str, **kwargs) -> None: - super(DomainRegenerateKeyRequest, self).__init__(**kwargs) - self.key_name = key_name diff --git a/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/domain_shared_access_keys.py b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/domain_shared_access_keys.py deleted file mode 100644 index d04032da49817..0000000000000 --- a/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/domain_shared_access_keys.py +++ /dev/null @@ -1,32 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DomainSharedAccessKeys(Model): - """Shared access keys of the Domain. - - :param key1: Shared access key1 for the domain. - :type key1: str - :param key2: Shared access key2 for the domain. - :type key2: str - """ - - _attribute_map = { - 'key1': {'key': 'key1', 'type': 'str'}, - 'key2': {'key': 'key2', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(DomainSharedAccessKeys, self).__init__(**kwargs) - self.key1 = kwargs.get('key1', None) - self.key2 = kwargs.get('key2', None) diff --git a/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/domain_shared_access_keys_py3.py b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/domain_shared_access_keys_py3.py deleted file mode 100644 index 2c13d4ab0367a..0000000000000 --- a/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/domain_shared_access_keys_py3.py +++ /dev/null @@ -1,32 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DomainSharedAccessKeys(Model): - """Shared access keys of the Domain. - - :param key1: Shared access key1 for the domain. - :type key1: str - :param key2: Shared access key2 for the domain. - :type key2: str - """ - - _attribute_map = { - 'key1': {'key': 'key1', 'type': 'str'}, - 'key2': {'key': 'key2', 'type': 'str'}, - } - - def __init__(self, *, key1: str=None, key2: str=None, **kwargs) -> None: - super(DomainSharedAccessKeys, self).__init__(**kwargs) - self.key1 = key1 - self.key2 = key2 diff --git a/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/domain_topic.py b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/domain_topic.py deleted file mode 100644 index df6ae9d607d40..0000000000000 --- a/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/domain_topic.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class 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 - """ - - _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(DomainTopic, self).__init__(**kwargs) diff --git a/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/domain_topic_paged.py b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/domain_topic_paged.py deleted file mode 100644 index b5f599064d3ef..0000000000000 --- a/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/domain_topic_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class DomainTopicPaged(Paged): - """ - A paging container for iterating over a list of :class:`DomainTopic ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[DomainTopic]'} - } - - def __init__(self, *args, **kwargs): - - super(DomainTopicPaged, self).__init__(*args, **kwargs) diff --git a/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/domain_topic_py3.py b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/domain_topic_py3.py deleted file mode 100644 index 04e31b7eae800..0000000000000 --- a/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/domain_topic_py3.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource_py3 import Resource - - -class 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 - """ - - _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) -> None: - super(DomainTopic, self).__init__(**kwargs) diff --git a/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/domain_update_parameters.py b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/domain_update_parameters.py deleted file mode 100644 index 1bc4fca2bc304..0000000000000 --- a/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/domain_update_parameters.py +++ /dev/null @@ -1,28 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DomainUpdateParameters(Model): - """Properties of the Domain update. - - :param tags: Tags of the domains resource - :type tags: dict[str, str] - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, **kwargs): - super(DomainUpdateParameters, self).__init__(**kwargs) - self.tags = kwargs.get('tags', None) diff --git a/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/domain_update_parameters_py3.py b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/domain_update_parameters_py3.py deleted file mode 100644 index f876c6e4adbd2..0000000000000 --- a/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/domain_update_parameters_py3.py +++ /dev/null @@ -1,28 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DomainUpdateParameters(Model): - """Properties of the Domain update. - - :param tags: Tags of the domains resource - :type tags: dict[str, str] - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, *, tags=None, **kwargs) -> None: - super(DomainUpdateParameters, self).__init__(**kwargs) - self.tags = tags diff --git a/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/event_grid_management_client_enums.py b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/event_grid_management_client_enums.py index 2c766d90cdb4f..463b59d14609e 100644 --- a/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/event_grid_management_client_enums.py +++ b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/event_grid_management_client_enums.py @@ -12,23 +12,6 @@ from enum import Enum -class DomainProvisioningState(str, Enum): - - creating = "Creating" - updating = "Updating" - deleting = "Deleting" - succeeded = "Succeeded" - canceled = "Canceled" - failed = "Failed" - - -class InputSchema(str, Enum): - - event_grid_schema = "EventGridSchema" - custom_event_schema = "CustomEventSchema" - cloud_event_v01_schema = "CloudEventV01Schema" - - class EventSubscriptionProvisioningState(str, Enum): creating = "Creating" @@ -40,13 +23,6 @@ class EventSubscriptionProvisioningState(str, Enum): awaiting_manual_action = "AwaitingManualAction" -class EventDeliverySchema(str, Enum): - - event_grid_schema = "EventGridSchema" - cloud_event_v01_schema = "CloudEventV01Schema" - custom_input_schema = "CustomInputSchema" - - class TopicProvisioningState(str, Enum): creating = "Creating" diff --git a/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/event_subscription.py b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/event_subscription.py index fb5f0a3419ce6..87bf3cc474828 100644 --- a/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/event_subscription.py +++ b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/event_subscription.py @@ -39,13 +39,6 @@ class EventSubscription(Resource): :type filter: ~azure.mgmt.eventgrid.models.EventSubscriptionFilter :param labels: List of user defined labels. :type labels: list[str] - :param expiration_time_utc: Expiration time of the event subscription. - :type expiration_time_utc: datetime - :param event_delivery_schema: The event delivery schema for the event - subscription. Possible values include: 'EventGridSchema', - 'CloudEventV01Schema', 'CustomInputSchema' - :type event_delivery_schema: str or - ~azure.mgmt.eventgrid.models.EventDeliverySchema :param retry_policy: The retry policy for events. This can be used to configure maximum number of delivery attempts and time to live for events. :type retry_policy: ~azure.mgmt.eventgrid.models.RetryPolicy @@ -72,8 +65,6 @@ class EventSubscription(Resource): 'destination': {'key': 'properties.destination', 'type': 'EventSubscriptionDestination'}, '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'}, } @@ -85,7 +76,5 @@ def __init__(self, **kwargs): self.destination = kwargs.get('destination', 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) diff --git a/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/event_subscription_filter.py b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/event_subscription_filter.py index df5e5050e6047..0b2466b19281d 100644 --- a/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/event_subscription_filter.py +++ b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/event_subscription_filter.py @@ -33,8 +33,6 @@ class EventSubscriptionFilter(Model): SubjectEndsWith properties of the filter should be compared in a case sensitive manner. Default value: False . :type is_subject_case_sensitive: bool - :param advanced_filters: A list of advanced filters. - :type advanced_filters: list[~azure.mgmt.eventgrid.models.AdvancedFilter] """ _attribute_map = { @@ -42,7 +40,6 @@ class EventSubscriptionFilter(Model): 'subject_ends_with': {'key': 'subjectEndsWith', 'type': 'str'}, 'included_event_types': {'key': 'includedEventTypes', 'type': '[str]'}, 'is_subject_case_sensitive': {'key': 'isSubjectCaseSensitive', 'type': 'bool'}, - 'advanced_filters': {'key': 'advancedFilters', 'type': '[AdvancedFilter]'}, } def __init__(self, **kwargs): @@ -51,4 +48,3 @@ def __init__(self, **kwargs): 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.advanced_filters = kwargs.get('advanced_filters', None) diff --git a/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/event_subscription_filter_py3.py b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/event_subscription_filter_py3.py index 16c946cd2363f..cc9ddbce65d21 100644 --- a/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/event_subscription_filter_py3.py +++ b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/event_subscription_filter_py3.py @@ -33,8 +33,6 @@ class EventSubscriptionFilter(Model): SubjectEndsWith properties of the filter should be compared in a case sensitive manner. Default value: False . :type is_subject_case_sensitive: bool - :param advanced_filters: A list of advanced filters. - :type advanced_filters: list[~azure.mgmt.eventgrid.models.AdvancedFilter] """ _attribute_map = { @@ -42,13 +40,11 @@ class EventSubscriptionFilter(Model): 'subject_ends_with': {'key': 'subjectEndsWith', 'type': 'str'}, 'included_event_types': {'key': 'includedEventTypes', 'type': '[str]'}, 'is_subject_case_sensitive': {'key': 'isSubjectCaseSensitive', 'type': 'bool'}, - 'advanced_filters': {'key': 'advancedFilters', 'type': '[AdvancedFilter]'}, } - def __init__(self, *, subject_begins_with: str=None, subject_ends_with: str=None, included_event_types=None, is_subject_case_sensitive: bool=False, advanced_filters=None, **kwargs) -> None: + def __init__(self, *, subject_begins_with: str=None, subject_ends_with: str=None, included_event_types=None, is_subject_case_sensitive: bool=False, **kwargs) -> None: super(EventSubscriptionFilter, self).__init__(**kwargs) self.subject_begins_with = subject_begins_with self.subject_ends_with = subject_ends_with self.included_event_types = included_event_types self.is_subject_case_sensitive = is_subject_case_sensitive - self.advanced_filters = advanced_filters diff --git a/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/event_subscription_py3.py b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/event_subscription_py3.py index 246622ce37022..7d69c6cfe5b17 100644 --- a/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/event_subscription_py3.py +++ b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/event_subscription_py3.py @@ -39,13 +39,6 @@ class EventSubscription(Resource): :type filter: ~azure.mgmt.eventgrid.models.EventSubscriptionFilter :param labels: List of user defined labels. :type labels: list[str] - :param expiration_time_utc: Expiration time of the event subscription. - :type expiration_time_utc: datetime - :param event_delivery_schema: The event delivery schema for the event - subscription. Possible values include: 'EventGridSchema', - 'CloudEventV01Schema', 'CustomInputSchema' - :type event_delivery_schema: str or - ~azure.mgmt.eventgrid.models.EventDeliverySchema :param retry_policy: The retry policy for events. This can be used to configure maximum number of delivery attempts and time to live for events. :type retry_policy: ~azure.mgmt.eventgrid.models.RetryPolicy @@ -72,20 +65,16 @@ class EventSubscription(Resource): 'destination': {'key': 'properties.destination', 'type': 'EventSubscriptionDestination'}, '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'}, } - def __init__(self, *, destination=None, filter=None, labels=None, expiration_time_utc=None, event_delivery_schema=None, retry_policy=None, dead_letter_destination=None, **kwargs) -> None: + def __init__(self, *, destination=None, filter=None, labels=None, retry_policy=None, dead_letter_destination=None, **kwargs) -> None: super(EventSubscription, self).__init__(**kwargs) self.topic = None self.provisioning_state = None self.destination = destination self.filter = filter self.labels = labels - self.expiration_time_utc = expiration_time_utc - self.event_delivery_schema = event_delivery_schema self.retry_policy = retry_policy self.dead_letter_destination = dead_letter_destination diff --git a/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/event_subscription_update_parameters.py b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/event_subscription_update_parameters.py index 5371a06679cc0..81aea2f064301 100644 --- a/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/event_subscription_update_parameters.py +++ b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/event_subscription_update_parameters.py @@ -23,14 +23,6 @@ class EventSubscriptionUpdateParameters(Model): :type filter: ~azure.mgmt.eventgrid.models.EventSubscriptionFilter :param labels: List of user defined labels. :type labels: list[str] - :param expiration_time_utc: Information about the expiration time for the - event subscription. - :type expiration_time_utc: datetime - :param event_delivery_schema: The event delivery schema for the event - subscription. Possible values include: 'EventGridSchema', - 'CloudEventV01Schema', 'CustomInputSchema' - :type event_delivery_schema: str or - ~azure.mgmt.eventgrid.models.EventDeliverySchema :param retry_policy: The retry policy for events. This can be used to configure maximum number of delivery attempts and time to live for events. :type retry_policy: ~azure.mgmt.eventgrid.models.RetryPolicy @@ -44,8 +36,6 @@ class EventSubscriptionUpdateParameters(Model): 'destination': {'key': 'destination', 'type': 'EventSubscriptionDestination'}, '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'}, } @@ -55,7 +45,5 @@ def __init__(self, **kwargs): self.destination = kwargs.get('destination', 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) diff --git a/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/event_subscription_update_parameters_py3.py b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/event_subscription_update_parameters_py3.py index 3f415aa3e8cbd..7f52b18c6abe7 100644 --- a/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/event_subscription_update_parameters_py3.py +++ b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/event_subscription_update_parameters_py3.py @@ -23,14 +23,6 @@ class EventSubscriptionUpdateParameters(Model): :type filter: ~azure.mgmt.eventgrid.models.EventSubscriptionFilter :param labels: List of user defined labels. :type labels: list[str] - :param expiration_time_utc: Information about the expiration time for the - event subscription. - :type expiration_time_utc: datetime - :param event_delivery_schema: The event delivery schema for the event - subscription. Possible values include: 'EventGridSchema', - 'CloudEventV01Schema', 'CustomInputSchema' - :type event_delivery_schema: str or - ~azure.mgmt.eventgrid.models.EventDeliverySchema :param retry_policy: The retry policy for events. This can be used to configure maximum number of delivery attempts and time to live for events. :type retry_policy: ~azure.mgmt.eventgrid.models.RetryPolicy @@ -44,18 +36,14 @@ class EventSubscriptionUpdateParameters(Model): 'destination': {'key': 'destination', 'type': 'EventSubscriptionDestination'}, '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'}, } - def __init__(self, *, destination=None, filter=None, labels=None, expiration_time_utc=None, event_delivery_schema=None, retry_policy=None, dead_letter_destination=None, **kwargs) -> None: + def __init__(self, *, destination=None, filter=None, labels=None, retry_policy=None, dead_letter_destination=None, **kwargs) -> None: super(EventSubscriptionUpdateParameters, self).__init__(**kwargs) self.destination = destination self.filter = filter self.labels = labels - self.expiration_time_utc = expiration_time_utc - self.event_delivery_schema = event_delivery_schema self.retry_policy = retry_policy self.dead_letter_destination = dead_letter_destination diff --git a/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/input_schema_mapping.py b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/input_schema_mapping.py deleted file mode 100644 index f99596238470f..0000000000000 --- a/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/input_schema_mapping.py +++ /dev/null @@ -1,44 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class InputSchemaMapping(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. - - :param input_schema_mapping_type: Required. Constant filled by server. - :type input_schema_mapping_type: str - """ - - _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 diff --git a/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/input_schema_mapping_py3.py b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/input_schema_mapping_py3.py deleted file mode 100644 index b3a12a359f626..0000000000000 --- a/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/input_schema_mapping_py3.py +++ /dev/null @@ -1,44 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class InputSchemaMapping(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. - - :param input_schema_mapping_type: Required. Constant filled by server. - :type input_schema_mapping_type: str - """ - - _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) -> None: - super(InputSchemaMapping, self).__init__(**kwargs) - self.input_schema_mapping_type = None diff --git a/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/json_field.py b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/json_field.py deleted file mode 100644 index fa4ce2931a2d6..0000000000000 --- a/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/json_field.py +++ /dev/null @@ -1,32 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class JsonField(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. - - :param source_field: Name of a field in the input event schema that's to - be used as the source of a mapping. - :type source_field: str - """ - - _attribute_map = { - 'source_field': {'key': 'sourceField', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(JsonField, self).__init__(**kwargs) - self.source_field = kwargs.get('source_field', None) diff --git a/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/json_field_py3.py b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/json_field_py3.py deleted file mode 100644 index 645fc50b4dc9c..0000000000000 --- a/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/json_field_py3.py +++ /dev/null @@ -1,32 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class JsonField(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. - - :param source_field: Name of a field in the input event schema that's to - be used as the source of a mapping. - :type source_field: str - """ - - _attribute_map = { - 'source_field': {'key': 'sourceField', 'type': 'str'}, - } - - def __init__(self, *, source_field: str=None, **kwargs) -> None: - super(JsonField, self).__init__(**kwargs) - self.source_field = source_field diff --git a/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/json_field_with_default.py b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/json_field_with_default.py deleted file mode 100644 index 4e79cc53c6627..0000000000000 --- a/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/json_field_with_default.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class JsonFieldWithDefault(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. - - :param source_field: Name of a field in the input event schema that's to - be used as the source of a mapping. - :type source_field: str - :param 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. - :type default_value: str - """ - - _attribute_map = { - 'source_field': {'key': 'sourceField', 'type': 'str'}, - 'default_value': {'key': 'defaultValue', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(JsonFieldWithDefault, self).__init__(**kwargs) - self.source_field = kwargs.get('source_field', None) - self.default_value = kwargs.get('default_value', None) diff --git a/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/json_field_with_default_py3.py b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/json_field_with_default_py3.py deleted file mode 100644 index 7484332cc68c5..0000000000000 --- a/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/json_field_with_default_py3.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class JsonFieldWithDefault(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. - - :param source_field: Name of a field in the input event schema that's to - be used as the source of a mapping. - :type source_field: str - :param 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. - :type default_value: str - """ - - _attribute_map = { - 'source_field': {'key': 'sourceField', 'type': 'str'}, - 'default_value': {'key': 'defaultValue', 'type': 'str'}, - } - - def __init__(self, *, source_field: str=None, default_value: str=None, **kwargs) -> None: - super(JsonFieldWithDefault, self).__init__(**kwargs) - self.source_field = source_field - self.default_value = default_value diff --git a/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/json_input_schema_mapping.py b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/json_input_schema_mapping.py deleted file mode 100644 index a7635fe6717e1..0000000000000 --- a/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/json_input_schema_mapping.py +++ /dev/null @@ -1,66 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .input_schema_mapping import InputSchemaMapping - - -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. - - :param input_schema_mapping_type: Required. Constant filled by server. - :type input_schema_mapping_type: str - :param id: The mapping information for the Id property of the Event Grid - Event. - :type id: ~azure.mgmt.eventgrid.models.JsonField - :param topic: The mapping information for the Topic property of the Event - Grid Event. - :type topic: ~azure.mgmt.eventgrid.models.JsonField - :param event_time: The mapping information for the EventTime property of - the Event Grid Event. - :type event_time: ~azure.mgmt.eventgrid.models.JsonField - :param event_type: The mapping information for the EventType property of - the Event Grid Event. - :type event_type: ~azure.mgmt.eventgrid.models.JsonFieldWithDefault - :param subject: The mapping information for the Subject property of the - Event Grid Event. - :type subject: ~azure.mgmt.eventgrid.models.JsonFieldWithDefault - :param data_version: The mapping information for the DataVersion property - of the Event Grid Event. - :type 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): - super(JsonInputSchemaMapping, self).__init__(**kwargs) - 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) - self.input_schema_mapping_type = 'Json' diff --git a/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/json_input_schema_mapping_py3.py b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/json_input_schema_mapping_py3.py deleted file mode 100644 index 4d3ff8a1b8f44..0000000000000 --- a/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/json_input_schema_mapping_py3.py +++ /dev/null @@ -1,66 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .input_schema_mapping_py3 import InputSchemaMapping - - -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. - - :param input_schema_mapping_type: Required. Constant filled by server. - :type input_schema_mapping_type: str - :param id: The mapping information for the Id property of the Event Grid - Event. - :type id: ~azure.mgmt.eventgrid.models.JsonField - :param topic: The mapping information for the Topic property of the Event - Grid Event. - :type topic: ~azure.mgmt.eventgrid.models.JsonField - :param event_time: The mapping information for the EventTime property of - the Event Grid Event. - :type event_time: ~azure.mgmt.eventgrid.models.JsonField - :param event_type: The mapping information for the EventType property of - the Event Grid Event. - :type event_type: ~azure.mgmt.eventgrid.models.JsonFieldWithDefault - :param subject: The mapping information for the Subject property of the - Event Grid Event. - :type subject: ~azure.mgmt.eventgrid.models.JsonFieldWithDefault - :param data_version: The mapping information for the DataVersion property - of the Event Grid Event. - :type 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, *, id=None, topic=None, event_time=None, event_type=None, subject=None, data_version=None, **kwargs) -> None: - super(JsonInputSchemaMapping, self).__init__(**kwargs) - self.id = id - self.topic = topic - self.event_time = event_time - self.event_type = event_type - self.subject = subject - self.data_version = data_version - self.input_schema_mapping_type = 'Json' diff --git a/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/number_greater_than_advanced_filter.py b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/number_greater_than_advanced_filter.py deleted file mode 100644 index 81f1792ba2556..0000000000000 --- a/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/number_greater_than_advanced_filter.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .advanced_filter import AdvancedFilter - - -class NumberGreaterThanAdvancedFilter(AdvancedFilter): - """NumberGreaterThan Filter. - - All required parameters must be populated in order to send to Azure. - - :param key: The filter key. Represents an event property with up to two - levels of nesting. - :type key: str - :param operator_type: Required. Constant filled by server. - :type operator_type: str - :param value: The filter value - :type value: float - """ - - _validation = { - 'operator_type': {'required': True}, - } - - _attribute_map = { - 'key': {'key': 'key', 'type': 'str'}, - 'operator_type': {'key': 'operatorType', 'type': 'str'}, - 'value': {'key': 'value', 'type': 'float'}, - } - - def __init__(self, **kwargs): - super(NumberGreaterThanAdvancedFilter, self).__init__(**kwargs) - self.value = kwargs.get('value', None) - self.operator_type = 'NumberGreaterThan' diff --git a/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/number_greater_than_advanced_filter_py3.py b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/number_greater_than_advanced_filter_py3.py deleted file mode 100644 index e4d39a37438cb..0000000000000 --- a/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/number_greater_than_advanced_filter_py3.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .advanced_filter_py3 import AdvancedFilter - - -class NumberGreaterThanAdvancedFilter(AdvancedFilter): - """NumberGreaterThan Filter. - - All required parameters must be populated in order to send to Azure. - - :param key: The filter key. Represents an event property with up to two - levels of nesting. - :type key: str - :param operator_type: Required. Constant filled by server. - :type operator_type: str - :param value: The filter value - :type value: float - """ - - _validation = { - 'operator_type': {'required': True}, - } - - _attribute_map = { - 'key': {'key': 'key', 'type': 'str'}, - 'operator_type': {'key': 'operatorType', 'type': 'str'}, - 'value': {'key': 'value', 'type': 'float'}, - } - - def __init__(self, *, key: str=None, value: float=None, **kwargs) -> None: - super(NumberGreaterThanAdvancedFilter, self).__init__(key=key, **kwargs) - self.value = value - self.operator_type = 'NumberGreaterThan' diff --git a/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/number_greater_than_or_equals_advanced_filter.py b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/number_greater_than_or_equals_advanced_filter.py deleted file mode 100644 index 779003663a749..0000000000000 --- a/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/number_greater_than_or_equals_advanced_filter.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .advanced_filter import AdvancedFilter - - -class NumberGreaterThanOrEqualsAdvancedFilter(AdvancedFilter): - """NumberGreaterThanOrEquals Filter. - - All required parameters must be populated in order to send to Azure. - - :param key: The filter key. Represents an event property with up to two - levels of nesting. - :type key: str - :param operator_type: Required. Constant filled by server. - :type operator_type: str - :param value: The filter value - :type value: float - """ - - _validation = { - 'operator_type': {'required': True}, - } - - _attribute_map = { - 'key': {'key': 'key', 'type': 'str'}, - 'operator_type': {'key': 'operatorType', 'type': 'str'}, - 'value': {'key': 'value', 'type': 'float'}, - } - - def __init__(self, **kwargs): - super(NumberGreaterThanOrEqualsAdvancedFilter, self).__init__(**kwargs) - self.value = kwargs.get('value', None) - self.operator_type = 'NumberGreaterThanOrEquals' diff --git a/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/number_greater_than_or_equals_advanced_filter_py3.py b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/number_greater_than_or_equals_advanced_filter_py3.py deleted file mode 100644 index b6e7e516591bb..0000000000000 --- a/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/number_greater_than_or_equals_advanced_filter_py3.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .advanced_filter_py3 import AdvancedFilter - - -class NumberGreaterThanOrEqualsAdvancedFilter(AdvancedFilter): - """NumberGreaterThanOrEquals Filter. - - All required parameters must be populated in order to send to Azure. - - :param key: The filter key. Represents an event property with up to two - levels of nesting. - :type key: str - :param operator_type: Required. Constant filled by server. - :type operator_type: str - :param value: The filter value - :type value: float - """ - - _validation = { - 'operator_type': {'required': True}, - } - - _attribute_map = { - 'key': {'key': 'key', 'type': 'str'}, - 'operator_type': {'key': 'operatorType', 'type': 'str'}, - 'value': {'key': 'value', 'type': 'float'}, - } - - def __init__(self, *, key: str=None, value: float=None, **kwargs) -> None: - super(NumberGreaterThanOrEqualsAdvancedFilter, self).__init__(key=key, **kwargs) - self.value = value - self.operator_type = 'NumberGreaterThanOrEquals' diff --git a/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/number_in_advanced_filter.py b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/number_in_advanced_filter.py deleted file mode 100644 index 7860a14b020c6..0000000000000 --- a/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/number_in_advanced_filter.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .advanced_filter import AdvancedFilter - - -class NumberInAdvancedFilter(AdvancedFilter): - """NumberIn filter. - - All required parameters must be populated in order to send to Azure. - - :param key: The filter key. Represents an event property with up to two - levels of nesting. - :type key: str - :param operator_type: Required. Constant filled by server. - :type operator_type: str - :param values: The set of filter values - :type values: list[float] - """ - - _validation = { - 'operator_type': {'required': True}, - } - - _attribute_map = { - 'key': {'key': 'key', 'type': 'str'}, - 'operator_type': {'key': 'operatorType', 'type': 'str'}, - 'values': {'key': 'values', 'type': '[float]'}, - } - - def __init__(self, **kwargs): - super(NumberInAdvancedFilter, self).__init__(**kwargs) - self.values = kwargs.get('values', None) - self.operator_type = 'NumberIn' diff --git a/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/number_in_advanced_filter_py3.py b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/number_in_advanced_filter_py3.py deleted file mode 100644 index 1f6016d7cb276..0000000000000 --- a/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/number_in_advanced_filter_py3.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .advanced_filter_py3 import AdvancedFilter - - -class NumberInAdvancedFilter(AdvancedFilter): - """NumberIn filter. - - All required parameters must be populated in order to send to Azure. - - :param key: The filter key. Represents an event property with up to two - levels of nesting. - :type key: str - :param operator_type: Required. Constant filled by server. - :type operator_type: str - :param values: The set of filter values - :type values: list[float] - """ - - _validation = { - 'operator_type': {'required': True}, - } - - _attribute_map = { - 'key': {'key': 'key', 'type': 'str'}, - 'operator_type': {'key': 'operatorType', 'type': 'str'}, - 'values': {'key': 'values', 'type': '[float]'}, - } - - def __init__(self, *, key: str=None, values=None, **kwargs) -> None: - super(NumberInAdvancedFilter, self).__init__(key=key, **kwargs) - self.values = values - self.operator_type = 'NumberIn' diff --git a/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/number_less_than_advanced_filter.py b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/number_less_than_advanced_filter.py deleted file mode 100644 index 98c7c31ef1af5..0000000000000 --- a/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/number_less_than_advanced_filter.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .advanced_filter import AdvancedFilter - - -class NumberLessThanAdvancedFilter(AdvancedFilter): - """NumberLessThan Filter. - - All required parameters must be populated in order to send to Azure. - - :param key: The filter key. Represents an event property with up to two - levels of nesting. - :type key: str - :param operator_type: Required. Constant filled by server. - :type operator_type: str - :param value: The filter value - :type value: float - """ - - _validation = { - 'operator_type': {'required': True}, - } - - _attribute_map = { - 'key': {'key': 'key', 'type': 'str'}, - 'operator_type': {'key': 'operatorType', 'type': 'str'}, - 'value': {'key': 'value', 'type': 'float'}, - } - - def __init__(self, **kwargs): - super(NumberLessThanAdvancedFilter, self).__init__(**kwargs) - self.value = kwargs.get('value', None) - self.operator_type = 'NumberLessThan' diff --git a/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/number_less_than_advanced_filter_py3.py b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/number_less_than_advanced_filter_py3.py deleted file mode 100644 index 55709d0da2da4..0000000000000 --- a/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/number_less_than_advanced_filter_py3.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .advanced_filter_py3 import AdvancedFilter - - -class NumberLessThanAdvancedFilter(AdvancedFilter): - """NumberLessThan Filter. - - All required parameters must be populated in order to send to Azure. - - :param key: The filter key. Represents an event property with up to two - levels of nesting. - :type key: str - :param operator_type: Required. Constant filled by server. - :type operator_type: str - :param value: The filter value - :type value: float - """ - - _validation = { - 'operator_type': {'required': True}, - } - - _attribute_map = { - 'key': {'key': 'key', 'type': 'str'}, - 'operator_type': {'key': 'operatorType', 'type': 'str'}, - 'value': {'key': 'value', 'type': 'float'}, - } - - def __init__(self, *, key: str=None, value: float=None, **kwargs) -> None: - super(NumberLessThanAdvancedFilter, self).__init__(key=key, **kwargs) - self.value = value - self.operator_type = 'NumberLessThan' diff --git a/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/number_less_than_or_equals_advanced_filter.py b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/number_less_than_or_equals_advanced_filter.py deleted file mode 100644 index edc83b3ba5b20..0000000000000 --- a/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/number_less_than_or_equals_advanced_filter.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .advanced_filter import AdvancedFilter - - -class NumberLessThanOrEqualsAdvancedFilter(AdvancedFilter): - """NumberLessThanOrEquals Filter. - - All required parameters must be populated in order to send to Azure. - - :param key: The filter key. Represents an event property with up to two - levels of nesting. - :type key: str - :param operator_type: Required. Constant filled by server. - :type operator_type: str - :param value: The filter value - :type value: float - """ - - _validation = { - 'operator_type': {'required': True}, - } - - _attribute_map = { - 'key': {'key': 'key', 'type': 'str'}, - 'operator_type': {'key': 'operatorType', 'type': 'str'}, - 'value': {'key': 'value', 'type': 'float'}, - } - - def __init__(self, **kwargs): - super(NumberLessThanOrEqualsAdvancedFilter, self).__init__(**kwargs) - self.value = kwargs.get('value', None) - self.operator_type = 'NumberLessThanOrEquals' diff --git a/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/number_less_than_or_equals_advanced_filter_py3.py b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/number_less_than_or_equals_advanced_filter_py3.py deleted file mode 100644 index a01dc82dc38e9..0000000000000 --- a/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/number_less_than_or_equals_advanced_filter_py3.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .advanced_filter_py3 import AdvancedFilter - - -class NumberLessThanOrEqualsAdvancedFilter(AdvancedFilter): - """NumberLessThanOrEquals Filter. - - All required parameters must be populated in order to send to Azure. - - :param key: The filter key. Represents an event property with up to two - levels of nesting. - :type key: str - :param operator_type: Required. Constant filled by server. - :type operator_type: str - :param value: The filter value - :type value: float - """ - - _validation = { - 'operator_type': {'required': True}, - } - - _attribute_map = { - 'key': {'key': 'key', 'type': 'str'}, - 'operator_type': {'key': 'operatorType', 'type': 'str'}, - 'value': {'key': 'value', 'type': 'float'}, - } - - def __init__(self, *, key: str=None, value: float=None, **kwargs) -> None: - super(NumberLessThanOrEqualsAdvancedFilter, self).__init__(key=key, **kwargs) - self.value = value - self.operator_type = 'NumberLessThanOrEquals' diff --git a/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/number_not_in_advanced_filter.py b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/number_not_in_advanced_filter.py deleted file mode 100644 index 14921b9c5be85..0000000000000 --- a/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/number_not_in_advanced_filter.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .advanced_filter import AdvancedFilter - - -class NumberNotInAdvancedFilter(AdvancedFilter): - """NumberNotIn Filter. - - All required parameters must be populated in order to send to Azure. - - :param key: The filter key. Represents an event property with up to two - levels of nesting. - :type key: str - :param operator_type: Required. Constant filled by server. - :type operator_type: str - :param values: The set of filter values - :type values: list[float] - """ - - _validation = { - 'operator_type': {'required': True}, - } - - _attribute_map = { - 'key': {'key': 'key', 'type': 'str'}, - 'operator_type': {'key': 'operatorType', 'type': 'str'}, - 'values': {'key': 'values', 'type': '[float]'}, - } - - def __init__(self, **kwargs): - super(NumberNotInAdvancedFilter, self).__init__(**kwargs) - self.values = kwargs.get('values', None) - self.operator_type = 'NumberNotIn' diff --git a/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/number_not_in_advanced_filter_py3.py b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/number_not_in_advanced_filter_py3.py deleted file mode 100644 index e67956a56d641..0000000000000 --- a/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/number_not_in_advanced_filter_py3.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .advanced_filter_py3 import AdvancedFilter - - -class NumberNotInAdvancedFilter(AdvancedFilter): - """NumberNotIn Filter. - - All required parameters must be populated in order to send to Azure. - - :param key: The filter key. Represents an event property with up to two - levels of nesting. - :type key: str - :param operator_type: Required. Constant filled by server. - :type operator_type: str - :param values: The set of filter values - :type values: list[float] - """ - - _validation = { - 'operator_type': {'required': True}, - } - - _attribute_map = { - 'key': {'key': 'key', 'type': 'str'}, - 'operator_type': {'key': 'operatorType', 'type': 'str'}, - 'values': {'key': 'values', 'type': '[float]'}, - } - - def __init__(self, *, key: str=None, values=None, **kwargs) -> None: - super(NumberNotInAdvancedFilter, self).__init__(key=key, **kwargs) - self.values = values - self.operator_type = 'NumberNotIn' diff --git a/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/storage_blob_dead_letter_destination.py b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/storage_blob_dead_letter_destination.py index aadbe4e08efaa..def9968ba45a3 100644 --- a/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/storage_blob_dead_letter_destination.py +++ b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/storage_blob_dead_letter_destination.py @@ -20,7 +20,8 @@ class StorageBlobDeadLetterDestination(DeadLetterDestination): :param endpoint_type: Required. Constant filled by server. :type endpoint_type: str :param resource_id: The Azure Resource ID of the storage account that is - the destination of the deadletter events + the destination of the deadletter events. For example: + /subscriptions/{AzureSubscriptionId}/resourceGroups/{ResourceGroupName}/providers/microsoft.Storage/storageAccounts/{StorageAccountName} :type resource_id: str :param blob_container_name: The name of the Storage blob container that is the destination of the deadletter events diff --git a/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/storage_blob_dead_letter_destination_py3.py b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/storage_blob_dead_letter_destination_py3.py index 65e0813f852eb..0e364106a14cd 100644 --- a/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/storage_blob_dead_letter_destination_py3.py +++ b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/storage_blob_dead_letter_destination_py3.py @@ -20,7 +20,8 @@ class StorageBlobDeadLetterDestination(DeadLetterDestination): :param endpoint_type: Required. Constant filled by server. :type endpoint_type: str :param resource_id: The Azure Resource ID of the storage account that is - the destination of the deadletter events + the destination of the deadletter events. For example: + /subscriptions/{AzureSubscriptionId}/resourceGroups/{ResourceGroupName}/providers/microsoft.Storage/storageAccounts/{StorageAccountName} :type resource_id: str :param blob_container_name: The name of the Storage blob container that is the destination of the deadletter events diff --git a/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/string_begins_with_advanced_filter.py b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/string_begins_with_advanced_filter.py deleted file mode 100644 index bcee147ef0d08..0000000000000 --- a/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/string_begins_with_advanced_filter.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .advanced_filter import AdvancedFilter - - -class StringBeginsWithAdvancedFilter(AdvancedFilter): - """StringBeginsWith Filter. - - All required parameters must be populated in order to send to Azure. - - :param key: The filter key. Represents an event property with up to two - levels of nesting. - :type key: str - :param operator_type: Required. Constant filled by server. - :type operator_type: str - :param values: The set of filter values - :type values: list[str] - """ - - _validation = { - 'operator_type': {'required': True}, - } - - _attribute_map = { - 'key': {'key': 'key', 'type': 'str'}, - 'operator_type': {'key': 'operatorType', 'type': 'str'}, - 'values': {'key': 'values', 'type': '[str]'}, - } - - def __init__(self, **kwargs): - super(StringBeginsWithAdvancedFilter, self).__init__(**kwargs) - self.values = kwargs.get('values', None) - self.operator_type = 'StringBeginsWith' diff --git a/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/string_begins_with_advanced_filter_py3.py b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/string_begins_with_advanced_filter_py3.py deleted file mode 100644 index b4f294be7a7e6..0000000000000 --- a/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/string_begins_with_advanced_filter_py3.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .advanced_filter_py3 import AdvancedFilter - - -class StringBeginsWithAdvancedFilter(AdvancedFilter): - """StringBeginsWith Filter. - - All required parameters must be populated in order to send to Azure. - - :param key: The filter key. Represents an event property with up to two - levels of nesting. - :type key: str - :param operator_type: Required. Constant filled by server. - :type operator_type: str - :param values: The set of filter values - :type values: list[str] - """ - - _validation = { - 'operator_type': {'required': True}, - } - - _attribute_map = { - 'key': {'key': 'key', 'type': 'str'}, - 'operator_type': {'key': 'operatorType', 'type': 'str'}, - 'values': {'key': 'values', 'type': '[str]'}, - } - - def __init__(self, *, key: str=None, values=None, **kwargs) -> None: - super(StringBeginsWithAdvancedFilter, self).__init__(key=key, **kwargs) - self.values = values - self.operator_type = 'StringBeginsWith' diff --git a/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/string_contains_advanced_filter.py b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/string_contains_advanced_filter.py deleted file mode 100644 index 3d79fbf8d8b88..0000000000000 --- a/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/string_contains_advanced_filter.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .advanced_filter import AdvancedFilter - - -class StringContainsAdvancedFilter(AdvancedFilter): - """StringContains Filter. - - All required parameters must be populated in order to send to Azure. - - :param key: The filter key. Represents an event property with up to two - levels of nesting. - :type key: str - :param operator_type: Required. Constant filled by server. - :type operator_type: str - :param values: The set of filter values - :type values: list[str] - """ - - _validation = { - 'operator_type': {'required': True}, - } - - _attribute_map = { - 'key': {'key': 'key', 'type': 'str'}, - 'operator_type': {'key': 'operatorType', 'type': 'str'}, - 'values': {'key': 'values', 'type': '[str]'}, - } - - def __init__(self, **kwargs): - super(StringContainsAdvancedFilter, self).__init__(**kwargs) - self.values = kwargs.get('values', None) - self.operator_type = 'StringContains' diff --git a/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/string_contains_advanced_filter_py3.py b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/string_contains_advanced_filter_py3.py deleted file mode 100644 index 6d25fea723398..0000000000000 --- a/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/string_contains_advanced_filter_py3.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .advanced_filter_py3 import AdvancedFilter - - -class StringContainsAdvancedFilter(AdvancedFilter): - """StringContains Filter. - - All required parameters must be populated in order to send to Azure. - - :param key: The filter key. Represents an event property with up to two - levels of nesting. - :type key: str - :param operator_type: Required. Constant filled by server. - :type operator_type: str - :param values: The set of filter values - :type values: list[str] - """ - - _validation = { - 'operator_type': {'required': True}, - } - - _attribute_map = { - 'key': {'key': 'key', 'type': 'str'}, - 'operator_type': {'key': 'operatorType', 'type': 'str'}, - 'values': {'key': 'values', 'type': '[str]'}, - } - - def __init__(self, *, key: str=None, values=None, **kwargs) -> None: - super(StringContainsAdvancedFilter, self).__init__(key=key, **kwargs) - self.values = values - self.operator_type = 'StringContains' diff --git a/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/string_ends_with_advanced_filter.py b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/string_ends_with_advanced_filter.py deleted file mode 100644 index e0dfe9039fdee..0000000000000 --- a/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/string_ends_with_advanced_filter.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .advanced_filter import AdvancedFilter - - -class StringEndsWithAdvancedFilter(AdvancedFilter): - """StringEndsWith Filter. - - All required parameters must be populated in order to send to Azure. - - :param key: The filter key. Represents an event property with up to two - levels of nesting. - :type key: str - :param operator_type: Required. Constant filled by server. - :type operator_type: str - :param values: The set of filter values - :type values: list[str] - """ - - _validation = { - 'operator_type': {'required': True}, - } - - _attribute_map = { - 'key': {'key': 'key', 'type': 'str'}, - 'operator_type': {'key': 'operatorType', 'type': 'str'}, - 'values': {'key': 'values', 'type': '[str]'}, - } - - def __init__(self, **kwargs): - super(StringEndsWithAdvancedFilter, self).__init__(**kwargs) - self.values = kwargs.get('values', None) - self.operator_type = 'StringEndsWith' diff --git a/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/string_ends_with_advanced_filter_py3.py b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/string_ends_with_advanced_filter_py3.py deleted file mode 100644 index aa43e3e6c12f6..0000000000000 --- a/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/string_ends_with_advanced_filter_py3.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .advanced_filter_py3 import AdvancedFilter - - -class StringEndsWithAdvancedFilter(AdvancedFilter): - """StringEndsWith Filter. - - All required parameters must be populated in order to send to Azure. - - :param key: The filter key. Represents an event property with up to two - levels of nesting. - :type key: str - :param operator_type: Required. Constant filled by server. - :type operator_type: str - :param values: The set of filter values - :type values: list[str] - """ - - _validation = { - 'operator_type': {'required': True}, - } - - _attribute_map = { - 'key': {'key': 'key', 'type': 'str'}, - 'operator_type': {'key': 'operatorType', 'type': 'str'}, - 'values': {'key': 'values', 'type': '[str]'}, - } - - def __init__(self, *, key: str=None, values=None, **kwargs) -> None: - super(StringEndsWithAdvancedFilter, self).__init__(key=key, **kwargs) - self.values = values - self.operator_type = 'StringEndsWith' diff --git a/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/string_in_advanced_filter.py b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/string_in_advanced_filter.py deleted file mode 100644 index 4655743afd024..0000000000000 --- a/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/string_in_advanced_filter.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .advanced_filter import AdvancedFilter - - -class StringInAdvancedFilter(AdvancedFilter): - """StringIn Filter. - - All required parameters must be populated in order to send to Azure. - - :param key: The filter key. Represents an event property with up to two - levels of nesting. - :type key: str - :param operator_type: Required. Constant filled by server. - :type operator_type: str - :param values: The set of filter values - :type values: list[str] - """ - - _validation = { - 'operator_type': {'required': True}, - } - - _attribute_map = { - 'key': {'key': 'key', 'type': 'str'}, - 'operator_type': {'key': 'operatorType', 'type': 'str'}, - 'values': {'key': 'values', 'type': '[str]'}, - } - - def __init__(self, **kwargs): - super(StringInAdvancedFilter, self).__init__(**kwargs) - self.values = kwargs.get('values', None) - self.operator_type = 'StringIn' diff --git a/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/string_in_advanced_filter_py3.py b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/string_in_advanced_filter_py3.py deleted file mode 100644 index a5653776d6500..0000000000000 --- a/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/string_in_advanced_filter_py3.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .advanced_filter_py3 import AdvancedFilter - - -class StringInAdvancedFilter(AdvancedFilter): - """StringIn Filter. - - All required parameters must be populated in order to send to Azure. - - :param key: The filter key. Represents an event property with up to two - levels of nesting. - :type key: str - :param operator_type: Required. Constant filled by server. - :type operator_type: str - :param values: The set of filter values - :type values: list[str] - """ - - _validation = { - 'operator_type': {'required': True}, - } - - _attribute_map = { - 'key': {'key': 'key', 'type': 'str'}, - 'operator_type': {'key': 'operatorType', 'type': 'str'}, - 'values': {'key': 'values', 'type': '[str]'}, - } - - def __init__(self, *, key: str=None, values=None, **kwargs) -> None: - super(StringInAdvancedFilter, self).__init__(key=key, **kwargs) - self.values = values - self.operator_type = 'StringIn' diff --git a/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/string_not_in_advanced_filter.py b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/string_not_in_advanced_filter.py deleted file mode 100644 index 89c2dc07c2384..0000000000000 --- a/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/string_not_in_advanced_filter.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .advanced_filter import AdvancedFilter - - -class StringNotInAdvancedFilter(AdvancedFilter): - """StringNotIn Filter. - - All required parameters must be populated in order to send to Azure. - - :param key: The filter key. Represents an event property with up to two - levels of nesting. - :type key: str - :param operator_type: Required. Constant filled by server. - :type operator_type: str - :param values: The set of filter values - :type values: list[str] - """ - - _validation = { - 'operator_type': {'required': True}, - } - - _attribute_map = { - 'key': {'key': 'key', 'type': 'str'}, - 'operator_type': {'key': 'operatorType', 'type': 'str'}, - 'values': {'key': 'values', 'type': '[str]'}, - } - - def __init__(self, **kwargs): - super(StringNotInAdvancedFilter, self).__init__(**kwargs) - self.values = kwargs.get('values', None) - self.operator_type = 'StringNotIn' diff --git a/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/string_not_in_advanced_filter_py3.py b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/string_not_in_advanced_filter_py3.py deleted file mode 100644 index 539da92fc43d4..0000000000000 --- a/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/string_not_in_advanced_filter_py3.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .advanced_filter_py3 import AdvancedFilter - - -class StringNotInAdvancedFilter(AdvancedFilter): - """StringNotIn Filter. - - All required parameters must be populated in order to send to Azure. - - :param key: The filter key. Represents an event property with up to two - levels of nesting. - :type key: str - :param operator_type: Required. Constant filled by server. - :type operator_type: str - :param values: The set of filter values - :type values: list[str] - """ - - _validation = { - 'operator_type': {'required': True}, - } - - _attribute_map = { - 'key': {'key': 'key', 'type': 'str'}, - 'operator_type': {'key': 'operatorType', 'type': 'str'}, - 'values': {'key': 'values', 'type': '[str]'}, - } - - def __init__(self, *, key: str=None, values=None, **kwargs) -> None: - super(StringNotInAdvancedFilter, self).__init__(key=key, **kwargs) - self.values = values - self.operator_type = 'StringNotIn' diff --git a/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/topic.py b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/topic.py index 50d28d5206e51..46c6de571fa71 100644 --- a/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/topic.py +++ b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/topic.py @@ -37,17 +37,6 @@ class Topic(TrackedResource): ~azure.mgmt.eventgrid.models.TopicProvisioningState :ivar endpoint: Endpoint for the topic. :vartype endpoint: str - :param input_schema: This determines the format that Event Grid should - expect for incoming events published to the topic. Possible values - include: 'EventGridSchema', 'CustomEventSchema', 'CloudEventV01Schema'. - Default value: "EventGridSchema" . - :type input_schema: str or ~azure.mgmt.eventgrid.models.InputSchema - :param 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. - :type input_schema_mapping: - ~azure.mgmt.eventgrid.models.InputSchemaMapping """ _validation = { @@ -67,13 +56,9 @@ class Topic(TrackedResource): 'tags': {'key': 'tags', 'type': '{str}'}, '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'}, } def __init__(self, **kwargs): super(Topic, self).__init__(**kwargs) self.provisioning_state = None self.endpoint = None - self.input_schema = kwargs.get('input_schema', "EventGridSchema") - self.input_schema_mapping = kwargs.get('input_schema_mapping', None) diff --git a/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/topic_py3.py b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/topic_py3.py index 9c562e93663ad..304f78cf9692e 100644 --- a/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/topic_py3.py +++ b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/topic_py3.py @@ -37,17 +37,6 @@ class Topic(TrackedResource): ~azure.mgmt.eventgrid.models.TopicProvisioningState :ivar endpoint: Endpoint for the topic. :vartype endpoint: str - :param input_schema: This determines the format that Event Grid should - expect for incoming events published to the topic. Possible values - include: 'EventGridSchema', 'CustomEventSchema', 'CloudEventV01Schema'. - Default value: "EventGridSchema" . - :type input_schema: str or ~azure.mgmt.eventgrid.models.InputSchema - :param 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. - :type input_schema_mapping: - ~azure.mgmt.eventgrid.models.InputSchemaMapping """ _validation = { @@ -67,13 +56,9 @@ class Topic(TrackedResource): 'tags': {'key': 'tags', 'type': '{str}'}, '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'}, } - def __init__(self, *, location: str, tags=None, input_schema="EventGridSchema", input_schema_mapping=None, **kwargs) -> None: + def __init__(self, *, location: str, tags=None, **kwargs) -> None: super(Topic, self).__init__(location=location, tags=tags, **kwargs) self.provisioning_state = None self.endpoint = None - self.input_schema = input_schema - self.input_schema_mapping = input_schema_mapping diff --git a/azure-mgmt-eventgrid/azure/mgmt/eventgrid/operations/__init__.py b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/operations/__init__.py index 809a024947196..db9b4311e47c8 100644 --- a/azure-mgmt-eventgrid/azure/mgmt/eventgrid/operations/__init__.py +++ b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/operations/__init__.py @@ -9,16 +9,12 @@ # regenerated. # -------------------------------------------------------------------------- -from .domains_operations import DomainsOperations -from .domain_topics_operations import DomainTopicsOperations from .event_subscriptions_operations import EventSubscriptionsOperations from .operations import Operations from .topics_operations import TopicsOperations from .topic_types_operations import TopicTypesOperations __all__ = [ - 'DomainsOperations', - 'DomainTopicsOperations', 'EventSubscriptionsOperations', 'Operations', 'TopicsOperations', diff --git a/azure-mgmt-eventgrid/azure/mgmt/eventgrid/operations/domain_topics_operations.py b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/operations/domain_topics_operations.py deleted file mode 100644 index 8c89845989e13..0000000000000 --- a/azure-mgmt-eventgrid/azure/mgmt/eventgrid/operations/domain_topics_operations.py +++ /dev/null @@ -1,179 +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 uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError - -from .. import models - - -class DomainTopicsOperations(object): - """DomainTopicsOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Version of the API to be used with the client request. Constant value: "2018-09-15-preview". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2018-09-15-preview" - - self.config = config - - def get( - self, resource_group_name, domain_name, topic_name, custom_headers=None, raw=False, **operation_config): - """Get a domain topic. - - Get properties of a domain topic. - - :param resource_group_name: The name of the resource group within the - user's subscription. - :type resource_group_name: str - :param domain_name: Name of the domain - :type domain_name: str - :param topic_name: Name of the topic - :type topic_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: DomainTopic or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.eventgrid.models.DomainTopic or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'domainName': self._serialize.url("domain_name", domain_name, 'str'), - 'topicName': self._serialize.url("topic_name", topic_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('DomainTopic', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/domains/{domainName}/topics/{topicName}'} - - def list_by_domain( - self, resource_group_name, domain_name, custom_headers=None, raw=False, **operation_config): - """List domain topics. - - List all the topics in a domain. - - :param resource_group_name: The name of the resource group within the - user's subscription. - :type resource_group_name: str - :param domain_name: Domain name. - :type domain_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of DomainTopic - :rtype: - ~azure.mgmt.eventgrid.models.DomainTopicPaged[~azure.mgmt.eventgrid.models.DomainTopic] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list_by_domain.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'domainName': self._serialize.url("domain_name", domain_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.DomainTopicPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.DomainTopicPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list_by_domain.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/domains/{domainName}/topics'} diff --git a/azure-mgmt-eventgrid/azure/mgmt/eventgrid/operations/domains_operations.py b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/operations/domains_operations.py deleted file mode 100644 index f7f9bd42690d0..0000000000000 --- a/azure-mgmt-eventgrid/azure/mgmt/eventgrid/operations/domains_operations.py +++ /dev/null @@ -1,669 +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 uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError -from msrest.polling import LROPoller, NoPolling -from msrestazure.polling.arm_polling import ARMPolling - -from .. import models - - -class DomainsOperations(object): - """DomainsOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Version of the API to be used with the client request. Constant value: "2018-09-15-preview". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2018-09-15-preview" - - self.config = config - - def get( - self, resource_group_name, domain_name, custom_headers=None, raw=False, **operation_config): - """Get a domain. - - Get properties of a domain. - - :param resource_group_name: The name of the resource group within the - user's subscription. - :type resource_group_name: str - :param domain_name: Name of the domain - :type domain_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: Domain or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.eventgrid.models.Domain or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'domainName': self._serialize.url("domain_name", domain_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('Domain', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/domains/{domainName}'} - - - def _create_or_update_initial( - self, resource_group_name, domain_name, domain_info, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.create_or_update.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'domainName': self._serialize.url("domain_name", domain_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(domain_info, 'Domain') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [201]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 201: - deserialized = self._deserialize('Domain', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def create_or_update( - self, resource_group_name, domain_name, domain_info, custom_headers=None, raw=False, polling=True, **operation_config): - """Create a domain. - - Asynchronously creates a new domain with the specified parameters. - - :param resource_group_name: The name of the resource group within the - user's subscription. - :type resource_group_name: str - :param domain_name: Name of the domain - :type domain_name: str - :param domain_info: Domain information - :type domain_info: ~azure.mgmt.eventgrid.models.Domain - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns Domain or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.eventgrid.models.Domain] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.eventgrid.models.Domain]] - :raises: :class:`CloudError` - """ - raw_result = self._create_or_update_initial( - resource_group_name=resource_group_name, - domain_name=domain_name, - domain_info=domain_info, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('Domain', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/domains/{domainName}'} - - - def _delete_initial( - self, resource_group_name, domain_name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.delete.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'domainName': self._serialize.url("domain_name", domain_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [202, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def delete( - self, resource_group_name, domain_name, custom_headers=None, raw=False, polling=True, **operation_config): - """Delete a domain. - - Delete existing domain. - - :param resource_group_name: The name of the resource group within the - user's subscription. - :type resource_group_name: str - :param domain_name: Name of the domain - :type domain_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._delete_initial( - resource_group_name=resource_group_name, - domain_name=domain_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/domains/{domainName}'} - - - def _update_initial( - self, resource_group_name, domain_name, tags=None, custom_headers=None, raw=False, **operation_config): - domain_update_parameters = models.DomainUpdateParameters(tags=tags) - - # Construct URL - url = self.update.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'domainName': self._serialize.url("domain_name", domain_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(domain_update_parameters, 'DomainUpdateParameters') - - # Construct and send request - request = self._client.patch(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [201]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 201: - deserialized = self._deserialize('Domain', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def update( - self, resource_group_name, domain_name, tags=None, custom_headers=None, raw=False, polling=True, **operation_config): - """Update a domain. - - Asynchronously updates a domain with the specified parameters. - - :param resource_group_name: The name of the resource group within the - user's subscription. - :type resource_group_name: str - :param domain_name: Name of the domain - :type domain_name: str - :param tags: Tags of the domains resource - :type tags: dict[str, str] - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns Domain or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.eventgrid.models.Domain] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.eventgrid.models.Domain]] - :raises: :class:`CloudError` - """ - raw_result = self._update_initial( - resource_group_name=resource_group_name, - domain_name=domain_name, - tags=tags, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('Domain', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/domains/{domainName}'} - - def list_by_subscription( - self, custom_headers=None, raw=False, **operation_config): - """List domains under an Azure subscription. - - List all the domains under an Azure subscription. - - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of Domain - :rtype: - ~azure.mgmt.eventgrid.models.DomainPaged[~azure.mgmt.eventgrid.models.Domain] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list_by_subscription.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.DomainPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.DomainPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list_by_subscription.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.EventGrid/domains'} - - def list_by_resource_group( - self, resource_group_name, custom_headers=None, raw=False, **operation_config): - """List domains under a resource group. - - List all the domains under a resource group. - - :param resource_group_name: The name of the resource group within the - user's subscription. - :type resource_group_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of Domain - :rtype: - ~azure.mgmt.eventgrid.models.DomainPaged[~azure.mgmt.eventgrid.models.Domain] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list_by_resource_group.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.DomainPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.DomainPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/domains'} - - def list_shared_access_keys( - self, resource_group_name, domain_name, custom_headers=None, raw=False, **operation_config): - """List keys for a domain. - - List the two keys used to publish to a domain. - - :param resource_group_name: The name of the resource group within the - user's subscription. - :type resource_group_name: str - :param domain_name: Name of the domain - :type domain_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: DomainSharedAccessKeys or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.eventgrid.models.DomainSharedAccessKeys or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.list_shared_access_keys.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'domainName': self._serialize.url("domain_name", domain_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('DomainSharedAccessKeys', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_shared_access_keys.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/domains/{domainName}/listKeys'} - - def regenerate_key( - self, resource_group_name, domain_name, key_name, custom_headers=None, raw=False, **operation_config): - """Regenerate key for a domain. - - Regenerate a shared access key for a domain. - - :param resource_group_name: The name of the resource group within the - user's subscription. - :type resource_group_name: str - :param domain_name: Name of the domain - :type domain_name: str - :param key_name: Key name to regenerate key1 or key2 - :type key_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: DomainSharedAccessKeys or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.eventgrid.models.DomainSharedAccessKeys or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - regenerate_key_request = models.DomainRegenerateKeyRequest(key_name=key_name) - - # Construct URL - url = self.regenerate_key.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'domainName': self._serialize.url("domain_name", domain_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(regenerate_key_request, 'DomainRegenerateKeyRequest') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('DomainSharedAccessKeys', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - regenerate_key.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/domains/{domainName}/regenerateKey'} diff --git a/azure-mgmt-eventgrid/azure/mgmt/eventgrid/operations/event_subscriptions_operations.py b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/operations/event_subscriptions_operations.py index e0babad2bffcf..9935a0ad268e5 100644 --- a/azure-mgmt-eventgrid/azure/mgmt/eventgrid/operations/event_subscriptions_operations.py +++ b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/operations/event_subscriptions_operations.py @@ -25,7 +25,7 @@ class EventSubscriptionsOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: Version of the API to be used with the client request. Constant value: "2018-09-15-preview". + :ivar api_version: Version of the API to be used with the client request. Constant value: "2019-01-01". """ models = models @@ -35,7 +35,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2018-09-15-preview" + self.api_version = "2019-01-01" self.config = config @@ -1162,80 +1162,3 @@ def internal_paging(next_link=None, raw=False): return deserialized list_by_resource.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{providerNamespace}/{resourceTypeName}/{resourceName}/providers/Microsoft.EventGrid/eventSubscriptions'} - - def list_by_domain_topic( - self, resource_group_name, domain_name, topic_name, custom_headers=None, raw=False, **operation_config): - """List all event subscriptions for a specific domain topic. - - List all event subscriptions that have been created for a specific - domain topic. - - :param resource_group_name: The name of the resource group within the - user's subscription. - :type resource_group_name: str - :param domain_name: Name of the top level domain - :type domain_name: str - :param topic_name: Name of the domain topic - :type topic_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of EventSubscription - :rtype: - ~azure.mgmt.eventgrid.models.EventSubscriptionPaged[~azure.mgmt.eventgrid.models.EventSubscription] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list_by_domain_topic.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'domainName': self._serialize.url("domain_name", domain_name, 'str'), - 'topicName': self._serialize.url("topic_name", topic_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.EventSubscriptionPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.EventSubscriptionPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list_by_domain_topic.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/domains/{domainName}/topics/{topicName}/providers/Microsoft.EventGrid/eventSubscriptions'} diff --git a/azure-mgmt-eventgrid/azure/mgmt/eventgrid/operations/operations.py b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/operations/operations.py index d7e84f37b1712..316c04094c0a3 100644 --- a/azure-mgmt-eventgrid/azure/mgmt/eventgrid/operations/operations.py +++ b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/operations/operations.py @@ -23,7 +23,7 @@ class Operations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: Version of the API to be used with the client request. Constant value: "2018-09-15-preview". + :ivar api_version: Version of the API to be used with the client request. Constant value: "2019-01-01". """ models = models @@ -33,7 +33,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2018-09-15-preview" + self.api_version = "2019-01-01" self.config = config diff --git a/azure-mgmt-eventgrid/azure/mgmt/eventgrid/operations/topic_types_operations.py b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/operations/topic_types_operations.py index a1bb6fb80e13f..c492b8a99146c 100644 --- a/azure-mgmt-eventgrid/azure/mgmt/eventgrid/operations/topic_types_operations.py +++ b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/operations/topic_types_operations.py @@ -23,7 +23,7 @@ class TopicTypesOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: Version of the API to be used with the client request. Constant value: "2018-09-15-preview". + :ivar api_version: Version of the API to be used with the client request. Constant value: "2019-01-01". """ models = models @@ -33,7 +33,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2018-09-15-preview" + self.api_version = "2019-01-01" self.config = config diff --git a/azure-mgmt-eventgrid/azure/mgmt/eventgrid/operations/topics_operations.py b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/operations/topics_operations.py index 7c58f7ef1a5ab..9652d6feb433c 100644 --- a/azure-mgmt-eventgrid/azure/mgmt/eventgrid/operations/topics_operations.py +++ b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/operations/topics_operations.py @@ -25,7 +25,7 @@ class TopicsOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: Version of the API to be used with the client request. Constant value: "2018-09-15-preview". + :ivar api_version: Version of the API to be used with the client request. Constant value: "2019-01-01". """ models = models @@ -35,7 +35,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2018-09-15-preview" + self.api_version = "2019-01-01" self.config = config @@ -106,7 +106,9 @@ def get( def _create_or_update_initial( - self, resource_group_name, topic_name, topic_info, custom_headers=None, raw=False, **operation_config): + self, resource_group_name, topic_name, location, tags=None, custom_headers=None, raw=False, **operation_config): + topic_info = models.Topic(location=location, tags=tags) + # Construct URL url = self.create_or_update.metadata['url'] path_format_arguments = { @@ -155,7 +157,7 @@ def _create_or_update_initial( return deserialized def create_or_update( - self, resource_group_name, topic_name, topic_info, custom_headers=None, raw=False, polling=True, **operation_config): + self, resource_group_name, topic_name, location, tags=None, custom_headers=None, raw=False, polling=True, **operation_config): """Create a topic. Asynchronously creates a new topic with the specified parameters. @@ -165,8 +167,10 @@ def create_or_update( :type resource_group_name: str :param topic_name: Name of the topic :type topic_name: str - :param topic_info: Topic information - :type topic_info: ~azure.mgmt.eventgrid.models.Topic + :param location: Location of the resource + :type location: str + :param tags: Tags of the resource + :type tags: dict[str, str] :param dict custom_headers: headers that will be added to the request :param bool raw: The poller return type is ClientRawResponse, the direct response alongside the deserialized response @@ -183,7 +187,8 @@ def create_or_update( raw_result = self._create_or_update_initial( resource_group_name=resource_group_name, topic_name=topic_name, - topic_info=topic_info, + location=location, + tags=tags, custom_headers=custom_headers, raw=True, **operation_config