From 1ca54bb83e02f3b0cc14be478bf0a9a13be475eb Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Thu, 21 Feb 2019 06:52:01 +0000 Subject: [PATCH 1/5] Generated from 9b8252073be1dc515ff7a29bb4aa19a954991e60 Copy 2018-09-15-preview files to get a baseline --- azure-mgmt-eventgrid/azure/mgmt/eventgrid/version.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-mgmt-eventgrid/azure/mgmt/eventgrid/version.py b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/version.py index 53c4c7ea05e8..a39916c162ce 100644 --- a/azure-mgmt-eventgrid/azure/mgmt/eventgrid/version.py +++ b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/version.py @@ -9,5 +9,5 @@ # regenerated. # -------------------------------------------------------------------------- -VERSION = "2.0.0" +VERSION = "1.0.0" From 03649734636aaa6bb9e50b32ab115f536b177705 Mon Sep 17 00:00:00 2001 From: azuresdkci Date: Thu, 21 Feb 2019 06:56:22 +0000 Subject: [PATCH 2/5] Packaging update of azure-mgmt-eventgrid --- azure-mgmt-eventgrid/README.rst | 19 ------------------- 1 file changed, 19 deletions(-) diff --git a/azure-mgmt-eventgrid/README.rst b/azure-mgmt-eventgrid/README.rst index 7792414c6dda..9326d9cca699 100644 --- a/azure-mgmt-eventgrid/README.rst +++ b/azure-mgmt-eventgrid/README.rst @@ -14,25 +14,6 @@ For the older Azure Service Management (ASM) libraries, see For a more complete set of Azure libraries, see the `azure `__ bundle package. -Compatibility -============= - -**IMPORTANT**: If you have an earlier version of the azure package -(version < 1.0), you should uninstall it before installing this package. - -You can check the version using pip: - -.. code:: shell - - pip freeze - -If you see azure==0.11.0 (or any version below 1.0), uninstall it first: - -.. code:: shell - - pip uninstall azure - - Usage ===== From be5d3b2303bb1a5abbbcec02464f32e0ad4a74c2 Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Tue, 26 Feb 2019 03:01:17 +0000 Subject: [PATCH 3/5] Generated from 46cf5eb760200cfa581a2988ac88c7d790c895c0 update readme.md file and address some violations --- .../eventgrid/event_grid_management_client.py | 12 +- .../azure/mgmt/eventgrid/models/__init__.py | 93 ++- .../mgmt/eventgrid/models/advanced_filter.py | 51 ++ .../eventgrid/models/advanced_filter_py3.py | 51 ++ .../models/bool_equals_advanced_filter.py | 41 ++ .../models/bool_equals_advanced_filter_py3.py | 41 ++ .../azure/mgmt/eventgrid/models/domain.py | 77 ++ .../mgmt/eventgrid/models/domain_paged.py | 27 + .../azure/mgmt/eventgrid/models/domain_py3.py | 77 ++ .../models/domain_regenerate_key_request.py | 34 + .../domain_regenerate_key_request_py3.py | 34 + .../models/domain_shared_access_keys.py | 32 + .../models/domain_shared_access_keys_py3.py | 32 + .../mgmt/eventgrid/models/domain_topic.py | 49 ++ .../eventgrid/models/domain_topic_paged.py | 27 + .../mgmt/eventgrid/models/domain_topic_py3.py | 49 ++ .../models/domain_update_parameters.py | 28 + .../models/domain_update_parameters_py3.py | 28 + .../event_grid_management_client_enums.py | 34 + .../eventgrid/models/event_subscription.py | 11 + .../models/event_subscription_destination.py | 5 +- .../event_subscription_destination_py3.py | 5 +- .../models/event_subscription_filter.py | 10 +- .../models/event_subscription_filter_py3.py | 12 +- .../models/event_subscription_py3.py | 13 +- .../event_subscription_update_parameters.py | 12 + ...vent_subscription_update_parameters_py3.py | 14 +- .../azure/mgmt/eventgrid/models/event_type.py | 4 + .../mgmt/eventgrid/models/event_type_py3.py | 6 +- .../eventgrid/models/input_schema_mapping.py | 44 ++ .../models/input_schema_mapping_py3.py | 44 ++ .../azure/mgmt/eventgrid/models/json_field.py | 32 + .../mgmt/eventgrid/models/json_field_py3.py | 32 + .../models/json_field_with_default.py | 42 ++ .../models/json_field_with_default_py3.py | 42 ++ .../models/json_input_schema_mapping.py | 66 ++ .../models/json_input_schema_mapping_py3.py | 66 ++ .../number_greater_than_advanced_filter.py | 41 ++ ...number_greater_than_advanced_filter_py3.py | 41 ++ ..._greater_than_or_equals_advanced_filter.py | 41 ++ ...ater_than_or_equals_advanced_filter_py3.py | 41 ++ .../models/number_in_advanced_filter.py | 41 ++ .../models/number_in_advanced_filter_py3.py | 41 ++ .../number_less_than_advanced_filter.py | 41 ++ .../number_less_than_advanced_filter_py3.py | 41 ++ ...ber_less_than_or_equals_advanced_filter.py | 41 ++ ...less_than_or_equals_advanced_filter_py3.py | 41 ++ .../models/number_not_in_advanced_filter.py | 41 ++ .../number_not_in_advanced_filter_py3.py | 41 ++ ...us_queue_event_subscription_destination.py | 39 + ...ueue_event_subscription_destination_py3.py | 39 + .../storage_blob_dead_letter_destination.py | 3 +- ...torage_blob_dead_letter_destination_py3.py | 3 +- .../string_begins_with_advanced_filter.py | 41 ++ .../string_begins_with_advanced_filter_py3.py | 41 ++ .../models/string_contains_advanced_filter.py | 41 ++ .../string_contains_advanced_filter_py3.py | 41 ++ .../string_ends_with_advanced_filter.py | 41 ++ .../string_ends_with_advanced_filter_py3.py | 41 ++ .../models/string_in_advanced_filter.py | 41 ++ .../models/string_in_advanced_filter_py3.py | 41 ++ .../models/string_not_in_advanced_filter.py | 41 ++ .../string_not_in_advanced_filter_py3.py | 41 ++ .../azure/mgmt/eventgrid/models/topic.py | 15 + .../azure/mgmt/eventgrid/models/topic_py3.py | 17 +- .../mgmt/eventgrid/operations/__init__.py | 4 + .../operations/domain_topics_operations.py | 376 ++++++++++ .../operations/domains_operations.py | 686 ++++++++++++++++++ .../event_subscriptions_operations.py | 229 +++++- .../mgmt/eventgrid/operations/operations.py | 4 +- .../operations/topic_types_operations.py | 4 +- .../eventgrid/operations/topics_operations.py | 39 +- 72 files changed, 3582 insertions(+), 55 deletions(-) create mode 100644 azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/advanced_filter.py create mode 100644 azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/advanced_filter_py3.py create mode 100644 azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/bool_equals_advanced_filter.py create mode 100644 azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/bool_equals_advanced_filter_py3.py create mode 100644 azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/domain.py create mode 100644 azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/domain_paged.py create mode 100644 azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/domain_py3.py create mode 100644 azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/domain_regenerate_key_request.py create mode 100644 azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/domain_regenerate_key_request_py3.py create mode 100644 azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/domain_shared_access_keys.py create mode 100644 azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/domain_shared_access_keys_py3.py create mode 100644 azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/domain_topic.py create mode 100644 azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/domain_topic_paged.py create mode 100644 azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/domain_topic_py3.py create mode 100644 azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/domain_update_parameters.py create mode 100644 azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/domain_update_parameters_py3.py create mode 100644 azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/input_schema_mapping.py create mode 100644 azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/input_schema_mapping_py3.py create mode 100644 azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/json_field.py create mode 100644 azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/json_field_py3.py create mode 100644 azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/json_field_with_default.py create mode 100644 azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/json_field_with_default_py3.py create mode 100644 azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/json_input_schema_mapping.py create mode 100644 azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/json_input_schema_mapping_py3.py create mode 100644 azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/number_greater_than_advanced_filter.py create mode 100644 azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/number_greater_than_advanced_filter_py3.py create mode 100644 azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/number_greater_than_or_equals_advanced_filter.py create mode 100644 azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/number_greater_than_or_equals_advanced_filter_py3.py create mode 100644 azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/number_in_advanced_filter.py create mode 100644 azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/number_in_advanced_filter_py3.py create mode 100644 azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/number_less_than_advanced_filter.py create mode 100644 azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/number_less_than_advanced_filter_py3.py create mode 100644 azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/number_less_than_or_equals_advanced_filter.py create mode 100644 azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/number_less_than_or_equals_advanced_filter_py3.py create mode 100644 azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/number_not_in_advanced_filter.py create mode 100644 azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/number_not_in_advanced_filter_py3.py create mode 100644 azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/service_bus_queue_event_subscription_destination.py create mode 100644 azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/service_bus_queue_event_subscription_destination_py3.py create mode 100644 azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/string_begins_with_advanced_filter.py create mode 100644 azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/string_begins_with_advanced_filter_py3.py create mode 100644 azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/string_contains_advanced_filter.py create mode 100644 azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/string_contains_advanced_filter_py3.py create mode 100644 azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/string_ends_with_advanced_filter.py create mode 100644 azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/string_ends_with_advanced_filter_py3.py create mode 100644 azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/string_in_advanced_filter.py create mode 100644 azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/string_in_advanced_filter_py3.py create mode 100644 azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/string_not_in_advanced_filter.py create mode 100644 azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/string_not_in_advanced_filter_py3.py create mode 100644 azure-mgmt-eventgrid/azure/mgmt/eventgrid/operations/domain_topics_operations.py create mode 100644 azure-mgmt-eventgrid/azure/mgmt/eventgrid/operations/domains_operations.py 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 dec27a5a2357..6b4c86bf4de9 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,6 +13,8 @@ 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 @@ -60,6 +62,10 @@ 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 @@ -86,10 +92,14 @@ 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 = '2019-01-01' + self.api_version = '2019-02-01-preview' 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 65f0a74d33e5..ea9b806e4adc 100644 --- a/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/__init__.py +++ b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/__init__.py @@ -10,22 +10,45 @@ # -------------------------------------------------------------------------- try: + from .input_schema_mapping_py3 import InputSchemaMapping + from .resource_py3 import Resource + 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 .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 from .hybrid_connection_event_subscription_destination_py3 import HybridConnectionEventSubscriptionDestination + from .service_bus_queue_event_subscription_destination_py3 import ServiceBusQueueEventSubscriptionDestination from .event_subscription_py3 import EventSubscription from .event_subscription_update_parameters_py3 import EventSubscriptionUpdateParameters from .event_subscription_full_url_py3 import EventSubscriptionFullUrl from .operation_info_py3 import OperationInfo from .operation_py3 import Operation - from .tracked_resource_py3 import TrackedResource from .topic_py3 import Topic from .topic_update_parameters_py3 import TopicUpdateParameters from .topic_shared_access_keys_py3 import TopicSharedAccessKeys @@ -33,69 +56,127 @@ from .event_type_py3 import EventType from .topic_type_info_py3 import TopicTypeInfo except (SyntaxError, ImportError): + from .input_schema_mapping import InputSchemaMapping + from .resource import Resource + 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 .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 from .hybrid_connection_event_subscription_destination import HybridConnectionEventSubscriptionDestination + from .service_bus_queue_event_subscription_destination import ServiceBusQueueEventSubscriptionDestination from .event_subscription import EventSubscription from .event_subscription_update_parameters import EventSubscriptionUpdateParameters from .event_subscription_full_url import EventSubscriptionFullUrl from .operation_info import OperationInfo from .operation import Operation - from .tracked_resource import TrackedResource from .topic import Topic from .topic_update_parameters import TopicUpdateParameters from .topic_shared_access_keys import TopicSharedAccessKeys 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, + DomainTopicProvisioningState, EventSubscriptionProvisioningState, + EventDeliverySchema, TopicProvisioningState, ResourceRegionType, TopicTypeProvisioningState, ) __all__ = [ + 'InputSchemaMapping', + 'Resource', + 'JsonField', + 'JsonFieldWithDefault', + 'JsonInputSchemaMapping', + 'TrackedResource', + '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', 'HybridConnectionEventSubscriptionDestination', + 'ServiceBusQueueEventSubscriptionDestination', 'EventSubscription', 'EventSubscriptionUpdateParameters', 'EventSubscriptionFullUrl', 'OperationInfo', 'Operation', - 'TrackedResource', 'Topic', 'TopicUpdateParameters', 'TopicSharedAccessKeys', 'TopicRegenerateKeyRequest', 'EventType', 'TopicTypeInfo', + 'DomainPaged', + 'DomainTopicPaged', 'EventSubscriptionPaged', 'OperationPaged', 'TopicPaged', 'EventTypePaged', 'TopicTypeInfoPaged', + 'DomainProvisioningState', + 'InputSchema', + 'DomainTopicProvisioningState', '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 new file mode 100644 index 000000000000..679eb2b7972e --- /dev/null +++ b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/advanced_filter.py @@ -0,0 +1,51 @@ +# 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): + """The Advanced Filter base class. + + 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 Key value + :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 new file mode 100644 index 000000000000..c5aebcb14329 --- /dev/null +++ b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/advanced_filter_py3.py @@ -0,0 +1,51 @@ +# 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): + """The Advanced Filter base class. + + 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 Key value + :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 new file mode 100644 index 000000000000..07af82aa6e6d --- /dev/null +++ b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/bool_equals_advanced_filter.py @@ -0,0 +1,41 @@ +# 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 Advanced Filter. + + All required parameters must be populated in order to send to Azure. + + :param key: The Key value + :type key: str + :param operator_type: Required. Constant filled by server. + :type operator_type: str + :param value: The boolean 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 new file mode 100644 index 000000000000..44a21d897f33 --- /dev/null +++ b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/bool_equals_advanced_filter_py3.py @@ -0,0 +1,41 @@ +# 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 Advanced Filter. + + All required parameters must be populated in order to send to Azure. + + :param key: The Key value + :type key: str + :param operator_type: Required. Constant filled by server. + :type operator_type: str + :param value: The boolean 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 new file mode 100644 index 000000000000..2b5ee6d6a06f --- /dev/null +++ b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/domain.py @@ -0,0 +1,77 @@ +# 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'. + Default value: "EventGridSchema" . + :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', "EventGridSchema") + 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 new file mode 100644 index 000000000000..ed7fa29c5786 --- /dev/null +++ b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/domain_paged.py @@ -0,0 +1,27 @@ +# 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 new file mode 100644 index 000000000000..54a47b578a0b --- /dev/null +++ b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/domain_py3.py @@ -0,0 +1,77 @@ +# 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'. + Default value: "EventGridSchema" . + :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="EventGridSchema", 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 new file mode 100644 index 000000000000..cacf0e74fb26 --- /dev/null +++ b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/domain_regenerate_key_request.py @@ -0,0 +1,34 @@ +# 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 new file mode 100644 index 000000000000..9d024c87c0c6 --- /dev/null +++ b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/domain_regenerate_key_request_py3.py @@ -0,0 +1,34 @@ +# 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 new file mode 100644 index 000000000000..d04032da4981 --- /dev/null +++ b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/domain_shared_access_keys.py @@ -0,0 +1,32 @@ +# 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 new file mode 100644 index 000000000000..2c13d4ab0367 --- /dev/null +++ b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/domain_shared_access_keys_py3.py @@ -0,0 +1,32 @@ +# 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 new file mode 100644 index 000000000000..2521df5e3a9e --- /dev/null +++ b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/domain_topic.py @@ -0,0 +1,49 @@ +# 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 + :param provisioning_state: Provisioning state of the domain topic. + Possible values include: 'Creating', 'Updating', 'Deleting', 'Succeeded', + 'Canceled', 'Failed' + :type provisioning_state: str or + ~azure.mgmt.eventgrid.models.DomainTopicProvisioningState + """ + + _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'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(DomainTopic, self).__init__(**kwargs) + self.provisioning_state = kwargs.get('provisioning_state', None) 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 new file mode 100644 index 000000000000..b5f599064d3e --- /dev/null +++ b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/domain_topic_paged.py @@ -0,0 +1,27 @@ +# 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 new file mode 100644 index 000000000000..8324a899e841 --- /dev/null +++ b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/domain_topic_py3.py @@ -0,0 +1,49 @@ +# 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 + :param provisioning_state: Provisioning state of the domain topic. + Possible values include: 'Creating', 'Updating', 'Deleting', 'Succeeded', + 'Canceled', 'Failed' + :type provisioning_state: str or + ~azure.mgmt.eventgrid.models.DomainTopicProvisioningState + """ + + _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'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__(self, *, provisioning_state=None, **kwargs) -> None: + super(DomainTopic, self).__init__(**kwargs) + self.provisioning_state = provisioning_state 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 new file mode 100644 index 000000000000..1bc4fca2bc30 --- /dev/null +++ b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/domain_update_parameters.py @@ -0,0 +1,28 @@ +# 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 new file mode 100644 index 000000000000..f876c6e4adbd --- /dev/null +++ b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/domain_update_parameters_py3.py @@ -0,0 +1,28 @@ +# 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 463b59d14609..7b9aaad58749 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,6 +12,33 @@ 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 DomainTopicProvisioningState(str, Enum): + + creating = "Creating" + updating = "Updating" + deleting = "Deleting" + succeeded = "Succeeded" + canceled = "Canceled" + failed = "Failed" + + class EventSubscriptionProvisioningState(str, Enum): creating = "Creating" @@ -23,6 +50,13 @@ 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 87bf3cc47482..fb5f0a3419ce 100644 --- a/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/event_subscription.py +++ b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/event_subscription.py @@ -39,6 +39,13 @@ 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 @@ -65,6 +72,8 @@ 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'}, } @@ -76,5 +85,7 @@ 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_destination.py b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/event_subscription_destination.py index 42667ddc6424..6422d14d56b1 100644 --- a/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/event_subscription_destination.py +++ b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/event_subscription_destination.py @@ -19,7 +19,8 @@ class EventSubscriptionDestination(Model): sub-classes are: WebHookEventSubscriptionDestination, EventHubEventSubscriptionDestination, StorageQueueEventSubscriptionDestination, - HybridConnectionEventSubscriptionDestination + HybridConnectionEventSubscriptionDestination, + ServiceBusQueueEventSubscriptionDestination All required parameters must be populated in order to send to Azure. @@ -36,7 +37,7 @@ class EventSubscriptionDestination(Model): } _subtype_map = { - 'endpoint_type': {'WebHook': 'WebHookEventSubscriptionDestination', 'EventHub': 'EventHubEventSubscriptionDestination', 'StorageQueue': 'StorageQueueEventSubscriptionDestination', 'HybridConnection': 'HybridConnectionEventSubscriptionDestination'} + 'endpoint_type': {'WebHook': 'WebHookEventSubscriptionDestination', 'EventHub': 'EventHubEventSubscriptionDestination', 'StorageQueue': 'StorageQueueEventSubscriptionDestination', 'HybridConnection': 'HybridConnectionEventSubscriptionDestination', 'ServiceBusQueue': 'ServiceBusQueueEventSubscriptionDestination'} } def __init__(self, **kwargs): diff --git a/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/event_subscription_destination_py3.py b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/event_subscription_destination_py3.py index 3bdf32247603..b63db834f037 100644 --- a/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/event_subscription_destination_py3.py +++ b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/event_subscription_destination_py3.py @@ -19,7 +19,8 @@ class EventSubscriptionDestination(Model): sub-classes are: WebHookEventSubscriptionDestination, EventHubEventSubscriptionDestination, StorageQueueEventSubscriptionDestination, - HybridConnectionEventSubscriptionDestination + HybridConnectionEventSubscriptionDestination, + ServiceBusQueueEventSubscriptionDestination All required parameters must be populated in order to send to Azure. @@ -36,7 +37,7 @@ class EventSubscriptionDestination(Model): } _subtype_map = { - 'endpoint_type': {'WebHook': 'WebHookEventSubscriptionDestination', 'EventHub': 'EventHubEventSubscriptionDestination', 'StorageQueue': 'StorageQueueEventSubscriptionDestination', 'HybridConnection': 'HybridConnectionEventSubscriptionDestination'} + 'endpoint_type': {'WebHook': 'WebHookEventSubscriptionDestination', 'EventHub': 'EventHubEventSubscriptionDestination', 'StorageQueue': 'StorageQueueEventSubscriptionDestination', 'HybridConnection': 'HybridConnectionEventSubscriptionDestination', 'ServiceBusQueue': 'ServiceBusQueueEventSubscriptionDestination'} } def __init__(self, **kwargs) -> 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 0b2466b19281..55e040721059 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 @@ -25,14 +25,16 @@ class EventSubscriptionFilter(Model): Wildcard characters are not supported in this path. :type subject_ends_with: str :param included_event_types: A list of applicable event types that need to - be part of the event subscription. - If it is desired to subscribe to all event types, the string "all" needs - to be specified as an element in this list. + be part of the event subscription. If it is desired to subscribe to all + event types, set the IncludedEventTypes to null. :type included_event_types: list[str] :param is_subject_case_sensitive: Specifies if the SubjectBeginsWith and 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: An array of advanced filters that are used for + filtering event subscriptions. + :type advanced_filters: list[~azure.mgmt.eventgrid.models.AdvancedFilter] """ _attribute_map = { @@ -40,6 +42,7 @@ 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): @@ -48,3 +51,4 @@ 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 cc9ddbce65d2..f935c19eaa7e 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 @@ -25,14 +25,16 @@ class EventSubscriptionFilter(Model): Wildcard characters are not supported in this path. :type subject_ends_with: str :param included_event_types: A list of applicable event types that need to - be part of the event subscription. - If it is desired to subscribe to all event types, the string "all" needs - to be specified as an element in this list. + be part of the event subscription. If it is desired to subscribe to all + event types, set the IncludedEventTypes to null. :type included_event_types: list[str] :param is_subject_case_sensitive: Specifies if the SubjectBeginsWith and 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: An array of advanced filters that are used for + filtering event subscriptions. + :type advanced_filters: list[~azure.mgmt.eventgrid.models.AdvancedFilter] """ _attribute_map = { @@ -40,11 +42,13 @@ 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, **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, advanced_filters=None, **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 7d69c6cfe5b1..246622ce3702 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,6 +39,13 @@ 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 @@ -65,16 +72,20 @@ 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, retry_policy=None, dead_letter_destination=None, **kwargs) -> None: + 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: 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 81aea2f06430..5371a06679cc 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,6 +23,14 @@ 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 @@ -36,6 +44,8 @@ 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'}, } @@ -45,5 +55,7 @@ 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 7f52b18c6abe..3f415aa3e8cb 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,6 +23,14 @@ 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 @@ -36,14 +44,18 @@ 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, retry_policy=None, dead_letter_destination=None, **kwargs) -> None: + 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: 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/event_type.py b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/event_type.py index 266e3220589d..1623e18030eb 100644 --- a/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/event_type.py +++ b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/event_type.py @@ -30,6 +30,8 @@ class EventType(Resource): :type description: str :param schema_url: Url of the schema for this event type. :type schema_url: str + :param is_in_default_set: IsInDefaultSet flag of the event type. + :type is_in_default_set: bool """ _validation = { @@ -45,6 +47,7 @@ class EventType(Resource): 'display_name': {'key': 'properties.displayName', 'type': 'str'}, 'description': {'key': 'properties.description', 'type': 'str'}, 'schema_url': {'key': 'properties.schemaUrl', 'type': 'str'}, + 'is_in_default_set': {'key': 'properties.isInDefaultSet', 'type': 'bool'}, } def __init__(self, **kwargs): @@ -52,3 +55,4 @@ def __init__(self, **kwargs): self.display_name = kwargs.get('display_name', None) self.description = kwargs.get('description', None) self.schema_url = kwargs.get('schema_url', None) + self.is_in_default_set = kwargs.get('is_in_default_set', None) diff --git a/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/event_type_py3.py b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/event_type_py3.py index b2fb69868f3f..52f1f6093586 100644 --- a/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/event_type_py3.py +++ b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/event_type_py3.py @@ -30,6 +30,8 @@ class EventType(Resource): :type description: str :param schema_url: Url of the schema for this event type. :type schema_url: str + :param is_in_default_set: IsInDefaultSet flag of the event type. + :type is_in_default_set: bool """ _validation = { @@ -45,10 +47,12 @@ class EventType(Resource): 'display_name': {'key': 'properties.displayName', 'type': 'str'}, 'description': {'key': 'properties.description', 'type': 'str'}, 'schema_url': {'key': 'properties.schemaUrl', 'type': 'str'}, + 'is_in_default_set': {'key': 'properties.isInDefaultSet', 'type': 'bool'}, } - def __init__(self, *, display_name: str=None, description: str=None, schema_url: str=None, **kwargs) -> None: + def __init__(self, *, display_name: str=None, description: str=None, schema_url: str=None, is_in_default_set: bool=None, **kwargs) -> None: super(EventType, self).__init__(**kwargs) self.display_name = display_name self.description = description self.schema_url = schema_url + self.is_in_default_set = is_in_default_set 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 new file mode 100644 index 000000000000..f99596238470 --- /dev/null +++ b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/input_schema_mapping.py @@ -0,0 +1,44 @@ +# 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 new file mode 100644 index 000000000000..b3a12a359f62 --- /dev/null +++ b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/input_schema_mapping_py3.py @@ -0,0 +1,44 @@ +# 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 new file mode 100644 index 000000000000..0338424589ca --- /dev/null +++ b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/json_field.py @@ -0,0 +1,32 @@ +# 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 new file mode 100644 index 000000000000..68e6016cafb7 --- /dev/null +++ b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/json_field_py3.py @@ -0,0 +1,32 @@ +# 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 new file mode 100644 index 000000000000..5dd27bed8f7c --- /dev/null +++ b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/json_field_with_default.py @@ -0,0 +1,42 @@ +# 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 new file mode 100644 index 000000000000..1a17f0469002 --- /dev/null +++ b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/json_field_with_default_py3.py @@ -0,0 +1,42 @@ +# 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 new file mode 100644 index 000000000000..a7635fe6717e --- /dev/null +++ b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/json_input_schema_mapping.py @@ -0,0 +1,66 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .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 new file mode 100644 index 000000000000..4d3ff8a1b8f4 --- /dev/null +++ b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/json_input_schema_mapping_py3.py @@ -0,0 +1,66 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .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 new file mode 100644 index 000000000000..46d19c9a5d9c --- /dev/null +++ b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/number_greater_than_advanced_filter.py @@ -0,0 +1,41 @@ +# 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 Advanced Filter. + + All required parameters must be populated in order to send to Azure. + + :param key: The Key value + :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 new file mode 100644 index 000000000000..71138097c3b2 --- /dev/null +++ b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/number_greater_than_advanced_filter_py3.py @@ -0,0 +1,41 @@ +# 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 Advanced Filter. + + All required parameters must be populated in order to send to Azure. + + :param key: The Key value + :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 new file mode 100644 index 000000000000..ea473bcd7c83 --- /dev/null +++ b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/number_greater_than_or_equals_advanced_filter.py @@ -0,0 +1,41 @@ +# 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 Advanced Filter. + + All required parameters must be populated in order to send to Azure. + + :param key: The Key value + :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 new file mode 100644 index 000000000000..5e6d7d574279 --- /dev/null +++ b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/number_greater_than_or_equals_advanced_filter_py3.py @@ -0,0 +1,41 @@ +# 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 Advanced Filter. + + All required parameters must be populated in order to send to Azure. + + :param key: The Key value + :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 new file mode 100644 index 000000000000..cf2bbf6c4aa9 --- /dev/null +++ b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/number_in_advanced_filter.py @@ -0,0 +1,41 @@ +# 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 Advanced Filter. + + All required parameters must be populated in order to send to Azure. + + :param key: The Key value + :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 new file mode 100644 index 000000000000..fed5416d9afa --- /dev/null +++ b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/number_in_advanced_filter_py3.py @@ -0,0 +1,41 @@ +# 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 Advanced Filter. + + All required parameters must be populated in order to send to Azure. + + :param key: The Key value + :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 new file mode 100644 index 000000000000..926eeadcdf12 --- /dev/null +++ b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/number_less_than_advanced_filter.py @@ -0,0 +1,41 @@ +# 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 Advanced Filter. + + All required parameters must be populated in order to send to Azure. + + :param key: The Key value + :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 new file mode 100644 index 000000000000..2716637a4579 --- /dev/null +++ b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/number_less_than_advanced_filter_py3.py @@ -0,0 +1,41 @@ +# 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 Advanced Filter. + + All required parameters must be populated in order to send to Azure. + + :param key: The Key value + :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 new file mode 100644 index 000000000000..47e790dc2b3a --- /dev/null +++ b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/number_less_than_or_equals_advanced_filter.py @@ -0,0 +1,41 @@ +# 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 Advanced Filter. + + All required parameters must be populated in order to send to Azure. + + :param key: The Key value + :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 new file mode 100644 index 000000000000..3b95a926b632 --- /dev/null +++ b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/number_less_than_or_equals_advanced_filter_py3.py @@ -0,0 +1,41 @@ +# 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 Advanced Filter. + + All required parameters must be populated in order to send to Azure. + + :param key: The Key value + :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 new file mode 100644 index 000000000000..343c167e3dfc --- /dev/null +++ b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/number_not_in_advanced_filter.py @@ -0,0 +1,41 @@ +# 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 Advanced Filter. + + All required parameters must be populated in order to send to Azure. + + :param key: The Key value + :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 new file mode 100644 index 000000000000..44df3e2f9dbb --- /dev/null +++ b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/number_not_in_advanced_filter_py3.py @@ -0,0 +1,41 @@ +# 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 Advanced Filter. + + All required parameters must be populated in order to send to Azure. + + :param key: The Key value + :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/service_bus_queue_event_subscription_destination.py b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/service_bus_queue_event_subscription_destination.py new file mode 100644 index 000000000000..aae5c7e3eb6b --- /dev/null +++ b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/service_bus_queue_event_subscription_destination.py @@ -0,0 +1,39 @@ +# 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 .event_subscription_destination import EventSubscriptionDestination + + +class ServiceBusQueueEventSubscriptionDestination(EventSubscriptionDestination): + """Information about the service bus destination for an event subscription. + + All required parameters must be populated in order to send to Azure. + + :param endpoint_type: Required. Constant filled by server. + :type endpoint_type: str + :param resource_id: The Azure Resource Id that represents the endpoint of + the Service Bus destination of an event subscription. + :type resource_id: str + """ + + _validation = { + 'endpoint_type': {'required': True}, + } + + _attribute_map = { + 'endpoint_type': {'key': 'endpointType', 'type': 'str'}, + 'resource_id': {'key': 'properties.resourceId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ServiceBusQueueEventSubscriptionDestination, self).__init__(**kwargs) + self.resource_id = kwargs.get('resource_id', None) + self.endpoint_type = 'ServiceBusQueue' diff --git a/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/service_bus_queue_event_subscription_destination_py3.py b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/service_bus_queue_event_subscription_destination_py3.py new file mode 100644 index 000000000000..8eb780cb7c3e --- /dev/null +++ b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/service_bus_queue_event_subscription_destination_py3.py @@ -0,0 +1,39 @@ +# 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 .event_subscription_destination_py3 import EventSubscriptionDestination + + +class ServiceBusQueueEventSubscriptionDestination(EventSubscriptionDestination): + """Information about the service bus destination for an event subscription. + + All required parameters must be populated in order to send to Azure. + + :param endpoint_type: Required. Constant filled by server. + :type endpoint_type: str + :param resource_id: The Azure Resource Id that represents the endpoint of + the Service Bus destination of an event subscription. + :type resource_id: str + """ + + _validation = { + 'endpoint_type': {'required': True}, + } + + _attribute_map = { + 'endpoint_type': {'key': 'endpointType', 'type': 'str'}, + 'resource_id': {'key': 'properties.resourceId', 'type': 'str'}, + } + + def __init__(self, *, resource_id: str=None, **kwargs) -> None: + super(ServiceBusQueueEventSubscriptionDestination, self).__init__(**kwargs) + self.resource_id = resource_id + self.endpoint_type = 'ServiceBusQueue' 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 def9968ba45a..aadbe4e08efa 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,8 +20,7 @@ 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. For example: - /subscriptions/{AzureSubscriptionId}/resourceGroups/{ResourceGroupName}/providers/microsoft.Storage/storageAccounts/{StorageAccountName} + the destination of the deadletter events :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 0e364106a14c..65e0813f852e 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,8 +20,7 @@ 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. For example: - /subscriptions/{AzureSubscriptionId}/resourceGroups/{ResourceGroupName}/providers/microsoft.Storage/storageAccounts/{StorageAccountName} + the destination of the deadletter events :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 new file mode 100644 index 000000000000..f09fd519d3ee --- /dev/null +++ b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/string_begins_with_advanced_filter.py @@ -0,0 +1,41 @@ +# 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 Advanced Filter. + + All required parameters must be populated in order to send to Azure. + + :param key: The Key value + :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 new file mode 100644 index 000000000000..611a87ff3e5a --- /dev/null +++ b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/string_begins_with_advanced_filter_py3.py @@ -0,0 +1,41 @@ +# 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 Advanced Filter. + + All required parameters must be populated in order to send to Azure. + + :param key: The Key value + :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 new file mode 100644 index 000000000000..1fe8460485fe --- /dev/null +++ b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/string_contains_advanced_filter.py @@ -0,0 +1,41 @@ +# 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 Advanced Filter. + + All required parameters must be populated in order to send to Azure. + + :param key: The Key value + :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 new file mode 100644 index 000000000000..a3073af8010d --- /dev/null +++ b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/string_contains_advanced_filter_py3.py @@ -0,0 +1,41 @@ +# 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 Advanced Filter. + + All required parameters must be populated in order to send to Azure. + + :param key: The Key value + :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 new file mode 100644 index 000000000000..d735c2fc4618 --- /dev/null +++ b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/string_ends_with_advanced_filter.py @@ -0,0 +1,41 @@ +# 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 Advanced Filter. + + All required parameters must be populated in order to send to Azure. + + :param key: The Key value + :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 new file mode 100644 index 000000000000..235a6ca10edd --- /dev/null +++ b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/string_ends_with_advanced_filter_py3.py @@ -0,0 +1,41 @@ +# 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 Advanced Filter. + + All required parameters must be populated in order to send to Azure. + + :param key: The Key value + :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 new file mode 100644 index 000000000000..9919df20381d --- /dev/null +++ b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/string_in_advanced_filter.py @@ -0,0 +1,41 @@ +# 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 Advanced Filter. + + All required parameters must be populated in order to send to Azure. + + :param key: The Key value + :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 new file mode 100644 index 000000000000..e46bd7c95b2b --- /dev/null +++ b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/string_in_advanced_filter_py3.py @@ -0,0 +1,41 @@ +# 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 Advanced Filter. + + All required parameters must be populated in order to send to Azure. + + :param key: The Key value + :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 new file mode 100644 index 000000000000..45db1c754706 --- /dev/null +++ b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/string_not_in_advanced_filter.py @@ -0,0 +1,41 @@ +# 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 Advanced Filter. + + All required parameters must be populated in order to send to Azure. + + :param key: The Key value + :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 new file mode 100644 index 000000000000..b7119b17863f --- /dev/null +++ b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/string_not_in_advanced_filter_py3.py @@ -0,0 +1,41 @@ +# 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 Advanced Filter. + + All required parameters must be populated in order to send to Azure. + + :param key: The Key value + :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 46c6de571fa7..50d28d5206e5 100644 --- a/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/topic.py +++ b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/topic.py @@ -37,6 +37,17 @@ 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 = { @@ -56,9 +67,13 @@ 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 304f78cf9692..9c562e93663a 100644 --- a/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/topic_py3.py +++ b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/topic_py3.py @@ -37,6 +37,17 @@ 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 = { @@ -56,9 +67,13 @@ 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, **kwargs) -> None: + def __init__(self, *, location: str, tags=None, input_schema="EventGridSchema", input_schema_mapping=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 db9b4311e47c..809a02494719 100644 --- a/azure-mgmt-eventgrid/azure/mgmt/eventgrid/operations/__init__.py +++ b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/operations/__init__.py @@ -9,12 +9,16 @@ # 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 new file mode 100644 index 000000000000..a05fe9556fdf --- /dev/null +++ b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/operations/domain_topics_operations.py @@ -0,0 +1,376 @@ +# 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 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: "2019-02-01-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2019-02-01-preview" + + self.config = config + + def get( + self, resource_group_name, domain_name, domain_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 domain_topic_name: Name of the topic + :type domain_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'), + 'domainTopicName': self._serialize.url("domain_topic_name", domain_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/{domainTopicName}'} + + + def _create_or_update_initial( + self, resource_group_name, domain_name, domain_topic_name, 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'), + 'domainTopicName': self._serialize.url("domain_topic_name", domain_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.put(url, query_parameters, header_parameters) + 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('DomainTopic', 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_topic_name, custom_headers=None, raw=False, polling=True, **operation_config): + """Create or update a domain topic. + + Asynchronously creates or updates a new domain topic 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_topic_name: Name of the domain topic + :type domain_topic_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 DomainTopic or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.eventgrid.models.DomainTopic] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.eventgrid.models.DomainTopic]] + :raises: :class:`CloudError` + """ + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + domain_name=domain_name, + domain_topic_name=domain_topic_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('DomainTopic', 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}/topics/{domainTopicName}'} + + + def _delete_initial( + self, resource_group_name, domain_name, domain_topic_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'), + 'domainTopicName': self._serialize.url("domain_topic_name", domain_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 = {} + 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, domain_topic_name, custom_headers=None, raw=False, polling=True, **operation_config): + """Delete a domain topic. + + Delete existing 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 domain_topic_name: Name of the domain topic + :type domain_topic_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, + domain_topic_name=domain_topic_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}/topics/{domainTopicName}'} + + def list_by_domain( + self, resource_group_name, domain_name, filter=None, top=None, 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 filter: Filter the results using OData syntax. + :type filter: str + :param top: The number of results to return. + :type top: int + :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') + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') + if top is not None: + query_parameters['$top'] = self._serialize.query("top", top, 'int') + + 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 new file mode 100644 index 000000000000..63e49c9c4823 --- /dev/null +++ b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/operations/domains_operations.py @@ -0,0 +1,686 @@ +# 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: "2019-02-01-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2019-02-01-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 or update a domain. + + Asynchronously creates or updates 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, filter=None, top=None, custom_headers=None, raw=False, **operation_config): + """List domains under an Azure subscription. + + List all the domains under an Azure subscription. + + :param filter: Filter the results using OData syntax. + :type filter: str + :param top: The number of results to return. + :type top: int + :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') + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') + if top is not None: + query_parameters['$top'] = self._serialize.query("top", top, 'int') + + 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, filter=None, top=None, 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 filter: Filter the results using OData syntax. + :type filter: str + :param top: The number of results to return. + :type top: int + :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') + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') + if top is not None: + query_parameters['$top'] = self._serialize.query("top", top, 'int') + + 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 9935a0ad268e..a96632858594 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: "2019-01-01". + :ivar api_version: Version of the API to be used with the client request. Constant value: "2019-02-01-preview". """ 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 = "2019-01-01" + self.api_version = "2019-02-01-preview" self.config = config @@ -502,13 +502,20 @@ def get_full_url( get_full_url.metadata = {'url': '/{scope}/providers/Microsoft.EventGrid/eventSubscriptions/{eventSubscriptionName}/getFullUrl'} def list_global_by_subscription( - self, custom_headers=None, raw=False, **operation_config): + self, filter=None, top=None, label=None, custom_headers=None, raw=False, **operation_config): """Get an aggregated list of all global event subscriptions under an Azure subscription. List all aggregated global event subscriptions under a specific Azure subscription. + :param filter: Filter the results using OData syntax. + :type filter: str + :param top: The number of results to return. + :type top: int + :param label: The label used to filter the results for event + subscriptions list. + :type label: str :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response @@ -532,6 +539,12 @@ def internal_paging(next_link=None, raw=False): # Construct parameters query_parameters = {} query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') + if top is not None: + query_parameters['$top'] = self._serialize.query("top", top, 'int') + if label is not None: + query_parameters['LABEL'] = self._serialize.query("label", label, 'str') else: url = next_link @@ -570,7 +583,7 @@ def internal_paging(next_link=None, raw=False): list_global_by_subscription.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.EventGrid/eventSubscriptions'} def list_global_by_subscription_for_topic_type( - self, topic_type_name, custom_headers=None, raw=False, **operation_config): + self, topic_type_name, filter=None, top=None, label=None, custom_headers=None, raw=False, **operation_config): """List all global event subscriptions for a topic type. List all global event subscriptions under an Azure subscription for a @@ -578,6 +591,13 @@ def list_global_by_subscription_for_topic_type( :param topic_type_name: Name of the topic type :type topic_type_name: str + :param filter: Filter the results using OData syntax. + :type filter: str + :param top: The number of results to return. + :type top: int + :param label: The label used to filter the results for event + subscriptions list. + :type label: str :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response @@ -602,6 +622,12 @@ def internal_paging(next_link=None, raw=False): # Construct parameters query_parameters = {} query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') + if top is not None: + query_parameters['$top'] = self._serialize.query("top", top, 'int') + if label is not None: + query_parameters['LABEL'] = self._serialize.query("label", label, 'str') else: url = next_link @@ -640,7 +666,7 @@ def internal_paging(next_link=None, raw=False): list_global_by_subscription_for_topic_type.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.EventGrid/topicTypes/{topicTypeName}/eventSubscriptions'} def list_global_by_resource_group( - self, resource_group_name, custom_headers=None, raw=False, **operation_config): + self, resource_group_name, filter=None, top=None, label=None, custom_headers=None, raw=False, **operation_config): """List all global event subscriptions under an Azure subscription and resource group. @@ -650,6 +676,13 @@ def list_global_by_resource_group( :param resource_group_name: The name of the resource group within the user's subscription. :type resource_group_name: str + :param filter: Filter the results using OData syntax. + :type filter: str + :param top: The number of results to return. + :type top: int + :param label: The label used to filter the results for event + subscriptions list. + :type label: str :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response @@ -674,6 +707,12 @@ def internal_paging(next_link=None, raw=False): # Construct parameters query_parameters = {} query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') + if top is not None: + query_parameters['$top'] = self._serialize.query("top", top, 'int') + if label is not None: + query_parameters['LABEL'] = self._serialize.query("label", label, 'str') else: url = next_link @@ -712,7 +751,7 @@ def internal_paging(next_link=None, raw=False): list_global_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/eventSubscriptions'} def list_global_by_resource_group_for_topic_type( - self, resource_group_name, topic_type_name, custom_headers=None, raw=False, **operation_config): + self, resource_group_name, topic_type_name, filter=None, top=None, label=None, custom_headers=None, raw=False, **operation_config): """List all global event subscriptions under a resource group for a topic type. @@ -724,6 +763,13 @@ def list_global_by_resource_group_for_topic_type( :type resource_group_name: str :param topic_type_name: Name of the topic type :type topic_type_name: str + :param filter: Filter the results using OData syntax. + :type filter: str + :param top: The number of results to return. + :type top: int + :param label: The label used to filter the results for event + subscriptions list. + :type label: str :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response @@ -749,6 +795,12 @@ def internal_paging(next_link=None, raw=False): # Construct parameters query_parameters = {} query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') + if top is not None: + query_parameters['$top'] = self._serialize.query("top", top, 'int') + if label is not None: + query_parameters['LABEL'] = self._serialize.query("label", label, 'str') else: url = next_link @@ -787,7 +839,7 @@ def internal_paging(next_link=None, raw=False): list_global_by_resource_group_for_topic_type.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topicTypes/{topicTypeName}/eventSubscriptions'} def list_regional_by_subscription( - self, location, custom_headers=None, raw=False, **operation_config): + self, location, filter=None, top=None, label=None, custom_headers=None, raw=False, **operation_config): """List all regional event subscriptions under an Azure subscription. List all event subscriptions from the given location under a specific @@ -795,6 +847,13 @@ def list_regional_by_subscription( :param location: Name of the location :type location: str + :param filter: Filter the results using OData syntax. + :type filter: str + :param top: The number of results to return. + :type top: int + :param label: The label used to filter the results for event + subscriptions list. + :type label: str :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response @@ -819,6 +878,12 @@ def internal_paging(next_link=None, raw=False): # Construct parameters query_parameters = {} query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') + if top is not None: + query_parameters['$top'] = self._serialize.query("top", top, 'int') + if label is not None: + query_parameters['LABEL'] = self._serialize.query("label", label, 'str') else: url = next_link @@ -857,7 +922,7 @@ def internal_paging(next_link=None, raw=False): list_regional_by_subscription.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.EventGrid/locations/{location}/eventSubscriptions'} def list_regional_by_resource_group( - self, resource_group_name, location, custom_headers=None, raw=False, **operation_config): + self, resource_group_name, location, filter=None, top=None, label=None, custom_headers=None, raw=False, **operation_config): """List all regional event subscriptions under an Azure subscription and resource group. @@ -869,6 +934,13 @@ def list_regional_by_resource_group( :type resource_group_name: str :param location: Name of the location :type location: str + :param filter: Filter the results using OData syntax. + :type filter: str + :param top: The number of results to return. + :type top: int + :param label: The label used to filter the results for event + subscriptions list. + :type label: str :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response @@ -894,6 +966,12 @@ def internal_paging(next_link=None, raw=False): # Construct parameters query_parameters = {} query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') + if top is not None: + query_parameters['$top'] = self._serialize.query("top", top, 'int') + if label is not None: + query_parameters['LABEL'] = self._serialize.query("label", label, 'str') else: url = next_link @@ -932,7 +1010,7 @@ def internal_paging(next_link=None, raw=False): list_regional_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/locations/{location}/eventSubscriptions'} def list_regional_by_subscription_for_topic_type( - self, location, topic_type_name, custom_headers=None, raw=False, **operation_config): + self, location, topic_type_name, filter=None, top=None, label=None, custom_headers=None, raw=False, **operation_config): """List all regional event subscriptions under an Azure subscription for a topic type. @@ -943,6 +1021,13 @@ def list_regional_by_subscription_for_topic_type( :type location: str :param topic_type_name: Name of the topic type :type topic_type_name: str + :param filter: Filter the results using OData syntax. + :type filter: str + :param top: The number of results to return. + :type top: int + :param label: The label used to filter the results for event + subscriptions list. + :type label: str :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response @@ -968,6 +1053,12 @@ def internal_paging(next_link=None, raw=False): # Construct parameters query_parameters = {} query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') + if top is not None: + query_parameters['$top'] = self._serialize.query("top", top, 'int') + if label is not None: + query_parameters['LABEL'] = self._serialize.query("label", label, 'str') else: url = next_link @@ -1006,7 +1097,7 @@ def internal_paging(next_link=None, raw=False): list_regional_by_subscription_for_topic_type.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.EventGrid/locations/{location}/topicTypes/{topicTypeName}/eventSubscriptions'} def list_regional_by_resource_group_for_topic_type( - self, resource_group_name, location, topic_type_name, custom_headers=None, raw=False, **operation_config): + self, resource_group_name, location, topic_type_name, filter=None, top=None, label=None, custom_headers=None, raw=False, **operation_config): """List all regional event subscriptions under an Azure subscription and resource group for a topic type. @@ -1020,6 +1111,13 @@ def list_regional_by_resource_group_for_topic_type( :type location: str :param topic_type_name: Name of the topic type :type topic_type_name: str + :param filter: Filter the results using OData syntax. + :type filter: str + :param top: The number of results to return. + :type top: int + :param label: The label used to filter the results for event + subscriptions list. + :type label: str :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response @@ -1046,6 +1144,12 @@ def internal_paging(next_link=None, raw=False): # Construct parameters query_parameters = {} query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') + if top is not None: + query_parameters['$top'] = self._serialize.query("top", top, 'int') + if label is not None: + query_parameters['LABEL'] = self._serialize.query("label", label, 'str') else: url = next_link @@ -1084,7 +1188,7 @@ def internal_paging(next_link=None, raw=False): list_regional_by_resource_group_for_topic_type.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/locations/{location}/topicTypes/{topicTypeName}/eventSubscriptions'} def list_by_resource( - self, resource_group_name, provider_namespace, resource_type_name, resource_name, custom_headers=None, raw=False, **operation_config): + self, resource_group_name, provider_namespace, resource_type_name, resource_name, filter=None, top=None, label=None, custom_headers=None, raw=False, **operation_config): """List all event subscriptions for a specific topic. List all event subscriptions that have been created for a specific @@ -1099,6 +1203,13 @@ def list_by_resource( :type resource_type_name: str :param resource_name: Name of the resource :type resource_name: str + :param filter: Filter the results using OData syntax. + :type filter: str + :param top: The number of results to return. + :type top: int + :param label: The label used to filter the results for event + subscriptions list. + :type label: str :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response @@ -1126,6 +1237,12 @@ def internal_paging(next_link=None, raw=False): # Construct parameters query_parameters = {} query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') + if top is not None: + query_parameters['$top'] = self._serialize.query("top", top, 'int') + if label is not None: + query_parameters['LABEL'] = self._serialize.query("label", label, 'str') else: url = next_link @@ -1162,3 +1279,93 @@ 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, filter=None, top=None, label=None, 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 filter: Filter the results using OData syntax. + :type filter: str + :param top: The number of results to return. + :type top: int + :param label: The label used to filter the results for event + subscriptions list. + :type label: 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') + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') + if top is not None: + query_parameters['$top'] = self._serialize.query("top", top, 'int') + if label is not None: + query_parameters['LABEL'] = self._serialize.query("label", label, '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 316c04094c0a..65fd7d6505d3 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: "2019-01-01". + :ivar api_version: Version of the API to be used with the client request. Constant value: "2019-02-01-preview". """ 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 = "2019-01-01" + self.api_version = "2019-02-01-preview" 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 c492b8a99146..50eea56f61a1 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: "2019-01-01". + :ivar api_version: Version of the API to be used with the client request. Constant value: "2019-02-01-preview". """ 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 = "2019-01-01" + self.api_version = "2019-02-01-preview" 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 9652d6feb433..945c5bfea30f 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: "2019-01-01". + :ivar api_version: Version of the API to be used with the client request. Constant value: "2019-02-01-preview". """ 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 = "2019-01-01" + self.api_version = "2019-02-01-preview" self.config = config @@ -106,9 +106,7 @@ def get( def _create_or_update_initial( - self, resource_group_name, topic_name, location, tags=None, custom_headers=None, raw=False, **operation_config): - topic_info = models.Topic(location=location, tags=tags) - + self, resource_group_name, topic_name, topic_info, custom_headers=None, raw=False, **operation_config): # Construct URL url = self.create_or_update.metadata['url'] path_format_arguments = { @@ -157,7 +155,7 @@ def _create_or_update_initial( return deserialized def create_or_update( - self, resource_group_name, topic_name, location, tags=None, custom_headers=None, raw=False, polling=True, **operation_config): + self, resource_group_name, topic_name, topic_info, custom_headers=None, raw=False, polling=True, **operation_config): """Create a topic. Asynchronously creates a new topic with the specified parameters. @@ -167,10 +165,8 @@ def create_or_update( :type resource_group_name: str :param topic_name: Name of the topic :type topic_name: str - :param location: Location of the resource - :type location: str - :param tags: Tags of the resource - :type tags: dict[str, str] + :param topic_info: Topic information + :type topic_info: ~azure.mgmt.eventgrid.models.Topic :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 @@ -187,8 +183,7 @@ def create_or_update( raw_result = self._create_or_update_initial( resource_group_name=resource_group_name, topic_name=topic_name, - location=location, - tags=tags, + topic_info=topic_info, custom_headers=custom_headers, raw=True, **operation_config @@ -400,11 +395,15 @@ def get_long_running_output(response): update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}'} def list_by_subscription( - self, custom_headers=None, raw=False, **operation_config): + self, filter=None, top=None, custom_headers=None, raw=False, **operation_config): """List topics under an Azure subscription. List all the topics under an Azure subscription. + :param filter: Filter the results using OData syntax. + :type filter: str + :param top: The number of results to return. + :type top: int :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response @@ -428,6 +427,10 @@ def internal_paging(next_link=None, raw=False): # Construct parameters query_parameters = {} query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') + if top is not None: + query_parameters['$top'] = self._serialize.query("top", top, 'int') else: url = next_link @@ -466,7 +469,7 @@ def internal_paging(next_link=None, raw=False): list_by_subscription.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.EventGrid/topics'} def list_by_resource_group( - self, resource_group_name, custom_headers=None, raw=False, **operation_config): + self, resource_group_name, filter=None, top=None, custom_headers=None, raw=False, **operation_config): """List topics under a resource group. List all the topics under a resource group. @@ -474,6 +477,10 @@ def list_by_resource_group( :param resource_group_name: The name of the resource group within the user's subscription. :type resource_group_name: str + :param filter: Filter the results using OData syntax. + :type filter: str + :param top: The number of results to return. + :type top: int :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response @@ -498,6 +505,10 @@ def internal_paging(next_link=None, raw=False): # Construct parameters query_parameters = {} query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') + if top is not None: + query_parameters['$top'] = self._serialize.query("top", top, 'int') else: url = next_link From c0d5a594eb2223a31d235984b8fe3245523327ff Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Tue, 26 Feb 2019 05:59:24 +0000 Subject: [PATCH 4/5] Generated from a24d800830002278277351bbf1a580248c585274 update summary text per code review comments --- .../mgmt/eventgrid/models/advanced_filter.py | 10 ++++++++-- .../eventgrid/models/advanced_filter_py3.py | 10 ++++++++-- .../models/bool_equals_advanced_filter.py | 5 +++-- .../models/bool_equals_advanced_filter_py3.py | 5 +++-- .../number_greater_than_advanced_filter.py | 5 +++-- ...number_greater_than_advanced_filter_py3.py | 5 +++-- ..._greater_than_or_equals_advanced_filter.py | 5 +++-- ...ater_than_or_equals_advanced_filter_py3.py | 5 +++-- .../models/number_in_advanced_filter.py | 5 +++-- .../models/number_in_advanced_filter_py3.py | 5 +++-- .../number_less_than_advanced_filter.py | 5 +++-- .../number_less_than_advanced_filter_py3.py | 5 +++-- ...ber_less_than_or_equals_advanced_filter.py | 5 +++-- ...less_than_or_equals_advanced_filter_py3.py | 5 +++-- .../models/number_not_in_advanced_filter.py | 5 +++-- .../number_not_in_advanced_filter_py3.py | 5 +++-- .../string_begins_with_advanced_filter.py | 5 +++-- .../string_begins_with_advanced_filter_py3.py | 5 +++-- .../models/string_contains_advanced_filter.py | 5 +++-- .../string_contains_advanced_filter_py3.py | 5 +++-- .../string_ends_with_advanced_filter.py | 5 +++-- .../string_ends_with_advanced_filter_py3.py | 5 +++-- .../models/string_in_advanced_filter.py | 5 +++-- .../models/string_in_advanced_filter_py3.py | 5 +++-- .../models/string_not_in_advanced_filter.py | 5 +++-- .../string_not_in_advanced_filter_py3.py | 5 +++-- .../event_subscriptions_operations.py | 20 +++++++++---------- 27 files changed, 98 insertions(+), 62 deletions(-) diff --git a/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/advanced_filter.py b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/advanced_filter.py index 679eb2b7972e..10cd4c474b8e 100644 --- a/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/advanced_filter.py +++ b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/advanced_filter.py @@ -13,7 +13,12 @@ class AdvancedFilter(Model): - """The Advanced Filter base class. + """This is the base type that represents an advanced filter. To configure an + advanced filter, do not directly instantiate an object of this class. + Instead, instantiate an object of a derived class such as + BoolEqualsAdvancedFilter, NumberInAdvancedFilter, + StringEqualsAdvancedFilter etc. depending on the type of the key based on + which you want to filter. You probably want to use the sub-classes and not this class directly. Known sub-classes are: NumberInAdvancedFilter, NumberNotInAdvancedFilter, @@ -26,7 +31,8 @@ class AdvancedFilter(Model): All required parameters must be populated in order to send to Azure. - :param key: The Key value + :param key: The field/property in the event based on which you want to + filter. :type key: str :param operator_type: Required. Constant filled by server. :type operator_type: str 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 index c5aebcb14329..d016b6c60b9b 100644 --- a/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/advanced_filter_py3.py +++ b/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/advanced_filter_py3.py @@ -13,7 +13,12 @@ class AdvancedFilter(Model): - """The Advanced Filter base class. + """This is the base type that represents an advanced filter. To configure an + advanced filter, do not directly instantiate an object of this class. + Instead, instantiate an object of a derived class such as + BoolEqualsAdvancedFilter, NumberInAdvancedFilter, + StringEqualsAdvancedFilter etc. depending on the type of the key based on + which you want to filter. You probably want to use the sub-classes and not this class directly. Known sub-classes are: NumberInAdvancedFilter, NumberNotInAdvancedFilter, @@ -26,7 +31,8 @@ class AdvancedFilter(Model): All required parameters must be populated in order to send to Azure. - :param key: The Key value + :param key: The field/property in the event based on which you want to + filter. :type key: str :param operator_type: Required. Constant filled by server. :type operator_type: str 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 index 07af82aa6e6d..e74a642c229e 100644 --- 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 @@ -17,11 +17,12 @@ class BoolEqualsAdvancedFilter(AdvancedFilter): All required parameters must be populated in order to send to Azure. - :param key: The Key value + :param key: The field/property in the event based on which you want to + filter. :type key: str :param operator_type: Required. Constant filled by server. :type operator_type: str - :param value: The boolean filter value + :param value: The boolean filter value. :type value: bool """ 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 index 44a21d897f33..023fd8be7744 100644 --- 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 @@ -17,11 +17,12 @@ class BoolEqualsAdvancedFilter(AdvancedFilter): All required parameters must be populated in order to send to Azure. - :param key: The Key value + :param key: The field/property in the event based on which you want to + filter. :type key: str :param operator_type: Required. Constant filled by server. :type operator_type: str - :param value: The boolean filter value + :param value: The boolean filter value. :type value: bool """ 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 index 46d19c9a5d9c..10436cd38c83 100644 --- 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 @@ -17,11 +17,12 @@ class NumberGreaterThanAdvancedFilter(AdvancedFilter): All required parameters must be populated in order to send to Azure. - :param key: The Key value + :param key: The field/property in the event based on which you want to + filter. :type key: str :param operator_type: Required. Constant filled by server. :type operator_type: str - :param value: The filter value + :param value: The filter value. :type value: float """ 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 index 71138097c3b2..19159f6bfaff 100644 --- 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 @@ -17,11 +17,12 @@ class NumberGreaterThanAdvancedFilter(AdvancedFilter): All required parameters must be populated in order to send to Azure. - :param key: The Key value + :param key: The field/property in the event based on which you want to + filter. :type key: str :param operator_type: Required. Constant filled by server. :type operator_type: str - :param value: The filter value + :param value: The filter value. :type value: float """ 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 index ea473bcd7c83..788b24944d39 100644 --- 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 @@ -17,11 +17,12 @@ class NumberGreaterThanOrEqualsAdvancedFilter(AdvancedFilter): All required parameters must be populated in order to send to Azure. - :param key: The Key value + :param key: The field/property in the event based on which you want to + filter. :type key: str :param operator_type: Required. Constant filled by server. :type operator_type: str - :param value: The filter value + :param value: The filter value. :type value: float """ 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 index 5e6d7d574279..c4b6e30da7e8 100644 --- 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 @@ -17,11 +17,12 @@ class NumberGreaterThanOrEqualsAdvancedFilter(AdvancedFilter): All required parameters must be populated in order to send to Azure. - :param key: The Key value + :param key: The field/property in the event based on which you want to + filter. :type key: str :param operator_type: Required. Constant filled by server. :type operator_type: str - :param value: The filter value + :param value: The filter value. :type value: float """ 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 index cf2bbf6c4aa9..e44bc777d29b 100644 --- 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 @@ -17,11 +17,12 @@ class NumberInAdvancedFilter(AdvancedFilter): All required parameters must be populated in order to send to Azure. - :param key: The Key value + :param key: The field/property in the event based on which you want to + filter. :type key: str :param operator_type: Required. Constant filled by server. :type operator_type: str - :param values: The set of filter values + :param values: The set of filter values. :type values: list[float] """ 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 index fed5416d9afa..de1bc1e7ec09 100644 --- 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 @@ -17,11 +17,12 @@ class NumberInAdvancedFilter(AdvancedFilter): All required parameters must be populated in order to send to Azure. - :param key: The Key value + :param key: The field/property in the event based on which you want to + filter. :type key: str :param operator_type: Required. Constant filled by server. :type operator_type: str - :param values: The set of filter values + :param values: The set of filter values. :type values: list[float] """ 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 index 926eeadcdf12..b3ede5c3b7a5 100644 --- 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 @@ -17,11 +17,12 @@ class NumberLessThanAdvancedFilter(AdvancedFilter): All required parameters must be populated in order to send to Azure. - :param key: The Key value + :param key: The field/property in the event based on which you want to + filter. :type key: str :param operator_type: Required. Constant filled by server. :type operator_type: str - :param value: The filter value + :param value: The filter value. :type value: float """ 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 index 2716637a4579..8f46f001dec4 100644 --- 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 @@ -17,11 +17,12 @@ class NumberLessThanAdvancedFilter(AdvancedFilter): All required parameters must be populated in order to send to Azure. - :param key: The Key value + :param key: The field/property in the event based on which you want to + filter. :type key: str :param operator_type: Required. Constant filled by server. :type operator_type: str - :param value: The filter value + :param value: The filter value. :type value: float """ 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 index 47e790dc2b3a..602bff830850 100644 --- 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 @@ -17,11 +17,12 @@ class NumberLessThanOrEqualsAdvancedFilter(AdvancedFilter): All required parameters must be populated in order to send to Azure. - :param key: The Key value + :param key: The field/property in the event based on which you want to + filter. :type key: str :param operator_type: Required. Constant filled by server. :type operator_type: str - :param value: The filter value + :param value: The filter value. :type value: float """ 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 index 3b95a926b632..82826657c30a 100644 --- 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 @@ -17,11 +17,12 @@ class NumberLessThanOrEqualsAdvancedFilter(AdvancedFilter): All required parameters must be populated in order to send to Azure. - :param key: The Key value + :param key: The field/property in the event based on which you want to + filter. :type key: str :param operator_type: Required. Constant filled by server. :type operator_type: str - :param value: The filter value + :param value: The filter value. :type value: float """ 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 index 343c167e3dfc..8a506a7da5c5 100644 --- 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 @@ -17,11 +17,12 @@ class NumberNotInAdvancedFilter(AdvancedFilter): All required parameters must be populated in order to send to Azure. - :param key: The Key value + :param key: The field/property in the event based on which you want to + filter. :type key: str :param operator_type: Required. Constant filled by server. :type operator_type: str - :param values: The set of filter values + :param values: The set of filter values. :type values: list[float] """ 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 index 44df3e2f9dbb..5341e58be5bb 100644 --- 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 @@ -17,11 +17,12 @@ class NumberNotInAdvancedFilter(AdvancedFilter): All required parameters must be populated in order to send to Azure. - :param key: The Key value + :param key: The field/property in the event based on which you want to + filter. :type key: str :param operator_type: Required. Constant filled by server. :type operator_type: str - :param values: The set of filter values + :param values: The set of filter values. :type values: list[float] """ 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 index f09fd519d3ee..e45cfd1741f1 100644 --- 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 @@ -17,11 +17,12 @@ class StringBeginsWithAdvancedFilter(AdvancedFilter): All required parameters must be populated in order to send to Azure. - :param key: The Key value + :param key: The field/property in the event based on which you want to + filter. :type key: str :param operator_type: Required. Constant filled by server. :type operator_type: str - :param values: The set of filter values + :param values: The set of filter values. :type values: list[str] """ 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 index 611a87ff3e5a..c6692bb765a5 100644 --- 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 @@ -17,11 +17,12 @@ class StringBeginsWithAdvancedFilter(AdvancedFilter): All required parameters must be populated in order to send to Azure. - :param key: The Key value + :param key: The field/property in the event based on which you want to + filter. :type key: str :param operator_type: Required. Constant filled by server. :type operator_type: str - :param values: The set of filter values + :param values: The set of filter values. :type values: list[str] """ 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 index 1fe8460485fe..e39dceecb55b 100644 --- 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 @@ -17,11 +17,12 @@ class StringContainsAdvancedFilter(AdvancedFilter): All required parameters must be populated in order to send to Azure. - :param key: The Key value + :param key: The field/property in the event based on which you want to + filter. :type key: str :param operator_type: Required. Constant filled by server. :type operator_type: str - :param values: The set of filter values + :param values: The set of filter values. :type values: list[str] """ 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 index a3073af8010d..b66328c7f883 100644 --- 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 @@ -17,11 +17,12 @@ class StringContainsAdvancedFilter(AdvancedFilter): All required parameters must be populated in order to send to Azure. - :param key: The Key value + :param key: The field/property in the event based on which you want to + filter. :type key: str :param operator_type: Required. Constant filled by server. :type operator_type: str - :param values: The set of filter values + :param values: The set of filter values. :type values: list[str] """ 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 index d735c2fc4618..ba70983a8303 100644 --- 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 @@ -17,11 +17,12 @@ class StringEndsWithAdvancedFilter(AdvancedFilter): All required parameters must be populated in order to send to Azure. - :param key: The Key value + :param key: The field/property in the event based on which you want to + filter. :type key: str :param operator_type: Required. Constant filled by server. :type operator_type: str - :param values: The set of filter values + :param values: The set of filter values. :type values: list[str] """ 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 index 235a6ca10edd..3ed41a492f8b 100644 --- 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 @@ -17,11 +17,12 @@ class StringEndsWithAdvancedFilter(AdvancedFilter): All required parameters must be populated in order to send to Azure. - :param key: The Key value + :param key: The field/property in the event based on which you want to + filter. :type key: str :param operator_type: Required. Constant filled by server. :type operator_type: str - :param values: The set of filter values + :param values: The set of filter values. :type values: list[str] """ 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 index 9919df20381d..0d75dd8d7ac8 100644 --- 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 @@ -17,11 +17,12 @@ class StringInAdvancedFilter(AdvancedFilter): All required parameters must be populated in order to send to Azure. - :param key: The Key value + :param key: The field/property in the event based on which you want to + filter. :type key: str :param operator_type: Required. Constant filled by server. :type operator_type: str - :param values: The set of filter values + :param values: The set of filter values. :type values: list[str] """ 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 index e46bd7c95b2b..6ffd7e8c839d 100644 --- 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 @@ -17,11 +17,12 @@ class StringInAdvancedFilter(AdvancedFilter): All required parameters must be populated in order to send to Azure. - :param key: The Key value + :param key: The field/property in the event based on which you want to + filter. :type key: str :param operator_type: Required. Constant filled by server. :type operator_type: str - :param values: The set of filter values + :param values: The set of filter values. :type values: list[str] """ 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 index 45db1c754706..0b7924b7046e 100644 --- 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 @@ -17,11 +17,12 @@ class StringNotInAdvancedFilter(AdvancedFilter): All required parameters must be populated in order to send to Azure. - :param key: The Key value + :param key: The field/property in the event based on which you want to + filter. :type key: str :param operator_type: Required. Constant filled by server. :type operator_type: str - :param values: The set of filter values + :param values: The set of filter values. :type values: list[str] """ 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 index b7119b17863f..001b5b42da1c 100644 --- 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 @@ -17,11 +17,12 @@ class StringNotInAdvancedFilter(AdvancedFilter): All required parameters must be populated in order to send to Azure. - :param key: The Key value + :param key: The field/property in the event based on which you want to + filter. :type key: str :param operator_type: Required. Constant filled by server. :type operator_type: str - :param values: The set of filter values + :param values: The set of filter values. :type values: list[str] """ 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 a96632858594..2120d4b737d8 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 @@ -544,7 +544,7 @@ def internal_paging(next_link=None, raw=False): if top is not None: query_parameters['$top'] = self._serialize.query("top", top, 'int') if label is not None: - query_parameters['LABEL'] = self._serialize.query("label", label, 'str') + query_parameters['label'] = self._serialize.query("label", label, 'str') else: url = next_link @@ -627,7 +627,7 @@ def internal_paging(next_link=None, raw=False): if top is not None: query_parameters['$top'] = self._serialize.query("top", top, 'int') if label is not None: - query_parameters['LABEL'] = self._serialize.query("label", label, 'str') + query_parameters['label'] = self._serialize.query("label", label, 'str') else: url = next_link @@ -712,7 +712,7 @@ def internal_paging(next_link=None, raw=False): if top is not None: query_parameters['$top'] = self._serialize.query("top", top, 'int') if label is not None: - query_parameters['LABEL'] = self._serialize.query("label", label, 'str') + query_parameters['label'] = self._serialize.query("label", label, 'str') else: url = next_link @@ -800,7 +800,7 @@ def internal_paging(next_link=None, raw=False): if top is not None: query_parameters['$top'] = self._serialize.query("top", top, 'int') if label is not None: - query_parameters['LABEL'] = self._serialize.query("label", label, 'str') + query_parameters['label'] = self._serialize.query("label", label, 'str') else: url = next_link @@ -883,7 +883,7 @@ def internal_paging(next_link=None, raw=False): if top is not None: query_parameters['$top'] = self._serialize.query("top", top, 'int') if label is not None: - query_parameters['LABEL'] = self._serialize.query("label", label, 'str') + query_parameters['label'] = self._serialize.query("label", label, 'str') else: url = next_link @@ -971,7 +971,7 @@ def internal_paging(next_link=None, raw=False): if top is not None: query_parameters['$top'] = self._serialize.query("top", top, 'int') if label is not None: - query_parameters['LABEL'] = self._serialize.query("label", label, 'str') + query_parameters['label'] = self._serialize.query("label", label, 'str') else: url = next_link @@ -1058,7 +1058,7 @@ def internal_paging(next_link=None, raw=False): if top is not None: query_parameters['$top'] = self._serialize.query("top", top, 'int') if label is not None: - query_parameters['LABEL'] = self._serialize.query("label", label, 'str') + query_parameters['label'] = self._serialize.query("label", label, 'str') else: url = next_link @@ -1149,7 +1149,7 @@ def internal_paging(next_link=None, raw=False): if top is not None: query_parameters['$top'] = self._serialize.query("top", top, 'int') if label is not None: - query_parameters['LABEL'] = self._serialize.query("label", label, 'str') + query_parameters['label'] = self._serialize.query("label", label, 'str') else: url = next_link @@ -1242,7 +1242,7 @@ def internal_paging(next_link=None, raw=False): if top is not None: query_parameters['$top'] = self._serialize.query("top", top, 'int') if label is not None: - query_parameters['LABEL'] = self._serialize.query("label", label, 'str') + query_parameters['label'] = self._serialize.query("label", label, 'str') else: url = next_link @@ -1332,7 +1332,7 @@ def internal_paging(next_link=None, raw=False): if top is not None: query_parameters['$top'] = self._serialize.query("top", top, 'int') if label is not None: - query_parameters['LABEL'] = self._serialize.query("label", label, 'str') + query_parameters['label'] = self._serialize.query("label", label, 'str') else: url = next_link From 123a0c75c1fd6a8c291b8cdafa187d644300c492 Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Tue, 26 Feb 2019 07:48:06 +0000 Subject: [PATCH 5/5] Generated from c681e1b7ce8baad94433d826b119127fc9c4891b Address CR comments --- .../azure/mgmt/eventgrid/models/event_subscription_filter.py | 2 +- .../mgmt/eventgrid/models/event_subscription_filter_py3.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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 55e040721059..41bd9b04b4bc 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 @@ -26,7 +26,7 @@ class EventSubscriptionFilter(Model): :type subject_ends_with: str :param included_event_types: A list of applicable event types that need to be part of the event subscription. If it is desired to subscribe to all - event types, set the IncludedEventTypes to null. + default event types, set the IncludedEventTypes to null. :type included_event_types: list[str] :param is_subject_case_sensitive: Specifies if the SubjectBeginsWith and SubjectEndsWith properties of the filter 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 f935c19eaa7e..2591b771a441 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 @@ -26,7 +26,7 @@ class EventSubscriptionFilter(Model): :type subject_ends_with: str :param included_event_types: A list of applicable event types that need to be part of the event subscription. If it is desired to subscribe to all - event types, set the IncludedEventTypes to null. + default event types, set the IncludedEventTypes to null. :type included_event_types: list[str] :param is_subject_case_sensitive: Specifies if the SubjectBeginsWith and SubjectEndsWith properties of the filter